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-2253 Implement pmtct homepage dashboard workflows #1881

Merged
merged 1 commit into from
Jun 26, 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
2 changes: 1 addition & 1 deletion packages/esm-ohri-pmtct-app/src/api.resource.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { openmrsFetch, getConfig } from '@openmrs/esm-framework';
import { type Patient, type PatientIdentifier, type Relationship } from './types';
import { fetchPatientRelationships } from '@ohri/openmrs-esm-ohri-commons-lib';
import { type Patient, type PatientIdentifier, type Relationship } from './types';

const BASE_WS_API_URL = '/ws/rest/v1/';
const config = await getConfig('@ohri/openmrs-esm-ohri-pmtct-app');
Expand Down
4 changes: 2 additions & 2 deletions packages/esm-ohri-pmtct-app/src/home.component.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { OHRIWelcomeSection } from '@ohri/openmrs-esm-ohri-commons-lib';
import MaternalChildSummaryTiles from './pmtct/summary-tabs/maternal-child-summary-tiles.component';
import MotherChildSummary from './pmtct/summary-tabs/mother-child-summary-tabs.component';
import MaternalChildSummaryTiles from './pmtct/home-dashboard/maternal-child-summary-tiles.component';
import MotherChildSummary from './pmtct/home-dashboard/mother-child-summary-tabs.component';

const Home: React.FC = () => {
return (
Expand Down
6 changes: 3 additions & 3 deletions packages/esm-ohri-pmtct-app/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfigSchema, getAsyncLifecycle, getSyncLifecycle } from '@openmrs/esm-framework';
import MaternalHealthList from './pmtct/maternal-health/maternal-health.component';
import ChildHealthList from './pmtct/child-health/child-health.component';
import MaternalHealthList from './pmtct/patient-chart/maternal-health/maternal-health.component';
import ChildHealthList from './pmtct/patient-chart/child-health/child-health.component';
import {
mchSummaryDashboardMeta,
maternalVisitsDashboardMeta,
Expand Down Expand Up @@ -64,7 +64,7 @@ export const mchSummaryDashboardLink = getSyncLifecycle(
options,
);

export const mchSummaryDashboard = getAsyncLifecycle(() => import('./pmtct/mch-summary/mch-summary.component'), {
export const mchSummaryDashboard = getAsyncLifecycle(() => import('./pmtct/patient-chart/mch-summary/mch-summary.component'), {
featureName: 'mch-summary',
moduleName,
});
Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions packages/esm-ohri-pmtct-app/src/pmtct/common.scss

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React from 'react';
import { Tabs, Tab, TabPanels, TabPanel, TabList } from '@carbon/react';
import { useTranslation } from 'react-i18next';
import { PatientList } from '@ohri/openmrs-esm-ohri-commons-lib';

import styles from '../summary-tabs/ohri-patient-tabs.scss';
import styles from './ohri-patient-tabs.scss';

const MotherChildSummary: React.FC = () => {
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
@use '@carbon/styles/scss/spacing';
@import '../../root.scss';

.widgetContainer {
background-color: $ui-background;
}

.widgetHeaderContainer {
display: flex;
justify-content: space-between;
align-items: center;
padding: spacing.$spacing-04 0 spacing.$spacing-04 spacing.$spacing-05;
}

.widgetHeaderContainer > h4:after {
content: '';
display: block;
width: 2rem;
padding-top: 0.188rem;
border-bottom: 0.375rem solid var(--brand-01);
}

.toggleButtons {
width: fit-content;
margin: 0 spacing.$spacing-03;
}

.searchField {
width: 100%;
max-width: 250px;
border: 0px !important;
}

.searchBox {
width: 100%;
display: flex;
justify-content: right;
}

.container {
margin-top: 16px;
margin-left: inherit;
width: 100%;
overflow-y: hidden;
}

.tabContainer{
margin-top: 16px;
padding-left: 1rem;
background-color: #ffffff;

}

.tabContainer li button{
width: 100% !important;
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"menuId": "childHealth",
"tabDefinitions": [
{
"tabName": "Infant Postnatal Visit",
"headerTitle": "Infant Postnatal Visit",
"displayText": "Infant Postnatal Visit",
"encounterType": "infantPostnatalEncounterType",
"columns": [
{
"id": "pTrackerId",
"title": "PTracker Id",
"concept": "pTrackerIdConcept"
},
{
"id": "mothersName",
"title": "Mothers Name",
"type": "mothersName"
},
{
"id": "artProphylaxisStatus",
"title": "ART Prophylaxis Status",
"concept": "artProphylaxisStatus"
},
{
"id": "linkedToArt",
"title": "Linked to ART",
"concept": "linkedToArt"
},
{
"id": "breastfeedingStatus",
"title": "Breastfeeding status",
"concept": "breastfeedingStatus"
},
{
"id": "outcomeStatus",
"title": "Outcome Status",
"concept": "outcomeStatus"
},
{
"id": "nextVisitDate",
"isDate": true,
"title": "Next visit date",
"concept": "nextVisitDateConcept"
},
{
"id": "actions",
"title": "Actions",
"actionOptions": [
{
"formName": "infantPostnatalFormName",
"package": "pmtct",
"label": "View Details",
"mode": "view"
},
{
"formName": "infantPostnatalFormName",
"package": "pmtct",
"label": "Edit Form",
"mode": "edit"
}
]
}
],
"launchOptions": {
"displayText": "Add",
"moduleName": "@ohri/openmrs-esm-ohri-pmtct-app"
},
"formList": [
{
"name": "infantPostnatalFormName",
"uuid": "infantPostnatalFormUuid"
}
]
}
]
}
39 changes: 39 additions & 0 deletions packages/esm-ohri-pmtct-app/src/pmtct/patient-chart/common.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
@use '@carbon/styles/scss/spacing';
@import '../../root.scss';

.widgetContainer {
background-color: $ui-background;
}

.widgetHeaderContainer {
display: flex;
justify-content: space-between;
align-items: center;
padding: spacing.$spacing-04 0 spacing.$spacing-04 spacing.$spacing-05;
}

.widgetHeaderContainer > h4:after {
content: '';
display: block;
width: 2rem;
padding-top: 0.188rem;
border-bottom: 0.375rem solid var(--brand-01);
}

.toggleButtons {
width: fit-content;
margin: 0 spacing.$spacing-03;
}

.tabContainer div[role='tabpanel'] {
padding: 0 !important;
}

.tabContainer li button {
width: 100% !important;
}


.hivStatusTag {
min-width: 80px;
}
Loading
Loading