-
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
- Loading branch information
Showing
11 changed files
with
326 additions
and
1 deletion.
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
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
24 changes: 24 additions & 0 deletions
24
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,24 @@ | ||
import { EmptyStateComingSoon } from '@ohri/openmrs-esm-ohri-commons-lib'; | ||
import React, { useMemo } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
interface OverviewListProps { | ||
patientUuid: string; | ||
} | ||
|
||
const TBSummaryOverviewList: React.FC<OverviewListProps> = ({ patientUuid }) => { | ||
const { t } = useTranslation(); | ||
|
||
const headerRecentTB = t('recentTuberculosis'); | ||
const headerPreviousCases = t('previousCases'); | ||
const headerVisit = t('visits'); | ||
|
||
return ( | ||
<> | ||
<EmptyStateComingSoon displayText={headerRecentTB} headerTitle={headerRecentTB} /> | ||
<EmptyStateComingSoon displayText={headerPreviousCases} headerTitle={headerPreviousCases} /> | ||
<EmptyStateComingSoon displayText={headerVisit} headerTitle={headerVisit} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default TBSummaryOverviewList; |
34 changes: 34 additions & 0 deletions
34
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,34 @@ | ||
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'; | ||
|
||
interface OverviewListProps { | ||
patientUuid: string; | ||
} | ||
|
||
const ProgramManagementSummary: React.FC<OverviewListProps> = ({ patientUuid }) => { | ||
const { t } = useTranslation(); | ||
return ( | ||
<div className={styles.tabContainer}> | ||
<Tabs> | ||
<TabList contained> | ||
<Tab>{t('MdrTbEnrolment')}</Tab> | ||
<Tab>{t('PatientTracing')}</Tab> | ||
</TabList> | ||
<TabPanels> | ||
<TabPanel> | ||
<MdrTbList patientUuid={patientUuid} /> | ||
</TabPanel> | ||
<TabPanel> | ||
<TbPatientTracing patientUuid={patientUuid} /> | ||
</TabPanel> | ||
</TabPanels> | ||
</Tabs> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ProgramManagementSummary; |
20 changes: 20 additions & 0 deletions
20
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,20 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { EmptyStateComingSoon } from '@ohri/openmrs-esm-ohri-commons-lib'; | ||
|
||
interface MdrTbListProps { | ||
patientUuid: string; | ||
} | ||
|
||
const MdrTbList: React.FC<MdrTbListProps> = ({ patientUuid }) => { | ||
const { t } = useTranslation(); | ||
const headerTitle = t('MdrTbEnrolment'); | ||
|
||
return ( | ||
<> | ||
<EmptyStateComingSoon displayText={headerTitle} headerTitle={headerTitle} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default MdrTbList; |
20 changes: 20 additions & 0 deletions
20
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,20 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { EmptyStateComingSoon } from '@ohri/openmrs-esm-ohri-commons-lib'; | ||
|
||
interface TbPatientTracingProps { | ||
patientUuid: string; | ||
} | ||
|
||
const TbPatientTracing: React.FC<TbPatientTracingProps> = ({ patientUuid }) => { | ||
const { t } = useTranslation(); | ||
const headerTitle = t('PatientTracing', 'Patient Tracing'); | ||
|
||
return ( | ||
<> | ||
<EmptyStateComingSoon displayText={headerTitle} headerTitle={headerTitle} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default TbPatientTracing; |
20 changes: 20 additions & 0 deletions
20
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,20 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { EmptyStateComingSoon } from '@ohri/openmrs-esm-ohri-commons-lib'; | ||
|
||
interface TbContactTracingListProps { | ||
patientUuid: string; | ||
} | ||
|
||
const TbContactTracingList: React.FC<TbContactTracingListProps> = ({ patientUuid }) => { | ||
const { t } = useTranslation(); | ||
const headerTitle = t('TbContactListing'); | ||
|
||
return ( | ||
<> | ||
<EmptyStateComingSoon displayText={headerTitle} headerTitle={headerTitle} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default TbContactTracingList; |
20 changes: 20 additions & 0 deletions
20
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,20 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { EmptyStateComingSoon } from '@ohri/openmrs-esm-ohri-commons-lib'; | ||
|
||
interface TbTreatmentFollowUpListProps { | ||
patientUuid: string; | ||
} | ||
|
||
const TbTreatmentFollowUpList: React.FC<TbTreatmentFollowUpListProps> = ({ 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" | ||
} |