@openmrs/esm-patient-chart-app 11.3.1-pre.8925 → 11.3.1-pre.8929
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/dist/3042.js +1 -1
- package/dist/3042.js.map +1 -1
- package/dist/7822.js +1 -0
- package/dist/7822.js.map +1 -0
- package/dist/9206.js +1 -1
- package/dist/9206.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-patient-chart-app.js +1 -1
- package/dist/openmrs-esm-patient-chart-app.js.buildmanifest.json +34 -34
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/src/clinical-views/encounter-tile/encounter-tile.component.tsx +7 -6
- package/src/clinical-views/encounter-tile/tile.scss +0 -1
- package/src/clinical-views/hooks/useLastEncounter.ts +1 -1
- package/src/clinical-views/types.ts +2 -1
- package/src/clinical-views/utils/concept-utils.ts +24 -0
- package/src/clinical-views/utils/index.ts +4 -1
- package/src/config-schema.ts +32 -0
- package/dist/3184.js +0 -1
- package/dist/3184.js.map +0 -1
|
@@ -685,9 +685,9 @@
|
|
|
685
685
|
"initial": false,
|
|
686
686
|
"entry": false,
|
|
687
687
|
"recorded": false,
|
|
688
|
-
"size":
|
|
688
|
+
"size": 111457,
|
|
689
689
|
"sizes": {
|
|
690
|
-
"javascript":
|
|
690
|
+
"javascript": 111457
|
|
691
691
|
},
|
|
692
692
|
"names": [],
|
|
693
693
|
"idHints": [],
|
|
@@ -701,7 +701,7 @@
|
|
|
701
701
|
"auxiliaryFiles": [
|
|
702
702
|
"3042.js.map"
|
|
703
703
|
],
|
|
704
|
-
"hash": "
|
|
704
|
+
"hash": "9c294ee2f30ab691",
|
|
705
705
|
"childrenByOrder": {}
|
|
706
706
|
},
|
|
707
707
|
{
|
|
@@ -750,30 +750,6 @@
|
|
|
750
750
|
"hash": "dbbc54c2d6586a9e",
|
|
751
751
|
"childrenByOrder": {}
|
|
752
752
|
},
|
|
753
|
-
{
|
|
754
|
-
"rendered": true,
|
|
755
|
-
"initial": false,
|
|
756
|
-
"entry": false,
|
|
757
|
-
"recorded": false,
|
|
758
|
-
"size": 65758,
|
|
759
|
-
"sizes": {
|
|
760
|
-
"javascript": 65758
|
|
761
|
-
},
|
|
762
|
-
"names": [],
|
|
763
|
-
"idHints": [],
|
|
764
|
-
"runtime": [
|
|
765
|
-
"@openmrs/esm-patient-chart-app",
|
|
766
|
-
"main"
|
|
767
|
-
],
|
|
768
|
-
"files": [
|
|
769
|
-
"3184.js"
|
|
770
|
-
],
|
|
771
|
-
"auxiliaryFiles": [
|
|
772
|
-
"3184.js.map"
|
|
773
|
-
],
|
|
774
|
-
"hash": "a9785a8c323f277f",
|
|
775
|
-
"childrenByOrder": {}
|
|
776
|
-
},
|
|
777
753
|
{
|
|
778
754
|
"rendered": true,
|
|
779
755
|
"initial": false,
|
|
@@ -1646,6 +1622,30 @@
|
|
|
1646
1622
|
"hash": "ea7039b9a73f2997",
|
|
1647
1623
|
"childrenByOrder": {}
|
|
1648
1624
|
},
|
|
1625
|
+
{
|
|
1626
|
+
"rendered": true,
|
|
1627
|
+
"initial": false,
|
|
1628
|
+
"entry": false,
|
|
1629
|
+
"recorded": false,
|
|
1630
|
+
"size": 66912,
|
|
1631
|
+
"sizes": {
|
|
1632
|
+
"javascript": 66912
|
|
1633
|
+
},
|
|
1634
|
+
"names": [],
|
|
1635
|
+
"idHints": [],
|
|
1636
|
+
"runtime": [
|
|
1637
|
+
"@openmrs/esm-patient-chart-app",
|
|
1638
|
+
"main"
|
|
1639
|
+
],
|
|
1640
|
+
"files": [
|
|
1641
|
+
"7822.js"
|
|
1642
|
+
],
|
|
1643
|
+
"auxiliaryFiles": [
|
|
1644
|
+
"7822.js.map"
|
|
1645
|
+
],
|
|
1646
|
+
"hash": "d0700231b089b50a",
|
|
1647
|
+
"childrenByOrder": {}
|
|
1648
|
+
},
|
|
1649
1649
|
{
|
|
1650
1650
|
"rendered": false,
|
|
1651
1651
|
"initial": false,
|
|
@@ -1836,10 +1836,10 @@
|
|
|
1836
1836
|
"initial": true,
|
|
1837
1837
|
"entry": true,
|
|
1838
1838
|
"recorded": false,
|
|
1839
|
-
"size":
|
|
1839
|
+
"size": 465428,
|
|
1840
1840
|
"sizes": {
|
|
1841
1841
|
"consume-shared": 336,
|
|
1842
|
-
"javascript":
|
|
1842
|
+
"javascript": 439746,
|
|
1843
1843
|
"share-init": 588,
|
|
1844
1844
|
"runtime": 24758
|
|
1845
1845
|
},
|
|
@@ -1856,7 +1856,7 @@
|
|
|
1856
1856
|
"auxiliaryFiles": [
|
|
1857
1857
|
"main.js.map"
|
|
1858
1858
|
],
|
|
1859
|
-
"hash": "
|
|
1859
|
+
"hash": "b09eb6e771989ab3",
|
|
1860
1860
|
"childrenByOrder": {}
|
|
1861
1861
|
},
|
|
1862
1862
|
{
|
|
@@ -1918,9 +1918,9 @@
|
|
|
1918
1918
|
"initial": false,
|
|
1919
1919
|
"entry": false,
|
|
1920
1920
|
"recorded": false,
|
|
1921
|
-
"size":
|
|
1921
|
+
"size": 402124,
|
|
1922
1922
|
"sizes": {
|
|
1923
|
-
"javascript":
|
|
1923
|
+
"javascript": 402040,
|
|
1924
1924
|
"consume-shared": 84
|
|
1925
1925
|
},
|
|
1926
1926
|
"names": [],
|
|
@@ -1934,7 +1934,7 @@
|
|
|
1934
1934
|
"auxiliaryFiles": [
|
|
1935
1935
|
"9206.js.map"
|
|
1936
1936
|
],
|
|
1937
|
-
"hash": "
|
|
1937
|
+
"hash": "146fdd735af99044",
|
|
1938
1938
|
"childrenByOrder": {}
|
|
1939
1939
|
},
|
|
1940
1940
|
{
|
|
@@ -1983,7 +1983,7 @@
|
|
|
1983
1983
|
"auxiliaryFiles": [
|
|
1984
1984
|
"openmrs-esm-patient-chart-app.js.map"
|
|
1985
1985
|
],
|
|
1986
|
-
"hash": "
|
|
1986
|
+
"hash": "f8072fad5d3e1d55",
|
|
1987
1987
|
"childrenByOrder": {}
|
|
1988
1988
|
},
|
|
1989
1989
|
{
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","optionalBackendDependencies":{"emrapi":{"version":"^2.0.0","feature":{"flagName":"emrapi-module","label":"EMR API Module","description":"This module, if installed, provides core EMR business logic."}}},"extensions":[{"name":"charts-summary-dashboard","component":"patientSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":0,"meta":{"slot":"patient-chart-summary-dashboard-slot","path":"Patient Summary"},"online":true,"offline":true},{"name":"encounter-list","component":"encounterListTableTabs","online":true,"offline":true},{"name":"start-visit-button","component":"startVisitActionButton","slot":"patient-actions-slot","online":true,"offline":true},{"name":"clinical-views-summary","component":"clinicalViewsSummary","online":true,"offline":true},{"name":"stop-visit-button","component":"stopVisitActionButton","slot":"patient-actions-slot","online":true,"offline":true},{"name":"mark-alive-button","slot":"patient-actions-slot","component":"markPatientAliveActionButton","online":true,"offline":true},{"name":"stop-visit-button-patient-search","slot":"patient-search-actions-slot","component":"stopVisitPatientSearchActionButton","online":true,"offline":true},{"name":"delete-visit-button","slot":"patient-actions-slot","component":"deleteVisitActionMenuButton","online":true,"offline":true},{"name":"delete-visit-button","slot":"patient-search-actions-slot","component":"deleteVisitActionMenuButton","online":true,"offline":true},{"name":"mark-patient-deceased-button","slot":"patient-actions-slot","component":"markPatientDeceasedActionButton","online":true,"offline":true},{"name":"encounters-summary-dashboard","slot":"patient-chart-dashboard-slot","component":"encountersSummaryDashboardLink","meta":{"slot":"patient-chart-encounters-dashboard-slot","path":"Visits","layoutMode":"anchored"},"order":5,"online":true,"offline":true},{"name":"past-visits-detail-overview","slot":"patient-chart-encounters-dashboard-slot","component":"pastVisitsDetailOverview","order":1,"meta":{"title":"Visits","view":"visits"},"online":true,"offline":true},{"name":"patient-details-tile","slot":"visit-form-header-slot","component":"patientDetailsTile","order":1,"online":true,"offline":true},{"name":"start-visit-button-patient-search","slot":"start-visit-button-slot","component":"startVisitPatientSearchActionButton","online":true,"offline":true},{"name":"visit-attribute-tags","slot":"patient-banner-tags-slot","component":"visitAttributeTags","online":true,"offline":true},{"name":"current-visit-summary","component":"currentVisitSummary","online":true,"offline":true,"meta":{"fullWidth":true}},{"name":"edit-visit-action-button","slot":"visit-detail-overview-actions","component":"editVisitDetailsActionButton","online":true,"offline":true,"order":0},{"name":"delete-visit-action-button","slot":"visit-detail-overview-actions","component":"deleteVisitActionButton","online":true,"offline":true,"order":1},{"name":"active-visit-action-button","slot":"active-visit-actions","component":"activeVisitActionsComponent","online":true,"offline":true,"order":1},{"name":"visit-context-header","slot":"visit-context-header-slot","component":"visitContextHeader"},{"name":"retrospective-date-time-picker","slot":"restrospective-date-time-picker-slot","component":"retrospectiveDateTimePicker"}],"featureFlags":[{"description":"Features to enter data for past visits. Includes the 'Edit Past Visit' button in the start visit dialog, and the 'Add Past Visit' button in the patient header","flagName":"rde","label":"Retrospective Data Entry"},{"description":"When enabled, encounter summaries will display the full form layout instead of a simple observation list.","flagName":"enable-embedded-form-view","label":"Enable Embedded Form View"}],"modals":[{"name":"delete-encounter-modal","component":"deleteEncounterModal"},{"name":"delete-visit-dialog","component":"deleteVisitModal"},{"name":"end-visit-dialog","component":"endVisitModal"},{"name":"mark-patient-alive-modal","component":"markPatientAliveModal"},{"name":"modify-visit-date-dialog","component":"modifyVisitDateModal"},{"name":"start-visit-dialog","component":"startVisitModal"},{"name":"visit-context-switcher","component":"visitContextSwitcherModal"}],"pages":[{"component":"root","routeRegex":"^patient/.+/chart","online":true,"offline":true}],"workspaces":[{"name":"mark-patient-deceased-workspace-form","component":"markPatientDeceasedForm","title":"Mark patient deceased","type":"form"},{"name":"start-visit-workspace-form","component":"startVisitWorkspace","title":"startVisitWorkspaceTitle","type":"start-visit"}],"version":"11.3.1-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","optionalBackendDependencies":{"emrapi":{"version":"^2.0.0","feature":{"flagName":"emrapi-module","label":"EMR API Module","description":"This module, if installed, provides core EMR business logic."}}},"extensions":[{"name":"charts-summary-dashboard","component":"patientSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":0,"meta":{"slot":"patient-chart-summary-dashboard-slot","path":"Patient Summary"},"online":true,"offline":true},{"name":"encounter-list","component":"encounterListTableTabs","online":true,"offline":true},{"name":"start-visit-button","component":"startVisitActionButton","slot":"patient-actions-slot","online":true,"offline":true},{"name":"clinical-views-summary","component":"clinicalViewsSummary","online":true,"offline":true},{"name":"stop-visit-button","component":"stopVisitActionButton","slot":"patient-actions-slot","online":true,"offline":true},{"name":"mark-alive-button","slot":"patient-actions-slot","component":"markPatientAliveActionButton","online":true,"offline":true},{"name":"stop-visit-button-patient-search","slot":"patient-search-actions-slot","component":"stopVisitPatientSearchActionButton","online":true,"offline":true},{"name":"delete-visit-button","slot":"patient-actions-slot","component":"deleteVisitActionMenuButton","online":true,"offline":true},{"name":"delete-visit-button","slot":"patient-search-actions-slot","component":"deleteVisitActionMenuButton","online":true,"offline":true},{"name":"mark-patient-deceased-button","slot":"patient-actions-slot","component":"markPatientDeceasedActionButton","online":true,"offline":true},{"name":"encounters-summary-dashboard","slot":"patient-chart-dashboard-slot","component":"encountersSummaryDashboardLink","meta":{"slot":"patient-chart-encounters-dashboard-slot","path":"Visits","layoutMode":"anchored"},"order":5,"online":true,"offline":true},{"name":"past-visits-detail-overview","slot":"patient-chart-encounters-dashboard-slot","component":"pastVisitsDetailOverview","order":1,"meta":{"title":"Visits","view":"visits"},"online":true,"offline":true},{"name":"patient-details-tile","slot":"visit-form-header-slot","component":"patientDetailsTile","order":1,"online":true,"offline":true},{"name":"start-visit-button-patient-search","slot":"start-visit-button-slot","component":"startVisitPatientSearchActionButton","online":true,"offline":true},{"name":"visit-attribute-tags","slot":"patient-banner-tags-slot","component":"visitAttributeTags","online":true,"offline":true},{"name":"current-visit-summary","component":"currentVisitSummary","online":true,"offline":true,"meta":{"fullWidth":true}},{"name":"edit-visit-action-button","slot":"visit-detail-overview-actions","component":"editVisitDetailsActionButton","online":true,"offline":true,"order":0},{"name":"delete-visit-action-button","slot":"visit-detail-overview-actions","component":"deleteVisitActionButton","online":true,"offline":true,"order":1},{"name":"active-visit-action-button","slot":"active-visit-actions","component":"activeVisitActionsComponent","online":true,"offline":true,"order":1},{"name":"visit-context-header","slot":"visit-context-header-slot","component":"visitContextHeader"},{"name":"retrospective-date-time-picker","slot":"restrospective-date-time-picker-slot","component":"retrospectiveDateTimePicker"}],"featureFlags":[{"description":"Features to enter data for past visits. Includes the 'Edit Past Visit' button in the start visit dialog, and the 'Add Past Visit' button in the patient header","flagName":"rde","label":"Retrospective Data Entry"},{"description":"When enabled, encounter summaries will display the full form layout instead of a simple observation list.","flagName":"enable-embedded-form-view","label":"Enable Embedded Form View"}],"modals":[{"name":"delete-encounter-modal","component":"deleteEncounterModal"},{"name":"delete-visit-dialog","component":"deleteVisitModal"},{"name":"end-visit-dialog","component":"endVisitModal"},{"name":"mark-patient-alive-modal","component":"markPatientAliveModal"},{"name":"modify-visit-date-dialog","component":"modifyVisitDateModal"},{"name":"start-visit-dialog","component":"startVisitModal"},{"name":"visit-context-switcher","component":"visitContextSwitcherModal"}],"pages":[{"component":"root","routeRegex":"^patient/.+/chart","online":true,"offline":true}],"workspaces":[{"name":"mark-patient-deceased-workspace-form","component":"markPatientDeceasedForm","title":"Mark patient deceased","type":"form"},{"name":"start-visit-workspace-form","component":"startVisitWorkspace","title":"startVisitWorkspaceTitle","type":"start-visit"}],"version":"11.3.1-pre.8929"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-patient-chart-app",
|
|
3
|
-
"version": "11.3.1-pre.
|
|
3
|
+
"version": "11.3.1-pre.8929",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Patient dashboard microfrontend for the OpenMRS SPA",
|
|
6
6
|
"browser": "dist/openmrs-esm-patient-chart-app.js",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"swr": "2.x"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@openmrs/esm-patient-common-lib": "11.3.1-pre.
|
|
58
|
+
"@openmrs/esm-patient-common-lib": "11.3.1-pre.8929",
|
|
59
59
|
"@types/uuid": "^9.0.4",
|
|
60
60
|
"webpack": "^5.99.9"
|
|
61
61
|
},
|
|
@@ -5,6 +5,7 @@ import { isNil } from 'lodash-es';
|
|
|
5
5
|
import { useLayoutType } from '@openmrs/esm-framework';
|
|
6
6
|
import { useLastEncounter } from '../hooks';
|
|
7
7
|
import type { EncounterTileColumn, EncounterTileProps } from '../types';
|
|
8
|
+
import { withUnit, getConceptUnitsFromEncounter } from '../utils/concept-utils';
|
|
8
9
|
import styles from './tile.scss';
|
|
9
10
|
|
|
10
11
|
export const EncounterTile = memo(({ patientUuid, columns, headerTitle }: EncounterTileProps) => {
|
|
@@ -41,6 +42,10 @@ const EncounterData: React.FC<{
|
|
|
41
42
|
}> = ({ patientUuid, column }) => {
|
|
42
43
|
const { t } = useTranslation();
|
|
43
44
|
const { lastEncounter, isLoading, error, isValidating } = useLastEncounter(patientUuid, column.encounterTypeUuid);
|
|
45
|
+
const units = getConceptUnitsFromEncounter(lastEncounter, column.concept);
|
|
46
|
+
const summaryUnits = column.summaryConcept?.primaryConcept
|
|
47
|
+
? getConceptUnitsFromEncounter(lastEncounter, column.summaryConcept.primaryConcept)
|
|
48
|
+
: null;
|
|
44
49
|
const obsValue = column.getObsValue(lastEncounter);
|
|
45
50
|
const summaryValue =
|
|
46
51
|
column.hasSummary === true && column.getSummaryObsValue && typeof column.getSummaryObsValue === 'function'
|
|
@@ -64,15 +69,11 @@ const EncounterData: React.FC<{
|
|
|
64
69
|
<>
|
|
65
70
|
<span className={styles.tileTitle}>{t(column.header)}</span>
|
|
66
71
|
{!(obsValue === '--' && summaryValue !== '--' && !isNil(summaryValue)) && (
|
|
67
|
-
<
|
|
68
|
-
<p>{obsValue}</p>
|
|
69
|
-
</span>
|
|
72
|
+
<div className={styles.tileValue}>{withUnit(obsValue, units)}</div>
|
|
70
73
|
)}
|
|
71
74
|
|
|
72
75
|
{!isNil(summaryValue) && summaryValue !== '--' && (
|
|
73
|
-
<
|
|
74
|
-
<p>{summaryValue}</p>
|
|
75
|
-
</span>
|
|
76
|
+
<div className={styles.tileValue}>{withUnit(summaryValue, summaryUnits)}</div>
|
|
76
77
|
)}
|
|
77
78
|
</>
|
|
78
79
|
);
|
|
@@ -5,7 +5,7 @@ import useSWR from 'swr';
|
|
|
5
5
|
const encounterRepresentation =
|
|
6
6
|
'custom:(uuid,encounterDatetime,encounterType,location:(uuid,name),' +
|
|
7
7
|
'patient:(uuid,display,age,identifiers,person),encounterProviders:(uuid,provider:(uuid,name)),' +
|
|
8
|
-
'obs:(uuid,obsDatetime,voided,groupMembers,concept:(uuid,display,name:(uuid,name)),value:(uuid,name:(uuid,name,display),' +
|
|
8
|
+
'obs:(uuid,obsDatetime,voided,groupMembers,concept:(uuid,display,units,name:(uuid,name)),value:(uuid,name:(uuid,name,display),' +
|
|
9
9
|
'names:(uuid,conceptNameType,name,display))),form:(uuid,name))';
|
|
10
10
|
|
|
11
11
|
export function useLastEncounter(patientUuid: string, encounterType: string) {
|
|
@@ -38,7 +38,7 @@ export interface Encounter extends OpenmrsResource {
|
|
|
38
38
|
|
|
39
39
|
export interface Observation {
|
|
40
40
|
uuid: string;
|
|
41
|
-
concept: { uuid: string; name: string };
|
|
41
|
+
concept: { uuid: string; name: string; units?: string };
|
|
42
42
|
value:
|
|
43
43
|
| {
|
|
44
44
|
uuid: string;
|
|
@@ -245,6 +245,7 @@ export interface EncounterTileColumn {
|
|
|
245
245
|
getSummaryObsValue?: (encounter: Encounter) => string;
|
|
246
246
|
encounter?: Encounter;
|
|
247
247
|
hasSummary?: boolean;
|
|
248
|
+
summaryConcept?: SummaryConcept;
|
|
248
249
|
}
|
|
249
250
|
export interface EncounterTileProps {
|
|
250
251
|
patientUuid: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Encounter } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Helper function to extract units from an encounter for a specific concept
|
|
5
|
+
* @param encounter The encounter containing observations
|
|
6
|
+
* @param conceptUuid The concept UUID to find
|
|
7
|
+
* @returns The units string if found
|
|
8
|
+
*/
|
|
9
|
+
export function getConceptUnitsFromEncounter(encounter: Encounter | null, conceptUuid: string): string {
|
|
10
|
+
if (!encounter || !encounter.obs || !conceptUuid) {
|
|
11
|
+
return '';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Find the observation for this concept
|
|
15
|
+
const obs = encounter.obs.find((o) => o.concept?.uuid === conceptUuid);
|
|
16
|
+
|
|
17
|
+
// Return the units if found
|
|
18
|
+
return obs?.concept?.units || '';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const withUnit = (value: string | number, unit: string | null | undefined) => {
|
|
22
|
+
if (!value || value === '--') return value;
|
|
23
|
+
return unit ? `${value} ${unit}` : value;
|
|
24
|
+
};
|
|
@@ -13,6 +13,7 @@ export const getEncounterTileColumns = (tileDefinition: MenuCardProps, config: C
|
|
|
13
13
|
concept: column.concept,
|
|
14
14
|
encounterTypeUuid: column.encounterType,
|
|
15
15
|
hasSummary: column.hasSummary || false,
|
|
16
|
+
summaryConcept: column.summaryConcept,
|
|
16
17
|
getObsValue: (encounter: Encounter) => {
|
|
17
18
|
let obsValue;
|
|
18
19
|
if (column.conceptMappings) {
|
|
@@ -35,7 +36,9 @@ export const getEncounterTileColumns = (tileDefinition: MenuCardProps, config: C
|
|
|
35
36
|
config: config,
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
|
-
return typeof obsValue === 'string' || (typeof obsValue === 'number' && !isNaN(obsValue))
|
|
39
|
+
return typeof obsValue === 'string' || (typeof obsValue === 'number' && !isNaN(obsValue))
|
|
40
|
+
? obsValue
|
|
41
|
+
: obsValue?.name?.name ?? '--';
|
|
39
42
|
},
|
|
40
43
|
getSummaryObsValue: column.hasSummary
|
|
41
44
|
? (encounter: Encounter) => {
|
package/src/config-schema.ts
CHANGED
|
@@ -160,6 +160,29 @@ export const esmPatientChartSchema = {
|
|
|
160
160
|
_description: 'Default concept uuid for other in forms',
|
|
161
161
|
_default: '5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
162
162
|
},
|
|
163
|
+
tileDefinitions: {
|
|
164
|
+
_type: Type.Array,
|
|
165
|
+
_default: [
|
|
166
|
+
{
|
|
167
|
+
title: 'Weight and Height',
|
|
168
|
+
columns: [
|
|
169
|
+
{
|
|
170
|
+
title: 'Weight',
|
|
171
|
+
concept: '5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
172
|
+
encounterType: '67a71486-1a54-468f-ac3e-7091a9a79584',
|
|
173
|
+
hasSummary: true,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
title: 'Height',
|
|
177
|
+
concept: '5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
178
|
+
encounterType: '67a71486-1a54-468f-ac3e-7091a9a79584',
|
|
179
|
+
hasSummary: true,
|
|
180
|
+
},
|
|
181
|
+
],
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
_description: 'Definitions for clinical summary tiles with their concepts and encounter types',
|
|
185
|
+
},
|
|
163
186
|
requireActiveVisitForEncounterTile: {
|
|
164
187
|
_type: Type.Boolean,
|
|
165
188
|
_description: 'Whether to require an active visit for the encounter tile',
|
|
@@ -198,5 +221,14 @@ export interface ChartConfig {
|
|
|
198
221
|
requireActiveVisitForEncounterTile: boolean;
|
|
199
222
|
trueConceptUuid: string;
|
|
200
223
|
falseConceptUuid: string;
|
|
224
|
+
tileDefinitions: Array<{
|
|
225
|
+
title: string;
|
|
226
|
+
columns: Array<{
|
|
227
|
+
title: string;
|
|
228
|
+
concept: string;
|
|
229
|
+
encounterType: string;
|
|
230
|
+
hasSummary?: boolean;
|
|
231
|
+
}>;
|
|
232
|
+
}>;
|
|
201
233
|
otherConceptUuid: string;
|
|
202
234
|
}
|
package/dist/3184.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_chart_app=globalThis.webpackChunk_openmrs_esm_patient_chart_app||[]).push([[3184],{56922:(e,n,t)=>{t.d(n,{A:()=>r});var a=t(30977),i=t.n(a),o=t(95924),l=t.n(o)()(i());l.push([e.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-chart__tile__title___-yHtW{font-size:var(--cds-productive-heading-03-font-size, 1.25rem);font-weight:var(--cds-productive-heading-03-font-weight, 400);line-height:var(--cds-productive-heading-03-line-height, 1.4);letter-spacing:var(--cds-productive-heading-03-letter-spacing, 0)}.-esm-patient-chart__tile__title___-yHtW:after{content:"";display:block;width:2rem;padding-top:.125rem;border-bottom:.5rem solid #007d79}.-esm-patient-chart__tile__tileTitle___1aIXG{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px);font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:#525252;display:block}.-esm-patient-chart__tile__tileValue___fdAwH{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);margin:.75rem 0 .75rem;display:block}.-esm-patient-chart__tile__tileBox___NWMSZ{width:25%;display:flex;flex-direction:row;flex:1;gap:1rem;justify-content:space-around}.-esm-patient-chart__tile__desktopHeading___4ZmcU h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-chart__tile__tabletHeading___YfOsn h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-patient-chart__tile__desktopHeading___4ZmcU,.-esm-patient-chart__tile__tabletHeading___YfOsn{text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-patient-chart__tile__desktopHeading___4ZmcU h4:after,.-esm-patient-chart__tile__tabletHeading___YfOsn h4:after{content:"";display:block;width:2rem;padding-top:.125rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-chart__tile__heading___x9sGK:after{content:"";display:block;width:2rem;padding-top:.125rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-chart__tile__tile___Lthzx{border:1px solid #e0e0e0;margin-bottom:.5rem}[data-extension-id=clinical-views-summary]{height:auto}',"",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/clinical-views/encounter-tile/tile.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,yCC81BI,6DAAA,CAAA,6DAAA,CAAA,6DAAA,CAAA,iEAAA,CD11BJ,+CACE,UAAA,CACA,aAAA,CACA,UE8BW,CF7BX,mBEDW,CFEX,iCAAA,CAGF,6CCk1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CAAA,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CD/0BF,aDZQ,CCaR,aAAA,CAGF,6CC20BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CDz0BF,sBAAA,CACA,aAAA,CAGF,2CACE,SAAA,CACA,YAAA,CACA,kBAAA,CACA,MAAA,CACA,QEHW,CFIX,4BAAA,CAIA,qDC2zBE,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CDzzBA,aDlCM,CCuCR,oDCozBE,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDlzBA,aDzCM,CC6CV,mGAEE,eAAA,CACA,yBAAA,CACA,kBEzBW,CF2BX,qHACE,UAAA,CACA,aAAA,CACA,UEpBS,CFqBT,mBEnDS,CFoDT,2CAAA,CAIJ,iDACE,UAAA,CACA,aAAA,CACA,UE7BW,CF8BX,mBE5DW,CF6DX,2CAAA,CAGF,wCACE,wBAAA,CACA,mBExDW,CF2Db,2CACE,WAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.title {\n @include type.type-style('productive-heading-03');\n}\n\n.title:after {\n content: '';\n display: block;\n width: layout.$spacing-07;\n padding-top: layout.$spacing-01;\n border-bottom: layout.$spacing-03 solid $brand-teal-01;\n}\n\n.tileTitle {\n @include type.type-style('body-long-01');\n @include type.type-style('label-01');\n color: $text-02;\n display: block;\n}\n\n.tileValue {\n @include type.type-style('label-01');\n margin: layout.$spacing-04 0 layout.$spacing-04;\n display: block;\n}\n\n.tileBox {\n width: 25%;\n display: flex;\n flex-direction: row;\n flex: 1;\n gap: layout.$spacing-05;\n justify-content: space-around;\n}\n\n.desktopHeading {\n h4 {\n @include type.type-style('heading-compact-02');\n color: $text-02;\n }\n}\n\n.tabletHeading {\n h4 {\n @include type.type-style('heading-03');\n color: $text-02;\n }\n}\n\n.desktopHeading,\n.tabletHeading {\n text-align: left;\n text-transform: capitalize;\n margin-bottom: layout.$spacing-05;\n\n h4:after {\n content: '';\n display: block;\n width: layout.$spacing-07;\n padding-top: layout.$spacing-01;\n border-bottom: 0.375rem solid var(--brand-03);\n }\n}\n\n.heading:after {\n content: '';\n display: block;\n width: layout.$spacing-07;\n padding-top: layout.$spacing-01;\n border-bottom: 0.375rem solid var(--brand-03);\n}\n\n.tile {\n border: 1px solid $ui-03;\n margin-bottom: layout.$spacing-03;\n}\n\n[data-extension-id='clinical-views-summary'] {\n height: auto;\n}\n","//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n// stylelint-disable number-max-precision\n\n@use 'sass:map';\n@use 'sass:math';\n@use '@carbon/grid/scss/config' as gridconfig;\n@use '@carbon/grid/scss/breakpoint' as grid;\n@use 'prefix' as *;\n@use 'font-family';\n@use 'scale';\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-01: (\n font-size: scale.type-scale(1),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-01: $body-short-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-01: $body-long-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-02: $body-short-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-02: $body-long-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-01: $productive-heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-02: $productive-heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-03: $productive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-04: $productive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-05: $productive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-06: $productive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: scale.type-scale(12),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-07: $productive-heading-07 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(5),\n line-height: 1.4,\n ),\n max: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-03: $expressive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n font-weight: font-family.font-weight('regular'),\n ),\n max: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-04: $expressive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n font-weight: font-family.font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-05: $expressive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-06: $expressive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: scale.type-scale(6),\n font-weight: font-family.font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-paragraph-01: $expressive-paragraph-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(5),\n ),\n lg: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-01: $quotation-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-02: $quotation-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-01: $display-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-02: $display-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(12),\n line-height: 1.18,\n ),\n lg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(16),\n line-height: 1.11,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-03: $display-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: scale.type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-04: $display-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n caption-02: $caption-02,\n label-01: $label-01,\n label-02: $label-02,\n helper-text-01: $helper-text-01,\n helper-text-02: $helper-text-02,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n // V11 Tokens\n legal-01: $legal-01,\n legal-02: $legal-02,\n body-compact-01: $body-compact-01,\n body-compact-02: $body-compact-02,\n heading-compact-01: $heading-compact-01,\n heading-compact-02: $heading-compact-02,\n body-01: $body-01,\n body-02: $body-02,\n heading-03: $heading-03,\n heading-04: $heading-04,\n heading-05: $heading-05,\n heading-06: $heading-06,\n heading-07: $heading-07,\n fluid-heading-03: $fluid-heading-03,\n fluid-heading-04: $fluid-heading-04,\n fluid-heading-05: $fluid-heading-05,\n fluid-heading-06: $fluid-heading-06,\n fluid-paragraph-01: $fluid-paragraph-01,\n fluid-quotation-01: $fluid-quotation-01,\n fluid-quotation-02: $fluid-quotation-02,\n fluid-display-01: $fluid-display-01,\n fluid-display-02: $fluid-display-02,\n fluid-display-03: $fluid-display-03,\n fluid-display-04: $fluid-display-04,\n) !default;\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return math.div($value, $value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map.remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map.get($type-styles, breakpoints) {\n @include grid.breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map.get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map.get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map.remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map.get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map.get($type-styles, font-size);\n $min-font-size: map.get($type-styles, font-size);\n @if map.has-key($fluid-breakpoint, font-size) {\n $min-font-size: map.get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map.get($breakpoint, width);\n $min-vw: map.get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map.has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: grid.breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map.get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map.get(\n map.get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map.get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin type-style(\n $name,\n $fluid: false,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n @if not map.has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map.get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map.has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @include custom-properties($name, $token);\n }\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),l.locals={title:"-esm-patient-chart__tile__title___-yHtW",tileTitle:"-esm-patient-chart__tile__tileTitle___1aIXG",tileValue:"-esm-patient-chart__tile__tileValue___fdAwH",tileBox:"-esm-patient-chart__tile__tileBox___NWMSZ",desktopHeading:"-esm-patient-chart__tile__desktopHeading___4ZmcU",tabletHeading:"-esm-patient-chart__tile__tabletHeading___YfOsn",heading:"-esm-patient-chart__tile__heading___x9sGK",tile:"-esm-patient-chart__tile__tile___Lthzx"};const r=l},61518:(e,n,t)=>{t.d(n,{Ad:()=>d,Aj:()=>g,G3:()=>u,HC:()=>p,Ki:()=>s,kv:()=>c,pE:()=>l,pb:()=>h});var a=t(54440),i=t(63276);function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function l(e,n){var t,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"add",l=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"*",p=arguments.length>6?arguments[6]:void 0;n||arguments.length>7&&void 0!==arguments[7]&&!arguments[7]?(0,a.launchWorkspace)("patient-form-entry-workspace",{workspaceTitle:null!==(t=null==e?void 0:e.display)&&void 0!==t?t:null==e?void 0:e.name,mutateForm:l,formInfo:{encounterUuid:r,formUuid:null==e?void 0:e.uuid,patientUuid:p,visit:n,additionalProps:{mode:"add"===o?"enter":o,formSessionIntent:s,openClinicalFormsWorkspaceOnFormClose:!1}}}):(0,i.launchStartVisitPrompt)()}function r(e,n){return new Date(n.obsDatetime).getTime()-new Date(e.obsDatetime).getTime()}function s(e,n){var t,a=(null==e||null===(t=e.obs)||void 0===t?void 0:t.filter((function(e){return e.concept.uuid===n})))||[];return 1==(null==a?void 0:a.length)?a[0]:a.sort(r)[0]}function p(e,n,t){var a=s(e,n);for(var i in t){var l;if("object"===o(null==a?void 0:a.value)&&"uuid"in a.value&&t[i]===(null==a||null===(l=a.value)||void 0===l?void 0:l.uuid))return i}return"--"}function c(e,n,t,a){var i,l=n.trueConcept,r=n.nonTrueConcept,p=n.dependantConcept,c=n.conditionalConcept,u=null===(i=s(e,p))||void 0===i?void 0:i.value;return g({encounter:e,obsConcept:("object"===(void 0===u?"undefined":o(u))&&"uuid"in u?u.uuid:void 0)===c?l:r,isDate:t,isTrueFalseConcept:!1,config:a})}function u(e,n){var t=!0,a=!1,i=void 0;try{for(var o,l=n[Symbol.iterator]();!(t=(o=l.next()).done);t=!0){var r=o.value,p=s(e,r);if(p&&p.value)return r}}catch(e){a=!0,i=e}finally{try{t||null==l.return||l.return()}finally{if(a)throw i}}return null}function d(e,n,t){var a=[];return n.map((function(n){var i=g({encounter:e,obsConcept:n,config:t});"--"!==i&&a.push(i)})),a.length?a.join(", "):"--"}function g(e){var n,t,i,l,r,p,c,u,d,g=e.encounter,h=e.obsConcept,y=e.isDate,m=void 0!==y&&y,b=e.isTrueFalseConcept,$=void 0!==b&&b,v=e.type,A=e.fallbackConcepts,w=void 0===A?[]:A,k=e.secondaryConcept,C=e.config,x=s(g,h);if(!g&&!h)return"--";if($&&"object"===o(null==x?void 0:x.value))return null==x||null===(i=x.value)||void 0===i||null===(t=i.name)||void 0===t?void 0:t.name;if(v)return f(g,v);if(k&&"object"===o(x.value)&&x.value.names&&x.value.name.display===C.otherConceptUuid){var _=s(g,k);return _?_.value:"--"}if(!x&&(null==w?void 0:w.length)){var z=w.find((function(e){return null!=s(g,e)}));x=s(g,z)}if(!x)return"--";if(m){var D;if("object"===o(x.value)&&(null===(D=x.value)||void 0===D?void 0:D.names))return(0,a.formatDate)((0,a.parseDate)(x.obsDatetime),{mode:"wide",time:!1});if("string"==typeof x.value)return(0,a.formatDate)((0,a.parseDate)(x.value),{mode:"wide",time:!1})}return"object"===o(x.value)&&(null===(n=x.value)||void 0===n?void 0:n.name)?null!==(d=null!==(u=null===(r=x.value)||void 0===r||null===(l=r.name)||void 0===l?void 0:l.display)&&void 0!==u?u:null===(c=x.value)||void 0===c||null===(p=c.name)||void 0===p?void 0:p.name)&&void 0!==d?d:"--":x.value}var f=function(e,n){return"location"===n?e.location.display:"provider"===n?e.encounterProviders.map((function(e){return e.provider.name})).join(" | "):"encounterType"===n?e.encounterType.name:"ageAtEncounter"===n?(0,a.age)(e.patient.birthDate,e.encounterDatetime):"visitDate"===n?(null===(t=e.visit)||void 0===t?void 0:t.startDatetime)?(0,a.formatDate)((0,a.parseDate)(e.visit.startDatetime),{mode:"wide"}):"--":"visitType"===n?null!==(l=null===(o=e.visit)||void 0===o||null===(i=o.visitType)||void 0===i?void 0:i.display)&&void 0!==l?l:"--":"encounterDatetime"===n?(0,a.formatDate)((0,a.parseDate)(e.encounterDatetime),{mode:"wide"}):void 0;var t,i,o,l},h=function(e,n){var t;return(null==e||null===(t=e.form)||void 0===t?void 0:t.uuid)===n}},87372:(e,n,t)=>{t.d(n,{OY:()=>p,dG:()=>c,pQ:()=>d});var a=t(1343),i=t(71123),o=t(54440);function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}function r(e,n){if(e){if("string"==typeof e)return l(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?l(e,n):void 0}}var s="custom:(uuid,encounterDatetime,encounterType,location:(uuid,name),patient:(uuid,display,age,identifiers,person),encounterProviders:(uuid,provider:(uuid,name)),obs:(uuid,obsDatetime,voided,groupMembers,concept:(uuid,name:(uuid,name)),value:(uuid,name:(uuid,name),names:(uuid,conceptNameType,name))),form:(uuid,name),visit:(uuid,startDatetime,stopDatetime,visitType:(uuid,display)))";function p(e,n,t,p,c,u){var d,g,f,h=(u-1)*c,y=(g=(0,a.useState)([]),f=2,function(e){if(Array.isArray(e))return e}(g)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,i,o=[],l=!0,r=!1;try{for(t=t.call(e);!(l=(a=t.next()).done)&&(o.push(a.value),!n||o.length!==n);l=!0);}catch(e){r=!0,i=e}finally{try{l||null==t.return||t.return()}finally{if(r)throw i}}return o}}(g,f)||r(g,f)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=y[0],b=y[1],$="".concat(o.restBaseUrl,"/encounter?encounterType=").concat(n,"&patient=").concat(e,"&v=").concat(s,"&totalCount=true&limit=").concat(c,"&startIndex=").concat(h),v=(0,i.Ay)($,o.openmrsFetch),A=v.data,w=v.error,k=v.isLoading,C=v.mutate;(0,a.useEffect)((function(){A&&(A.data.results.sort((function(e,n){return new Date(n.encounterDatetime).getTime()-new Date(e.encounterDatetime).getTime()})),b(t?A.data.results.filter((function(e){return t(e)})):function(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||r(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(A.data.results)))}),[t,A]);var x=(0,a.useCallback)((function(){C(),p&&p()}),[p,C]);return{encounters:m,total:null==A||null===(d=A.data)||void 0===d?void 0:d.totalCount,isLoading:k,error:w,onFormSave:x,mutate:C}}function c(e){var n,t="".concat(o.restBaseUrl,"/form/").concat(e),a=(0,i.Ay)(e?t:null,o.openmrsFetch),l=a.data,r=a.isLoading,s=a.error;return{formsJson:null!==(n=null==l?void 0:l.data)&&void 0!==n?n:null,isLoading:r,error:s}}var u="custom:(uuid,encounterDatetime,encounterType,location:(uuid,name),patient:(uuid,display,age,identifiers,person),encounterProviders:(uuid,provider:(uuid,name)),obs:(uuid,obsDatetime,voided,groupMembers,concept:(uuid,display,name:(uuid,name)),value:(uuid,name:(uuid,name,display),names:(uuid,conceptNameType,name,display))),form:(uuid,name))";function d(e,n){var t,a="encounterType=".concat(n,"&patient=").concat(e),l=e&&n?"/ws/rest/v1/encounter?".concat(a,"&v=").concat(u,"&limit=1&order=desc&startIndex=0"):null,r=(0,i.Ay)(l,o.openmrsFetch),s=r.data,p=r.error,c=r.isLoading,d=r.isValidating;return{lastEncounter:(null==s||null===(t=s.data.results)||void 0===t?void 0:t.length)>0?null==s?void 0:s.data.results[0]:null,error:p,isLoading:c,isValidating:d}}},93184:(e,n,t)=>{t.r(n),t.d(n,{default:()=>E});var a=t(1343),i=t.n(a),o=t(93150),l=t(54440),r=t(61518),s=t(46372),p=t.n(s),c=t(75198),u=t(14497),d=t(87372),g=t(72591),f=t.n(g),h=t(1740),y=t.n(h),m=t(88128),b=t.n(m),$=t(30855),v=t.n($),A=t(93051),w=t.n(A),k=t(73656),C=t.n(k),x=t(56922),_={};_.styleTagTransform=C(),_.setAttributes=v(),_.insert=b().bind(null,"head"),_.domAPI=y(),_.insertStyleElement=w(),f()(x.A,_);const z=x.A&&x.A.locals?x.A.locals:void 0;var D=(0,a.memo)((function(e){var n=e.patientUuid,t=e.columns,a=e.headerTitle,o="tablet"===(0,l.useLayoutType)(),r=t.length>0?Math.floor(16/t.length):16;return i().createElement(c.Layer,{className:z.layer},i().createElement(c.Tile,{className:z.tile},i().createElement("div",{className:o?z.tabletHeading:z.desktopHeading},i().createElement("h4",{className:z.title},a)),i().createElement(c.Grid,{fullWidth:!0},t.map((function(e,t){return i().createElement(c.Column,{key:"".concat(e.encounterTypeUuid,"-").concat(e.title,"-").concat(t),sm:r,md:r,lg:r,span:r},i().createElement(M,{patientUuid:n,column:e}))})))))})),M=function(e){var n=e.patientUuid,t=e.column,a=(0,o.useTranslation)().t,l=(0,d.pQ)(n,t.encounterTypeUuid),r=l.lastEncounter,s=l.isLoading,p=l.error,g=l.isValidating,f=t.getObsValue(r),h=!0===t.hasSummary&&t.getSummaryObsValue&&"function"==typeof t.getSummaryObsValue?t.getSummaryObsValue(r):null;return s||g?i().createElement(c.CodeSnippetSkeleton,{type:"multi",className:"skeleton"}):p||void 0===r?i().createElement(i().Fragment,null,i().createElement("span",{className:z.tileTitle},a(t.title)),i().createElement("span",{className:z.tileValue},null==p?void 0:p.message)):i().createElement(i().Fragment,null,i().createElement("span",{className:z.tileTitle},a(t.header)),!("--"===f&&"--"!==h&&!(0,u.isNil)(h))&&i().createElement("span",{className:z.tileValue},i().createElement("p",null,f)),!(0,u.isNil)(h)&&"--"!==h&&i().createElement("span",{className:z.tileValue},i().createElement("p",null,h)))},T=(0,a.memo)((function(e){var n=e.patientUuid,t=(0,l.useConfig)(),s=t.tileDefinitions,c=t.trueConceptUuid,u=t.falseConceptUuid,d=t.otherConceptUuid,g=(0,o.useTranslation)().t,f=(0,a.useMemo)((function(){var e={trueConceptUuid:c,falseConceptUuid:u,otherConceptUuid:d};return null==s?void 0:s.map((function(n){return{title:g(n.tileHeader),columns:(t=n,a=e,null===(i=t.columns)||void 0===i?void 0:i.map((function(e){return{key:e.title,header:e.title,concept:e.concept,encounterTypeUuid:e.encounterType,hasSummary:e.hasSummary||!1,getObsValue:function(n){var t,i,o;if(e.conceptMappings){var l,s=(0,r.G3)(n,e.conceptMappings);i=(0,r.Aj)({encounter:n,obsConcept:s,isDate:e.isDate,isTrueFalseConcept:e.isTrueFalseConcept,type:e.type,fallbackConcepts:e.fallbackConcepts,secondaryConcept:null===(l=e.summaryConcept)||void 0===l?void 0:l.secondaryConcept,config:a})}else i=(0,r.Aj)({encounter:n,obsConcept:e.concept,isDate:e.isDate,config:a});return"string"==typeof i||"number"==typeof i&&!isNaN(i)?i:null!==(o=null==i||null===(t=i.name)||void 0===t?void 0:t.name)&&void 0!==o?o:"--"},getSummaryObsValue:e.hasSummary?function(n){var t,i,o,l,s;if(null===(t=e.summaryConcept)||void 0===t?void 0:t.secondaryConcept){var c=(0,r.Aj)({encounter:n,obsConcept:e.summaryConcept.primaryConcept,config:a});l="--"!==c?c:(0,r.Aj)({encounter:n,obsConcept:e.summaryConcept.secondaryConcept,config:a})}else if(null===(i=e.summaryConcept)||void 0===i?void 0:i.hasCalculatedDate){var u=(0,r.Aj)({encounter:n,obsConcept:e.summaryConcept.primaryConcept,isDate:!1,config:a});"string"==typeof u&&"--"!==u?(s=u,l="".concat(Math.abs(p()().diff(p()(s),"days"))," days")):l="--"}else{var d,g,f;l=(0,r.Aj)({encounter:n,obsConcept:null===(d=e.summaryConcept)||void 0===d?void 0:d.primaryConcept,isDate:null===(g=e.summaryConcept)||void 0===g?void 0:g.isDate,config:a,type:null===(f=e.summaryConcept)||void 0===f?void 0:f.type})}return"string"==typeof l?l:(null==l||null===(o=l.name)||void 0===o?void 0:o.name)||"--"}:null}})))};var t,a,i}))}),[s,g,c,u,d]);return(null==f?void 0:f.length)>0?i().createElement(i().Fragment,null,f.map((function(e,t){return i().createElement(D,{key:t,patientUuid:n,columns:e.columns,headerTitle:e.title})}))):null}));const E=T}}]);
|
package/dist/3184.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"3184.js","mappings":"iNAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,63FAAo4F,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wEAAwE,0DAA0D,gEAAgE,8EAA8E,MAAQ,GAAG,SAAW,myBAAmyB,eAAiB,CAAC,g/DAAg/D,slDAAslD,u8uBAAu8uB,25DAA25D,WAAa,MAEx9hCH,EAAwBI,OAAS,CAChC,MAAS,0CACT,UAAa,8CACb,UAAa,8CACb,QAAW,4CACX,eAAkB,mDAClB,cAAiB,kDACjB,QAAW,4CACX,KAAQ,0CAET,S,0NCHO,SAASC,EACdC,EACAC,G,IAYoBD,EAXpBE,EAAAA,UAAAA,OAAAA,QAAAA,IAAAA,UAAAA,GAAAA,UAAAA,GAAuB,MACvBC,EAAAA,UAAAA,OAAAA,EAAAA,UAAAA,QAAAA,EACAC,EAAAA,UAAAA,OAAAA,EAAAA,UAAAA,QAAAA,EACAC,EAAAA,UAAAA,OAAAA,QAAAA,IAAAA,UAAAA,GAAAA,UAAAA,GAAiB,IACjBC,EAAAA,UAAAA,OAAAA,EAAAA,UAAAA,QAAAA,EAGKL,GAFLM,UAAAA,OAAAA,QAAAA,IAAAA,UAAAA,KAAAA,UAAAA,IAKEC,EAAAA,EAAAA,iBAAgB,+BAAgC,CAC9CC,eAA6B,QAAbT,EAAAA,aAAAA,EAAAA,EAAMU,eAANV,IAAAA,EAAAA,EAAiBA,aAAAA,EAAAA,EAAMW,KACvCC,WAAYT,EACZU,SAAU,CACRT,cAAAA,EACAU,SAAUd,aAAAA,EAAAA,EAAMe,KAChBT,YAAaA,EACbL,MAAOA,EACPe,gBAAiB,CACfC,KAAiB,QAAXf,EAAmB,QAAUA,EACnCgB,kBAAmBb,EACnBc,uCAAuC,OAb7CC,E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A+BnI,EACzBmI,C,GDmB5C,GAAG,CAACP,EAAiBd,EAAGe,EAAiBC,EAAkBzG,IAE3D,OAAO0G,aAAAA,EAAAA,EAAWxI,QAAS,EACzB,oCACGwI,EAAUjH,KAAI,SAAC8E,EAAMS,G,OACpB,kBAACvB,EAAaA,CAACnF,IAAK0G,EAAO3I,YAAaA,EAAasH,QAASY,EAAKZ,QAASC,YAAaW,EAAKK,O,KAGhG,IACN,IAEA,S","sources":["webpack://@openmrs/esm-patient-chart-app/./src/clinical-views/encounter-tile/tile.scss","webpack://@openmrs/esm-patient-chart-app/./src/clinical-views/utils/helpers.ts","webpack://@openmrs/esm-patient-chart-app/./src/clinical-views/hooks/useEncounterRows.ts","webpack://@openmrs/esm-patient-chart-app/./src/clinical-views/hooks/useFormsJson.ts","webpack://@openmrs/esm-patient-chart-app/./src/clinical-views/hooks/useLastEncounter.ts","webpack://@openmrs/esm-patient-chart-app/./src/clinical-views/encounter-tile/tile.scss?74f8","webpack://@openmrs/esm-patient-chart-app/./src/clinical-views/encounter-tile/encounter-tile.component.tsx","webpack://@openmrs/esm-patient-chart-app/./src/clinical-views/encounter-tile/clinical-views-summary.component.tsx","webpack://@openmrs/esm-patient-chart-app/./src/clinical-views/utils/index.ts"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","launchEncounterForm","form","visit","action","onFormSave","encounterUuid","intent","patientUuid","requireActiveVisitForEncounterTile","launchWorkspace","workspaceTitle","display","name","mutateForm","formInfo","formUuid","uuid","additionalProps","mode","formSessionIntent","openClinicalFormsWorkspaceOnFormClose","launchStartVisitPrompt","obsArrayDateComparator","left","right","Date","obsDatetime","getTime","findObs","encounter","obsConcept","allObs","obs","filter","observation","concept","length","sort","resolveValueUsingMappings","mappings","key","value","getConditionalConceptValue","conditionalConceptMappings","isDate","config","trueConcept","nonTrueConcept","dependantConcept","conditionalConcept","dependantValue","getObsFromEncounter","undefined","isTrueFalseConcept","getConceptFromMappings","concepts","getMultipleObsFromEncounter","obsConcepts","observations","map","join","type","fallbackConcepts","secondaryConcept","getEncounterProperty","names","otherConceptUuid","secondaryObs","find","c","formatDate","parseDate","time","location","encounterProviders","p","provider","encounterType","age","patient","birthDate","encounterDatetime","startDatetime","visitType","encounterRepresentation","useEncounterRows","encounterFilter","afterFormSaveAction","pageSize","currentPage","response","startIndex","useState","encounters","setEncounters","url","restBaseUrl","useSWR","openmrsFetch","data","error","isLoading","mutate","useEffect","results","a","b","useCallback","total","totalCount","useFormsJson","formsJson","useLastEncounter","query","endpointUrl","isValidating","lastEncounter","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","EncounterTile","memo","columns","headerTitle","isTablet","useLayoutType","columnSpan","Math","floor","Layer","className","styles","layer","Tile","tile","div","tabletHeading","desktopHeading","h4","title","Grid","fullWidth","column","index","Column","encounterTypeUuid","sm","md","lg","span","EncounterData","useTranslation","t","obsValue","getObsValue","summaryValue","hasSummary","getSummaryObsValue","CodeSnippetSkeleton","tileTitle","tileValue","message","header","isNil","ClinicalViewsSummary","useConfig","tileDefinitions","trueConceptUuid","falseConceptUuid","tilesData","useMemo","configConcepts","tileHeader","tileDefinition","conceptMappings","summaryConcept","isNaN","givenDate","primaryConceptType","primaryConcept","hasCalculatedDate","primaryDate","abs","dayjs","diff"],"sourceRoot":""}
|