Skip to content

Commit

Permalink
Add configs to PMTCT
Browse files Browse the repository at this point in the history
  • Loading branch information
ODORA0 committed Jul 31, 2024
1 parent b515d21 commit 49dc6ac
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const usePatientHtsEncounters = (patientUuid: string) => {
'custom:(uuid,encounterDatetime,location:(uuid,name),' +
'encounterProviders:(uuid,provider:(uuid,name)),' +
'obs:(uuid,obsDatetime,concept:(uuid,name:(uuid,name)),value:(uuid,name:(uuid,name))))';
const antenatalEncounterType = config.encounterTypes.antenatalEncounterType;
const antenatalEncounterType =
config.encounterTypes.antenatalEncounterType || '677d1a80-dbbe-4399-be34-aa7f54f11405';

if (!antenatalEncounterType) {
setIsError(true);
Expand Down Expand Up @@ -51,9 +52,10 @@ const usePatientHivStatus = (patientUuid: string) => {

useEffect(() => {
const fetchHivStatus = async () => {
const hivTestResultConceptUUID = config.obsConcepts.hivTestResultConceptUUID;
const positiveUUID = config.obsConcepts.positiveUUID;
const negativeUUID = config.obsConcepts.negativeUUID;
const hivTestResultConceptUUID =
config.obsConcepts.hivTestResultConceptUUID || '159427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
const positiveUUID = config.obsConcepts.positiveUUID || '138571AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
const negativeUUID = config.obsConcepts.negativeUUID || '664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';

let hivStatus = '';

Expand Down
3 changes: 3 additions & 0 deletions packages/esm-ohri-pmtct-app/src/config-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ export const configSchema = {
outcomeStatus: '160433AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
infantVisitDate: '159599AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
finalTestResults: '164460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
hivTestResultConceptUUID: '159427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
positiveUUID: '138571AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
negativeUUID: '664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
visitDateConcept: '163260AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
hivTestResultConcept: '159427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
artNoConcept: '164402AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
Expand Down
3 changes: 3 additions & 0 deletions packages/esm-ohri-pmtct-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
createNewOHRIDashboardLink,
OHRIHome,
createConditionalDashboardGroup,
PatientStatusBannerTag,
} from '@ohri/openmrs-esm-ohri-commons-lib';
import { configSchema } from './config-schema';
import rootComponent from './root.component';
Expand Down Expand Up @@ -98,3 +99,5 @@ export const maternalChildDashboard = getSyncLifecycle(OHRIHome, {
});

export const ptrackerReportNavLink = getSyncLifecycle(ptrackerdashboardPath, options);

export const patientStatusBannerTagExtension = getSyncLifecycle(PatientStatusBannerTag, options);
5 changes: 5 additions & 0 deletions packages/esm-ohri-pmtct-app/src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
},
"pages": [],
"extensions": [
{
"name": "patient-status-banner-tag",
"slot": "patient-banner-tags-slot",
"component": "patientStatusBannerTagExtension"
},
{
"name": "maternal-child-health-results-summary",
"slot": "homepage-dashboard-slot",
Expand Down

0 comments on commit 49dc6ac

Please sign in to comment.