From cd0f24ba5f8893839f3736d82c616f6b6393e45d Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Fri, 19 Jan 2024 15:52:14 +0300 Subject: [PATCH 01/24] Added auth for publish to npm (#1775) (#1776) --- .github/workflows/node.master.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.master.js.yml b/.github/workflows/node.master.js.yml index 7bcf8df56..0671686b6 100644 --- a/.github/workflows/node.master.js.yml +++ b/.github/workflows/node.master.js.yml @@ -79,7 +79,7 @@ jobs: run: yarn install --immutable - name: Publish to NPM - run: yarn run ci:publish + run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn run ci:publish env: NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} From 16faa63a6320dc652cbfb5c36787afe443335f65 Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Wed, 31 Jan 2024 10:10:18 +0300 Subject: [PATCH 02/24] Dev merging into working (#1793) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added auth for publish to npm (#1775) * OHRI-2122 Add Program Management under the TPT Program (#1779) * OHRI-2122 Add Program Management under the TPT Program * Tab Naming * Add default translation values * OHRI-2117 Add TPT program menu (#1781) * (chore) remove condition for release on master push (#1778) * OHRI-2109 Add TB Prevention link under Tuberculosis program in the clinical per… (#1782) * Add TB Prevention link under Tuberculosis program in the clinical perspectives * renaming * renaming * OHRI-2119: Populate the Recent TPT tiles on the TPT patient summary board (#1783) * Populate the Recent TPT tiles on the TPT patient summary board * update * Update patient-summary.component.tsx * Update patient-summary.component.tsx * small update * OHRI-2109: Add TB Prevention link under Tuberculosis program in the clinical perspectives (#1787) * slight modification - the TB Prevention link comes first followed by TB Treatment * update on the translator * Update en.json * Update en.json * Update en.json * OHRI-2011: Add a table of all enrolled clients in TPT Program (#1789) * Add TB Prevention link under Tuberculosis program in the clinical perspectives * Add a table of all enrolled clients in TPT Program * Add a table of all enrolled clients in TPT Program * Add the Previous TPT Cases Table on the patient summary board (#1790) * OHRI-2123 TPT Enrolment List (#1786) * OHRI-2123 TPT Enrolment List * Exclude Intents in the formList prop * Update config-schema.ts * OHRI-1916 : Maternal visits list should indicate HIV Test status not … (#1791) * OHRI-1916 : Maternal visits list should indicate HIV Test status not HIV test result * add hivTestStatus to transilation * Fix hyperlink on empty table list (#1792) --------- Co-authored-by: AJAL ODORA JONATHAN <43242517+ODORA0@users.noreply.github.com> Co-authored-by: Pius Rubangakene Co-authored-by: lucyjemutai <130601439+lucyjemutai@users.noreply.github.com> Co-authored-by: Hero --- .github/workflows/node.master.js.yml | 2 +- .../cohort-patient-list.component.tsx | 3 + .../cohort-patient-list/helpers.tsx | 49 ++++++ .../ohri-patient-list-tabs.component.tsx | 1 + .../tabs/antenatal-care.component.tsx | 6 +- .../esm-ohri-pmtct-app/translations/en.json | 1 + packages/esm-tb-app/src/config-schema.ts | 22 +++ packages/esm-tb-app/src/dashboard.meta.tsx | 33 +++- packages/esm-tb-app/src/index.ts | 45 +++++ packages/esm-tb-app/src/routes.json | 102 +++++++++++- packages/esm-tb-app/src/tb-helper.ts | 42 ++--- .../tpt-patient-list-tabs.component.tsx | 58 +++++++ .../tpt-summary-tiles.component.tsx | 22 +++ .../patient-summary.component.tsx | 157 ++++++++++++++++++ .../tabs/tpt-enrolment.component.tsx | 118 +++++++++++++ .../tabs/tpt-treatment.component copy.tsx | 21 +++ .../tpt-program-management.tsx | 31 ++++ packages/esm-tb-app/translations/en.json | 15 +- 18 files changed, 697 insertions(+), 31 deletions(-) create mode 100644 packages/esm-tb-app/src/views/dashboard/patient-list-tabs/tpt-patient-list-tabs.component.tsx create mode 100644 packages/esm-tb-app/src/views/dashboard/summary-tiles/tpt-summary-tiles.component.tsx create mode 100644 packages/esm-tb-app/src/views/tpt/patient-summary/patient-summary.component.tsx create mode 100644 packages/esm-tb-app/src/views/tpt/program-management/tabs/tpt-enrolment.component.tsx create mode 100644 packages/esm-tb-app/src/views/tpt/program-management/tabs/tpt-treatment.component copy.tsx create mode 100644 packages/esm-tb-app/src/views/tpt/program-management/tpt-program-management.tsx diff --git a/.github/workflows/node.master.js.yml b/.github/workflows/node.master.js.yml index 0671686b6..d2a2a9181 100644 --- a/.github/workflows/node.master.js.yml +++ b/.github/workflows/node.master.js.yml @@ -57,7 +57,7 @@ jobs: needs: build - if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' }} + if: ${{ github.event_name == 'release' }} steps: - uses: actions/checkout@v3 diff --git a/packages/esm-commons-lib/src/components/cohort-patient-list/cohort-patient-list.component.tsx b/packages/esm-commons-lib/src/components/cohort-patient-list/cohort-patient-list.component.tsx index 564c1096c..0a407051b 100644 --- a/packages/esm-commons-lib/src/components/cohort-patient-list/cohort-patient-list.component.tsx +++ b/packages/esm-commons-lib/src/components/cohort-patient-list/cohort-patient-list.component.tsx @@ -24,6 +24,7 @@ interface CohortPatientListProps { queryParams?: Array; associatedEncounterType?: string; viewPatientProgramSummary?: boolean; + viewTptPatientProgramSummary?: boolean; addPatientToListOptions?: { isEnabled: boolean; excludeCohorts?: Array }; launchableForm?: { name: string; @@ -54,6 +55,7 @@ export const CohortPatientList: React.FC = ({ extraAssociatedEncounterTypes, moduleName, viewPatientProgramSummary, + viewTptPatientProgramSummary, }) => { const [isLoading, setIsLoading] = useState(true); const [hasLoadedPatients, setHasLoadedPatients] = useState(false); @@ -147,6 +149,7 @@ export const CohortPatientList: React.FC = ({ ...addPatientToListOptions, displayText: t('moveToListSideNav', 'Move to list'), }, + viewTptPatientProgramSummary, viewPatientProgramSummary, }), }; diff --git a/packages/esm-commons-lib/src/components/cohort-patient-list/helpers.tsx b/packages/esm-commons-lib/src/components/cohort-patient-list/helpers.tsx index 5119f74df..4d30c467e 100644 --- a/packages/esm-commons-lib/src/components/cohort-patient-list/helpers.tsx +++ b/packages/esm-commons-lib/src/components/cohort-patient-list/helpers.tsx @@ -18,6 +18,7 @@ interface PatientMetaConfig { moduleName: string; addPatientToListOptions: { isEnabled: boolean; excludeCohorts?: Array; displayText: string }; viewPatientProgramSummary?: boolean; + viewTptPatientProgramSummary?: boolean; } export interface PatientListColumn { @@ -112,7 +113,44 @@ export const ViewSummaryMenuItem = ({ patientUuid, ViewSummary, encounterType }) ); }; +export const ViewTptSummaryMenuItem = ({ patientUuid, ViewTptSummary, encounterType }) => { + const [actionText, setActionText] = useState(ViewTptSummary.actionText); + const [encounterUuid, setEncounterUuid] = useState(null); + const [isLoading, setIsLoading] = useState(false); + const viewTptSummaryActionText = ViewTptSummary.actionText || 'View Summary '; + useEffect(() => { + if (ViewTptSummary.editLatestEncounter && encounterType && !encounterUuid) { + setIsLoading(true); + fetchPatientLastEncounter(patientUuid, encounterType).then((latestEncounter) => { + if (latestEncounter) { + setActionText(viewTptSummaryActionText); + setEncounterUuid(latestEncounter.uuid); + } + setIsLoading(false); + }); + } else { + setIsLoading(false); + } + }, []); + + return ( + <> + {isLoading ? ( + + ) : ( + { + navigate({ + to: `/openmrs/spa/patient/${patientUuid}/chart/tpt-patient-summary`, + }); + }} + /> + )} + + ); +}; export function consolidatatePatientMeta(rawPatientMeta, form, config: PatientMetaConfig) { const { isDynamicCohort, @@ -122,6 +160,7 @@ export function consolidatatePatientMeta(rawPatientMeta, form, config: PatientMe moduleName, addPatientToListOptions, viewPatientProgramSummary, + viewTptPatientProgramSummary, } = config; const patientUuid = !isDynamicCohort ? rawPatientMeta.patient.uuid : rawPatientMeta.person.uuid; dayjs.extend(localizedFormat); @@ -155,6 +194,16 @@ export function consolidatatePatientMeta(rawPatientMeta, form, config: PatientMe excludeCohorts={addPatientToListOptions?.excludeCohorts || []} /> )} + {viewTptPatientProgramSummary ? ( + + ) : ( + <> + )} {viewPatientProgramSummary ? ( ); diff --git a/packages/esm-ohri-pmtct-app/src/views/maternal-health/tabs/antenatal-care.component.tsx b/packages/esm-ohri-pmtct-app/src/views/maternal-health/tabs/antenatal-care.component.tsx index b0287a1dd..9466ca146 100644 --- a/packages/esm-ohri-pmtct-app/src/views/maternal-health/tabs/antenatal-care.component.tsx +++ b/packages/esm-ohri-pmtct-app/src/views/maternal-health/tabs/antenatal-care.component.tsx @@ -31,10 +31,10 @@ const AntenatalCareList: React.FC = ({ patientUuid }) => }, }, { - key: 'hivTestResults', - header: t('hivTestResults', 'HIV Test Results'), + key: 'hivTestStatus', + header: t('hivTestStatus', 'HIV Test Status'), getValue: (encounter) => { - return getObsFromEncounter(encounter, config.obsConcepts.hivTestResultConcept); + return getObsFromEncounter(encounter, config.obsConcepts.hivTestStatus); }, }, { diff --git a/packages/esm-ohri-pmtct-app/translations/en.json b/packages/esm-ohri-pmtct-app/translations/en.json index ddcf1dc3a..ed118c825 100644 --- a/packages/esm-ohri-pmtct-app/translations/en.json +++ b/packages/esm-ohri-pmtct-app/translations/en.json @@ -39,6 +39,7 @@ "hivMonitoring": "HIV Monitoring", "hivStatus": "HIV Status", "hivTestResults": "HIV Test Results", + "hivTestStatus": "HIV Test Status", "infantPostnatalCare": "Infant Postnatal Care", "infantPostnatalVisit": "Infant Postnatal Visit", "infantStatus": "Infant Status at Birth", diff --git a/packages/esm-tb-app/src/config-schema.ts b/packages/esm-tb-app/src/config-schema.ts index f3a3121c0..c4771d9d3 100644 --- a/packages/esm-tb-app/src/config-schema.ts +++ b/packages/esm-tb-app/src/config-schema.ts @@ -16,6 +16,8 @@ export const configSchema = { tbPatientTracing: '98c938e9-fb3e-4982-ae22-0305cbd12f8c', tbProgramEnrollment: '9a199b59-b185-485b-b9b3-a9754e65ae57', tbTreatmentAndFollowUp: '1881304a-4854-4927-b0b1-a6231d61e43c', + tptCaseEnrollment: 'dc6ce80c-83f8-4ace-a638-21df78542551', + tptTreatmentAndFollowUp: '1ac3de3f-8fc2-43a7-addb-e805c393ecae', }, }, obsConcepts: { @@ -47,6 +49,16 @@ export const configSchema = { tBEnrollmentType: '163775AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', dsTBEnrollment: '160541AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', dRTBEnrollment: '160052AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + tptTreatmentId: '162727AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + tptEnrollmentDate: '164852AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + tptIndication: '162276AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + tptRegimen: '1264AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + tptAppointmentDate: '5096AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + tptAdherence: '164075AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + tptTreatmentStartDate: '162320AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + tptOutcome: '1266AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + tptOutcomeDate: '163284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + tptDateOutcome: '163284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', }, }, cohorts: { @@ -54,6 +66,15 @@ export const configSchema = { _description: 'TB Cohort uuid.', _default: { clientsEnrolledForTb: '98fd11ba-cb4d-46f7-9b82-40d49949c7ef', + clientsEnrolledForTpt: '5f28254f-0a80-4d15-ad91-68c6cf5ea715', + }, + }, + formNames: { + _type: Type.Object, + _description: 'TPT Form Names.', + _default: { + TptOutcomeFormName: 'TPT outcome form', + TptCaseEnrolmentFormName: 'TPT Case Enrolment form', }, }, }; @@ -62,4 +83,5 @@ export interface ConfigObject { identifiers: Object; encounterTypes: Object; obsConcepts: Object; + formNames: Object; } diff --git a/packages/esm-tb-app/src/dashboard.meta.tsx b/packages/esm-tb-app/src/dashboard.meta.tsx index 0be3c3498..e9e5fe372 100644 --- a/packages/esm-tb-app/src/dashboard.meta.tsx +++ b/packages/esm-tb-app/src/dashboard.meta.tsx @@ -44,11 +44,38 @@ export const tbClinicalViewDashboardMeta = { isFolder: true, title: 'Tuberculosis', }; +export const tbPreventionDashboardMeta = { + name: 'tb-prevention', + slot: 'tb-prevention-dashboard-slot', + config: { columns: 1, type: 'grid', programme: 'tpt', dashboardTitle: 'TB Prevention'}, + title: 'TB Prevention', +}; export const tbCasesDashboardMeta = { name: 'tb-cases', slot: 'tb-cases-dashboard-slot', - config: { columns: 1, type: 'grid', programme: 'tb', dashboardTitle: 'TB Treatment', icon: PillsAdd }, + config: { columns: 1, type: 'grid', programme: 'tb', dashboardTitle: 'TB Treatment' }, title: 'TB Treatment', - dashboardIcon: PillsAdd, -}; \ No newline at end of file +}; + +export const tptPatientChartMeta = { + title: 'TPT Program', + slotName: 'ohri-tpt-slot', + isExpanded: false, +}; + +export const tptPatientSummaryMeta = { + slot: 'tpt-patient-summary-slot', + columns: 1, + title: 'Patient Summary', + path: 'tpt-patient-summary', + layoutMode: 'anchored', +}; + +export const tptProgramManagementDashboardMeta = { + slot: 'tpt-program-management-summary-slot', + columns: 1, + title: 'Program Management', + path: 'tpt-program-management', + layoutMode: 'anchored', +}; diff --git a/packages/esm-tb-app/src/index.ts b/packages/esm-tb-app/src/index.ts index a41ab50ad..0845760dd 100644 --- a/packages/esm-tb-app/src/index.ts +++ b/packages/esm-tb-app/src/index.ts @@ -9,6 +9,10 @@ import { tbTreatmentFollowUpDashboardMeta, tbClinicalViewDashboardMeta, tbCasesDashboardMeta, + tptProgramManagementDashboardMeta, + tptPatientChartMeta, + tptPatientSummaryMeta, + tbPreventionDashboardMeta, } from './dashboard.meta'; import { configSchema } from './config-schema'; import TBSummaryOverviewList from './views/patient-summary/tb-patient-summary.component'; @@ -17,6 +21,10 @@ import TbTreatmentFollowUpList from './views/treatment-and-follow-up/tb-treatmen import TbContactTracingList from './views/tb-contact-listing/tb-contact-list.component'; import TbSummaryTiles from './views/dashboard/summary-tiles/tb-summary-tiles.component'; import TbHomePatientTabs from './views/dashboard/patient-list-tabs/tb-patient-list-tabs.component'; +import tptProgramManagementSummary from './views/tpt/program-management/tpt-program-management'; +import tptPatientSummary from './views/tpt/patient-summary/patient-summary.component'; +import TptPreventionSummaryTiles from './views/dashboard/summary-tiles/tpt-summary-tiles.component'; +import TptPatientListTabs from './views/dashboard/patient-list-tabs/tpt-patient-list-tabs.component'; export const importTranslation = require.context('../translations', false, /.json$/, 'lazy'); @@ -35,6 +43,8 @@ export function startupApp() { export const patientChartTbDashboard = getSyncLifecycle(createDashboardGroup(tbPatientChartMeta), options); +export const patientChartTptDashboard = getSyncLifecycle(createDashboardGroup(tptPatientChartMeta), options); + export const tbPatientSummaryDashboardLink = getSyncLifecycle( createDashboardLink({ ...tbPatientSummaryDashboardMeta, moduleName }), options, @@ -83,6 +93,36 @@ export const tbDashboardTabs = getSyncLifecycle(TbHomePatientTabs, { featureName: 'tb-home-tabs', moduleName, }); +export const tptDashboardHeader = getSyncLifecycle(OHRIWelcomeSection, { + featureName: 'tpt-home-header', + moduleName, +}); +export const tptDashboardTiles = getSyncLifecycle(TptPreventionSummaryTiles, { + featureName: 'tpt-home-tiles', + moduleName, +}); +export const tptDashboardTabs = getSyncLifecycle(TptPatientListTabs, { + featureName: 'tpt-home-tabs', + moduleName, +}); + +export const tptPatientSummaryDashboardLink = getSyncLifecycle( + createDashboardLink({ ...tptPatientSummaryMeta, moduleName }), + options, +); +export const tptPatientSummaryDashboard = getSyncLifecycle(tptPatientSummary, { + featureName: 'tpt-patient-summary', + moduleName, +}); + +export const tptProgramManagementDashboardLink = getSyncLifecycle( + createDashboardLink({ ...tptProgramManagementDashboardMeta, moduleName }), + options, +); +export const tptProgramManagementDashboard = getSyncLifecycle(tptProgramManagementSummary, { + featureName: 'tpt-program-management-summary', + moduleName, +}); // OHRI HOME export const tbClinicalViewDashboardLink = getSyncLifecycle( @@ -94,3 +134,8 @@ export const tbCasesDashboard = getSyncLifecycle(OHRIHome, { featureName: 'tb cases dashboard', moduleName, }); +export const tbPreventionDashboardLink = getSyncLifecycle(createOHRIDashboardLink(tbPreventionDashboardMeta), options); +export const tbPreventionDashboard = getSyncLifecycle(OHRIHome, { + featureName: 'tpt cases dashboard', + moduleName, +}); diff --git a/packages/esm-tb-app/src/routes.json b/packages/esm-tb-app/src/routes.json index 2fd34a6b9..53154a6a4 100644 --- a/packages/esm-tb-app/src/routes.json +++ b/packages/esm-tb-app/src/routes.json @@ -22,7 +22,24 @@ "component": "patientChartTbDashboard", "order": 24 }, - + + { + "name": "tpt-dashboard-link", + "slot": "dashboard-slot", + "component": "tptFolderLink", + "meta": { + "slot": "ohri-tpt-dashboard-slot", + "isFolder": true, + "title": "TPT Program" + } + }, + { + "name": "ohri-tpt", + "slot": "patient-chart-dashboard-slot", + "component": "patientChartTptDashboard", + "order": 24 + }, + { "name": "tb-summary-dashboard", "slot": "ohri-tb-slot", @@ -57,6 +74,41 @@ "component": "tbProgramManagementDashboard" }, + + { + "name": "tpt-patient-summary", + "slot": "ohri-tpt-slot", + "component": "tptPatientSummaryDashboardLink", + "meta": { + "slot": "tpt-patient-summary-slot", + "columns": 1, + "path": "tpt-patient-summary", + "layoutMode": "anchored" + } + }, + { + "name": "tpt-patient-summary-ext", + "slot": "tpt-patient-summary-slot", + "component": "tptPatientSummaryDashboard" + }, + + { + "name": "tpt-program-management-summary", + "slot": "ohri-tpt-slot", + "component": "tptProgramManagementDashboardLink", + "meta": { + "slot": "tpt-program-management-summary-slot", + "columns": 1, + "path": "tpt-program-management", + "layoutMode": "anchored" + } + }, + { + "name": "tpt-program-management-summary-ext", + "slot": "tpt-program-management-summary-slot", + "component": "tptProgramManagementDashboard" + }, + { "name": "tb-treatment-follow-up-summary", "slot": "ohri-tb-slot", @@ -100,6 +152,37 @@ "title": "Tuberculosis" } }, + { + "name": "tb-prevention-dashboard-ext", + "slot": "tb-clinical-dashboard-slot", + "component": "tbPreventionDashboardLink", + "meta": { + "name": "tb-prevention", + "slot": "tb-prevention-dashboard-slot", + "config": { + "columns": 1, + "type": "grid", + "programme": "tpt", + "dashboardTitle": "TB Prevention" + }, + "title": "TB Prevention" + } + }, + { + "name": "tb-prevention-dashboard", + "slot": "tb-prevention-dashboard-slot", + "component": "tbPreventionDashboard", + "meta": { + "name": "tb-prevention", + "slot": "tb-prevention-dashboard-slot", + "config": { + "columns": 1, + "programme": "tpt", + "dashboardTitle": "TB Prevention" + }, + "title": "TB Prevention" + } + }, { "name": "tb-cases-dashboard-ext", "slot": "tb-clinical-dashboard-slot", @@ -145,6 +228,21 @@ "name": "tb-home-tabs-ext", "slot": "tb-home-tabs-slot", "component": "tbDashboardTabs" - } + }, + { + "name": "tpt-home-header-ext", + "slot": "tpt-home-header-slot", + "component": "tptDashboardHeader" + }, + { + "name": "tpt-home-tiles-ext", + "slot": "tpt-home-tiles-slot", + "component": "tptDashboardTiles" + }, + { + "name": "tpt-home-tabs-ext", + "slot": "tpt-home-tabs-slot", + "component": "tptDashboardTabs" + } ] } diff --git a/packages/esm-tb-app/src/tb-helper.ts b/packages/esm-tb-app/src/tb-helper.ts index edb424557..52901e00e 100644 --- a/packages/esm-tb-app/src/tb-helper.ts +++ b/packages/esm-tb-app/src/tb-helper.ts @@ -3,30 +3,30 @@ import { getConfig } from '@openmrs/esm-framework'; import { moduleName } from '.'; export async function getTbRegimen(encounter: any, tBEnrollmentType: string) { - const config = await getConfig(moduleName); - const regimen = - tBEnrollmentType === config.obsConcepts.dsTBEnrollment - ? config.obsConcepts.dSregimen - : config.obsConcepts.dRregimen; + const config = await getConfig(moduleName); + const regimen = + tBEnrollmentType === config.obsConcepts.dsTBEnrollment + ? config.obsConcepts.dSregimen + : config.obsConcepts.dRregimen; - return getObsFromEncounter(encounter, regimen); + return getObsFromEncounter(encounter, regimen); } -export async function getTbTreatmentStartDate(encounter: any, tBEnrollmentType: string){ - const config = await getConfig(moduleName); - const tBTreatmentStartDateConcept = - tBEnrollmentType === config.obsConcepts.dsTBEnrollment - ? config.obsConcepts.dSTreatmentStartDate - : config.obsConcepts.dRTreatmentStartDate; +export async function getTbTreatmentStartDate(encounter: any, tBEnrollmentType: string) { + const config = await getConfig(moduleName); + const tBTreatmentStartDateConcept = + tBEnrollmentType === config.obsConcepts.dsTBEnrollment + ? config.obsConcepts.dSTreatmentStartDate + : config.obsConcepts.dRTreatmentStartDate; - return getObsFromEncounter(encounter, tBTreatmentStartDateConcept, true); + return getObsFromEncounter(encounter, tBTreatmentStartDateConcept, true); } -export async function getTbTreatmentId(encounter: any, tBEnrollmentType: string){ - const config = await getConfig(moduleName); - const treatmentId = - tBEnrollmentType === config.obsConcepts.dsTBEnrollment - ? config.obsConcepts.dSTreatmentId - : config.obsConcepts.dRTreatmentId; - return getObsFromEncounter(encounter, treatmentId); -} \ No newline at end of file +export async function getTbTreatmentId(encounter: any, tBEnrollmentType: string) { + const config = await getConfig(moduleName); + const treatmentId = + tBEnrollmentType === config.obsConcepts.dsTBEnrollment + ? config.obsConcepts.dSTreatmentId + : config.obsConcepts.dRTreatmentId; + return getObsFromEncounter(encounter, treatmentId); +} diff --git a/packages/esm-tb-app/src/views/dashboard/patient-list-tabs/tpt-patient-list-tabs.component.tsx b/packages/esm-tb-app/src/views/dashboard/patient-list-tabs/tpt-patient-list-tabs.component.tsx new file mode 100644 index 000000000..15f20b8bb --- /dev/null +++ b/packages/esm-tb-app/src/views/dashboard/patient-list-tabs/tpt-patient-list-tabs.component.tsx @@ -0,0 +1,58 @@ +import React, { useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; +import { getObsFromEncounter, OHRIPatientListTabs } from '@ohri/openmrs-esm-ohri-commons-lib'; +import { moduleName } from '../../../index'; +import { useConfig } from '@openmrs/esm-framework'; + +function TptPatientListTabs() { + const { t } = useTranslation(); + const { obsConcepts, encounterTypes, cohorts } = useConfig(); + + const tabsConfigs = useMemo( + () => [ + { + label: t('allTptClients', 'All TPT Clients'), + cohortId: cohorts.clientsEnrolledForTpt, + isReportingCohort: true, + cohortSlotName: 'clients-assessed-for-tpt', + launchableForm: { + editActionText: t('editTptFollowUpForm', 'Edit TPT Follow-up form'), + editLatestEncounter: true, + targetDashboard: 'tb-assessments', + name: 'TPT Followup & Treatment form', + }, + associatedEncounterType: encounterTypes.tptCaseEnrollment, + excludeColumns: ['timeAddedToList', 'waitingTime', 'location', 'phoneNumber', 'hivResult'], + otherColumns: [ + { + key: 'tptTreatmentId', + header: t('tptTreatmentId', 'TPT Treatment ID'), + getValue: ({ latestEncounter }) => { + return getObsFromEncounter(latestEncounter, obsConcepts.tptTreatmentId); + }, + index: 1, + }, + { + key: 'EnrolmentDate', + header: t('EnrolmentDate', 'Enrolment Date'), + getValue: ({ latestEncounter }) => { + return getObsFromEncounter(latestEncounter, obsConcepts.tptEnrollmentDate, true); + }, + }, + { + key: 'indication', + header: t('indication', 'Indication'), + getValue: ({ latestEncounter }) => { + return getObsFromEncounter(latestEncounter, obsConcepts.tptIndication); + }, + }, + ], + viewTptPatientProgramSummary: true, + }, + ], + [], + ); + return ; +} + +export default TptPatientListTabs; diff --git a/packages/esm-tb-app/src/views/dashboard/summary-tiles/tpt-summary-tiles.component.tsx b/packages/esm-tb-app/src/views/dashboard/summary-tiles/tpt-summary-tiles.component.tsx new file mode 100644 index 000000000..06e839afb --- /dev/null +++ b/packages/esm-tb-app/src/views/dashboard/summary-tiles/tpt-summary-tiles.component.tsx @@ -0,0 +1,22 @@ +import { OHRIProgrammeSummaryTiles } from '@ohri/openmrs-esm-ohri-commons-lib'; +import React, { useMemo, useState } from 'react'; +import { useTranslation } from 'react-i18next'; + +function TptPreventionSummaryTiles({}) { + const { t } = useTranslation(); + const [activeTptClientsCount] = useState(78); + const tiles = useMemo( + () => [ + { + title: t('allTptClients', 'All TPT Clients'), + linkAddress: '#', + subTitle: t('currentTptClients', 'Clients Currently on TPT'), + value: activeTptClientsCount, + }, + ], + [], + ); + return ; +} + +export default TptPreventionSummaryTiles; diff --git a/packages/esm-tb-app/src/views/tpt/patient-summary/patient-summary.component.tsx b/packages/esm-tb-app/src/views/tpt/patient-summary/patient-summary.component.tsx new file mode 100644 index 000000000..f6d9e076b --- /dev/null +++ b/packages/esm-tb-app/src/views/tpt/patient-summary/patient-summary.component.tsx @@ -0,0 +1,157 @@ +import { + EmptyStateComingSoon, + EncounterList, + EncounterListColumn, + PatientChartProps, + SummaryCard, + SummaryCardColumn, + getObsFromEncounter, +} from '@ohri/openmrs-esm-ohri-commons-lib'; +import { useConfig } from '@openmrs/esm-framework'; +import React, { useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; +import { moduleName } from '../../..'; + +const TptPatientSummary: React.FC = ({ patientUuid }) => { + const { t } = useTranslation(); + const { obsConcepts, encounterTypes } = useConfig(); + + const headerRecentTPT = t('recentTptCases', 'Recent TPT Cases'); + const headerPreviousTptCases = t('previousTptCases', 'Previous TPT Cases'); + const headerVisit = t('visits', 'Visits'); + + const recentTbPreventionColumns: SummaryCardColumn[] = useMemo( + () => [ + { + key: 'tptTreatmentId', + header: t('tptTreatmentId', 'TPT Treatment ID'), + encounterTypes: [encounterTypes.tptCaseEnrollment], + getObsValue: async ([encounter]) => { + return getObsFromEncounter(encounter, obsConcepts.tptTreatmentId); + }, + }, + { + key: 'tptEnrollmentDate', + header: t('enrollmentDate', 'Enrollment Date'), + encounterTypes: [encounterTypes.tptCaseEnrollment], + getObsValue: async ([encounter]) => { + return getObsFromEncounter(encounter, obsConcepts.tptEnrollmentDate, true); + }, + }, + { + key: 'tptIndication', + header: t('indication', 'Indication'), + encounterTypes: [encounterTypes.tptCaseEnrollment], + getObsValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptIndication); + }, + }, + { + key: 'tptRegimen', + header: t('regimen', 'Regimen'), + encounterTypes: [encounterTypes.tptCaseEnrollment], + getObsValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptRegimen); + }, + }, + { + key: 'tptAdherence', + header: t('tptAdherence', 'Adherence'), + encounterTypes: [encounterTypes.tptTreatmentAndFollowUp], + getObsValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptAdherence); + }, + }, + { + key: 'tptAppointmentDate', + header: t('nextAppointmentDate', 'Next Appointment Date'), + encounterTypes: [encounterTypes.tptTreatmentAndFollowUp], + getObsValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptAppointmentDate, true); + }, + }, + ], + [], + ); + + const previousTptCasesColumns: EncounterListColumn[] = useMemo( + () => [ + { + key: 'tptTreatmentId', + header: t('tptTreatmentId', 'TPT Treatment ID'), + encounterTypes: [encounterTypes.tptCaseEnrollment], + getValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptTreatmentId); + }, + }, + { + key: 'tptEnrollmentDate', + header: t('enrollmentDate', 'Enrollment Date'), + encounterTypes: [encounterTypes.tptCaseEnrollment], + getValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptEnrollmentDate, true); + }, + }, + { + key: 'indication', + header: t('indication', 'Indication'), + encounterTypes: [encounterTypes.tptCaseEnrollment], + getValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.indication); + }, + }, + { + key: 'tptRegimen', + header: t('regimen', 'Regimen'), + encounterTypes: [encounterTypes.tptCaseEnrollment], + getValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptRegimen); + }, + }, + { + key: 'tptOutcome', + header: t('outcome', 'Outcome'), + encounterTypes: [encounterTypes.tptCaseEnrollment], + getValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptOutcome); + }, + }, + { + key: 'tptDateOutcome', + header: t('dateOutcome', 'Date of Outcome'), + encounterTypes: [encounterTypes.tptCaseEnrollment], + getValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptDateOutcome, true); + }, + }, + ], + [], + ); + + return ( + <> + + + + + ); +}; + +export default TptPatientSummary; diff --git a/packages/esm-tb-app/src/views/tpt/program-management/tabs/tpt-enrolment.component.tsx b/packages/esm-tb-app/src/views/tpt/program-management/tabs/tpt-enrolment.component.tsx new file mode 100644 index 000000000..33d2b0a98 --- /dev/null +++ b/packages/esm-tb-app/src/views/tpt/program-management/tabs/tpt-enrolment.component.tsx @@ -0,0 +1,118 @@ +import React, { useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; +import { EncounterList, EncounterListColumn, getObsFromEncounter } from '@ohri/openmrs-esm-ohri-commons-lib'; +import { moduleName } from '../../../..'; +import { useConfig } from '@openmrs/esm-framework'; + +interface TptEnrolmentListProps { + patientUuid: string; +} + +const TptEnrolmentList: React.FC = ({ patientUuid }) => { + const { t } = useTranslation(); + const { obsConcepts, encounterTypes, formNames } = useConfig(); + + const headerTitle = t('tptEnrolment', 'TPT Enrolment'); + + const columns: EncounterListColumn[] = useMemo( + () => [ + { + key: 'enrollmentDate', + header: t('enrollmentDate', 'Enrollment Date'), + getValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptEnrollmentDate, true); + }, + }, + { + key: 'tptTreatmentID', + header: t('tptTreatmentID', 'TPT Treatment ID'), + getValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptTreatmentId); + }, + }, + { + key: 'indication', + header: t('indication', 'Indication'), + getValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptIndication); + }, + }, + { + key: 'treatmentStartDate', + header: t('treatmentStartDate', 'Treatment start date'), + getValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptTreatmentStartDate, true); + }, + }, + { + key: 'regimen', + header: t('regimen', 'Regimen'), + getValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptRegimen); + }, + }, + { + key: 'tptOutcome', + header: t('tptOutcome', 'Outcome'), + getValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptOutcome); + }, + }, + { + key: 'dateOfOutcome', + header: t('dateOfOutcome', 'Date of Outcome'), + getValue: (encounter) => { + return getObsFromEncounter(encounter, obsConcepts.tptOutcomeDate, true); + }, + }, + { + key: 'actions', + header: t('actions', 'Actions'), + getValue: (encounter) => [ + { + form: { name: formNames.TptCaseEnrolmentFormName }, + encounterUuid: encounter.uuid, + intent: '*', + label: t('viewDetails', 'View Details'), + mode: 'view', + }, + { + form: { name: formNames.TptCaseEnrolmentFormName }, + encounterUuid: encounter.uuid, + intent: '*', + label: t('editForm', 'Edit Form'), + mode: 'edit', + }, + { + form: { name: formNames.TptOutcomeFormName }, + encounterUuid: encounter.uuid, + intent: '*', + label: t('editForm', 'Add/Edit Outcome'), + mode: 'edit', + }, + ], + }, + ], + [], + ); + + return ( + + ); +}; + +export default TptEnrolmentList; diff --git a/packages/esm-tb-app/src/views/tpt/program-management/tabs/tpt-treatment.component copy.tsx b/packages/esm-tb-app/src/views/tpt/program-management/tabs/tpt-treatment.component copy.tsx new file mode 100644 index 000000000..81612d276 --- /dev/null +++ b/packages/esm-tb-app/src/views/tpt/program-management/tabs/tpt-treatment.component copy.tsx @@ -0,0 +1,21 @@ +import React from 'react'; +import { useTranslation } from 'react-i18next'; +import { EmptyStateComingSoon } from '@ohri/openmrs-esm-ohri-commons-lib'; + +interface TptTreatmentListProps { + patientUuid: string; +} + +const TptTreatmentList: React.FC = ({ patientUuid }) => { + const { t } = useTranslation(); + + const headerTitle = t('tptTreatment', 'TPT Treatment'); + + return ( + <> + + + ); +}; + +export default TptTreatmentList; diff --git a/packages/esm-tb-app/src/views/tpt/program-management/tpt-program-management.tsx b/packages/esm-tb-app/src/views/tpt/program-management/tpt-program-management.tsx new file mode 100644 index 000000000..113903bb7 --- /dev/null +++ b/packages/esm-tb-app/src/views/tpt/program-management/tpt-program-management.tsx @@ -0,0 +1,31 @@ +import React from 'react'; +import { Tabs, Tab, TabList, TabPanels, TabPanel } from '@carbon/react'; +import styles from '../../common.scss'; +import { useTranslation } from 'react-i18next'; +import TptTreatmentList from './tabs/tpt-treatment.component copy'; +import TptEnrolmentList from './tabs/tpt-enrolment.component'; +import { PatientChartProps } from '@ohri/openmrs-esm-ohri-commons-lib'; + +const TptProgramManagementSummary: React.FC = ({ patientUuid }) => { + const { t } = useTranslation(); + return ( +
+ + + {t('tptEnrolment', 'TPT Enrolment')} + {t('tptTreatment', 'TPT Treatment')} + + + + + + + + + + +
+ ); +}; + +export default TptProgramManagementSummary; diff --git a/packages/esm-tb-app/translations/en.json b/packages/esm-tb-app/translations/en.json index 24a0c4408..c14edd9e7 100644 --- a/packages/esm-tb-app/translations/en.json +++ b/packages/esm-tb-app/translations/en.json @@ -28,5 +28,18 @@ "nextAppointment": "Next Appointment", "siteOfTb": "Site of TB", "appointmentDate": "Appointment Date", - "editFollowUpForm": "Edit TB Follow-up Form" + "editFollowUpForm": "Edit TB Follow-up Form", + "tptEnrolment": "TPT Enrolment", + "tptTreatment": "TPT Treatment", + "patientSummary": "Patient Summary", + "allTptClients": "All TPT Clients", + "currentTptClients": "Clients Currently on TPT", + "tptTreatmentId": "TPT Treatment ID", + "indication": "Indication", + "tptAdherence": "Adherence", + "nextAppointmentDate": "Next Appointment Date", + "previousTptCases": "Previous TPT Cases", + "recentTptCases": "Recent TPT Cases", + "editTptFollowUpForm": "Edit TPT Follow-up form", + "dateOutcome": "Date of Outcome" } From 07485564fb73abd0c13b10dfad1ff9262be1b00b Mon Sep 17 00:00:00 2001 From: Jovan Ssebaggala Date: Wed, 12 Jun 2024 14:57:38 +0300 Subject: [PATCH 03/24] auto refresh encounter list after form saving/editing (#1864) --- package.json | 16 ++++++++-------- .../src/components/encounter-list/helpers.ts | 3 +-- .../src/hooks/useEncounterRows.ts | 9 +++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index f375ef569..3eb5caa26 100644 --- a/package.json +++ b/package.json @@ -13,15 +13,15 @@ "access": "public" }, "scripts": { - "start": "openmrs develop --backend https://ohri-dev.globalhealthapp.net/ --sources 'packages/esm-*-app/'", - "start:core": "openmrs develop --backend https://ohri-dev.globalhealthapp.net --sources packages/esm-ohri-core-app", - "start:covid": "openmrs develop --backend https://ohri-dev.globalhealthapp.net --sources packages/esm-covid-app", - "start:hiv": "openmrs develop --backend https://ohri-dev.globalhealthapp.net --sources packages/esm-hiv-app", - "start:cervical-cancer": "openmrs develop --backend https://ohri-dev.globalhealthapp.net --sources packages/esm-cervical-cancer-app", + "start": "openmrs develop --backend https://openmrs-dev.globalhealthapp.net/ --sources 'packages/esm-*-app/'", + "start:core": "openmrs develop --backend https://openmrs-dev.globalhealthapp.net --sources packages/esm-ohri-core-app", + "start:covid": "openmrs develop --backend https://openmrs-dev.globalhealthapp.net --sources packages/esm-covid-app", + "start:hiv": "openmrs develop --backend https://openmrs-dev.globalhealthapp.net --sources packages/esm-hiv-app", + "start:cervical-cancer": "openmrs develop --backend https://openmrs-dev.globalhealthapp.net --sources packages/esm-cervical-cancer-app", "start:pmtct": "openmrs develop --backend https://ohri-namibia-dev.globalhealthapp.net --sources 'packages/esm-ohri-pmtct-app/'", - "start:form-render": "openmrs develop --backend https://ohri-dev.globalhealthapp.net --sources packages/esm-form-render-app", - "start:tb": "openmrs develop --backend https://ohri-dev.globalhealthapp.net --sources packages/esm-tb-app", - "start:opd": "openmrs develop --backend https://ohri-dev.globalhealthapp.net --sources packages/esm-opd-app", + "start:form-render": "openmrs develop --backend https://openmrs-dev.globalhealthapp.net --sources packages/esm-form-render-app", + "start:tb": "openmrs develop --backend https://openmrs-dev.globalhealthapp.net --sources packages/esm-tb-app", + "start:opd": "openmrs develop --backend https://openmrs-dev.globalhealthapp.net --sources packages/esm-opd-app", "prettier": "prettier --fix --config prettier.config.js --write \"packages/**/*.{ts,tsx}\"", "prepare": "husky install", "test": "jest --config jest.config.js --verbose false --passWithNoTests", diff --git a/packages/esm-commons-lib/src/components/encounter-list/helpers.ts b/packages/esm-commons-lib/src/components/encounter-list/helpers.ts index 9fa7aafc1..747329e3b 100644 --- a/packages/esm-commons-lib/src/components/encounter-list/helpers.ts +++ b/packages/esm-commons-lib/src/components/encounter-list/helpers.ts @@ -14,11 +14,10 @@ export function launchEncounterForm( intent: string = '*', workspaceWindowSize?: 'minimized' | 'maximized', patientUuid?: string, - mutateform?: () => void, ) { launchPatientWorkspace('patient-form-entry-workspace', { workspaceTitle: form.name, - mutateform: mutateform, + mutateForm: onFormSave, formInfo: { encounterUuid, formUuid: form.name, diff --git a/packages/esm-commons-lib/src/hooks/useEncounterRows.ts b/packages/esm-commons-lib/src/hooks/useEncounterRows.ts index 508a13e80..d2a6dd05b 100644 --- a/packages/esm-commons-lib/src/hooks/useEncounterRows.ts +++ b/packages/esm-commons-lib/src/hooks/useEncounterRows.ts @@ -1,4 +1,4 @@ -import useSWRImmutable, { mutate } from 'swr'; +import useSWR from 'swr'; import { OpenmrsEncounter } from '../api/types'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { openmrsFetch } from '@openmrs/esm-framework'; @@ -12,7 +12,8 @@ export function useEncounterRows(patientUuid: string, encounterType: string, enc data: response, error, isLoading, - } = useSWRImmutable<{ data: { results: OpenmrsEncounter[] } }, Error>(url, openmrsFetch); + mutate, + } = useSWR<{ data: { results: OpenmrsEncounter[] } }, Error>(url, openmrsFetch); useEffect(() => { if (response) { @@ -30,8 +31,8 @@ export function useEncounterRows(patientUuid: string, encounterType: string, enc }, [encounterFilter, response]); const onFormSave = useCallback(() => { - mutate(url); - }, [url]); + mutate(); + }, [mutate]); return { encounters, From cd289a48c07852e25ec56a38dfbad671f6dd535c Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Thu, 13 Jun 2024 12:09:44 +0300 Subject: [PATCH 04/24] Updated spa-build-config json with versions for demo server --- frontend/spa-build-config.json | 83 +++++++++++++++++----------------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/frontend/spa-build-config.json b/frontend/spa-build-config.json index b0855ea8d..35a595280 100644 --- a/frontend/spa-build-config.json +++ b/frontend/spa-build-config.json @@ -1,47 +1,46 @@ { "frontendModules": { - "@openmrs/esm-devtools-app": "next", - "@openmrs/esm-implementer-tools-app": "next", - "@openmrs/esm-login-app": "next", - "@openmrs/esm-primary-navigation-app": "next", - "@openmrs/esm-home-app": "next", - "@openmrs/esm-form-engine-app": "next", - "@openmrs/esm-generic-patient-widgets-app": "next", - "@openmrs/esm-patient-allergies-app": "next", - "@openmrs/esm-patient-attachments-app": "next", - "@openmrs/esm-patient-banner-app": "next", - "@ohri/esm-patient-chart-app": "next", - "@openmrs/esm-patient-conditions-app": "next", - "@openmrs/esm-patient-forms-app": "next", - "@openmrs/esm-patient-flags-app": "next", - "@openmrs/esm-patient-labs-app": "next", - "@openmrs/esm-patient-lists-app": "next", - "@openmrs/esm-patient-medications-app": "next", - "@openmrs/esm-patient-notes-app": "next", - "@openmrs/esm-patient-orders-app": "next", - "@openmrs/esm-patient-programs-app": "next", - "@openmrs/esm-patient-vitals-app": "next", - "@openmrs/esm-active-visits-app": "next", - "@openmrs/esm-appointments-app": "next", - "@openmrs/esm-service-queues-app": "next", - "@openmrs/esm-patient-list-management-app": "next", - "@openmrs/esm-patient-registration-app": "next", - "@openmrs/esm-patient-search-app": "next", - "@openmrs/esm-openconceptlab-app": "next", - "@openmrs/esm-system-admin-app": "next", - "@openmrs/esm-dispensing-app": "next", - "@openmrs/esm-fast-data-entry-app": "next", - "@openmrs/esm-cohort-builder-app": "next", - "@ohri/openmrs-esm-ohri-core-app": "next", - "@ohri/openmrs-esm-ohri-hiv-app": "next", - "@ohri/openmrs-esm-ohri-covid-app": "next", - "@ohri/openmrs-esm-ohri-pmtct": "next", - "@ohri/openmrs-esm-ohri-tb-app": "next", - "@ohri/openmrs-esm-ohri-cervical-cancer-app": "next", - "@ohri/openmrs-esm-ohri-form-render-app": "next", - "@openmrs/esm-stock-management-app": "next", - "@openmrs/esm-billing-app": "next", - "@ohri/openmrs-esm-ohri-opd-app": "next" + "@openmrs/esm-devtools-app": "5.3.3-pre.1301", + "@openmrs/esm-implementer-tools-app": "5.3.3-pre.1301", + "@openmrs/esm-login-app": "5.3.3-pre.1301", + "@openmrs/esm-primary-navigation-app": "5.3.3-pre.1301", + "@openmrs/esm-home-app": "5.2.1-pre.305", + "@openmrs/esm-form-entry-app": "6.1.1-pre.3293", + "@openmrs/esm-generic-patient-widgets-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-allergies-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-appointments-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-attachments-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-banner-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-chart-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-conditions-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-forms-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-flags-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-labs-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-lists-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-medications-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-notes-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-orders-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-programs-app": "6.1.1-pre.3293", + "@openmrs/esm-patient-vitals-app": "6.1.1-pre.3293", + "@openmrs/esm-active-visits-app": "5.2.2-pre.2432", + "@openmrs/esm-appointments-app": "5.2.2-pre.2432", + "@openmrs/esm-service-queues-app": "5.2.2-pre.2432", + "@openmrs/esm-patient-list-management-app": "5.2.2-pre.2432", + "@openmrs/esm-patient-registration-app": "5.2.2-pre.2432", + "@openmrs/esm-patient-search-app": "5.2.2-pre.2432", + "@openmrs/esm-openconceptlab-app": "4.0.2-pre.88", + "@openmrs/esm-system-admin-app": "4.0.2-pre.88", + "@openmrs/esm-dispensing-app": "1.2.2-pre.256", + "@openmrs/esm-fast-data-entry-app": "1.0.1-pre.117", + "@openmrs/esm-cohort-builder-app": "3.0.1-pre.183", + "@openmrs/esm-form-builder-app": "2.2.2-pre.654", + "@ohri/openmrs-esm-ohri-core-app": "2.1.0-pre.3192", + "@ohri/openmrs-esm-ohri-hiv-app": "2.1.0-pre.3192", + "@ohri/openmrs-esm-ohri-covid-app": "2.1.0-pre.3192", + "@ohri/openmrs-esm-ohri-pmtct": "2.1.0-pre.3192", + "@ohri/openmrs-esm-ohri-tb-app": "2.1.0-pre.3192", + "@ohri/openmrs-esm-ohri-cervical-cancer-app": "2.1.0-pre.3192", + "@ohri/openmrs-esm-ohri-form-render-app": "2.1.0-pre.3192" }, "spaPath": "$SPA_PATH", "apiUrl": "$API_URL", From 6164656724e53a3bf9b35c1ef5fc68b1646c524f Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Thu, 13 Jun 2024 12:26:23 +0300 Subject: [PATCH 05/24] Updating package versions to 2.3.3 in preparation for release --- package.json | 2 +- packages/esm-cervical-cancer-app/package.json | 2 +- packages/esm-commons-lib/package.json | 2 +- packages/esm-covid-app/package.json | 2 +- packages/esm-form-render-app/package.json | 2 +- packages/esm-hiv-app/package.json | 2 +- packages/esm-ohri-core-app/package.json | 2 +- packages/esm-ohri-pmtct-app/package.json | 2 +- packages/esm-opd-app/package.json | 2 +- packages/esm-tb-app/package.json | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 3eb5caa26..c47927628 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@ohri/openmrs-esm-ohri", "private": true, - "version": "2.2.0", + "version": "2.3.3", "description": "OHRI MicroFrontend for OpenMRS SPA", "workspaces": [ "packages/*" diff --git a/packages/esm-cervical-cancer-app/package.json b/packages/esm-cervical-cancer-app/package.json index 22f6bea7d..40dcb1901 100644 --- a/packages/esm-cervical-cancer-app/package.json +++ b/packages/esm-cervical-cancer-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-cervical-cancer-app", - "version": "2.3.1", + "version": "2.3.3", "description": "Cervical cancer microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/openmrs-esm-ohri-cervical-cancer-app.js", "main": "src/index.ts", diff --git a/packages/esm-commons-lib/package.json b/packages/esm-commons-lib/package.json index 91272a3f0..3c7d04c71 100644 --- a/packages/esm-commons-lib/package.json +++ b/packages/esm-commons-lib/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-commons-lib", - "version": "2.3.1", + "version": "2.3.3", "description": "Commons library microfrontend of shared assets for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/ohri-commons-lib.js", "main": "src/index.ts", diff --git a/packages/esm-covid-app/package.json b/packages/esm-covid-app/package.json index d5483b155..53109d1fe 100644 --- a/packages/esm-covid-app/package.json +++ b/packages/esm-covid-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-covid-app", - "version": "2.3.1", + "version": "2.3.3", "description": "COVID Microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/openmrs-esm-ohri-covid-app.js", "main": "src/index.ts", diff --git a/packages/esm-form-render-app/package.json b/packages/esm-form-render-app/package.json index 65f3ad00b..b35e6f1dd 100644 --- a/packages/esm-form-render-app/package.json +++ b/packages/esm-form-render-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-form-render-app", - "version": "2.3.1", + "version": "2.3.3", "description": "A Forms Rendering microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/openmrs-esm-ohri-form-render-app.js", "main": "src/index.ts", diff --git a/packages/esm-hiv-app/package.json b/packages/esm-hiv-app/package.json index ae3c59bf4..917211b4a 100644 --- a/packages/esm-hiv-app/package.json +++ b/packages/esm-hiv-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-hiv-app", - "version": "2.3.1", + "version": "2.3.3", "description": "HIV microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/openmrs-esm-ohri-hiv-app.js", "main": "src/index.ts", diff --git a/packages/esm-ohri-core-app/package.json b/packages/esm-ohri-core-app/package.json index 13f83dc09..d053e99d6 100644 --- a/packages/esm-ohri-core-app/package.json +++ b/packages/esm-ohri-core-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-core-app", - "version": "2.3.1", + "version": "2.3.3", "description": "A custom microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/ohri-core-app.js", "main": "src/index.ts", diff --git a/packages/esm-ohri-pmtct-app/package.json b/packages/esm-ohri-pmtct-app/package.json index 8d110f652..8d1515735 100644 --- a/packages/esm-ohri-pmtct-app/package.json +++ b/packages/esm-ohri-pmtct-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-pmtct", - "version": "2.3.1", + "version": "2.3.3", "description": "PMTCT microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/ohri-pmtct-app.js", "main": "src/index.ts", diff --git a/packages/esm-opd-app/package.json b/packages/esm-opd-app/package.json index 22eee0422..e19125bda 100644 --- a/packages/esm-opd-app/package.json +++ b/packages/esm-opd-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-opd-app", - "version": "2.3.1", + "version": "2.3.3", "description": "opd active visits", "browser": "dist/openmrs-esm-ohri-opd-app.js", "main": "src/index.ts", diff --git a/packages/esm-tb-app/package.json b/packages/esm-tb-app/package.json index bf75f732d..4a4d27ba0 100644 --- a/packages/esm-tb-app/package.json +++ b/packages/esm-tb-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-tb-app", - "version": "2.3.1", + "version": "2.3.3", "description": "Tuberclosis microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/openmrs-esm-ohri-tb-app.js", "main": "src/index.ts", From a6400c837fbced7cd447b29243e65d82fc5b18f5 Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Thu, 13 Jun 2024 14:19:04 +0300 Subject: [PATCH 06/24] Delete .github/workflows/node.dev.js.yml from master branch (#1867) --- .github/workflows/node.dev.js.yml | 181 ------------------------------ 1 file changed, 181 deletions(-) delete mode 100644 .github/workflows/node.dev.js.yml diff --git a/.github/workflows/node.dev.js.yml b/.github/workflows/node.dev.js.yml deleted file mode 100644 index 8559a8f23..000000000 --- a/.github/workflows/node.dev.js.yml +++ /dev/null @@ -1,181 +0,0 @@ -name: OHRI CI - -on: - push: - branches: - - dev - pull_request: - branches: - - dev - release: - types: - - created - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - - - name: Cache dependencies - id: cache - uses: actions/cache@v3 - with: - path: '**/node_modules' - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - - - name: Install dependencies - if: steps.cache.outputs.cache-hit != 'true' - run: yarn install --immutable - - - name: Run tests - run: yarn run test - - # Temporarily disable typecheck - # - name: Run lint and typecheck - # run: yarn turbo run lint typescript --color --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team="${{ github.repository_owner }}" - - - name: Run build - run: yarn turbo run build --color --concurrency=5 --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team="${{ github.repository_owner }}" - - - name: Upload build artifacts - uses: actions/upload-artifact@v3 - with: - name: packages - path: | - packages/**/dist - - run_e2e_tests: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - - name: Install dependencies - run: yarn install --immutable - - name: Install Playwright Browsers - run: npx playwright install chromium --with-deps - - name: Run Playwright tests - run: yarn test-e2e - - pre_release: - runs-on: ubuntu-latest - - needs: build - - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/dev' }} - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - registry-url: 'https://registry.npmjs.org' - - - name: Cache dependencies - id: cache - uses: actions/cache@v3 - with: - path: '**/node_modules' - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Install dependencies - if: steps.cache.outputs.cache-hit != 'true' - run: yarn install --immutable - - - name: Version - run: yarn workspaces foreach --worktree --topological --exclude @ohri/openmrs-esm-ohri version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}" - - - name: Build - run: yarn turbo run build --color --concurrency=5 - - - name: setup git config - run: | - git config user.name "GitHub Actions Bot" - git config user.email "<>" - - name: commit - run: | - git add . - git commit -m "Prerelease version" --no-verify - - - name: Pre-release - run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn run ci:prepublish - env: - NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} - - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: packages - path: | - packages/**/dist - - docker_devserver_frontend: - runs-on: ubuntu-latest - needs: pre_release - - steps: - - name: Wait for 5 min - Let @esms reflect on NPM registry - run: sleep 300 - - name: Checkout repository - uses: actions/checkout@v3 - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Checkout - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build and push - uses: docker/build-push-action@v4 - with: - context: ./frontend - file: ./frontend/Dockerfile - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ secrets.DOCKERHUB_USERNAME }}/ohri-dev-frontend:next,${{ secrets.DOCKERHUB_USERNAME }}/ohri-dev-frontend:ci_${{ github.run_number }} - cache-from: type=inline,ref=user/app:buildcache - cache-to: type=inline,ref=user/app:buildcache,mode=max - - dev_deploy: - runs-on: ubuntu-latest - needs: docker_devserver_frontend - - if: (github.event_name == 'push' || github.event.pull_request.merged) - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: webfactory/ssh-agent - uses: webfactory/ssh-agent@v0.8.0 - - with: - ssh-private-key: ${{ secrets.OHRI_SSH_PRIVATE_KEY }} - - - name: SSH to remote OHRI Dev server via jump host - run: | - ssh -p 2216 \ - -o "UserKnownHostsFile=/dev/null" \ - -o "StrictHostKeyChecking=no" \ - -o "ProxyCommand=ssh -o StrictHostKeyChecking=no -W %h:%p ohri@20.172.182.46 -p 2202" \ - ohri@172.19.0.16 "\ - cd /opt && \ - docker compose -f docker-compose-ohri-dev.yml pull && \ - docker compose -f docker-compose-ohri-dev.yml stop && \ - docker compose -f docker-compose-ohri-dev.yml up -d" From 9dc5584ca52b311454b521c2e5fc9f9c7351f8b7 Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Fri, 14 Jun 2024 12:54:22 +0300 Subject: [PATCH 07/24] Updating ohri esms to publish (npmjs) a package tagged for staging env, This tag comes from the current state of the branch --- .github/workflows/node.working.js.yml | 84 +++++++++++++++++++++++++- frontend/spa-build-config.json | 85 ++++++++++++++------------- package.json | 1 + 3 files changed, 127 insertions(+), 43 deletions(-) diff --git a/.github/workflows/node.working.js.yml b/.github/workflows/node.working.js.yml index e1fbef549..6192002d1 100644 --- a/.github/workflows/node.working.js.yml +++ b/.github/workflows/node.working.js.yml @@ -1,4 +1,4 @@ -name: OHRI CI - @esm and Docker Image +name: OHRI CI - @esm and Docker Image Working/QA on: push: @@ -11,8 +11,88 @@ on: types: [opened, synchronize] jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + + - name: Cache dependencies + id: cache + uses: actions/cache@v3 + with: + path: '**/node_modules' + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: yarn install --immutable + + - name: Run tests + run: yarn run test + + - name: Run build + run: yarn turbo run build --color --concurrency=5 --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team="${{ github.repository_owner }}" + + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: packages + path: | + packages/**/dist + + qa: + runs-on: ubuntu-latest + needs: build + + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/working' }} + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + registry-url: 'https://registry.npmjs.org' + + - name: Cache dependencies + id: cache + uses: actions/cache@v3 + with: + path: '**/node_modules' + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: yarn install --immutable + + - name: Version + run: yarn workspaces foreach --worktree --topological --exclude @ohri/openmrs-esm-ohri version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}" + + - name: Build + run: yarn turbo run build --color --concurrency=5 + + - name: qa + run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn run ci:qa + env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} + + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: packages + path: | + packages/**/dist + docker_workingserver_frontend: runs-on: ubuntu-latest + needs: qa steps: - name: Wait for 5 min - Let @esms reflect on NPM registry @@ -37,7 +117,7 @@ jobs: file: ./frontend/Dockerfile platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} - tags: ${{ secrets.DOCKERHUB_USERNAME }}/ohri-working-frontend:next,${{ secrets.DOCKERHUB_USERNAME }}/ohri-working-frontend:ci_${{ github.run_number }} + tags: ${{ secrets.DOCKERHUB_USERNAME }}/ohri-working-frontend:qa,${{ secrets.DOCKERHUB_USERNAME }}/ohri-working-frontend:ci_${{ github.run_number }} cache-from: type=inline,ref=user/app:buildcache cache-to: type=inline,ref=user/app:buildcache,mode=max diff --git a/frontend/spa-build-config.json b/frontend/spa-build-config.json index 35a595280..e2b2a8179 100644 --- a/frontend/spa-build-config.json +++ b/frontend/spa-build-config.json @@ -1,46 +1,49 @@ { "frontendModules": { - "@openmrs/esm-devtools-app": "5.3.3-pre.1301", - "@openmrs/esm-implementer-tools-app": "5.3.3-pre.1301", - "@openmrs/esm-login-app": "5.3.3-pre.1301", - "@openmrs/esm-primary-navigation-app": "5.3.3-pre.1301", - "@openmrs/esm-home-app": "5.2.1-pre.305", - "@openmrs/esm-form-entry-app": "6.1.1-pre.3293", - "@openmrs/esm-generic-patient-widgets-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-allergies-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-appointments-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-attachments-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-banner-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-chart-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-conditions-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-forms-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-flags-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-labs-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-lists-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-medications-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-notes-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-orders-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-programs-app": "6.1.1-pre.3293", - "@openmrs/esm-patient-vitals-app": "6.1.1-pre.3293", - "@openmrs/esm-active-visits-app": "5.2.2-pre.2432", - "@openmrs/esm-appointments-app": "5.2.2-pre.2432", - "@openmrs/esm-service-queues-app": "5.2.2-pre.2432", - "@openmrs/esm-patient-list-management-app": "5.2.2-pre.2432", - "@openmrs/esm-patient-registration-app": "5.2.2-pre.2432", - "@openmrs/esm-patient-search-app": "5.2.2-pre.2432", - "@openmrs/esm-openconceptlab-app": "4.0.2-pre.88", - "@openmrs/esm-system-admin-app": "4.0.2-pre.88", - "@openmrs/esm-dispensing-app": "1.2.2-pre.256", - "@openmrs/esm-fast-data-entry-app": "1.0.1-pre.117", - "@openmrs/esm-cohort-builder-app": "3.0.1-pre.183", - "@openmrs/esm-form-builder-app": "2.2.2-pre.654", - "@ohri/openmrs-esm-ohri-core-app": "2.1.0-pre.3192", - "@ohri/openmrs-esm-ohri-hiv-app": "2.1.0-pre.3192", - "@ohri/openmrs-esm-ohri-covid-app": "2.1.0-pre.3192", - "@ohri/openmrs-esm-ohri-pmtct": "2.1.0-pre.3192", - "@ohri/openmrs-esm-ohri-tb-app": "2.1.0-pre.3192", - "@ohri/openmrs-esm-ohri-cervical-cancer-app": "2.1.0-pre.3192", - "@ohri/openmrs-esm-ohri-form-render-app": "2.1.0-pre.3192" + "@openmrs/esm-devtools-app": "next", + "@openmrs/esm-implementer-tools-app": "next", + "@openmrs/esm-login-app": "next", + "@openmrs/esm-primary-navigation-app": "next", + "@openmrs/esm-home-app": "next", + "@openmrs/esm-form-engine-app": "next", + "@openmrs/esm-generic-patient-widgets-app": "next", + "@openmrs/esm-patient-allergies-app": "next", + "@openmrs/esm-patient-attachments-app": "next", + "@openmrs/esm-patient-banner-app": "next", + "@ohri/esm-patient-chart-app": "next", + "@openmrs/esm-patient-conditions-app": "next", + "@openmrs/esm-patient-forms-app": "next", + "@openmrs/esm-patient-flags-app": "next", + "@openmrs/esm-patient-labs-app": "next", + "@openmrs/esm-patient-lists-app": "next", + "@openmrs/esm-patient-medications-app": "next", + "@openmrs/esm-patient-notes-app": "next", + "@openmrs/esm-patient-orders-app": "next", + "@openmrs/esm-patient-programs-app": "next", + "@openmrs/esm-patient-vitals-app": "next", + "@openmrs/esm-active-visits-app": "next", + "@openmrs/esm-appointments-app": "next", + "@openmrs/esm-service-queues-app": "next", + "@openmrs/esm-patient-list-management-app": "next", + "@openmrs/esm-patient-registration-app": "next", + "@openmrs/esm-patient-search-app": "next", + "@openmrs/esm-openconceptlab-app": "next", + "@openmrs/esm-system-admin-app": "next", + "@openmrs/esm-dispensing-app": "next", + "@openmrs/esm-fast-data-entry-app": "next", + "@openmrs/esm-cohort-builder-app": "next", + "@ohri/openmrs-esm-ohri-core-app": "qa", + "@ohri/openmrs-esm-ohri-hiv-care-treatment-app": "qa", + "@ohri/openmrs-esm-ohri-hiv-prevention-app": "qa", + "@ohri/openmrs-esm-ohri-covid-app": "qa", + "@ohri/openmrs-esm-ohri-pmtct-app": "qa", + "@ohri/openmrs-esm-ohri-tb-app": "qa", + "@ohri/openmrs-esm-ohri-cervical-cancer-app": "qa", + "@ohri/openmrs-esm-ohri-form-render-app": "qa", + "@openmrs/esm-stock-management-app": "next", + "@openmrs/esm-billing-app": "next", + "@ohri/openmrs-esm-ohri-opd-app": "qa", + "@openmrs/esm-form-builder-app": "next" }, "spaPath": "$SPA_PATH", "apiUrl": "$API_URL", diff --git a/package.json b/package.json index c47927628..0c7b21bef 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "verify": "turbo run lint && turbo run typescript && yarn test --coverage", "ci:prepublish": "yarn workspaces foreach --all --topological --exclude @ohri/openmrs-esm-ohri npm publish --access public --tag next", "ci:publish": "yarn workspaces foreach --all --topological --exclude @ohri/openmrs-esm-ohri npm publish --access public --tag latest", + "ci:qa": "yarn workspaces foreach --all --topological --exclude @ohri/openmrs-esm-ohri npm publish --access public --tag qa", "release": "yarn workspaces foreach --all --topological version", "coverage": "yarn test --coverage", "badges": "yarn coverage && yarn jest-coverage-badges --output './badges' ", From 9537ae82c1ddcbe0c998c79f879a1acc9e435e5d Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Fri, 14 Jun 2024 13:12:50 +0300 Subject: [PATCH 08/24] Removing duplicate tbPreventionDashboardMeta in packages/esm-tb-app/src/dashboard.meta.tsx --- packages/esm-tb-app/src/dashboard.meta.tsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/esm-tb-app/src/dashboard.meta.tsx b/packages/esm-tb-app/src/dashboard.meta.tsx index 4d3d5ea58..e387cbc50 100644 --- a/packages/esm-tb-app/src/dashboard.meta.tsx +++ b/packages/esm-tb-app/src/dashboard.meta.tsx @@ -44,12 +44,6 @@ export const tbClinicalViewDashboardMeta = { isFolder: true, title: 'Tuberculosis', }; -export const tbPreventionDashboardMeta = { - name: 'tb-prevention', - slot: 'tb-prevention-dashboard-slot', - config: { columns: 1, type: 'grid', programme: 'tpt', dashboardTitle: 'TB Prevention'}, - title: 'TB Prevention', -}; export const tbPreventionDashboardMeta = { name: 'tb-prevention', From 41bc8c93f91fe0022d17791fd7dc1cebdb49f507 Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Fri, 14 Jun 2024 13:33:56 +0300 Subject: [PATCH 09/24] Updating workflow --- .github/workflows/node.working.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.working.js.yml b/.github/workflows/node.working.js.yml index 6192002d1..cd3029bf4 100644 --- a/.github/workflows/node.working.js.yml +++ b/.github/workflows/node.working.js.yml @@ -73,7 +73,7 @@ jobs: run: yarn install --immutable - name: Version - run: yarn workspaces foreach --worktree --topological --exclude @ohri/openmrs-esm-ohri version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}" + run: yarn workspaces foreach --worktree --topological --exclude @ohri/openmrs-esm-ohri version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-qa.${{ github.run_number }}" - name: Build run: yarn turbo run build --color --concurrency=5 From ff7fc01bc71f302b7b79c63480cef25d3c704649 Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Fri, 14 Jun 2024 14:04:16 +0300 Subject: [PATCH 10/24] Updating changesetBaseRefs to include working --- .yarnrc.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.yarnrc.yml b/.yarnrc.yml index 5ce885524..93a28075a 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -16,4 +16,7 @@ changesetBaseRefs: [ "dev", "origin/dev", "upstream/dev", + "working", + "origin/working", + "upstream/working", ] From 4bd90d0cca8fb40ba7feb560bb3159911111c8a2 Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Fri, 14 Jun 2024 14:27:22 +0300 Subject: [PATCH 11/24] Updated spa assemble - hivv packages have not been split in working branch --- frontend/spa-build-config.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/spa-build-config.json b/frontend/spa-build-config.json index e2b2a8179..580b38d98 100644 --- a/frontend/spa-build-config.json +++ b/frontend/spa-build-config.json @@ -33,8 +33,7 @@ "@openmrs/esm-fast-data-entry-app": "next", "@openmrs/esm-cohort-builder-app": "next", "@ohri/openmrs-esm-ohri-core-app": "qa", - "@ohri/openmrs-esm-ohri-hiv-care-treatment-app": "qa", - "@ohri/openmrs-esm-ohri-hiv-prevention-app": "qa", + "@ohri/openmrs-esm-ohri-hiv-app": "qa", "@ohri/openmrs-esm-ohri-covid-app": "qa", "@ohri/openmrs-esm-ohri-pmtct-app": "qa", "@ohri/openmrs-esm-ohri-tb-app": "qa", From 79d713dc4cc3b0814eb7709b85567b244ffd7e35 Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Fri, 14 Jun 2024 14:51:29 +0300 Subject: [PATCH 12/24] Update packages/esm-ohri-pmtct-app/package.json name from @ohri/openmrs-esm-ohri-pmtct to @ohri/openmrs-esm-ohri-pmtct-app --- packages/esm-ohri-pmtct-app/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/esm-ohri-pmtct-app/package.json b/packages/esm-ohri-pmtct-app/package.json index 8d1515735..0412ae703 100644 --- a/packages/esm-ohri-pmtct-app/package.json +++ b/packages/esm-ohri-pmtct-app/package.json @@ -1,5 +1,5 @@ { - "name": "@ohri/openmrs-esm-ohri-pmtct", + "name": "@ohri/openmrs-esm-ohri-pmtct-app", "version": "2.3.3", "description": "PMTCT microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/ohri-pmtct-app.js", From 287f6626a41a870f2cde839e4c817d66682869d8 Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Fri, 14 Jun 2024 14:53:26 +0300 Subject: [PATCH 13/24] Update yarn lock file to reflect renaming of pmtct app --- yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6c60ef592..32b966715 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2869,9 +2869,9 @@ __metadata: languageName: unknown linkType: soft -"@ohri/openmrs-esm-ohri-pmtct@workspace:packages/esm-ohri-pmtct-app": +"@ohri/openmrs-esm-ohri-pmtct-app@workspace:packages/esm-ohri-pmtct-app": version: 0.0.0-use.local - resolution: "@ohri/openmrs-esm-ohri-pmtct@workspace:packages/esm-ohri-pmtct-app" + resolution: "@ohri/openmrs-esm-ohri-pmtct-app@workspace:packages/esm-ohri-pmtct-app" dependencies: "@carbon/react": "npm:^1.13.0" webpack: "npm:^5.88.2" From 8363ab579c0933dc89ea24a229ae66f490676530 Mon Sep 17 00:00:00 2001 From: Jovan Ssebaggala Date: Thu, 20 Jun 2024 08:50:17 +0300 Subject: [PATCH 14/24] Clean Ohri commons lib, upgrade openmrs, framework and patient-common-lib --- .../cohort-patient-list/helpers.tsx | 27 +- .../src/workspace/ohri-workspace-utils.ts | 21 +- .../lab-results/lab-results-form-viewer.tsx | 2 - yarn.lock | 354 +++++++++++------- 4 files changed, 244 insertions(+), 160 deletions(-) diff --git a/packages/esm-commons-lib/src/components/cohort-patient-list/helpers.tsx b/packages/esm-commons-lib/src/components/cohort-patient-list/helpers.tsx index 4d30c467e..2986aab6b 100644 --- a/packages/esm-commons-lib/src/components/cohort-patient-list/helpers.tsx +++ b/packages/esm-commons-lib/src/components/cohort-patient-list/helpers.tsx @@ -6,9 +6,8 @@ import localizedFormat from 'dayjs/plugin/localizedFormat'; import relativeTime from 'dayjs/plugin/relativeTime'; import { AddPatientToListOverflowMenuItem } from '../modals/add-patient-to-list-modal.component'; import { fetchPatientLastEncounter } from '../../api/api'; -import { changeWorkspaceContext } from '@openmrs/esm-patient-common-lib'; import { launchForm } from '../../utils/ohri-forms-commons'; -import { navigate } from '@openmrs/esm-framework'; +import { navigate, WorkspaceWindow } from '@openmrs/esm-framework'; interface PatientMetaConfig { location: { name: string }; @@ -55,21 +54,23 @@ export const LaunchableFormMenuItem = ({ } else { setIsLoading(false); } - }, []); + }, [continueEncounterActionText, encounterType, encounterUuid, launchableForm.editLatestEncounter, patientUuid]); return ( <> {isLoading ? ( ) : ( - { - changeWorkspaceContext(patientUuid); - launchForm(form, encounterUuid ? 'edit' : 'enter', moduleName, form.name, encounterUuid, null, null); - navigate({ to: patientUrl }); - }} - /> + <> + { + launchForm(form, encounterUuid ? 'edit' : 'enter', moduleName, form.name, encounterUuid, null, null); + navigate({ to: patientUrl }); + }} + /> + + )} ); @@ -94,7 +95,7 @@ export const ViewSummaryMenuItem = ({ patientUuid, ViewSummary, encounterType }) } else { setIsLoading(false); } - }, []); + }, [ViewSummary.editLatestEncounter, encounterType, encounterUuid, patientUuid, viewSummaryActionText]); return ( <> @@ -132,7 +133,7 @@ export const ViewTptSummaryMenuItem = ({ patientUuid, ViewTptSummary, encounterT } else { setIsLoading(false); } - }, []); + }, [ViewTptSummary.editLatestEncounter, encounterType, patientUuid, encounterUuid, viewTptSummaryActionText]); return ( <> diff --git a/packages/esm-commons-lib/src/workspace/ohri-workspace-utils.ts b/packages/esm-commons-lib/src/workspace/ohri-workspace-utils.ts index 53bd3f150..7971f2162 100644 --- a/packages/esm-commons-lib/src/workspace/ohri-workspace-utils.ts +++ b/packages/esm-commons-lib/src/workspace/ohri-workspace-utils.ts @@ -1,7 +1,8 @@ -import { getSyncLifecycle } from '@openmrs/esm-framework'; import { BehaviorSubject } from 'rxjs'; -import { closeWorkspace, launchPatientWorkspace, registerWorkspace } from '@openmrs/esm-patient-common-lib'; -import { FormEngine, SessionMode } from '@openmrs/openmrs-form-engine-lib'; +import { closeWorkspace } from '@openmrs/esm-framework'; +import { launchPatientWorkspace } from '@openmrs/esm-patient-common-lib'; +import { SessionMode } from '@openmrs/openmrs-form-engine-lib'; + export interface WorkspaceContextProps { title: string; encounterUuid?: string; @@ -18,26 +19,14 @@ let counter = 0; export const launchOHRIWorkSpace = (props: WorkspaceContextProps) => { const workspaceName = props.workspaceName || 'ohri-forms-' + counter++; - const close = () => { return closeWorkspace(workspaceName, { ignoreChanges: true }); }; + const onFormSubmit = () => { props.state?.updateParent?.(); close(); }; - registerWorkspace({ - name: workspaceName, - title: props.title, - preferredWindowSize: props.screenSize, - load: getSyncLifecycle(FormEngine, { - featureName: 'ohri-forms-workspace-item', - moduleName: props.moduleName, - }), - canMaximize: true, - canHide: true, - width: 'wider', - }); launchPatientWorkspace(workspaceName, { ...props.state, mode: props.mode, diff --git a/packages/esm-hiv-app/src/views/hts/lab-results/lab-results-form-viewer.tsx b/packages/esm-hiv-app/src/views/hts/lab-results/lab-results-form-viewer.tsx index 05489dff6..6afb20558 100644 --- a/packages/esm-hiv-app/src/views/hts/lab-results/lab-results-form-viewer.tsx +++ b/packages/esm-hiv-app/src/views/hts/lab-results/lab-results-form-viewer.tsx @@ -3,7 +3,6 @@ import { launchFormWithCustomTitle } from '@ohri/openmrs-esm-ohri-commons-lib'; import { getForm, applyFormIntent } from '@openmrs/openmrs-form-engine-lib'; import styles from './tabs/patient-list.scss'; import { OverflowMenu, OverflowMenuItem } from '@carbon/react'; -import { changeWorkspaceContext, closeAllWorkspaces, resetWorkspaceStore } from '@openmrs/esm-patient-common-lib'; import { navigate } from '@openmrs/esm-framework'; import { useTranslation } from 'react-i18next'; import { moduleName } from '../../../index'; @@ -47,7 +46,6 @@ export const LabresultsFormViewer: React.FC = ({ itemText={t('viewResult', 'View Result')} onClick={(e) => { e.preventDefault(); - changeWorkspaceContext(patientUuid); launchEncounterForm(applyFormIntent('*', getForm(form.package, form.name)), '*', 'view', encounterUuid); navigate({ to: patientUrl }); }} diff --git a/yarn.lock b/yarn.lock index 32b966715..aa847bad2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1459,26 +1459,6 @@ __metadata: languageName: node linkType: hard -"@carbon/icon-helpers@npm:^10.44.0": - version: 10.45.1 - resolution: "@carbon/icon-helpers@npm:10.45.1" - checksum: 69da5ae85b586c5bb754f1db90069fb48f556c9f5023318a25572faa07e6dca0f07aaec237eaec883029bb75819b64c30bf4716339cdbab590ca0ee648ef67bc - languageName: node - linkType: hard - -"@carbon/icons-react@npm:11.26.0": - version: 11.26.0 - resolution: "@carbon/icons-react@npm:11.26.0" - dependencies: - "@carbon/icon-helpers": "npm:^10.44.0" - "@carbon/telemetry": "npm:0.1.0" - prop-types: "npm:^15.7.2" - peerDependencies: - react: ">=16" - checksum: 70fec92a7c24378647e7b4edb6d468a0f5a9260f68bcaf91dd3ffb90cd1d371c79ba156702b01db57db0ef9fc10049b71c16715015989c540bb1b1833abd3956 - languageName: node - linkType: hard - "@carbon/icons-react@npm:^11.11.0": version: 11.11.0 resolution: "@carbon/icons-react@npm:11.11.0" @@ -2971,9 +2951,9 @@ __metadata: languageName: unknown linkType: soft -"@openmrs/esm-api@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-api@npm:5.4.1-pre.1592" +"@openmrs/esm-api@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-api@npm:5.6.1-pre.1920" dependencies: "@types/fhir": "npm:0.0.31" lodash-es: "npm:^4.17.21" @@ -2982,17 +2962,17 @@ __metadata: "@openmrs/esm-error-handling": 5.x "@openmrs/esm-navigation": 5.x "@openmrs/esm-offline": 5.x - checksum: 2e8ef75d8ac6f7edd582b7acd4a470f45812faf9122c93c256365b0b101d7012dffdb33eee5d1d41cb28e7638b751f5a92b34779ca5d908dbed94c95db3bb58d + checksum: 83996754229eeac993222372505020d8f301e9899ef5076a8f2eae5cf0bccb7249fbb1ca43e93dd45014c1fa28f42e73a3d5433b6147c80e80abf327e97778d3 languageName: node linkType: hard -"@openmrs/esm-app-shell@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-app-shell@npm:5.4.1-pre.1592" +"@openmrs/esm-app-shell@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-app-shell@npm:5.6.1-pre.1920" dependencies: "@carbon/react": "npm:~1.37.0" - "@openmrs/esm-framework": "npm:5.4.1-pre.1592" - "@openmrs/esm-styleguide": "npm:5.4.1-pre.1592" + "@openmrs/esm-framework": "npm:5.6.1-pre.1920" + "@openmrs/esm-styleguide": "npm:5.6.1-pre.1920" dayjs: "npm:^1.10.4" dexie: "npm:^3.0.3" html-webpack-plugin: "npm:^5.5.0" @@ -3006,7 +2986,7 @@ __metadata: react-router-dom: "npm:^6.3.0" rxjs: "npm:^6.5.3" semver: "npm:^7.3.4" - single-spa: "npm:^6.0.0" + single-spa: "npm:^6.0.1" swc-loader: "npm:^0.2.3" swr: "npm:^2.2.2" systemjs: "npm:^6.8.3" @@ -3017,44 +2997,57 @@ __metadata: workbox-strategies: "npm:^6.1.5" workbox-webpack-plugin: "npm:^6.1.5" workbox-window: "npm:^6.1.5" - checksum: d77f0fab8bc41a8678ef9855d64bbca9639e66bcfd74723e5ba92e5c563390bfe549b04f97c2144e1655a7a68e76156fa943374959b6ddfc78c4460e1e99ae11 + checksum: 444a660c06c2ef66b1e4e97aea0bf36bd3ea49efaf67a9962ee693d12faabc66fa64c393582f30bad4ebde43d1e7a50228d4f7e8173142289cbb82e003816880 languageName: node linkType: hard -"@openmrs/esm-config@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-config@npm:5.4.1-pre.1592" +"@openmrs/esm-config@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-config@npm:5.6.1-pre.1920" dependencies: ramda: "npm:^0.26.1" peerDependencies: "@openmrs/esm-globals": 5.x "@openmrs/esm-state": 5.x single-spa: 5.x - checksum: 1226a6533127483b6639957c04f641851791f3c41492ef4704184d270845dfe74834f7fbcf0633cec32ae4bd2acf0cf2ec9a58a8395fa8431fa8994927a8e98c + checksum: e7c7c06eeefd02a5fc70cbdd3c03150aace8492ee8592ae1587e676e8a55609bac6ed7f890a67882eaab9e68aa7435a6cd5c2bb27440f8614e438b4b4a63a511 languageName: node linkType: hard -"@openmrs/esm-dynamic-loading@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-dynamic-loading@npm:5.4.1-pre.1592" +"@openmrs/esm-context@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-context@npm:5.6.1-pre.1920" + dependencies: + immer: "npm:^10.0.4" peerDependencies: "@openmrs/esm-globals": 5.x - checksum: ca18b905a31d6a66ec1dced69ed62e348ab24983ba50bb1afebd34ec2924fecbb2ac2e02564fce7656c53fb363dd789f42d0d65fa289c6310e0eec9a11a2c00c + "@openmrs/esm-state": 5.x + checksum: 7e1a201cc5196deb5d8b22cf9c753e84f4b83960cabc8ef50b2428ad3f3601de0085877974ef911f2cc6268ad3a33d174da77ebb9cdf380b5f4face9e5cc5748 languageName: node linkType: hard -"@openmrs/esm-error-handling@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-error-handling@npm:5.4.1-pre.1592" +"@openmrs/esm-dynamic-loading@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-dynamic-loading@npm:5.6.1-pre.1920" peerDependencies: "@openmrs/esm-globals": 5.x - checksum: 0f1c750f4a17c2e0b12f7b2439091837edda8226cdbb3676e292736dfa43b4a252f02cc7fdf27510b7e388aad16076f21ff17be2c1604db4725adc9db04f9073 + "@openmrs/esm-translations": 5.x + checksum: a756e086f2a3488692e2c6ff8a2f937f798613a979a4f16a6c8a8f24bbb741fb7fbdaaac03525e32a4bba68588a1e743c293292be0d597b05523c7e5241e0dd6 languageName: node linkType: hard -"@openmrs/esm-extensions@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-extensions@npm:5.4.1-pre.1592" +"@openmrs/esm-error-handling@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-error-handling@npm:5.6.1-pre.1920" + peerDependencies: + "@openmrs/esm-globals": 5.x + checksum: c7319211bbecd7845766d1af56208a645876d3f24544572cd2c1b6a6a2dc9e202d8152ec6262fcb437b690e138b6a4b025be306927f3b046da33ee7ef8fa2fad + languageName: node + linkType: hard + +"@openmrs/esm-extensions@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-extensions@npm:5.6.1-pre.1920" dependencies: lodash-es: "npm:^4.17.21" peerDependencies: @@ -3062,79 +3055,84 @@ __metadata: "@openmrs/esm-config": 5.x "@openmrs/esm-feature-flags": 5.x "@openmrs/esm-state": 5.x + "@openmrs/esm-utils": 5.x single-spa: 5.x - checksum: aa6fc0e6704cc675142937ca65d17e99f751f879523031a4106934d11ea3ce0265126efa4c7659a2d2bfba61fe0b1ea3f8ccd54b5a67f9306aa2b655c7844f81 + checksum: f483f7eca50095eac8c3946267a7c445274a0a9478d4c40baf2cfc689861c6857656196912ffac8a2f75af2f5b0a7148ce900f34002d89b55a4fe5163d1450fa languageName: node linkType: hard -"@openmrs/esm-feature-flags@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-feature-flags@npm:5.4.1-pre.1592" +"@openmrs/esm-feature-flags@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-feature-flags@npm:5.6.1-pre.1920" dependencies: ramda: "npm:^0.26.1" peerDependencies: "@openmrs/esm-globals": 5.x "@openmrs/esm-state": 5.x single-spa: 5.x - checksum: fcdc422e4301c38664c826b524f4db52bfa76d23a08e7e337ea8a6c515ed6ebff3f5252a5dba2d7473af5aedc4251f3a531a6c51f49057fe997f0a69245ca993 - languageName: node - linkType: hard - -"@openmrs/esm-framework@npm:5.4.1-pre.1592, @openmrs/esm-framework@npm:next": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-framework@npm:5.4.1-pre.1592" - dependencies: - "@openmrs/esm-api": "npm:5.4.1-pre.1592" - "@openmrs/esm-config": "npm:5.4.1-pre.1592" - "@openmrs/esm-dynamic-loading": "npm:5.4.1-pre.1592" - "@openmrs/esm-error-handling": "npm:5.4.1-pre.1592" - "@openmrs/esm-extensions": "npm:5.4.1-pre.1592" - "@openmrs/esm-feature-flags": "npm:5.4.1-pre.1592" - "@openmrs/esm-globals": "npm:5.4.1-pre.1592" - "@openmrs/esm-navigation": "npm:5.4.1-pre.1592" - "@openmrs/esm-offline": "npm:5.4.1-pre.1592" - "@openmrs/esm-react-utils": "npm:5.4.1-pre.1592" - "@openmrs/esm-routes": "npm:5.4.1-pre.1592" - "@openmrs/esm-state": "npm:5.4.1-pre.1592" - "@openmrs/esm-styleguide": "npm:5.4.1-pre.1592" - "@openmrs/esm-utils": "npm:5.4.1-pre.1592" + checksum: 56c5df96fb1d4af3492535aea2db260d957719989692ce8e5b29cde7d31ecad9025b9cf695532307644612a323de992cadde4ba020d463182f18b6c63ad45e09 + languageName: node + linkType: hard + +"@openmrs/esm-framework@npm:5.6.1-pre.1920, @openmrs/esm-framework@npm:next": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-framework@npm:5.6.1-pre.1920" + dependencies: + "@openmrs/esm-api": "npm:5.6.1-pre.1920" + "@openmrs/esm-config": "npm:5.6.1-pre.1920" + "@openmrs/esm-context": "npm:5.6.1-pre.1920" + "@openmrs/esm-dynamic-loading": "npm:5.6.1-pre.1920" + "@openmrs/esm-error-handling": "npm:5.6.1-pre.1920" + "@openmrs/esm-extensions": "npm:5.6.1-pre.1920" + "@openmrs/esm-feature-flags": "npm:5.6.1-pre.1920" + "@openmrs/esm-globals": "npm:5.6.1-pre.1920" + "@openmrs/esm-navigation": "npm:5.6.1-pre.1920" + "@openmrs/esm-offline": "npm:5.6.1-pre.1920" + "@openmrs/esm-react-utils": "npm:5.6.1-pre.1920" + "@openmrs/esm-routes": "npm:5.6.1-pre.1920" + "@openmrs/esm-state": "npm:5.6.1-pre.1920" + "@openmrs/esm-styleguide": "npm:5.6.1-pre.1920" + "@openmrs/esm-translations": "npm:5.6.1-pre.1920" + "@openmrs/esm-utils": "npm:5.6.1-pre.1920" dayjs: "npm:^1.10.7" peerDependencies: dayjs: 1.x - i18next: 19.x + i18next: 21.x react: 18.x react-dom: 18.x react-i18next: 11.x rxjs: 6.x single-spa: 5.x swr: 2.x - checksum: e6493e7e47b2cb3859664d75143c03bb4f16bfdc2ed079158a1700acd0c0b681edb462f67152bfc90e7b7b115519431065ef34eea00413c2bd150722c286284d + checksum: 31c0201a286e334addb4a4feb9732ea3e2c205f22c029f7b2c10788a6a3c59eb1b4943a3c773cbfbb80c18e68827dbd5e729de2263d1793c351da557992d507b languageName: node linkType: hard -"@openmrs/esm-globals@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-globals@npm:5.4.1-pre.1592" +"@openmrs/esm-globals@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-globals@npm:5.6.1-pre.1920" + dependencies: + "@types/fhir": "npm:0.0.31" peerDependencies: single-spa: 5.x - checksum: c9f2daf8d10a7c7776af2ea92379c1e18d9ee628cafd0d717e4cefd2107f9c762d0f7acbb19755cb2f6fa9f73b301decf67618cfcbedf89fa24a97e53c2ff661 + checksum: 44ea0a7de3e85a000bf8a52cc6f3699118c16b38b17b4137373edac3efbd8fce837ca81ead9b930dfd3c40682daf8c190841b4cf204a28f043e5dbfba86207ef languageName: node linkType: hard -"@openmrs/esm-navigation@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-navigation@npm:5.4.1-pre.1592" +"@openmrs/esm-navigation@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-navigation@npm:5.6.1-pre.1920" dependencies: path-to-regexp: "npm:6.1.0" peerDependencies: "@openmrs/esm-state": 5.x - checksum: 948fd7990a9a7c3b08f330e2aa0e08cd0e9f4ffa3b83560cbdd6916cd24023c2fcc0299bea8887dfe07b50cdd17f699adf18d76e712ec3899e07e7b5d871703e + checksum: 64764c7820d0a518e588a8f33ebe5704fb0bbd8a26f10272ec5ae7434c4d14ad814d2db623abc5114ad7ee0fc89528451ec7c2a98e6f530409d538a3db721861 languageName: node linkType: hard -"@openmrs/esm-offline@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-offline@npm:5.4.1-pre.1592" +"@openmrs/esm-offline@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-offline@npm:5.6.1-pre.1920" dependencies: dexie: "npm:^3.0.3" lodash-es: "npm:^4.17.21" @@ -3144,15 +3142,14 @@ __metadata: "@openmrs/esm-api": 5.x "@openmrs/esm-globals": 5.x "@openmrs/esm-state": 5.x - "@openmrs/esm-styleguide": 5.x rxjs: 6.x - checksum: 2da01830be4ee8585ea99a24fd213e286da370fdaed14941edac945a59a37a255a32e84d4902668e45592e4b2c2d75b23d27662f7aba9891009e63b5962874de + checksum: 7a74d5946607bfe945886006bd4ef2743b5044fd15949eff3ebf72e2e3655219268de08e6ab9368b580f3e33fda9841743f016aaf100f41ae83b1548828cfd9e languageName: node linkType: hard "@openmrs/esm-patient-common-lib@npm:next": - version: 7.0.2-pre.3907 - resolution: "@openmrs/esm-patient-common-lib@npm:7.0.2-pre.3907" + version: 8.0.2-pre.4718 + resolution: "@openmrs/esm-patient-common-lib@npm:8.0.2-pre.4718" dependencies: "@carbon/react": "npm:^1.12.0" lodash-es: "npm:^4.17.21" @@ -3161,58 +3158,61 @@ __metadata: "@openmrs/esm-framework": 5.x react: 18.x single-spa: 6.x - checksum: 4cb67ef137936ca83ddca6b754077aeb1995be4f5c92461a6db73ac3c9d4a4e6e626dab7787aa38461bd2c5903a79cbb9238c719c3a3e05177717bb43c505f82 + checksum: 2c4786fa2aad9da067dfa43462e7fd29a14a06eac43ceb7495dc9220e683ce219a7b201ed9ed1eb7c947d02a048d4da2d529d5a4e8a97c1bc9f857979940eed8 languageName: node linkType: hard -"@openmrs/esm-react-utils@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-react-utils@npm:5.4.1-pre.1592" +"@openmrs/esm-react-utils@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-react-utils@npm:5.6.1-pre.1920" dependencies: lodash-es: "npm:^4.17.21" single-spa-react: "npm:^6.0.0" peerDependencies: "@openmrs/esm-api": 5.x "@openmrs/esm-config": 5.x + "@openmrs/esm-context": 5.x "@openmrs/esm-error-handling": 5.x "@openmrs/esm-extensions": 5.x + "@openmrs/esm-feature-flags": 5.x "@openmrs/esm-globals": 5.x "@openmrs/esm-navigation": 5.x + "@openmrs/esm-utils": 5.x dayjs: 1.x - i18next: 19.x + i18next: 21.x react: 18.x react-dom: 18.x react-i18next: 11.x rxjs: 6.x swr: 2.x - checksum: 85543b1064fb44fa5ea28a19d1222efc95cbe5f2751eec2e4c8bc721c11f32c4db1b3c6b763e7cdd9e63bc8591aa471bb6a16616fdf38d4b72c6878f8d6b2d41 + checksum: bcbb1076aa0dccb8c2dfed5dbd03a876fa2ac1ee8d854b6497e181ac65f844029b81929b0edba9d24a4264145307df8c712443e3cda8430c4680c829f76d8145 languageName: node linkType: hard -"@openmrs/esm-routes@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-routes@npm:5.4.1-pre.1592" +"@openmrs/esm-routes@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-routes@npm:5.6.1-pre.1920" peerDependencies: "@openmrs/esm-globals": 5.x "@openmrs/esm-utils": 5.x - checksum: d30f49230b951e210b21b26556a2d55942592c312379e9df81fb984503397f5b21ab0712f623c9245031e2d58a0d08ad9880d537b17d1f75b711fc04a37be9d8 + checksum: 0f3d230c8f8b91bb63d9a063007395d13acd2b37889661ac927c15718f385c9585c5f06dd61e67620721e8167a10c285aeae67afe9f4a6c5bdf9bc78bacdc0e3 languageName: node linkType: hard -"@openmrs/esm-state@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-state@npm:5.4.1-pre.1592" +"@openmrs/esm-state@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-state@npm:5.6.1-pre.1920" dependencies: zustand: "npm:^4.3.6" peerDependencies: "@openmrs/esm-globals": 5.x - checksum: d33f5527a42ea9653b431b31b788bbc62d07ff648d35bd0f0a61a52187f0877b26f7134f5e34c1f2fe38724e7ffe8e026571f07ed0dc5adc80d669ffb29cbd33 + checksum: 226878ceec66264e57aa6345eafcb1a918ec50b51445c991aebaf54c686ce8f5301feece2c7b40e230636867418e2042d1669c825897c9ba292699fbb6efe15b languageName: node linkType: hard -"@openmrs/esm-styleguide@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-styleguide@npm:5.4.1-pre.1592" +"@openmrs/esm-styleguide@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-styleguide@npm:5.6.1-pre.1920" dependencies: "@carbon/charts": "npm:^1.12.0" "@carbon/react": "npm:~1.37.0" @@ -3220,31 +3220,50 @@ __metadata: "@react-spectrum/datepicker": "npm:^3.8.0" "@react-spectrum/provider": "npm:^3.9.0" "@react-spectrum/theme-default": "npm:^3.5.6" + core-js-pure: "npm:^3.36.0" d3: "npm:^7.8.0" + geopattern: "npm:^1.2.3" lodash-es: "npm:^4.17.21" + react-avatar: "npm:^5.0.3" peerDependencies: + "@openmrs/esm-error-handling": 5.x "@openmrs/esm-extensions": 5.x - "@openmrs/esm-framework": 5.x + "@openmrs/esm-navigation": 5.x "@openmrs/esm-react-utils": 5.x "@openmrs/esm-state": 5.x + "@openmrs/esm-translations": 5.x dayjs: 1.x + i18next: 21.x react: 18.x react-dom: 18.x rxjs: 6.x - checksum: 3a94d832aa47e0603a3f147a7354cbdd8649b2f0d47838e17874423246425f0b930b0c0dad9dc78857c62b756cd95fe5ff3d5b2ed4339fd305d826e6fe499ebc + checksum: 2c2d8feaff805b184420e2a8b2a0d34b7a8b7d7823ae52dddc3d291a69b2a5a7da933b967cba7fe54c2b8d660d9f692dbbe2bbd671dd004b530163ccf2ebe293 + languageName: node + linkType: hard + +"@openmrs/esm-translations@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-translations@npm:5.6.1-pre.1920" + dependencies: + i18next: "npm:21.10.0" + peerDependencies: + i18next: 21.x + checksum: bf96daaeea7602bc6f99766e0472d39fdbd8146d712787ccf4d853ba9efb94d7c2fb0ddfda4b81dbaf6b2e46f69a7e15384e4d5d26c8c190e67dcd00704651a1 languageName: node linkType: hard -"@openmrs/esm-utils@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-utils@npm:5.4.1-pre.1592" +"@openmrs/esm-utils@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-utils@npm:5.6.1-pre.1920" dependencies: + "@internationalized/date": "npm:^3.5.0" semver: "npm:7.3.2" peerDependencies: + "@openmrs/esm-globals": 5.x dayjs: 1.x - i18next: 19.x + i18next: 21.x rxjs: 6.x - checksum: eec5a59e5f3c9b63d6704e0dba6aea9b4fd8d7ff70333d443804bba816aaee6c3d76cf551da165e5c38f55e2cdae37bd127023749a2bfa33bf8693eba0bdbd86 + checksum: f186eddaf2f651639e04bb339f48180d2f9d5f97084dcbfcd3125172a79695dfb574eec0570836c847272b9ac288e2e385886a1f9815c6cc6b8c2caf787c413d languageName: node linkType: hard @@ -3276,9 +3295,9 @@ __metadata: languageName: node linkType: hard -"@openmrs/webpack-config@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/webpack-config@npm:5.4.1-pre.1592" +"@openmrs/webpack-config@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/webpack-config@npm:5.6.1-pre.1920" dependencies: "@swc/core": "npm:^1.3.58" clean-webpack-plugin: "npm:^4.0.0" @@ -3295,7 +3314,7 @@ __metadata: webpack-stats-plugin: "npm:^1.0.3" peerDependencies: webpack: 5.x - checksum: 0eab1ab88d23d0ce82f9ab0e2f99bf1947bf8b590f534b558ccd001b36a6450eb7aa19779f9b822a32e17ef14003616ea5fd42405a66b1433a35f40f4ea568ae + checksum: e0c638b825f672f88a12d2a7d080103815c8507bfb840d63a02ad7733f3f93d69264204447abb54b7d78bc8af410174a4490f123ff0b09a124d838d48b66dcef languageName: node linkType: hard @@ -6720,6 +6739,13 @@ __metadata: languageName: node linkType: hard +"charenc@npm:0.0.2": + version: 0.0.2 + resolution: "charenc@npm:0.0.2" + checksum: 81dcadbe57e861d527faf6dd3855dc857395a1c4d6781f4847288ab23cffb7b3ee80d57c15bba7252ffe3e5e8019db767757ee7975663ad2ca0939bb8fcaf2e5 + languageName: node + linkType: hard + "cheerio-select@npm:^2.1.0": version: 2.1.0 resolution: "cheerio-select@npm:2.1.0" @@ -7282,6 +7308,13 @@ __metadata: languageName: node linkType: hard +"core-js-pure@npm:^3.36.0": + version: 3.37.1 + resolution: "core-js-pure@npm:3.37.1" + checksum: c683d4e46c4e4b9573f471a8229d972f9531a27e718453dfae601f1c104a2c905c3fe4e85ea3db449e364c573ecbe8801a08a3ffe88177df8dd8f8ea9af2cf81 + languageName: node + linkType: hard + "core-util-is@npm:~1.0.0": version: 1.0.3 resolution: "core-util-is@npm:1.0.3" @@ -7355,6 +7388,13 @@ __metadata: languageName: node linkType: hard +"crypt@npm:0.0.2": + version: 0.0.2 + resolution: "crypt@npm:0.0.2" + checksum: 2c72768de3d28278c7c9ffd81a298b26f87ecdfe94415084f339e6632f089b43fe039f2c93f612bcb5ffe447238373d93b2e8c90894cba6cfb0ac7a74616f8b9 + languageName: node + linkType: hard + "crypto-random-string@npm:^2.0.0": version: 2.0.0 resolution: "crypto-random-string@npm:2.0.0" @@ -9244,6 +9284,13 @@ __metadata: languageName: node linkType: hard +"extend@npm:~1.2.1": + version: 1.2.1 + resolution: "extend@npm:1.2.1" + checksum: bfebc6fd4d924f9a8872cfebbda8fc543bae58ca3ec7fe7a5189a706402bd465559b82a106db589088d60e8348e04d8597a1d3760cb5e3d8cf184bcd924ac569 + languageName: node + linkType: hard + "external-editor@npm:^3.0.3": version: 3.1.0 resolution: "external-editor@npm:3.1.0" @@ -9755,6 +9802,15 @@ __metadata: languageName: node linkType: hard +"geopattern@npm:^1.2.3": + version: 1.2.3 + resolution: "geopattern@npm:1.2.3" + dependencies: + extend: "npm:~1.2.1" + checksum: 75a2a7149b4615ec59ed89613155c8252d758de49a52aa3ac45398c83d821b6fe0db3252e573b9117f4e56530745a17f1ac666c484709a467da08c6a59aa7cda + languageName: node + linkType: hard + "get-caller-file@npm:^2.0.5": version: 2.0.5 resolution: "get-caller-file@npm:2.0.5" @@ -10421,7 +10477,7 @@ __metadata: languageName: node linkType: hard -"i18next@npm:^21.10.0, i18next@npm:^21.2.0": +"i18next@npm:21.10.0, i18next@npm:^21.10.0, i18next@npm:^21.2.0": version: 21.10.0 resolution: "i18next@npm:21.10.0" dependencies: @@ -10512,6 +10568,13 @@ __metadata: languageName: node linkType: hard +"immer@npm:^10.0.4": + version: 10.1.1 + resolution: "immer@npm:10.1.1" + checksum: 9dacf1e8c201d69191ccd88dc5d733bafe166cd45a5a360c5d7c88f1de0dff974a94114d72b35f3106adfe587fcfb131c545856184a2247d89d735ad25589863 + languageName: node + linkType: hard + "immutable@npm:^4.0.0": version: 4.1.0 resolution: "immutable@npm:4.1.0" @@ -10766,7 +10829,7 @@ __metadata: languageName: node linkType: hard -"is-buffer@npm:^1.1.5": +"is-buffer@npm:^1.1.5, is-buffer@npm:~1.1.6": version: 1.1.6 resolution: "is-buffer@npm:1.1.6" checksum: f63da109e74bbe8947036ed529d43e4ae0c5fcd0909921dce4917ad3ea212c6a87c29f525ba1d17c0858c18331cf1046d4fc69ef59ed26896b25c8288a627133 @@ -11006,6 +11069,13 @@ __metadata: languageName: node linkType: hard +"is-retina@npm:^1.0.3": + version: 1.0.3 + resolution: "is-retina@npm:1.0.3" + checksum: 7f8306095851aaa55d7dd4a2edffb53942f45388d4d19299a788ca7d30f9f2b7ae0884237b2262a5f8a6d9d5f57e934da3fdbec60b174469054ef080ac29012f + languageName: node + linkType: hard + "is-set@npm:^2.0.1, is-set@npm:^2.0.2": version: 2.0.2 resolution: "is-set@npm:2.0.2" @@ -12401,6 +12471,17 @@ __metadata: languageName: node linkType: hard +"md5@npm:^2.0.0": + version: 2.3.0 + resolution: "md5@npm:2.3.0" + dependencies: + charenc: "npm:0.0.2" + crypt: "npm:0.0.2" + is-buffer: "npm:~1.1.6" + checksum: 88dce9fb8df1a084c2385726dcc18c7f54e0b64c261b5def7cdfe4928c4ee1cd68695c34108b4fab7ecceb05838c938aa411c6143df9fdc0026c4ddb4e4e72fa + languageName: node + linkType: hard + "mdast-util-definitions@npm:^5.0.0": version: 5.1.1 resolution: "mdast-util-definitions@npm:5.1.1" @@ -13537,12 +13618,11 @@ __metadata: linkType: hard "openmrs@npm:next": - version: 5.4.1-pre.1592 - resolution: "openmrs@npm:5.4.1-pre.1592" + version: 5.6.1-pre.1920 + resolution: "openmrs@npm:5.6.1-pre.1920" dependencies: - "@carbon/icons-react": "npm:11.26.0" - "@openmrs/esm-app-shell": "npm:5.4.1-pre.1592" - "@openmrs/webpack-config": "npm:5.4.1-pre.1592" + "@openmrs/esm-app-shell": "npm:5.6.1-pre.1920" + "@openmrs/webpack-config": "npm:5.6.1-pre.1920" "@pnpm/npm-conf": "npm:^2.1.0" "@swc/core": "npm:^1.3.58" autoprefixer: "npm:^10.4.2" @@ -13562,6 +13642,7 @@ __metadata: postcss: "npm:^8.4.6" postcss-loader: "npm:^6.2.1" rimraf: "npm:^3.0.2" + semver: "npm:^7.3.4" swc-loader: "npm:^0.2.3" tar: "npm:^6.0.5" typescript: "npm:^4.6.4" @@ -13573,7 +13654,7 @@ __metadata: yargs: "npm:^17.6.2" bin: openmrs: ./dist/cli.js - checksum: 6a02311734010b6695d58a21785528b3ec168145cdd935c6949e93540e243b02ba6bb062927e1a99250643a7638fbc8eef620fd7ca6b0abf81473716f63bfcfe + checksum: f4204f437215e75424db49f6b267fe9e88bab511e5bd7de8ee3f5ca312d0e02afd2116975e86618f6ee3547bf2824f3b7bbbfba0c15e822a046d057d3c45858b languageName: node linkType: hard @@ -14812,6 +14893,21 @@ __metadata: languageName: node linkType: hard +"react-avatar@npm:^5.0.3": + version: 5.0.3 + resolution: "react-avatar@npm:5.0.3" + dependencies: + is-retina: "npm:^1.0.3" + md5: "npm:^2.0.0" + peerDependencies: + "@babel/runtime": ">=7" + core-js-pure: ">=3" + prop-types: ^15.0.0 || ^16.0.0 + react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + checksum: cdbb231d7d19cd3890873b465affe984aa006341c8b6130a670bfe406461665fb8f5607e0c3d7650aa4ec43b96acdad0b572b760e16c2cc41ddc15986aac7590 + languageName: node + linkType: hard + "react-dom@npm:^18.1.0, react-dom@npm:^18.2.0": version: 18.2.0 resolution: "react-dom@npm:18.2.0" @@ -15921,10 +16017,10 @@ __metadata: languageName: node linkType: hard -"single-spa@npm:^6.0.0": - version: 6.0.0 - resolution: "single-spa@npm:6.0.0" - checksum: e61f6b83f5b200fc093fce41ed2704b631c53d3214fef77342571ee9aadf903131c9aedec80568424ba23fa794b97bc74cbdb8ac741b19ad44a1c2cb1628a462 +"single-spa@npm:^6.0.1": + version: 6.0.1 + resolution: "single-spa@npm:6.0.1" + checksum: 6c192226c0c6d94dbb0d2576c6552ebb9ec01ecad69d069cac47ddd5aa3c2c90e1370765e2d0e36203120a2c48bb7e967e2d6d8a6f9ede4315fd4b9e11cd9e85 languageName: node linkType: hard From 28b3eb6a1cbb435fd43fc4292de5a7cc67e2ba53 Mon Sep 17 00:00:00 2001 From: Jovan Ssebaggala Date: Thu, 20 Jun 2024 13:21:06 +0300 Subject: [PATCH 15/24] fix lodash --- jest.config.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jest.config.js b/jest.config.js index 82b65f646..8c427b8d9 100644 --- a/jest.config.js +++ b/jest.config.js @@ -32,13 +32,14 @@ const config = { '^@carbon/charts-react$': path.resolve(__dirname, '__mocks__', '@carbon__charts-react.ts'), '^dexie$': require.resolve('dexie'), '^lodash-es/(.*)$': 'lodash/$1', + '^lodash-es$': 'lodash', '^react-i18next$': path.resolve(__dirname, '__mocks__', 'react-i18next.js'), }, testEnvironment: 'jsdom', testPathIgnorePatterns: [ - "/node_modules/", - "/e2e/" // Ignore the e2e directory containing Playwright tests - ] + '/node_modules/', + '/e2e/', // Ignore the e2e directory containing Playwright tests + ], }; module.exports = config; From 611a6db55a58e199e720d9c0dd336ae25015cc3d Mon Sep 17 00:00:00 2001 From: Jovan Ssebaggala Date: Thu, 20 Jun 2024 15:59:04 +0300 Subject: [PATCH 16/24] refresh encounter list after deleting encounter --- .../components/encounter-list/encounter-list.component.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx b/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx index a849aa717..3a8b3d053 100644 --- a/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx +++ b/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx @@ -104,12 +104,7 @@ export const EncounterList: React.FC = ({ const abortController = new AbortController(); deleteEncounter(encounterUuid, abortController) .then(() => { - mutate( - (key) => - typeof key === "string" && key.startsWith("/ws/rest/v1/encounter"), - undefined, - { revalidate: true } - ); + onFormSave(); showSnackbar({ isLowContrast: true, title: t('encounterDeleted', 'Encounter deleted'), From 8c73cefbeede63cdb0d8cd88d504a6ef9d580306 Mon Sep 17 00:00:00 2001 From: Jovan Ssebaggala Date: Thu, 20 Jun 2024 16:55:23 +0300 Subject: [PATCH 17/24] (fix) Clean Ohri commons lib, upgrade openmrs, framework and patient-common-lib (#1876) * Clean Ohri commons lib, upgrade openmrs, framework and patient-common-lib * fix lodash * fix tb dashboard meta * refresh encounter list after deleting encounter --- jest.config.js | 7 +- .../cohort-patient-list/helpers.tsx | 27 +- .../encounter-list.component.tsx | 7 +- .../src/workspace/ohri-workspace-utils.ts | 21 +- .../lab-results/lab-results-form-viewer.tsx | 2 - yarn.lock | 354 +++++++++++------- 6 files changed, 249 insertions(+), 169 deletions(-) diff --git a/jest.config.js b/jest.config.js index 82b65f646..8c427b8d9 100644 --- a/jest.config.js +++ b/jest.config.js @@ -32,13 +32,14 @@ const config = { '^@carbon/charts-react$': path.resolve(__dirname, '__mocks__', '@carbon__charts-react.ts'), '^dexie$': require.resolve('dexie'), '^lodash-es/(.*)$': 'lodash/$1', + '^lodash-es$': 'lodash', '^react-i18next$': path.resolve(__dirname, '__mocks__', 'react-i18next.js'), }, testEnvironment: 'jsdom', testPathIgnorePatterns: [ - "/node_modules/", - "/e2e/" // Ignore the e2e directory containing Playwright tests - ] + '/node_modules/', + '/e2e/', // Ignore the e2e directory containing Playwright tests + ], }; module.exports = config; diff --git a/packages/esm-commons-lib/src/components/cohort-patient-list/helpers.tsx b/packages/esm-commons-lib/src/components/cohort-patient-list/helpers.tsx index 4d30c467e..2986aab6b 100644 --- a/packages/esm-commons-lib/src/components/cohort-patient-list/helpers.tsx +++ b/packages/esm-commons-lib/src/components/cohort-patient-list/helpers.tsx @@ -6,9 +6,8 @@ import localizedFormat from 'dayjs/plugin/localizedFormat'; import relativeTime from 'dayjs/plugin/relativeTime'; import { AddPatientToListOverflowMenuItem } from '../modals/add-patient-to-list-modal.component'; import { fetchPatientLastEncounter } from '../../api/api'; -import { changeWorkspaceContext } from '@openmrs/esm-patient-common-lib'; import { launchForm } from '../../utils/ohri-forms-commons'; -import { navigate } from '@openmrs/esm-framework'; +import { navigate, WorkspaceWindow } from '@openmrs/esm-framework'; interface PatientMetaConfig { location: { name: string }; @@ -55,21 +54,23 @@ export const LaunchableFormMenuItem = ({ } else { setIsLoading(false); } - }, []); + }, [continueEncounterActionText, encounterType, encounterUuid, launchableForm.editLatestEncounter, patientUuid]); return ( <> {isLoading ? ( ) : ( - { - changeWorkspaceContext(patientUuid); - launchForm(form, encounterUuid ? 'edit' : 'enter', moduleName, form.name, encounterUuid, null, null); - navigate({ to: patientUrl }); - }} - /> + <> + { + launchForm(form, encounterUuid ? 'edit' : 'enter', moduleName, form.name, encounterUuid, null, null); + navigate({ to: patientUrl }); + }} + /> + + )} ); @@ -94,7 +95,7 @@ export const ViewSummaryMenuItem = ({ patientUuid, ViewSummary, encounterType }) } else { setIsLoading(false); } - }, []); + }, [ViewSummary.editLatestEncounter, encounterType, encounterUuid, patientUuid, viewSummaryActionText]); return ( <> @@ -132,7 +133,7 @@ export const ViewTptSummaryMenuItem = ({ patientUuid, ViewTptSummary, encounterT } else { setIsLoading(false); } - }, []); + }, [ViewTptSummary.editLatestEncounter, encounterType, patientUuid, encounterUuid, viewTptSummaryActionText]); return ( <> diff --git a/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx b/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx index a849aa717..3a8b3d053 100644 --- a/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx +++ b/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx @@ -104,12 +104,7 @@ export const EncounterList: React.FC = ({ const abortController = new AbortController(); deleteEncounter(encounterUuid, abortController) .then(() => { - mutate( - (key) => - typeof key === "string" && key.startsWith("/ws/rest/v1/encounter"), - undefined, - { revalidate: true } - ); + onFormSave(); showSnackbar({ isLowContrast: true, title: t('encounterDeleted', 'Encounter deleted'), diff --git a/packages/esm-commons-lib/src/workspace/ohri-workspace-utils.ts b/packages/esm-commons-lib/src/workspace/ohri-workspace-utils.ts index 53bd3f150..7971f2162 100644 --- a/packages/esm-commons-lib/src/workspace/ohri-workspace-utils.ts +++ b/packages/esm-commons-lib/src/workspace/ohri-workspace-utils.ts @@ -1,7 +1,8 @@ -import { getSyncLifecycle } from '@openmrs/esm-framework'; import { BehaviorSubject } from 'rxjs'; -import { closeWorkspace, launchPatientWorkspace, registerWorkspace } from '@openmrs/esm-patient-common-lib'; -import { FormEngine, SessionMode } from '@openmrs/openmrs-form-engine-lib'; +import { closeWorkspace } from '@openmrs/esm-framework'; +import { launchPatientWorkspace } from '@openmrs/esm-patient-common-lib'; +import { SessionMode } from '@openmrs/openmrs-form-engine-lib'; + export interface WorkspaceContextProps { title: string; encounterUuid?: string; @@ -18,26 +19,14 @@ let counter = 0; export const launchOHRIWorkSpace = (props: WorkspaceContextProps) => { const workspaceName = props.workspaceName || 'ohri-forms-' + counter++; - const close = () => { return closeWorkspace(workspaceName, { ignoreChanges: true }); }; + const onFormSubmit = () => { props.state?.updateParent?.(); close(); }; - registerWorkspace({ - name: workspaceName, - title: props.title, - preferredWindowSize: props.screenSize, - load: getSyncLifecycle(FormEngine, { - featureName: 'ohri-forms-workspace-item', - moduleName: props.moduleName, - }), - canMaximize: true, - canHide: true, - width: 'wider', - }); launchPatientWorkspace(workspaceName, { ...props.state, mode: props.mode, diff --git a/packages/esm-hiv-app/src/views/hts/lab-results/lab-results-form-viewer.tsx b/packages/esm-hiv-app/src/views/hts/lab-results/lab-results-form-viewer.tsx index 05489dff6..6afb20558 100644 --- a/packages/esm-hiv-app/src/views/hts/lab-results/lab-results-form-viewer.tsx +++ b/packages/esm-hiv-app/src/views/hts/lab-results/lab-results-form-viewer.tsx @@ -3,7 +3,6 @@ import { launchFormWithCustomTitle } from '@ohri/openmrs-esm-ohri-commons-lib'; import { getForm, applyFormIntent } from '@openmrs/openmrs-form-engine-lib'; import styles from './tabs/patient-list.scss'; import { OverflowMenu, OverflowMenuItem } from '@carbon/react'; -import { changeWorkspaceContext, closeAllWorkspaces, resetWorkspaceStore } from '@openmrs/esm-patient-common-lib'; import { navigate } from '@openmrs/esm-framework'; import { useTranslation } from 'react-i18next'; import { moduleName } from '../../../index'; @@ -47,7 +46,6 @@ export const LabresultsFormViewer: React.FC = ({ itemText={t('viewResult', 'View Result')} onClick={(e) => { e.preventDefault(); - changeWorkspaceContext(patientUuid); launchEncounterForm(applyFormIntent('*', getForm(form.package, form.name)), '*', 'view', encounterUuid); navigate({ to: patientUrl }); }} diff --git a/yarn.lock b/yarn.lock index 32b966715..aa847bad2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1459,26 +1459,6 @@ __metadata: languageName: node linkType: hard -"@carbon/icon-helpers@npm:^10.44.0": - version: 10.45.1 - resolution: "@carbon/icon-helpers@npm:10.45.1" - checksum: 69da5ae85b586c5bb754f1db90069fb48f556c9f5023318a25572faa07e6dca0f07aaec237eaec883029bb75819b64c30bf4716339cdbab590ca0ee648ef67bc - languageName: node - linkType: hard - -"@carbon/icons-react@npm:11.26.0": - version: 11.26.0 - resolution: "@carbon/icons-react@npm:11.26.0" - dependencies: - "@carbon/icon-helpers": "npm:^10.44.0" - "@carbon/telemetry": "npm:0.1.0" - prop-types: "npm:^15.7.2" - peerDependencies: - react: ">=16" - checksum: 70fec92a7c24378647e7b4edb6d468a0f5a9260f68bcaf91dd3ffb90cd1d371c79ba156702b01db57db0ef9fc10049b71c16715015989c540bb1b1833abd3956 - languageName: node - linkType: hard - "@carbon/icons-react@npm:^11.11.0": version: 11.11.0 resolution: "@carbon/icons-react@npm:11.11.0" @@ -2971,9 +2951,9 @@ __metadata: languageName: unknown linkType: soft -"@openmrs/esm-api@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-api@npm:5.4.1-pre.1592" +"@openmrs/esm-api@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-api@npm:5.6.1-pre.1920" dependencies: "@types/fhir": "npm:0.0.31" lodash-es: "npm:^4.17.21" @@ -2982,17 +2962,17 @@ __metadata: "@openmrs/esm-error-handling": 5.x "@openmrs/esm-navigation": 5.x "@openmrs/esm-offline": 5.x - checksum: 2e8ef75d8ac6f7edd582b7acd4a470f45812faf9122c93c256365b0b101d7012dffdb33eee5d1d41cb28e7638b751f5a92b34779ca5d908dbed94c95db3bb58d + checksum: 83996754229eeac993222372505020d8f301e9899ef5076a8f2eae5cf0bccb7249fbb1ca43e93dd45014c1fa28f42e73a3d5433b6147c80e80abf327e97778d3 languageName: node linkType: hard -"@openmrs/esm-app-shell@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-app-shell@npm:5.4.1-pre.1592" +"@openmrs/esm-app-shell@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-app-shell@npm:5.6.1-pre.1920" dependencies: "@carbon/react": "npm:~1.37.0" - "@openmrs/esm-framework": "npm:5.4.1-pre.1592" - "@openmrs/esm-styleguide": "npm:5.4.1-pre.1592" + "@openmrs/esm-framework": "npm:5.6.1-pre.1920" + "@openmrs/esm-styleguide": "npm:5.6.1-pre.1920" dayjs: "npm:^1.10.4" dexie: "npm:^3.0.3" html-webpack-plugin: "npm:^5.5.0" @@ -3006,7 +2986,7 @@ __metadata: react-router-dom: "npm:^6.3.0" rxjs: "npm:^6.5.3" semver: "npm:^7.3.4" - single-spa: "npm:^6.0.0" + single-spa: "npm:^6.0.1" swc-loader: "npm:^0.2.3" swr: "npm:^2.2.2" systemjs: "npm:^6.8.3" @@ -3017,44 +2997,57 @@ __metadata: workbox-strategies: "npm:^6.1.5" workbox-webpack-plugin: "npm:^6.1.5" workbox-window: "npm:^6.1.5" - checksum: d77f0fab8bc41a8678ef9855d64bbca9639e66bcfd74723e5ba92e5c563390bfe549b04f97c2144e1655a7a68e76156fa943374959b6ddfc78c4460e1e99ae11 + checksum: 444a660c06c2ef66b1e4e97aea0bf36bd3ea49efaf67a9962ee693d12faabc66fa64c393582f30bad4ebde43d1e7a50228d4f7e8173142289cbb82e003816880 languageName: node linkType: hard -"@openmrs/esm-config@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-config@npm:5.4.1-pre.1592" +"@openmrs/esm-config@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-config@npm:5.6.1-pre.1920" dependencies: ramda: "npm:^0.26.1" peerDependencies: "@openmrs/esm-globals": 5.x "@openmrs/esm-state": 5.x single-spa: 5.x - checksum: 1226a6533127483b6639957c04f641851791f3c41492ef4704184d270845dfe74834f7fbcf0633cec32ae4bd2acf0cf2ec9a58a8395fa8431fa8994927a8e98c + checksum: e7c7c06eeefd02a5fc70cbdd3c03150aace8492ee8592ae1587e676e8a55609bac6ed7f890a67882eaab9e68aa7435a6cd5c2bb27440f8614e438b4b4a63a511 languageName: node linkType: hard -"@openmrs/esm-dynamic-loading@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-dynamic-loading@npm:5.4.1-pre.1592" +"@openmrs/esm-context@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-context@npm:5.6.1-pre.1920" + dependencies: + immer: "npm:^10.0.4" peerDependencies: "@openmrs/esm-globals": 5.x - checksum: ca18b905a31d6a66ec1dced69ed62e348ab24983ba50bb1afebd34ec2924fecbb2ac2e02564fce7656c53fb363dd789f42d0d65fa289c6310e0eec9a11a2c00c + "@openmrs/esm-state": 5.x + checksum: 7e1a201cc5196deb5d8b22cf9c753e84f4b83960cabc8ef50b2428ad3f3601de0085877974ef911f2cc6268ad3a33d174da77ebb9cdf380b5f4face9e5cc5748 languageName: node linkType: hard -"@openmrs/esm-error-handling@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-error-handling@npm:5.4.1-pre.1592" +"@openmrs/esm-dynamic-loading@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-dynamic-loading@npm:5.6.1-pre.1920" peerDependencies: "@openmrs/esm-globals": 5.x - checksum: 0f1c750f4a17c2e0b12f7b2439091837edda8226cdbb3676e292736dfa43b4a252f02cc7fdf27510b7e388aad16076f21ff17be2c1604db4725adc9db04f9073 + "@openmrs/esm-translations": 5.x + checksum: a756e086f2a3488692e2c6ff8a2f937f798613a979a4f16a6c8a8f24bbb741fb7fbdaaac03525e32a4bba68588a1e743c293292be0d597b05523c7e5241e0dd6 languageName: node linkType: hard -"@openmrs/esm-extensions@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-extensions@npm:5.4.1-pre.1592" +"@openmrs/esm-error-handling@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-error-handling@npm:5.6.1-pre.1920" + peerDependencies: + "@openmrs/esm-globals": 5.x + checksum: c7319211bbecd7845766d1af56208a645876d3f24544572cd2c1b6a6a2dc9e202d8152ec6262fcb437b690e138b6a4b025be306927f3b046da33ee7ef8fa2fad + languageName: node + linkType: hard + +"@openmrs/esm-extensions@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-extensions@npm:5.6.1-pre.1920" dependencies: lodash-es: "npm:^4.17.21" peerDependencies: @@ -3062,79 +3055,84 @@ __metadata: "@openmrs/esm-config": 5.x "@openmrs/esm-feature-flags": 5.x "@openmrs/esm-state": 5.x + "@openmrs/esm-utils": 5.x single-spa: 5.x - checksum: aa6fc0e6704cc675142937ca65d17e99f751f879523031a4106934d11ea3ce0265126efa4c7659a2d2bfba61fe0b1ea3f8ccd54b5a67f9306aa2b655c7844f81 + checksum: f483f7eca50095eac8c3946267a7c445274a0a9478d4c40baf2cfc689861c6857656196912ffac8a2f75af2f5b0a7148ce900f34002d89b55a4fe5163d1450fa languageName: node linkType: hard -"@openmrs/esm-feature-flags@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-feature-flags@npm:5.4.1-pre.1592" +"@openmrs/esm-feature-flags@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-feature-flags@npm:5.6.1-pre.1920" dependencies: ramda: "npm:^0.26.1" peerDependencies: "@openmrs/esm-globals": 5.x "@openmrs/esm-state": 5.x single-spa: 5.x - checksum: fcdc422e4301c38664c826b524f4db52bfa76d23a08e7e337ea8a6c515ed6ebff3f5252a5dba2d7473af5aedc4251f3a531a6c51f49057fe997f0a69245ca993 - languageName: node - linkType: hard - -"@openmrs/esm-framework@npm:5.4.1-pre.1592, @openmrs/esm-framework@npm:next": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-framework@npm:5.4.1-pre.1592" - dependencies: - "@openmrs/esm-api": "npm:5.4.1-pre.1592" - "@openmrs/esm-config": "npm:5.4.1-pre.1592" - "@openmrs/esm-dynamic-loading": "npm:5.4.1-pre.1592" - "@openmrs/esm-error-handling": "npm:5.4.1-pre.1592" - "@openmrs/esm-extensions": "npm:5.4.1-pre.1592" - "@openmrs/esm-feature-flags": "npm:5.4.1-pre.1592" - "@openmrs/esm-globals": "npm:5.4.1-pre.1592" - "@openmrs/esm-navigation": "npm:5.4.1-pre.1592" - "@openmrs/esm-offline": "npm:5.4.1-pre.1592" - "@openmrs/esm-react-utils": "npm:5.4.1-pre.1592" - "@openmrs/esm-routes": "npm:5.4.1-pre.1592" - "@openmrs/esm-state": "npm:5.4.1-pre.1592" - "@openmrs/esm-styleguide": "npm:5.4.1-pre.1592" - "@openmrs/esm-utils": "npm:5.4.1-pre.1592" + checksum: 56c5df96fb1d4af3492535aea2db260d957719989692ce8e5b29cde7d31ecad9025b9cf695532307644612a323de992cadde4ba020d463182f18b6c63ad45e09 + languageName: node + linkType: hard + +"@openmrs/esm-framework@npm:5.6.1-pre.1920, @openmrs/esm-framework@npm:next": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-framework@npm:5.6.1-pre.1920" + dependencies: + "@openmrs/esm-api": "npm:5.6.1-pre.1920" + "@openmrs/esm-config": "npm:5.6.1-pre.1920" + "@openmrs/esm-context": "npm:5.6.1-pre.1920" + "@openmrs/esm-dynamic-loading": "npm:5.6.1-pre.1920" + "@openmrs/esm-error-handling": "npm:5.6.1-pre.1920" + "@openmrs/esm-extensions": "npm:5.6.1-pre.1920" + "@openmrs/esm-feature-flags": "npm:5.6.1-pre.1920" + "@openmrs/esm-globals": "npm:5.6.1-pre.1920" + "@openmrs/esm-navigation": "npm:5.6.1-pre.1920" + "@openmrs/esm-offline": "npm:5.6.1-pre.1920" + "@openmrs/esm-react-utils": "npm:5.6.1-pre.1920" + "@openmrs/esm-routes": "npm:5.6.1-pre.1920" + "@openmrs/esm-state": "npm:5.6.1-pre.1920" + "@openmrs/esm-styleguide": "npm:5.6.1-pre.1920" + "@openmrs/esm-translations": "npm:5.6.1-pre.1920" + "@openmrs/esm-utils": "npm:5.6.1-pre.1920" dayjs: "npm:^1.10.7" peerDependencies: dayjs: 1.x - i18next: 19.x + i18next: 21.x react: 18.x react-dom: 18.x react-i18next: 11.x rxjs: 6.x single-spa: 5.x swr: 2.x - checksum: e6493e7e47b2cb3859664d75143c03bb4f16bfdc2ed079158a1700acd0c0b681edb462f67152bfc90e7b7b115519431065ef34eea00413c2bd150722c286284d + checksum: 31c0201a286e334addb4a4feb9732ea3e2c205f22c029f7b2c10788a6a3c59eb1b4943a3c773cbfbb80c18e68827dbd5e729de2263d1793c351da557992d507b languageName: node linkType: hard -"@openmrs/esm-globals@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-globals@npm:5.4.1-pre.1592" +"@openmrs/esm-globals@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-globals@npm:5.6.1-pre.1920" + dependencies: + "@types/fhir": "npm:0.0.31" peerDependencies: single-spa: 5.x - checksum: c9f2daf8d10a7c7776af2ea92379c1e18d9ee628cafd0d717e4cefd2107f9c762d0f7acbb19755cb2f6fa9f73b301decf67618cfcbedf89fa24a97e53c2ff661 + checksum: 44ea0a7de3e85a000bf8a52cc6f3699118c16b38b17b4137373edac3efbd8fce837ca81ead9b930dfd3c40682daf8c190841b4cf204a28f043e5dbfba86207ef languageName: node linkType: hard -"@openmrs/esm-navigation@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-navigation@npm:5.4.1-pre.1592" +"@openmrs/esm-navigation@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-navigation@npm:5.6.1-pre.1920" dependencies: path-to-regexp: "npm:6.1.0" peerDependencies: "@openmrs/esm-state": 5.x - checksum: 948fd7990a9a7c3b08f330e2aa0e08cd0e9f4ffa3b83560cbdd6916cd24023c2fcc0299bea8887dfe07b50cdd17f699adf18d76e712ec3899e07e7b5d871703e + checksum: 64764c7820d0a518e588a8f33ebe5704fb0bbd8a26f10272ec5ae7434c4d14ad814d2db623abc5114ad7ee0fc89528451ec7c2a98e6f530409d538a3db721861 languageName: node linkType: hard -"@openmrs/esm-offline@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-offline@npm:5.4.1-pre.1592" +"@openmrs/esm-offline@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-offline@npm:5.6.1-pre.1920" dependencies: dexie: "npm:^3.0.3" lodash-es: "npm:^4.17.21" @@ -3144,15 +3142,14 @@ __metadata: "@openmrs/esm-api": 5.x "@openmrs/esm-globals": 5.x "@openmrs/esm-state": 5.x - "@openmrs/esm-styleguide": 5.x rxjs: 6.x - checksum: 2da01830be4ee8585ea99a24fd213e286da370fdaed14941edac945a59a37a255a32e84d4902668e45592e4b2c2d75b23d27662f7aba9891009e63b5962874de + checksum: 7a74d5946607bfe945886006bd4ef2743b5044fd15949eff3ebf72e2e3655219268de08e6ab9368b580f3e33fda9841743f016aaf100f41ae83b1548828cfd9e languageName: node linkType: hard "@openmrs/esm-patient-common-lib@npm:next": - version: 7.0.2-pre.3907 - resolution: "@openmrs/esm-patient-common-lib@npm:7.0.2-pre.3907" + version: 8.0.2-pre.4718 + resolution: "@openmrs/esm-patient-common-lib@npm:8.0.2-pre.4718" dependencies: "@carbon/react": "npm:^1.12.0" lodash-es: "npm:^4.17.21" @@ -3161,58 +3158,61 @@ __metadata: "@openmrs/esm-framework": 5.x react: 18.x single-spa: 6.x - checksum: 4cb67ef137936ca83ddca6b754077aeb1995be4f5c92461a6db73ac3c9d4a4e6e626dab7787aa38461bd2c5903a79cbb9238c719c3a3e05177717bb43c505f82 + checksum: 2c4786fa2aad9da067dfa43462e7fd29a14a06eac43ceb7495dc9220e683ce219a7b201ed9ed1eb7c947d02a048d4da2d529d5a4e8a97c1bc9f857979940eed8 languageName: node linkType: hard -"@openmrs/esm-react-utils@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-react-utils@npm:5.4.1-pre.1592" +"@openmrs/esm-react-utils@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-react-utils@npm:5.6.1-pre.1920" dependencies: lodash-es: "npm:^4.17.21" single-spa-react: "npm:^6.0.0" peerDependencies: "@openmrs/esm-api": 5.x "@openmrs/esm-config": 5.x + "@openmrs/esm-context": 5.x "@openmrs/esm-error-handling": 5.x "@openmrs/esm-extensions": 5.x + "@openmrs/esm-feature-flags": 5.x "@openmrs/esm-globals": 5.x "@openmrs/esm-navigation": 5.x + "@openmrs/esm-utils": 5.x dayjs: 1.x - i18next: 19.x + i18next: 21.x react: 18.x react-dom: 18.x react-i18next: 11.x rxjs: 6.x swr: 2.x - checksum: 85543b1064fb44fa5ea28a19d1222efc95cbe5f2751eec2e4c8bc721c11f32c4db1b3c6b763e7cdd9e63bc8591aa471bb6a16616fdf38d4b72c6878f8d6b2d41 + checksum: bcbb1076aa0dccb8c2dfed5dbd03a876fa2ac1ee8d854b6497e181ac65f844029b81929b0edba9d24a4264145307df8c712443e3cda8430c4680c829f76d8145 languageName: node linkType: hard -"@openmrs/esm-routes@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-routes@npm:5.4.1-pre.1592" +"@openmrs/esm-routes@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-routes@npm:5.6.1-pre.1920" peerDependencies: "@openmrs/esm-globals": 5.x "@openmrs/esm-utils": 5.x - checksum: d30f49230b951e210b21b26556a2d55942592c312379e9df81fb984503397f5b21ab0712f623c9245031e2d58a0d08ad9880d537b17d1f75b711fc04a37be9d8 + checksum: 0f3d230c8f8b91bb63d9a063007395d13acd2b37889661ac927c15718f385c9585c5f06dd61e67620721e8167a10c285aeae67afe9f4a6c5bdf9bc78bacdc0e3 languageName: node linkType: hard -"@openmrs/esm-state@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-state@npm:5.4.1-pre.1592" +"@openmrs/esm-state@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-state@npm:5.6.1-pre.1920" dependencies: zustand: "npm:^4.3.6" peerDependencies: "@openmrs/esm-globals": 5.x - checksum: d33f5527a42ea9653b431b31b788bbc62d07ff648d35bd0f0a61a52187f0877b26f7134f5e34c1f2fe38724e7ffe8e026571f07ed0dc5adc80d669ffb29cbd33 + checksum: 226878ceec66264e57aa6345eafcb1a918ec50b51445c991aebaf54c686ce8f5301feece2c7b40e230636867418e2042d1669c825897c9ba292699fbb6efe15b languageName: node linkType: hard -"@openmrs/esm-styleguide@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-styleguide@npm:5.4.1-pre.1592" +"@openmrs/esm-styleguide@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-styleguide@npm:5.6.1-pre.1920" dependencies: "@carbon/charts": "npm:^1.12.0" "@carbon/react": "npm:~1.37.0" @@ -3220,31 +3220,50 @@ __metadata: "@react-spectrum/datepicker": "npm:^3.8.0" "@react-spectrum/provider": "npm:^3.9.0" "@react-spectrum/theme-default": "npm:^3.5.6" + core-js-pure: "npm:^3.36.0" d3: "npm:^7.8.0" + geopattern: "npm:^1.2.3" lodash-es: "npm:^4.17.21" + react-avatar: "npm:^5.0.3" peerDependencies: + "@openmrs/esm-error-handling": 5.x "@openmrs/esm-extensions": 5.x - "@openmrs/esm-framework": 5.x + "@openmrs/esm-navigation": 5.x "@openmrs/esm-react-utils": 5.x "@openmrs/esm-state": 5.x + "@openmrs/esm-translations": 5.x dayjs: 1.x + i18next: 21.x react: 18.x react-dom: 18.x rxjs: 6.x - checksum: 3a94d832aa47e0603a3f147a7354cbdd8649b2f0d47838e17874423246425f0b930b0c0dad9dc78857c62b756cd95fe5ff3d5b2ed4339fd305d826e6fe499ebc + checksum: 2c2d8feaff805b184420e2a8b2a0d34b7a8b7d7823ae52dddc3d291a69b2a5a7da933b967cba7fe54c2b8d660d9f692dbbe2bbd671dd004b530163ccf2ebe293 + languageName: node + linkType: hard + +"@openmrs/esm-translations@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-translations@npm:5.6.1-pre.1920" + dependencies: + i18next: "npm:21.10.0" + peerDependencies: + i18next: 21.x + checksum: bf96daaeea7602bc6f99766e0472d39fdbd8146d712787ccf4d853ba9efb94d7c2fb0ddfda4b81dbaf6b2e46f69a7e15384e4d5d26c8c190e67dcd00704651a1 languageName: node linkType: hard -"@openmrs/esm-utils@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/esm-utils@npm:5.4.1-pre.1592" +"@openmrs/esm-utils@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/esm-utils@npm:5.6.1-pre.1920" dependencies: + "@internationalized/date": "npm:^3.5.0" semver: "npm:7.3.2" peerDependencies: + "@openmrs/esm-globals": 5.x dayjs: 1.x - i18next: 19.x + i18next: 21.x rxjs: 6.x - checksum: eec5a59e5f3c9b63d6704e0dba6aea9b4fd8d7ff70333d443804bba816aaee6c3d76cf551da165e5c38f55e2cdae37bd127023749a2bfa33bf8693eba0bdbd86 + checksum: f186eddaf2f651639e04bb339f48180d2f9d5f97084dcbfcd3125172a79695dfb574eec0570836c847272b9ac288e2e385886a1f9815c6cc6b8c2caf787c413d languageName: node linkType: hard @@ -3276,9 +3295,9 @@ __metadata: languageName: node linkType: hard -"@openmrs/webpack-config@npm:5.4.1-pre.1592": - version: 5.4.1-pre.1592 - resolution: "@openmrs/webpack-config@npm:5.4.1-pre.1592" +"@openmrs/webpack-config@npm:5.6.1-pre.1920": + version: 5.6.1-pre.1920 + resolution: "@openmrs/webpack-config@npm:5.6.1-pre.1920" dependencies: "@swc/core": "npm:^1.3.58" clean-webpack-plugin: "npm:^4.0.0" @@ -3295,7 +3314,7 @@ __metadata: webpack-stats-plugin: "npm:^1.0.3" peerDependencies: webpack: 5.x - checksum: 0eab1ab88d23d0ce82f9ab0e2f99bf1947bf8b590f534b558ccd001b36a6450eb7aa19779f9b822a32e17ef14003616ea5fd42405a66b1433a35f40f4ea568ae + checksum: e0c638b825f672f88a12d2a7d080103815c8507bfb840d63a02ad7733f3f93d69264204447abb54b7d78bc8af410174a4490f123ff0b09a124d838d48b66dcef languageName: node linkType: hard @@ -6720,6 +6739,13 @@ __metadata: languageName: node linkType: hard +"charenc@npm:0.0.2": + version: 0.0.2 + resolution: "charenc@npm:0.0.2" + checksum: 81dcadbe57e861d527faf6dd3855dc857395a1c4d6781f4847288ab23cffb7b3ee80d57c15bba7252ffe3e5e8019db767757ee7975663ad2ca0939bb8fcaf2e5 + languageName: node + linkType: hard + "cheerio-select@npm:^2.1.0": version: 2.1.0 resolution: "cheerio-select@npm:2.1.0" @@ -7282,6 +7308,13 @@ __metadata: languageName: node linkType: hard +"core-js-pure@npm:^3.36.0": + version: 3.37.1 + resolution: "core-js-pure@npm:3.37.1" + checksum: c683d4e46c4e4b9573f471a8229d972f9531a27e718453dfae601f1c104a2c905c3fe4e85ea3db449e364c573ecbe8801a08a3ffe88177df8dd8f8ea9af2cf81 + languageName: node + linkType: hard + "core-util-is@npm:~1.0.0": version: 1.0.3 resolution: "core-util-is@npm:1.0.3" @@ -7355,6 +7388,13 @@ __metadata: languageName: node linkType: hard +"crypt@npm:0.0.2": + version: 0.0.2 + resolution: "crypt@npm:0.0.2" + checksum: 2c72768de3d28278c7c9ffd81a298b26f87ecdfe94415084f339e6632f089b43fe039f2c93f612bcb5ffe447238373d93b2e8c90894cba6cfb0ac7a74616f8b9 + languageName: node + linkType: hard + "crypto-random-string@npm:^2.0.0": version: 2.0.0 resolution: "crypto-random-string@npm:2.0.0" @@ -9244,6 +9284,13 @@ __metadata: languageName: node linkType: hard +"extend@npm:~1.2.1": + version: 1.2.1 + resolution: "extend@npm:1.2.1" + checksum: bfebc6fd4d924f9a8872cfebbda8fc543bae58ca3ec7fe7a5189a706402bd465559b82a106db589088d60e8348e04d8597a1d3760cb5e3d8cf184bcd924ac569 + languageName: node + linkType: hard + "external-editor@npm:^3.0.3": version: 3.1.0 resolution: "external-editor@npm:3.1.0" @@ -9755,6 +9802,15 @@ __metadata: languageName: node linkType: hard +"geopattern@npm:^1.2.3": + version: 1.2.3 + resolution: "geopattern@npm:1.2.3" + dependencies: + extend: "npm:~1.2.1" + checksum: 75a2a7149b4615ec59ed89613155c8252d758de49a52aa3ac45398c83d821b6fe0db3252e573b9117f4e56530745a17f1ac666c484709a467da08c6a59aa7cda + languageName: node + linkType: hard + "get-caller-file@npm:^2.0.5": version: 2.0.5 resolution: "get-caller-file@npm:2.0.5" @@ -10421,7 +10477,7 @@ __metadata: languageName: node linkType: hard -"i18next@npm:^21.10.0, i18next@npm:^21.2.0": +"i18next@npm:21.10.0, i18next@npm:^21.10.0, i18next@npm:^21.2.0": version: 21.10.0 resolution: "i18next@npm:21.10.0" dependencies: @@ -10512,6 +10568,13 @@ __metadata: languageName: node linkType: hard +"immer@npm:^10.0.4": + version: 10.1.1 + resolution: "immer@npm:10.1.1" + checksum: 9dacf1e8c201d69191ccd88dc5d733bafe166cd45a5a360c5d7c88f1de0dff974a94114d72b35f3106adfe587fcfb131c545856184a2247d89d735ad25589863 + languageName: node + linkType: hard + "immutable@npm:^4.0.0": version: 4.1.0 resolution: "immutable@npm:4.1.0" @@ -10766,7 +10829,7 @@ __metadata: languageName: node linkType: hard -"is-buffer@npm:^1.1.5": +"is-buffer@npm:^1.1.5, is-buffer@npm:~1.1.6": version: 1.1.6 resolution: "is-buffer@npm:1.1.6" checksum: f63da109e74bbe8947036ed529d43e4ae0c5fcd0909921dce4917ad3ea212c6a87c29f525ba1d17c0858c18331cf1046d4fc69ef59ed26896b25c8288a627133 @@ -11006,6 +11069,13 @@ __metadata: languageName: node linkType: hard +"is-retina@npm:^1.0.3": + version: 1.0.3 + resolution: "is-retina@npm:1.0.3" + checksum: 7f8306095851aaa55d7dd4a2edffb53942f45388d4d19299a788ca7d30f9f2b7ae0884237b2262a5f8a6d9d5f57e934da3fdbec60b174469054ef080ac29012f + languageName: node + linkType: hard + "is-set@npm:^2.0.1, is-set@npm:^2.0.2": version: 2.0.2 resolution: "is-set@npm:2.0.2" @@ -12401,6 +12471,17 @@ __metadata: languageName: node linkType: hard +"md5@npm:^2.0.0": + version: 2.3.0 + resolution: "md5@npm:2.3.0" + dependencies: + charenc: "npm:0.0.2" + crypt: "npm:0.0.2" + is-buffer: "npm:~1.1.6" + checksum: 88dce9fb8df1a084c2385726dcc18c7f54e0b64c261b5def7cdfe4928c4ee1cd68695c34108b4fab7ecceb05838c938aa411c6143df9fdc0026c4ddb4e4e72fa + languageName: node + linkType: hard + "mdast-util-definitions@npm:^5.0.0": version: 5.1.1 resolution: "mdast-util-definitions@npm:5.1.1" @@ -13537,12 +13618,11 @@ __metadata: linkType: hard "openmrs@npm:next": - version: 5.4.1-pre.1592 - resolution: "openmrs@npm:5.4.1-pre.1592" + version: 5.6.1-pre.1920 + resolution: "openmrs@npm:5.6.1-pre.1920" dependencies: - "@carbon/icons-react": "npm:11.26.0" - "@openmrs/esm-app-shell": "npm:5.4.1-pre.1592" - "@openmrs/webpack-config": "npm:5.4.1-pre.1592" + "@openmrs/esm-app-shell": "npm:5.6.1-pre.1920" + "@openmrs/webpack-config": "npm:5.6.1-pre.1920" "@pnpm/npm-conf": "npm:^2.1.0" "@swc/core": "npm:^1.3.58" autoprefixer: "npm:^10.4.2" @@ -13562,6 +13642,7 @@ __metadata: postcss: "npm:^8.4.6" postcss-loader: "npm:^6.2.1" rimraf: "npm:^3.0.2" + semver: "npm:^7.3.4" swc-loader: "npm:^0.2.3" tar: "npm:^6.0.5" typescript: "npm:^4.6.4" @@ -13573,7 +13654,7 @@ __metadata: yargs: "npm:^17.6.2" bin: openmrs: ./dist/cli.js - checksum: 6a02311734010b6695d58a21785528b3ec168145cdd935c6949e93540e243b02ba6bb062927e1a99250643a7638fbc8eef620fd7ca6b0abf81473716f63bfcfe + checksum: f4204f437215e75424db49f6b267fe9e88bab511e5bd7de8ee3f5ca312d0e02afd2116975e86618f6ee3547bf2824f3b7bbbfba0c15e822a046d057d3c45858b languageName: node linkType: hard @@ -14812,6 +14893,21 @@ __metadata: languageName: node linkType: hard +"react-avatar@npm:^5.0.3": + version: 5.0.3 + resolution: "react-avatar@npm:5.0.3" + dependencies: + is-retina: "npm:^1.0.3" + md5: "npm:^2.0.0" + peerDependencies: + "@babel/runtime": ">=7" + core-js-pure: ">=3" + prop-types: ^15.0.0 || ^16.0.0 + react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + checksum: cdbb231d7d19cd3890873b465affe984aa006341c8b6130a670bfe406461665fb8f5607e0c3d7650aa4ec43b96acdad0b572b760e16c2cc41ddc15986aac7590 + languageName: node + linkType: hard + "react-dom@npm:^18.1.0, react-dom@npm:^18.2.0": version: 18.2.0 resolution: "react-dom@npm:18.2.0" @@ -15921,10 +16017,10 @@ __metadata: languageName: node linkType: hard -"single-spa@npm:^6.0.0": - version: 6.0.0 - resolution: "single-spa@npm:6.0.0" - checksum: e61f6b83f5b200fc093fce41ed2704b631c53d3214fef77342571ee9aadf903131c9aedec80568424ba23fa794b97bc74cbdb8ac741b19ad44a1c2cb1628a462 +"single-spa@npm:^6.0.1": + version: 6.0.1 + resolution: "single-spa@npm:6.0.1" + checksum: 6c192226c0c6d94dbb0d2576c6552ebb9ec01ecad69d069cac47ddd5aa3c2c90e1370765e2d0e36203120a2c48bb7e967e2d6d8a6f9ede4315fd4b9e11cd9e85 languageName: node linkType: hard From c7f79fcf57e86943238a914ccec46a6ff3721395 Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Thu, 20 Jun 2024 17:20:29 +0300 Subject: [PATCH 18/24] Updates package versions in prep for 2.3.4 release --- package.json | 2 +- packages/esm-cervical-cancer-app/package.json | 2 +- packages/esm-commons-lib/package.json | 2 +- packages/esm-covid-app/package.json | 2 +- packages/esm-form-render-app/package.json | 2 +- packages/esm-hiv-app/package.json | 2 +- packages/esm-ohri-core-app/package.json | 2 +- packages/esm-ohri-pmtct-app/package.json | 2 +- packages/esm-opd-app/package.json | 2 +- packages/esm-tb-app/package.json | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 0c7b21bef..43498a25e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@ohri/openmrs-esm-ohri", "private": true, - "version": "2.3.3", + "version": "2.3.4", "description": "OHRI MicroFrontend for OpenMRS SPA", "workspaces": [ "packages/*" diff --git a/packages/esm-cervical-cancer-app/package.json b/packages/esm-cervical-cancer-app/package.json index 40dcb1901..ec2c7606a 100644 --- a/packages/esm-cervical-cancer-app/package.json +++ b/packages/esm-cervical-cancer-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-cervical-cancer-app", - "version": "2.3.3", + "version": "2.3.4", "description": "Cervical cancer microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/openmrs-esm-ohri-cervical-cancer-app.js", "main": "src/index.ts", diff --git a/packages/esm-commons-lib/package.json b/packages/esm-commons-lib/package.json index 3c7d04c71..950c137e5 100644 --- a/packages/esm-commons-lib/package.json +++ b/packages/esm-commons-lib/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-commons-lib", - "version": "2.3.3", + "version": "2.3.4", "description": "Commons library microfrontend of shared assets for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/ohri-commons-lib.js", "main": "src/index.ts", diff --git a/packages/esm-covid-app/package.json b/packages/esm-covid-app/package.json index 53109d1fe..a342bbc95 100644 --- a/packages/esm-covid-app/package.json +++ b/packages/esm-covid-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-covid-app", - "version": "2.3.3", + "version": "2.3.4", "description": "COVID Microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/openmrs-esm-ohri-covid-app.js", "main": "src/index.ts", diff --git a/packages/esm-form-render-app/package.json b/packages/esm-form-render-app/package.json index b35e6f1dd..4acaa8ecd 100644 --- a/packages/esm-form-render-app/package.json +++ b/packages/esm-form-render-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-form-render-app", - "version": "2.3.3", + "version": "2.3.4", "description": "A Forms Rendering microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/openmrs-esm-ohri-form-render-app.js", "main": "src/index.ts", diff --git a/packages/esm-hiv-app/package.json b/packages/esm-hiv-app/package.json index 917211b4a..2a4b2f079 100644 --- a/packages/esm-hiv-app/package.json +++ b/packages/esm-hiv-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-hiv-app", - "version": "2.3.3", + "version": "2.3.4", "description": "HIV microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/openmrs-esm-ohri-hiv-app.js", "main": "src/index.ts", diff --git a/packages/esm-ohri-core-app/package.json b/packages/esm-ohri-core-app/package.json index d053e99d6..2e1f198d5 100644 --- a/packages/esm-ohri-core-app/package.json +++ b/packages/esm-ohri-core-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-core-app", - "version": "2.3.3", + "version": "2.3.4", "description": "A custom microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/ohri-core-app.js", "main": "src/index.ts", diff --git a/packages/esm-ohri-pmtct-app/package.json b/packages/esm-ohri-pmtct-app/package.json index 0412ae703..21fe00252 100644 --- a/packages/esm-ohri-pmtct-app/package.json +++ b/packages/esm-ohri-pmtct-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-pmtct-app", - "version": "2.3.3", + "version": "2.3.4", "description": "PMTCT microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/ohri-pmtct-app.js", "main": "src/index.ts", diff --git a/packages/esm-opd-app/package.json b/packages/esm-opd-app/package.json index e19125bda..5eb83c872 100644 --- a/packages/esm-opd-app/package.json +++ b/packages/esm-opd-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-opd-app", - "version": "2.3.3", + "version": "2.3.4", "description": "opd active visits", "browser": "dist/openmrs-esm-ohri-opd-app.js", "main": "src/index.ts", diff --git a/packages/esm-tb-app/package.json b/packages/esm-tb-app/package.json index 4a4d27ba0..d1ed96c52 100644 --- a/packages/esm-tb-app/package.json +++ b/packages/esm-tb-app/package.json @@ -1,6 +1,6 @@ { "name": "@ohri/openmrs-esm-ohri-tb-app", - "version": "2.3.3", + "version": "2.3.4", "description": "Tuberclosis microfrontend for OpenMRS HIV Reference Implementation (OHRI)", "browser": "dist/openmrs-esm-ohri-tb-app.js", "main": "src/index.ts", From 3573ce4753109cc026b5fbb24590484144016830 Mon Sep 17 00:00:00 2001 From: Jovan Ssebaggala Date: Tue, 25 Jun 2024 14:37:19 +0300 Subject: [PATCH 19/24] Add encounter list refactors --- .../encounter-list.component.tsx | 28 +++++++++++++------ .../src/hooks/useEncounterRows.ts | 10 +++++-- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx b/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx index 3a8b3d053..4c4352a33 100644 --- a/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx +++ b/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx @@ -13,7 +13,6 @@ import { useEncounterRows } from '../../hooks/useEncounterRows'; import { OpenmrsEncounter } from '../../api/types'; import { useFormsJson } from '../../hooks/useFormsJson'; import { usePatientDeathStatus } from '../../hooks/usePatientDeathStatus'; -import { mutate } from 'swr'; export interface EncounterListColumn { key: string; @@ -42,6 +41,7 @@ export interface EncounterListProps { workspaceWindowSize?: 'minimized' | 'maximized'; }; filter?: (encounter: any) => boolean; + afterFormSaveAction?: () => void; } export const EncounterList: React.FC = ({ @@ -53,6 +53,7 @@ export const EncounterList: React.FC = ({ formList, filter, launchOptions, + afterFormSaveAction, }) => { const { t } = useTranslation(); const [paginatedRows, setPaginatedRows] = useState([]); @@ -63,7 +64,12 @@ export const EncounterList: React.FC = ({ const { isDead } = usePatientDeathStatus(patientUuid); const formNames = useMemo(() => formList.map((form) => form.name), []); const { formsJson, isLoading: isLoadingFormsJson } = useFormsJson(formNames); - const { encounters, isLoading, onFormSave } = useEncounterRows(patientUuid, encounterType, filter); + const { encounters, isLoading, onFormSave } = useEncounterRows( + patientUuid, + encounterType, + filter, + afterFormSaveAction, + ); const { moduleName, workspaceWindowSize, displayText, hideFormLauncher } = launchOptions; const defaultActions = useMemo( @@ -120,10 +126,14 @@ export const EncounterList: React.FC = ({ kind: 'error', }); }); + + // Update encounters after deletion + const updatedEncounters = encounters.filter((enc) => enc.uuid !== encounterUuid); + constructPaginatedTableRows(updatedEncounters, currentPage, pageSize); close(); }, }); - }, []) + }, []); useEffect(() => { if (!isLoadingFormsJson) { @@ -218,15 +228,15 @@ export const EncounterList: React.FC = ({ // If custom config is available, generate actions accordingly; otherwise, fallback to the default actions. const actions = tableRow.actions?.length ? tableRow.actions : defaultActions; tableRow['actions'] = ( - + {actions.map((actionItem, index) => ( { e.preventDefault(); - actionItem.mode == 'delete' ? - handleDeleteEncounter(encounter.uuid, encounter.encounterType.name) + actionItem.mode == 'delete' + ? handleDeleteEncounter(encounter.uuid, encounter.encounterType.name) : launchEncounterForm( forms.find((form) => form.name == actionItem?.form?.name), moduleName, @@ -237,7 +247,7 @@ export const EncounterList: React.FC = ({ actionItem.intent, workspaceWindowSize, patientUuid, - ); + ); }} /> ))} @@ -247,7 +257,7 @@ export const EncounterList: React.FC = ({ }); setPaginatedRows(rows); }, - [columns, defaultActions, forms, moduleName, workspaceWindowSize, patientUuid, onFormSave], + [columns, defaultActions, forms, moduleName, onFormSave, workspaceWindowSize, patientUuid, handleDeleteEncounter], ); useEffect(() => { @@ -260,7 +270,7 @@ export const EncounterList: React.FC = ({ if (forms.length == 1 && !forms[0]['availableIntents']?.length) { // we only have one form with no intents // just return the "Add" button - return ( + return (