@bahmni/clinical-app 0.0.1-dev.467 → 0.0.1-dev.469
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/dist/{ConsultationPage-BjrUy4PW.js → ConsultationPage-hOSFBfGN.js} +21081 -20037
- package/dist/{DocumentsTable-Cdjrw4yW-DoRY2hdp.js → DocumentsTable-DddJ0p1F-DBATb1Bg.js} +93 -93
- package/dist/FormsTable-DLC_vCD0-CLXfaFtn.js +249 -0
- package/dist/{LNWAZHJI-CjO-Fgpw.js → LNWAZHJI-Cy9INys2.js} +7 -7
- package/dist/{MWZ6AO7Z-BDeQ6SkW.js → MWZ6AO7Z-JShTOcHn.js} +2 -2
- package/dist/{Observations-B-dxdRlx-BEL5frvq.js → Observations-Cwi0QkK8-DkzZEyze.js} +75 -75
- package/dist/{YPM2AS64-BeiFAEzP.js → YPM2AS64-BIfscLnv.js} +1 -1
- package/dist/components/forms/observations/ObservationForms.d.ts.map +1 -1
- package/dist/components/forms/observations/ObservationFormsContainer.d.ts +2 -2
- package/dist/components/forms/observations/ObservationFormsContainer.d.ts.map +1 -1
- package/dist/constants/forms.d.ts +1 -0
- package/dist/constants/forms.d.ts.map +1 -1
- package/dist/{hook-DxwMFCWH.js → hook-Ca7ypArY.js} +3 -3
- package/dist/{index-BILowQhQ.js → index-DO8Ng_V5.js} +21 -21
- package/dist/{index-C4WckLEf.js → index-DZlx8UoV.js} +11 -11
- package/dist/index-sjgf7zfi-xYpJ_hkW.js +6900 -0
- package/dist/{index-ZfyzcWgS.js → index-z270S3eE.js} +140258 -110101
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/dist/locales/locale_en.json +7 -1
- package/dist/locales/locale_es.json +7 -1
- package/dist/stores/observationFormsStore.d.ts +3 -3
- package/dist/stores/observationFormsStore.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/FormsTable-hfP2wv7g-Am6W8ufO.js +0 -249
package/dist/index.js
CHANGED
|
@@ -61,6 +61,11 @@
|
|
|
61
61
|
"CDSS_RULE_INVOCATION_ERROR": "CDSS rule invocation failed for control {{controlKey}} on event {{eventType}}",
|
|
62
62
|
"CERTAINITY_CONFIRMED": "Confirmed",
|
|
63
63
|
"CERTAINITY_PROVISIONAL": "Provisional",
|
|
64
|
+
"CHART_EMPTY_DEFAULT": "No data to display",
|
|
65
|
+
"CHART_ERROR_DEFAULT": "Unable to load this chart",
|
|
66
|
+
"CHART_MISSING_PATIENT_ID": "Missing patient identifier",
|
|
67
|
+
"CHART_NO_CHART_DATA": "The chart expression did not produce chart data",
|
|
68
|
+
"CHART_URL_UNRESOLVED": "Could not resolve the chart data URL",
|
|
64
69
|
"CLINICAL_DATA_RECORDED_BY": "Recorded By",
|
|
65
70
|
"CLINICAL_LABEL": "Clinical",
|
|
66
71
|
"CLOSE_BUTTON": "Close",
|
|
@@ -501,6 +506,7 @@
|
|
|
501
506
|
"OBSERVATION_ADDED_FORM_VALIDATION_ERROR_TITLE_EMPTY": "No data filled",
|
|
502
507
|
"OBSERVATION_ADDED_FORM_VALIDATION_ERROR_TITLE_INVALID": "Invalid data entry",
|
|
503
508
|
"OBSERVATION_ADDED_FORM_VALIDATION_ERROR_TITLE_MANDATORY": "Required fields missing",
|
|
509
|
+
"OBSERVATION_ADDED_FORM_VALIDATION_ERROR_TITLE_NOTES_REQUIRED": "Mandatory notes missing",
|
|
504
510
|
"OBSERVATION_ADDED_FORM_VALIDATION_ERROR_TITLE_SCRIPT_ERROR": "Script Error (Save)",
|
|
505
511
|
"OBSERVATION_FORMS_ADDED_FORMS": "Added Forms",
|
|
506
512
|
"OBSERVATION_FORMS_ERROR_LOADING_FORMS": "Error loading forms. Please try again later.",
|
|
@@ -691,4 +697,4 @@
|
|
|
691
697
|
"YEARS_one": " year",
|
|
692
698
|
"YEARS_other": " years",
|
|
693
699
|
"YES": "Yes"
|
|
694
|
-
}
|
|
700
|
+
}
|
|
@@ -61,6 +61,11 @@
|
|
|
61
61
|
"CDSS_RULE_INVOCATION_ERROR": "Error al invocar la regla CDSS para el control {{controlKey}} en el evento {{eventType}}",
|
|
62
62
|
"CERTAINITY_CONFIRMED": "Confirmado",
|
|
63
63
|
"CERTAINITY_PROVISIONAL": "Provisorio",
|
|
64
|
+
"CHART_EMPTY_DEFAULT": "No hay datos para mostrar",
|
|
65
|
+
"CHART_ERROR_DEFAULT": "No se pudo cargar este gráfico",
|
|
66
|
+
"CHART_MISSING_PATIENT_ID": "Falta el identificador del paciente",
|
|
67
|
+
"CHART_NO_CHART_DATA": "La expresión del gráfico no generó datos",
|
|
68
|
+
"CHART_URL_UNRESOLVED": "No se pudo resolver la URL de datos del gráfico",
|
|
64
69
|
"CLINICAL_DATA_RECORDED_BY": "Grabado Por",
|
|
65
70
|
"CLINICAL_LABEL": "Clínico",
|
|
66
71
|
"CLOSE_BUTTON": "Cerrar",
|
|
@@ -503,6 +508,7 @@
|
|
|
503
508
|
"OBSERVATION_ADDED_FORM_VALIDATION_ERROR_TITLE_EMPTY": "No se han introducido datos",
|
|
504
509
|
"OBSERVATION_ADDED_FORM_VALIDATION_ERROR_TITLE_INVALID": "Entrada de datos inválida",
|
|
505
510
|
"OBSERVATION_ADDED_FORM_VALIDATION_ERROR_TITLE_MANDATORY": "Faltan campos obligatorios",
|
|
511
|
+
"OBSERVATION_ADDED_FORM_VALIDATION_ERROR_TITLE_NOTES_REQUIRED": "Faltan notas obligatorias",
|
|
506
512
|
"OBSERVATION_ADDED_FORM_VALIDATION_ERROR_TITLE_SCRIPT_ERROR": "Error de Script (Guardar)",
|
|
507
513
|
"OBSERVATION_FORMS_ADDED_FORMS": "Formularios Agregados",
|
|
508
514
|
"OBSERVATION_FORMS_ERROR_LOADING_FORMS": "Error al cargar formularios. Por favor, inténtelo de nuevo más tarde.",
|
|
@@ -684,4 +690,4 @@
|
|
|
684
690
|
"YEARS_one": " año",
|
|
685
691
|
"YEARS_other": " años",
|
|
686
692
|
"YES": "Sí"
|
|
687
|
-
}
|
|
693
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ObservationForm, Form2Observation } from '@bahmni/services';
|
|
2
2
|
import { Reference } from 'fhir/r4';
|
|
3
|
-
import { VALIDATION_STATE_EMPTY, VALIDATION_STATE_MANDATORY, VALIDATION_STATE_INVALID, VALIDATION_STATE_SCRIPT_ERROR } from '../constants/forms';
|
|
3
|
+
import { VALIDATION_STATE_EMPTY, VALIDATION_STATE_MANDATORY, VALIDATION_STATE_INVALID, VALIDATION_STATE_SCRIPT_ERROR, VALIDATION_STATE_NOTES_REQUIRED } from '../constants/forms';
|
|
4
4
|
export interface ObservationFormData {
|
|
5
5
|
formUuid: string;
|
|
6
6
|
formName: string;
|
|
7
7
|
observations: Form2Observation[];
|
|
8
8
|
timestamp: number;
|
|
9
|
-
validationErrorType?: null | typeof VALIDATION_STATE_EMPTY | typeof VALIDATION_STATE_MANDATORY | typeof VALIDATION_STATE_INVALID | typeof VALIDATION_STATE_SCRIPT_ERROR;
|
|
9
|
+
validationErrorType?: null | typeof VALIDATION_STATE_EMPTY | typeof VALIDATION_STATE_MANDATORY | typeof VALIDATION_STATE_INVALID | typeof VALIDATION_STATE_SCRIPT_ERROR | typeof VALIDATION_STATE_NOTES_REQUIRED;
|
|
10
10
|
basedOn?: Reference;
|
|
11
11
|
}
|
|
12
12
|
export interface ObservationFormsState {
|
|
@@ -15,7 +15,7 @@ export interface ObservationFormsState {
|
|
|
15
15
|
viewingForm: ObservationForm | null;
|
|
16
16
|
addForm: (form: ObservationForm) => void;
|
|
17
17
|
removeForm: (formUuid: string) => void;
|
|
18
|
-
updateFormData: (formUuid: string, observations: Form2Observation[], validationErrorType?: null | typeof VALIDATION_STATE_EMPTY | typeof VALIDATION_STATE_MANDATORY | typeof VALIDATION_STATE_INVALID | typeof VALIDATION_STATE_SCRIPT_ERROR, basedOn?: Reference) => void;
|
|
18
|
+
updateFormData: (formUuid: string, observations: Form2Observation[], validationErrorType?: null | typeof VALIDATION_STATE_EMPTY | typeof VALIDATION_STATE_MANDATORY | typeof VALIDATION_STATE_INVALID | typeof VALIDATION_STATE_SCRIPT_ERROR | typeof VALIDATION_STATE_NOTES_REQUIRED, basedOn?: Reference) => void;
|
|
19
19
|
getFormData: (formUuid: string) => ObservationFormData | undefined;
|
|
20
20
|
setViewingForm: (form: ObservationForm | null) => void;
|
|
21
21
|
getAllObservations: () => Form2Observation[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observationFormsStore.d.ts","sourceRoot":"","sources":["../../src/stores/observationFormsStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,
|
|
1
|
+
{"version":3,"file":"observationFormsStore.d.ts","sourceRoot":"","sources":["../../src/stores/observationFormsStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC7B,+BAA+B,EAChC,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAChB,IAAI,GACJ,OAAO,sBAAsB,GAC7B,OAAO,0BAA0B,GACjC,OAAO,wBAAwB,GAC/B,OAAO,6BAA6B,GACpC,OAAO,+BAA+B,CAAC;IAC3C,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,eAAe,EAAE,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC/C,WAAW,EAAE,eAAe,GAAG,IAAI,CAAC;IACpC,OAAO,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACzC,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,cAAc,EAAE,CACd,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,gBAAgB,EAAE,EAChC,mBAAmB,CAAC,EAChB,IAAI,GACJ,OAAO,sBAAsB,GAC7B,OAAO,0BAA0B,GACjC,OAAO,wBAAwB,GAC/B,OAAO,6BAA6B,GACpC,OAAO,+BAA+B,EAC1C,OAAO,CAAC,EAAE,SAAS,KAChB,IAAI,CAAC;IACV,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,mBAAmB,GAAG,SAAS,CAAC;IACnE,cAAc,EAAE,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD,kBAAkB,EAAE,MAAM,gBAAgB,EAAE,CAAC;IAC7C,uBAAuB,EAAE,MAAM,KAAK,CAAC;QACnC,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,gBAAgB,EAAE,CAAC;QACjC,OAAO,CAAC,EAAE,SAAS,CAAC;KACrB,CAAC,CAAC;IACH,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,qBAAqB,CAAC;CACvC;AAUD,eAAO,MAAM,wBAAwB,oFA4JpC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as H, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
-
import { a as ie, u as de, s as le, Z as me, f as ue, G as ce, y as fe, v as ye, w as Ne, k as be, M as pe, g as ge, h as he, N as Ae, q as K, C as $, b as Oe, $ as V, i as Te, j as Ie, c as _e, A as Ee, l as Ce } from "./index-ZfyzcWgS.js";
|
|
3
|
-
import { useQueryClient as ve, useQuery as I } from "@tanstack/react-query";
|
|
4
|
-
import { useState as G, useMemo as i, useCallback as d } from "react";
|
|
5
|
-
const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_modalHeading__wnTmA", Be = "FormsTable-module_customAccordianItem__isszs", p = {
|
|
6
|
-
formsTableBody: Le,
|
|
7
|
-
modalHeading: Re,
|
|
8
|
-
customAccordianItem: Be
|
|
9
|
-
}, De = ({
|
|
10
|
-
episodeOfCareUuids: _,
|
|
11
|
-
encounterUuids: l,
|
|
12
|
-
config: j,
|
|
13
|
-
disableActions: x = !1,
|
|
14
|
-
activeEncounterUuid: y = null
|
|
15
|
-
}) => {
|
|
16
|
-
const { t: o } = ie(), m = de(), [g, E] = G(!1), [t, C] = G(null), {
|
|
17
|
-
numberOfVisits: z,
|
|
18
|
-
hideThumbnail: Q = !1,
|
|
19
|
-
forms: N
|
|
20
|
-
} = j ?? {}, Z = le(
|
|
21
|
-
Ce.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: b } = me(), h = Z && !x && !!y, v = ue(
|
|
23
|
-
_,
|
|
24
|
-
l
|
|
25
|
-
), P = ve(), {
|
|
26
|
-
data: L = [],
|
|
27
|
-
isLoading: R,
|
|
28
|
-
isError: B,
|
|
29
|
-
error: Y,
|
|
30
|
-
refetch: J
|
|
31
|
-
} = I({
|
|
32
|
-
queryKey: ["forms", m, _],
|
|
33
|
-
queryFn: () => ce(m, void 0, z),
|
|
34
|
-
enabled: !!m && !v
|
|
35
|
-
}), F = i(() => {
|
|
36
|
-
let e = L;
|
|
37
|
-
return l && l.length > 0 && (e = e.filter(
|
|
38
|
-
(r) => l.includes(r.encounterUuid)
|
|
39
|
-
)), Array.isArray(N) && N.length > 0 && (e = e.filter(
|
|
40
|
-
(r) => N.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
|
-
)), e;
|
|
42
|
-
}, [L, l, N]), { data: M = [] } = I({
|
|
43
|
-
queryKey: ["observationForms"],
|
|
44
|
-
queryFn: () => fe()
|
|
45
|
-
}), S = d(
|
|
46
|
-
(e) => {
|
|
47
|
-
const r = M.find(
|
|
48
|
-
(s) => s.name.toLowerCase() === e.toLowerCase()
|
|
49
|
-
);
|
|
50
|
-
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
51
|
-
if (!b || b.length === 0) return !1;
|
|
52
|
-
const a = new Set(b.map((s) => s.name));
|
|
53
|
-
return r.privileges.some(
|
|
54
|
-
(s) => a.has(s.privilegeName) && s.editable
|
|
55
|
-
);
|
|
56
|
-
},
|
|
57
|
-
[M, b]
|
|
58
|
-
), u = d(
|
|
59
|
-
(e) => !y || e.encounterUuid !== y ? !1 : S(e.formName),
|
|
60
|
-
[y, S]
|
|
61
|
-
), {
|
|
62
|
-
data: A,
|
|
63
|
-
isLoading: W,
|
|
64
|
-
isError: X,
|
|
65
|
-
error: O
|
|
66
|
-
} = I({
|
|
67
|
-
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
68
|
-
queryFn: () => ye(t.encounterUuid),
|
|
69
|
-
enabled: !!t?.encounterUuid && g
|
|
70
|
-
});
|
|
71
|
-
Ne(
|
|
72
|
-
(e) => {
|
|
73
|
-
e.patientUUID === m && (J(), P.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
74
|
-
},
|
|
75
|
-
[m]
|
|
76
|
-
);
|
|
77
|
-
const ee = i(() => !A?.entry || !t?.formName ? [] : A.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => be(e) ? pe(e)?.toLowerCase() === t.formName.toLowerCase() : !0), [A, t?.formName]), re = i(() => {
|
|
78
|
-
if (O)
|
|
79
|
-
return ge(O).message;
|
|
80
|
-
}, [O]), c = i(
|
|
81
|
-
() => [
|
|
82
|
-
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
83
|
-
{ key: "recordedBy", header: o("RECORDED_BY") }
|
|
84
|
-
],
|
|
85
|
-
[o]
|
|
86
|
-
), U = i(
|
|
87
|
-
() => [...c, { key: "actions", header: o("ACTIONS") }],
|
|
88
|
-
[c, o]
|
|
89
|
-
), ae = d(
|
|
90
|
-
(e) => h && e.some((r) => u(r)) ? U : c,
|
|
91
|
-
[h, u, U, c]
|
|
92
|
-
), oe = c, te = i(
|
|
93
|
-
() => [
|
|
94
|
-
{ key: "recordedOn", sortable: !0 },
|
|
95
|
-
{ key: "recordedBy", sortable: !0 }
|
|
96
|
-
],
|
|
97
|
-
[]
|
|
98
|
-
), D = i(() => {
|
|
99
|
-
const e = F.reduce(
|
|
100
|
-
(r, a) => {
|
|
101
|
-
const s = a.formName;
|
|
102
|
-
r[s] ??= [];
|
|
103
|
-
const f = a.providers.map((se) => se.providerName).filter(Boolean).join(", ");
|
|
104
|
-
return r[s].push({
|
|
105
|
-
id: a.encounterUuid,
|
|
106
|
-
formName: a.formName,
|
|
107
|
-
recordedOn: he(a.encounterDateTime, o, !0).formattedResult,
|
|
108
|
-
recordedBy: f ?? "--",
|
|
109
|
-
encounterDateTime: a.encounterDateTime,
|
|
110
|
-
encounterUuid: a.encounterUuid
|
|
111
|
-
}), r;
|
|
112
|
-
},
|
|
113
|
-
{}
|
|
114
|
-
);
|
|
115
|
-
return Object.entries(e).map(
|
|
116
|
-
([r, a]) => ({
|
|
117
|
-
formName: r,
|
|
118
|
-
records: a.sort(
|
|
119
|
-
(s, f) => f.encounterDateTime - s.encounterDateTime
|
|
120
|
-
)
|
|
121
|
-
})
|
|
122
|
-
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
123
|
-
}, [F, o]), k = d((e) => {
|
|
124
|
-
C(e), E(!0);
|
|
125
|
-
}, []), w = d(() => {
|
|
126
|
-
E(!1), C(null);
|
|
127
|
-
}, []), T = d((e) => {
|
|
128
|
-
Ae({
|
|
129
|
-
context: {
|
|
130
|
-
encounter: { resourceType: "Encounter", id: e.encounterUuid },
|
|
131
|
-
formName: e.formName,
|
|
132
|
-
directFormMode: !0
|
|
133
|
-
},
|
|
134
|
-
action: { type: "update", resourceType: "Observation" }
|
|
135
|
-
});
|
|
136
|
-
}, []), q = d(
|
|
137
|
-
(e, r) => {
|
|
138
|
-
switch (r) {
|
|
139
|
-
case "recordedOn":
|
|
140
|
-
return /* @__PURE__ */ n(Oe, { onClick: () => k(e), children: e.recordedOn });
|
|
141
|
-
case "recordedBy":
|
|
142
|
-
return e.recordedBy;
|
|
143
|
-
case "actions":
|
|
144
|
-
return u(e) ? /* @__PURE__ */ n(
|
|
145
|
-
K,
|
|
146
|
-
{
|
|
147
|
-
label: o("EDIT_OBSERVATION_FORM"),
|
|
148
|
-
kind: "ghost",
|
|
149
|
-
size: "sm",
|
|
150
|
-
testId: `edit-form-${e.encounterUuid}`,
|
|
151
|
-
onClick: () => T(e),
|
|
152
|
-
children: /* @__PURE__ */ n($, {})
|
|
153
|
-
}
|
|
154
|
-
) : null;
|
|
155
|
-
default:
|
|
156
|
-
return null;
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
[k, T, u, o]
|
|
160
|
-
);
|
|
161
|
-
return /* @__PURE__ */ H(ne, { children: [
|
|
162
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: R || B || D.length === 0 || v ? /* @__PURE__ */ n(
|
|
163
|
-
V,
|
|
164
|
-
{
|
|
165
|
-
headers: oe,
|
|
166
|
-
ariaLabel: o("FORMS_HEADING"),
|
|
167
|
-
rows: [],
|
|
168
|
-
loading: R,
|
|
169
|
-
errorStateMessage: B ? Y?.message : void 0,
|
|
170
|
-
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
171
|
-
renderCell: q,
|
|
172
|
-
className: p.formsTableBody,
|
|
173
|
-
dataTestId: "forms-table"
|
|
174
|
-
}
|
|
175
|
-
) : /* @__PURE__ */ n(Te, { align: "start", children: D.map((e, r) => {
|
|
176
|
-
const { formName: a, records: s } = e, f = ae(s);
|
|
177
|
-
return /* @__PURE__ */ n(
|
|
178
|
-
Ie,
|
|
179
|
-
{
|
|
180
|
-
title: a,
|
|
181
|
-
className: p.customAccordianItem,
|
|
182
|
-
testId: `accordian-title-${a}`,
|
|
183
|
-
open: r === 0,
|
|
184
|
-
children: /* @__PURE__ */ n(
|
|
185
|
-
V,
|
|
186
|
-
{
|
|
187
|
-
headers: f,
|
|
188
|
-
ariaLabel: o("FORMS_HEADING"),
|
|
189
|
-
rows: s,
|
|
190
|
-
loading: !1,
|
|
191
|
-
errorStateMessage: "",
|
|
192
|
-
sortable: te,
|
|
193
|
-
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
194
|
-
renderCell: q,
|
|
195
|
-
className: p.formsTableBody,
|
|
196
|
-
dataTestId: `forms-table-${a}`
|
|
197
|
-
}
|
|
198
|
-
)
|
|
199
|
-
},
|
|
200
|
-
a
|
|
201
|
-
);
|
|
202
|
-
}) }) }),
|
|
203
|
-
g && t && /* @__PURE__ */ n(
|
|
204
|
-
_e,
|
|
205
|
-
{
|
|
206
|
-
id: "modalIdForActionAreaLayout",
|
|
207
|
-
portalId: "main-display-area",
|
|
208
|
-
open: g,
|
|
209
|
-
onRequestClose: w,
|
|
210
|
-
modalHeading: /* @__PURE__ */ H("div", { className: p.modalHeading, children: [
|
|
211
|
-
/* @__PURE__ */ n("span", { children: t.formName }),
|
|
212
|
-
h && u(t) && /* @__PURE__ */ n(
|
|
213
|
-
K,
|
|
214
|
-
{
|
|
215
|
-
label: o("EDIT_OBSERVATION_FORM"),
|
|
216
|
-
kind: "ghost",
|
|
217
|
-
size: "sm",
|
|
218
|
-
testId: `edit-form-modal-${t.encounterUuid}`,
|
|
219
|
-
onClick: () => {
|
|
220
|
-
w(), T(t);
|
|
221
|
-
},
|
|
222
|
-
children: /* @__PURE__ */ n($, {})
|
|
223
|
-
}
|
|
224
|
-
)
|
|
225
|
-
] }),
|
|
226
|
-
modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
|
|
227
|
-
passiveModal: !0,
|
|
228
|
-
size: "md",
|
|
229
|
-
testId: "form-details-modal",
|
|
230
|
-
children: /* @__PURE__ */ n(
|
|
231
|
-
Ee,
|
|
232
|
-
{
|
|
233
|
-
observations: ee,
|
|
234
|
-
isLoading: W,
|
|
235
|
-
isError: X,
|
|
236
|
-
errorMessage: re,
|
|
237
|
-
emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
|
|
238
|
-
testIdPrefix: t.formName,
|
|
239
|
-
hideThumbnail: Q,
|
|
240
|
-
formName: t.formName
|
|
241
|
-
}
|
|
242
|
-
)
|
|
243
|
-
}
|
|
244
|
-
)
|
|
245
|
-
] });
|
|
246
|
-
};
|
|
247
|
-
export {
|
|
248
|
-
De as default
|
|
249
|
-
};
|