Skip to content

Commit

Permalink
Deprecate pre fhir web (#1243)
Browse files Browse the repository at this point in the history
* Remove opensrp-plan routes

* Remove pre-fhir-web dependencies in app

* Move jest config to top level package.json

* Remove duplicate husky lint rules in app, use top workspace

* Move peer dependencies in app to dependencies

* Update yarn lock file

* Revert "Move peer dependencies in app to dependencies"

This reverts commit f7c9ad7.

* Remove pre-fhir-web packages

* Remove routes and unused imported dependencies in app

* Remove envs configuring deprecated packages/modules

* Add deprecation notice in the readme

* Remove redundant enable fhir env

* Update readme pre-fhir-web branch link

* Update app tests

* Re-add React import in test file
  • Loading branch information
peterMuriuki authored Aug 21, 2023
1 parent afaa125 commit 39a20c1
Show file tree
Hide file tree
Showing 368 changed files with 625 additions and 153,238 deletions.
47 changes: 29 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,27 @@ OpenSRP FHIR Web is the default frontend for [OpenSRP HAPI FHIR Server](https://

---

- [FHIR Standard](#what-is-the-fhir-standard)
- [OpenSRP FHIR Core](#what-is-opensrp-fhir-core)
- [Project Architecture](#project-architecture)
- [Repository Setup](#repository-setup)
- [Bootstrapping](#bootstrapping)
- [Current Build Tools](#current-build-tools)
- [Deprecated Build Tools](#deprecated-build-tools)
- [Getting Started](#getting-started)
- [Contributing](#contributing)
- [Deployments](#deployments)
- [Prerequisites](#prerequisites)
- [Docker](#1-docker)
- [Kubernetes](#2-kubernetes)
- [Ansible](#3-ansible)
- [Configuration](#configuration)
- [Environment Variables](#environment-variables)
- [Multi-language Support](#multi-language-support-mls)
- [Publishing](#publishing)
- [OpenSRP FHIR Web](#opensrp-fhir-web)
- [Table of Contents](#table-of-contents)
- [What is the FHIR Standard](#what-is-the-fhir-standard)
- [What is OpenSRP FHIR Core](#what-is-opensrp-fhir-core)
- [Project Architecture](#project-architecture)
- [Repository Setup](#repository-setup)
- [Bootstrapping](#bootstrapping)
- [Current Build Tools](#current-build-tools)
- [Deprecated Build Tools](#deprecated-build-tools)
- [Getting Started](#getting-started)
- [Contributing](#contributing)
- [Deployments](#deployments)
- [Prerequisites](#prerequisites)
- [1. Docker](#1-docker)
- [2. Kubernetes](#2-kubernetes)
- [3. Ansible](#3-ansible)
- [Configuration](#configuration)
- [Environment Variables](#environment-variables)
- [Multi-language Support (MLS)](#multi-language-support-mls)
- [Publishing](#publishing)
- [Deprecation Notice](#deprecation-notice)

## What is the FHIR Standard

Expand Down Expand Up @@ -116,3 +119,11 @@ We use different technologies to deploy OpenSRP FHIR Web.
## Publishing

- [Publishing Documentation](/docs/publishing.md).

## Deprecation Notice

**Important:** We are deprecating packages used for administration of both opensrp web server and mobile clients that do not use fhir. These packages will no longer be actively maintained or receive updates.

The last release that includes this modules can be found [here](https://github.com/opensrp/web/releases/tag/v2-deprecated-web) and the code in this [branch](https://github.com/opensrp/web/tree/v2-deprecate-web-branch)

For any questions or assistance regarding issues in the affected modules, please feel free to create an [issue](https://github.com/opensrp/web/issues/new/choose)
17 changes: 0 additions & 17 deletions app/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,23 @@ REACT_APP_OPENSRP_API_BASE_URL=https://reveal-stage.smartregister.org/opensrp/re
REACT_APP_OPENSRP_API_V2_BASE_URL=https://reveal-stage.smartregister.org/opensrp/rest/v2/
REACT_APP_OPENSRP_USER_URL=https://reveal-stage.smartregister.org/opensrp/user-details
REACT_APP_DISABLE_LOGIN_PROTECTION=false
REACT_APP_ENABLE_USER_MANAGEMENT=false
REACT_APP_ENABLE_FHIR_USER_MANAGEMENT=false
REACT_APP_FHIR_API_BASE_URL=https://fhir.labs.smartregister.org/fhir
REACT_APP_OPENSRP_OAUTH_SCOPES=profile
REACT_APP_ENABLE_PRODUCT_CATALOGUE=false
REACT_APP_ENABLE_TEAMS=false
REACT_APP_ENABLE_FHIR_HEALTHCARE=false
REACT_APP_ENABLE_FHIR_TEAMS=false
REACT_APP_ENABLE_TEAMS_ASSIGNMENT_MODULE=false
REACT_APP_ENABLE_CARD_SUPPORT=false
REACT_APP_FILTER_BY_PARENT_ID=false
REACT_APP_ENABLE_INVENTORY=false
REACT_APP_ENABLE_FHIR_PATIENTS=false
REACT_APP_PLAN_ASSIGNMENT_AT_GEO_LEVEL=0
REACT_APP_MAIN_LOGO_SRC=https://github.com/OpenSRP/web/raw/master/app/src/assets/images/opensrp-logo-color.png
REACT_APP_DEFAULTS_TABLE_PAGE_SIZE=20

REACT_APP_ENABLE_PLANS=false
REACT_APP_ENABLE_FHIR_CARE_TEAM=false
REACT_APP_DATE_FORMAT=yyyy-MM-dd
REACT_APP_DEFAULT_PLAN_DURATION_DAYS=20
REACT_APP_DEFAULT_ACTIVITY_DURATION_DAYS=7
REACT_APP_PLAN_UUID_NAMESPACE=85f7dbbf-07d0-4c92-aa2d-d50d141dde00
REACT_APP_ACTION_UUID_NAMESPACE=35968df5-f335-44ae-8ae5-25804caa2d86
REACT_APP_DEFAULT_PLAN_VERSION=1
REACT_APP_ENABLE_TEAMS_ASSIGNMENT_MODULE=false
REACT_APP_DEFAULT_PLAN_ID=35968df5-f335-44ae-8ae5-25804caa2d86
REACT_APP_KEYCLOAK_USERS_PAGE_SIZE=20
# home page after login, valid values: default | eusm | tunisia
REACT_APP_DEFAULT_HOME_MODE=default
# configures the value to be used for taskGenerationStatus context for dynamicPlans
REACT_APP_TASK_GENERATION_STATUS=False
REACT_APP_LANGUAGE_CODE=en
REACT_APP_PROJECT_CODE=eusm
REACT_APP_SUPPORTED_LANGUAGES=en,fr
Expand All @@ -58,11 +43,9 @@ REACT_APP_PAGINATION_SIZE=1000
REACT_APP_FHIR_PATIENT_SORT_FIELDS=-_lastUpdated
REACT_APP_FHIR_PATIENT_BUNDLE_SIZE=5000
REACT_APP_ENABLE_FHIR_LOCATIONS=false
REACT_APP_ENABLE_SERVER_SETTINGS=false
REACT_APP_OPENSRP_WEB_VERSION=$npm_package_version
REACT_APP_SENTRY_CONFIG_JSON={"dsn":"https://[email protected]/1","release":"1.0.0","environment":"production","tags":{"release-name":"web","commit":"012345"}}
REACT_APP_ENABLE_QUEST=true
REACT_APP_ENABLE_REPORTS=false
REACT_APP_ENABLE_FHIR_GROUP=true
REACT_APP_ENABLE_FHIR_COMMODITY=true
REACT_APP_COMMODITIES_LIST_RESOURCE_ID="uuid"
Expand Down
17 changes: 0 additions & 17 deletions app/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,14 @@ REACT_APP_OPENSRP_API_BASE_URL=https://some.opesrp.server/opensrp/rest/
REACT_APP_OPENSRP_USER_URL=https://some.opesrp.server/opensrp/user-details
REACT_APP_DISABLE_LOGIN_PROTECTION=false
REACT_APP_OPENSRP_OAUTH_SCOPES=profile
REACT_APP_ENABLE_PRODUCT_CATALOGUE=false
REACT_APP_ENABLE_TEAMS=false
REACT_APP_ENABLE_TEAMS_ASSIGNMENT_MODULE=false
REACT_APP_ENABLE_CARD_SUPPORT=false
REACT_APP_FILTER_BY_PARENT_ID=false
REACT_APP_ENABLE_INVENTORY=false
REACT_APP_PLAN_ASSIGNMENT_AT_GEO_LEVEL=1
REACT_APP_MAIN_LOGO_SRC=https://github.com/OpenSRP/web/raw/master/app/src/assets/images/opensrp-logo-color.png
REACT_APP_DEFAULTS_TABLE_PAGE_SIZE=20
REACT_APP_ENABLE_PLANS=false
REACT_APP_ENABLE_FHIR_CARE_TEAM=false
REACT_APP_FHIR_API_BASE_URL=https://some.fhir.server/fhir
REACT_APP_DATE_FORMAT=yyyy-MM-dd
REACT_APP_DEFAULT_PLAN_DURATION_DAYS=20
REACT_APP_DEFAULT_ACTIVITY_DURATION_DAYS=7
REACT_APP_PLAN_UUID_NAMESPACE=some-plan-uuid-namespace-001
REACT_APP_ACTION_UUID_NAMESPACE=some-action-uuid-namespace-001
REACT_APP_DEFAULT_PLAN_VERSION=1
REACT_APP_ENABLE_TEAMS_ASSIGNMENT_MODULE=false
REACT_APP_DEFAULT_PLAN_ID=some-default-plan-uuid-001
REACT_APP_KEYCLOAK_USERS_PAGE_SIZE=20
REACT_APP_DEFAULT_HOME_MODE=default
REACT_APP_TASK_GENERATION_STATUS=False
REACT_APP_LANGUAGE_CODE=en
REACT_APP_PROJECT_CODE=eusm
REACT_APP_SUPPORTED_LANGUAGES=en,fr
Expand All @@ -45,7 +30,5 @@ REACT_APP_DISABLE_TEAM_MEMBER_REASSIGNMENT=false
REACT_APP_PAGINATION_SIZE=1000
REACT_APP_USER_FORM_HIDDEN_FIELDS=""
REACT_APP_USER_FORM_RENDER_FIELDS=""
REACT_APP_DEFAULTS_TABLE_PAGE_SIZE=10
REACT_APP_ENABLE_QUEST=true
REACT_APP_ENABLE_USER_MANAGEMENT=true
REACT_APP_ENABLE_REPORTS=false
68 changes: 1 addition & 67 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,12 @@
"dependencies": {
"@2fd/ant-design-icons": "^2.6.0",
"@ant-design/icons": "^4.7.0",
"@fortawesome/fontawesome-svg-core": "^1.2.30",
"@fortawesome/free-brands-svg-icons": "^5.14.0",
"@fortawesome/free-regular-svg-icons": "^5.14.0",
"@fortawesome/free-solid-svg-icons": "^5.14.0",
"@fortawesome/react-fontawesome": "^0.1.11",
"@onaio/connected-private-route": "^0.0.11",
"@onaio/connected-reducer-registry": "^0.0.3",
"@onaio/gatekeeper": "^0.4.0",
"@onaio/list-view": "^0.0.3",
"@onaio/loaders": "^0.0.1",
"@onaio/redux-reducer-registry": "^0.0.9",
"@onaio/session-reducer": "^0.0.12",
"@onaio/utils": "^0.0.1",
"@opensrp/card-support": "^0.0.9",
"@opensrp/error-boundary-fallback": "^0.0.7",
"@opensrp/fhir-care-team": "^0.0.1",
"@opensrp/fhir-client": "^0.0.1",
Expand All @@ -29,50 +21,28 @@
"@opensrp/fhir-team-management": "^0.0.5",
"@opensrp/fhir-user-management": "^0.0.1",
"@opensrp/fhir-views": "^0.0.0",
"@opensrp/form-config-antd": "^0.0.4",
"@opensrp/i18n": "^0.0.1",
"@opensrp/inventory": "^0.0.9",
"@opensrp/keycloak-service": "^0.0.17",
"@opensrp/location-management": "^0.0.15",
"@opensrp/notifications": "^0.0.5",
"@opensrp/pkg-config": "^0.0.9",
"@opensrp/plan-form": "^0.0.5",
"@opensrp/plan-form-core": "^0.0.4",
"@opensrp/plans": "^0.0.10",
"@opensrp/product-catalogue": "^0.0.9",
"@opensrp/react-utils": "^0.0.12",
"@opensrp/reducer-factory": "^0.0.13",
"@opensrp/reports": "^0.0.0",
"@opensrp/server-logout": "^0.0.2",
"@opensrp/server-service": "^0.0.16",
"@opensrp/server-settings": "^0.0.1",
"@opensrp/store": "^0.0.10",
"@opensrp/team-management": "^0.0.9",
"@opensrp/user-management": "^0.1.19",
"@sentry/react": "^5.27.4",
"@smile-cdr/fhirts": "1.2.5",
"antd": "^5.5.2",
"bootstrap": "^4.5.2",
"client-oauth2": "^4.3.3",
"connected-react-router": "^6.8.0",
"fast_array_intersect": "^1.1.0",
"fhirclient": "2.3.11",
"flush-promises": "^1.0.2",
"formik": "^2.1.5",
"formik-antd": "^2.0.1",
"jsdom-global": "^3.0.2",
"keycloak-js": "^18.0.0",
"lodash": "^4.17.20",
"react-query": "^3.15.1",
"react-scripts": "4.0.3",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"seamless-immutable": "^7.1.4",
"tree-model": "^1.0.7",
"use-deep-compare-effect": "1.6.1",
"yarn": "^1.22.10",
"yup": "^0.29.3"
"seamless-immutable": "^7.1.4"
},
"scripts": {
"start": "react-scripts start",
Expand All @@ -99,42 +69,6 @@
"last 1 safari version"
]
},
"jest": {
"collectCoverageFrom": [
"src/**/*.{ts,tsx}",
"!src/index.tsx",
"!src/serviceWorker.ts",
"!**/tests/**",
"!src/configs/**"
],
"coverageThreshold": {
"global": {
"branches": 80,
"functions": 80,
"lines": 80,
"statements": 80
}
}
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{ts,tsx}": [
"eslint --fix --max-warnings 0"
],
"*.{js,jsx}": [
"eslint --fix --max-warnings 0"
],
"*.{json,js,jsx,ts,tsx,css,scss,md}": [
"prettier --write"
],
"*.{snap, test.tsx}": [
"eslint"
]
},
"peerDependencies": {
"react": "17.0.0",
"react-dom": "17.0.0",
Expand Down
12 changes: 2 additions & 10 deletions app/src/App/App.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
import React from 'react';
import { Helmet } from 'react-helmet';
import { Layout } from 'antd';
import {
WEBSITE_NAME,
ENABLE_FHIR,
} from '../configs/env';
import { WEBSITE_NAME } from '../configs/env';
import ConnectedHeader from '../containers/ConnectedHeader';
import ConnectedSidebar from '../containers/ConnectedSidebar';
import './App.css';
import '@opensrp/plans/dist/index.css';
import '@opensrp/user-management/dist/index.css';
import '@opensrp/product-catalogue/dist/index.css';
import '@opensrp/inventory/dist/index.css';
import { FHIRApps } from './fhir-apps';
import { OpenSRPApps } from "./opensrp-apps";

const { Content } = Layout;

Expand All @@ -25,7 +17,7 @@ const App: React.FC = () => {
<div className="body-wrapper">
<ConnectedHeader />
<Content>
{ ENABLE_FHIR ? <FHIRApps /> : <OpenSRPApps /> }
<FHIRApps />
</Content>
</div>
</Layout>
Expand Down
41 changes: 10 additions & 31 deletions app/src/App/fhir-apps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ import ConnectedPrivateRoute from '@onaio/connected-private-route';
import { Switch, Route, Redirect, RouteComponentProps } from 'react-router';
import { Spin } from 'antd';
import { CustomLogout } from '../components/Logout';
import {
BACKEND_ACTIVE,
DISABLE_LOGIN_PROTECTION,
OPENSRP_ROLES,
} from '../configs/env';
import { BACKEND_ACTIVE, DISABLE_LOGIN_PROTECTION, OPENSRP_ROLES } from '../configs/env';
import {
REACT_CALLBACK_PATH,
URL_BACKEND_CALLBACK,
Expand Down Expand Up @@ -112,10 +108,7 @@ import {
LIST_GROUP_URL,
} from '@opensrp/fhir-group-management';
import { useTranslation } from '../mls';
import '@opensrp/plans/dist/index.css';
import '@opensrp/user-management/dist/index.css';
import '@opensrp/product-catalogue/dist/index.css';
import '@opensrp/inventory/dist/index.css';
import { APP_LOGIN_URL } from '../configs/dispatchConfig';

/** Util function that renders Oauth2 callback components
Expand Down Expand Up @@ -260,10 +253,8 @@ const FHIRApps = () => {
activeRoles={activeRoles.USERS && activeRoles.USERS.split(',')}
exact
path={`${URL_USER_EDIT}/:${ROUTE_PARAM_USER_ID}`}
{...(fhirCreateEditUserProps)}
component={
FHIRConnectedCreateEditUser
}
{...fhirCreateEditUserProps}
component={FHIRConnectedCreateEditUser}
/>
<PrivateComponent
redirectPath={APP_CALLBACK_URL}
Expand All @@ -287,10 +278,8 @@ const FHIRApps = () => {
activeRoles={activeRoles.USERS && activeRoles.USERS.split(',')}
exact
path={URL_USER_CREATE}
{...(fhirCreateEditUserProps)}
component={
FHIRConnectedCreateEditUser
}
{...fhirCreateEditUserProps}
component={FHIRConnectedCreateEditUser}
/>
<PrivateComponent
redirectPath={APP_CALLBACK_URL}
Expand Down Expand Up @@ -357,9 +346,7 @@ const FHIRApps = () => {
<PrivateComponent
redirectPath={APP_CALLBACK_URL}
disableLoginProtection={DISABLE_LOGIN_PROTECTION}
activeRoles={
activeRoles.FORM_CONFIGURATION && activeRoles.FORM_CONFIGURATION.split(',')
}
activeRoles={activeRoles.FORM_CONFIGURATION && activeRoles.FORM_CONFIGURATION.split(',')}
exact
path={URL_JSON_VALIDATOR_LIST}
component={FileList}
Expand Down Expand Up @@ -395,36 +382,28 @@ const FHIRApps = () => {
<PrivateComponent
redirectPath={APP_CALLBACK_URL}
disableLoginProtection={DISABLE_LOGIN_PROTECTION}
activeRoles={
activeRoles.HEALTHCARE_SERVICE && activeRoles.HEALTHCARE_SERVICE.split(',')
}
activeRoles={activeRoles.HEALTHCARE_SERVICE && activeRoles.HEALTHCARE_SERVICE.split(',')}
path={`${ADD_EDIT_HEALTHCARE_SERVICE_URL}/:id`}
component={HealthCareAddEdit}
/>
<PrivateComponent
redirectPath={APP_CALLBACK_URL}
disableLoginProtection={DISABLE_LOGIN_PROTECTION}
activeRoles={
activeRoles.HEALTHCARE_SERVICE && activeRoles.HEALTHCARE_SERVICE.split(',')
}
activeRoles={activeRoles.HEALTHCARE_SERVICE && activeRoles.HEALTHCARE_SERVICE.split(',')}
path={ADD_EDIT_HEALTHCARE_SERVICE_URL}
component={HealthCareAddEdit}
/>
<PrivateComponent
redirectPath={APP_CALLBACK_URL}
disableLoginProtection={DISABLE_LOGIN_PROTECTION}
activeRoles={
activeRoles.HEALTHCARE_SERVICE && activeRoles.HEALTHCARE_SERVICE.split(',')
}
activeRoles={activeRoles.HEALTHCARE_SERVICE && activeRoles.HEALTHCARE_SERVICE.split(',')}
path={`${LIST_HEALTHCARE_URL}/:id`}
component={HealthCareList}
/>
<PrivateComponent
redirectPath={APP_CALLBACK_URL}
disableLoginProtection={DISABLE_LOGIN_PROTECTION}
activeRoles={
activeRoles.HEALTHCARE_SERVICE && activeRoles.HEALTHCARE_SERVICE.split(',')
}
activeRoles={activeRoles.HEALTHCARE_SERVICE && activeRoles.HEALTHCARE_SERVICE.split(',')}
path={LIST_HEALTHCARE_URL}
component={HealthCareList}
/>
Expand Down
Loading

0 comments on commit 39a20c1

Please sign in to comment.