@openmrs/esm-generic-patient-widgets-app 11.3.1-pre.9054 → 11.3.1-pre.9066
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/1119.js +1 -1
- package/dist/1197.js +1 -1
- package/dist/2146.js +1 -1
- package/dist/2690.js +1 -1
- package/dist/3099.js +1 -1
- package/dist/3584.js +1 -1
- package/dist/4055.js +1 -1
- package/dist/4132.js +1 -1
- package/dist/4300.js +1 -1
- package/dist/4335.js +1 -1
- package/dist/4618.js +1 -1
- package/dist/4652.js +1 -1
- package/dist/4944.js +1 -1
- package/dist/5173.js +1 -1
- package/dist/5241.js +1 -1
- package/dist/5442.js +1 -1
- package/dist/5661.js +1 -1
- package/dist/5986.js +1 -1
- package/dist/5986.js.map +1 -1
- package/dist/6022.js +1 -1
- package/dist/6468.js +1 -1
- package/dist/6679.js +1 -1
- package/dist/6840.js +1 -1
- package/dist/6859.js +1 -1
- package/dist/7097.js +1 -1
- package/dist/7159.js +1 -1
- package/dist/723.js +1 -1
- package/dist/7617.js +1 -1
- package/dist/795.js +1 -1
- package/dist/8163.js +1 -1
- package/dist/8349.js +1 -1
- package/dist/8618.js +1 -1
- package/dist/890.js +1 -1
- package/dist/9214.js +1 -1
- package/dist/9538.js +1 -1
- package/dist/9569.js +1 -1
- package/dist/986.js +1 -1
- package/dist/9879.js +1 -1
- package/dist/9895.js +1 -1
- package/dist/9900.js +1 -1
- package/dist/9913.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-generic-patient-widgets-app.js +1 -1
- package/dist/openmrs-esm-generic-patient-widgets-app.js.buildmanifest.json +124 -124
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/src/obs-graph/obs-graph.component.tsx +17 -5
- package/src/obs-switchable/obs-switchable.test.tsx +13 -13
- package/translations/am.json +1 -0
- package/translations/ar.json +1 -0
- package/translations/ar_SY.json +1 -0
- package/translations/bn.json +1 -0
- package/translations/de.json +1 -0
- package/translations/en.json +1 -0
- package/translations/en_US.json +1 -0
- package/translations/es.json +1 -0
- package/translations/es_MX.json +1 -0
- package/translations/fr.json +1 -0
- package/translations/he.json +1 -0
- package/translations/hi.json +1 -0
- package/translations/hi_IN.json +1 -0
- package/translations/id.json +1 -0
- package/translations/it.json +1 -0
- package/translations/ka.json +1 -0
- package/translations/km.json +1 -0
- package/translations/ku.json +1 -0
- package/translations/ky.json +1 -0
- package/translations/lg.json +1 -0
- package/translations/ne.json +1 -0
- package/translations/pl.json +1 -0
- package/translations/pt.json +1 -0
- package/translations/pt_BR.json +1 -0
- package/translations/qu.json +1 -0
- package/translations/ro_RO.json +1 -0
- package/translations/ru_RU.json +1 -0
- package/translations/si.json +1 -0
- package/translations/sw.json +1 -0
- package/translations/sw_KE.json +1 -0
- package/translations/tr.json +1 -0
- package/translations/tr_TR.json +1 -0
- package/translations/uk.json +1 -0
- package/translations/uz.json +1 -0
- package/translations/uz@Latn.json +1 -0
- package/translations/uz_UZ.json +1 -0
- package/translations/vi.json +1 -0
- package/translations/zh.json +1 -0
- package/translations/zh_CN.json +1 -0
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2"},"extensions":[{"name":"obs-by-encounter-widget","component":"switchableObs","online":true,"offline":true,"meta":{"fullWidth":false}},{"name":"obs-table-horizontal-widget-small","component":"obsTableHorizontal","online":true,"offline":true,"meta":{"fullWidth":false}},{"name":"obs-table-horizontal-widget","component":"obsTableHorizontal","online":true,"offline":true,"meta":{"fullWidth":true}}],"version":"11.3.1-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2"},"extensions":[{"name":"obs-by-encounter-widget","component":"switchableObs","online":true,"offline":true,"meta":{"fullWidth":false}},{"name":"obs-table-horizontal-widget-small","component":"obsTableHorizontal","online":true,"offline":true,"meta":{"fullWidth":false}},{"name":"obs-table-horizontal-widget","component":"obsTableHorizontal","online":true,"offline":true,"meta":{"fullWidth":true}}],"version":"11.3.1-pre.9066"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-generic-patient-widgets-app",
|
|
3
|
-
"version": "11.3.1-pre.
|
|
3
|
+
"version": "11.3.1-pre.9066",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Generic widgets for the patient chart",
|
|
6
6
|
"browser": "dist/openmrs-esm-generic-patient-widgets-app.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"swr": "2.x"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@openmrs/esm-patient-common-lib": "11.3.1-pre.
|
|
55
|
+
"@openmrs/esm-patient-common-lib": "11.3.1-pre.9066",
|
|
56
56
|
"webpack": "^5.99.9"
|
|
57
57
|
},
|
|
58
58
|
"stableVersion": "11.3.0"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { Tab, TabListVertical, TabPanel, TabPanels, TabsVertical } from '@carbon/react';
|
|
4
|
-
import { LineChart, ScaleTypes } from '@carbon/charts-react';
|
|
4
|
+
import { LineChart, type LineChartOptions, ScaleTypes } from '@carbon/charts-react';
|
|
5
5
|
import { ExtensionSlot, formatDate, useConfig } from '@openmrs/esm-framework';
|
|
6
6
|
import { type ConfigObjectSwitchable } from '../config-schema-obs-switchable';
|
|
7
7
|
import { useObs } from '../resources/useObs';
|
|
@@ -73,7 +73,7 @@ const ObsGraph: React.FC<ObsGraphProps> = ({ patientUuid }) => {
|
|
|
73
73
|
group: conceptForObs[obs.conceptUuid].label
|
|
74
74
|
? t(conceptForObs[obs.conceptUuid].label, conceptForObs[obs.conceptUuid].label)
|
|
75
75
|
: obs.code.text,
|
|
76
|
-
key:
|
|
76
|
+
key: new Date(obs.effectiveDateTime),
|
|
77
77
|
value: obs.valueQuantity.value,
|
|
78
78
|
}));
|
|
79
79
|
|
|
@@ -88,12 +88,15 @@ const ObsGraph: React.FC<ObsGraphProps> = ({ patientUuid }) => {
|
|
|
88
88
|
|
|
89
89
|
const chartColors = Object.fromEntries(selectedMenuItem.concepts.map((d) => [d.label, d.color]));
|
|
90
90
|
|
|
91
|
-
const chartOptions = {
|
|
91
|
+
const chartOptions: LineChartOptions = {
|
|
92
92
|
axes: {
|
|
93
93
|
bottom: {
|
|
94
|
-
title: 'Date',
|
|
94
|
+
title: t('date', 'Date'),
|
|
95
95
|
mapsTo: 'key',
|
|
96
|
-
scaleType: ScaleTypes.
|
|
96
|
+
scaleType: ScaleTypes.TIME,
|
|
97
|
+
ticks: {
|
|
98
|
+
formatter: (value: Date) => formatDate(value, { year: true, time: false }),
|
|
99
|
+
},
|
|
97
100
|
},
|
|
98
101
|
left: {
|
|
99
102
|
mapsTo: 'value',
|
|
@@ -108,6 +111,15 @@ const ObsGraph: React.FC<ObsGraphProps> = ({ patientUuid }) => {
|
|
|
108
111
|
color: {
|
|
109
112
|
scale: chartColors,
|
|
110
113
|
},
|
|
114
|
+
tooltip: {
|
|
115
|
+
alwaysShowRulerTooltip: true,
|
|
116
|
+
showTotal: false,
|
|
117
|
+
valueFormatter: (value: any, label: string) =>
|
|
118
|
+
label == t('date', 'Date') ? formatDate(value, { year: true, time: true }) : value.toString(),
|
|
119
|
+
truncation: {
|
|
120
|
+
numCharacter: 40,
|
|
121
|
+
},
|
|
122
|
+
},
|
|
111
123
|
height: '400px',
|
|
112
124
|
};
|
|
113
125
|
|
|
@@ -127,8 +127,8 @@ describe('ObsSwitchable', () => {
|
|
|
127
127
|
1,
|
|
128
128
|
expect.objectContaining({
|
|
129
129
|
data: [
|
|
130
|
-
{ group: 'Tallitude', key: '01-
|
|
131
|
-
{ group: 'Tallitude', key: '
|
|
130
|
+
{ group: 'Tallitude', key: new Date('2021-01-01T00:00:00.000Z'), value: 180 },
|
|
131
|
+
{ group: 'Tallitude', key: new Date('2021-02-01T00:00:00.000Z'), value: 182 },
|
|
132
132
|
],
|
|
133
133
|
options: expect.any(Object),
|
|
134
134
|
}),
|
|
@@ -139,8 +139,8 @@ describe('ObsSwitchable', () => {
|
|
|
139
139
|
2,
|
|
140
140
|
expect.objectContaining({
|
|
141
141
|
data: [
|
|
142
|
-
{ group: 'Weight', key: '01-
|
|
143
|
-
{ group: 'Weight', key: '
|
|
142
|
+
{ group: 'Weight', key: new Date('2021-01-01T00:00:00.000Z'), value: 70 },
|
|
143
|
+
{ group: 'Weight', key: new Date('2021-02-01T00:00:00.000Z'), value: 72 },
|
|
144
144
|
],
|
|
145
145
|
options: expect.any(Object),
|
|
146
146
|
}),
|
|
@@ -158,7 +158,7 @@ describe('ObsSwitchable', () => {
|
|
|
158
158
|
expect(mockLineChart).toHaveBeenNthCalledWith(
|
|
159
159
|
3,
|
|
160
160
|
expect.objectContaining({
|
|
161
|
-
data: [{ group: 'Power Level', key: '01-
|
|
161
|
+
data: [{ group: 'Power Level', key: new Date('2021-01-01T00:00:00.000Z'), value: 9001 }],
|
|
162
162
|
options: expect.any(Object),
|
|
163
163
|
}),
|
|
164
164
|
{},
|
|
@@ -189,8 +189,8 @@ describe('ObsSwitchable', () => {
|
|
|
189
189
|
1,
|
|
190
190
|
expect.objectContaining({
|
|
191
191
|
data: [
|
|
192
|
-
{ group: 'Height', key: '01-
|
|
193
|
-
{ group: 'Height', key: '
|
|
192
|
+
{ group: 'Height', key: new Date('2021-01-01T00:00:00.000Z'), value: 180 },
|
|
193
|
+
{ group: 'Height', key: new Date('2021-02-01T00:00:00.000Z'), value: 182 },
|
|
194
194
|
],
|
|
195
195
|
options: expect.any(Object),
|
|
196
196
|
}),
|
|
@@ -225,7 +225,7 @@ describe('ObsSwitchable', () => {
|
|
|
225
225
|
expect(mockLineChart).toHaveBeenNthCalledWith(
|
|
226
226
|
1,
|
|
227
227
|
expect.objectContaining({
|
|
228
|
-
data: [{ group: 'Power Level', key: '01-
|
|
228
|
+
data: [{ group: 'Power Level', key: new Date('2021-01-01T00:00:00.000Z'), value: 9001 }],
|
|
229
229
|
options: expect.any(Object),
|
|
230
230
|
}),
|
|
231
231
|
{},
|
|
@@ -235,10 +235,10 @@ describe('ObsSwitchable', () => {
|
|
|
235
235
|
2,
|
|
236
236
|
expect.objectContaining({
|
|
237
237
|
data: [
|
|
238
|
-
{ group: 'Height', key: '01-
|
|
239
|
-
{ group: 'Height', key: '
|
|
240
|
-
{ group: 'Weight', key: '01-
|
|
241
|
-
{ group: 'Weight', key: '
|
|
238
|
+
{ group: 'Height', key: new Date('2021-01-01T00:00:00.000Z'), value: 180 },
|
|
239
|
+
{ group: 'Height', key: new Date('2021-02-01T00:00:00.000Z'), value: 182 },
|
|
240
|
+
{ group: 'Weight', key: new Date('2021-01-01T00:00:00.000Z'), value: 70 },
|
|
241
|
+
{ group: 'Weight', key: new Date('2021-02-01T00:00:00.000Z'), value: 72 },
|
|
242
242
|
],
|
|
243
243
|
options: expect.any(Object),
|
|
244
244
|
}),
|
|
@@ -266,7 +266,7 @@ describe('ObsSwitchable', () => {
|
|
|
266
266
|
|
|
267
267
|
expect(mockLineChart).toHaveBeenCalledWith(
|
|
268
268
|
expect.objectContaining({
|
|
269
|
-
data: [{ group: 'Power Level', key: '01-
|
|
269
|
+
data: [{ group: 'Power Level', key: new Date('2021-01-01T00:00:00.000Z'), value: 9001 }],
|
|
270
270
|
options: expect.any(Object),
|
|
271
271
|
}),
|
|
272
272
|
{},
|
package/translations/am.json
CHANGED
package/translations/ar.json
CHANGED
package/translations/ar_SY.json
CHANGED
package/translations/bn.json
CHANGED
package/translations/de.json
CHANGED
package/translations/en.json
CHANGED
package/translations/en_US.json
CHANGED
package/translations/es.json
CHANGED
package/translations/es_MX.json
CHANGED
package/translations/fr.json
CHANGED
package/translations/he.json
CHANGED
package/translations/hi.json
CHANGED
package/translations/hi_IN.json
CHANGED
package/translations/id.json
CHANGED
package/translations/it.json
CHANGED
package/translations/ka.json
CHANGED
package/translations/km.json
CHANGED
package/translations/ku.json
CHANGED
package/translations/ky.json
CHANGED
package/translations/lg.json
CHANGED
package/translations/ne.json
CHANGED
package/translations/pl.json
CHANGED
package/translations/pt.json
CHANGED
package/translations/pt_BR.json
CHANGED
package/translations/qu.json
CHANGED
package/translations/ro_RO.json
CHANGED
package/translations/ru_RU.json
CHANGED
package/translations/si.json
CHANGED
package/translations/sw.json
CHANGED
package/translations/sw_KE.json
CHANGED
package/translations/tr.json
CHANGED
package/translations/tr_TR.json
CHANGED
package/translations/uk.json
CHANGED
package/translations/uz.json
CHANGED
package/translations/uz_UZ.json
CHANGED
package/translations/vi.json
CHANGED
package/translations/zh.json
CHANGED