-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OHRI-1994 Add TB Program menu and tabs shell on the patient chart (#1695
) * OHRI-1994 Add TB Program menu and tabs shell on the patient chart * PR comments * Use PatientChartProps from commons lib
- Loading branch information
Showing
11 changed files
with
302 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,37 @@ | ||
export const tuberclosisMeta = { | ||
title: 'Tuberclosis', | ||
slotName: 'tuberclosis-slot', | ||
export const tbPatientChartMeta = { | ||
title: 'TB Program', | ||
slotName: 'ohri-tb-slot', | ||
isExpanded: false, | ||
}; | ||
|
||
export const tbPatientSummaryDashboardMeta = { | ||
slot: 'tb-patient-summary-dashboard-slot', | ||
columns: 1, | ||
title: 'Patient Summary', | ||
path: 'tb-patient-summary', | ||
layoutMode: 'anchored', | ||
}; | ||
|
||
export const tbProgramManagementDashboardMeta = { | ||
slot: 'tb-program-management-summary-slot', | ||
columns: 1, | ||
title: 'Program Management', | ||
path: 'tb-program-management', | ||
layoutMode: 'anchored', | ||
}; | ||
|
||
export const tbTreatmentFollowUpDashboardMeta = { | ||
slot: 'tb-treatment-follow-up-summary-slot', | ||
columns: 1, | ||
title: 'Treatment and follow-up', | ||
path: 'tb-treatment-follow-up', | ||
layoutMode: 'anchored', | ||
}; | ||
|
||
export const tbContactListingDashboardMeta = { | ||
slot: 'tb-contact-listing-summary-slot', | ||
columns: 1, | ||
title: 'Tb Contact Listing', | ||
path: 'tb-contact-listing', | ||
layoutMode: 'anchored', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/esm-tb-app/src/views/patient-summary/tb-patient-summary.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { EmptyStateComingSoon, PatientChartProps } from '@ohri/openmrs-esm-ohri-commons-lib'; | ||
import React, { useMemo } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
const TBSummaryOverviewList: React.FC<PatientChartProps> = ({ patientUuid }) => { | ||
const { t } = useTranslation(); | ||
|
||
const headerRecentTB = t('recentTuberculosis', 'Recent Tuberculosis'); | ||
const headerPreviousCases = t('previousCases', 'Previous Cases'); | ||
const headerVisit = t('visits', 'Visits'); | ||
|
||
return ( | ||
<> | ||
<EmptyStateComingSoon displayText={headerRecentTB} headerTitle={headerRecentTB} /> | ||
<EmptyStateComingSoon displayText={headerPreviousCases} headerTitle={headerPreviousCases} /> | ||
<EmptyStateComingSoon displayText={headerVisit} headerTitle={headerVisit} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default TBSummaryOverviewList; |
31 changes: 31 additions & 0 deletions
31
packages/esm-tb-app/src/views/program-management/maternal-health.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 MdrTbList from './tabs/mdr-tb.component'; | ||
import TbPatientTracing from './tabs/tb-patient-tracing.component'; | ||
import { PatientChartProps } from '@ohri/openmrs-esm-ohri-commons-lib'; | ||
|
||
const ProgramManagementSummary: React.FC<PatientChartProps> = ({ patientUuid }) => { | ||
const { t } = useTranslation(); | ||
return ( | ||
<div className={styles.tabContainer}> | ||
<Tabs> | ||
<TabList contained> | ||
<Tab>{t('MdrTbEnrolment', 'TB/MDR TB Enrolment')}</Tab> | ||
<Tab>{t('PatientTracing', 'Patient Tracing')}</Tab> | ||
</TabList> | ||
<TabPanels> | ||
<TabPanel> | ||
<MdrTbList patientUuid={patientUuid} /> | ||
</TabPanel> | ||
<TabPanel> | ||
<TbPatientTracing patientUuid={patientUuid} /> | ||
</TabPanel> | ||
</TabPanels> | ||
</Tabs> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ProgramManagementSummary; |
16 changes: 16 additions & 0 deletions
16
packages/esm-tb-app/src/views/program-management/tabs/mdr-tb.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { EmptyStateComingSoon, PatientChartProps } from '@ohri/openmrs-esm-ohri-commons-lib'; | ||
|
||
const MdrTbList: React.FC<PatientChartProps> = ({ patientUuid }) => { | ||
const { t } = useTranslation(); | ||
const headerTitle = t('MdrTbEnrolment', 'TB/MDR TB Enrolment'); | ||
|
||
return ( | ||
<> | ||
<EmptyStateComingSoon displayText={headerTitle} headerTitle={headerTitle} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default MdrTbList; |
16 changes: 16 additions & 0 deletions
16
packages/esm-tb-app/src/views/program-management/tabs/tb-patient-tracing.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { EmptyStateComingSoon, PatientChartProps } from '@ohri/openmrs-esm-ohri-commons-lib'; | ||
|
||
const TbPatientTracing: React.FC<PatientChartProps> = ({ patientUuid }) => { | ||
const { t } = useTranslation(); | ||
const headerTitle = t('PatientTracing', 'Patient Tracing'); | ||
|
||
return ( | ||
<> | ||
<EmptyStateComingSoon displayText={headerTitle} headerTitle={headerTitle} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default TbPatientTracing; |
16 changes: 16 additions & 0 deletions
16
packages/esm-tb-app/src/views/tb-contact-listing/tb-contact-list.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { EmptyStateComingSoon, PatientChartProps } from '@ohri/openmrs-esm-ohri-commons-lib'; | ||
|
||
const TbContactTracingList: React.FC<PatientChartProps> = ({ patientUuid }) => { | ||
const { t } = useTranslation(); | ||
const headerTitle = t('TbContactListing', 'TB Contact Listing'); | ||
|
||
return ( | ||
<> | ||
<EmptyStateComingSoon displayText={headerTitle} headerTitle={headerTitle} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default TbContactTracingList; |
16 changes: 16 additions & 0 deletions
16
packages/esm-tb-app/src/views/treatment-and-follow-up/tb-treatment-follow-up.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { EmptyStateComingSoon, PatientChartProps } from '@ohri/openmrs-esm-ohri-commons-lib'; | ||
|
||
const TbTreatmentFollowUpList: React.FC<PatientChartProps> = ({ patientUuid }) => { | ||
const { t } = useTranslation(); | ||
const headerTitle = t('TbTreatmentFollowUp'); | ||
|
||
return ( | ||
<> | ||
<EmptyStateComingSoon displayText={headerTitle} headerTitle={headerTitle} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default TbTreatmentFollowUpList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
{ | ||
"tuberclosis": "Tuberclosis" | ||
"tuberclosis": "Tuberclosis", | ||
"MdrTbEnrolment": "TB/MDR TB Enrolment", | ||
"PatientTracing": "Patient Tracing", | ||
"TbTreatmentFollowUp": "TB Follow Up", | ||
"TbContactListing": "TB Contact Listing", | ||
"recentTuberculosis": "Recent Tuberclosis", | ||
"previousCases": "Previous Case", | ||
"visits": "Visits" | ||
} |