generated from openmrs/openmrs-esm-template-app
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into color_wait_time
- Loading branch information
Showing
13 changed files
with
1,018 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,122 +1,75 @@ | ||
import { getAsyncLifecycle, defineConfigSchema, provide, getSyncLifecycle } from '@openmrs/esm-framework'; | ||
import { configSchema } from './config-schema'; | ||
import ugandaEmrOverrides from './ugandaemr-configuration-overrrides.json'; | ||
import ugandaEmrConfig from './ugandaemr-config'; | ||
import formsRegistry from './forms/forms-registry'; | ||
import { addToBaseFormsRegistry } from '@openmrs/openmrs-form-engine-lib'; | ||
import { defineConfigSchema, getAsyncLifecycle, getSyncLifecycle, provide } from '@openmrs/esm-framework'; | ||
import { createDashboardGroup, createDashboardLink } from '@openmrs/esm-patient-common-lib'; | ||
import { addToBaseFormsRegistry } from '@openmrs/openmrs-form-engine-lib'; | ||
import { configSchema } from './config-schema'; | ||
import { moduleName } from './constants'; | ||
import { | ||
mchDashboardMeta, | ||
familyHealthDashboardMeta, | ||
childHealthDashboardMeta, | ||
hivExposedInfantMeta, | ||
familyHealthDashboardMeta, | ||
familyPlanningDashboardMeta, | ||
hivExposedInfantMeta, | ||
mchDashboardMeta, | ||
} from './dashboard.meta'; | ||
import { moduleName } from './constants'; | ||
import formsRegistry from './forms/forms-registry'; | ||
import ugandaEmrConfig from './ugandaemr-config'; | ||
import ugandaEmrOverrides from './ugandaemr-configuration-overrrides.json'; | ||
|
||
const importTranslation = require.context('../translations', false, /.json$/, 'lazy'); | ||
export const importTranslation = require.context('../translations', false, /.json$/, 'lazy'); | ||
|
||
const backendDependencies = { | ||
fhir2: '^1.2.0', | ||
'webservices.rest': '^2.2.0', | ||
const options = { | ||
featureName: '@ugandaemr/esm-family-health-app', | ||
moduleName, | ||
}; | ||
|
||
function setupOpenMRS() { | ||
const options = { | ||
featureName: '@ugandaemr/esm-family-health-app', | ||
moduleName, | ||
}; | ||
|
||
// startapp | ||
export function startupApp() { | ||
defineConfigSchema(moduleName, configSchema); | ||
provide(ugandaEmrOverrides); | ||
provide(ugandaEmrConfig); | ||
addToBaseFormsRegistry(formsRegistry); | ||
return { | ||
pages: [], | ||
extensions: [ | ||
{ | ||
id: 'family-health-clinic-dashboard', | ||
slot: 'patient-chart-dashboard-slot', | ||
load: getSyncLifecycle(createDashboardGroup(familyHealthDashboardMeta), options), | ||
meta: familyHealthDashboardMeta, | ||
}, | ||
// SUB MENU | ||
{ | ||
id: 'mch-dashboard', | ||
slot: 'family-health-dashboard-slot', | ||
load: getSyncLifecycle(createDashboardLink(mchDashboardMeta), options), | ||
meta: mchDashboardMeta, | ||
}, | ||
{ | ||
id: 'mch-dashboard-summary-ext', | ||
slot: 'mch-dashboard-slot', | ||
load: getAsyncLifecycle(() => import('./pages/family-health-clinic/mch/mch-summary.component'), { | ||
featureName: 'mch-dashboard-summary', | ||
moduleName, | ||
}), | ||
meta: { | ||
columnSpan: 4, | ||
}, | ||
}, | ||
{ | ||
id: 'child-health-dashboard', | ||
slot: 'family-health-dashboard-slot', | ||
load: getSyncLifecycle(createDashboardLink(childHealthDashboardMeta), options), | ||
meta: childHealthDashboardMeta, | ||
}, | ||
{ | ||
id: 'child-health-summary-ext', | ||
slot: 'child-health-dashboard-slot', | ||
load: getAsyncLifecycle(() => import('./pages/family-health-clinic/child-health.component'), { | ||
featureName: 'child-health-extension', | ||
moduleName, | ||
}), | ||
meta: { | ||
columnSpan: 4, | ||
}, | ||
}, | ||
{ | ||
id: 'hiv-exposed-infant-dashboard', | ||
slot: 'family-health-dashboard-slot', | ||
load: getSyncLifecycle(createDashboardLink(hivExposedInfantMeta), options), | ||
meta: hivExposedInfantMeta, | ||
}, | ||
{ | ||
id: 'hiv-exposed-infant-ext', | ||
slot: 'hiv-exposed-infant-slot', | ||
load: getAsyncLifecycle( | ||
() => import('./pages/family-health-clinic/hiv-exposed-infant/hiv-exposed-infant.component'), | ||
{ | ||
featureName: 'hiv-exposed-infant', | ||
moduleName, | ||
}, | ||
), | ||
meta: { | ||
columnSpan: 4, | ||
}, | ||
}, | ||
{ | ||
id: 'family-planning-dashboard', | ||
slot: 'family-health-dashboard-slot', | ||
load: getSyncLifecycle(createDashboardLink(familyPlanningDashboardMeta), options), | ||
meta: familyPlanningDashboardMeta, | ||
}, | ||
{ | ||
id: 'family-planning-dashboard-ext', | ||
slot: 'family-planning-dashboard-slot', | ||
load: getAsyncLifecycle( | ||
() => import('./pages/family-health-clinic/family-planning/family-planning.component'), | ||
{ | ||
featureName: 'family-planning', | ||
moduleName, | ||
}, | ||
), | ||
meta: { | ||
columnSpan: 4, | ||
}, | ||
}, | ||
], | ||
}; | ||
} | ||
|
||
export { backendDependencies, importTranslation, setupOpenMRS }; | ||
// pages | ||
|
||
// extensions | ||
export const familyHealthClinicDashboard = getSyncLifecycle(createDashboardGroup(familyHealthDashboardMeta), options); | ||
|
||
export const mchDashboard = getSyncLifecycle(createDashboardLink(mchDashboardMeta), options); | ||
|
||
export const mchDashboardSummaryExt = getAsyncLifecycle( | ||
() => import('./pages/family-health-clinic/mch/mch-summary.component'), | ||
{ | ||
featureName: 'mch-dashboard-summary', | ||
moduleName, | ||
}, | ||
); | ||
|
||
export const childHealthDashboard = getSyncLifecycle(createDashboardLink(childHealthDashboardMeta), options); | ||
|
||
export const childHealthSummaryExt = getAsyncLifecycle( | ||
() => import('./pages/family-health-clinic/child-health.component'), | ||
{ | ||
featureName: 'child-health-extension', | ||
moduleName, | ||
}, | ||
); | ||
|
||
export const hivExposedInfantDashboard = getSyncLifecycle(createDashboardLink(hivExposedInfantMeta), options); | ||
|
||
export const hivExposedInfantExt = getAsyncLifecycle( | ||
() => import('./pages/family-health-clinic/hiv-exposed-infant/hiv-exposed-infant.component'), | ||
{ | ||
featureName: 'hiv-exposed-infant', | ||
moduleName, | ||
}, | ||
); | ||
|
||
export const familyPlanningDashboard = getSyncLifecycle(createDashboardLink(familyPlanningDashboardMeta), options); | ||
|
||
export const familyPlanningDashboardExt = getAsyncLifecycle( | ||
() => import('./pages/family-health-clinic/family-planning/family-planning.component'), | ||
{ | ||
featureName: 'family-planning', | ||
moduleName, | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
{ | ||
"$schema": "https://json.openmrs.org/routes.schema.json", | ||
"backendDependencies": { | ||
"fhir2": "^1.2.0", | ||
"webservices.rest": "^2.2.0" | ||
}, | ||
"pages": [], | ||
"extensions": [ | ||
{ | ||
"name": "family-health-clinic-dashboard", | ||
"slot": "patient-chart-dashboard-slot", | ||
"component": "familyHealthClinicDashboard", | ||
"meta": { | ||
"title": "Family Health Clinic", | ||
"slotName": "family-health-dashboard-slot" | ||
} | ||
}, | ||
{ | ||
"name": "mch-dashboard", | ||
"slot": "family-health-dashboard-slot", | ||
"component": "mchDashboard", | ||
"meta": { | ||
"slot": "mch-dashboard-slot", | ||
"title": "Maternal Child Health" | ||
} | ||
}, | ||
{ | ||
"name": "mch-dashboard-summary-ext", | ||
"slot": "mch-dashboard-slot", | ||
"component": "mchDashboardSummaryExt", | ||
"meta": { | ||
"columnSpan": 4 | ||
} | ||
}, | ||
{ | ||
"name": "child-health-dashboard", | ||
"slot": "family-health-dashboard-slot", | ||
"component": "childHealthDashboard", | ||
"meta": { | ||
"slot": "child-health-dashboard-slot", | ||
"config": { | ||
"columns": 1, | ||
"type": "grid" | ||
}, | ||
"title": "Child Health" | ||
} | ||
}, | ||
{ | ||
"name": "child-health-summary-ext", | ||
"slot": "child-health-dashboard-slot", | ||
"component": "childHealthSummaryExt", | ||
"meta": { | ||
"columnSpan": 4 | ||
} | ||
}, | ||
{ | ||
"name": "hiv-exposed-infant-dashboard", | ||
"slot": "family-health-dashboard-slot", | ||
"component": "hivExposedInfantDashboard", | ||
"meta": { | ||
"slot": "hiv-exposed-infant-slot", | ||
"config": { | ||
"columns": 1, | ||
"type": "grid" | ||
}, | ||
"title": "HIV Exposed Infant" | ||
} | ||
}, | ||
{ | ||
"name": "hiv-exposed-infant-ext", | ||
"slot": "hiv-exposed-infant-slot", | ||
"component": "hivExposedInfantExt", | ||
"meta": { | ||
"columnSpan": 4 | ||
} | ||
}, | ||
{ | ||
"name": "family-planning-dashboard", | ||
"slot": "family-health-dashboard-slot", | ||
"component": "familyPlanningDashboard", | ||
"meta": { | ||
"slot": "family-planning-dashboard-slot", | ||
"config": { | ||
"columns": 1, | ||
"type": "grid" | ||
}, | ||
"title": "Family Planning" | ||
} | ||
}, | ||
{ | ||
"name": "family-planning-dashboard-ext", | ||
"slot": "family-planning-dashboard-slot", | ||
"component": "familyPlanningDashboardExt", | ||
"meta": { | ||
"columnSpan": 4 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,31 @@ | ||
import { getAsyncLifecycle, defineConfigSchema, provide, getSyncLifecycle } from '@openmrs/esm-framework'; | ||
import { configSchema } from './config-schema'; | ||
import ugandaEmrOverrides from './ugandaemr-configuration-overrrides.json'; | ||
import formsRegistry from './forms/forms-registry'; | ||
import { addToBaseFormsRegistry } from '@openmrs/openmrs-form-engine-lib'; | ||
import { defineConfigSchema, getAsyncLifecycle, getSyncLifecycle, provide } from '@openmrs/esm-framework'; | ||
import { createDashboardLink } from '@openmrs/esm-patient-common-lib'; | ||
import { opdDashboardMeta, referralNoteDashboardMeta } from './dashboard.meta'; | ||
import { addToBaseFormsRegistry } from '@openmrs/openmrs-form-engine-lib'; | ||
import { configSchema } from './config-schema'; | ||
import { moduleName } from './constants'; | ||
import { opdDashboardMeta } from './dashboard.meta'; | ||
import formsRegistry from './forms/forms-registry'; | ||
import ugandaEmrOverrides from './ugandaemr-configuration-overrrides.json'; | ||
|
||
const importTranslation = require.context('../translations', false, /.json$/, 'lazy'); | ||
export const importTranslation = require.context('../translations', false, /.json$/, 'lazy'); | ||
|
||
const backendDependencies = { | ||
fhir2: '^1.2.0', | ||
'webservices.rest': '^2.2.0', | ||
const options = { | ||
featureName: '@ugandaemr/esm-outpatient-app', | ||
moduleName, | ||
}; | ||
|
||
function setupOpenMRS() { | ||
const options = { | ||
featureName: '@ugandaemr/esm-outpatient-app', | ||
moduleName, | ||
}; | ||
|
||
// start app | ||
export function startupApp() { | ||
defineConfigSchema(moduleName, configSchema); | ||
provide(ugandaEmrOverrides); | ||
addToBaseFormsRegistry(formsRegistry); | ||
return { | ||
pages: [], | ||
extensions: [ | ||
{ | ||
id: 'opd-dashboard', | ||
slot: 'patient-chart-dashboard-slot', | ||
load: getSyncLifecycle(createDashboardLink(opdDashboardMeta), options), | ||
meta: opdDashboardMeta, | ||
}, | ||
{ | ||
id: 'opd-dashboard-ext', | ||
slot: 'opd-dashboard-slot', | ||
load: getAsyncLifecycle(() => import('./pages/opd/outpatient.component'), { | ||
featureName: 'opd-dashboard-summary', | ||
moduleName, | ||
}), | ||
meta: { | ||
columnSpan: 4, | ||
}, | ||
}, | ||
], | ||
}; | ||
} | ||
|
||
export { backendDependencies, importTranslation, setupOpenMRS }; | ||
// pages | ||
|
||
// extensions | ||
export const opdDashboard = getSyncLifecycle(createDashboardLink(opdDashboardMeta), options); | ||
export const opdDashboardExt = getAsyncLifecycle(() => import('./pages/opd/outpatient.component'), { | ||
featureName: 'opd-dashboard-summary', | ||
moduleName, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"$schema": "https://json.openmrs.org/routes.schema.json", | ||
"backendDependencies": { | ||
"fhir2": "^1.2.0", | ||
"webservices.rest": "^2.2.0" | ||
}, | ||
"pages": [], | ||
"extensions": [ | ||
{ | ||
"name": "opd-dashboard", | ||
"slot": "patient-chart-dashboard-slot", | ||
"meta": { | ||
"title": "Outpatient Department", | ||
"slot": "opd-dashboard-slot" | ||
}, | ||
"component": "opdDashboard" | ||
}, | ||
{ | ||
"name": "opd-dashboard-ext", | ||
"slot": "opd-dashboard-slot", | ||
"component": "opdDashboardExt", | ||
"meta": { | ||
"columnSpan": 4 | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.