@bahmni/clinical-app 0.0.1-dev.374 → 0.0.1-dev.376
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-BDLSPmoA.js → ConsultationPage-Bbcob8W9.js} +112 -112
- package/dist/{DocumentsTable-Cx3H-xNc-DoN77TEz.js → DocumentsTable-Camh1NL_-CW4h2V_d.js} +19 -19
- package/dist/{FormsTable-BRgVe8lS-BQsG4m2x.js → FormsTable-zIqDMMyQ-DYUAJs1D.js} +79 -79
- package/dist/{LNWAZHJI-Dsp6EgmW.js → LNWAZHJI-iDTAvBQq.js} +2 -2
- package/dist/{MWZ6AO7Z-BHbP1AQg.js → MWZ6AO7Z-CC6GNKh8.js} +2 -2
- package/dist/{Observations-BZ0HyAoB-lxP1x5SW.js → Observations-Bv27iPPT-QfIhnRxO.js} +43 -43
- package/dist/{YPM2AS64-CEGgzhAq.js → YPM2AS64-DJV6yazp.js} +1 -1
- package/dist/{hook-CVhjmeas.js → hook-xjC_sgLM.js} +1 -1
- package/dist/{index-D0-iBtyH.js → index-CdJk8bVX.js} +32037 -31942
- package/dist/{index-Cmilatk1.js → index-Cw4GpD74.js} +10 -10
- package/dist/{index-COTXkJn5.js → index-CxBa5hpR.js} +4 -4
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +4 -0
- package/dist/locales/locale_es.json +4 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { B, v as ENCOUNTER_CONCEPTS_URL, Y as Yr, C as Ci, w as BAHMNI_USER_LOCATION_COOKIE_NAME, u as useTranslation,
|
|
2
|
+
import { t as B, v as ENCOUNTER_CONCEPTS_URL, Y as Yr, C as Ci, w as BAHMNI_USER_LOCATION_COOKIE_NAME, u as useTranslation, z as Lm, A as vSe, g as gr, I as ZH2, K as BH2, M as RH2, N as gM2, S as rc1, $ as $H2, V as AE, _ as Di, a0 as Dd, a1 as dE, a2 as Id, a3 as vs, a4 as dist, a5 as yt, a6 as ge, a7 as ss, a8 as Mb, a9 as Kb, aa as Wb, ab as PH2, ac as YH2, ad as oV2, G as G1, H as H3, ae as Jb, af as fH2, ag as HH2, ah as hC2, ai as QH2, aj as XH2, X as XYt, ak as R_, al as OH2, am as Y_, an as Ps, ao as P_, ap as mv, aq as Yb, ar as CH2, as as n_, at as a_, au as CLINICAL_V2_CONFIG_BASE_URL, av as d_, aw as CE, ax as Qr, ay as c_, az as qb, aA as gv, aB as Og2, aC as $_, aD as l_, aE as f_, aF as Ev, aG as TH2, aH as Dv, aI as kb, aJ as p_, aK as Rt, aL as jr, aM as Rv, aN as Nv, Q as Qn, aO as Q_, aP as I_, aQ as L_, B as BYt, aR as sC2, aS as fC2, aT as ev, aU as Z_, aV as STOP_REASON_VALUESET_URL, aW as STOP_REASON_VALUESET_EXPAND_URL, aX as STOP_MEDICATION_URL, aY as xH2, aZ as mf, a_ as es$2, a$ as lC2, b0 as X_, b1 as rv, b2 as YE, b3 as Lb, b4 as zE, b5 as an, b6 as N4, b7 as c3, b8 as cC2, b9 as _E, ba as tv, bb as sv, bc as ov, bd as av, be as Ii, bf as ns, bg as F_, bh as Zb, bi as Iv, bj as yv, bk as wv, bl as hv, bm as CDSS_SERVER_CONFIG_URL, bn as t_, bo as Mi, bp as wb, bq as Ze, br as KH2, bs as rJt, bt as qH2, bu as Xy, bv as j_, bw as V_, bx as SH2, by as ml1, bz as z_, bA as B_, bB as H_, bC as ZYt, bD as SYt, bE as KE, bF as G_, bG as aE, bH as BAHMNI_CLINICAL_PATH, bI as RE, bJ as sw, bK as GH2, bL as jH2, bM as QE2, bN as GGt, bO as SE, bP as GYt } from "./index-CdJk8bVX.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import React__default, { createContext, useContext, useState, useCallback, useEffect, useMemo, Children, useRef, useLayoutEffect, forwardRef, isValidElement, cloneElement, useReducer, Component, useImperativeHandle, PureComponent, createRef, useSyncExternalStore, Suspense } from "react";
|
|
5
5
|
import { useQuery, useQueries, useQueryClient } from "@tanstack/react-query";
|
|
6
6
|
import { useNavigate, useSearchParams } from "react-router-dom";
|
|
7
|
-
import { u as useClinicalConfig } from "./hook-
|
|
7
|
+
import { u as useClinicalConfig } from "./hook-xjC_sgLM.js";
|
|
8
8
|
import * as ReactDOM from "react-dom";
|
|
9
9
|
import ReactDOM__default, { createPortal } from "react-dom";
|
|
10
10
|
var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
@@ -2046,7 +2046,7 @@ const useLocations = () => {
|
|
|
2046
2046
|
encounterSessionStartContext: p,
|
|
2047
2047
|
inputControlConfig: c
|
|
2048
2048
|
}) => {
|
|
2049
|
-
const a = p?.isVisitActive ?? !0, { t: s } = useTranslation(), f =
|
|
2049
|
+
const a = p?.isVisitActive ?? !0, { t: s } = useTranslation(), f = vSe(), d = gr(), {
|
|
2050
2050
|
activeVisit: h,
|
|
2051
2051
|
loading: E,
|
|
2052
2052
|
error: C
|
|
@@ -2342,12 +2342,12 @@ const ALLERGY_INTOLERANCE_RESOURCE_TYPE = "AllergyIntolerance", ALLERGY_SEVERITY
|
|
|
2342
2342
|
const a = {
|
|
2343
2343
|
coding: p
|
|
2344
2344
|
};
|
|
2345
|
-
return
|
|
2345
|
+
return AE(c) || (a.text = c), a;
|
|
2346
2346
|
}, createCoding = (p, c, a) => {
|
|
2347
2347
|
const s = {
|
|
2348
2348
|
code: p
|
|
2349
2349
|
};
|
|
2350
|
-
return
|
|
2350
|
+
return AE(c) || (s.system = c), AE(a) || (s.display = a), s;
|
|
2351
2351
|
}, createEncounterAllergyResource = (p, c, a, s, f, d, h) => {
|
|
2352
2352
|
const E = {
|
|
2353
2353
|
resourceType: "AllergyIntolerance",
|
|
@@ -2411,7 +2411,7 @@ const ALLERGY_INTOLERANCE_RESOURCE_TYPE = "AllergyIntolerance", ALLERGY_SEVERITY
|
|
|
2411
2411
|
verificationStatus: createCodeableConcept([
|
|
2412
2412
|
createCoding(
|
|
2413
2413
|
c,
|
|
2414
|
-
|
|
2414
|
+
dE
|
|
2415
2415
|
)
|
|
2416
2416
|
]),
|
|
2417
2417
|
encounter: s,
|
|
@@ -139483,7 +139483,7 @@ function createConditionsBundleEntries({
|
|
|
139483
139483
|
for (const h of p) {
|
|
139484
139484
|
if (!h || typeof h.durationValue != "number" || !h.durationUnit || h.durationValue === null || h.durationUnit === null)
|
|
139485
139485
|
throw new Error(CONSULTATION_ERROR_MESSAGES.INVALID_CONDITION_PARAMS);
|
|
139486
|
-
const E =
|
|
139486
|
+
const E = Mb(
|
|
139487
139487
|
f,
|
|
139488
139488
|
h.durationValue,
|
|
139489
139489
|
h.durationUnit
|
|
@@ -139592,13 +139592,13 @@ const useAllergenSearch = (p = "") => {
|
|
|
139592
139592
|
allergyReactionUuid: Z
|
|
139593
139593
|
} = T.consultationPad.allergyConceptMap;
|
|
139594
139594
|
try {
|
|
139595
|
-
const k = await
|
|
139595
|
+
const k = await Kb(
|
|
139596
139596
|
D,
|
|
139597
139597
|
z,
|
|
139598
139598
|
O
|
|
139599
139599
|
);
|
|
139600
139600
|
a(k);
|
|
139601
|
-
const U = await
|
|
139601
|
+
const U = await Wb(Z);
|
|
139602
139602
|
f(U);
|
|
139603
139603
|
} catch (k) {
|
|
139604
139604
|
const U = Yr(k);
|
|
@@ -139770,9 +139770,9 @@ const allergiesFormTile = "AllergiesForm-module_allergiesFormTile__1UsbU", aller
|
|
|
139770
139770
|
duplicateNotification: duplicateNotification$2
|
|
139771
139771
|
}, allergiesQueryKeys = (p) => ["allergies", p], AllergiesForm = React__default.memo(({ encounterSessionStartContext: p }) => {
|
|
139772
139772
|
const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = gr(), { addNotification: f } = G1(), d = H3(
|
|
139773
|
-
|
|
139773
|
+
XYt.ALLERGIES
|
|
139774
139774
|
), h = H3(
|
|
139775
|
-
|
|
139775
|
+
XYt.EDIT_ALLERGIES
|
|
139776
139776
|
), [E, C] = useState(""), [R, T] = useState(null), [H, M] = useState(!1), [I, F] = useState(
|
|
139777
139777
|
null
|
|
139778
139778
|
), {
|
|
@@ -139794,7 +139794,7 @@ const allergiesFormTile = "AllergiesForm-module_allergiesFormTile__1UsbU", aller
|
|
|
139794
139794
|
} = useQuery({
|
|
139795
139795
|
queryKey: allergiesQueryKeys(s),
|
|
139796
139796
|
enabled: !!s && d,
|
|
139797
|
-
queryFn: () =>
|
|
139797
|
+
queryFn: () => Jb(s)
|
|
139798
139798
|
});
|
|
139799
139799
|
useEffect(() => {
|
|
139800
139800
|
fe && f({
|
|
@@ -139985,7 +139985,7 @@ const useInvestigationsSearch = (p = "") => {
|
|
|
139985
139985
|
(async () => {
|
|
139986
139986
|
try {
|
|
139987
139987
|
d(!0), E(null);
|
|
139988
|
-
const H = await
|
|
139988
|
+
const H = await R_();
|
|
139989
139989
|
s(H);
|
|
139990
139990
|
} catch (H) {
|
|
139991
139991
|
const M = Yr(H);
|
|
@@ -140095,8 +140095,8 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
|
|
|
140095
140095
|
duplicateNotification: duplicateNotification$1
|
|
140096
140096
|
}, InvestigationsForm = React__default.memo(() => {
|
|
140097
140097
|
const { t: p } = useTranslation(), c = gr(), { addNotification: a } = G1(), s = H3(
|
|
140098
|
-
|
|
140099
|
-
), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), { activeEncounter: T, matchReasons: H } =
|
|
140098
|
+
XYt.INVESTIGATIONS
|
|
140099
|
+
), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), { activeEncounter: T, matchReasons: H } = Y_(), I = H.includes("MATCHED") ? T?.id : void 0, {
|
|
140100
140100
|
data: F,
|
|
140101
140101
|
refetch: $,
|
|
140102
140102
|
error: D
|
|
@@ -140106,7 +140106,7 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
|
|
|
140106
140106
|
staleTime: 3e4,
|
|
140107
140107
|
queryFn: async () => {
|
|
140108
140108
|
const ne = await Ps();
|
|
140109
|
-
return
|
|
140109
|
+
return P_(
|
|
140110
140110
|
ne.results,
|
|
140111
140111
|
c,
|
|
140112
140112
|
[I]
|
|
@@ -140119,7 +140119,7 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
|
|
|
140119
140119
|
message: D.message,
|
|
140120
140120
|
type: "error"
|
|
140121
140121
|
});
|
|
140122
|
-
}, [D, a, p]),
|
|
140122
|
+
}, [D, a, p]), mv(
|
|
140123
140123
|
(ne) => {
|
|
140124
140124
|
ne.patientUUID === c && Object.keys(ne.updatedResources.serviceRequests ?? {}).length > 0 && $();
|
|
140125
140125
|
},
|
|
@@ -140312,7 +140312,7 @@ const useConceptSearch = (p, c = 20, a = 500) => {
|
|
|
140312
140312
|
(async () => {
|
|
140313
140313
|
h(!0), C(null);
|
|
140314
140314
|
try {
|
|
140315
|
-
const H = await
|
|
140315
|
+
const H = await Yb(R, c);
|
|
140316
140316
|
f(H);
|
|
140317
140317
|
} catch (H) {
|
|
140318
140318
|
C(
|
|
@@ -140508,7 +140508,7 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
|
|
|
140508
140508
|
duplicateNotification
|
|
140509
140509
|
}, ConditionsAndDiagnoses = React__default.memo(() => {
|
|
140510
140510
|
const { t: p } = useTranslation(), c = gr(), { addNotification: a } = G1(), s = H3(
|
|
140511
|
-
|
|
140511
|
+
XYt.CONDITIONS_AND_DIAGNOSES
|
|
140512
140512
|
), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), {
|
|
140513
140513
|
selectedDiagnoses: T,
|
|
140514
140514
|
selectedConditions: H,
|
|
@@ -140530,7 +140530,7 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
|
|
|
140530
140530
|
} = useQuery({
|
|
140531
140531
|
queryKey: ["conditions", c],
|
|
140532
140532
|
enabled: !!c && s,
|
|
140533
|
-
queryFn: () =>
|
|
140533
|
+
queryFn: () => n_(c)
|
|
140534
140534
|
}), {
|
|
140535
140535
|
data: Q,
|
|
140536
140536
|
isLoading: V,
|
|
@@ -140539,9 +140539,9 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
|
|
|
140539
140539
|
} = useQuery({
|
|
140540
140540
|
queryKey: ["diagnoses", c],
|
|
140541
140541
|
enabled: !!c && s,
|
|
140542
|
-
queryFn: () =>
|
|
140542
|
+
queryFn: () => a_(c)
|
|
140543
140543
|
});
|
|
140544
|
-
|
|
140544
|
+
mv(
|
|
140545
140545
|
(ae) => {
|
|
140546
140546
|
ae.patientUUID === c && ae.updatedResources.conditions && (ee(), K());
|
|
140547
140547
|
},
|
|
@@ -140775,7 +140775,7 @@ const useMedicationSearch = (p, c = 20, a = 500) => {
|
|
|
140775
140775
|
(async () => {
|
|
140776
140776
|
h(!0), C(null);
|
|
140777
140777
|
try {
|
|
140778
|
-
const H = await
|
|
140778
|
+
const H = await d_(R, c);
|
|
140779
140779
|
f(getMedicationsFromBundle(H));
|
|
140780
140780
|
} catch (H) {
|
|
140781
140781
|
C(
|
|
@@ -141095,7 +141095,7 @@ function getMedicationRequestComboBoxItems(p, c, a, s, f) {
|
|
|
141095
141095
|
displayName: getMedicationDisplay(h),
|
|
141096
141096
|
disabled: !1
|
|
141097
141097
|
}));
|
|
141098
|
-
return
|
|
141098
|
+
return CE(a, s, d, toSentinel, f);
|
|
141099
141099
|
}
|
|
141100
141100
|
function getVaccinationComboBoxItems(p, c, a, s, f) {
|
|
141101
141101
|
if (!p.trim()) return [];
|
|
@@ -141106,7 +141106,7 @@ function getVaccinationComboBoxItems(p, c, a, s, f) {
|
|
|
141106
141106
|
displayName: getMedicationDisplay(h),
|
|
141107
141107
|
disabled: !1
|
|
141108
141108
|
}));
|
|
141109
|
-
return
|
|
141109
|
+
return CE(
|
|
141110
141110
|
a,
|
|
141111
141111
|
s,
|
|
141112
141112
|
d,
|
|
@@ -141300,7 +141300,7 @@ function validateEntry$1(p, c) {
|
|
|
141300
141300
|
return { entry: { ...p, errors: a, hasBeenValidated: !0 }, valid: s };
|
|
141301
141301
|
}
|
|
141302
141302
|
function createMedicationRequestStore(p) {
|
|
141303
|
-
const c = p ===
|
|
141303
|
+
const c = p === c_;
|
|
141304
141304
|
return createStore((a, s) => ({
|
|
141305
141305
|
selectedMedicationRequests: [],
|
|
141306
141306
|
attributes: void 0,
|
|
@@ -141526,7 +141526,7 @@ const column$2 = "SelectedMedicationRequestItem-module_column__RoFL-", itemTitle
|
|
|
141526
141526
|
updateDispenseQuantity: $,
|
|
141527
141527
|
updateDispenseUnit: D,
|
|
141528
141528
|
updateNote: z
|
|
141529
|
-
} = useMedicationRequestStore(a), { t: O } = useTranslation(), Z = a ===
|
|
141529
|
+
} = useMedicationRequestStore(a), { t: O } = useTranslation(), Z = a === c_, {
|
|
141530
141530
|
id: k,
|
|
141531
141531
|
dosage: U,
|
|
141532
141532
|
dosageUnit: W,
|
|
@@ -141571,10 +141571,10 @@ const column$2 = "SelectedMedicationRequestItem-module_column__RoFL-", itemTitle
|
|
|
141571
141571
|
const de = c.frequencies.find(isImmediateFrequency);
|
|
141572
141572
|
de && E(k, de);
|
|
141573
141573
|
}
|
|
141574
|
-
se && F(k,
|
|
141574
|
+
se && F(k, qb());
|
|
141575
141575
|
} else if (se) {
|
|
141576
141576
|
const de = c.frequencies.find(isImmediateFrequency);
|
|
141577
|
-
de && E(k, de), R(k, 0), T(k, null), F(k,
|
|
141577
|
+
de && E(k, de), R(k, 0), T(k, null), F(k, qb());
|
|
141578
141578
|
}
|
|
141579
141579
|
}
|
|
141580
141580
|
}, [
|
|
@@ -141601,7 +141601,7 @@ const column$2 = "SelectedMedicationRequestItem-module_column__RoFL-", itemTitle
|
|
|
141601
141601
|
});
|
|
141602
141602
|
}, []), useEffect(() => {
|
|
141603
141603
|
const de = f?.filter((_e) => _e.event === "onSelect") ?? [];
|
|
141604
|
-
de.length > 0 &&
|
|
141604
|
+
de.length > 0 && gv({
|
|
141605
141605
|
controlKey: a,
|
|
141606
141606
|
itemId: k,
|
|
141607
141607
|
rules: de
|
|
@@ -141860,7 +141860,7 @@ const column$2 = "SelectedMedicationRequestItem-module_column__RoFL-", itemTitle
|
|
|
141860
141860
|
datePickerType: "single",
|
|
141861
141861
|
"data-testid": `${a}-start-date-picker-${k}-test-id`,
|
|
141862
141862
|
value: ie,
|
|
141863
|
-
minDate:
|
|
141863
|
+
minDate: qb(),
|
|
141864
141864
|
onChange: (de) => {
|
|
141865
141865
|
F(k, de[0]);
|
|
141866
141866
|
},
|
|
@@ -141961,11 +141961,11 @@ const $schema$2 = "http://json-schema.org/draft-07/schema#", title$4 = "Medicati
|
|
|
141961
141961
|
cdsCard: cdsCard$1
|
|
141962
141962
|
}, MedicationRequestForm = React__default.memo(({ inputControlConfig: p }) => {
|
|
141963
141963
|
const { t: c } = useTranslation(), {
|
|
141964
|
-
type: a =
|
|
141964
|
+
type: a = c_,
|
|
141965
141965
|
label: s = "MEDICATIONS_INPUT_CONTROL_TITLE",
|
|
141966
141966
|
attributes: f = [],
|
|
141967
141967
|
cdss: d = []
|
|
141968
|
-
} = p ?? {}, h = a ===
|
|
141968
|
+
} = p ?? {}, h = a === c_, [E, C] = useState(""), {
|
|
141969
141969
|
data: R,
|
|
141970
141970
|
isLoading: T,
|
|
141971
141971
|
error: H
|
|
@@ -141973,11 +141973,11 @@ const $schema$2 = "http://json-schema.org/draft-07/schema#", title$4 = "Medicati
|
|
|
141973
141973
|
queryKey: ["medicationConfig"],
|
|
141974
141974
|
queryFn: async () => {
|
|
141975
141975
|
const [Y, ne] = await Promise.all([
|
|
141976
|
-
|
|
141976
|
+
$_(
|
|
141977
141977
|
MEDICATIONS_CONFIG_URL,
|
|
141978
141978
|
medicationConfigSchema
|
|
141979
141979
|
),
|
|
141980
|
-
|
|
141980
|
+
l_()
|
|
141981
141981
|
]);
|
|
141982
141982
|
return { ...ne, ...Y };
|
|
141983
141983
|
}
|
|
@@ -141991,7 +141991,7 @@ const $schema$2 = "http://json-schema.org/draft-07/schema#", title$4 = "Medicati
|
|
|
141991
141991
|
error: z
|
|
141992
141992
|
} = useQuery({
|
|
141993
141993
|
queryKey: ["vaccination"],
|
|
141994
|
-
queryFn:
|
|
141994
|
+
queryFn: f_,
|
|
141995
141995
|
enabled: !h
|
|
141996
141996
|
}), O = useMemo(
|
|
141997
141997
|
() => $ ? getMedicationsFromBundle($) : [],
|
|
@@ -142008,11 +142008,11 @@ const $schema$2 = "http://json-schema.org/draft-07/schema#", title$4 = "Medicati
|
|
|
142008
142008
|
), [N, R]);
|
|
142009
142009
|
useEffect(() => {
|
|
142010
142010
|
W(f), V && getMedicationRequestStore(a).getState().loadMedicationsForEdit(V);
|
|
142011
|
-
}, [V, a]),
|
|
142011
|
+
}, [V, a]), Ev((Y) => {
|
|
142012
142012
|
const { cards: ne } = Y, oe = new Set(
|
|
142013
142013
|
Z.map((ae) => ae.id)
|
|
142014
142014
|
);
|
|
142015
|
-
|
|
142015
|
+
Dv(ne, oe).forEach(({ card: ae, resourceId: re }) => {
|
|
142016
142016
|
K(re, [ae]);
|
|
142017
142017
|
});
|
|
142018
142018
|
});
|
|
@@ -142160,7 +142160,7 @@ const registerMedicationRequestControl = (p) => {
|
|
|
142160
142160
|
hasCriticalCDSCards: () => c().getState().hasCriticalCDSCards()
|
|
142161
142161
|
});
|
|
142162
142162
|
};
|
|
142163
|
-
registerMedicationRequestControl(
|
|
142163
|
+
registerMedicationRequestControl(c_);
|
|
142164
142164
|
registerMedicationRequestControl(VACCINATIONS_INPUT_CONTROL_KEY);
|
|
142165
142165
|
const IMMUNIZATION_HISTORY_INPUT_CONTROL_KEY = "immunizationHistory", IMMUNIZATION_ADMINISTRATION_INPUT_CONTROL_KEY = "immunizationAdministration", IMMUNIZATION_WAIVER_INPUT_CONTROL_KEY = "immunizationWaiver", ADMINISTERED_PRODUCT_EXTENSION_URL = "http://fhir.bahmni.org/ext/immunization/administeredProduct", BASED_ON_EXTENSION_URL = "http://fhir.bahmni.org/ext/immunization/basedOn", STOCK_LOCATION_EXTENSION_URL = "http://fhir.bahmni.org/ext/immunization/stockLocation", ENTERING_PROVIDER_SYSTEM = "http://terminology.hl7.org/CodeSystem/v2-0443", ENTERING_PROVIDER_CODE = "EP", ENTERING_PROVIDER_DISPLAY = "Entering Provider";
|
|
142166
142166
|
function resolveAdministeredProductExtension(p) {
|
|
@@ -142254,7 +142254,7 @@ function getBatchNumberComboBoxItems(p, c, a) {
|
|
|
142254
142254
|
}
|
|
142255
142255
|
function formatBatchItemDisplay(p, c) {
|
|
142256
142256
|
if (!p) return "";
|
|
142257
|
-
const a = p.expiryDate ? ` [${
|
|
142257
|
+
const a = p.expiryDate ? ` [${kb(p.expiryDate, c, !1, "d MMM yyyy").formattedResult}]` : "", s = p.stockLocationName ? ` - ${p.stockLocationName}` : "";
|
|
142258
142258
|
return p.batchNumber + a + s;
|
|
142259
142259
|
}
|
|
142260
142260
|
function getLocationComboBoxItems(p, c) {
|
|
@@ -142267,7 +142267,7 @@ function getComboBoxItems(p, c, a, s, f) {
|
|
|
142267
142267
|
const h = (c?.expansion?.contains ?? []).filter(
|
|
142268
142268
|
(E) => E.display?.toLowerCase().includes(p.toLowerCase())
|
|
142269
142269
|
);
|
|
142270
|
-
return
|
|
142270
|
+
return CE(
|
|
142271
142271
|
a,
|
|
142272
142272
|
s,
|
|
142273
142273
|
h,
|
|
@@ -142687,7 +142687,7 @@ const form = "ImmunizationForm-module_form__e68vP", title$2 = "ImmunizationForm-
|
|
|
142687
142687
|
fe && ne(!0);
|
|
142688
142688
|
}, [fe]), useEffect(() => {
|
|
142689
142689
|
const Be = M?.filter((Ue) => Ue.event === "onSelect") ?? [];
|
|
142690
|
-
Be.length > 0 &&
|
|
142690
|
+
Be.length > 0 && gv({
|
|
142691
142691
|
controlKey: C,
|
|
142692
142692
|
itemId: V,
|
|
142693
142693
|
rules: Be
|
|
@@ -143050,7 +143050,7 @@ const form = "ImmunizationForm-module_form__e68vP", title$2 = "ImmunizationForm-
|
|
|
143050
143050
|
isError: O
|
|
143051
143051
|
} = useQuery({
|
|
143052
143052
|
queryKey: ["medication", $],
|
|
143053
|
-
queryFn: () =>
|
|
143053
|
+
queryFn: () => p_($),
|
|
143054
143054
|
enabled: !!I && !!$,
|
|
143055
143055
|
staleTime: 1 / 0
|
|
143056
143056
|
}), { isLoading: Z, error: k } = useClinicalConfig(), U = Rt(), {
|
|
@@ -143063,11 +143063,11 @@ const form = "ImmunizationForm-module_form__e68vP", title$2 = "ImmunizationForm-
|
|
|
143063
143063
|
N && T(N);
|
|
143064
143064
|
}, [N, T]), useEffect(() => {
|
|
143065
143065
|
ie && H({ otherReasonConceptUuid: ie });
|
|
143066
|
-
}, [ie, H]),
|
|
143066
|
+
}, [ie, H]), Ev((at) => {
|
|
143067
143067
|
const { cards: nt } = at, it = new Set(
|
|
143068
143068
|
R.map((Vt) => Vt.id)
|
|
143069
143069
|
);
|
|
143070
|
-
|
|
143070
|
+
Dv(nt, it).forEach(({ card: Vt, resourceId: vt }) => {
|
|
143071
143071
|
M(vt, [Vt]);
|
|
143072
143072
|
});
|
|
143073
143073
|
});
|
|
@@ -143086,7 +143086,7 @@ const form = "ImmunizationForm-module_form__e68vP", title$2 = "ImmunizationForm-
|
|
|
143086
143086
|
error: le
|
|
143087
143087
|
} = useQuery({
|
|
143088
143088
|
queryKey: ["administeredLocationTag", se],
|
|
143089
|
-
queryFn: () =>
|
|
143089
|
+
queryFn: () => Rv(se),
|
|
143090
143090
|
enabled: !h && !!se && !Z && !k && !!findAttr("administeredLocation", N),
|
|
143091
143091
|
staleTime: 1 / 0
|
|
143092
143092
|
}), {
|
|
@@ -143122,7 +143122,7 @@ const form = "ImmunizationForm-module_form__e68vP", title$2 = "ImmunizationForm-
|
|
|
143122
143122
|
error: je
|
|
143123
143123
|
} = useQuery({
|
|
143124
143124
|
queryKey: ["vaccination"],
|
|
143125
|
-
queryFn:
|
|
143125
|
+
queryFn: f_,
|
|
143126
143126
|
staleTime: 1 / 0
|
|
143127
143127
|
}), Je = useMemo(
|
|
143128
143128
|
() => Fe?.entry?.filter((at) => at.resource?.resourceType === "Medication").map((at) => at.resource) ?? [],
|
|
@@ -143132,7 +143132,7 @@ const form = "ImmunizationForm-module_form__e68vP", title$2 = "ImmunizationForm-
|
|
|
143132
143132
|
const nt = at.administeredLocation?.uuid;
|
|
143133
143133
|
return {
|
|
143134
143134
|
queryKey: ["availableStocks", at.drug?.code, nt],
|
|
143135
|
-
queryFn: () =>
|
|
143135
|
+
queryFn: () => Nv(at.drug.code, nt),
|
|
143136
143136
|
enabled: !h && !!ne && !!at.drug?.code && !!nt
|
|
143137
143137
|
};
|
|
143138
143138
|
})
|
|
@@ -143330,7 +143330,7 @@ const canUserAccessForm = (p, c) => {
|
|
|
143330
143330
|
error: h
|
|
143331
143331
|
} = useQuery({
|
|
143332
143332
|
queryKey: ["observationForms", c],
|
|
143333
|
-
queryFn: () =>
|
|
143333
|
+
queryFn: () => Q_(c)
|
|
143334
143334
|
});
|
|
143335
143335
|
return {
|
|
143336
143336
|
forms: useMemo(() => {
|
|
@@ -143355,7 +143355,7 @@ const canUserAccessForm = (p, c) => {
|
|
|
143355
143355
|
try {
|
|
143356
143356
|
if (!p)
|
|
143357
143357
|
throw new Error(PINNED_FORMS_ERROR_MESSAGES.USER_NOT_FOUND);
|
|
143358
|
-
const c = await B(
|
|
143358
|
+
const c = await B(I_(p));
|
|
143359
143359
|
if (!c || typeof c != "object")
|
|
143360
143360
|
return [];
|
|
143361
143361
|
const a = c.userProperties?.pinnedObsTemplates ?? "";
|
|
@@ -143373,7 +143373,7 @@ const canUserAccessForm = (p, c) => {
|
|
|
143373
143373
|
const a = c.filter(
|
|
143374
143374
|
(s) => typeof s == "string" && s.trim().length > 0
|
|
143375
143375
|
);
|
|
143376
|
-
await ge(
|
|
143376
|
+
await ge(I_(p), {
|
|
143377
143377
|
userProperties: {
|
|
143378
143378
|
pinnedObsTemplates: a.join(PINNED_FORMS_DELIMITER)
|
|
143379
143379
|
}
|
|
@@ -143443,7 +143443,7 @@ function usePinnedObservationForms(p, c) {
|
|
|
143443
143443
|
return { pinnedForms: f, updatePinnedForms: M, isLoading: !h, error: C, refetch: I };
|
|
143444
143444
|
}
|
|
143445
143445
|
function useSubmittedEncounterForms(p) {
|
|
143446
|
-
const c = gr(), { activeEncounter: a, matchReasons: s } =
|
|
143446
|
+
const c = gr(), { activeEncounter: a, matchReasons: s } = Y_(), f = s.includes("MATCHED") ? a?.id : void 0, {
|
|
143447
143447
|
data: d,
|
|
143448
143448
|
refetch: h,
|
|
143449
143449
|
error: E
|
|
@@ -143451,11 +143451,11 @@ function useSubmittedEncounterForms(p) {
|
|
|
143451
143451
|
queryKey: ["submittedEncounterForms", c, f],
|
|
143452
143452
|
enabled: !!f && !!c,
|
|
143453
143453
|
staleTime: 3e4,
|
|
143454
|
-
queryFn: () =>
|
|
143454
|
+
queryFn: () => L_(f)
|
|
143455
143455
|
});
|
|
143456
143456
|
return useEffect(() => {
|
|
143457
143457
|
E && console.error("Failed to fetch submitted encounter forms", E);
|
|
143458
|
-
}, [E]),
|
|
143458
|
+
}, [E]), mv(
|
|
143459
143459
|
(C) => {
|
|
143460
143460
|
C.patientUUID === c && h();
|
|
143461
143461
|
},
|
|
@@ -143463,7 +143463,7 @@ function useSubmittedEncounterForms(p) {
|
|
|
143463
143463
|
), useMemo(() => {
|
|
143464
143464
|
const C = d?.entry?.map((T) => T.resource).filter((T) => T?.resourceType === "Observation") ?? [], R = /* @__PURE__ */ new Set();
|
|
143465
143465
|
for (const T of C) {
|
|
143466
|
-
const H =
|
|
143466
|
+
const H = BYt(T);
|
|
143467
143467
|
if (!H) continue;
|
|
143468
143468
|
const M = p.find((I) => I.name === H);
|
|
143469
143469
|
M && R.add(M.uuid);
|
|
@@ -143488,7 +143488,7 @@ const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0b
|
|
|
143488
143488
|
submittedFormUuids: R = EMPTY_SET
|
|
143489
143489
|
}) => {
|
|
143490
143490
|
const { t: T } = useTranslation(), H = H3(
|
|
143491
|
-
|
|
143491
|
+
XYt.OBSERVATIONS
|
|
143492
143492
|
), [M, I] = useState(""), [F, $] = useState(null), { getFormData: D } = useObservationFormsStore(), z = useMemo(() => {
|
|
143493
143493
|
if (!M.trim()) return h;
|
|
143494
143494
|
const ne = M.toLowerCase().trim().split(/\s+/);
|
|
@@ -143672,7 +143672,7 @@ ObservationForms.displayName = "ObservationForms";
|
|
|
143672
143672
|
const ObservationFormsPanel = ({
|
|
143673
143673
|
encounterSessionStartContext: p
|
|
143674
143674
|
}) => {
|
|
143675
|
-
const { user: c } =
|
|
143675
|
+
const { user: c } = vSe(), a = gr(), { episodeOfCare: s } = useClinicalAppData(), f = s.map((V) => V.uuid), {
|
|
143676
143676
|
forms: d,
|
|
143677
143677
|
isLoading: h,
|
|
143678
143678
|
error: E
|
|
@@ -143714,18 +143714,18 @@ const ObservationFormsPanel = ({
|
|
|
143714
143714
|
);
|
|
143715
143715
|
if (!V) return;
|
|
143716
143716
|
const fe = `${U}:${k}`;
|
|
143717
|
-
K.current !== fe && (K.current = fe,
|
|
143717
|
+
K.current !== fe && (K.current = fe, L_(U).then(async (ee) => {
|
|
143718
143718
|
const se = bundleExports.getObservationsFromFhir(ee).filter(
|
|
143719
143719
|
(oe) => oe.formFieldPath?.toLowerCase().startsWith(`${k.toLowerCase()}.`)
|
|
143720
143720
|
);
|
|
143721
143721
|
let Y = V, ne = null;
|
|
143722
143722
|
if (a) {
|
|
143723
|
-
const ie = (await
|
|
143723
|
+
const ie = (await ev(a).catch(
|
|
143724
143724
|
() => []
|
|
143725
143725
|
)).find(
|
|
143726
143726
|
(ae) => ae.encounterUuid === U && ae.formName.toLowerCase() === k.toLowerCase()
|
|
143727
143727
|
);
|
|
143728
|
-
ne = ie?.formUuid ?? await
|
|
143728
|
+
ne = ie?.formUuid ?? await Z_(
|
|
143729
143729
|
k,
|
|
143730
143730
|
ie?.formVersion,
|
|
143731
143731
|
ie?.encounterDateTime
|
|
@@ -143865,11 +143865,11 @@ const stopMedicationFormTile = "StopMedicationForm-module_stopMedicationFormTile
|
|
|
143865
143865
|
queryKey: ["medicationConfig"],
|
|
143866
143866
|
queryFn: async () => {
|
|
143867
143867
|
const [V, fe] = await Promise.all([
|
|
143868
|
-
|
|
143868
|
+
$_(
|
|
143869
143869
|
MEDICATIONS_CONFIG_URL,
|
|
143870
143870
|
medicationConfigSchema
|
|
143871
143871
|
),
|
|
143872
|
-
|
|
143872
|
+
l_()
|
|
143873
143873
|
]);
|
|
143874
143874
|
return { ...fe, ...V };
|
|
143875
143875
|
}
|
|
@@ -144047,7 +144047,7 @@ function useObservationFormData(p) {
|
|
|
144047
144047
|
error: d
|
|
144048
144048
|
} = useQuery({
|
|
144049
144049
|
queryKey: ["formMetadata", p?.formUuid],
|
|
144050
|
-
queryFn: () =>
|
|
144050
|
+
queryFn: () => X_(p.formUuid),
|
|
144051
144051
|
enabled: !!p?.formUuid
|
|
144052
144052
|
}), h = p?.formMetadata ?? s, E = d || null, C = useCallback((H) => {
|
|
144053
144053
|
if (!H) {
|
|
@@ -144101,7 +144101,7 @@ function useObservationFormData(p) {
|
|
|
144101
144101
|
a(F);
|
|
144102
144102
|
}, []), R = () => {
|
|
144103
144103
|
a(null);
|
|
144104
|
-
}, T = c && h ?
|
|
144104
|
+
}, T = c && h ? rv(c, h) : [];
|
|
144105
144105
|
return {
|
|
144106
144106
|
formData: c,
|
|
144107
144107
|
observations: T,
|
|
@@ -144239,17 +144239,17 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
|
|
|
144239
144239
|
onDirectModeCancel: C,
|
|
144240
144240
|
encounterSessionStartContext: R
|
|
144241
144241
|
}) => {
|
|
144242
|
-
const { t: T } = useTranslation(), H = R?.editOnly === "observationForms", [M, I] = React__default.useState(!1), $ = R?.task?.basedOn?.[0], D = gr(), { user: z } =
|
|
144242
|
+
const { t: T } = useTranslation(), H = R?.editOnly === "observationForms", [M, I] = React__default.useState(!1), $ = R?.task?.basedOn?.[0], D = gr(), { user: z } = vSe(), { episodeOfCare: O, activeVisitId: Z } = useClinicalAppData(), {
|
|
144243
144243
|
data: k,
|
|
144244
144244
|
isLoading: U,
|
|
144245
144245
|
error: W
|
|
144246
144246
|
} = useQuery({
|
|
144247
144247
|
queryKey: ["patient", D],
|
|
144248
|
-
queryFn: () =>
|
|
144248
|
+
queryFn: () => YE(D),
|
|
144249
144249
|
enabled: !!D
|
|
144250
144250
|
}), N = useMemo(() => {
|
|
144251
144251
|
if (!k || !D) return null;
|
|
144252
|
-
const Be = k.birthDate ?
|
|
144252
|
+
const Be = k.birthDate ? Lb(k.birthDate) : null;
|
|
144253
144253
|
return {
|
|
144254
144254
|
uuid: D,
|
|
144255
144255
|
identifier: k.identifier ?? void 0,
|
|
@@ -144260,7 +144260,7 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
|
|
|
144260
144260
|
ageInDays: Be?.ageInDays,
|
|
144261
144261
|
birthdate: k.birthDate ?? void 0,
|
|
144262
144262
|
birthtime: k.birthtime ?? void 0,
|
|
144263
|
-
gender: k.gender ?
|
|
144263
|
+
gender: k.gender ? zE(k.gender) : void 0,
|
|
144264
144264
|
activeVisitUuid: Z ?? void 0,
|
|
144265
144265
|
currentEncounterUuid: d ?? void 0,
|
|
144266
144266
|
getAgeDetails: () => Be ?? AGE_DETAILS_DEFAULT
|
|
@@ -144307,7 +144307,7 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
|
|
|
144307
144307
|
groupMembers: nt.groupMembers.map(ut)
|
|
144308
144308
|
} : nt;
|
|
144309
144309
|
}, mt = (at) => {
|
|
144310
|
-
const nt = typeof at.value == "string" &&
|
|
144310
|
+
const nt = typeof at.value == "string" && _E.test(at.value) ? { ...at, value: tv(new Date(at.value)) } : at;
|
|
144311
144311
|
return nt.groupMembers ? {
|
|
144312
144312
|
...nt,
|
|
144313
144313
|
groupMembers: nt.groupMembers.map(mt)
|
|
@@ -144342,7 +144342,7 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
|
|
|
144342
144342
|
if (ie.current) {
|
|
144343
144343
|
if (se && !Be) {
|
|
144344
144344
|
Y(null);
|
|
144345
|
-
const { observations: rt } = ie.current.getValue(), Vt = rt && rt.length > 0 ?
|
|
144345
|
+
const { observations: rt } = ie.current.getValue(), Vt = rt && rt.length > 0 ? sv(
|
|
144346
144346
|
rt,
|
|
144347
144347
|
we
|
|
144348
144348
|
) : [];
|
|
@@ -144358,7 +144358,7 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
|
|
|
144358
144358
|
), Oe(Vt, se);
|
|
144359
144359
|
return;
|
|
144360
144360
|
}
|
|
144361
|
-
const { observations: Ue, errors: ut } = ie.current.getValue(), mt = Ue && Ue.length > 0 ?
|
|
144361
|
+
const { observations: Ue, errors: ut } = ie.current.getValue(), mt = Ue && Ue.length > 0 ? sv(
|
|
144362
144362
|
Ue,
|
|
144363
144363
|
we
|
|
144364
144364
|
) : [], Xe = (rt) => rt.value !== null && rt.value !== void 0 && rt.value !== "" ? !0 : rt.groupMembers && rt.groupMembers.length > 0 ? rt.groupMembers.some(Xe) : !1, nt = !mt.some(Xe);
|
|
@@ -144402,7 +144402,7 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
|
|
|
144402
144402
|
}
|
|
144403
144403
|
}, Fe = () => {
|
|
144404
144404
|
if (Y(null), ie.current) {
|
|
144405
|
-
const { observations: Be } = ie.current.getValue(), Ue = Be && Be.length > 0 ?
|
|
144405
|
+
const { observations: Be } = ie.current.getValue(), Ue = Be && Be.length > 0 ? sv(
|
|
144406
144406
|
Be,
|
|
144407
144407
|
we
|
|
144408
144408
|
) : [];
|
|
@@ -144542,8 +144542,8 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
|
|
|
144542
144542
|
return null;
|
|
144543
144543
|
}, extractAndAppendNotesFromFormData = (p, c) => {
|
|
144544
144544
|
if (!p.current) return;
|
|
144545
|
-
const a = p.current?.state, s =
|
|
144546
|
-
|
|
144545
|
+
const a = p.current?.state, s = ov(a?.data);
|
|
144546
|
+
av(s, c);
|
|
144547
144547
|
}, $schema$1 = "http://json-schema.org/draft-07/schema#", title$1 = "CDSS Servers Configuration Schema", description$1 = "Schema for CDSS (Clinical Decision Support System) server configurations", type$1 = "array", items = { type: "object", required: ["server", "url", "services"], additionalProperties: !1, properties: { server: { type: "string", description: "CDSS server identifier" }, url: { type: "string", description: "Base URL for the CDSS server" }, services: { type: "array", description: "List of CDS Hooks services provided by this server", items: { type: "object", required: ["name", "description"], additionalProperties: !1, properties: { name: { type: "string", description: "Service/hook name" }, description: { type: "string", description: "Service description" }, contextResourceMap: { type: "array", description: "Mapping of FHIR resources to context attributes", items: { type: "object", required: ["type", "attribute"], additionalProperties: !1, properties: { type: { type: "string", description: "FHIR resource type" }, attribute: { type: "string", description: "Context attribute name" } } } }, prefetch: { type: "object", description: "Prefetch templates for the service", additionalProperties: { type: "string" } } } } } } }, cdssConfigSchema = {
|
|
144548
144548
|
$schema: $schema$1,
|
|
144549
144549
|
title: title$1,
|
|
@@ -144691,7 +144691,7 @@ const ConsultationPad = ({
|
|
|
144691
144691
|
error: Z
|
|
144692
144692
|
} = useQuery({
|
|
144693
144693
|
queryKey: ["cdssConfig"],
|
|
144694
|
-
queryFn: () =>
|
|
144694
|
+
queryFn: () => $_(CDSS_SERVER_CONFIG_URL, cdssConfigSchema),
|
|
144695
144695
|
enabled: M
|
|
144696
144696
|
});
|
|
144697
144697
|
useEffect(() => {
|
|
@@ -144731,14 +144731,14 @@ const ConsultationPad = ({
|
|
|
144731
144731
|
useEffect(() => {
|
|
144732
144732
|
useEncounterDetailsStore.getState().setRequestedEncounterType(K);
|
|
144733
144733
|
}, [K]);
|
|
144734
|
-
const { episodeOfCare: ne, patientId: oe, activeVisitId: ie, activeEpisodeId: ae } = useClinicalAppData(), { practitioner: re } =
|
|
144734
|
+
const { episodeOfCare: ne, patientId: oe, activeVisitId: ie, activeEpisodeId: ae } = useClinicalAppData(), { practitioner: re } = vSe(), { data: X, status: ye } = useQuery({
|
|
144735
144735
|
queryKey: [
|
|
144736
144736
|
"activeEncounter",
|
|
144737
144737
|
oe,
|
|
144738
144738
|
re?.uuid,
|
|
144739
144739
|
Y?.uuid
|
|
144740
144740
|
],
|
|
144741
|
-
queryFn: () =>
|
|
144741
|
+
queryFn: () => F_(
|
|
144742
144742
|
oe,
|
|
144743
144743
|
re?.uuid,
|
|
144744
144744
|
void 0,
|
|
@@ -144752,7 +144752,7 @@ const ConsultationPad = ({
|
|
|
144752
144752
|
error: Re
|
|
144753
144753
|
} = useQuery({
|
|
144754
144754
|
queryKey: ["encounter", h],
|
|
144755
|
-
queryFn: ({ signal: it }) =>
|
|
144755
|
+
queryFn: ({ signal: it }) => Zb(h, { signal: it }),
|
|
144756
144756
|
enabled: !!h
|
|
144757
144757
|
});
|
|
144758
144758
|
useEffect(() => {
|
|
@@ -144780,7 +144780,7 @@ const ConsultationPad = ({
|
|
|
144780
144780
|
} = useObservationFormsStore();
|
|
144781
144781
|
useEffect(() => {
|
|
144782
144782
|
const it = p.editMedications;
|
|
144783
|
-
getMedicationRequestStore(
|
|
144783
|
+
getMedicationRequestStore(c_).getState().setPendingFhirEdits(it?.length ? it : []);
|
|
144784
144784
|
}, [p.editMedications]), useEffect(() => () => Q.forEach((it) => it.reset()), []), useEffect(() => {
|
|
144785
144785
|
a?.length && useAllergyStore.getState().preloadAllergies(a);
|
|
144786
144786
|
}, [a]);
|
|
@@ -144820,7 +144820,7 @@ const ConsultationPad = ({
|
|
|
144820
144820
|
visitId: Qa,
|
|
144821
144821
|
episodeId: ae ?? void 0
|
|
144822
144822
|
}, ja = vt.map(
|
|
144823
|
-
(ra) =>
|
|
144823
|
+
(ra) => Iv(z, ra, za, ta).catch(
|
|
144824
144824
|
() => (R({
|
|
144825
144825
|
title: C("ERROR_DEFAULT_TITLE"),
|
|
144826
144826
|
message: C("CDSS_RULE_INVOCATION_ERROR", {
|
|
@@ -144831,7 +144831,7 @@ const ConsultationPad = ({
|
|
|
144831
144831
|
}), [])
|
|
144832
144832
|
)
|
|
144833
144833
|
), cn = (await Promise.all(ja)).flat();
|
|
144834
|
-
|
|
144834
|
+
yv({
|
|
144835
144835
|
cards: cn,
|
|
144836
144836
|
triggerItemId: Vt,
|
|
144837
144837
|
controlKey: rt
|
|
@@ -144863,7 +144863,7 @@ const ConsultationPad = ({
|
|
|
144863
144863
|
M
|
|
144864
144864
|
]
|
|
144865
144865
|
);
|
|
144866
|
-
|
|
144866
|
+
wv(Je);
|
|
144867
144867
|
const We = async () => {
|
|
144868
144868
|
const it = Q.map((vt) => ({
|
|
144869
144869
|
key: vt.key,
|
|
@@ -144899,7 +144899,7 @@ const ConsultationPad = ({
|
|
|
144899
144899
|
await ja.onDirectSubmit();
|
|
144900
144900
|
if (vt.length > 0 && ta.length === 0) {
|
|
144901
144901
|
const ja = captureUpdatedResources(Q);
|
|
144902
|
-
|
|
144902
|
+
hv({
|
|
144903
144903
|
patientUUID: useEncounterDetailsStore.getState().patientUUID ?? "",
|
|
144904
144904
|
updatedResources: ja,
|
|
144905
144905
|
updatedConcepts: /* @__PURE__ */ new Map()
|
|
@@ -144923,7 +144923,7 @@ const ConsultationPad = ({
|
|
|
144923
144923
|
messageParams: { encounterType: Qa.encounterTypeName }
|
|
144924
144924
|
});
|
|
144925
144925
|
const za = captureUpdatedResources(Q);
|
|
144926
|
-
|
|
144926
|
+
hv({
|
|
144927
144927
|
patientUUID: Qa.patientUUID,
|
|
144928
144928
|
updatedResources: za,
|
|
144929
144929
|
updatedConcepts: Qa.updatedConcepts
|
|
@@ -144957,9 +144957,9 @@ const ConsultationPad = ({
|
|
|
144957
144957
|
encounterSessionStartContext: p
|
|
144958
144958
|
},
|
|
144959
144959
|
it.key
|
|
144960
|
-
)) }), mt = !!f, Xe = getMedicationRequestStore(
|
|
144960
|
+
)) }), mt = !!f, Xe = getMedicationRequestStore(c_), at = useSyncExternalStore(
|
|
144961
144961
|
(it) => Xe.subscribe(it),
|
|
144962
|
-
() => !mt || f !==
|
|
144962
|
+
() => !mt || f !== c_ ? !0 : Xe.getState().hasEditChanges()
|
|
144963
144963
|
), nt = Ue || !ee || T || !fe || !at || le;
|
|
144964
144964
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
144965
144965
|
/* @__PURE__ */ jsx(
|
|
@@ -145000,14 +145000,14 @@ const ConsultationPad = ({
|
|
|
145000
145000
|
onClose: c
|
|
145001
145001
|
}) => {
|
|
145002
145002
|
const { t: a } = useTranslation(), { addNotification: s } = G1(), f = gr(), { activeEpisodeId: d } = useClinicalAppData(), { clinicalConfig: h, isLoading: E } = useClinicalConfig(), { encounterConcepts: C } = useEncounterConcepts(), R = H3(
|
|
145003
|
-
|
|
145003
|
+
XYt.ADD_VISITS
|
|
145004
145004
|
), T = useQueryClient(), [H, M] = useState(!1), [I, F] = useState(!1), [$, D] = useState(null), {
|
|
145005
145005
|
data: z,
|
|
145006
145006
|
error: O,
|
|
145007
145007
|
isLoading: Z
|
|
145008
145008
|
} = useQuery({
|
|
145009
145009
|
queryKey: ["activeVisitAtLoginLocation", f],
|
|
145010
|
-
queryFn: () =>
|
|
145010
|
+
queryFn: () => t_(f),
|
|
145011
145011
|
enabled: !!f,
|
|
145012
145012
|
retry: !1
|
|
145013
145013
|
}), k = useMemo(
|
|
@@ -145031,7 +145031,7 @@ const ConsultationPad = ({
|
|
|
145031
145031
|
const ae = await Mi(
|
|
145032
145032
|
Rt().uuid
|
|
145033
145033
|
);
|
|
145034
|
-
await
|
|
145034
|
+
await wb(
|
|
145035
145035
|
f,
|
|
145036
145036
|
ae.uuid,
|
|
145037
145037
|
oe,
|
|
@@ -145156,8 +145156,8 @@ const ConsultationPad = ({
|
|
|
145156
145156
|
encounterUuids: s,
|
|
145157
145157
|
visitUuids: f
|
|
145158
145158
|
}) => {
|
|
145159
|
-
const { t: d } = useTranslation(), { matchReasons: h, canEditOrCreate: E, activeEncounter: C } =
|
|
145160
|
-
const O =
|
|
145159
|
+
const { t: d } = useTranslation(), { matchReasons: h, canEditOrCreate: E, activeEncounter: C } = Y_(), R = h.includes("NO_ACTIVE_VISIT"), T = h.includes("MATCHED"), M = h.includes("MATCHED") ? C?.id ?? null : null, I = ($, D, z) => {
|
|
145160
|
+
const O = rJt($.type);
|
|
145161
145161
|
if (!O)
|
|
145162
145162
|
return /* @__PURE__ */ jsx("div", { className: styles$4.widgetError, children: /* @__PURE__ */ jsx("p", { children: d("CONTROL_NOT_FOUND", { type: $.type }) }) }, `${$.type}-${D}`);
|
|
145163
145163
|
const Z = D < z - 1;
|
|
@@ -145295,14 +145295,14 @@ function useEncounterSession(p) {
|
|
|
145295
145295
|
}
|
|
145296
145296
|
T(!0), M(null);
|
|
145297
145297
|
try {
|
|
145298
|
-
const W = await
|
|
145298
|
+
const W = await j_(
|
|
145299
145299
|
$,
|
|
145300
145300
|
D,
|
|
145301
145301
|
k,
|
|
145302
145302
|
a
|
|
145303
145303
|
);
|
|
145304
145304
|
if (Z.ignored) return;
|
|
145305
|
-
const N =
|
|
145305
|
+
const N = V_(W);
|
|
145306
145306
|
f(N), h(W.encounter), C(N), F(W.reasons);
|
|
145307
145307
|
} catch (W) {
|
|
145308
145308
|
if (Z.ignored) return;
|
|
@@ -145350,7 +145350,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145350
145350
|
}) => {
|
|
145351
145351
|
const { t: s } = useTranslation();
|
|
145352
145352
|
return H3(
|
|
145353
|
-
|
|
145353
|
+
XYt.ENCOUNTER
|
|
145354
145354
|
) ? a ? /* @__PURE__ */ jsx(
|
|
145355
145355
|
SH2,
|
|
145356
145356
|
{
|
|
@@ -145373,7 +145373,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145373
145373
|
isActionAreaVisible: p,
|
|
145374
145374
|
printOptions: c
|
|
145375
145375
|
}) => {
|
|
145376
|
-
const { t: a } = useTranslation(), { practitioner: s } =
|
|
145376
|
+
const { t: a } = useTranslation(), { practitioner: s } = vSe(), { clinicalConfig: f } = useClinicalConfig(), { encounterConcepts: d } = useEncounterConcepts(), h = gr(), E = f?.consultationPad?.inputControls?.find(
|
|
145377
145377
|
(k) => k.type === "encounterDetails"
|
|
145378
145378
|
)?.metadata?.defaultEncounterType, C = useMemo(() => {
|
|
145379
145379
|
if (!(!E || !d))
|
|
@@ -145391,15 +145391,15 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145391
145391
|
encounterTypeUUID: C
|
|
145392
145392
|
}), F = useRef(null);
|
|
145393
145393
|
useEffect(() => {
|
|
145394
|
-
F.current !== h && (F.current = h,
|
|
145394
|
+
F.current !== h && (F.current = h, z_());
|
|
145395
145395
|
}, [h]), useEffect(() => {
|
|
145396
|
-
|
|
145396
|
+
B_(M);
|
|
145397
145397
|
}, [M]), useEffect(() => {
|
|
145398
|
-
M ||
|
|
145398
|
+
M || H_({
|
|
145399
145399
|
reasons: R,
|
|
145400
145400
|
encounter: H
|
|
145401
145401
|
});
|
|
145402
|
-
}, [M, R, H]),
|
|
145402
|
+
}, [M, R, H]), mv(
|
|
145403
145403
|
(k) => {
|
|
145404
145404
|
k.patientUUID === h && I();
|
|
145405
145405
|
},
|
|
@@ -145428,7 +145428,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145428
145428
|
"data-active-encounter-uuid": T && H?.id ? H.id : void 0,
|
|
145429
145429
|
"data-active-practitioner-uuid": s?.uuid ?? void 0,
|
|
145430
145430
|
children: [
|
|
145431
|
-
/* @__PURE__ */ jsx(
|
|
145431
|
+
/* @__PURE__ */ jsx(ZYt, {}),
|
|
145432
145432
|
/* @__PURE__ */ jsxs("div", { className: styles$2.actionButtons, children: [
|
|
145433
145433
|
/* @__PURE__ */ jsx(
|
|
145434
145434
|
ConsultationActionButton,
|
|
@@ -145439,7 +145439,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145439
145439
|
}
|
|
145440
145440
|
),
|
|
145441
145441
|
/* @__PURE__ */ jsx(
|
|
145442
|
-
|
|
145442
|
+
SYt,
|
|
145443
145443
|
{
|
|
145444
145444
|
printOptions: c,
|
|
145445
145445
|
renderContext: Z,
|
|
@@ -145460,7 +145460,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145460
145460
|
error: f
|
|
145461
145461
|
} = useQuery({
|
|
145462
145462
|
queryKey: ["patientSearch", p],
|
|
145463
|
-
queryFn: () =>
|
|
145463
|
+
queryFn: () => KE(p),
|
|
145464
145464
|
enabled: p.trim().length > 0
|
|
145465
145465
|
});
|
|
145466
145466
|
return { results: useMemo(
|
|
@@ -145594,10 +145594,10 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145594
145594
|
error: E
|
|
145595
145595
|
} = useQuery({
|
|
145596
145596
|
queryKey: ["encounters-for-eoc", c],
|
|
145597
|
-
queryFn: () =>
|
|
145597
|
+
queryFn: () => G_(c),
|
|
145598
145598
|
enabled: c.length > 0
|
|
145599
145599
|
}), { activeVisit: C } = usePatientVisit(a);
|
|
145600
|
-
|
|
145600
|
+
mv(() => {
|
|
145601
145601
|
c.length > 0 && f.invalidateQueries({
|
|
145602
145602
|
queryKey: ["encounters-for-eoc", c]
|
|
145603
145603
|
});
|
|
@@ -145662,7 +145662,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
145662
145662
|
})), addSectionIds = (p) => p?.sections?.length ? {
|
|
145663
145663
|
...p,
|
|
145664
145664
|
sections: p.sections.map(
|
|
145665
|
-
(c) => c.id ? c : { ...c, id:
|
|
145665
|
+
(c) => c.id ? c : { ...c, id: SE() }
|
|
145666
145666
|
)
|
|
145667
145667
|
} : p, ConsultationPage = () => {
|
|
145668
145668
|
const { t: p } = useTranslation(), { clinicalConfig: c, isLoading: a } = useClinicalConfig(), { userPrivileges: s } = Qn(), { addNotification: f } = G1(), [d, h] = useState(!1), [E, C] = useState(null);
|
|
@@ -145683,15 +145683,15 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
145683
145683
|
[M, p]
|
|
145684
145684
|
), $ = useObservationFormsStore((re) => re.viewingForm), D = gr(), { data: z } = useQuery({
|
|
145685
145685
|
queryKey: ["patient", D],
|
|
145686
|
-
queryFn: () =>
|
|
145686
|
+
queryFn: () => YE(D),
|
|
145687
145687
|
enabled: !!D
|
|
145688
145688
|
}), O = useMemo(
|
|
145689
145689
|
() => [
|
|
145690
|
-
{ id: "home", label: "Home", href:
|
|
145690
|
+
{ id: "home", label: "Home", href: aE },
|
|
145691
145691
|
{ id: "clinical", label: "Clinical", href: BAHMNI_CLINICAL_PATH },
|
|
145692
145692
|
{
|
|
145693
145693
|
id: "current",
|
|
145694
|
-
label: z?.fullName ?
|
|
145694
|
+
label: z?.fullName ? RE(z.fullName) : p("CURRENT_PATIENT"),
|
|
145695
145695
|
isCurrentPage: !0
|
|
145696
145696
|
}
|
|
145697
145697
|
],
|
|
@@ -145709,7 +145709,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
145709
145709
|
error: Q
|
|
145710
145710
|
} = useQuery({
|
|
145711
145711
|
queryKey: ["dashboardConfig", W],
|
|
145712
|
-
queryFn: () =>
|
|
145712
|
+
queryFn: () => $_(
|
|
145713
145713
|
DASHBOARD_CONFIG_URL(W),
|
|
145714
145714
|
dashboardConfigSchema
|
|
145715
145715
|
),
|
|
@@ -145727,7 +145727,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
145727
145727
|
...N,
|
|
145728
145728
|
sections: filterSectionsByPrivileges(N.sections)
|
|
145729
145729
|
}, [N, s]), fe = useMemo(() => !U?.printOptions || !s ? [] : U.printOptions.filter(
|
|
145730
|
-
(re) =>
|
|
145730
|
+
(re) => sw(s, re.privileges)
|
|
145731
145731
|
), [U, s]), ee = useMemo(() => V ? getSidebarItems(V, p) : [], [V, p]), [se, Y] = useState(0), { activeItemId: ne, handleItemClick: oe } = GH2(ee), ie = useCallback(
|
|
145732
145732
|
(re) => {
|
|
145733
145733
|
oe(re), Y((X) => X + 1);
|
|
@@ -145783,7 +145783,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
145783
145783
|
const ae = () => {
|
|
145784
145784
|
const re = H.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
|
|
145785
145785
|
return re && c.contextInformation?.program ? /* @__PURE__ */ jsx(
|
|
145786
|
-
|
|
145786
|
+
GYt,
|
|
145787
145787
|
{
|
|
145788
145788
|
programUUID: re,
|
|
145789
145789
|
config: {
|
|
@@ -145802,7 +145802,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
145802
145802
|
{
|
|
145803
145803
|
breadcrumbItems: O,
|
|
145804
145804
|
globalActions: F,
|
|
145805
|
-
userMenu: /* @__PURE__ */ jsx(
|
|
145805
|
+
userMenu: /* @__PURE__ */ jsx(GGt, {}),
|
|
145806
145806
|
sideNavItems: ee,
|
|
145807
145807
|
activeSideNavItemId: ne,
|
|
145808
145808
|
onSideNavItemClick: ie,
|