diff --git a/src/app-menu-navigation/app-menu-navigation.tsx b/src/app-menu-navigation/app-menu-navigation.tsx new file mode 100644 index 0000000..e4a64b2 --- /dev/null +++ b/src/app-menu-navigation/app-menu-navigation.tsx @@ -0,0 +1,16 @@ +import { ConfigurableLink } from "@openmrs/esm-framework"; +import React from "react"; +import { useTranslation } from "react-i18next"; +import { versionTwoPath } from "../constants"; + +const VersionTwoNavigationButton = () => { + const { t } = useTranslation(); + + return ( + + {t("rwandaEmr2", "Rwanda EMR 2.X")} + + ); +}; + +export default VersionTwoNavigationButton; diff --git a/src/common.scss b/src/common.scss index 18bbe32..2f477aa 100644 --- a/src/common.scss +++ b/src/common.scss @@ -1,4 +1,7 @@ @use '@carbon/styles/scss/spacing'; +@use '@carbon/styles/scss/colors'; +@use '@carbon/styles/scss/type'; +@import "~@openmrs/esm-styleguide/src/vars"; @import './root.scss'; // .widgetContainer { @@ -36,3 +39,63 @@ .hivStatusTag { min-width: 80px; } + +.title { + @extend .productiveHeading03; +} + +.cardTitle { + display: flex; + justify-content: space-between; + padding: spacing.$spacing-04 0 spacing.$spacing-04 spacing.$spacing-05; +} + +.cardTitle>h4:after { + content: ""; + display: block; + width: 2rem; + padding-top: 0.188rem; + // border-bottom: 0.375rem solid $brand-teal-01; +} + +.tile { + height: 100%; + padding: 0.5rem; + margin: 0.5rem; + border: solid 1px #e0e0e0; + display: flex; + flex-direction: column; + flex: 1; + background-color: #ffffff; +} + +.tileTitle { + @include type.type-style('label-01'); + display: block; +} + +.tileValue { + display: block; + font-size: 20px; + line-height: 1.29; + color: #161616; + display: block; + margin: 15px 65px 24px 0; +} + +.tileBox { + display: flex; + flex-direction: row; + flex-wrap: wrap; +} + +.tileBoxColumn { + flex: 1 1 100px; + display: flex; + flex-direction: column; + align-items: flex-start; + padding-left: 1rem; +} + + + diff --git a/src/config-schema.ts b/src/config-schema.ts index b81c818..7ee4612 100644 --- a/src/config-schema.ts +++ b/src/config-schema.ts @@ -11,6 +11,7 @@ export const configSchema = { oiEncounterType: "2dc31190-cf0e-4ab0-a5a1-6ad601d6ecc0", imageEncounterType: "74bf4fe6-8fdb-4228-be39-680a93a9cf6d", problemEncounterType: "2dc31190-cf0e-4ab0-a5a1-6ad601d6ecc0", + adultReturnEncountertype: "8d5b2be0-c2cc-11de-8d13-0010c6dffd0f", }, }, obsConcepts: { @@ -32,11 +33,10 @@ export const configSchema = { whoStageConcept: "3cdb3b02-26fe-102b-80cb-0017a47871b2", criteriaConcept: "3ce6d5fc-26fe-102b-80cb-0017a47871b2", imageOrderedConcept: "3cd937e4-26fe-102b-80cb-0017a47871b2", - oiConcept: "", - programStatusConcept: "", - viralLoadConcept: "", + oiConcept: "0ae23a5a-15f5-102d-96e4-000c29c2a5d7", + viralLoadConcept: " 3cd4a882-26fe-102b-80cb-0017a47871b2", vlReasonConcept: "", - lastCd4CountConcept: "", + lastCd4CountConcept: "3ceda710-26fe-102b-80cb-0017a47871b2", artCohortConcept: "", currentRegimenConcept: "", dsdModelConcept: "", diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 0000000..3156b96 --- /dev/null +++ b/src/constants.ts @@ -0,0 +1 @@ +export const versionTwoPath = `/openmrs/`; diff --git a/src/index.ts b/src/index.ts index b31fac7..aed79c4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,6 +14,8 @@ import { import AllEncounters from "./encounters/encounters.component"; import PatientSummary from "./patient-summary/patient-summary.component"; import CareAndTreatment from "./care-and-treatment/care-and-treatment.component"; +import versionTwoNavigationButton from "./app-menu-navigation/app-menu-navigation"; + const moduleName = "@ohri/openmrs-esm-rwanda-app"; const options = { @@ -69,3 +71,8 @@ export const hivProgramManagementSummary = getSyncLifecycle( CareAndTreatment, options ); + +export const versionTwoNavLink = getSyncLifecycle( + versionTwoNavigationButton, + options +); diff --git a/src/patient-summary/patient-summary-config.json b/src/patient-summary/patient-summary-config.json index 1ec2c1a..1605f6f 100644 --- a/src/patient-summary/patient-summary-config.json +++ b/src/patient-summary/patient-summary-config.json @@ -11,7 +11,7 @@ "encounterTypes": [ "visitEncounterType" ], - "concept": "artCohortConcept" + "concept": "15 - May - 2024" }, { "id": "currentRegimen", @@ -19,7 +19,7 @@ "encounterTypes": [ "visitEncounterType" ], - "concept": "currentRegimenConcept" + "concept": "ABC + 3TC + ATVr" }, { "id": "dsdModel", @@ -27,7 +27,7 @@ "encounterTypes": [ "visitEncounterType" ], - "concept": "dsdModelConcept" + "concept": "Community medication distribution" }, { "id": "populationType", @@ -35,7 +35,7 @@ "encounterTypes": [ "visitEncounterType" ], - "concept": "populationTypeConcept" + "concept": "General Population" } ] }, @@ -49,7 +49,7 @@ "encounterTypes": [ "visitEncounterType" ], - "concept": "viralLoadConcept" + "concept": "Undetected" }, { "id": "vlReason", @@ -57,7 +57,7 @@ "encounterTypes": [ "visitEncounterType" ], - "concept": "vlReasonConcept" + "concept": "Routine" }, { "id": "lastCd4Count", @@ -65,7 +65,7 @@ "encounterTypes": [ "visitEncounterType" ], - "concept": "lastCd4CountConcept" + "concept": "252" } ] }, @@ -79,7 +79,7 @@ "encounterTypes": [ "visitEncounterType" ], - "concept": "tbScreeningConcept" + "concept": "Positive" }, { "id": "oi", @@ -87,7 +87,7 @@ "encounterTypes": [ "visitEncounterType" ], - "concept": "oiConcept" + "concept": "None" }, { "id": "nextVisit", @@ -96,7 +96,7 @@ "encounterTypes": [ "visitEncounterType" ], - "concept": "nextVisitConcept" + "concept": "2024-09-01" }, { "id": "programStatus", @@ -104,7 +104,7 @@ "encounterTypes": [ "visitEncounterType" ], - "concept": "programStatusConcept" + "concept": "Active" } ] } diff --git a/src/patient-summary/patient-summary.component.tsx b/src/patient-summary/patient-summary.component.tsx index 1407831..7698067 100644 --- a/src/patient-summary/patient-summary.component.tsx +++ b/src/patient-summary/patient-summary.component.tsx @@ -6,6 +6,8 @@ import { getSummaryCardProps, SummaryCard, } from "@ohri/openmrs-esm-ohri-commons-lib"; +import { Tile } from "@carbon/react"; +import { CardHeader } from "@openmrs/esm-patient-common-lib"; interface PatientSummaryProps { patientUuid: string; @@ -17,13 +19,18 @@ const PatientSummary: React.FC = ({ patientUuid }) => { return ( - {cards.map((cardContent) => ( - + {cards.map((card) => ( + + + + {card.columns.map((column) => ( + + {column.title} + {column.concept} + + ))} + + ))} ); diff --git a/src/root.scss b/src/root.scss index 49d113a..b65de02 100644 --- a/src/root.scss +++ b/src/root.scss @@ -13,3 +13,15 @@ .explainer { margin-bottom: 2rem; } + +.productiveHeading01 { + @include type.type-style("heading-compact-01"); +} + +.productiveHeading02 { + @include type.type-style("heading-compact-02"); +} + +.productiveHeading03 { + @include type.type-style("heading-03"); +} \ No newline at end of file diff --git a/src/routes.json b/src/routes.json index f0f02ce..d68e3a2 100644 --- a/src/routes.json +++ b/src/routes.json @@ -69,6 +69,13 @@ "name": "hiv-patient-program-ext", "slot": "hiv-patient-program-management-slot", "component": "hivProgramManagementSummary" + }, + { + "name": "version-two-link", + "slot": "app-menu-slot", + "component": "versionTwoNavLink", + "online": true, + "offline": true } ] }