@bahmni/services 0.0.1-dev.221 → 0.0.1-dev.223
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/events/consultationEvents.d.ts +1 -1
- package/dist/events/consultationEvents.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +560 -547
- package/dist/locationService/__tests__/__mocks__/mocks.d.ts +6 -0
- package/dist/locationService/__tests__/__mocks__/mocks.d.ts.map +1 -0
- package/dist/locationService/constants.d.ts +2 -0
- package/dist/locationService/constants.d.ts.map +1 -0
- package/dist/locationService/index.d.ts +3 -0
- package/dist/locationService/index.d.ts.map +1 -0
- package/dist/locationService/locationService.d.ts +8 -0
- package/dist/locationService/locationService.d.ts.map +1 -0
- package/dist/locationService/models.d.ts +14 -0
- package/dist/locationService/models.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/utils.d.ts +17 -0
- package/dist/utils/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { initReactI18next as vi } from "react-i18next";
|
|
2
|
-
import { useTranslation as
|
|
2
|
+
import { useTranslation as tw } from "react-i18next";
|
|
3
3
|
import { useRef as bn, useCallback as Wr, useEffect as _n } from "react";
|
|
4
4
|
function aa(e, t) {
|
|
5
5
|
return function() {
|
|
6
6
|
return e.apply(t, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString: wi } = Object.prototype, { getPrototypeOf:
|
|
9
|
+
const { toString: wi } = Object.prototype, { getPrototypeOf: Cn } = Object, { iterator: Cr, toStringTag: ia } = Symbol, Dr = /* @__PURE__ */ ((e) => (t) => {
|
|
10
10
|
const r = wi.call(t);
|
|
11
11
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)), $e = (e) => (e = e.toLowerCase(), (t) =>
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), $e = (e) => (e = e.toLowerCase(), (t) => Dr(t) === e), Lr = (e) => (t) => typeof t === e, { isArray: ct } = Array, ot = Lr("undefined");
|
|
13
13
|
function Rt(e) {
|
|
14
14
|
return e !== null && !ot(e) && e.constructor !== null && !ot(e.constructor) && Ee(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
@@ -19,10 +19,10 @@ function Ei(e) {
|
|
|
19
19
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ca(e.buffer), t;
|
|
20
20
|
}
|
|
21
21
|
const bi = Lr("string"), Ee = Lr("function"), ua = Lr("number"), Tt = (e) => e !== null && typeof e == "object", _i = (e) => e === !0 || e === !1, vr = (e) => {
|
|
22
|
-
if (
|
|
22
|
+
if (Dr(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
|
-
const t =
|
|
25
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ia in e) && !(
|
|
24
|
+
const t = Cn(e);
|
|
25
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ia in e) && !(Cr in e);
|
|
26
26
|
}, Si = (e) => {
|
|
27
27
|
if (!Tt(e) || Rt(e))
|
|
28
28
|
return !1;
|
|
@@ -35,11 +35,11 @@ const bi = Lr("string"), Ee = Lr("function"), ua = Lr("number"), Tt = (e) => e !
|
|
|
35
35
|
function Ii() {
|
|
36
36
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
37
37
|
}
|
|
38
|
-
const Xn = Ii(), Zn = typeof Xn.FormData < "u" ? Xn.FormData : void 0,
|
|
38
|
+
const Xn = Ii(), Zn = typeof Xn.FormData < "u" ? Xn.FormData : void 0, Ci = (e) => {
|
|
39
39
|
let t;
|
|
40
|
-
return e && (Zn && e instanceof Zn || Ee(e.append) && ((t =
|
|
40
|
+
return e && (Zn && e instanceof Zn || Ee(e.append) && ((t = Dr(e)) === "formdata" || // detect form-data instance
|
|
41
41
|
t === "object" && Ee(e.toString) && e.toString() === "[object FormData]"));
|
|
42
|
-
},
|
|
42
|
+
}, Di = $e("URLSearchParams"), [Li, ki, Ui, xi] = [
|
|
43
43
|
"ReadableStream",
|
|
44
44
|
"Request",
|
|
45
45
|
"Response",
|
|
@@ -116,7 +116,7 @@ const Mi = (e, t, r, { allOwnKeys: n } = {}) => (Ot(
|
|
|
116
116
|
do {
|
|
117
117
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
118
118
|
a = s[o], (!n || n(a, e, t)) && !i[a] && (t[a] = e[a], i[a] = !0);
|
|
119
|
-
e = r !== !1 &&
|
|
119
|
+
e = r !== !1 && Cn(e);
|
|
120
120
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
121
121
|
return t;
|
|
122
122
|
}, Bi = (e, t, r) => {
|
|
@@ -132,8 +132,8 @@ const Mi = (e, t, r, { allOwnKeys: n } = {}) => (Ot(
|
|
|
132
132
|
for (; t-- > 0; )
|
|
133
133
|
r[t] = e[t];
|
|
134
134
|
return r;
|
|
135
|
-
}, zi = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
136
|
-
const n = (e && e[
|
|
135
|
+
}, zi = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Cn(Uint8Array)), Gi = (e, t) => {
|
|
136
|
+
const n = (e && e[Cr]).call(e);
|
|
137
137
|
let s;
|
|
138
138
|
for (; (s = n.next()) && !s.done; ) {
|
|
139
139
|
const o = s.value;
|
|
@@ -178,7 +178,7 @@ const Mi = (e, t, r, { allOwnKeys: n } = {}) => (Ot(
|
|
|
178
178
|
}, Zi = () => {
|
|
179
179
|
}, ec = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
180
180
|
function tc(e) {
|
|
181
|
-
return !!(e && Ee(e.append) && e[ia] === "FormData" && e[
|
|
181
|
+
return !!(e && Ee(e.append) && e[ia] === "FormData" && e[Cr]);
|
|
182
182
|
}
|
|
183
183
|
const rc = (e) => {
|
|
184
184
|
const t = new Array(10), r = (n, s) => {
|
|
@@ -207,11 +207,11 @@ const rc = (e) => {
|
|
|
207
207
|
!1
|
|
208
208
|
), (s) => {
|
|
209
209
|
n.push(s), ze.postMessage(r, "*");
|
|
210
|
-
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", Ee(ze.postMessage)), oc = typeof queueMicrotask < "u" ? queueMicrotask.bind(ze) : typeof process < "u" && process.nextTick || pa, ac = (e) => e != null && Ee(e[
|
|
210
|
+
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", Ee(ze.postMessage)), oc = typeof queueMicrotask < "u" ? queueMicrotask.bind(ze) : typeof process < "u" && process.nextTick || pa, ac = (e) => e != null && Ee(e[Cr]), I = {
|
|
211
211
|
isArray: ct,
|
|
212
212
|
isArrayBuffer: ca,
|
|
213
213
|
isBuffer: Rt,
|
|
214
|
-
isFormData:
|
|
214
|
+
isFormData: Ci,
|
|
215
215
|
isArrayBufferView: Ei,
|
|
216
216
|
isString: bi,
|
|
217
217
|
isNumber: ua,
|
|
@@ -232,7 +232,7 @@ const rc = (e) => {
|
|
|
232
232
|
isRegExp: Ji,
|
|
233
233
|
isFunction: Ee,
|
|
234
234
|
isStream: Pi,
|
|
235
|
-
isURLSearchParams:
|
|
235
|
+
isURLSearchParams: Di,
|
|
236
236
|
isTypedArray: zi,
|
|
237
237
|
isFileList: $i,
|
|
238
238
|
forEach: Ot,
|
|
@@ -242,7 +242,7 @@ const rc = (e) => {
|
|
|
242
242
|
stripBOM: Fi,
|
|
243
243
|
inherits: ji,
|
|
244
244
|
toFlatObject: Vi,
|
|
245
|
-
kindOf:
|
|
245
|
+
kindOf: Dr,
|
|
246
246
|
kindOfTest: $e,
|
|
247
247
|
endsWith: Bi,
|
|
248
248
|
toArray: Hi,
|
|
@@ -421,10 +421,10 @@ function ts(e) {
|
|
|
421
421
|
return t[n];
|
|
422
422
|
});
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function Dn(e, t) {
|
|
425
425
|
this._pairs = [], e && kr(e, this, t);
|
|
426
426
|
}
|
|
427
|
-
const ga =
|
|
427
|
+
const ga = Dn.prototype;
|
|
428
428
|
ga.append = function(t, r) {
|
|
429
429
|
this._pairs.push([t, r]);
|
|
430
430
|
};
|
|
@@ -446,7 +446,7 @@ function ya(e, t, r) {
|
|
|
446
446
|
serialize: r
|
|
447
447
|
} : r, o = s && s.serialize;
|
|
448
448
|
let a;
|
|
449
|
-
if (o ? a = o(t, s) : a = I.isURLSearchParams(t) ? t.toString() : new
|
|
449
|
+
if (o ? a = o(t, s) : a = I.isURLSearchParams(t) ? t.toString() : new Dn(t, s).toString(n), a) {
|
|
450
450
|
const i = e.indexOf("#");
|
|
451
451
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
|
|
452
452
|
}
|
|
@@ -512,7 +512,7 @@ const Ln = {
|
|
|
512
512
|
forcedJSONParsing: !0,
|
|
513
513
|
clarifyTimeoutError: !1,
|
|
514
514
|
legacyInterceptorReqResOrdering: !0
|
|
515
|
-
}, dc = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
515
|
+
}, dc = typeof URLSearchParams < "u" ? URLSearchParams : Dn, fc = typeof FormData < "u" ? FormData : null, pc = typeof Blob < "u" ? Blob : null, hc = {
|
|
516
516
|
isBrowser: !0,
|
|
517
517
|
classes: {
|
|
518
518
|
URLSearchParams: dc,
|
|
@@ -918,7 +918,7 @@ function Ic(e) {
|
|
|
918
918
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
919
919
|
return t && t[1] || "";
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function Cc(e, t) {
|
|
922
922
|
e = e || 10;
|
|
923
923
|
const r = new Array(e), n = new Array(e);
|
|
924
924
|
let s = 0, o = 0, a;
|
|
@@ -934,7 +934,7 @@ function Dc(e, t) {
|
|
|
934
934
|
return S ? Math.round(v * 1e3 / S) : void 0;
|
|
935
935
|
};
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function Dc(e, t) {
|
|
938
938
|
let r = 0, n = 1e3 / t, s, o;
|
|
939
939
|
const a = (d, l = Date.now()) => {
|
|
940
940
|
r = l, s = null, o && (clearTimeout(o), o = null), e(...d);
|
|
@@ -948,8 +948,8 @@ function Cc(e, t) {
|
|
|
948
948
|
}
|
|
949
949
|
const Sr = (e, t, r = 3) => {
|
|
950
950
|
let n = 0;
|
|
951
|
-
const s =
|
|
952
|
-
return
|
|
951
|
+
const s = Cc(50, 250);
|
|
952
|
+
return Dc((o) => {
|
|
953
953
|
const a = o.loaded, i = o.lengthComputable ? o.total : void 0, c = a - n, d = s(c), l = a <= i;
|
|
954
954
|
n = a;
|
|
955
955
|
const m = {
|
|
@@ -1358,8 +1358,8 @@ const Sa = (e) => {
|
|
|
1358
1358
|
method: "POST",
|
|
1359
1359
|
body: p,
|
|
1360
1360
|
duplex: "half"
|
|
1361
|
-
}),
|
|
1362
|
-
if (I.isFormData(p) && (
|
|
1361
|
+
}), D;
|
|
1362
|
+
if (I.isFormData(p) && (D = A.headers.get("content-type")) && N.setContentType(D), A.body) {
|
|
1363
1363
|
const [P, w] = ss(
|
|
1364
1364
|
re,
|
|
1365
1365
|
Sr(os(b))
|
|
@@ -1385,8 +1385,8 @@ const Sa = (e) => {
|
|
|
1385
1385
|
["status", "statusText", "headers"].forEach((T) => {
|
|
1386
1386
|
A[T] = Q[T];
|
|
1387
1387
|
});
|
|
1388
|
-
const
|
|
1389
|
-
|
|
1388
|
+
const D = I.toFiniteNumber(Q.headers.get("content-length")), [P, w] = _ && ss(
|
|
1389
|
+
D,
|
|
1390
1390
|
Sr(os(_), !0)
|
|
1391
1391
|
) || [];
|
|
1392
1392
|
Q = new n(
|
|
@@ -1401,8 +1401,8 @@ const Sa = (e) => {
|
|
|
1401
1401
|
Q,
|
|
1402
1402
|
y
|
|
1403
1403
|
);
|
|
1404
|
-
return !ue && G && G(), await new Promise((A,
|
|
1405
|
-
ba(A,
|
|
1404
|
+
return !ue && G && G(), await new Promise((A, D) => {
|
|
1405
|
+
ba(A, D, {
|
|
1406
1406
|
data: U,
|
|
1407
1407
|
headers: be.from(Q.headers),
|
|
1408
1408
|
status: Q.status,
|
|
@@ -1896,22 +1896,22 @@ le.getAdapter = Ta.getAdapter;
|
|
|
1896
1896
|
le.HttpStatusCode = On;
|
|
1897
1897
|
le.default = le;
|
|
1898
1898
|
const {
|
|
1899
|
-
Axios:
|
|
1900
|
-
AxiosError:
|
|
1901
|
-
CanceledError:
|
|
1902
|
-
isCancel:
|
|
1903
|
-
CancelToken:
|
|
1904
|
-
VERSION:
|
|
1905
|
-
all:
|
|
1906
|
-
Cancel:
|
|
1907
|
-
isAxiosError:
|
|
1908
|
-
spread:
|
|
1909
|
-
toFormData:
|
|
1910
|
-
AxiosHeaders:
|
|
1911
|
-
HttpStatusCode:
|
|
1912
|
-
formToJSON:
|
|
1913
|
-
getAdapter:
|
|
1914
|
-
mergeConfig:
|
|
1899
|
+
Axios: Jm,
|
|
1900
|
+
AxiosError: Qm,
|
|
1901
|
+
CanceledError: Xm,
|
|
1902
|
+
isCancel: Zm,
|
|
1903
|
+
CancelToken: eg,
|
|
1904
|
+
VERSION: tg,
|
|
1905
|
+
all: rg,
|
|
1906
|
+
Cancel: ng,
|
|
1907
|
+
isAxiosError: sg,
|
|
1908
|
+
spread: og,
|
|
1909
|
+
toFormData: ag,
|
|
1910
|
+
AxiosHeaders: ig,
|
|
1911
|
+
HttpStatusCode: cg,
|
|
1912
|
+
formToJSON: ug,
|
|
1913
|
+
getAdapter: lg,
|
|
1914
|
+
mergeConfig: dg
|
|
1915
1915
|
} = le, Zc = (e) => typeof e == "object" && e !== null && "resourceType" in e && e.resourceType === "OperationOutcome", eu = (e) => {
|
|
1916
1916
|
if (!e.issue || !Array.isArray(e.issue))
|
|
1917
1917
|
return null;
|
|
@@ -2116,7 +2116,7 @@ Me.interceptors.response.use(
|
|
|
2116
2116
|
return r.startsWith("ERROR_") || /^[A-Z_]+$/.test(r) ? Promise.reject(new Error(r)) : Promise.reject(`${t}: ${r}`);
|
|
2117
2117
|
}
|
|
2118
2118
|
);
|
|
2119
|
-
const F = async (e) => (await Me.get(e)).data,
|
|
2119
|
+
const F = async (e) => (await Me.get(e)).data, Ce = async (e, t) => (await Me.post(e, t)).data, fg = async (e, t) => (await Me.put(e, t)).data, pg = async (e, t) => (await Me.patch(e, t)).data, Pa = async (e) => (await Me.delete(e)).data, Y = (e) => typeof e == "string", ft = () => {
|
|
2120
2120
|
let e, t;
|
|
2121
2121
|
const r = new Promise((n, s) => {
|
|
2122
2122
|
e = n, t = s;
|
|
@@ -2390,7 +2390,7 @@ class Es extends xr {
|
|
|
2390
2390
|
return this.data;
|
|
2391
2391
|
}
|
|
2392
2392
|
}
|
|
2393
|
-
var
|
|
2393
|
+
var Ca = {
|
|
2394
2394
|
processors: {},
|
|
2395
2395
|
addPostProcessor(e) {
|
|
2396
2396
|
this.processors[e.name] = e;
|
|
@@ -2523,8 +2523,8 @@ class Nr extends xr {
|
|
|
2523
2523
|
ne.push(fe[ue]);
|
|
2524
2524
|
else this.options.saveMissingTo === "all" ? ne = this.languageUtils.toResolveHierarchy(r.lng || this.language) : ne.push(r.lng || this.language);
|
|
2525
2525
|
const Q = (ue, U, A) => {
|
|
2526
|
-
const
|
|
2527
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(ue, c, U,
|
|
2526
|
+
const D = h && A !== v ? A : G;
|
|
2527
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(ue, c, U, D, re, r) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(ue, c, U, D, re, r), this.emit("missingKey", ue, c, U, v);
|
|
2528
2528
|
};
|
|
2529
2529
|
this.options.saveMissing && (this.options.saveMissingPlurals && u ? ne.forEach((ue) => {
|
|
2530
2530
|
const U = this.pluralResolver.getSuffixes(ue, r);
|
|
@@ -2575,7 +2575,7 @@ class Nr extends xr {
|
|
|
2575
2575
|
}, n)), n.interpolation && this.interpolator.reset();
|
|
2576
2576
|
}
|
|
2577
2577
|
const i = n.postProcess || this.options.postProcess, c = Y(i) ? [i] : i;
|
|
2578
|
-
return t != null && c?.length && n.applyPostProcessor !== !1 && (t =
|
|
2578
|
+
return t != null && c?.length && n.applyPostProcessor !== !1 && (t = Ca.handle(c, t, r, this.options && this.options.postProcessPassResolved ? {
|
|
2579
2579
|
i18nResolved: {
|
|
2580
2580
|
...s,
|
|
2581
2581
|
usedParams: this.getUsedParamsDetails(n)
|
|
@@ -3211,7 +3211,7 @@ const As = () => ({
|
|
|
3211
3211
|
maxReplaces: 1e3,
|
|
3212
3212
|
skipOnVariables: !0
|
|
3213
3213
|
}
|
|
3214
|
-
}), Ns = (e) => (Y(e.ns) && (e.ns = [e.ns]), Y(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Y(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e),
|
|
3214
|
+
}), Ns = (e) => (Y(e.ns) && (e.ns = [e.ns]), Y(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Y(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Ct = () => {
|
|
3215
3215
|
}, Iu = (e) => {
|
|
3216
3216
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((r) => {
|
|
3217
3217
|
typeof e[r] == "function" && (e[r] = e[r].bind(e));
|
|
@@ -3268,7 +3268,7 @@ class _t extends xr {
|
|
|
3268
3268
|
S.init && S.init(this);
|
|
3269
3269
|
});
|
|
3270
3270
|
}
|
|
3271
|
-
if (this.format = this.options.interpolation.format, n || (n =
|
|
3271
|
+
if (this.format = this.options.interpolation.format, n || (n = Ct), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
3272
3272
|
const l = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
3273
3273
|
l.length > 0 && l[0] !== "dev" && (this.options.lng = l[0]);
|
|
3274
3274
|
}
|
|
@@ -3291,7 +3291,7 @@ class _t extends xr {
|
|
|
3291
3291
|
return this.options.resources || !this.options.initAsync ? d() : setTimeout(d, 0), c;
|
|
3292
3292
|
}
|
|
3293
3293
|
loadResources(t) {
|
|
3294
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3294
|
+
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ct;
|
|
3295
3295
|
const s = Y(t) ? t : this.language;
|
|
3296
3296
|
if (typeof t == "function" && (n = t), !this.options.resources || this.options.partialBundledLanguages) {
|
|
3297
3297
|
if (s?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
|
|
@@ -3309,14 +3309,14 @@ class _t extends xr {
|
|
|
3309
3309
|
}
|
|
3310
3310
|
reloadResources(t, r, n) {
|
|
3311
3311
|
const s = ft();
|
|
3312
|
-
return typeof t == "function" && (n = t, t = void 0), typeof r == "function" && (n = r, r = void 0), t || (t = this.languages), r || (r = this.options.ns), n || (n =
|
|
3312
|
+
return typeof t == "function" && (n = t, t = void 0), typeof r == "function" && (n = r, r = void 0), t || (t = this.languages), r || (r = this.options.ns), n || (n = Ct), this.services.backendConnector.reload(t, r, (o) => {
|
|
3313
3313
|
s.resolve(), n(o);
|
|
3314
3314
|
}), s;
|
|
3315
3315
|
}
|
|
3316
3316
|
use(t) {
|
|
3317
3317
|
if (!t) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
3318
3318
|
if (!t.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
3319
|
-
return t.type === "backend" && (this.modules.backend = t), (t.type === "logger" || t.log && t.warn && t.error) && (this.modules.logger = t), t.type === "languageDetector" && (this.modules.languageDetector = t), t.type === "i18nFormat" && (this.modules.i18nFormat = t), t.type === "postProcessor" &&
|
|
3319
|
+
return t.type === "backend" && (this.modules.backend = t), (t.type === "logger" || t.log && t.warn && t.error) && (this.modules.logger = t), t.type === "languageDetector" && (this.modules.languageDetector = t), t.type === "i18nFormat" && (this.modules.i18nFormat = t), t.type === "postProcessor" && Ca.addPostProcessor(t), t.type === "formatter" && (this.modules.formatter = t), t.type === "3rdParty" && this.modules.external.push(t), this;
|
|
3320
3320
|
}
|
|
3321
3321
|
setResolvedLanguage(t) {
|
|
3322
3322
|
if (!(!t || !this.languages) && !(["cimode", "dev"].indexOf(t) > -1))
|
|
@@ -3426,7 +3426,7 @@ class _t extends xr {
|
|
|
3426
3426
|
return new _t(t, r);
|
|
3427
3427
|
}
|
|
3428
3428
|
cloneInstance() {
|
|
3429
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3429
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ct;
|
|
3430
3430
|
const n = t.forkResourceStore;
|
|
3431
3431
|
n && delete t.forkResourceStore;
|
|
3432
3432
|
const s = {
|
|
@@ -3483,11 +3483,11 @@ ie.hasLoadedNamespace;
|
|
|
3483
3483
|
ie.loadNamespaces;
|
|
3484
3484
|
ie.loadLanguages;
|
|
3485
3485
|
const {
|
|
3486
|
-
slice:
|
|
3487
|
-
forEach:
|
|
3486
|
+
slice: Cu,
|
|
3487
|
+
forEach: Du
|
|
3488
3488
|
} = [];
|
|
3489
3489
|
function Lu(e) {
|
|
3490
|
-
return
|
|
3490
|
+
return Du.call(Cu.call(arguments, 1), (t) => {
|
|
3491
3491
|
if (t)
|
|
3492
3492
|
for (const r in t)
|
|
3493
3493
|
e[r] === void 0 && (e[r] = t[r]);
|
|
@@ -3663,7 +3663,7 @@ var Fu = {
|
|
|
3663
3663
|
}
|
|
3664
3664
|
};
|
|
3665
3665
|
let Xe = null;
|
|
3666
|
-
const
|
|
3666
|
+
const Cs = () => {
|
|
3667
3667
|
if (Xe !== null) return Xe;
|
|
3668
3668
|
try {
|
|
3669
3669
|
if (Xe = typeof window < "u" && window.sessionStorage !== null, !Xe)
|
|
@@ -3681,14 +3681,14 @@ var ju = {
|
|
|
3681
3681
|
let {
|
|
3682
3682
|
lookupSessionStorage: t
|
|
3683
3683
|
} = e;
|
|
3684
|
-
if (t &&
|
|
3684
|
+
if (t && Cs())
|
|
3685
3685
|
return window.sessionStorage.getItem(t) || void 0;
|
|
3686
3686
|
},
|
|
3687
3687
|
cacheUserLanguage(e, t) {
|
|
3688
3688
|
let {
|
|
3689
3689
|
lookupSessionStorage: r
|
|
3690
3690
|
} = t;
|
|
3691
|
-
r &&
|
|
3691
|
+
r && Cs() && window.sessionStorage.setItem(r, e);
|
|
3692
3692
|
}
|
|
3693
3693
|
}, Vu = {
|
|
3694
3694
|
name: "navigator",
|
|
@@ -3739,13 +3739,13 @@ var ju = {
|
|
|
3739
3739
|
return n[r];
|
|
3740
3740
|
}
|
|
3741
3741
|
};
|
|
3742
|
-
let
|
|
3742
|
+
let Da = !1;
|
|
3743
3743
|
try {
|
|
3744
|
-
document.cookie,
|
|
3744
|
+
document.cookie, Da = !0;
|
|
3745
3745
|
} catch {
|
|
3746
3746
|
}
|
|
3747
3747
|
const La = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
|
|
3748
|
-
|
|
3748
|
+
Da || La.splice(1, 1);
|
|
3749
3749
|
const Gu = () => ({
|
|
3750
3750
|
order: La,
|
|
3751
3751
|
lookupQuerystring: "lng",
|
|
@@ -3790,7 +3790,7 @@ class ka {
|
|
|
3790
3790
|
}
|
|
3791
3791
|
}
|
|
3792
3792
|
ka.type = "languageDetector";
|
|
3793
|
-
const Ku = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", W = "/openmrs/ws/rest/v1", Yu = "/openmrs/ws/rest/v2", Ua = "bahmni.user",
|
|
3793
|
+
const Ku = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", W = "/openmrs/ws/rest/v1", Yu = "/openmrs/ws/rest/v2", Ua = "bahmni.user", hg = "/bahmni/home/index.html", xa = W + "/session", Wu = "en", qa = "NG_TRANSLATE_LANG_KEY", Ju = (e, t) => Ku + `${e}/locales/locale_${t}.json`, Qu = (e, t) => `/bahmni_config/openmrs/i18n/${e}/locale_${t}.json`, qr = () => localStorage.getItem(qa) ?? Wu, Ds = async (e) => {
|
|
3794
3794
|
try {
|
|
3795
3795
|
const t = await F(e);
|
|
3796
3796
|
return t || (console.error(`Invalid response from ${e}`), {});
|
|
@@ -3799,9 +3799,9 @@ const Ku = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", W = "/ope
|
|
|
3799
3799
|
}
|
|
3800
3800
|
}, Ls = async (e, t) => {
|
|
3801
3801
|
let r = {}, n = {};
|
|
3802
|
-
return r = await
|
|
3802
|
+
return r = await Ds(
|
|
3803
3803
|
Ju(e, t)
|
|
3804
|
-
), n = await
|
|
3804
|
+
), n = await Ds(
|
|
3805
3805
|
Qu(e, t)
|
|
3806
3806
|
), {
|
|
3807
3807
|
...r,
|
|
@@ -3814,7 +3814,7 @@ const Ku = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", W = "/ope
|
|
|
3814
3814
|
}, e !== "en" && (r.en = {
|
|
3815
3815
|
[t]: await Ls(t, "en")
|
|
3816
3816
|
}), r;
|
|
3817
|
-
},
|
|
3817
|
+
}, mg = (e, t) => {
|
|
3818
3818
|
const r = e.toUpperCase(), n = t.toUpperCase().replace(/\s+/g, "_").replace(/[^A-Z0-9_]/g, "");
|
|
3819
3819
|
return `${r}_${n}`;
|
|
3820
3820
|
}, Zu = (e, t) => {
|
|
@@ -3831,7 +3831,7 @@ const Ku = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", W = "/ope
|
|
|
3831
3831
|
labels: n.labels ?? {},
|
|
3832
3832
|
concepts: n.concepts ?? {}
|
|
3833
3833
|
};
|
|
3834
|
-
},
|
|
3834
|
+
}, gg = async (e) => {
|
|
3835
3835
|
const t = qr(), r = await Xu(t, e);
|
|
3836
3836
|
return ie.isInitialized ? (Object.entries(r).forEach(([n, s]) => {
|
|
3837
3837
|
Object.entries(s).forEach(([o, a]) => {
|
|
@@ -3854,7 +3854,7 @@ const Ku = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", W = "/ope
|
|
|
3854
3854
|
}
|
|
3855
3855
|
}), ie;
|
|
3856
3856
|
};
|
|
3857
|
-
function
|
|
3857
|
+
function yg() {
|
|
3858
3858
|
const e = bn(null), t = bn(null), r = Wr(async () => {
|
|
3859
3859
|
t.current && (t.current.getTracks().forEach((a) => a.stop()), t.current = null);
|
|
3860
3860
|
const o = await navigator.mediaDevices.getUserMedia({
|
|
@@ -3877,10 +3877,10 @@ function gg() {
|
|
|
3877
3877
|
}, []);
|
|
3878
3878
|
return _n(() => () => n(), [n]), { videoRef: e, start: r, stop: n, capture: s };
|
|
3879
3879
|
}
|
|
3880
|
-
const el = "bahmni.enableAuditLog", Ma = (e) => `${W}/bahmnicore/sql/globalproperty?property=${e}`,
|
|
3880
|
+
const el = "bahmni.enableAuditLog", Ma = (e) => `${W}/bahmnicore/sql/globalproperty?property=${e}`, vg = async (e, t, r) => {
|
|
3881
3881
|
const { exact: n = !0, refetchActiveNow: s = !0 } = r ?? {};
|
|
3882
3882
|
await e.cancelQueries({ queryKey: t, exact: n }), await e.removeQueries({ queryKey: t, exact: n }), await e.invalidateQueries({ queryKey: t, exact: n }), s && await e.refetchQueries({ queryKey: t, exact: n, type: "active" });
|
|
3883
|
-
},
|
|
3883
|
+
}, wg = () => Math.random().toString(36).substring(2, 9), Eg = () => {
|
|
3884
3884
|
if (typeof globalThis < "u" && globalThis.crypto?.randomUUID)
|
|
3885
3885
|
return globalThis.crypto.randomUUID();
|
|
3886
3886
|
const e = globalThis.crypto || globalThis.msCrypto;
|
|
@@ -3892,7 +3892,7 @@ const el = "bahmni.enableAuditLog", Ma = (e) => `${W}/bahmnicore/sql/globalprope
|
|
|
3892
3892
|
"Crypto API (crypto.randomUUID or crypto.getRandomValues) is not available. UUID generation requires cryptographically secure random number generation."
|
|
3893
3893
|
);
|
|
3894
3894
|
};
|
|
3895
|
-
function
|
|
3895
|
+
function bg(e, t = " -") {
|
|
3896
3896
|
return e ? e.toLowerCase().split(new RegExp(`[${t}]+`)).map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ") : "";
|
|
3897
3897
|
}
|
|
3898
3898
|
function Fa(e) {
|
|
@@ -3907,10 +3907,10 @@ function Fa(e) {
|
|
|
3907
3907
|
function tl(e) {
|
|
3908
3908
|
document.cookie = `${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`;
|
|
3909
3909
|
}
|
|
3910
|
-
function
|
|
3910
|
+
function _g(e, t) {
|
|
3911
3911
|
document.cookie = `${e}=${t}; path=/;`;
|
|
3912
3912
|
}
|
|
3913
|
-
const
|
|
3913
|
+
const Sg = (e) => !e || e.trim().length === 0, Rg = (e, t) => {
|
|
3914
3914
|
if (!e || !t || t.length === 0)
|
|
3915
3915
|
return 999;
|
|
3916
3916
|
const r = t.findIndex(
|
|
@@ -3918,7 +3918,7 @@ const _g = (e) => !e || e.trim().length === 0, Sg = (e, t) => {
|
|
|
3918
3918
|
);
|
|
3919
3919
|
return r === -1 ? 999 : r;
|
|
3920
3920
|
};
|
|
3921
|
-
function
|
|
3921
|
+
function Tg(e, t) {
|
|
3922
3922
|
if (!e || e.length === 0)
|
|
3923
3923
|
return [];
|
|
3924
3924
|
const r = /* @__PURE__ */ new Map();
|
|
@@ -3930,7 +3930,7 @@ function Rg(e, t) {
|
|
|
3930
3930
|
items: s
|
|
3931
3931
|
}));
|
|
3932
3932
|
}
|
|
3933
|
-
function
|
|
3933
|
+
function Og(e, t, r) {
|
|
3934
3934
|
if (!e || e.length === 0)
|
|
3935
3935
|
return [];
|
|
3936
3936
|
const n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
|
|
@@ -3951,7 +3951,7 @@ function rl(e) {
|
|
|
3951
3951
|
o[n(a[1])] = n(a[2]);
|
|
3952
3952
|
return o;
|
|
3953
3953
|
}
|
|
3954
|
-
function
|
|
3954
|
+
function Ag(e, t, r) {
|
|
3955
3955
|
const n = /{{([^}]*)}}/g, s = e.match(n);
|
|
3956
3956
|
let o = e;
|
|
3957
3957
|
const a = r ?? !1, i = a ? rl() : {};
|
|
@@ -3964,7 +3964,7 @@ function Og(e, t, r) {
|
|
|
3964
3964
|
const nl = (e) => new Promise((t, r) => {
|
|
3965
3965
|
const n = new FileReader();
|
|
3966
3966
|
n.onloadend = () => t(n.result), n.onerror = r, n.readAsDataURL(e);
|
|
3967
|
-
}),
|
|
3967
|
+
}), Ng = (e) => {
|
|
3968
3968
|
if (typeof e == "number" && !isNaN(e))
|
|
3969
3969
|
return "number";
|
|
3970
3970
|
if (typeof e != "string")
|
|
@@ -3972,10 +3972,17 @@ const nl = (e) => new Promise((t, r) => {
|
|
|
3972
3972
|
const t = e.toLowerCase();
|
|
3973
3973
|
return t.endsWith(".pdf") ? "PDF" : [".png", ".jpg", ".jpeg", ".gif", ".bmp", ".svg"].some((s) => t.endsWith(s)) ? "Image" : [".mp4", ".ogg", ".webm", ".mkv", ".flv"].some((s) => t.endsWith(s)) ? "Video" : typeof e == "string" ? "string" : "object";
|
|
3974
3974
|
};
|
|
3975
|
-
function
|
|
3975
|
+
function $g(e) {
|
|
3976
3976
|
return e.replace(/[\s-]+/g, "_").replace(/([a-z])([A-Z])/g, "$1_$2").replace(/([A-Z])([A-Z][a-z])/g, "$1_$2").toUpperCase();
|
|
3977
3977
|
}
|
|
3978
|
-
function
|
|
3978
|
+
function Pg(e, t, r, n, s) {
|
|
3979
|
+
const o = (a) => ({
|
|
3980
|
+
...n(a),
|
|
3981
|
+
disabled: !0
|
|
3982
|
+
});
|
|
3983
|
+
return e ? [o(s.loading)] : t ? [o(s.error)] : r.length ? r : [o(s.empty)];
|
|
3984
|
+
}
|
|
3985
|
+
function Ig(e) {
|
|
3979
3986
|
return e ? e.replaceAll(/[_-]/g, " ").replaceAll(/([a-z])([A-Z])/g, "$1 $2").replaceAll(/([A-Z])([A-Z][a-z])/g, "$1 $2").replaceAll(/([a-z])(\d)/gi, "$1 $2").replaceAll(/(\d)([a-z])/gi, "$1 $2").replaceAll(/\s+/g, " ").trim().toLowerCase().replace(/^./, (t) => t.toUpperCase()) : "";
|
|
3980
3987
|
}
|
|
3981
3988
|
const sl = (e) => W + `/user?username=${e}&v=custom:(display,username,uuid)`, ja = "bahmni.user.location", ol = `${W}/location?tags=Login Location&v=default`, al = (e) => W + `/user/${e}?v=full`, il = (e) => W + `/bahmni/app/setting?module=${e}`, cl = "default_dateFormat", ul = xa, ll = [
|
|
@@ -3984,7 +3991,7 @@ const sl = (e) => W + `/user?username=${e}&v=custom:(display,username,uuid)`, ja
|
|
|
3984
3991
|
], dl = {
|
|
3985
3992
|
LOGOUT_FAILED: "USER_LOGOUT_FAILED"
|
|
3986
3993
|
};
|
|
3987
|
-
async function
|
|
3994
|
+
async function Cg() {
|
|
3988
3995
|
const e = Fa(Ua);
|
|
3989
3996
|
if (!e)
|
|
3990
3997
|
return null;
|
|
@@ -4008,15 +4015,15 @@ const qn = () => {
|
|
|
4008
4015
|
if (!t.uuid)
|
|
4009
4016
|
throw new Error(ie.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
|
|
4010
4017
|
return t;
|
|
4011
|
-
},
|
|
4018
|
+
}, Dg = async () => (await F(il("commons"))).find(
|
|
4012
4019
|
(r) => r.property === cl
|
|
4013
|
-
)?.value ?? null,
|
|
4020
|
+
)?.value ?? null, Lg = async () => {
|
|
4014
4021
|
try {
|
|
4015
4022
|
return (await F(ol)).results ?? [];
|
|
4016
4023
|
} catch (e) {
|
|
4017
4024
|
return console.error("Failed to fetch available locations:", e), [];
|
|
4018
4025
|
}
|
|
4019
|
-
},
|
|
4026
|
+
}, kg = async () => {
|
|
4020
4027
|
try {
|
|
4021
4028
|
await Pa(ul), ll.forEach((e) => {
|
|
4022
4029
|
tl(e);
|
|
@@ -4024,8 +4031,8 @@ const qn = () => {
|
|
|
4024
4031
|
} catch (e) {
|
|
4025
4032
|
throw console.error("Logout failed:", e), new Error(ie.t(dl.LOGOUT_FAILED));
|
|
4026
4033
|
}
|
|
4027
|
-
},
|
|
4028
|
-
await
|
|
4034
|
+
}, Ug = async (e, t) => {
|
|
4035
|
+
await Ce(al(e), {
|
|
4029
4036
|
userProperties: { loginLocation: t.uuid }
|
|
4030
4037
|
});
|
|
4031
4038
|
}, Mn = {
|
|
@@ -4074,7 +4081,7 @@ const qn = () => {
|
|
|
4074
4081
|
}, Va = W + "/idgen/identifiertype", gl = (e) => W + `/bahmni/app/setting?module=${e}`, yl = "bahmni.primaryIdentifierType", vl = W + "/bahmnicore/patientprofile", wl = (e) => W + `/bahmnicore/patientprofile/${e}`, El = (e) => W + `/patientprofile/${e}?v=full`, bl = (e, t, r = 20, n) => {
|
|
4075
4082
|
let s = `/openmrs/module/addresshierarchy/ajax/getPossibleAddressHierarchyEntriesWithParents.form?addressField=${e}&limit=${r}&searchString=${encodeURIComponent(t)}`;
|
|
4076
4083
|
return n && (s += `&parent=${n}`), s;
|
|
4077
|
-
}, _l = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", Sl = W + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", Rl = 20, Tl = 2,
|
|
4084
|
+
}, _l = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", Sl = W + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", Rl = 20, Tl = 2, xg = 120, qg = 50, Mg = 15, Ol = /^[a-f0-9-]{36}$/i, Al = (e) => Yu + `/patientImage?patientUuid=${e}`, Nl = W + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", $l = async (e) => {
|
|
4078
4085
|
if (!e || e.trim() === "")
|
|
4079
4086
|
throw new Error("Invalid patient UUID: UUID cannot be empty");
|
|
4080
4087
|
if (!Ol.test(e))
|
|
@@ -4085,7 +4092,7 @@ const qn = () => {
|
|
|
4085
4092
|
return null;
|
|
4086
4093
|
const t = e.name[0], r = t.given?.join(" ") ?? "", n = t.family ?? "";
|
|
4087
4094
|
return !r && !n ? null : `${r} ${n}`.trim();
|
|
4088
|
-
},
|
|
4095
|
+
}, Cl = (e) => {
|
|
4089
4096
|
if (!e) return null;
|
|
4090
4097
|
const t = [
|
|
4091
4098
|
...e.line ?? [],
|
|
@@ -4094,8 +4101,8 @@ const qn = () => {
|
|
|
4094
4101
|
// Extracted address extensions
|
|
4095
4102
|
], r = e.city ?? "", n = e.state ?? "", s = e.postalCode ?? "", o = t.filter(Boolean);
|
|
4096
4103
|
return r && o.push(r), n && s ? o.push(`${n} ${s}`) : n ? o.push(n) : s && o.push(s), o.length > 0 ? o.join(", ").trim() : null;
|
|
4097
|
-
},
|
|
4098
|
-
const t = e.address && e.address.length > 0 ?
|
|
4104
|
+
}, Dl = (e) => !e?.system || !e.value ? null : `${e.system}: ${e.value}`, Ll = (e) => {
|
|
4105
|
+
const t = e.address && e.address.length > 0 ? Cl(e.address[0]) : null, r = e.telecom && e.telecom.length > 0 ? Dl(e.telecom[0]) : null, n = e.identifier ?? [], s = /* @__PURE__ */ new Map();
|
|
4099
4106
|
return n.length > 0 && n.forEach((o) => {
|
|
4100
4107
|
!o.type?.text || !o.value || s.set(o.type.text, o.value);
|
|
4101
4108
|
}), {
|
|
@@ -4107,20 +4114,20 @@ const qn = () => {
|
|
|
4107
4114
|
formattedContact: r,
|
|
4108
4115
|
identifiers: s
|
|
4109
4116
|
};
|
|
4110
|
-
},
|
|
4117
|
+
}, Fg = async (e) => {
|
|
4111
4118
|
const t = await $l(e);
|
|
4112
4119
|
return Ll(t);
|
|
4113
|
-
},
|
|
4120
|
+
}, jg = async (e) => {
|
|
4114
4121
|
const t = await fetch(Al(e));
|
|
4115
4122
|
if (!t.ok) return null;
|
|
4116
4123
|
const r = await t.blob();
|
|
4117
4124
|
return await nl(r);
|
|
4118
|
-
},
|
|
4125
|
+
}, Vg = async (e, t) => {
|
|
4119
4126
|
const r = qn();
|
|
4120
4127
|
return await F(
|
|
4121
4128
|
hl(e, r.uuid, t)
|
|
4122
4129
|
);
|
|
4123
|
-
},
|
|
4130
|
+
}, Bg = async (e, t, r, n, s) => {
|
|
4124
4131
|
const o = qn();
|
|
4125
4132
|
return await F(
|
|
4126
4133
|
ml(
|
|
@@ -4131,9 +4138,9 @@ const qn = () => {
|
|
|
4131
4138
|
o.uuid
|
|
4132
4139
|
)
|
|
4133
4140
|
);
|
|
4134
|
-
},
|
|
4141
|
+
}, Hg = async () => F(Va), kl = async () => (await F(gl("core"))).find(
|
|
4135
4142
|
(r) => r.property === yl
|
|
4136
|
-
)?.value ?? null,
|
|
4143
|
+
)?.value ?? null, zg = async () => {
|
|
4137
4144
|
const [e, t] = await Promise.all([
|
|
4138
4145
|
F(Va),
|
|
4139
4146
|
kl()
|
|
@@ -4150,10 +4157,10 @@ const qn = () => {
|
|
|
4150
4157
|
sourcesByPrefix: n,
|
|
4151
4158
|
primaryIdentifierTypeUuid: t
|
|
4152
4159
|
}) : { prefixes: r, sourcesByPrefix: n, primaryIdentifierTypeUuid: t };
|
|
4153
|
-
},
|
|
4160
|
+
}, Gg = async (e) => Ce(vl, e), Kg = async (e, t) => Ce(
|
|
4154
4161
|
wl(e),
|
|
4155
4162
|
t
|
|
4156
|
-
),
|
|
4163
|
+
), Yg = async () => F(Ma("mrs.genders")), Wg = async (e, t, r = Rl, n) => {
|
|
4157
4164
|
if (!t || t.length < Tl)
|
|
4158
4165
|
return [];
|
|
4159
4166
|
try {
|
|
@@ -4165,7 +4172,7 @@ const qn = () => {
|
|
|
4165
4172
|
`Failed to fetch address hierarchy for field "${e}": ${s instanceof Error ? s.message : "Unknown error"}`
|
|
4166
4173
|
);
|
|
4167
4174
|
}
|
|
4168
|
-
},
|
|
4175
|
+
}, Jg = async () => F(_l), Qg = async (e) => F(El(e)), Xg = async () => {
|
|
4169
4176
|
try {
|
|
4170
4177
|
return (await F(
|
|
4171
4178
|
Sl
|
|
@@ -4179,9 +4186,9 @@ const qn = () => {
|
|
|
4179
4186
|
`Failed to fetch relationship types: ${e instanceof Error ? e.message : "Unknown error"}`
|
|
4180
4187
|
);
|
|
4181
4188
|
}
|
|
4182
|
-
},
|
|
4189
|
+
}, Zg = async () => F(Nl);
|
|
4183
4190
|
var Ul = /* @__PURE__ */ ((e) => (e.BOOLEAN = "java.lang.Boolean", e.BOOLEAN_DATATYPE = "org.openmrs.customdatatype.datatype.BooleanDatatype", e.CONCEPT = "org.openmrs.Concept", e.CODED_CONCEPT = "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype", e.CONCEPT_DATATYPE = "org.openmrs.customdatatype.datatype.ConceptDatatype", e.STRING = "java.lang.String", e.FREE_TEXT = "org.openmrs.customdatatype.datatype.FreeTextDatatype", e.REGEX_VALIDATED_TEXT = "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", e.INTEGER = "java.lang.Integer", e.FLOAT = "java.lang.Float", e.ATTRIBUTABLE_DATE = "org.openmrs.util.AttributableDate", e.DATE_DATATYPE = "org.openmrs.customdatatype.datatype.DateDatatype", e))(Ul || {}), xl = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.DROPDOWN = "dropdown", e.TEXT = "text", e.NUMBER = "number", e.DATE = "date", e))(xl || {});
|
|
4184
|
-
const
|
|
4191
|
+
const ey = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype" ? "checkbox" : e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype" ? "dropdown" : e === "java.lang.Integer" || e === "java.lang.Float" ? "number" : e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype" ? "date" : "text", ty = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype", ry = (e) => e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype", ny = (e) => e === "java.lang.Integer" || e === "java.lang.Float", sy = (e) => e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype", oy = (e) => e === "java.lang.String" || e === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || e === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", ql = (e) => {
|
|
4185
4192
|
const t = new CustomEvent("bahmni-audit-log", { detail: e });
|
|
4186
4193
|
window.dispatchEvent(t);
|
|
4187
4194
|
}, Ml = (e) => {
|
|
@@ -4234,10 +4241,10 @@ const Xg = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype
|
|
|
4234
4241
|
}
|
|
4235
4242
|
}, Fl = W + "/auditlog", jl = {
|
|
4236
4243
|
UNKNOWN_EVENT_TYPE: "AUDIT_LOG_ERROR_UNKNOWN_EVENT_TYPE"
|
|
4237
|
-
}, Vl = () => W + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", Bl = W + "/visit", Hl = (e) => W + `/visit?patient=${e}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, zl = (e) => W + `/bahmnicore/visitLocation/${e}`,
|
|
4244
|
+
}, Vl = () => W + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", Bl = W + "/visit", Hl = (e) => W + `/visit?patient=${e}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, zl = (e) => W + `/bahmnicore/visitLocation/${e}`, ay = async () => F(Vl()), Gl = async (e) => F(Hl(e)), Kl = async (e) => F(zl(e)), Yl = async (e) => Ce(Bl, e), iy = async (e) => {
|
|
4238
4245
|
const t = await Gl(e);
|
|
4239
4246
|
return t?.results && t.results.length > 0;
|
|
4240
|
-
},
|
|
4247
|
+
}, cy = async (e, t) => {
|
|
4241
4248
|
const r = await Kl(
|
|
4242
4249
|
qn().uuid
|
|
4243
4250
|
), n = {
|
|
@@ -4754,7 +4761,7 @@ const Td = /^(\d+)(th|st|nd|rd)?/i, Od = /\d+/i, Ad = {
|
|
|
4754
4761
|
narrow: /^[jfmasond]/i,
|
|
4755
4762
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
4756
4763
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
4757
|
-
},
|
|
4764
|
+
}, Cd = {
|
|
4758
4765
|
narrow: [
|
|
4759
4766
|
/^j/i,
|
|
4760
4767
|
/^f/i,
|
|
@@ -4783,7 +4790,7 @@ const Td = /^(\d+)(th|st|nd|rd)?/i, Od = /\d+/i, Ad = {
|
|
|
4783
4790
|
/^n/i,
|
|
4784
4791
|
/^d/i
|
|
4785
4792
|
]
|
|
4786
|
-
},
|
|
4793
|
+
}, Dd = {
|
|
4787
4794
|
narrow: /^[smtwf]/i,
|
|
4788
4795
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
4789
4796
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
@@ -4827,11 +4834,11 @@ const Td = /^(\d+)(th|st|nd|rd)?/i, Od = /\d+/i, Ad = {
|
|
|
4827
4834
|
month: ht({
|
|
4828
4835
|
matchPatterns: Id,
|
|
4829
4836
|
defaultMatchWidth: "wide",
|
|
4830
|
-
parsePatterns:
|
|
4837
|
+
parsePatterns: Cd,
|
|
4831
4838
|
defaultParseWidth: "any"
|
|
4832
4839
|
}),
|
|
4833
4840
|
day: ht({
|
|
4834
|
-
matchPatterns:
|
|
4841
|
+
matchPatterns: Dd,
|
|
4835
4842
|
defaultMatchWidth: "wide",
|
|
4836
4843
|
parsePatterns: Ld,
|
|
4837
4844
|
defaultParseWidth: "any"
|
|
@@ -5609,21 +5616,21 @@ function Hn(e, t) {
|
|
|
5609
5616
|
}
|
|
5610
5617
|
return de(a + i + c, t?.in);
|
|
5611
5618
|
}
|
|
5612
|
-
const
|
|
5619
|
+
const Dt = {
|
|
5613
5620
|
dateTimeDelimiter: /[T ]/,
|
|
5614
5621
|
timeZoneDelimiter: /[Z ]/i,
|
|
5615
5622
|
timezone: /([Z+-].*)$/
|
|
5616
5623
|
}, af = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, cf = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, uf = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
5617
5624
|
function lf(e) {
|
|
5618
|
-
const t = {}, r = e.split(
|
|
5625
|
+
const t = {}, r = e.split(Dt.dateTimeDelimiter);
|
|
5619
5626
|
let n;
|
|
5620
5627
|
if (r.length > 2)
|
|
5621
5628
|
return t;
|
|
5622
|
-
if (/:/.test(r[0]) ? n = r[0] : (t.date = r[0], n = r[1],
|
|
5629
|
+
if (/:/.test(r[0]) ? n = r[0] : (t.date = r[0], n = r[1], Dt.timeZoneDelimiter.test(t.date) && (t.date = e.split(Dt.timeZoneDelimiter)[0], n = e.substr(
|
|
5623
5630
|
t.date.length,
|
|
5624
5631
|
e.length
|
|
5625
5632
|
))), n) {
|
|
5626
|
-
const s =
|
|
5633
|
+
const s = Dt.timezone.exec(n);
|
|
5627
5634
|
s ? (t.time = n.replace(s[1], ""), t.timezone = s[1]) : t.time = n;
|
|
5628
5635
|
}
|
|
5629
5636
|
return t;
|
|
@@ -5704,7 +5711,7 @@ function Sf(e, t, r) {
|
|
|
5704
5711
|
function Rf(e, t, r) {
|
|
5705
5712
|
return jn(e, -t, r);
|
|
5706
5713
|
}
|
|
5707
|
-
const
|
|
5714
|
+
const uy = {
|
|
5708
5715
|
PROPOSED: "proposed",
|
|
5709
5716
|
PENDING: "pending",
|
|
5710
5717
|
BOOKED: "booked",
|
|
@@ -5715,38 +5722,38 @@ const iy = {
|
|
|
5715
5722
|
CHECKED_IN: "checked-in",
|
|
5716
5723
|
WAITLIST: "waitlist",
|
|
5717
5724
|
ENTERED_IN_ERROR: "entered-in-error"
|
|
5718
|
-
}, Tf = W + "/appointments/search", Qa = W + "/appointments",
|
|
5725
|
+
}, Tf = W + "/appointments/search", Qa = W + "/appointments", ly = "http://fhir.bahmni.org/code-system/appointments", Of = (e) => `${Qa}/${e}`, jr = (e, t, r, n) => {
|
|
5719
5726
|
const s = t === "upcoming", o = s ? "ge" : "le", a = s ? "date" : "-date", i = s ? (/* @__PURE__ */ new Date()).toISOString() : Sf(/* @__PURE__ */ new Date()).toISOString();
|
|
5720
5727
|
let c = `${ce}/Appointment?patient=${e}&date=${o}${i}&_sort=${a}`;
|
|
5721
5728
|
return r !== void 0 && r > 0 && (c += `&_count=${r}`), n !== void 0 && n > 0 && (c += `&_getpagesoffset=${n}`), c;
|
|
5722
|
-
}, Af = (e) => jr(e, "upcoming"), Nf = (e, t) => jr(e, "past", t), $f = (e) => `${Qa}/${e}/status-change`, Pf = W + "/appointmentService/all/full", If = (e) => `${W}/appointmentService?uuid=${e}`,
|
|
5723
|
-
async function
|
|
5729
|
+
}, Af = (e) => jr(e, "upcoming"), Nf = (e, t) => jr(e, "past", t), $f = (e) => `${Qa}/${e}/status-change`, Pf = W + "/appointmentService/all/full", If = (e) => `${W}/appointmentService?uuid=${e}`, Cf = (e, t = 10, r = 0) => jr(e, "upcoming", t, r), Df = (e, t = 10, r = 0) => jr(e, "past", t, r), dy = async (e) => await Ce(Tf, e);
|
|
5730
|
+
async function fy(e) {
|
|
5724
5731
|
return await F(Af(e));
|
|
5725
5732
|
}
|
|
5726
|
-
async function
|
|
5733
|
+
async function py(e, t) {
|
|
5727
5734
|
return await F(
|
|
5728
5735
|
Nf(e, t)
|
|
5729
5736
|
);
|
|
5730
5737
|
}
|
|
5731
|
-
const
|
|
5738
|
+
const hy = async (e, t, r) => await Ce($f(e), {
|
|
5732
5739
|
toStatus: t,
|
|
5733
5740
|
onDate: r
|
|
5734
5741
|
});
|
|
5735
|
-
async function
|
|
5742
|
+
async function my(e) {
|
|
5736
5743
|
return await F(Of(e));
|
|
5737
5744
|
}
|
|
5738
|
-
const
|
|
5745
|
+
const gy = async () => await F(Pf), yy = async (e) => {
|
|
5739
5746
|
await Pa(If(e));
|
|
5740
5747
|
};
|
|
5741
|
-
async function
|
|
5748
|
+
async function vy(e, t = 10, r = 1) {
|
|
5742
5749
|
const n = (r - 1) * t, s = await F(
|
|
5743
|
-
|
|
5750
|
+
Cf(e, t, n)
|
|
5744
5751
|
);
|
|
5745
5752
|
return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
|
|
5746
5753
|
}
|
|
5747
|
-
async function
|
|
5754
|
+
async function wy(e, t = 10, r = 1) {
|
|
5748
5755
|
const n = (r - 1) * t, s = await F(
|
|
5749
|
-
|
|
5756
|
+
Df(e, t, n)
|
|
5750
5757
|
);
|
|
5751
5758
|
return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
|
|
5752
5759
|
}
|
|
@@ -5757,7 +5764,7 @@ const Xa = "dd/MM/yyyy", Lf = "default_dateFormat", kf = "h:mm a", Te = {
|
|
|
5757
5764
|
INVALID_FORMAT: "DATE_ERROR_INVALID_FORMAT",
|
|
5758
5765
|
NULL_OR_UNDEFINED: "DATE_ERROR_NULL_OR_UNDEFINED"
|
|
5759
5766
|
};
|
|
5760
|
-
function
|
|
5767
|
+
function Ey(e) {
|
|
5761
5768
|
if (typeof e != "string" || !/^\d{4}-\d{2}-\d{2}$/.test(e))
|
|
5762
5769
|
return null;
|
|
5763
5770
|
const t = Hn(e);
|
|
@@ -5825,7 +5832,7 @@ function xf() {
|
|
|
5825
5832
|
return Xa;
|
|
5826
5833
|
}
|
|
5827
5834
|
}
|
|
5828
|
-
function
|
|
5835
|
+
function by(e, t, r = !1, n) {
|
|
5829
5836
|
const s = t ?? ((a) => a);
|
|
5830
5837
|
let o;
|
|
5831
5838
|
try {
|
|
@@ -5835,7 +5842,7 @@ function wy(e, t, r = !1, n) {
|
|
|
5835
5842
|
}
|
|
5836
5843
|
return r && !n && (o = `${o} ${kf}`), Uf(e, o, s);
|
|
5837
5844
|
}
|
|
5838
|
-
function
|
|
5845
|
+
function _y(e, t, r) {
|
|
5839
5846
|
if (!e || !$t(e) || t === null || t === void 0 || !r || typeof t != "number")
|
|
5840
5847
|
return;
|
|
5841
5848
|
const n = new Date(e);
|
|
@@ -5850,7 +5857,7 @@ function Ey(e, t, r) {
|
|
|
5850
5857
|
return;
|
|
5851
5858
|
}
|
|
5852
5859
|
}
|
|
5853
|
-
function
|
|
5860
|
+
function Sy(e, t) {
|
|
5854
5861
|
if (e == null)
|
|
5855
5862
|
return {
|
|
5856
5863
|
formattedResult: "",
|
|
@@ -5902,11 +5909,11 @@ function by(e, t) {
|
|
|
5902
5909
|
}
|
|
5903
5910
|
return { formattedResult: c };
|
|
5904
5911
|
}
|
|
5905
|
-
const
|
|
5912
|
+
const Ry = () => {
|
|
5906
5913
|
const e = /* @__PURE__ */ new Date();
|
|
5907
5914
|
return e.setHours(0, 0, 0, 0), e;
|
|
5908
5915
|
};
|
|
5909
|
-
function
|
|
5916
|
+
function Ty(e, t) {
|
|
5910
5917
|
const r = typeof e == "string" ? Hn(e) : new Date(e), n = /* @__PURE__ */ new Date(), s = Bn(n, r), o = jn(r, s), a = Vn(n, o), i = Mr(o, a), c = Pn(n, i), d = {
|
|
5911
5918
|
years: "YEARS",
|
|
5912
5919
|
months: "MONTHS",
|
|
@@ -5940,14 +5947,14 @@ const qf = {
|
|
|
5940
5947
|
h: 1 / 24,
|
|
5941
5948
|
min: 1 / 1440,
|
|
5942
5949
|
s: 1 / 86400
|
|
5943
|
-
},
|
|
5950
|
+
}, Oy = (e, t, r) => {
|
|
5944
5951
|
const n = typeof e == "string" ? new Date(e) : e;
|
|
5945
5952
|
if (isNaN(n.getTime()))
|
|
5946
5953
|
throw new Error(`Invalid date: ${e}`);
|
|
5947
5954
|
const s = qf[r] ?? 1, o = t * s;
|
|
5948
5955
|
return za(n, o);
|
|
5949
|
-
},
|
|
5950
|
-
function
|
|
5956
|
+
}, Ay = (e, t, r, n) => e <= n && r <= t;
|
|
5957
|
+
function Ny(e, t, r = !1) {
|
|
5951
5958
|
return !e || !Array.isArray(e) ? [] : e.sort((n, s) => {
|
|
5952
5959
|
const o = new Date(n[t]), a = new Date(s[t]);
|
|
5953
5960
|
if (isNaN(o.getTime()) && isNaN(a.getTime())) return 0;
|
|
@@ -5986,7 +5993,7 @@ const Mf = () => {
|
|
|
5986
5993
|
);
|
|
5987
5994
|
}
|
|
5988
5995
|
};
|
|
5989
|
-
},
|
|
5996
|
+
}, $y = Mf(), Ff = (e) => ce + `/ValueSet/${e}/$expand`, jf = (e) => ce + `/ValueSet/$expand?filter=${encodeURIComponent(e)}`, Vf = (e, t, r) => W + `/bahmni/terminologies/concepts?limit=${t}&locale=${r}&term=${e}`, Bf = (e) => W + `/concept/${e}`, Hf = (e) => `${W}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(e)}`, zf = "SHORT", Gf = "FULLY_SPECIFIED", Py = async (e, t = 20) => {
|
|
5990
5997
|
const r = qr(), n = Vf(e, t, r);
|
|
5991
5998
|
return F(n);
|
|
5992
5999
|
}, br = async (e) => {
|
|
@@ -5996,10 +6003,10 @@ const Mf = () => {
|
|
|
5996
6003
|
const t = `${jf(e)}`;
|
|
5997
6004
|
return F(t);
|
|
5998
6005
|
};
|
|
5999
|
-
async function
|
|
6006
|
+
async function Iy(e) {
|
|
6000
6007
|
return await F(Bf(e));
|
|
6001
6008
|
}
|
|
6002
|
-
async function
|
|
6009
|
+
async function Cy(e) {
|
|
6003
6010
|
const t = Hf(e), r = await F(t);
|
|
6004
6011
|
return !r.results || r.results.length === 0 ? null : r.results[0];
|
|
6005
6012
|
}
|
|
@@ -6035,7 +6042,7 @@ const Wf = (e) => ce + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
|
|
|
6035
6042
|
}), an = (e, t) => {
|
|
6036
6043
|
const r = e.expansion?.contains ?? [];
|
|
6037
6044
|
return Qf(r).map((s) => Xf(s, t));
|
|
6038
|
-
},
|
|
6045
|
+
}, Dy = async (e, t, r) => {
|
|
6039
6046
|
const n = e ?? et.MEDICATION.code, s = t ?? et.FOOD.code, o = r ?? et.ENVIRONMENT.code, [a, i, c] = await Promise.all([
|
|
6040
6047
|
br(n),
|
|
6041
6048
|
br(s),
|
|
@@ -6055,7 +6062,7 @@ const Wf = (e) => ce + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
|
|
|
6055
6062
|
et.ENVIRONMENT.display
|
|
6056
6063
|
)
|
|
6057
6064
|
];
|
|
6058
|
-
},
|
|
6065
|
+
}, Ly = async (e) => {
|
|
6059
6066
|
const t = e ?? Jf.code;
|
|
6060
6067
|
return (await br(t)).compose?.include[0]?.concept ?? [];
|
|
6061
6068
|
};
|
|
@@ -6089,22 +6096,22 @@ function tp(e) {
|
|
|
6089
6096
|
};
|
|
6090
6097
|
});
|
|
6091
6098
|
}
|
|
6092
|
-
async function
|
|
6099
|
+
async function ky(e) {
|
|
6093
6100
|
const t = await ep(e);
|
|
6094
6101
|
return tp(t);
|
|
6095
6102
|
}
|
|
6096
6103
|
var rp = /* @__PURE__ */ ((e) => (e.Active = "Active", e.Inactive = "Inactive", e))(rp || {}), np = /* @__PURE__ */ ((e) => (e.mild = "mild", e.moderate = "moderate", e.severe = "severe", e))(np || {});
|
|
6097
|
-
const
|
|
6104
|
+
const Uy = "http://fhir.openmrs.org/code-system/encounter-type", ei = "problem-list-item", xy = "http://terminology.hl7.org/CodeSystem/condition-ver-status", ti = "encounter-diagnosis", qy = "http://terminology.hl7.org/CodeSystem/condition-clinical", My = "http://terminology.hl7.org/CodeSystem/condition-category", Fy = "http://fhir.bahmni.org/ext/lab-order-concept-type", jy = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", Vy = "http://fhir.bahmni.org/ext/observation/form-namespace-path", By = "http://fhir.bahmni.org/ext/observation/obs-value-attachment", Hy = "Numeric", zy = "Complex", Gy = "final", Ky = "Observation", Yy = /^\d{4}-\d{2}-\d{2}/, sp = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/, Wy = {
|
|
6098
6105
|
ABNORMAL: { code: "A", display: "Abnormal" },
|
|
6099
6106
|
NORMAL: { code: "N", display: "Normal" }
|
|
6100
6107
|
}, op = (e) => ce + `/Condition?category=${ei}&patient=${e}&_count=100&_sort=-_lastUpdated`, ap = (e, t = 10, r = 0) => ce + `/Condition?category=${ei}&patient=${e}&_count=${t}&_getpagesoffset=${r}&_sort=-_lastUpdated`;
|
|
6101
6108
|
async function ip(e) {
|
|
6102
6109
|
return await F(`${op(e)}`);
|
|
6103
6110
|
}
|
|
6104
|
-
async function
|
|
6111
|
+
async function Jy(e) {
|
|
6105
6112
|
return (await ip(e)).entry?.filter((n) => n.resource?.resourceType === "Condition").map((n) => n.resource) ?? [];
|
|
6106
6113
|
}
|
|
6107
|
-
async function
|
|
6114
|
+
async function Qy(e, t = 10, r = 1) {
|
|
6108
6115
|
const n = (r - 1) * t, s = await F(
|
|
6109
6116
|
ap(e, t, n)
|
|
6110
6117
|
);
|
|
@@ -6170,11 +6177,11 @@ function gp(e) {
|
|
|
6170
6177
|
}
|
|
6171
6178
|
return Array.from(t.values());
|
|
6172
6179
|
}
|
|
6173
|
-
async function
|
|
6180
|
+
async function Xy(e) {
|
|
6174
6181
|
const t = await fp(e), r = ri(t);
|
|
6175
6182
|
return gp(r);
|
|
6176
6183
|
}
|
|
6177
|
-
async function
|
|
6184
|
+
async function Zy(e, t = 10, r = 1) {
|
|
6178
6185
|
const n = (r - 1) * t, s = await pp(
|
|
6179
6186
|
e,
|
|
6180
6187
|
t,
|
|
@@ -6275,7 +6282,7 @@ function Pp(e) {
|
|
|
6275
6282
|
function Ip(e) {
|
|
6276
6283
|
return !e || e.length === 0 ? "" : e.map((t) => t.text).filter(Boolean).join(" ");
|
|
6277
6284
|
}
|
|
6278
|
-
function
|
|
6285
|
+
function Cp(e, t, r) {
|
|
6279
6286
|
if (e?.display)
|
|
6280
6287
|
return e.display;
|
|
6281
6288
|
if (e?.reference) {
|
|
@@ -6291,7 +6298,7 @@ function Dp(e, t, r) {
|
|
|
6291
6298
|
);
|
|
6292
6299
|
return n?.code?.text ? n.code.text : e?.reference ? e.reference : "Medication";
|
|
6293
6300
|
}
|
|
6294
|
-
function
|
|
6301
|
+
function Dp(e, t, r) {
|
|
6295
6302
|
if (e?.reference) {
|
|
6296
6303
|
const s = e.reference.split("/").pop();
|
|
6297
6304
|
if (s) {
|
|
@@ -6314,11 +6321,11 @@ function Lp(e) {
|
|
|
6314
6321
|
const s = n.resource;
|
|
6315
6322
|
s.resourceType === "Medication" && r.set(s.id, s);
|
|
6316
6323
|
}), t.map((n) => {
|
|
6317
|
-
const s = n.medicationReference, o = n.requester, a = _p(n), i =
|
|
6324
|
+
const s = n.medicationReference, o = n.requester, a = _p(n), i = Cp(
|
|
6318
6325
|
s,
|
|
6319
6326
|
n,
|
|
6320
6327
|
r
|
|
6321
|
-
), c =
|
|
6328
|
+
), c = Dp(
|
|
6322
6329
|
s,
|
|
6323
6330
|
n,
|
|
6324
6331
|
r
|
|
@@ -6348,7 +6355,7 @@ function Lp(e) {
|
|
|
6348
6355
|
});
|
|
6349
6356
|
}
|
|
6350
6357
|
const Bs = (e) => e.priority === "stat" || e.dosageInstruction?.[0]?.timing?.code?.text === "Immediately" || !1;
|
|
6351
|
-
async function
|
|
6358
|
+
async function ev(e, t, r, n = !1) {
|
|
6352
6359
|
const s = await Sp(
|
|
6353
6360
|
e,
|
|
6354
6361
|
t,
|
|
@@ -6357,17 +6364,17 @@ async function Xy(e, t, r, n = !1) {
|
|
|
6357
6364
|
);
|
|
6358
6365
|
return Lp(s);
|
|
6359
6366
|
}
|
|
6360
|
-
async function
|
|
6367
|
+
async function tv() {
|
|
6361
6368
|
return await F(
|
|
6362
6369
|
wp
|
|
6363
6370
|
);
|
|
6364
6371
|
}
|
|
6365
|
-
async function
|
|
6372
|
+
async function rv(e, t = 20) {
|
|
6366
6373
|
return await F(
|
|
6367
6374
|
Ep(e, t)
|
|
6368
6375
|
);
|
|
6369
6376
|
}
|
|
6370
|
-
async function
|
|
6377
|
+
async function nv() {
|
|
6371
6378
|
return await F(bp);
|
|
6372
6379
|
}
|
|
6373
6380
|
const kp = 200, Up = (e, t, r, n, s) => {
|
|
@@ -6401,7 +6408,7 @@ async function Pt(e, t, r, n, s) {
|
|
|
6401
6408
|
return a.entry && (a.entry = xp(a.entry), a.total = a.entry.length), a;
|
|
6402
6409
|
}
|
|
6403
6410
|
const qp = (e) => `${ce}/ImagingStudy/${e}/$fetch-quality-assessment`;
|
|
6404
|
-
async function
|
|
6411
|
+
async function sv(e, t, r, n) {
|
|
6405
6412
|
return await Pt(
|
|
6406
6413
|
t,
|
|
6407
6414
|
e,
|
|
@@ -6409,7 +6416,7 @@ async function rv(e, t, r, n) {
|
|
|
6409
6416
|
n
|
|
6410
6417
|
);
|
|
6411
6418
|
}
|
|
6412
|
-
async function
|
|
6419
|
+
async function ov(e, t, r, n) {
|
|
6413
6420
|
return await Pt(
|
|
6414
6421
|
t,
|
|
6415
6422
|
e,
|
|
@@ -6418,7 +6425,7 @@ async function nv(e, t, r, n) {
|
|
|
6418
6425
|
"ImagingStudy:basedon"
|
|
6419
6426
|
);
|
|
6420
6427
|
}
|
|
6421
|
-
async function
|
|
6428
|
+
async function av(e, t, r, n) {
|
|
6422
6429
|
return (await Pt(
|
|
6423
6430
|
t,
|
|
6424
6431
|
e,
|
|
@@ -6426,10 +6433,10 @@ async function sv(e, t, r, n) {
|
|
|
6426
6433
|
n
|
|
6427
6434
|
)).entry?.filter((a) => a.resource?.resourceType === "ServiceRequest").map((a) => a.resource) ?? [];
|
|
6428
6435
|
}
|
|
6429
|
-
async function
|
|
6436
|
+
async function iv(e) {
|
|
6430
6437
|
return await F(qp(e));
|
|
6431
6438
|
}
|
|
6432
|
-
async function
|
|
6439
|
+
async function cv(e, t, r, n) {
|
|
6433
6440
|
return await Pt(
|
|
6434
6441
|
t,
|
|
6435
6442
|
e,
|
|
@@ -6441,29 +6448,29 @@ const Mp = (e, t) => {
|
|
|
6441
6448
|
const r = `${ce}/DiagnosticReport?patient=${e}`;
|
|
6442
6449
|
return t ? `${r}&based-on=${t}` : r;
|
|
6443
6450
|
}, Fp = (e) => `${ce}/DiagnosticReport/${e}/$fetch-bundle`, jp = (e) => `${ce}/DiagnosticReport/${e}/$update-bundle`;
|
|
6444
|
-
async function
|
|
6451
|
+
async function uv(e, t = []) {
|
|
6445
6452
|
const r = t.length > 0 ? t.join(",") : void 0, n = Mp(e, r);
|
|
6446
6453
|
return await F(n);
|
|
6447
6454
|
}
|
|
6448
|
-
async function
|
|
6455
|
+
async function lv(e) {
|
|
6449
6456
|
const t = Fp(e);
|
|
6450
6457
|
return await F(t);
|
|
6451
6458
|
}
|
|
6452
|
-
async function
|
|
6459
|
+
async function dv(e, t) {
|
|
6453
6460
|
const r = jp(e);
|
|
6454
|
-
return await
|
|
6461
|
+
return await Ce(r, t);
|
|
6455
6462
|
}
|
|
6456
|
-
const
|
|
6463
|
+
const fv = [
|
|
6457
6464
|
"preliminary",
|
|
6458
6465
|
"final",
|
|
6459
6466
|
"amended",
|
|
6460
6467
|
"corrected",
|
|
6461
6468
|
"appended"
|
|
6462
|
-
],
|
|
6469
|
+
], pv = [
|
|
6463
6470
|
"registered",
|
|
6464
6471
|
"unknown",
|
|
6465
6472
|
"partial"
|
|
6466
|
-
], Vp = "All Orderables", Bp = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", Hp = "LabSet", zp = "http://fhir.bahmni.org/ext/ValueSet/concept-class",
|
|
6473
|
+
], Vp = "All Orderables", Bp = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", Hp = "LabSet", zp = "http://fhir.bahmni.org/ext/ValueSet/concept-class", hv = ["orderTypes"], Gp = async () => await Kf(Vp), zn = async () => await F(Bp), Kp = (e) => {
|
|
6467
6474
|
let t = e.display ?? "Unknown investigation";
|
|
6468
6475
|
return ni(e) === Hp && (t += ` (${ie.t("INVESTIGATION_PANEL")})`), t;
|
|
6469
6476
|
}, Yp = (e) => {
|
|
@@ -6495,12 +6502,12 @@ const lv = [
|
|
|
6495
6502
|
});
|
|
6496
6503
|
});
|
|
6497
6504
|
}), r;
|
|
6498
|
-
},
|
|
6505
|
+
}, mv = async () => {
|
|
6499
6506
|
const e = await Gp(), t = await zn();
|
|
6500
6507
|
return Wp(e, Yp(t));
|
|
6501
|
-
},
|
|
6508
|
+
}, gv = async (e) => e ? (await zn()).results.find(
|
|
6502
6509
|
(n) => n.display.toLowerCase() === e.toLowerCase()
|
|
6503
|
-
)?.uuid : void 0,
|
|
6510
|
+
)?.uuid : void 0, yv = async () => (await zn()).results.map((t) => t.display), vv = async (e, t, r) => {
|
|
6504
6511
|
const n = [];
|
|
6505
6512
|
for (const s of e) {
|
|
6506
6513
|
const o = s.uuid;
|
|
@@ -6523,7 +6530,7 @@ const lv = [
|
|
|
6523
6530
|
function Jp(e) {
|
|
6524
6531
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6525
6532
|
}
|
|
6526
|
-
var Lt = { exports: {} }, un = {},
|
|
6533
|
+
var Lt = { exports: {} }, un = {}, De = {}, je = {}, ln = {}, dn = {}, fn = {}, Hs;
|
|
6527
6534
|
function Pr() {
|
|
6528
6535
|
return Hs || (Hs = 1, (function(e) {
|
|
6529
6536
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.regexpCode = e.getEsmExportName = e.getProperty = e.safeStringify = e.stringify = e.strConcat = e.addCodeArg = e.str = e._ = e.nil = e._Code = e.Name = e.IDENTIFIER = e._CodeOrName = void 0;
|
|
@@ -6822,12 +6829,12 @@ function Z() {
|
|
|
6822
6829
|
}
|
|
6823
6830
|
}
|
|
6824
6831
|
class a extends o {
|
|
6825
|
-
constructor(w, T,
|
|
6826
|
-
super(), this.varKind = w, this.name = T, this.rhs =
|
|
6832
|
+
constructor(w, T, C) {
|
|
6833
|
+
super(), this.varKind = w, this.name = T, this.rhs = C;
|
|
6827
6834
|
}
|
|
6828
6835
|
render({ es5: w, _n: T }) {
|
|
6829
|
-
const
|
|
6830
|
-
return `${
|
|
6836
|
+
const C = w ? r.varKinds.var : this.varKind, V = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
|
|
6837
|
+
return `${C} ${this.name}${V};` + T;
|
|
6831
6838
|
}
|
|
6832
6839
|
optimizeNames(w, T) {
|
|
6833
6840
|
if (w[this.name.str])
|
|
@@ -6838,8 +6845,8 @@ function Z() {
|
|
|
6838
6845
|
}
|
|
6839
6846
|
}
|
|
6840
6847
|
class i extends o {
|
|
6841
|
-
constructor(w, T,
|
|
6842
|
-
super(), this.lhs = w, this.rhs = T, this.sideEffects =
|
|
6848
|
+
constructor(w, T, C) {
|
|
6849
|
+
super(), this.lhs = w, this.rhs = T, this.sideEffects = C;
|
|
6843
6850
|
}
|
|
6844
6851
|
render({ _n: w }) {
|
|
6845
6852
|
return `${this.lhs} = ${this.rhs};` + w;
|
|
@@ -6854,8 +6861,8 @@ function Z() {
|
|
|
6854
6861
|
}
|
|
6855
6862
|
}
|
|
6856
6863
|
class c extends i {
|
|
6857
|
-
constructor(w, T,
|
|
6858
|
-
super(w,
|
|
6864
|
+
constructor(w, T, C, V) {
|
|
6865
|
+
super(w, C, V), this.op = T;
|
|
6859
6866
|
}
|
|
6860
6867
|
render({ _n: w }) {
|
|
6861
6868
|
return `${this.lhs} ${this.op}= ${this.rhs};` + w;
|
|
@@ -6910,25 +6917,25 @@ function Z() {
|
|
|
6910
6917
|
super(), this.nodes = w;
|
|
6911
6918
|
}
|
|
6912
6919
|
render(w) {
|
|
6913
|
-
return this.nodes.reduce((T,
|
|
6920
|
+
return this.nodes.reduce((T, C) => T + C.render(w), "");
|
|
6914
6921
|
}
|
|
6915
6922
|
optimizeNodes() {
|
|
6916
6923
|
const { nodes: w } = this;
|
|
6917
6924
|
let T = w.length;
|
|
6918
6925
|
for (; T--; ) {
|
|
6919
|
-
const
|
|
6920
|
-
Array.isArray(
|
|
6926
|
+
const C = w[T].optimizeNodes();
|
|
6927
|
+
Array.isArray(C) ? w.splice(T, 1, ...C) : C ? w[T] = C : w.splice(T, 1);
|
|
6921
6928
|
}
|
|
6922
6929
|
return w.length > 0 ? this : void 0;
|
|
6923
6930
|
}
|
|
6924
6931
|
optimizeNames(w, T) {
|
|
6925
|
-
const { nodes:
|
|
6926
|
-
let V =
|
|
6932
|
+
const { nodes: C } = this;
|
|
6933
|
+
let V = C.length;
|
|
6927
6934
|
for (; V--; ) {
|
|
6928
|
-
const z =
|
|
6929
|
-
z.optimizeNames(w, T) || (re(w, z.names),
|
|
6935
|
+
const z = C[V];
|
|
6936
|
+
z.optimizeNames(w, T) || (re(w, z.names), C.splice(V, 1));
|
|
6930
6937
|
}
|
|
6931
|
-
return
|
|
6938
|
+
return C.length > 0 ? this : void 0;
|
|
6932
6939
|
}
|
|
6933
6940
|
get names() {
|
|
6934
6941
|
return this.nodes.reduce((w, T) => j(w, T.names), {});
|
|
@@ -6959,8 +6966,8 @@ function Z() {
|
|
|
6959
6966
|
return this.nodes;
|
|
6960
6967
|
let T = this.else;
|
|
6961
6968
|
if (T) {
|
|
6962
|
-
const
|
|
6963
|
-
T = this.else = Array.isArray(
|
|
6969
|
+
const C = T.optimizeNodes();
|
|
6970
|
+
T = this.else = Array.isArray(C) ? new f(C) : C;
|
|
6964
6971
|
}
|
|
6965
6972
|
if (T)
|
|
6966
6973
|
return w === !1 ? T instanceof p ? T : T.nodes : this.nodes.length ? this : new p(ne(w), T instanceof p ? [T] : T.nodes);
|
|
@@ -6968,8 +6975,8 @@ function Z() {
|
|
|
6968
6975
|
return this;
|
|
6969
6976
|
}
|
|
6970
6977
|
optimizeNames(w, T) {
|
|
6971
|
-
var
|
|
6972
|
-
if (this.else = (
|
|
6978
|
+
var C;
|
|
6979
|
+
if (this.else = (C = this.else) === null || C === void 0 ? void 0 : C.optimizeNames(w, T), !!(super.optimizeNames(w, T) || this.else))
|
|
6973
6980
|
return this.condition = G(this.condition, w, T), this;
|
|
6974
6981
|
}
|
|
6975
6982
|
get names() {
|
|
@@ -6997,12 +7004,12 @@ function Z() {
|
|
|
6997
7004
|
}
|
|
6998
7005
|
}
|
|
6999
7006
|
class E extends u {
|
|
7000
|
-
constructor(w, T,
|
|
7001
|
-
super(), this.varKind = w, this.name = T, this.from =
|
|
7007
|
+
constructor(w, T, C, V) {
|
|
7008
|
+
super(), this.varKind = w, this.name = T, this.from = C, this.to = V;
|
|
7002
7009
|
}
|
|
7003
7010
|
render(w) {
|
|
7004
|
-
const T = w.es5 ? r.varKinds.var : this.varKind, { name:
|
|
7005
|
-
return `for(${T} ${
|
|
7011
|
+
const T = w.es5 ? r.varKinds.var : this.varKind, { name: C, from: V, to: z } = this;
|
|
7012
|
+
return `for(${T} ${C}=${V}; ${C}<${z}; ${C}++)` + super.render(w);
|
|
7006
7013
|
}
|
|
7007
7014
|
get names() {
|
|
7008
7015
|
const w = B(super.names, this.from);
|
|
@@ -7010,8 +7017,8 @@ function Z() {
|
|
|
7010
7017
|
}
|
|
7011
7018
|
}
|
|
7012
7019
|
class _ extends u {
|
|
7013
|
-
constructor(w, T,
|
|
7014
|
-
super(), this.loop = w, this.varKind = T, this.name =
|
|
7020
|
+
constructor(w, T, C, V) {
|
|
7021
|
+
super(), this.loop = w, this.varKind = T, this.name = C, this.iterable = V;
|
|
7015
7022
|
}
|
|
7016
7023
|
render(w) {
|
|
7017
7024
|
return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(w);
|
|
@@ -7025,8 +7032,8 @@ function Z() {
|
|
|
7025
7032
|
}
|
|
7026
7033
|
}
|
|
7027
7034
|
class b extends y {
|
|
7028
|
-
constructor(w, T,
|
|
7029
|
-
super(), this.name = w, this.args = T, this.async =
|
|
7035
|
+
constructor(w, T, C) {
|
|
7036
|
+
super(), this.name = w, this.args = T, this.async = C;
|
|
7030
7037
|
}
|
|
7031
7038
|
render(w) {
|
|
7032
7039
|
return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(w);
|
|
@@ -7049,8 +7056,8 @@ function Z() {
|
|
|
7049
7056
|
return super.optimizeNodes(), (w = this.catch) === null || w === void 0 || w.optimizeNodes(), (T = this.finally) === null || T === void 0 || T.optimizeNodes(), this;
|
|
7050
7057
|
}
|
|
7051
7058
|
optimizeNames(w, T) {
|
|
7052
|
-
var
|
|
7053
|
-
return super.optimizeNames(w, T), (
|
|
7059
|
+
var C, V;
|
|
7060
|
+
return super.optimizeNames(w, T), (C = this.catch) === null || C === void 0 || C.optimizeNames(w, T), (V = this.finally) === null || V === void 0 || V.optimizeNames(w, T), this;
|
|
7054
7061
|
}
|
|
7055
7062
|
get names() {
|
|
7056
7063
|
const w = super.names;
|
|
@@ -7090,8 +7097,8 @@ function Z() {
|
|
|
7090
7097
|
}
|
|
7091
7098
|
// reserves unique name in the external scope and assigns value to it
|
|
7092
7099
|
scopeValue(w, T) {
|
|
7093
|
-
const
|
|
7094
|
-
return (this._values[
|
|
7100
|
+
const C = this._extScope.value(w, T);
|
|
7101
|
+
return (this._values[C.prefix] || (this._values[C.prefix] = /* @__PURE__ */ new Set())).add(C), C;
|
|
7095
7102
|
}
|
|
7096
7103
|
getScopeValue(w, T) {
|
|
7097
7104
|
return this._extScope.getValue(w, T);
|
|
@@ -7104,25 +7111,25 @@ function Z() {
|
|
|
7104
7111
|
scopeCode() {
|
|
7105
7112
|
return this._extScope.scopeCode(this._values);
|
|
7106
7113
|
}
|
|
7107
|
-
_def(w, T,
|
|
7114
|
+
_def(w, T, C, V) {
|
|
7108
7115
|
const z = this._scope.toName(T);
|
|
7109
|
-
return
|
|
7116
|
+
return C !== void 0 && V && (this._constants[z.str] = C), this._leafNode(new a(w, z, C)), z;
|
|
7110
7117
|
}
|
|
7111
7118
|
// `const` declaration (`var` in es5 mode)
|
|
7112
|
-
const(w, T,
|
|
7113
|
-
return this._def(r.varKinds.const, w, T,
|
|
7119
|
+
const(w, T, C) {
|
|
7120
|
+
return this._def(r.varKinds.const, w, T, C);
|
|
7114
7121
|
}
|
|
7115
7122
|
// `let` declaration with optional assignment (`var` in es5 mode)
|
|
7116
|
-
let(w, T,
|
|
7117
|
-
return this._def(r.varKinds.let, w, T,
|
|
7123
|
+
let(w, T, C) {
|
|
7124
|
+
return this._def(r.varKinds.let, w, T, C);
|
|
7118
7125
|
}
|
|
7119
7126
|
// `var` declaration with optional assignment
|
|
7120
|
-
var(w, T,
|
|
7121
|
-
return this._def(r.varKinds.var, w, T,
|
|
7127
|
+
var(w, T, C) {
|
|
7128
|
+
return this._def(r.varKinds.var, w, T, C);
|
|
7122
7129
|
}
|
|
7123
7130
|
// assignment code
|
|
7124
|
-
assign(w, T,
|
|
7125
|
-
return this._leafNode(new i(w, T,
|
|
7131
|
+
assign(w, T, C) {
|
|
7132
|
+
return this._leafNode(new i(w, T, C));
|
|
7126
7133
|
}
|
|
7127
7134
|
// `+=` code
|
|
7128
7135
|
add(w, T) {
|
|
@@ -7135,17 +7142,17 @@ function Z() {
|
|
|
7135
7142
|
// returns code for object literal for the passed argument list of key-value pairs
|
|
7136
7143
|
object(...w) {
|
|
7137
7144
|
const T = ["{"];
|
|
7138
|
-
for (const [
|
|
7139
|
-
T.length > 1 && T.push(","), T.push(
|
|
7145
|
+
for (const [C, V] of w)
|
|
7146
|
+
T.length > 1 && T.push(","), T.push(C), (C !== V || this.opts.es5) && (T.push(":"), (0, t.addCodeArg)(T, V));
|
|
7140
7147
|
return T.push("}"), new t._Code(T);
|
|
7141
7148
|
}
|
|
7142
7149
|
// `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
|
|
7143
|
-
if(w, T,
|
|
7144
|
-
if (this._blockNode(new p(w)), T &&
|
|
7145
|
-
this.code(T).else().code(
|
|
7150
|
+
if(w, T, C) {
|
|
7151
|
+
if (this._blockNode(new p(w)), T && C)
|
|
7152
|
+
this.code(T).else().code(C).endIf();
|
|
7146
7153
|
else if (T)
|
|
7147
7154
|
this.code(T).endIf();
|
|
7148
|
-
else if (
|
|
7155
|
+
else if (C)
|
|
7149
7156
|
throw new Error('CodeGen: "else" body without "then" body');
|
|
7150
7157
|
return this;
|
|
7151
7158
|
}
|
|
@@ -7169,28 +7176,28 @@ function Z() {
|
|
|
7169
7176
|
return this._for(new h(w), T);
|
|
7170
7177
|
}
|
|
7171
7178
|
// `for` statement for a range of values
|
|
7172
|
-
forRange(w, T,
|
|
7179
|
+
forRange(w, T, C, V, z = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
|
|
7173
7180
|
const se = this._scope.toName(w);
|
|
7174
|
-
return this._for(new E(z, se, T,
|
|
7181
|
+
return this._for(new E(z, se, T, C), () => V(se));
|
|
7175
7182
|
}
|
|
7176
7183
|
// `for-of` statement (in es5 mode replace with a normal for loop)
|
|
7177
|
-
forOf(w, T,
|
|
7184
|
+
forOf(w, T, C, V = r.varKinds.const) {
|
|
7178
7185
|
const z = this._scope.toName(w);
|
|
7179
7186
|
if (this.opts.es5) {
|
|
7180
7187
|
const se = T instanceof t.Name ? T : this.var("_arr", T);
|
|
7181
7188
|
return this.forRange("_i", 0, (0, t._)`${se}.length`, (ee) => {
|
|
7182
|
-
this.var(z, (0, t._)`${se}[${ee}]`),
|
|
7189
|
+
this.var(z, (0, t._)`${se}[${ee}]`), C(z);
|
|
7183
7190
|
});
|
|
7184
7191
|
}
|
|
7185
|
-
return this._for(new _("of", V, z, T), () =>
|
|
7192
|
+
return this._for(new _("of", V, z, T), () => C(z));
|
|
7186
7193
|
}
|
|
7187
7194
|
// `for-in` statement.
|
|
7188
7195
|
// With option `ownProperties` replaced with a `for-of` loop for object keys
|
|
7189
|
-
forIn(w, T,
|
|
7196
|
+
forIn(w, T, C, V = this.opts.es5 ? r.varKinds.var : r.varKinds.const) {
|
|
7190
7197
|
if (this.opts.ownProperties)
|
|
7191
|
-
return this.forOf(w, (0, t._)`Object.keys(${T})`,
|
|
7198
|
+
return this.forOf(w, (0, t._)`Object.keys(${T})`, C);
|
|
7192
7199
|
const z = this._scope.toName(w);
|
|
7193
|
-
return this._for(new _("in", V, z, T), () =>
|
|
7200
|
+
return this._for(new _("in", V, z, T), () => C(z));
|
|
7194
7201
|
}
|
|
7195
7202
|
// end `for` loop
|
|
7196
7203
|
endFor() {
|
|
@@ -7212,15 +7219,15 @@ function Z() {
|
|
|
7212
7219
|
return this._endBlockNode(R);
|
|
7213
7220
|
}
|
|
7214
7221
|
// `try` statement
|
|
7215
|
-
try(w, T,
|
|
7216
|
-
if (!T && !
|
|
7222
|
+
try(w, T, C) {
|
|
7223
|
+
if (!T && !C)
|
|
7217
7224
|
throw new Error('CodeGen: "try" without "catch" and "finally"');
|
|
7218
7225
|
const V = new N();
|
|
7219
7226
|
if (this._blockNode(V), this.code(w), T) {
|
|
7220
7227
|
const z = this.name("e");
|
|
7221
7228
|
this._currNode = V.catch = new k(z), T(z);
|
|
7222
7229
|
}
|
|
7223
|
-
return
|
|
7230
|
+
return C && (this._currNode = V.finally = new M(), this.code(C)), this._endBlockNode(k, M);
|
|
7224
7231
|
}
|
|
7225
7232
|
// `throw` statement
|
|
7226
7233
|
throw(w) {
|
|
@@ -7235,14 +7242,14 @@ function Z() {
|
|
|
7235
7242
|
const T = this._blockStarts.pop();
|
|
7236
7243
|
if (T === void 0)
|
|
7237
7244
|
throw new Error("CodeGen: not in self-balancing block");
|
|
7238
|
-
const
|
|
7239
|
-
if (
|
|
7240
|
-
throw new Error(`CodeGen: wrong number of nodes: ${
|
|
7245
|
+
const C = this._nodes.length - T;
|
|
7246
|
+
if (C < 0 || w !== void 0 && C !== w)
|
|
7247
|
+
throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${w} expected`);
|
|
7241
7248
|
return this._nodes.length = T, this;
|
|
7242
7249
|
}
|
|
7243
7250
|
// `function` heading (or definition if funcBody is passed)
|
|
7244
|
-
func(w, T = t.nil,
|
|
7245
|
-
return this._blockNode(new b(w, T,
|
|
7251
|
+
func(w, T = t.nil, C, V) {
|
|
7252
|
+
return this._blockNode(new b(w, T, C)), V && this.code(V).endFunc(), this;
|
|
7246
7253
|
}
|
|
7247
7254
|
// end function definition
|
|
7248
7255
|
endFunc() {
|
|
@@ -7259,8 +7266,8 @@ function Z() {
|
|
|
7259
7266
|
this._currNode.nodes.push(w), this._nodes.push(w);
|
|
7260
7267
|
}
|
|
7261
7268
|
_endBlockNode(w, T) {
|
|
7262
|
-
const
|
|
7263
|
-
if (
|
|
7269
|
+
const C = this._currNode;
|
|
7270
|
+
if (C instanceof w || T && C instanceof T)
|
|
7264
7271
|
return this._nodes.pop(), this;
|
|
7265
7272
|
throw new Error(`CodeGen: not in block "${T ? `${w.kind}/${T.kind}` : w.kind}"`);
|
|
7266
7273
|
}
|
|
@@ -7293,11 +7300,11 @@ function Z() {
|
|
|
7293
7300
|
}
|
|
7294
7301
|
function G(P, w, T) {
|
|
7295
7302
|
if (P instanceof t.Name)
|
|
7296
|
-
return
|
|
7303
|
+
return C(P);
|
|
7297
7304
|
if (!V(P))
|
|
7298
7305
|
return P;
|
|
7299
|
-
return new t._Code(P._items.reduce((z, se) => (se instanceof t.Name && (se =
|
|
7300
|
-
function
|
|
7306
|
+
return new t._Code(P._items.reduce((z, se) => (se instanceof t.Name && (se = C(se)), se instanceof t._Code ? z.push(...se._items) : z.push(se), z), []));
|
|
7307
|
+
function C(z) {
|
|
7301
7308
|
const se = T[z.str];
|
|
7302
7309
|
return se === void 0 || w[z.str] !== 1 ? z : (delete w[z.str], se);
|
|
7303
7310
|
}
|
|
@@ -7310,7 +7317,7 @@ function Z() {
|
|
|
7310
7317
|
P[T] = (P[T] || 0) - (w[T] || 0);
|
|
7311
7318
|
}
|
|
7312
7319
|
function ne(P) {
|
|
7313
|
-
return typeof P == "boolean" || typeof P == "number" || P === null ? !P : (0, t._)`!${
|
|
7320
|
+
return typeof P == "boolean" || typeof P == "number" || P === null ? !P : (0, t._)`!${D(P)}`;
|
|
7314
7321
|
}
|
|
7315
7322
|
e.not = ne;
|
|
7316
7323
|
const fe = A(e.operators.AND);
|
|
@@ -7324,9 +7331,9 @@ function Z() {
|
|
|
7324
7331
|
}
|
|
7325
7332
|
e.or = U;
|
|
7326
7333
|
function A(P) {
|
|
7327
|
-
return (w, T) => w === t.nil ? T : T === t.nil ? w : (0, t._)`${
|
|
7334
|
+
return (w, T) => w === t.nil ? T : T === t.nil ? w : (0, t._)`${D(w)} ${P} ${D(T)}`;
|
|
7328
7335
|
}
|
|
7329
|
-
function
|
|
7336
|
+
function D(P) {
|
|
7330
7337
|
return P instanceof t.Name ? P : (0, t._)`(${P})`;
|
|
7331
7338
|
}
|
|
7332
7339
|
})(dn)), dn;
|
|
@@ -8303,8 +8310,8 @@ function Br() {
|
|
|
8303
8310
|
}
|
|
8304
8311
|
var co;
|
|
8305
8312
|
function Hr() {
|
|
8306
|
-
if (co) return
|
|
8307
|
-
co = 1, Object.defineProperty(
|
|
8313
|
+
if (co) return De;
|
|
8314
|
+
co = 1, Object.defineProperty(De, "__esModule", { value: !0 }), De.getData = De.KeywordCxt = De.validateFunctionCode = void 0;
|
|
8308
8315
|
const e = Qp(), t = Ir(), r = oi(), n = Ir(), s = Xp(), o = Zp(), a = eh(), i = Z(), c = Fe(), d = Br(), l = te(), m = Vr();
|
|
8309
8316
|
function v(O) {
|
|
8310
8317
|
if (_(O) && (R(O), E(O))) {
|
|
@@ -8313,7 +8320,7 @@ function Hr() {
|
|
|
8313
8320
|
}
|
|
8314
8321
|
S(O, () => (0, e.topBoolOrEmptySchema)(O));
|
|
8315
8322
|
}
|
|
8316
|
-
|
|
8323
|
+
De.validateFunctionCode = v;
|
|
8317
8324
|
function S({ gen: O, validateName: $, schema: L, schemaEnv: x, opts: H }, X) {
|
|
8318
8325
|
H.code.es5 ? O.func($, (0, i._)`${c.default.data}, ${c.default.valCxt}`, x.$async, () => {
|
|
8319
8326
|
O.code((0, i._)`"use strict"; ${u(L, H)}`), g(O, H), O.code(X);
|
|
@@ -8453,11 +8460,11 @@ function Hr() {
|
|
|
8453
8460
|
const H = L[x];
|
|
8454
8461
|
if (typeof H == "object" && (0, r.shouldUseRule)(O.schema, H)) {
|
|
8455
8462
|
const { type: X } = H.definition;
|
|
8456
|
-
X.length && !X.some((pe) =>
|
|
8463
|
+
X.length && !X.some((pe) => D($, pe)) && T(O, `missing type "${X.join(",")}" for keyword "${x}"`);
|
|
8457
8464
|
}
|
|
8458
8465
|
}
|
|
8459
8466
|
}
|
|
8460
|
-
function
|
|
8467
|
+
function D(O, $) {
|
|
8461
8468
|
return O.includes($) || $ === "number" && O.includes("integer");
|
|
8462
8469
|
}
|
|
8463
8470
|
function P(O, $) {
|
|
@@ -8473,7 +8480,7 @@ function Hr() {
|
|
|
8473
8480
|
const L = O.schemaEnv.baseId + O.errSchemaPath;
|
|
8474
8481
|
$ += ` at "${L}" (strictTypes)`, (0, l.checkStrictMode)(O, $, O.opts.strictTypes);
|
|
8475
8482
|
}
|
|
8476
|
-
class
|
|
8483
|
+
class C {
|
|
8477
8484
|
constructor($, L, x) {
|
|
8478
8485
|
if ((0, o.validateKeywordUsage)($, L, x), this.gen = $.gen, this.allErrors = $.allErrors, this.keyword = x, this.data = $.data, this.schema = $.schema[x], this.$data = L.$data && $.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, l.schemaRefOrVal)($, this.schema, x, this.$data), this.schemaType = L.schemaType, this.parentSchema = $.schema, this.params = {}, this.it = $, this.def = L, this.$data)
|
|
8479
8486
|
this.schemaCode = $.gen.const("vSchema", ee(this.$data, $));
|
|
@@ -8574,9 +8581,9 @@ function Hr() {
|
|
|
8574
8581
|
return H.if(L, () => this.mergeEvaluated($, i.Name)), !0;
|
|
8575
8582
|
}
|
|
8576
8583
|
}
|
|
8577
|
-
|
|
8584
|
+
De.KeywordCxt = C;
|
|
8578
8585
|
function V(O, $, L, x) {
|
|
8579
|
-
const H = new
|
|
8586
|
+
const H = new C(O, L, $);
|
|
8580
8587
|
"code" in L ? L.code(H, x) : H.$data && L.validate ? (0, o.funcKeywordCode)(H, L) : "macro" in L ? (0, o.macroKeywordCode)(H, L) : (L.compile || L.validate) && (0, o.funcKeywordCode)(H, L);
|
|
8581
8588
|
}
|
|
8582
8589
|
const z = /^\/(?:[^~]|~0|~1)*$/, se = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
@@ -8612,7 +8619,7 @@ function Hr() {
|
|
|
8612
8619
|
return `Cannot access ${we} ${he} levels up, current level is ${$}`;
|
|
8613
8620
|
}
|
|
8614
8621
|
}
|
|
8615
|
-
return
|
|
8622
|
+
return De.getData = ee, De;
|
|
8616
8623
|
}
|
|
8617
8624
|
var Ut = {}, uo;
|
|
8618
8625
|
function Gn() {
|
|
@@ -9225,10 +9232,10 @@ function hh() {
|
|
|
9225
9232
|
unicode: '"minLength"/"maxLength" account for unicode characters by default.'
|
|
9226
9233
|
}, u = 200;
|
|
9227
9234
|
function h(U) {
|
|
9228
|
-
var A,
|
|
9229
|
-
const lt = U.strict, Yr = (A = U.code) === null || A === void 0 ? void 0 : A.optimize, Jn = Yr === !0 || Yr === void 0 ? 1 : Yr || 0, Qn = (P = (
|
|
9235
|
+
var A, D, P, w, T, C, V, z, se, ee, O, $, L, x, H, X, pe, Ae, ve, we, he, Ye, Se, Gr, Kr;
|
|
9236
|
+
const lt = U.strict, Yr = (A = U.code) === null || A === void 0 ? void 0 : A.optimize, Jn = Yr === !0 || Yr === void 0 ? 1 : Yr || 0, Qn = (P = (D = U.code) === null || D === void 0 ? void 0 : D.regExp) !== null && P !== void 0 ? P : S, yi = (w = U.uriResolver) !== null && w !== void 0 ? w : v.default;
|
|
9230
9237
|
return {
|
|
9231
|
-
strictSchema: (
|
|
9238
|
+
strictSchema: (C = (T = U.strictSchema) !== null && T !== void 0 ? T : lt) !== null && C !== void 0 ? C : !0,
|
|
9232
9239
|
strictNumbers: (z = (V = U.strictNumbers) !== null && V !== void 0 ? V : lt) !== null && z !== void 0 ? z : !0,
|
|
9233
9240
|
strictTypes: (ee = (se = U.strictTypes) !== null && se !== void 0 ? se : lt) !== null && ee !== void 0 ? ee : "log",
|
|
9234
9241
|
strictTuples: ($ = (O = U.strictTuples) !== null && O !== void 0 ? O : lt) !== null && $ !== void 0 ? $ : "log",
|
|
@@ -9251,8 +9258,8 @@ function hh() {
|
|
|
9251
9258
|
class E {
|
|
9252
9259
|
constructor(A = {}) {
|
|
9253
9260
|
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), A = this.opts = { ...A, ...h(A) };
|
|
9254
|
-
const { es5:
|
|
9255
|
-
this.scope = new i.ValueScope({ scope: {}, prefixes: g, es5:
|
|
9261
|
+
const { es5: D, lines: P } = this.opts.code;
|
|
9262
|
+
this.scope = new i.ValueScope({ scope: {}, prefixes: g, es5: D, lines: P }), this.logger = j(A.logger);
|
|
9256
9263
|
const w = A.validateFormats;
|
|
9257
9264
|
A.validateFormats = !1, this.RULES = (0, o.getRules)(), _.call(this, f, A, "NOT SUPPORTED"), _.call(this, p, A, "DEPRECATED", "warn"), this._metaOpts = M.call(this), A.formats && N.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), A.keywords && k.call(this, A.keywords), typeof A.meta == "object" && this.addMetaSchema(A.meta), R.call(this), A.validateFormats = w;
|
|
9258
9265
|
}
|
|
@@ -9260,48 +9267,48 @@ function hh() {
|
|
|
9260
9267
|
this.addKeyword("$async");
|
|
9261
9268
|
}
|
|
9262
9269
|
_addDefaultMetaSchema() {
|
|
9263
|
-
const { $data: A, meta:
|
|
9270
|
+
const { $data: A, meta: D, schemaId: P } = this.opts;
|
|
9264
9271
|
let w = m;
|
|
9265
|
-
P === "id" && (w = { ...m }, w.id = w.$id, delete w.$id),
|
|
9272
|
+
P === "id" && (w = { ...m }, w.id = w.$id, delete w.$id), D && A && this.addMetaSchema(w, w[P], !1);
|
|
9266
9273
|
}
|
|
9267
9274
|
defaultMeta() {
|
|
9268
|
-
const { meta: A, schemaId:
|
|
9269
|
-
return this.opts.defaultMeta = typeof A == "object" ? A[
|
|
9275
|
+
const { meta: A, schemaId: D } = this.opts;
|
|
9276
|
+
return this.opts.defaultMeta = typeof A == "object" ? A[D] || A : void 0;
|
|
9270
9277
|
}
|
|
9271
|
-
validate(A,
|
|
9278
|
+
validate(A, D) {
|
|
9272
9279
|
let P;
|
|
9273
9280
|
if (typeof A == "string") {
|
|
9274
9281
|
if (P = this.getSchema(A), !P)
|
|
9275
9282
|
throw new Error(`no schema with key or ref "${A}"`);
|
|
9276
9283
|
} else
|
|
9277
9284
|
P = this.compile(A);
|
|
9278
|
-
const w = P(
|
|
9285
|
+
const w = P(D);
|
|
9279
9286
|
return "$async" in P || (this.errors = P.errors), w;
|
|
9280
9287
|
}
|
|
9281
|
-
compile(A,
|
|
9282
|
-
const P = this._addSchema(A,
|
|
9288
|
+
compile(A, D) {
|
|
9289
|
+
const P = this._addSchema(A, D);
|
|
9283
9290
|
return P.validate || this._compileSchemaEnv(P);
|
|
9284
9291
|
}
|
|
9285
|
-
compileAsync(A,
|
|
9292
|
+
compileAsync(A, D) {
|
|
9286
9293
|
if (typeof this.opts.loadSchema != "function")
|
|
9287
9294
|
throw new Error("options.loadSchema should be a function");
|
|
9288
9295
|
const { loadSchema: P } = this.opts;
|
|
9289
|
-
return w.call(this, A,
|
|
9296
|
+
return w.call(this, A, D);
|
|
9290
9297
|
async function w(ee, O) {
|
|
9291
9298
|
await T.call(this, ee.$schema);
|
|
9292
9299
|
const $ = this._addSchema(ee, O);
|
|
9293
|
-
return $.validate ||
|
|
9300
|
+
return $.validate || C.call(this, $);
|
|
9294
9301
|
}
|
|
9295
9302
|
async function T(ee) {
|
|
9296
9303
|
ee && !this.getSchema(ee) && await w.call(this, { $ref: ee }, !0);
|
|
9297
9304
|
}
|
|
9298
|
-
async function
|
|
9305
|
+
async function C(ee) {
|
|
9299
9306
|
try {
|
|
9300
9307
|
return this._compileSchemaEnv(ee);
|
|
9301
9308
|
} catch (O) {
|
|
9302
9309
|
if (!(O instanceof s.default))
|
|
9303
9310
|
throw O;
|
|
9304
|
-
return V.call(this, O), await z.call(this, O.missingSchema),
|
|
9311
|
+
return V.call(this, O), await z.call(this, O.missingSchema), C.call(this, ee);
|
|
9305
9312
|
}
|
|
9306
9313
|
}
|
|
9307
9314
|
function V({ missingSchema: ee, missingRef: O }) {
|
|
@@ -9310,7 +9317,7 @@ function hh() {
|
|
|
9310
9317
|
}
|
|
9311
9318
|
async function z(ee) {
|
|
9312
9319
|
const O = await se.call(this, ee);
|
|
9313
|
-
this.refs[ee] || await T.call(this, O.$schema), this.refs[ee] || this.addSchema(O, ee,
|
|
9320
|
+
this.refs[ee] || await T.call(this, O.$schema), this.refs[ee] || this.addSchema(O, ee, D);
|
|
9314
9321
|
}
|
|
9315
9322
|
async function se(ee) {
|
|
9316
9323
|
const O = this._loading[ee];
|
|
@@ -9324,27 +9331,27 @@ function hh() {
|
|
|
9324
9331
|
}
|
|
9325
9332
|
}
|
|
9326
9333
|
// Adds schema to the instance
|
|
9327
|
-
addSchema(A,
|
|
9334
|
+
addSchema(A, D, P, w = this.opts.validateSchema) {
|
|
9328
9335
|
if (Array.isArray(A)) {
|
|
9329
|
-
for (const
|
|
9330
|
-
this.addSchema(
|
|
9336
|
+
for (const C of A)
|
|
9337
|
+
this.addSchema(C, void 0, P, w);
|
|
9331
9338
|
return this;
|
|
9332
9339
|
}
|
|
9333
9340
|
let T;
|
|
9334
9341
|
if (typeof A == "object") {
|
|
9335
|
-
const { schemaId:
|
|
9336
|
-
if (T = A[
|
|
9337
|
-
throw new Error(`schema ${
|
|
9342
|
+
const { schemaId: C } = this.opts;
|
|
9343
|
+
if (T = A[C], T !== void 0 && typeof T != "string")
|
|
9344
|
+
throw new Error(`schema ${C} must be string`);
|
|
9338
9345
|
}
|
|
9339
|
-
return
|
|
9346
|
+
return D = (0, c.normalizeId)(D || T), this._checkUnique(D), this.schemas[D] = this._addSchema(A, P, D, w, !0), this;
|
|
9340
9347
|
}
|
|
9341
9348
|
// Add schema that will be used to validate other schemas
|
|
9342
9349
|
// options in META_IGNORE_OPTIONS are alway set to false
|
|
9343
|
-
addMetaSchema(A,
|
|
9344
|
-
return this.addSchema(A,
|
|
9350
|
+
addMetaSchema(A, D, P = this.opts.validateSchema) {
|
|
9351
|
+
return this.addSchema(A, D, !0, P), this;
|
|
9345
9352
|
}
|
|
9346
9353
|
// Validate schema against its meta-schema
|
|
9347
|
-
validateSchema(A,
|
|
9354
|
+
validateSchema(A, D) {
|
|
9348
9355
|
if (typeof A == "boolean")
|
|
9349
9356
|
return !0;
|
|
9350
9357
|
let P;
|
|
@@ -9353,7 +9360,7 @@ function hh() {
|
|
|
9353
9360
|
if (P = P || this.opts.defaultMeta || this.defaultMeta(), !P)
|
|
9354
9361
|
return this.logger.warn("meta-schema not available"), this.errors = null, !0;
|
|
9355
9362
|
const w = this.validate(P, A);
|
|
9356
|
-
if (!w &&
|
|
9363
|
+
if (!w && D) {
|
|
9357
9364
|
const T = "schema is invalid: " + this.errorsText();
|
|
9358
9365
|
if (this.opts.validateSchema === "log")
|
|
9359
9366
|
this.logger.error(T);
|
|
@@ -9365,16 +9372,16 @@ function hh() {
|
|
|
9365
9372
|
// Get compiled schema by `key` or `ref`.
|
|
9366
9373
|
// (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
|
|
9367
9374
|
getSchema(A) {
|
|
9368
|
-
let
|
|
9369
|
-
for (; typeof (
|
|
9370
|
-
A =
|
|
9371
|
-
if (
|
|
9375
|
+
let D;
|
|
9376
|
+
for (; typeof (D = b.call(this, A)) == "string"; )
|
|
9377
|
+
A = D;
|
|
9378
|
+
if (D === void 0) {
|
|
9372
9379
|
const { schemaId: P } = this.opts, w = new a.SchemaEnv({ schema: {}, schemaId: P });
|
|
9373
|
-
if (
|
|
9380
|
+
if (D = a.resolveSchema.call(this, w, A), !D)
|
|
9374
9381
|
return;
|
|
9375
|
-
this.refs[A] =
|
|
9382
|
+
this.refs[A] = D;
|
|
9376
9383
|
}
|
|
9377
|
-
return
|
|
9384
|
+
return D.validate || this._compileSchemaEnv(D);
|
|
9378
9385
|
}
|
|
9379
9386
|
// Remove cached schema(s).
|
|
9380
9387
|
// If no parameter is passed all schemas but meta-schemas are removed.
|
|
@@ -9387,12 +9394,12 @@ function hh() {
|
|
|
9387
9394
|
case "undefined":
|
|
9388
9395
|
return this._removeAllSchemas(this.schemas), this._removeAllSchemas(this.refs), this._cache.clear(), this;
|
|
9389
9396
|
case "string": {
|
|
9390
|
-
const
|
|
9391
|
-
return typeof
|
|
9397
|
+
const D = b.call(this, A);
|
|
9398
|
+
return typeof D == "object" && this._cache.delete(D.schema), delete this.schemas[A], delete this.refs[A], this;
|
|
9392
9399
|
}
|
|
9393
9400
|
case "object": {
|
|
9394
|
-
const
|
|
9395
|
-
this._cache.delete(
|
|
9401
|
+
const D = A;
|
|
9402
|
+
this._cache.delete(D);
|
|
9396
9403
|
let P = A[this.opts.schemaId];
|
|
9397
9404
|
return P && (P = (0, c.normalizeId)(P), delete this.schemas[P], delete this.refs[P]), this;
|
|
9398
9405
|
}
|
|
@@ -9402,79 +9409,79 @@ function hh() {
|
|
|
9402
9409
|
}
|
|
9403
9410
|
// add "vocabulary" - a collection of keywords
|
|
9404
9411
|
addVocabulary(A) {
|
|
9405
|
-
for (const
|
|
9406
|
-
this.addKeyword(
|
|
9412
|
+
for (const D of A)
|
|
9413
|
+
this.addKeyword(D);
|
|
9407
9414
|
return this;
|
|
9408
9415
|
}
|
|
9409
|
-
addKeyword(A,
|
|
9416
|
+
addKeyword(A, D) {
|
|
9410
9417
|
let P;
|
|
9411
9418
|
if (typeof A == "string")
|
|
9412
|
-
P = A, typeof
|
|
9413
|
-
else if (typeof A == "object" &&
|
|
9414
|
-
if (
|
|
9419
|
+
P = A, typeof D == "object" && (this.logger.warn("these parameters are deprecated, see docs for addKeyword"), D.keyword = P);
|
|
9420
|
+
else if (typeof A == "object" && D === void 0) {
|
|
9421
|
+
if (D = A, P = D.keyword, Array.isArray(P) && !P.length)
|
|
9415
9422
|
throw new Error("addKeywords: keyword must be string or non-empty array");
|
|
9416
9423
|
} else
|
|
9417
9424
|
throw new Error("invalid addKeywords parameters");
|
|
9418
|
-
if (G.call(this, P,
|
|
9425
|
+
if (G.call(this, P, D), !D)
|
|
9419
9426
|
return (0, l.eachItem)(P, (T) => re.call(this, T)), this;
|
|
9420
|
-
fe.call(this,
|
|
9427
|
+
fe.call(this, D);
|
|
9421
9428
|
const w = {
|
|
9422
|
-
...
|
|
9423
|
-
type: (0, d.getJSONTypes)(
|
|
9424
|
-
schemaType: (0, d.getJSONTypes)(
|
|
9429
|
+
...D,
|
|
9430
|
+
type: (0, d.getJSONTypes)(D.type),
|
|
9431
|
+
schemaType: (0, d.getJSONTypes)(D.schemaType)
|
|
9425
9432
|
};
|
|
9426
|
-
return (0, l.eachItem)(P, w.type.length === 0 ? (T) => re.call(this, T, w) : (T) => w.type.forEach((
|
|
9433
|
+
return (0, l.eachItem)(P, w.type.length === 0 ? (T) => re.call(this, T, w) : (T) => w.type.forEach((C) => re.call(this, T, w, C))), this;
|
|
9427
9434
|
}
|
|
9428
9435
|
getKeyword(A) {
|
|
9429
|
-
const
|
|
9430
|
-
return typeof
|
|
9436
|
+
const D = this.RULES.all[A];
|
|
9437
|
+
return typeof D == "object" ? D.definition : !!D;
|
|
9431
9438
|
}
|
|
9432
9439
|
// Remove keyword
|
|
9433
9440
|
removeKeyword(A) {
|
|
9434
|
-
const { RULES:
|
|
9435
|
-
delete
|
|
9436
|
-
for (const P of
|
|
9441
|
+
const { RULES: D } = this;
|
|
9442
|
+
delete D.keywords[A], delete D.all[A];
|
|
9443
|
+
for (const P of D.rules) {
|
|
9437
9444
|
const w = P.rules.findIndex((T) => T.keyword === A);
|
|
9438
9445
|
w >= 0 && P.rules.splice(w, 1);
|
|
9439
9446
|
}
|
|
9440
9447
|
return this;
|
|
9441
9448
|
}
|
|
9442
9449
|
// Add format
|
|
9443
|
-
addFormat(A,
|
|
9444
|
-
return typeof
|
|
9450
|
+
addFormat(A, D) {
|
|
9451
|
+
return typeof D == "string" && (D = new RegExp(D)), this.formats[A] = D, this;
|
|
9445
9452
|
}
|
|
9446
|
-
errorsText(A = this.errors, { separator:
|
|
9447
|
-
return !A || A.length === 0 ? "No errors" : A.map((w) => `${P}${w.instancePath} ${w.message}`).reduce((w, T) => w +
|
|
9453
|
+
errorsText(A = this.errors, { separator: D = ", ", dataVar: P = "data" } = {}) {
|
|
9454
|
+
return !A || A.length === 0 ? "No errors" : A.map((w) => `${P}${w.instancePath} ${w.message}`).reduce((w, T) => w + D + T);
|
|
9448
9455
|
}
|
|
9449
|
-
$dataMetaSchema(A,
|
|
9456
|
+
$dataMetaSchema(A, D) {
|
|
9450
9457
|
const P = this.RULES.all;
|
|
9451
9458
|
A = JSON.parse(JSON.stringify(A));
|
|
9452
|
-
for (const w of
|
|
9459
|
+
for (const w of D) {
|
|
9453
9460
|
const T = w.split("/").slice(1);
|
|
9454
|
-
let
|
|
9461
|
+
let C = A;
|
|
9455
9462
|
for (const V of T)
|
|
9456
|
-
|
|
9463
|
+
C = C[V];
|
|
9457
9464
|
for (const V in P) {
|
|
9458
9465
|
const z = P[V];
|
|
9459
9466
|
if (typeof z != "object")
|
|
9460
9467
|
continue;
|
|
9461
|
-
const { $data: se } = z.definition, ee =
|
|
9462
|
-
se && ee && (
|
|
9468
|
+
const { $data: se } = z.definition, ee = C[V];
|
|
9469
|
+
se && ee && (C[V] = ue(ee));
|
|
9463
9470
|
}
|
|
9464
9471
|
}
|
|
9465
9472
|
return A;
|
|
9466
9473
|
}
|
|
9467
|
-
_removeAllSchemas(A,
|
|
9474
|
+
_removeAllSchemas(A, D) {
|
|
9468
9475
|
for (const P in A) {
|
|
9469
9476
|
const w = A[P];
|
|
9470
|
-
(!
|
|
9477
|
+
(!D || D.test(P)) && (typeof w == "string" ? delete A[P] : w && !w.meta && (this._cache.delete(w.schema), delete A[P]));
|
|
9471
9478
|
}
|
|
9472
9479
|
}
|
|
9473
|
-
_addSchema(A,
|
|
9474
|
-
let
|
|
9480
|
+
_addSchema(A, D, P, w = this.opts.validateSchema, T = this.opts.addUsedSchema) {
|
|
9481
|
+
let C;
|
|
9475
9482
|
const { schemaId: V } = this.opts;
|
|
9476
9483
|
if (typeof A == "object")
|
|
9477
|
-
|
|
9484
|
+
C = A[V];
|
|
9478
9485
|
else {
|
|
9479
9486
|
if (this.opts.jtd)
|
|
9480
9487
|
throw new Error("schema must be object");
|
|
@@ -9484,9 +9491,9 @@ function hh() {
|
|
|
9484
9491
|
let z = this._cache.get(A);
|
|
9485
9492
|
if (z !== void 0)
|
|
9486
9493
|
return z;
|
|
9487
|
-
P = (0, c.normalizeId)(
|
|
9494
|
+
P = (0, c.normalizeId)(C || P);
|
|
9488
9495
|
const se = c.getSchemaRefs.call(this, A, P);
|
|
9489
|
-
return z = new a.SchemaEnv({ schema: A, schemaId: V, meta:
|
|
9496
|
+
return z = new a.SchemaEnv({ schema: A, schemaId: V, meta: D, baseId: P, localRefs: se }), this._cache.set(z.schema, z), T && !P.startsWith("#") && (P && this._checkUnique(P), this.refs[P] = z), w && this.validateSchema(A, !0), z;
|
|
9490
9497
|
}
|
|
9491
9498
|
_checkUnique(A) {
|
|
9492
9499
|
if (this.schemas[A] || this.refs[A])
|
|
@@ -9498,20 +9505,20 @@ function hh() {
|
|
|
9498
9505
|
return A.validate;
|
|
9499
9506
|
}
|
|
9500
9507
|
_compileMetaSchema(A) {
|
|
9501
|
-
const
|
|
9508
|
+
const D = this.opts;
|
|
9502
9509
|
this.opts = this._metaOpts;
|
|
9503
9510
|
try {
|
|
9504
9511
|
a.compileSchema.call(this, A);
|
|
9505
9512
|
} finally {
|
|
9506
|
-
this.opts =
|
|
9513
|
+
this.opts = D;
|
|
9507
9514
|
}
|
|
9508
9515
|
}
|
|
9509
9516
|
}
|
|
9510
9517
|
E.ValidationError = n.default, E.MissingRefError = s.default, e.default = E;
|
|
9511
|
-
function _(U, A,
|
|
9518
|
+
function _(U, A, D, P = "error") {
|
|
9512
9519
|
for (const w in U) {
|
|
9513
9520
|
const T = w;
|
|
9514
|
-
T in A && this.logger[P](`${
|
|
9521
|
+
T in A && this.logger[P](`${D}: option ${w}. ${U[T]}`);
|
|
9515
9522
|
}
|
|
9516
9523
|
}
|
|
9517
9524
|
function b(U) {
|
|
@@ -9539,8 +9546,8 @@ function hh() {
|
|
|
9539
9546
|
}
|
|
9540
9547
|
this.logger.warn("keywords option as map is deprecated, pass array");
|
|
9541
9548
|
for (const A in U) {
|
|
9542
|
-
const
|
|
9543
|
-
|
|
9549
|
+
const D = U[A];
|
|
9550
|
+
D.keyword || (D.keyword = A), this.addKeyword(D);
|
|
9544
9551
|
}
|
|
9545
9552
|
}
|
|
9546
9553
|
function M() {
|
|
@@ -9564,23 +9571,23 @@ function hh() {
|
|
|
9564
9571
|
}
|
|
9565
9572
|
const B = /^[a-z_$][a-z0-9_$:-]*$/i;
|
|
9566
9573
|
function G(U, A) {
|
|
9567
|
-
const { RULES:
|
|
9574
|
+
const { RULES: D } = this;
|
|
9568
9575
|
if ((0, l.eachItem)(U, (P) => {
|
|
9569
|
-
if (
|
|
9576
|
+
if (D.keywords[P])
|
|
9570
9577
|
throw new Error(`Keyword ${P} is already defined`);
|
|
9571
9578
|
if (!B.test(P))
|
|
9572
9579
|
throw new Error(`Keyword ${P} has invalid name`);
|
|
9573
9580
|
}), !!A && A.$data && !("code" in A || "validate" in A))
|
|
9574
9581
|
throw new Error('$data keyword must have "code" or "validate" function');
|
|
9575
9582
|
}
|
|
9576
|
-
function re(U, A,
|
|
9583
|
+
function re(U, A, D) {
|
|
9577
9584
|
var P;
|
|
9578
9585
|
const w = A?.post;
|
|
9579
|
-
if (
|
|
9586
|
+
if (D && w)
|
|
9580
9587
|
throw new Error('keyword with "post" flag cannot have "type"');
|
|
9581
9588
|
const { RULES: T } = this;
|
|
9582
|
-
let
|
|
9583
|
-
if (
|
|
9589
|
+
let C = w ? T.post : T.rules.find(({ type: z }) => z === D);
|
|
9590
|
+
if (C || (C = { type: D, rules: [] }, T.rules.push(C)), T.keywords[U] = !0, !A)
|
|
9584
9591
|
return;
|
|
9585
9592
|
const V = {
|
|
9586
9593
|
keyword: U,
|
|
@@ -9590,11 +9597,11 @@ function hh() {
|
|
|
9590
9597
|
schemaType: (0, d.getJSONTypes)(A.schemaType)
|
|
9591
9598
|
}
|
|
9592
9599
|
};
|
|
9593
|
-
A.before ? ne.call(this,
|
|
9600
|
+
A.before ? ne.call(this, C, V, A.before) : C.rules.push(V), T.all[U] = V, (P = A.implements) === null || P === void 0 || P.forEach((z) => this.addKeyword(z));
|
|
9594
9601
|
}
|
|
9595
|
-
function ne(U, A,
|
|
9596
|
-
const P = U.rules.findIndex((w) => w.keyword ===
|
|
9597
|
-
P >= 0 ? U.rules.splice(P, 0, A) : (U.rules.push(A), this.logger.warn(`rule ${
|
|
9602
|
+
function ne(U, A, D) {
|
|
9603
|
+
const P = U.rules.findIndex((w) => w.keyword === D);
|
|
9604
|
+
P >= 0 ? U.rules.splice(P, 0, A) : (U.rules.push(A), this.logger.warn(`rule ${D} is not defined`));
|
|
9598
9605
|
}
|
|
9599
9606
|
function fe(U) {
|
|
9600
9607
|
let { metaSchema: A } = U;
|
|
@@ -9978,10 +9985,10 @@ function Oh() {
|
|
|
9978
9985
|
};
|
|
9979
9986
|
return Qt.default = o, Qt;
|
|
9980
9987
|
}
|
|
9981
|
-
var Zt = {},
|
|
9988
|
+
var Zt = {}, Co;
|
|
9982
9989
|
function Ah() {
|
|
9983
|
-
if (
|
|
9984
|
-
|
|
9990
|
+
if (Co) return Zt;
|
|
9991
|
+
Co = 1, Object.defineProperty(Zt, "__esModule", { value: !0 });
|
|
9985
9992
|
const e = Z(), t = te(), r = Yn(), s = {
|
|
9986
9993
|
keyword: "const",
|
|
9987
9994
|
$data: !0,
|
|
@@ -9996,10 +10003,10 @@ function Ah() {
|
|
|
9996
10003
|
};
|
|
9997
10004
|
return Zt.default = s, Zt;
|
|
9998
10005
|
}
|
|
9999
|
-
var er = {},
|
|
10006
|
+
var er = {}, Do;
|
|
10000
10007
|
function Nh() {
|
|
10001
|
-
if (
|
|
10002
|
-
|
|
10008
|
+
if (Do) return er;
|
|
10009
|
+
Do = 1, Object.defineProperty(er, "__esModule", { value: !0 });
|
|
10003
10010
|
const e = Z(), t = te(), r = Yn(), s = {
|
|
10004
10011
|
keyword: "enum",
|
|
10005
10012
|
schemaType: "array",
|
|
@@ -10172,7 +10179,7 @@ function Ih() {
|
|
|
10172
10179
|
return nr.default = o, nr;
|
|
10173
10180
|
}
|
|
10174
10181
|
var sr = {}, Mo;
|
|
10175
|
-
function
|
|
10182
|
+
function Ch() {
|
|
10176
10183
|
if (Mo) return sr;
|
|
10177
10184
|
Mo = 1, Object.defineProperty(sr, "__esModule", { value: !0 });
|
|
10178
10185
|
const e = Z(), t = te(), n = {
|
|
@@ -10229,7 +10236,7 @@ function Dh() {
|
|
|
10229
10236
|
return sr.default = n, sr;
|
|
10230
10237
|
}
|
|
10231
10238
|
var wn = {}, Fo;
|
|
10232
|
-
function
|
|
10239
|
+
function Dh() {
|
|
10233
10240
|
return Fo || (Fo = 1, (function(e) {
|
|
10234
10241
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateSchemaDeps = e.validatePropertyDeps = e.error = void 0;
|
|
10235
10242
|
const t = Z(), r = te(), n = Pe();
|
|
@@ -10641,7 +10648,7 @@ var Qo;
|
|
|
10641
10648
|
function Bh() {
|
|
10642
10649
|
if (Qo) return tr;
|
|
10643
10650
|
Qo = 1, Object.defineProperty(tr, "__esModule", { value: !0 });
|
|
10644
|
-
const e = ii(), t = Ph(), r = ci(), n = Ih(), s =
|
|
10651
|
+
const e = ii(), t = Ph(), r = ci(), n = Ih(), s = Ch(), o = Dh(), a = Lh(), i = ui(), c = kh(), d = Uh(), l = xh(), m = qh(), v = Mh(), S = Fh(), y = jh(), g = Vh();
|
|
10645
10652
|
function f(p = !1) {
|
|
10646
10653
|
const u = [
|
|
10647
10654
|
// any
|
|
@@ -10915,7 +10922,7 @@ var sm = nm();
|
|
|
10915
10922
|
const om = /* @__PURE__ */ Jp(sm), oa = {
|
|
10916
10923
|
CONFIG_NOT_FOUND: "CONFIG_ERROR_NOT_FOUND",
|
|
10917
10924
|
VALIDATION_FAILED: "CONFIG_ERROR_VALIDATION_FAILED"
|
|
10918
|
-
},
|
|
10925
|
+
}, wv = async (e, t) => {
|
|
10919
10926
|
const r = await am(e);
|
|
10920
10927
|
if (!r)
|
|
10921
10928
|
throw new Error(oa.CONFIG_NOT_FOUND);
|
|
@@ -10925,7 +10932,7 @@ const om = /* @__PURE__ */ Jp(sm), oa = {
|
|
|
10925
10932
|
}, am = async (e) => await F(e), im = async (e, t) => new om().compile(t)(e), cm = (e) => W + `/form/${e}?v=custom:(resources:(value))`, um = (e) => {
|
|
10926
10933
|
const t = W + "/bahmniie/form/latestPublishedForms";
|
|
10927
10934
|
return e ? t + `?episodeUuid=${e}` : t;
|
|
10928
|
-
},
|
|
10935
|
+
}, Ev = (e) => W + `/user/${e}?v=full`, lm = (e, t, r, n) => W + `/bahmniie/form/translations?formName=${encodeURIComponent(e)}&formUuid=${t}&formVersion=${r}&locale=${n}`, _r = "Bahmni", dm = (e, t, r) => {
|
|
10929
10936
|
let s = W + "/bahmnicore/patient/" + e + "/forms";
|
|
10930
10937
|
return r ? s += `?patientProgramUuid=${r}` : t && (s += `?numberOfVisits=${t}`), s;
|
|
10931
10938
|
}, fm = (e, t) => {
|
|
@@ -10939,15 +10946,15 @@ async function hm(e, t) {
|
|
|
10939
10946
|
const r = fm(e, t);
|
|
10940
10947
|
return await F(r);
|
|
10941
10948
|
}
|
|
10942
|
-
async function
|
|
10949
|
+
async function bv(e, t) {
|
|
10943
10950
|
const r = pm(e, t);
|
|
10944
10951
|
return await F(r);
|
|
10945
10952
|
}
|
|
10946
|
-
async function
|
|
10953
|
+
async function _v(e, t) {
|
|
10947
10954
|
return (await hm(e, t)).entry?.filter((s) => s.resource?.resourceType === "Observation").map((s) => s.resource) ?? [];
|
|
10948
10955
|
}
|
|
10949
10956
|
const mm = (e) => W + `/provider?user=${e}&v=custom:(uuid,display,person)`;
|
|
10950
|
-
async function
|
|
10957
|
+
async function Sv(e) {
|
|
10951
10958
|
const t = await F(
|
|
10952
10959
|
mm(e)
|
|
10953
10960
|
);
|
|
@@ -10963,12 +10970,12 @@ async function wm(e) {
|
|
|
10963
10970
|
async function Em(e) {
|
|
10964
10971
|
return (await wm(e)).find((r) => !r.period?.end) ?? null;
|
|
10965
10972
|
}
|
|
10966
|
-
async function
|
|
10973
|
+
async function Rv(e) {
|
|
10967
10974
|
return await F(
|
|
10968
10975
|
ym(e)
|
|
10969
10976
|
);
|
|
10970
10977
|
}
|
|
10971
|
-
const
|
|
10978
|
+
const Tv = (e, t) => e?.length === 0 ? !1 : t?.length === 0, bm = ce + "/Encounter", _m = W + "/systemsetting/bahmni.encountersession.duration";
|
|
10972
10979
|
async function Sm(e) {
|
|
10973
10980
|
const t = new URLSearchParams();
|
|
10974
10981
|
Object.entries(e).forEach(([s, o]) => {
|
|
@@ -10999,7 +11006,7 @@ async function Tm(e, t) {
|
|
|
10999
11006
|
return null;
|
|
11000
11007
|
}
|
|
11001
11008
|
}
|
|
11002
|
-
async function
|
|
11009
|
+
async function Ov(e, t, r, n) {
|
|
11003
11010
|
try {
|
|
11004
11011
|
if (!e) return null;
|
|
11005
11012
|
const s = r ?? await Rm(), a = `ge${new Date(Date.now() - s * 60 * 1e3).toISOString()}`, i = {
|
|
@@ -11016,7 +11023,7 @@ async function Rv(e, t, r, n) {
|
|
|
11016
11023
|
}
|
|
11017
11024
|
}
|
|
11018
11025
|
const Om = (e) => ce + `/EpisodeOfCare?_revinclude=Encounter:episode-of-care&_id=${e}`;
|
|
11019
|
-
async function
|
|
11026
|
+
async function Av(e) {
|
|
11020
11027
|
const t = e.join(","), r = await F(Om(t));
|
|
11021
11028
|
if (r.total === 0)
|
|
11022
11029
|
throw new Error(
|
|
@@ -11051,22 +11058,22 @@ const En = /* @__PURE__ */ new Map(), Am = async (e) => {
|
|
|
11051
11058
|
message: r ? `${o.message}~${JSON.stringify(r)}` : o.message,
|
|
11052
11059
|
module: n
|
|
11053
11060
|
};
|
|
11054
|
-
return await
|
|
11055
|
-
},
|
|
11061
|
+
return await Ce(Fl, a), { logged: !0 };
|
|
11062
|
+
}, Nv = () => Ml(async (t) => {
|
|
11056
11063
|
await $m(
|
|
11057
11064
|
t.patientUuid,
|
|
11058
11065
|
t.eventType,
|
|
11059
11066
|
t.messageParams,
|
|
11060
11067
|
t.module
|
|
11061
11068
|
);
|
|
11062
|
-
}),
|
|
11069
|
+
}), $v = async () => {
|
|
11063
11070
|
try {
|
|
11064
11071
|
return (await F(xa)).user.privileges;
|
|
11065
11072
|
} catch (e) {
|
|
11066
11073
|
const { message: t } = Rr(e);
|
|
11067
11074
|
throw new Error(t);
|
|
11068
11075
|
}
|
|
11069
|
-
},
|
|
11076
|
+
}, Pv = (e, t) => {
|
|
11070
11077
|
if (!e || e.length === 0)
|
|
11071
11078
|
return !1;
|
|
11072
11079
|
if (!t || t.length === 0)
|
|
@@ -11095,7 +11102,7 @@ const En = /* @__PURE__ */ new Map(), Am = async (e) => {
|
|
|
11095
11102
|
return n.display;
|
|
11096
11103
|
}
|
|
11097
11104
|
return e.name;
|
|
11098
|
-
},
|
|
11105
|
+
}, Cm = (e, t) => {
|
|
11099
11106
|
const r = Im(e, t);
|
|
11100
11107
|
return {
|
|
11101
11108
|
uuid: e.uuid,
|
|
@@ -11106,12 +11113,12 @@ const En = /* @__PURE__ */ new Map(), Am = async (e) => {
|
|
|
11106
11113
|
editable: n.editable
|
|
11107
11114
|
}))
|
|
11108
11115
|
};
|
|
11109
|
-
},
|
|
11116
|
+
}, Iv = async (e) => {
|
|
11110
11117
|
const t = await Pm(e), r = qr();
|
|
11111
11118
|
return t.map(
|
|
11112
|
-
(n) =>
|
|
11119
|
+
(n) => Cm(n, r)
|
|
11113
11120
|
);
|
|
11114
|
-
},
|
|
11121
|
+
}, Cv = async (e) => {
|
|
11115
11122
|
const t = await fetch(cm(e));
|
|
11116
11123
|
if (!t.ok)
|
|
11117
11124
|
throw new Error(
|
|
@@ -11145,7 +11152,7 @@ const En = /* @__PURE__ */ new Map(), Am = async (e) => {
|
|
|
11145
11152
|
schema: n,
|
|
11146
11153
|
translations: d
|
|
11147
11154
|
};
|
|
11148
|
-
},
|
|
11155
|
+
}, Dv = async (e, t, r) => {
|
|
11149
11156
|
let n;
|
|
11150
11157
|
t && t.length > 0 && (n = t.join(","));
|
|
11151
11158
|
const s = dm(e, r, n), o = await F(s);
|
|
@@ -11190,7 +11197,7 @@ function fi(e, t) {
|
|
|
11190
11197
|
};
|
|
11191
11198
|
return n(r.controls);
|
|
11192
11199
|
}
|
|
11193
|
-
function
|
|
11200
|
+
function Lv(e, t) {
|
|
11194
11201
|
if (!e.controls || e.controls.length === 0)
|
|
11195
11202
|
return [];
|
|
11196
11203
|
const r = [], n = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -11235,7 +11242,7 @@ function Dv(e, t) {
|
|
|
11235
11242
|
s.interpretation && (a.interpretation = s.interpretation), s.comment && (a.comment = s.comment), r.push(a);
|
|
11236
11243
|
}), r;
|
|
11237
11244
|
}
|
|
11238
|
-
function
|
|
11245
|
+
function kv(e, t) {
|
|
11239
11246
|
if (!e || e.length === 0)
|
|
11240
11247
|
return {
|
|
11241
11248
|
controls: [],
|
|
@@ -11268,7 +11275,7 @@ function Cv(e, t) {
|
|
|
11268
11275
|
metadata: { formMetadata: t }
|
|
11269
11276
|
};
|
|
11270
11277
|
}
|
|
11271
|
-
function
|
|
11278
|
+
function Uv(e) {
|
|
11272
11279
|
const t = (n) => {
|
|
11273
11280
|
const s = (d) => d == null ? null : typeof d == "string" || typeof d == "number" || typeof d == "boolean" || typeof d == "object" ? d : null, o = n.concept, a = typeof o == "object" && o !== null && "uuid" in o ? o.uuid : o, i = typeof o == "object" && o !== null && "datatype" in o ? o.datatype : void 0, c = {
|
|
11274
11281
|
concept: {
|
|
@@ -11288,11 +11295,11 @@ function Lv(e) {
|
|
|
11288
11295
|
};
|
|
11289
11296
|
return (e?.filter((n) => n.uuid && n.voided ? !0 : !(!n.uuid && n.voided || n.value && typeof n.value == "string" && n.value.endsWith("voided"))) ?? []).map(t);
|
|
11290
11297
|
}
|
|
11291
|
-
function
|
|
11298
|
+
function xv(e) {
|
|
11292
11299
|
if (!(!e || typeof e != "object"))
|
|
11293
11300
|
return "toJS" in e && typeof e.toJS == "function" ? e.toJS() : e;
|
|
11294
11301
|
}
|
|
11295
|
-
function
|
|
11302
|
+
function qv(e, t) {
|
|
11296
11303
|
!e || !Array.isArray(e.children) || e.children.forEach((r) => {
|
|
11297
11304
|
r && typeof r == "object" && pi(
|
|
11298
11305
|
r,
|
|
@@ -11322,7 +11329,7 @@ function pi(e, t) {
|
|
|
11322
11329
|
);
|
|
11323
11330
|
});
|
|
11324
11331
|
}
|
|
11325
|
-
const
|
|
11332
|
+
const Dm = W + "/bahmnicore/diseaseSummaryData?", Mv = async (e, t, r, n) => {
|
|
11326
11333
|
const s = new URLSearchParams({
|
|
11327
11334
|
groupBy: n,
|
|
11328
11335
|
latestCount: t.toString(),
|
|
@@ -11331,9 +11338,9 @@ const Cm = W + "/bahmnicore/diseaseSummaryData?", xv = async (e, t, r, n) => {
|
|
|
11331
11338
|
r.forEach((a) => {
|
|
11332
11339
|
s.append("obsConcepts", a);
|
|
11333
11340
|
});
|
|
11334
|
-
const o =
|
|
11341
|
+
const o = Dm + s.toString();
|
|
11335
11342
|
return F(o);
|
|
11336
|
-
}, Wn = "custom:(uuid,episodeUuid,patient,program,display,dateEnrolled,dateCompleted,location,voided,allowedStates,outcome,states:(uuid,startDate,endDate,voided,state:(uuid,concept:(uuid,display,name,names)),auditInfo),auditInfo,attributes)", Lm = (e) => `${W}/bahmniprogramenrollment?patient=${e}&v=${Wn}`, km = (e, t = 15, r = 0) => `${W}/bahmniprogramenrollment?patient=${e}&v=${Wn}&limit=${t}&startIndex=${r}&totalCount=true`, hi = (e) => `${W}/bahmniprogramenrollment/${e}`, Um = (e) => `${hi(e)}?v=${Wn}`,
|
|
11343
|
+
}, Wn = "custom:(uuid,episodeUuid,patient,program,display,dateEnrolled,dateCompleted,location,voided,allowedStates,outcome,states:(uuid,startDate,endDate,voided,state:(uuid,concept:(uuid,display,name,names)),auditInfo),auditInfo,attributes)", Lm = (e) => `${W}/bahmniprogramenrollment?patient=${e}&v=${Wn}`, km = (e, t = 15, r = 0) => `${W}/bahmniprogramenrollment?patient=${e}&v=${Wn}&limit=${t}&startIndex=${r}&totalCount=true`, hi = (e) => `${W}/bahmniprogramenrollment/${e}`, Um = (e) => `${hi(e)}?v=${Wn}`, Fv = async (e) => await F(Lm(e)), jv = async (e, t = 15, r = 1) => {
|
|
11337
11344
|
const n = (r - 1) * t, s = await F(
|
|
11338
11345
|
km(e, t, n)
|
|
11339
11346
|
);
|
|
@@ -11341,7 +11348,7 @@ const Cm = W + "/bahmnicore/diseaseSummaryData?", xv = async (e, t, r, n) => {
|
|
|
11341
11348
|
programs: s.results,
|
|
11342
11349
|
total: s.totalCount
|
|
11343
11350
|
};
|
|
11344
|
-
},
|
|
11351
|
+
}, Vv = async (e) => await F(Um(e)), Bv = async (e, t) => {
|
|
11345
11352
|
const r = {
|
|
11346
11353
|
uuid: e,
|
|
11347
11354
|
states: [
|
|
@@ -11350,12 +11357,12 @@ const Cm = W + "/bahmnicore/diseaseSummaryData?", xv = async (e, t, r, n) => {
|
|
|
11350
11357
|
}
|
|
11351
11358
|
]
|
|
11352
11359
|
};
|
|
11353
|
-
return await
|
|
11360
|
+
return await Ce(
|
|
11354
11361
|
hi(e),
|
|
11355
11362
|
r
|
|
11356
11363
|
);
|
|
11357
11364
|
};
|
|
11358
|
-
function
|
|
11365
|
+
function Hv(e) {
|
|
11359
11366
|
if (e.states.length === 0)
|
|
11360
11367
|
return null;
|
|
11361
11368
|
let t;
|
|
@@ -11371,7 +11378,7 @@ function Vv(e) {
|
|
|
11371
11378
|
t = e.states.find((r) => r.endDate === null);
|
|
11372
11379
|
return t ? Yf(t.state.concept.names) ?? t.state.concept.display : null;
|
|
11373
11380
|
}
|
|
11374
|
-
function
|
|
11381
|
+
function zv(e, t) {
|
|
11375
11382
|
if (t.length === 0)
|
|
11376
11383
|
return {};
|
|
11377
11384
|
const r = {};
|
|
@@ -11383,12 +11390,12 @@ function Bv(e, t) {
|
|
|
11383
11390
|
}
|
|
11384
11391
|
return r;
|
|
11385
11392
|
}
|
|
11386
|
-
const In = "consultation:saved",
|
|
11393
|
+
const In = "consultation:saved", Gv = (e) => {
|
|
11387
11394
|
const t = new CustomEvent(In, {
|
|
11388
11395
|
detail: e
|
|
11389
11396
|
});
|
|
11390
11397
|
window.dispatchEvent(t);
|
|
11391
|
-
},
|
|
11398
|
+
}, Kv = (e, t = []) => {
|
|
11392
11399
|
const r = bn(e);
|
|
11393
11400
|
_n(() => {
|
|
11394
11401
|
r.current = e;
|
|
@@ -11424,13 +11431,13 @@ async function xm(e, t) {
|
|
|
11424
11431
|
const r = mi(e, t);
|
|
11425
11432
|
return F(r);
|
|
11426
11433
|
}
|
|
11427
|
-
async function
|
|
11434
|
+
async function Yv(e, t) {
|
|
11428
11435
|
const n = ((await xm(e, t)).entry ?? []).filter(
|
|
11429
11436
|
(s) => !!s.resource
|
|
11430
11437
|
);
|
|
11431
11438
|
return gi(n);
|
|
11432
11439
|
}
|
|
11433
|
-
async function
|
|
11440
|
+
async function Wv(e, t, r = 10, n = 1) {
|
|
11434
11441
|
const s = (n - 1) * r, o = mi(
|
|
11435
11442
|
e,
|
|
11436
11443
|
t,
|
|
@@ -11444,20 +11451,24 @@ async function Kv(e, t, r = 10, n = 1) {
|
|
|
11444
11451
|
total: a.total ?? i.length
|
|
11445
11452
|
};
|
|
11446
11453
|
}
|
|
11447
|
-
const qm =
|
|
11448
|
-
|
|
11454
|
+
const qm = (e) => `${W}/location?operator=ALL&s=byTags&tags=${encodeURIComponent(e)}&v=custom:(uuid,display,childLocations:(uuid,display,retired))`;
|
|
11455
|
+
async function Jv(e) {
|
|
11456
|
+
return (await F(qm(e))).results ?? [];
|
|
11457
|
+
}
|
|
11458
|
+
const Mm = ce + "/Immunization", Fm = (e, t) => {
|
|
11459
|
+
let r = `${Mm}?patient=${e}&_sort=-_lastUpdated&_count=100`;
|
|
11449
11460
|
return t && (r += `&status=${t}`), r;
|
|
11450
11461
|
};
|
|
11451
|
-
async function
|
|
11452
|
-
return (await
|
|
11462
|
+
async function Qv(e, t) {
|
|
11463
|
+
return (await jm(e, t)).entry?.filter((n) => n.resource?.resourceType === "Immunization").map((n) => n.resource) ?? [];
|
|
11453
11464
|
}
|
|
11454
|
-
async function
|
|
11465
|
+
async function jm(e, t) {
|
|
11455
11466
|
return F(
|
|
11456
|
-
|
|
11467
|
+
Fm(e, t)
|
|
11457
11468
|
);
|
|
11458
11469
|
}
|
|
11459
|
-
const
|
|
11460
|
-
async function
|
|
11470
|
+
const Vm = W + "/bahmnicore/visitDocument/uploadDocument", Bm = "application";
|
|
11471
|
+
async function Hm(e) {
|
|
11461
11472
|
return new Promise((t, r) => {
|
|
11462
11473
|
const n = new FileReader();
|
|
11463
11474
|
n.onload = () => {
|
|
@@ -11470,7 +11481,7 @@ async function Bm(e) {
|
|
|
11470
11481
|
let a = o, i = "";
|
|
11471
11482
|
const c = o.lastIndexOf(".");
|
|
11472
11483
|
c !== -1 && (a = o.substring(0, c), i = o.substring(c + 1).toLowerCase());
|
|
11473
|
-
const d = e.type ? e.type.split("/")[0] :
|
|
11484
|
+
const d = e.type ? e.type.split("/")[0] : Bm;
|
|
11474
11485
|
t({
|
|
11475
11486
|
content: s,
|
|
11476
11487
|
fileName: a,
|
|
@@ -11482,8 +11493,8 @@ async function Bm(e) {
|
|
|
11482
11493
|
}, n.readAsDataURL(e);
|
|
11483
11494
|
});
|
|
11484
11495
|
}
|
|
11485
|
-
async function
|
|
11486
|
-
const n = await
|
|
11496
|
+
async function Xv(e, t, r) {
|
|
11497
|
+
const n = await Hm(e), s = {
|
|
11487
11498
|
content: n.content,
|
|
11488
11499
|
encounterTypeName: t,
|
|
11489
11500
|
fileName: n.fileName,
|
|
@@ -11491,194 +11502,196 @@ async function Wv(e, t, r) {
|
|
|
11491
11502
|
format: n.format,
|
|
11492
11503
|
patientUuid: r
|
|
11493
11504
|
};
|
|
11494
|
-
return
|
|
11505
|
+
return Ce(Vm, s);
|
|
11495
11506
|
}
|
|
11496
11507
|
export {
|
|
11497
|
-
|
|
11498
|
-
|
|
11508
|
+
ly as APPOINTMENT_IDENTIFIER_SYSTEM,
|
|
11509
|
+
uy as APPOINTMENT_STATUSES,
|
|
11499
11510
|
$n as AUDIT_LOG_EVENT_DETAILS,
|
|
11500
11511
|
np as AllergySeverity,
|
|
11501
11512
|
rp as AllergyStatus,
|
|
11502
11513
|
Ul as AttributeFormat,
|
|
11503
11514
|
xl as AttributeInputType,
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11515
|
+
hg as BAHMNI_HOME_PATH,
|
|
11516
|
+
zy as CONCEPT_DATATYPE_COMPLEX,
|
|
11517
|
+
Hy as CONCEPT_DATATYPE_NUMERIC,
|
|
11507
11518
|
In as CONSULTATION_SAVED_EVENT,
|
|
11508
11519
|
sp as DATETIME_REGEX_PATTERN,
|
|
11509
|
-
|
|
11520
|
+
Yy as DATE_REGEX_PATTERN,
|
|
11510
11521
|
Xa as DEFAULT_DATE_FORMAT,
|
|
11511
11522
|
Lf as DEFAULT_DATE_FORMAT_STORAGE_KEY,
|
|
11512
11523
|
kf as DEFAULT_TIME_FORMAT,
|
|
11513
11524
|
qf as DURATION_UNIT_TO_DAYS,
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
|
|
11517
|
-
|
|
11518
|
-
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
|
|
11525
|
+
Uy as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
|
|
11526
|
+
Fy as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
|
|
11527
|
+
Vy as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
|
|
11528
|
+
jy as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
|
|
11529
|
+
Gy as FHIR_OBSERVATION_STATUS_FINAL,
|
|
11530
|
+
By as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
|
|
11531
|
+
Ky as FHIR_RESOURCE_TYPE_OBSERVATION,
|
|
11532
|
+
My as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
|
|
11522
11533
|
ei as HL7_CONDITION_CATEGORY_CONDITION_CODE,
|
|
11523
11534
|
ti as HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE,
|
|
11524
|
-
|
|
11525
|
-
|
|
11526
|
-
|
|
11527
|
-
|
|
11528
|
-
|
|
11529
|
-
|
|
11535
|
+
qy as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
|
|
11536
|
+
xy as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
|
|
11537
|
+
Wy as INTERPRETATION_TO_CODE,
|
|
11538
|
+
qg as MAX_NAME_LENGTH,
|
|
11539
|
+
xg as MAX_PATIENT_AGE_YEARS,
|
|
11540
|
+
Mg as MAX_PHONE_NUMBER_LENGTH,
|
|
11530
11541
|
Ue as MedicationStatus,
|
|
11531
11542
|
ce as OPENMRS_FHIR_R4,
|
|
11532
11543
|
W as OPENMRS_REST_V1,
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11544
|
+
hv as ORDER_TYPE_QUERY_KEY,
|
|
11545
|
+
pv as PENDING_REPORT_STATUSES,
|
|
11546
|
+
fv as PROCESSED_REPORT_STATUSES,
|
|
11547
|
+
Ev as USER_PINNED_PREFERENCE_URL,
|
|
11548
|
+
Ey as calculateAge,
|
|
11549
|
+
Oy as calculateEndDate,
|
|
11550
|
+
_y as calculateOnsetDate,
|
|
11551
|
+
$g as camelToScreamingSnakeCase,
|
|
11552
|
+
bg as capitalize,
|
|
11553
|
+
iy as checkIfActiveVisitExists,
|
|
11554
|
+
xv as convertImmutableToPlainObject,
|
|
11555
|
+
Ig as convertToSentenceCase,
|
|
11556
|
+
Gg as createPatient,
|
|
11557
|
+
cy as createVisitForPatient,
|
|
11547
11558
|
Pa as del,
|
|
11548
|
-
|
|
11559
|
+
yy as deleteAppointmentService,
|
|
11549
11560
|
tl as deleteCookie,
|
|
11550
11561
|
ql as dispatchAuditEvent,
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11562
|
+
Gv as dispatchConsultationSaved,
|
|
11563
|
+
Ay as doDateRangesOverlap,
|
|
11564
|
+
zv as extractAttributes,
|
|
11565
|
+
qv as extractNotesFromFormData,
|
|
11566
|
+
Dy as fetchAndFormatAllergenConcepts,
|
|
11567
|
+
Cv as fetchFormMetadata,
|
|
11568
|
+
tv as fetchMedicationOrdersMetadata,
|
|
11569
|
+
Iv as fetchObservationForms,
|
|
11570
|
+
iv as fetchQualityAssessment,
|
|
11571
|
+
Ly as fetchReactionConcepts,
|
|
11572
|
+
Og as filterReplacementEntries,
|
|
11573
|
+
Ov as findActiveEncounterInSession,
|
|
11574
|
+
Sy as formatDateDistance,
|
|
11575
|
+
by as formatDateTime,
|
|
11576
|
+
Ag as formatUrl,
|
|
11577
|
+
wg as generateId,
|
|
11578
|
+
Eg as generateUUID,
|
|
11568
11579
|
F as get,
|
|
11569
11580
|
Em as getActiveVisit,
|
|
11570
11581
|
Gl as getActiveVisitByPatient,
|
|
11571
|
-
|
|
11572
|
-
|
|
11582
|
+
Wg as getAddressHierarchyEntries,
|
|
11583
|
+
gy as getAllAppointmentServices,
|
|
11573
11584
|
ep as getAllergies,
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11585
|
+
my as getAppointmentById,
|
|
11586
|
+
Lg as getAvailableLocations,
|
|
11587
|
+
gv as getCategoryUuidFromOrderTypes,
|
|
11588
|
+
Iy as getConceptById,
|
|
11589
|
+
Qy as getConditionPage,
|
|
11590
|
+
Jy as getConditions,
|
|
11591
|
+
wv as getConfig,
|
|
11581
11592
|
Fa as getCookieByName,
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
11593
|
+
Sv as getCurrentProvider,
|
|
11594
|
+
Hv as getCurrentStateName,
|
|
11595
|
+
Cg as getCurrentUser,
|
|
11596
|
+
$v as getCurrentUserPrivileges,
|
|
11597
|
+
Dg as getDefaultDateFormat,
|
|
11598
|
+
Zy as getDiagnosesPage,
|
|
11599
|
+
lv as getDiagnosticReportBundle,
|
|
11600
|
+
uv as getDiagnosticReports,
|
|
11601
|
+
Wv as getDocumentReferencePage,
|
|
11591
11602
|
xm as getDocumentReferences,
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
|
|
11603
|
+
Av as getEncountersAndVisitsForEOC,
|
|
11604
|
+
vv as getExistingServiceRequestsForAllCategories,
|
|
11605
|
+
mv as getFlattenedInvestigations,
|
|
11606
|
+
Ty as getFormattedAge,
|
|
11607
|
+
ky as getFormattedAllergies,
|
|
11608
|
+
Yv as getFormattedDocumentReferences,
|
|
11598
11609
|
Rr as getFormattedError,
|
|
11599
|
-
|
|
11600
|
-
|
|
11601
|
-
|
|
11602
|
-
|
|
11603
|
-
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
|
|
11610
|
+
Fg as getFormattedPatientById,
|
|
11611
|
+
Yg as getGenders,
|
|
11612
|
+
zg as getIdentifierData,
|
|
11613
|
+
Hg as getIdentifierTypes,
|
|
11614
|
+
ey as getInputTypeForFormat,
|
|
11615
|
+
cv as getLabInvestigationsBundle,
|
|
11616
|
+
Jv as getLocationByTag,
|
|
11617
|
+
Rv as getObservationsBundleByEncounterUuid,
|
|
11618
|
+
yv as getOrderTypeNames,
|
|
11607
11619
|
zn as getOrderTypes,
|
|
11608
|
-
|
|
11609
|
-
|
|
11610
|
-
|
|
11620
|
+
Jg as getOrderedAddressHierarchyLevels,
|
|
11621
|
+
py as getPastAppointments,
|
|
11622
|
+
wy as getPastAppointmentsPage,
|
|
11611
11623
|
$l as getPatientById,
|
|
11612
|
-
|
|
11613
|
-
|
|
11614
|
-
|
|
11615
|
-
|
|
11624
|
+
Xy as getPatientDiagnoses,
|
|
11625
|
+
Dv as getPatientFormData,
|
|
11626
|
+
jg as getPatientImageAsDataUrl,
|
|
11627
|
+
Qv as getPatientImmunizations,
|
|
11616
11628
|
Sp as getPatientMedicationBundle,
|
|
11617
|
-
|
|
11618
|
-
|
|
11629
|
+
ev as getPatientMedications,
|
|
11630
|
+
_v as getPatientObservations,
|
|
11619
11631
|
hm as getPatientObservationsBundle,
|
|
11620
|
-
|
|
11621
|
-
|
|
11622
|
-
|
|
11623
|
-
|
|
11624
|
-
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
|
|
11632
|
+
bv as getPatientObservationsWithEncounterBundle,
|
|
11633
|
+
Qg as getPatientProfile,
|
|
11634
|
+
Fv as getPatientPrograms,
|
|
11635
|
+
jv as getPatientProgramsPage,
|
|
11636
|
+
sv as getPatientRadiologyInvestigationBundle,
|
|
11637
|
+
ov as getPatientRadiologyInvestigationBundleWithImagingStudy,
|
|
11638
|
+
av as getPatientRadiologyInvestigations,
|
|
11639
|
+
Zg as getPersonAttributeTypes,
|
|
11628
11640
|
kl as getPrimaryIdentifierType,
|
|
11629
|
-
|
|
11630
|
-
|
|
11631
|
-
|
|
11641
|
+
Rg as getPriorityByOrder,
|
|
11642
|
+
Vv as getProgramByUUID,
|
|
11643
|
+
Xg as getRelationshipTypes,
|
|
11632
11644
|
Pt as getServiceRequests,
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11645
|
+
Ry as getTodayDate,
|
|
11646
|
+
fy as getUpcomingAppointments,
|
|
11647
|
+
vy as getUpcomingAppointmentsPage,
|
|
11636
11648
|
qn as getUserLoginLocation,
|
|
11637
11649
|
qr as getUserPreferredLocale,
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
|
|
11647
|
-
|
|
11648
|
-
|
|
11649
|
-
|
|
11650
|
-
|
|
11651
|
-
|
|
11650
|
+
nv as getVaccinations,
|
|
11651
|
+
Ng as getValueType,
|
|
11652
|
+
ay as getVisitTypes,
|
|
11653
|
+
Mv as getVitalFlowSheetData,
|
|
11654
|
+
Tg as groupByDate,
|
|
11655
|
+
Pv as hasPrivilege,
|
|
11656
|
+
gg as initAppI18n,
|
|
11657
|
+
Nv as initializeAuditListener,
|
|
11658
|
+
ty as isBooleanFormat,
|
|
11659
|
+
ry as isConceptFormat,
|
|
11660
|
+
sy as isDateFormat,
|
|
11661
|
+
ny as isNumberFormat,
|
|
11662
|
+
Sg as isStringEmpty,
|
|
11663
|
+
oy as isTextFormat,
|
|
11652
11664
|
$m as logAuditEvent,
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11665
|
+
kg as logout,
|
|
11666
|
+
mg as normalizeTranslationKey,
|
|
11667
|
+
$y as notificationService,
|
|
11656
11668
|
rl as parseQueryParams,
|
|
11657
|
-
|
|
11658
|
-
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
|
|
11662
|
-
|
|
11663
|
-
|
|
11664
|
-
|
|
11669
|
+
pg as patch,
|
|
11670
|
+
Ce as post,
|
|
11671
|
+
fg as put,
|
|
11672
|
+
vg as refreshQueries,
|
|
11673
|
+
Pg as resolveComboBoxItems,
|
|
11674
|
+
Ug as saveUserLocation,
|
|
11675
|
+
dy as searchAppointmentsByAttribute,
|
|
11676
|
+
Cy as searchConceptByName,
|
|
11677
|
+
Py as searchConcepts,
|
|
11665
11678
|
br as searchFHIRConcepts,
|
|
11666
11679
|
Kf as searchFHIRConceptsByName,
|
|
11667
|
-
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
|
|
11682
|
-
|
|
11683
|
-
|
|
11680
|
+
rv as searchMedications,
|
|
11681
|
+
Bg as searchPatientByCustomAttribute,
|
|
11682
|
+
Vg as searchPatientByNameOrId,
|
|
11683
|
+
_g as setCookie,
|
|
11684
|
+
Tv as shouldEnableEncounterFilter,
|
|
11685
|
+
Ny as sortByDate,
|
|
11686
|
+
Uv as transformContainerObservationsToForm2Observations,
|
|
11687
|
+
Lv as transformFormDataToObservations,
|
|
11688
|
+
kv as transformObservationsToFormData,
|
|
11689
|
+
hy as updateAppointmentStatus,
|
|
11690
|
+
dv as updateDiagnosticReportBundle,
|
|
11691
|
+
Kg as updatePatient,
|
|
11692
|
+
Bv as updateProgramState,
|
|
11693
|
+
Xv as uploadDocument,
|
|
11694
|
+
yg as useCamera,
|
|
11695
|
+
Kv as useSubscribeConsultationSaved,
|
|
11696
|
+
tw as useTranslation
|
|
11684
11697
|
};
|