Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OHRI-2211: Implement the cervical-cancer app schema based workflow #1857

Merged
merged 4 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"menuId": "cervicalCancer",
"tabDefinitions": [
{
"tabName": "CaCx Registration",
"headerTitle": "CaCx Registration",
"displayText": "CaCx Registration",
"encounterType": "3eb24129-9f7d-4372-a14e-c2cf577e5db1",
"columns": [
{
"id": "screeningDate",
"isDate": true,
"title": "Visit Date",
"concept": "2f256b46-395b-40f8-b93e-3ea68e5531bc"
},
{
"id": "previouslyScreened",
"title": "Previously Screened for CaCx",
"concept": "7cf4c96a-3e68-4ca5-9b49-9148adc6263d"
},
{
"id": "eligibleforScreening",
"title": "Eligible for CaCx Screening",
"concept": "b77ef6d3-4895-4e88-8b17-fa4aff6eba59"
},
{
"id": "actions",
"title": "Actions",
"actionOptions": [
{
"formName": "Cervical Cancer Registration Form",
"package": "cervical-cancer",
"label": "View Details",
"mode": "view"
},
{
"formName": "Cervical Cancer Registration Form",
"package": "cervical-cancer",
"label": "Edit Form",
"mode": "edit"
}
]
}
],
"launchOptions": {
"displayText": "Add",
"moduleName": "@ohri/openmrs-esm-ohri-cervical-cancer-app"
},
"formList": [
{
"name": "Cervical Cancer Registration Form",
"uuid": "12f41bfe-6430-3d8c-9edf-2d1b7c904f0f"
}
]
},
{
"tabName": "CaCx Treatment",
"headerTitle": "CaCx Treatment",
"displayText": "CaCx Treatment",
"encounterType": "60c80941-c3dc-45c6-9b78-c150e0470cbd",
"columns": [
{
"id": "encounterDate",
"isDate": true,
"title": "Visit Date",
"concept": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
},
{
"id": "screeningMethod",
"title": "Screening Method",
"concept": "53ff5cd0-0f37-4190-87b1-9eb439a15e94"
},
{
"id": "screeningResult",
"title": "Screening Results",
"multipleConcepts": ["9096a18e-c009-4f4c-b0ba-0605e0f16578", "159859AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","28bab50e-7ff7-4216-81be-3f7ad05c6547", "cc647244-0826-4d8e-8c5a-d7a371267bf4"],
"useMultipleObs": true
},
{
"id": "cacxTreatment",
"title": "CaCx Treatment",
"concept": "3a8bb4b4-7496-415d-a327-57ae3711d4eb"
},
{
"id": "actions",
"title": "Actions",
"actionOptions": [
{
"formName": "Screening and Cancer Treatment Form",
"package": "cervical-cancer",
"label": "View Details",
"mode": "view"
},
{
"formName": "Screening and Cancer Treatment Form",
"package": "cervical-cancer",
"label": "Edit Forms",
"mode": "edit"
}
]
}
],
"launchOptions": {
"displayText": "Add",
"moduleName": "@ohri/openmrs-esm-ohri-cervical-cancer-app"
},
"formList": [
{
"name": "Screening and Cancer Treatment Form",
"uuid": "9e3ec2a7-ad26-3f43-9677-82e318996eec"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
import React from 'react';
import { Tabs, Tab, TabList, TabPanels, TabPanel } from '@carbon/react';
import { EncounterList, getMenuItemTabConfiguration } from '@ohri/openmrs-esm-ohri-commons-lib';
import cacxConfigSchema from './cacx-config.json';

import styles from '../common.scss';
import { useTranslation } from 'react-i18next';
import { CacxTreatment } from './tabs/cacx-treatment.component';
import { CacxRegistration } from './tabs/cacx-registration.component';

interface OverviewListProps {
patientUuid: string;
}

const CaCxCervicalCancerServices: React.FC<OverviewListProps> = ({ patientUuid }) => {
const { t } = useTranslation();
const tabs = getMenuItemTabConfiguration(cacxConfigSchema);

return (
<div className={styles.tabContainer}>
<Tabs>
<TabList contained>
<Tab className="tab-12rem">{t('cacxRegistration', 'CaCx Registration')}</Tab>
<Tab>{t('cacxTreatment', 'CaCx Treatment')}</Tab>
{tabs.map((tab) => (
<Tab key={tab.name}>{tab.name}</Tab>
))}
</TabList>
<TabPanels>
<TabPanel>
<CacxRegistration patientUuid={patientUuid} />
</TabPanel>
<TabPanel>
<CacxTreatment patientUuid={patientUuid} />
</TabPanel>
{tabs.map((tab) => (
<TabPanel>
<EncounterList
patientUuid={patientUuid}
formList={tab.formList}
columns={tab.columns}
encounterType={tab.encounterType}
launchOptions={tab.launchOptions}
headerTitle={tab.headerTitle}
description={tab.description}
/>
</TabPanel>
))}
</TabPanels>
</Tabs>
</div>
Expand Down

This file was deleted.

This file was deleted.

13 changes: 2 additions & 11 deletions packages/esm-cervical-cancer-app/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{
"actions": "Actions",
"cacxRegistration": "CaCx Registration",
"cacxSummary": "CaCx Summary",
"cacxTreatment": "CaCx Treatment",
"editForm": "Edit Form",
"eligibleforScreening": "Eligible for CaCx Screening",
"previouslyScreened": "Previously Screened for CaCx",
"screeningMethod": "Screening Method",
"screeningResult": "Screening Results",
"viewDetails": "View details",
"visitDate": "Visit Date"
"cacxSummary": "CaCx Summary"

}
Loading
Loading