@bahmni/services 0.0.1-dev.352 → 0.0.1-dev.354

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { initReactI18next as Rc } from "react-i18next";
2
- import { useTranslation as Dv } from "react-i18next";
2
+ import { useTranslation as Iv } from "react-i18next";
3
3
  import { useRef as qt, useCallback as vn, useEffect as nt, useSyncExternalStore as Oc } from "react";
4
4
  function Ba(t, e) {
5
5
  return function() {
@@ -2288,23 +2288,23 @@ he.getAdapter = fi.getAdapter;
2288
2288
  he.HttpStatusCode = Jn;
2289
2289
  he.default = he;
2290
2290
  const {
2291
- Axios: jw,
2292
- AxiosError: Vw,
2293
- CanceledError: Hw,
2294
- isCancel: Bw,
2295
- CancelToken: zw,
2296
- VERSION: Yw,
2297
- all: Gw,
2298
- Cancel: Kw,
2299
- isAxiosError: Ww,
2300
- spread: Jw,
2301
- toFormData: Qw,
2302
- AxiosHeaders: Xw,
2303
- HttpStatusCode: Zw,
2304
- formToJSON: eE,
2305
- getAdapter: tE,
2306
- mergeConfig: rE,
2307
- create: nE
2291
+ Axios: qw,
2292
+ AxiosError: Fw,
2293
+ CanceledError: jw,
2294
+ isCancel: Vw,
2295
+ CancelToken: Hw,
2296
+ VERSION: Bw,
2297
+ all: zw,
2298
+ Cancel: Yw,
2299
+ isAxiosError: Gw,
2300
+ spread: Kw,
2301
+ toFormData: Ww,
2302
+ AxiosHeaders: Jw,
2303
+ HttpStatusCode: Qw,
2304
+ formToJSON: Xw,
2305
+ getAdapter: Zw,
2306
+ mergeConfig: eE,
2307
+ create: tE
2308
2308
  } = he, Rl = (t) => typeof t == "object" && t !== null && "resourceType" in t && t.resourceType === "OperationOutcome", Ol = (t) => {
2309
2309
  if (!t.issue || !Array.isArray(t.issue))
2310
2310
  return null;
@@ -2472,7 +2472,7 @@ function Ml(t, e) {
2472
2472
  const Ul = process.env.PUBLIC_URL ?? "/", se = "/openmrs/ws/fhir2/R4", W = "/openmrs/ws/rest/v1", yi = "bahmni.user", wi = "bahmni.user.location", ql = [
2473
2473
  yi,
2474
2474
  wi
2475
- ], Fl = "/bahmni-v2", sE = Fl + "/home", ys = W + "/session", ws = `${W}/bahmnicore/template/api`, Qn = (t) => {
2475
+ ], Fl = "/bahmni-v2", rE = Fl + "/home", ys = W + "/session", ws = `${W}/bahmnicore/template/api`, Qn = (t) => {
2476
2476
  if (typeof t == "string")
2477
2477
  return Ml(t);
2478
2478
  if (Array.isArray(t))
@@ -2512,7 +2512,7 @@ Ke.interceptors.response.use(
2512
2512
  return r.startsWith("ERROR_") || /^[A-Z_]+$/.test(r) ? Promise.reject(new Error(r)) : Promise.reject(`${e}: ${r}`);
2513
2513
  }
2514
2514
  );
2515
- const H = async (t, e) => (await Ke.get(t, e)).data, ge = async (t, e) => (await Ke.post(t, e)).data, Ei = async (t, e) => (await Ke.put(t, e)).data, oE = async (t, e) => (await Ke.patch(t, e)).data, bi = async (t) => (await Ke.delete(t)).data, J = (t) => typeof t == "string", Nt = () => {
2515
+ const H = async (t, e) => (await Ke.get(t, e)).data, ge = async (t, e) => (await Ke.post(t, e)).data, Ei = async (t, e) => (await Ke.put(t, e)).data, nE = async (t, e) => (await Ke.patch(t, e)).data, bi = async (t) => (await Ke.delete(t)).data, J = (t) => typeof t == "string", Nt = () => {
2516
2516
  let t, e;
2517
2517
  const r = new Promise((n, s) => {
2518
2518
  t = n, e = s;
@@ -4210,7 +4210,7 @@ const Td = "en", Oi = "NG_TRANSLATE_LANG_KEY", Sd = (t, e) => Ul + `${t}/locales
4210
4210
  }, t !== "en" && (r.en = {
4211
4211
  [e]: await wo(e, "en")
4212
4212
  }), r;
4213
- }, aE = (t, e) => {
4213
+ }, sE = (t, e) => {
4214
4214
  const r = t.toUpperCase(), n = e.toUpperCase().replace(/\s+/g, "_").replace(/[^A-Z0-9_]/g, "");
4215
4215
  return `${r}_${n}`;
4216
4216
  }, Ad = (t, e) => {
@@ -4227,7 +4227,7 @@ const Td = "en", Oi = "NG_TRANSLATE_LANG_KEY", Sd = (t, e) => Ul + `${t}/locales
4227
4227
  labels: n.labels ?? {},
4228
4228
  concepts: n.concepts ?? {}
4229
4229
  };
4230
- }, iE = async (t) => {
4230
+ }, oE = async (t) => {
4231
4231
  const e = an(), r = await Od(e, t);
4232
4232
  return de.isInitialized ? (Object.entries(r).forEach(([n, s]) => {
4233
4233
  Object.entries(s).forEach(([o, a]) => {
@@ -4250,7 +4250,7 @@ const Td = "en", Oi = "NG_TRANSLATE_LANG_KEY", Sd = (t, e) => Ul + `${t}/locales
4250
4250
  }
4251
4251
  }), de;
4252
4252
  };
4253
- function cE() {
4253
+ function aE() {
4254
4254
  const t = qt(null), e = qt(null), r = vn(async () => {
4255
4255
  e.current && (e.current.getTracks().forEach((a) => a.stop()), e.current = null);
4256
4256
  const o = await navigator.mediaDevices.getUserMedia({
@@ -4290,13 +4290,13 @@ function cE() {
4290
4290
  );
4291
4291
  return nt(() => () => n(), [n]), { videoRef: t, start: r, stop: n, capture: s };
4292
4292
  }
4293
- const Pd = "bahmni.enableAuditLog", Ai = (t) => `${W}/bahmnicore/sql/globalproperty?property=${t}`, Nd = "http://hl7.org/fhir/StructureDefinition/patient-birthTime", Pi = "http://fhir.openmrs.org/code-system/encounter-type", Ni = "http://terminology.hl7.org/CodeSystem/v3-ActCode", Ii = "http://fhir.openmrs.org/ext/encounter-tag", Es = "problem-list-item", uE = "http://terminology.hl7.org/CodeSystem/condition-ver-status", $i = "encounter-diagnosis", Id = "http://terminology.hl7.org/CodeSystem/condition-clinical", $d = "http://terminology.hl7.org/CodeSystem/condition-category", lE = "http://fhir.bahmni.org/ext/lab-order-concept-type", dE = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", fE = "http://fhir.bahmni.org/ext/observation/form-namespace-path", pE = "http://fhir.bahmni.org/ext/observation/obs-value-attachment", hE = "Numeric", mE = "Complex", gE = "final", yE = "Observation", wE = /^\d{4}-\d{2}-\d{2}/, Dd = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/, EE = {
4293
+ const Pd = "bahmni.enableAuditLog", Ai = (t) => `${W}/bahmnicore/sql/globalproperty?property=${t}`, Nd = "http://hl7.org/fhir/StructureDefinition/patient-birthTime", Pi = "http://fhir.openmrs.org/code-system/encounter-type", Ni = "http://terminology.hl7.org/CodeSystem/v3-ActCode", Ii = "http://fhir.openmrs.org/ext/encounter-tag", Es = "problem-list-item", iE = "http://terminology.hl7.org/CodeSystem/condition-ver-status", $i = "encounter-diagnosis", Id = "http://terminology.hl7.org/CodeSystem/condition-clinical", $d = "http://terminology.hl7.org/CodeSystem/condition-category", cE = "http://fhir.bahmni.org/ext/lab-order-concept-type", uE = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", lE = "http://fhir.bahmni.org/ext/observation/form-namespace-path", dE = "http://fhir.bahmni.org/ext/observation/obs-value-attachment", fE = "Numeric", pE = "Complex", hE = "final", mE = "Observation", gE = /^\d{4}-\d{2}-\d{2}/, Dd = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/, yE = {
4294
4294
  ABNORMAL: { code: "A", display: "Abnormal" },
4295
4295
  NORMAL: { code: "N", display: "Normal" }
4296
- }, bE = async (t, e, r) => {
4296
+ }, wE = async (t, e, r) => {
4297
4297
  const { exact: n = !0, refetchActiveNow: s = !0 } = r ?? {};
4298
4298
  await t.cancelQueries({ queryKey: e, exact: n }), await t.removeQueries({ queryKey: e, exact: n }), await t.invalidateQueries({ queryKey: e, exact: n }), s && await t.refetchQueries({ queryKey: e, exact: n, type: "active" });
4299
- }, _E = () => Math.random().toString(36).substring(2, 9), Qr = () => {
4299
+ }, EE = () => Math.random().toString(36).substring(2, 9), Qr = () => {
4300
4300
  if (typeof globalThis < "u" && globalThis.crypto?.randomUUID)
4301
4301
  return globalThis.crypto.randomUUID();
4302
4302
  const t = globalThis.crypto || globalThis.msCrypto;
@@ -4308,7 +4308,7 @@ const Pd = "bahmni.enableAuditLog", Ai = (t) => `${W}/bahmnicore/sql/globalprope
4308
4308
  "Crypto API (crypto.randomUUID or crypto.getRandomValues) is not available. UUID generation requires cryptographically secure random number generation."
4309
4309
  );
4310
4310
  };
4311
- function vE(t, e = " -") {
4311
+ function bE(t, e = " -") {
4312
4312
  return t ? t.toLowerCase().split(new RegExp(`[${e}]+`)).map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ") : "";
4313
4313
  }
4314
4314
  function Di(t) {
@@ -4323,10 +4323,10 @@ function Di(t) {
4323
4323
  function Cd(t, e = "/") {
4324
4324
  document.cookie = `${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${e};`;
4325
4325
  }
4326
- function TE(t, e) {
4326
+ function _E(t, e) {
4327
4327
  document.cookie = `${t}=${e}; path=/;`;
4328
4328
  }
4329
- const SE = (t) => !t || t.trim().length === 0, RE = (t, e) => {
4329
+ const vE = (t) => !t || t.trim().length === 0, TE = (t, e) => {
4330
4330
  if (!t || !e || e.length === 0)
4331
4331
  return 999;
4332
4332
  const r = e.findIndex(
@@ -4334,7 +4334,7 @@ const SE = (t) => !t || t.trim().length === 0, RE = (t, e) => {
4334
4334
  );
4335
4335
  return r === -1 ? 999 : r;
4336
4336
  };
4337
- function OE(t, e) {
4337
+ function SE(t, e) {
4338
4338
  if (!t || t.length === 0)
4339
4339
  return [];
4340
4340
  const r = /* @__PURE__ */ new Map();
@@ -4346,7 +4346,7 @@ function OE(t, e) {
4346
4346
  items: s
4347
4347
  }));
4348
4348
  }
4349
- function AE(t, e, r) {
4349
+ function RE(t, e, r) {
4350
4350
  if (!t || t.length === 0)
4351
4351
  return [];
4352
4352
  const n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
@@ -4367,7 +4367,7 @@ function Ld(t) {
4367
4367
  o[n(a[1])] = n(a[2]);
4368
4368
  return o;
4369
4369
  }
4370
- function PE(t, e, r) {
4370
+ function OE(t, e, r) {
4371
4371
  const n = /{{([^}]*)}}/g, s = t.match(n);
4372
4372
  let o = t;
4373
4373
  const a = r ?? !1, i = a ? Ld() : {};
@@ -4380,7 +4380,7 @@ function PE(t, e, r) {
4380
4380
  const xd = (t) => new Promise((e, r) => {
4381
4381
  const n = new FileReader();
4382
4382
  n.onloadend = () => e(n.result), n.onerror = r, n.readAsDataURL(t);
4383
- }), NE = (t) => {
4383
+ }), AE = (t) => {
4384
4384
  if (typeof t == "number" && !isNaN(t))
4385
4385
  return "number";
4386
4386
  if (typeof t != "string")
@@ -4391,20 +4391,20 @@ const xd = (t) => new Promise((e, r) => {
4391
4391
  function Ci(t) {
4392
4392
  return t.replace(/[\s-]+/g, "_").replace(/([a-z])([A-Z])/g, "$1_$2").replace(/([A-Z])([A-Z][a-z])/g, "$1_$2").toUpperCase();
4393
4393
  }
4394
- function IE(t, e, r, n, s) {
4394
+ function PE(t, e, r, n, s) {
4395
4395
  const o = (a) => ({
4396
4396
  ...n(a),
4397
4397
  disabled: !0
4398
4398
  });
4399
4399
  return t ? [o(s.loading)] : e ? [o(s.error)] : r.length ? r : [o(s.empty)];
4400
4400
  }
4401
- function $E(t) {
4401
+ function NE(t) {
4402
4402
  return t ? t.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(/^./, (e) => e.toUpperCase()) : "";
4403
4403
  }
4404
- const DE = (t, e) => {
4404
+ const IE = (t, e) => {
4405
4405
  const r = t.trim();
4406
4406
  return r ? e(`GENDER_${Ci(r)}`) : null;
4407
- }, CE = (t, e) => {
4407
+ }, $E = (t, e) => {
4408
4408
  const r = t.trim();
4409
4409
  if (!r) return null;
4410
4410
  const n = `COUNTRY_CODE_${Ci(r)}`, s = e(n);
@@ -4417,7 +4417,7 @@ const DE = (t, e) => {
4417
4417
  return r;
4418
4418
  }
4419
4419
  }, kd = (t) => W + `/user?username=${t}&v=custom:(display,username,uuid)`, Md = `${W}/location?tags=Login Location&v=default`, Ud = (t) => W + `/user/${t}?v=full`, qd = (t) => W + `/bahmni/app/setting?module=${t}`, Fd = "default_dateFormat", jd = ys;
4420
- async function LE() {
4420
+ async function DE() {
4421
4421
  const t = Di(yi);
4422
4422
  if (!t)
4423
4423
  return null;
@@ -4441,13 +4441,13 @@ const Kt = () => {
4441
4441
  if (!e.uuid)
4442
4442
  throw new Error(de.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
4443
4443
  return e;
4444
- }, xE = async () => (await H(qd("commons"))).find(
4444
+ }, CE = async () => (await H(qd("commons"))).find(
4445
4445
  (r) => r.property === Fd
4446
- )?.value ?? null, kE = async () => (await H(Md)).results ?? [], ME = async (t, e) => {
4446
+ )?.value ?? null, LE = async () => (await H(Md)).results ?? [], xE = async (t, e) => {
4447
4447
  await ge(Ud(t), {
4448
4448
  userProperties: { loginLocation: e.uuid }
4449
4449
  });
4450
- }, UE = async (t) => {
4450
+ }, kE = async (t) => {
4451
4451
  await ge(jd, { sessionLocation: t });
4452
4452
  }, bs = {
4453
4453
  person: {
@@ -4495,7 +4495,7 @@ const Kt = () => {
4495
4495
  }, xi = W + "/idgen/identifiertype", zd = (t) => W + `/bahmni/app/setting?module=${t}`, Yd = "bahmni.primaryIdentifierType", Gd = W + "/bahmnicore/patientprofile", Kd = (t) => W + `/bahmnicore/patientprofile/${t}`, Wd = se + "/Patient", Jd = (t) => W + `/idgen/identifiersource/${t}/identifier`, Qd = (t) => W + `/patientprofile/${t}?v=full`, Xd = (t, e, r = 20, n) => {
4496
4496
  let s = `/openmrs/module/addresshierarchy/ajax/getPossibleAddressHierarchyEntriesWithParents.form?addressField=${t}&limit=${r}&searchString=${encodeURIComponent(e)}`;
4497
4497
  return n && (s += `&parent=${n}`), s;
4498
- }, Zd = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", ef = W + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", tf = 20, rf = 2, qE = 120, FE = 50, jE = 15, nf = /^[a-f0-9-]{36}$/i, sf = W + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", VE = (t) => t === "male" ? "M" : t === "female" ? "F" : t === "other" ? "O" : "U", of = async (t) => {
4498
+ }, Zd = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", ef = W + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", tf = 20, rf = 2, ME = 120, UE = 50, qE = 15, nf = /^[a-f0-9-]{36}$/i, sf = W + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", FE = (t) => t === "male" ? "M" : t === "female" ? "F" : t === "other" ? "O" : "U", of = async (t) => {
4499
4499
  if (!t || t.trim() === "")
4500
4500
  throw new Error("Invalid patient UUID: UUID cannot be empty");
4501
4501
  if (!nf.test(t))
@@ -4535,22 +4535,22 @@ const Kt = () => {
4535
4535
  identifier: o,
4536
4536
  photoUrl: t.photo?.[0]?.url
4537
4537
  };
4538
- }, HE = async (t) => {
4538
+ }, jE = async (t) => {
4539
4539
  const e = await of(t);
4540
4540
  return df(e);
4541
- }, BE = async (t) => {
4541
+ }, VE = async (t) => {
4542
4542
  if (!t.startsWith("/"))
4543
4543
  throw new Error("Photo URL must be a relative path");
4544
4544
  const e = await H(t, {
4545
4545
  responseType: "blob"
4546
4546
  });
4547
4547
  return await xd(e);
4548
- }, zE = async (t, e) => {
4548
+ }, HE = async (t, e) => {
4549
4549
  const r = Kt();
4550
4550
  return await H(
4551
4551
  Hd(t, r.uuid, e)
4552
4552
  );
4553
- }, YE = async (t, e, r, n, s) => {
4553
+ }, BE = async (t, e, r, n, s) => {
4554
4554
  const o = Kt();
4555
4555
  return await H(
4556
4556
  Bd(
@@ -4561,9 +4561,9 @@ const Kt = () => {
4561
4561
  o.uuid
4562
4562
  )
4563
4563
  );
4564
- }, GE = async () => H(xi), ff = async () => (await H(zd("core"))).find(
4564
+ }, zE = async () => H(xi), ff = async () => (await H(zd("core"))).find(
4565
4565
  (r) => r.property === Yd
4566
- )?.value ?? null, KE = async () => {
4566
+ )?.value ?? null, YE = async () => {
4567
4567
  const [t, e] = await Promise.all([
4568
4568
  H(xi),
4569
4569
  ff()
@@ -4591,10 +4591,10 @@ const Kt = () => {
4591
4591
  primaryIdentifierTypeUuid: e,
4592
4592
  primaryIdentifierTypeName: null
4593
4593
  };
4594
- }, WE = async (t) => ge(Gd, t), JE = async (t, e) => ge(
4594
+ }, GE = async (t) => ge(Gd, t), KE = async (t, e) => ge(
4595
4595
  Kd(t),
4596
4596
  e
4597
- ), QE = (t) => ge(Wd, t), XE = (t) => ge(Jd(t), {}), ZE = (t, e) => Ei(Li(t), e), eb = async () => H(Ai("mrs.genders")), tb = async (t, e, r = tf, n) => {
4597
+ ), WE = (t) => ge(Wd, t), JE = (t) => ge(Jd(t), {}), QE = (t, e) => Ei(Li(t), e), XE = async () => H(Ai("mrs.genders")), ZE = async (t, e, r = tf, n) => {
4598
4598
  if (!e || e.length < rf)
4599
4599
  return [];
4600
4600
  try {
@@ -4606,7 +4606,7 @@ const Kt = () => {
4606
4606
  `Failed to fetch address hierarchy for field "${t}": ${s instanceof Error ? s.message : "Unknown error"}`
4607
4607
  );
4608
4608
  }
4609
- }, rb = async () => H(Zd), nb = async (t) => H(Qd(t)), sb = async () => {
4609
+ }, eb = async () => H(Zd), tb = async (t) => H(Qd(t)), rb = async () => {
4610
4610
  try {
4611
4611
  return (await H(
4612
4612
  ef
@@ -4620,9 +4620,9 @@ const Kt = () => {
4620
4620
  `Failed to fetch relationship types: ${t instanceof Error ? t.message : "Unknown error"}`
4621
4621
  );
4622
4622
  }
4623
- }, ob = async () => H(sf);
4623
+ }, nb = async () => H(sf);
4624
4624
  var pf = /* @__PURE__ */ ((t) => (t.BOOLEAN = "java.lang.Boolean", t.BOOLEAN_DATATYPE = "org.openmrs.customdatatype.datatype.BooleanDatatype", t.CONCEPT = "org.openmrs.Concept", t.CODED_CONCEPT = "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype", t.CONCEPT_DATATYPE = "org.openmrs.customdatatype.datatype.ConceptDatatype", t.STRING = "java.lang.String", t.FREE_TEXT = "org.openmrs.customdatatype.datatype.FreeTextDatatype", t.REGEX_VALIDATED_TEXT = "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", t.INTEGER = "java.lang.Integer", t.FLOAT = "java.lang.Float", t.ATTRIBUTABLE_DATE = "org.openmrs.util.AttributableDate", t.DATE_DATATYPE = "org.openmrs.customdatatype.datatype.DateDatatype", t))(pf || {}), hf = /* @__PURE__ */ ((t) => (t.CHECKBOX = "checkbox", t.DROPDOWN = "dropdown", t.TEXT = "text", t.NUMBER = "number", t.DATE = "date", t))(hf || {});
4625
- const ab = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype.datatype.BooleanDatatype" ? "checkbox" : t === "org.openmrs.Concept" || t === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || t === "org.openmrs.customdatatype.datatype.ConceptDatatype" ? "dropdown" : t === "java.lang.Integer" || t === "java.lang.Float" ? "number" : t === "org.openmrs.util.AttributableDate" || t === "org.openmrs.customdatatype.datatype.DateDatatype" ? "date" : "text", ib = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype.datatype.BooleanDatatype", cb = (t) => t === "org.openmrs.Concept" || t === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || t === "org.openmrs.customdatatype.datatype.ConceptDatatype", ub = (t) => t === "java.lang.Integer" || t === "java.lang.Float", lb = (t) => t === "org.openmrs.util.AttributableDate" || t === "org.openmrs.customdatatype.datatype.DateDatatype", db = (t) => t === "java.lang.String" || t === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || t === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", mf = (t) => {
4625
+ const sb = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype.datatype.BooleanDatatype" ? "checkbox" : t === "org.openmrs.Concept" || t === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || t === "org.openmrs.customdatatype.datatype.ConceptDatatype" ? "dropdown" : t === "java.lang.Integer" || t === "java.lang.Float" ? "number" : t === "org.openmrs.util.AttributableDate" || t === "org.openmrs.customdatatype.datatype.DateDatatype" ? "date" : "text", ob = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype.datatype.BooleanDatatype", ab = (t) => t === "org.openmrs.Concept" || t === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || t === "org.openmrs.customdatatype.datatype.ConceptDatatype", ib = (t) => t === "java.lang.Integer" || t === "java.lang.Float", cb = (t) => t === "org.openmrs.util.AttributableDate" || t === "org.openmrs.customdatatype.datatype.DateDatatype", ub = (t) => t === "java.lang.String" || t === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || t === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", mf = (t) => {
4626
4626
  const e = new CustomEvent("bahmni-audit-log", { detail: t });
4627
4627
  window.dispatchEvent(e);
4628
4628
  }, gf = (t) => {
@@ -4700,10 +4700,10 @@ const ab = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype
4700
4700
  }
4701
4701
  }, yf = W + "/auditlog", wf = {
4702
4702
  UNKNOWN_EVENT_TYPE: "AUDIT_LOG_ERROR_UNKNOWN_EVENT_TYPE"
4703
- }, Ef = () => W + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", bf = W + "/visit", _f = (t) => W + `/visit?patient=${t}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, vf = (t) => W + `/bahmnicore/visitLocation/${t}`, fb = async () => H(Ef()), Tf = async (t) => H(_f(t)), Sf = async (t) => H(vf(t)), Rf = async (t) => ge(bf, t), pb = async (t) => {
4703
+ }, Ef = () => W + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", bf = W + "/visit", _f = (t) => W + `/visit?patient=${t}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, vf = (t) => W + `/bahmnicore/visitLocation/${t}`, lb = async () => H(Ef()), Tf = async (t) => H(_f(t)), Sf = async (t) => H(vf(t)), Rf = async (t) => ge(bf, t), db = async (t) => {
4704
4704
  const e = await Tf(t);
4705
4705
  return e?.results && e.results.length > 0;
4706
- }, hb = async (t, e) => {
4706
+ }, fb = async (t, e) => {
4707
4707
  const r = await Sf(
4708
4708
  Kt().uuid
4709
4709
  ), n = {
@@ -7634,7 +7634,7 @@ function Bh(t, e, r) {
7634
7634
  function zh(t, e, r) {
7635
7635
  return ln(t, -e, r);
7636
7636
  }
7637
- const mb = {
7637
+ const pb = {
7638
7638
  PROPOSED: "proposed",
7639
7639
  PENDING: "pending",
7640
7640
  BOOKED: "booked",
@@ -7645,51 +7645,51 @@ const mb = {
7645
7645
  CHECKED_IN: "checked-in",
7646
7646
  WAITLIST: "waitlist",
7647
7647
  ENTERED_IN_ERROR: "entered-in-error"
7648
- }, Yh = W + "/appointments/search", Qi = W + "/appointments", gb = "http://fhir.bahmni.org/code-system/appointments", Gh = (t) => `${Qi}/${t}`, hn = (t, e, r, n) => {
7648
+ }, Yh = W + "/appointments/search", Qi = W + "/appointments", hb = "http://fhir.bahmni.org/code-system/appointments", Gh = (t) => `${Qi}/${t}`, hn = (t, e, r, n) => {
7649
7649
  const s = e === "upcoming", o = s ? "ge" : "le", a = s ? "date" : "-date", i = s ? (/* @__PURE__ */ new Date()).toISOString() : Bh(/* @__PURE__ */ new Date()).toISOString();
7650
7650
  let c = `${se}/Appointment?patient=${t}&date=${o}${i}&_sort=${a}`;
7651
7651
  return r !== void 0 && r > 0 && (c += `&_count=${r}`), n !== void 0 && n > 0 && (c += `&_getpagesoffset=${n}`), c;
7652
- }, Kh = (t) => hn(t, "upcoming"), Wh = (t, e) => hn(t, "past", e), Jh = (t) => `${Qi}/${t}/status-change`, Qh = W + "/appointmentService/all/full", Xh = (t) => `${W}/appointmentService?uuid=${t}`, Zh = (t, e = 10, r = 0) => hn(t, "upcoming", e, r), em = (t, e = 10, r = 0) => hn(t, "past", e, r), Xi = W + "/appointmentUnavailability", yb = async (t) => await ge(Yh, t);
7653
- async function wb(t) {
7652
+ }, Kh = (t) => hn(t, "upcoming"), Wh = (t, e) => hn(t, "past", e), Jh = (t) => `${Qi}/${t}/status-change`, Qh = W + "/appointmentService/all/full", Xh = (t) => `${W}/appointmentService?uuid=${t}`, Zh = (t, e = 10, r = 0) => hn(t, "upcoming", e, r), em = (t, e = 10, r = 0) => hn(t, "past", e, r), Xi = W + "/appointmentUnavailability", mb = async (t) => await ge(Yh, t);
7653
+ async function gb(t) {
7654
7654
  return await H(Kh(t));
7655
7655
  }
7656
- async function Eb(t, e) {
7656
+ async function yb(t, e) {
7657
7657
  return await H(
7658
7658
  Wh(t, e)
7659
7659
  );
7660
7660
  }
7661
- const bb = async (t, e, r) => await ge(Jh(t), {
7661
+ const wb = async (t, e, r) => await ge(Jh(t), {
7662
7662
  toStatus: e,
7663
7663
  onDate: r
7664
- }), _b = async (t, e) => ge(t, { appointmentUuid: e });
7665
- async function vb(t) {
7664
+ }), Eb = async (t, e) => ge(t, { appointmentUuid: e });
7665
+ async function bb(t) {
7666
7666
  return await H(Gh(t));
7667
7667
  }
7668
- const Tb = async () => await H(Qh), Sb = async (t) => {
7668
+ const _b = async () => await H(Qh), vb = async (t) => {
7669
7669
  await bi(Xh(t));
7670
7670
  };
7671
- async function Rb(t, e = 10, r = 1) {
7671
+ async function Tb(t, e = 10, r = 1) {
7672
7672
  const n = (r - 1) * e, s = await H(
7673
7673
  Zh(t, e, n)
7674
7674
  );
7675
7675
  return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
7676
7676
  }
7677
- async function Ob(t, e = 10, r = 1) {
7677
+ async function Sb(t, e = 10, r = 1) {
7678
7678
  const n = (r - 1) * e, s = await H(
7679
7679
  em(t, e, n)
7680
7680
  );
7681
7681
  return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
7682
7682
  }
7683
- const Ab = async () => await H(Xi), Pb = async (t) => {
7683
+ const Rb = async () => await H(Xi), Ob = async (t) => {
7684
7684
  await ge(Xi, t);
7685
- }, Zi = "dd/MM/yyyy", tm = "default_dateFormat", rm = "h:mm a", Nb = "yyyy-MM-dd", Le = {
7685
+ }, Zi = "dd/MM/yyyy", tm = "default_dateFormat", rm = "h:mm a", Ab = "yyyy-MM-dd", Le = {
7686
7686
  PARSE_ERROR: "DATE_ERROR_PARSE",
7687
7687
  FORMAT_ERROR: "DATE_ERROR_FORMAT",
7688
7688
  EMPTY_OR_INVALID: "DATE_ERROR_EMPTY_OR_INVALID",
7689
7689
  INVALID_FORMAT: "DATE_ERROR_INVALID_FORMAT",
7690
7690
  NULL_OR_UNDEFINED: "DATE_ERROR_NULL_OR_UNDEFINED"
7691
7691
  };
7692
- function Ib(t) {
7692
+ function Pb(t) {
7693
7693
  if (!t) return null;
7694
7694
  const e = pn(t);
7695
7695
  if (!at(e)) return null;
@@ -7698,7 +7698,7 @@ function Ib(t) {
7698
7698
  const n = Vt(r, e), s = fn(r, e), o = ln(e, s), a = dn(r, o), i = Wt(o, a), c = Vt(r, i), u = `${s}y ${a}m ${c}d`;
7699
7699
  return { year: s, month: a, day: c, ageInDays: n, ageText: u };
7700
7700
  }
7701
- function $b(t) {
7701
+ function Nb(t) {
7702
7702
  if (typeof t != "string" || !/^\d{4}-\d{2}-\d{2}$/.test(t))
7703
7703
  return null;
7704
7704
  const e = pn(t);
@@ -7766,7 +7766,7 @@ function sm() {
7766
7766
  return Zi;
7767
7767
  }
7768
7768
  }
7769
- function Db(t, e, r = !1, n) {
7769
+ function Ib(t, e, r = !1, n) {
7770
7770
  const s = e ?? ((a) => a);
7771
7771
  let o;
7772
7772
  try {
@@ -7776,7 +7776,7 @@ function Db(t, e, r = !1, n) {
7776
7776
  }
7777
7777
  return r && !n && (o = `${o} ${rm}`), nm(t, o, s);
7778
7778
  }
7779
- function Cb(t, e, r) {
7779
+ function $b(t, e, r) {
7780
7780
  if (!t || !at(t) || e === null || e === void 0 || !r || typeof e != "number")
7781
7781
  return;
7782
7782
  const n = new Date(t);
@@ -7791,7 +7791,7 @@ function Cb(t, e, r) {
7791
7791
  return;
7792
7792
  }
7793
7793
  }
7794
- function Lb(t, e) {
7794
+ function Db(t, e) {
7795
7795
  if (t == null)
7796
7796
  return {
7797
7797
  formattedResult: "",
@@ -7843,11 +7843,11 @@ function Lb(t, e) {
7843
7843
  }
7844
7844
  return { formattedResult: c };
7845
7845
  }
7846
- const xb = () => {
7846
+ const Cb = () => {
7847
7847
  const t = /* @__PURE__ */ new Date();
7848
7848
  return t.setHours(0, 0, 0, 0), t;
7849
7849
  };
7850
- function kb(t, e) {
7850
+ function Lb(t, e) {
7851
7851
  const r = typeof t == "string" ? pn(t) : new Date(t), n = /* @__PURE__ */ new Date(), s = fn(n, r), o = ln(r, s), a = dn(n, o), i = Wt(o, a), c = Vt(n, i), u = {
7852
7852
  years: "YEARS",
7853
7853
  months: "MONTHS",
@@ -7881,14 +7881,14 @@ const om = {
7881
7881
  h: 1 / 24,
7882
7882
  min: 1 / 1440,
7883
7883
  s: 1 / 86400
7884
- }, Mb = (t, e, r) => {
7884
+ }, xb = (t, e, r) => {
7885
7885
  const n = typeof t == "string" ? new Date(t) : t;
7886
7886
  if (isNaN(n.getTime()))
7887
7887
  throw new Error(`Invalid date: ${t}`);
7888
7888
  const s = om[r] ?? 1, o = e * s;
7889
7889
  return un(n, o);
7890
- }, Ub = (t, e, r, n) => t <= n && r <= e;
7891
- function qb(t, e, r = !1) {
7890
+ }, kb = (t, e, r, n) => t <= n && r <= e;
7891
+ function Mb(t, e, r = !1) {
7892
7892
  return !t || !Array.isArray(t) ? [] : t.sort((n, s) => {
7893
7893
  const o = new Date(n[e]), a = new Date(s[e]);
7894
7894
  if (isNaN(o.getTime()) && isNaN(a.getTime())) return 0;
@@ -7903,7 +7903,7 @@ function am(t) {
7903
7903
  const e = Rh(t, "hh:mm aa", /* @__PURE__ */ new Date());
7904
7904
  return at(e) ? zi(e, "HH:mm") : "";
7905
7905
  }
7906
- function Fb(t) {
7906
+ function Ub(t) {
7907
7907
  const e = am(t);
7908
7908
  if (!e) return null;
7909
7909
  const [r, n] = e.split(":").map(Number);
@@ -7938,10 +7938,10 @@ const im = () => {
7938
7938
  );
7939
7939
  }
7940
7940
  };
7941
- }, jb = im(), cm = (t) => se + `/ValueSet/${t}/$expand`, um = (t) => se + `/ValueSet/$expand?filter=${encodeURIComponent(t)}`, lm = (t, e, r) => W + `/bahmni/terminologies/concepts?limit=${e}&locale=${r}&term=${t}`, dm = (t) => W + `/concept/${t}`, fm = (t, e) => {
7941
+ }, qb = im(), cm = (t) => se + `/ValueSet/${t}/$expand`, um = (t) => se + `/ValueSet/$expand?filter=${encodeURIComponent(t)}`, lm = (t, e, r) => W + `/bahmni/terminologies/concepts?limit=${e}&locale=${r}&term=${t}`, dm = (t) => W + `/concept/${t}`, fm = (t, e) => {
7942
7942
  const r = `${W}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(t)}`;
7943
7943
  return e ? `${r}&v=${encodeURIComponent(e)}` : r;
7944
- }, pm = "SHORT", hm = "FULLY_SPECIFIED", Vb = async (t, e = 20) => {
7944
+ }, pm = "SHORT", hm = "FULLY_SPECIFIED", Fb = async (t, e = 20) => {
7945
7945
  const r = an(), n = lm(t, e, r);
7946
7946
  return H(n);
7947
7947
  }, jr = async (t) => {
@@ -7951,7 +7951,7 @@ const im = () => {
7951
7951
  const e = `${um(t)}`;
7952
7952
  return H(e);
7953
7953
  };
7954
- async function Hb(t) {
7954
+ async function jb(t) {
7955
7955
  return await H(dm(t));
7956
7956
  }
7957
7957
  async function gm(t, e) {
@@ -7990,7 +7990,7 @@ const wm = (t) => se + `/AllergyIntolerance?patient=${t}&_count=100&_sort=-_last
7990
7990
  }), Cn = (t, e) => {
7991
7991
  const r = t.expansion?.contains ?? [];
7992
7992
  return bm(r).map((s) => _m(s, e));
7993
- }, Bb = async (t, e, r) => {
7993
+ }, Vb = async (t, e, r) => {
7994
7994
  const n = t ?? pt.MEDICATION.code, s = e ?? pt.FOOD.code, o = r ?? pt.ENVIRONMENT.code, [a, i, c] = await Promise.all([
7995
7995
  jr(n),
7996
7996
  jr(s),
@@ -8010,7 +8010,7 @@ const wm = (t) => se + `/AllergyIntolerance?patient=${t}&_count=100&_sort=-_last
8010
8010
  pt.ENVIRONMENT.display
8011
8011
  )
8012
8012
  ];
8013
- }, zb = async (t) => {
8013
+ }, Hb = async (t) => {
8014
8014
  const e = t ?? Em.code;
8015
8015
  return (await jr(e)).compose?.include[0]?.concept ?? [];
8016
8016
  };
@@ -8050,12 +8050,12 @@ function Sm(t) {
8050
8050
  };
8051
8051
  });
8052
8052
  }
8053
- async function Yb(t) {
8053
+ async function Bb(t) {
8054
8054
  const e = await Tm(t);
8055
8055
  return Sm(e);
8056
8056
  }
8057
8057
  var Rm = /* @__PURE__ */ ((t) => (t.Active = "Active", t.Inactive = "Inactive", t))(Rm || {}), Om = /* @__PURE__ */ ((t) => (t.mild = "mild", t.moderate = "moderate", t.severe = "severe", t))(Om || {});
8058
- function Gb(t) {
8058
+ function zb(t) {
8059
8059
  const e = t.code?.coding?.[0]?.code ?? t.id ?? "", r = t.reaction?.[0]?.severity, n = /* @__PURE__ */ new Set(), s = [];
8060
8060
  for (const o of t.reaction ?? [])
8061
8061
  for (const a of o.manifestation ?? [])
@@ -8139,7 +8139,7 @@ async function $m(t) {
8139
8139
  async function Dm(t) {
8140
8140
  return (await $m(t)).entry?.map((r) => r.resource).filter((r) => r !== void 0) ?? [];
8141
8141
  }
8142
- async function Kb(t) {
8142
+ async function Yb(t) {
8143
8143
  const r = [];
8144
8144
  let n = 0;
8145
8145
  for (; ; ) {
@@ -8160,7 +8160,7 @@ async function Cm(t) {
8160
8160
  async function Rs(t) {
8161
8161
  return (await Dm(t)).find((r) => !r.period?.end) ?? null;
8162
8162
  }
8163
- async function Wb(t, e) {
8163
+ async function Gb(t, e) {
8164
8164
  return await H(
8165
8165
  `/openmrs/ws/fhir2/R4/Encounter/${t}`,
8166
8166
  e
@@ -8169,20 +8169,20 @@ async function Wb(t, e) {
8169
8169
  async function Lm(t) {
8170
8170
  return await ge(tc, t);
8171
8171
  }
8172
- async function Jb(t, e) {
8172
+ async function Kb(t, e) {
8173
8173
  return await Ei(`${tc}/${t}`, e);
8174
8174
  }
8175
- const Qb = (t, e) => t?.length === 0 ? !1 : e?.length === 0, xm = (t) => se + `/Condition?category=${Es}&patient=${t}&_count=100&_sort=-_lastUpdated`, km = (t, e = 10, r = 0, n) => {
8175
+ const Wb = (t, e) => t?.length === 0 ? !1 : e?.length === 0, xm = (t) => se + `/Condition?category=${Es}&patient=${t}&_count=100&_sort=-_lastUpdated`, km = (t, e = 10, r = 0, n) => {
8176
8176
  const s = se + `/Condition?category=${Es}&patient=${t}&_count=${e}&_getpagesoffset=${r}&_sort=-_lastUpdated`;
8177
8177
  return n ? `${s}&clinical-status=${n}` : s;
8178
8178
  };
8179
8179
  async function Mm(t) {
8180
8180
  return await H(`${xm(t)}`);
8181
8181
  }
8182
- async function Xb(t) {
8182
+ async function Jb(t) {
8183
8183
  return (await Mm(t)).entry?.filter((n) => n.resource?.resourceType === "Condition").map((n) => n.resource) ?? [];
8184
8184
  }
8185
- async function Zb(t, e = 10, r = 1, n) {
8185
+ async function Qb(t, e = 10, r = 1, n) {
8186
8186
  const s = (r - 1) * e, o = await H(
8187
8187
  km(t, e, s, n)
8188
8188
  );
@@ -8207,7 +8207,7 @@ function Oo(t, e, r, n) {
8207
8207
  practitionerUUIDs: n ? [n] : void 0
8208
8208
  });
8209
8209
  }
8210
- async function e_(t, e, r = !1, n, s, o) {
8210
+ async function Xb(t, e, r = !1, n, s, o) {
8211
8211
  const a = {
8212
8212
  ...t,
8213
8213
  category: [
@@ -8375,11 +8375,11 @@ function Ym(t) {
8375
8375
  }
8376
8376
  return Array.from(e.values());
8377
8377
  }
8378
- async function t_(t) {
8378
+ async function Zb(t) {
8379
8379
  const e = await Vm(t), r = rc(e);
8380
8380
  return Ym(r);
8381
8381
  }
8382
- async function r_(t, e = 10, r = 1) {
8382
+ async function e_(t, e = 10, r = 1) {
8383
8383
  const n = (r - 1) * e, s = await Hm(
8384
8384
  t,
8385
8385
  e,
@@ -8405,7 +8405,7 @@ const Ut = {
8405
8405
  }, Km = (t, e, r) => {
8406
8406
  let s = `${se + "/MedicationRequest?" + Ut.SORT + "&" + Ut.COUNT + "&" + Ut.INCLUDE_MEDICATION}&patient=${t}`;
8407
8407
  return e && (s += `&code=${e}`), r && (s += `&encounter=${r}`), s;
8408
- }, Wm = W + "/bahmnicore/config/drugOrders", Jm = (t, e) => se + `/Medication?name=${encodeURIComponent(t)}&_count=${e}&_sort=-_lastUpdated`, Qm = se + "/Medication?code=http://hl7.org/fhir/sid/cvx|&_count=100", n_ = "medication", Xm = (t) => {
8408
+ }, Wm = W + "/bahmnicore/config/drugOrders", Jm = (t, e) => se + `/Medication?name=${encodeURIComponent(t)}&_count=${e}&_sort=-_lastUpdated`, Qm = se + "/Medication?code=http://hl7.org/fhir/sid/cvx|&_count=100", t_ = "medication", Xm = (t) => {
8409
8409
  switch (t.status) {
8410
8410
  case "active":
8411
8411
  return Be.Active;
@@ -8562,7 +8562,7 @@ function lg(t) {
8562
8562
  });
8563
8563
  }
8564
8564
  const Ao = (t) => t.priority === "stat";
8565
- async function s_(t, e, r, n = !1) {
8565
+ async function r_(t, e, r, n = !1) {
8566
8566
  const s = await Zm(
8567
8567
  t,
8568
8568
  e,
@@ -8571,21 +8571,21 @@ async function s_(t, e, r, n = !1) {
8571
8571
  );
8572
8572
  return lg(s);
8573
8573
  }
8574
- async function o_() {
8574
+ async function n_() {
8575
8575
  return await H(
8576
8576
  Wm
8577
8577
  );
8578
8578
  }
8579
- async function a_(t, e = 20) {
8579
+ async function s_(t, e = 20) {
8580
8580
  return await H(
8581
8581
  Jm(t, e)
8582
8582
  );
8583
8583
  }
8584
- async function i_() {
8584
+ async function o_() {
8585
8585
  return await H(Qm);
8586
8586
  }
8587
8587
  const dg = (t) => `${se}/Medication/${t}`;
8588
- async function c_(t) {
8588
+ async function a_(t) {
8589
8589
  return await H(dg(t));
8590
8590
  }
8591
8591
  const fg = 200, pg = (t, e, r, n, s) => {
@@ -8605,7 +8605,7 @@ async function Jt(t, e, r, n, s) {
8605
8605
  );
8606
8606
  }
8607
8607
  const hg = (t) => `${se}/ImagingStudy/${t}/$fetch-quality-assessment`;
8608
- async function u_(t, e, r, n) {
8608
+ async function i_(t, e, r, n) {
8609
8609
  return await Jt(
8610
8610
  e,
8611
8611
  t,
@@ -8613,7 +8613,7 @@ async function u_(t, e, r, n) {
8613
8613
  n
8614
8614
  );
8615
8615
  }
8616
- async function l_(t, e, r, n) {
8616
+ async function c_(t, e, r, n) {
8617
8617
  return await Jt(
8618
8618
  e,
8619
8619
  t,
@@ -8622,7 +8622,7 @@ async function l_(t, e, r, n) {
8622
8622
  "ImagingStudy:basedon"
8623
8623
  );
8624
8624
  }
8625
- async function d_(t, e, r, n) {
8625
+ async function u_(t, e, r, n) {
8626
8626
  return (await Jt(
8627
8627
  e,
8628
8628
  t,
@@ -8630,10 +8630,10 @@ async function d_(t, e, r, n) {
8630
8630
  n
8631
8631
  )).entry?.filter((a) => a.resource?.resourceType === "ServiceRequest").map((a) => a.resource) ?? [];
8632
8632
  }
8633
- async function f_(t) {
8633
+ async function l_(t) {
8634
8634
  return await H(hg(t));
8635
8635
  }
8636
- async function p_(t, e, r, n) {
8636
+ async function d_(t, e, r, n) {
8637
8637
  return await Jt(
8638
8638
  e,
8639
8639
  t,
@@ -8645,29 +8645,29 @@ const mg = (t, e) => {
8645
8645
  const r = `${se}/DiagnosticReport?patient=${t}`;
8646
8646
  return e ? `${r}&based-on=${e}` : r;
8647
8647
  }, gg = (t) => `${se}/DiagnosticReport/${t}/$fetch-bundle`, yg = (t) => `${se}/DiagnosticReport/${t}/$update-bundle`;
8648
- async function h_(t, e = []) {
8648
+ async function f_(t, e = []) {
8649
8649
  const r = e.length > 0 ? e.join(",") : void 0, n = mg(t, r);
8650
8650
  return await H(n);
8651
8651
  }
8652
- async function m_(t) {
8652
+ async function p_(t) {
8653
8653
  const e = gg(t);
8654
8654
  return await H(e);
8655
8655
  }
8656
- async function g_(t, e) {
8656
+ async function h_(t, e) {
8657
8657
  const r = yg(t);
8658
8658
  return await ge(r, e);
8659
8659
  }
8660
- const y_ = [
8660
+ const m_ = [
8661
8661
  "preliminary",
8662
8662
  "final",
8663
8663
  "amended",
8664
8664
  "corrected",
8665
8665
  "appended"
8666
- ], w_ = [
8666
+ ], g_ = [
8667
8667
  "registered",
8668
8668
  "unknown",
8669
8669
  "partial"
8670
- ], wg = "All Orderables", Eg = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", bg = "LabSet", _g = "http://fhir.bahmni.org/ext/ValueSet/concept-class", E_ = ["orderTypes"], vg = async () => await mm(wg), Os = async () => await H(Eg), Tg = (t) => {
8670
+ ], wg = "All Orderables", Eg = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", bg = "LabSet", _g = "http://fhir.bahmni.org/ext/ValueSet/concept-class", y_ = ["orderTypes"], vg = async () => await mm(wg), Os = async () => await H(Eg), Tg = (t) => {
8671
8671
  let e = t.display ?? "Unknown investigation";
8672
8672
  return nc(t) === bg && (e += ` (${de.t("INVESTIGATION_PANEL")})`), e;
8673
8673
  }, Sg = (t) => {
@@ -8699,12 +8699,12 @@ const y_ = [
8699
8699
  });
8700
8700
  });
8701
8701
  }), r;
8702
- }, b_ = async () => {
8702
+ }, w_ = async () => {
8703
8703
  const t = await vg(), e = await Os();
8704
8704
  return Rg(t, Sg(e));
8705
- }, __ = async (t) => t ? (await Os()).results.find(
8705
+ }, E_ = async (t) => t ? (await Os()).results.find(
8706
8706
  (n) => n.display.toLowerCase() === t.toLowerCase()
8707
- )?.uuid ?? null : null, v_ = async () => (await Os()).results.map((e) => e.display), T_ = async (t, e, r) => {
8707
+ )?.uuid ?? null : null, b_ = async () => (await Os()).results.map((e) => e.display), __ = async (t, e, r) => {
8708
8708
  const n = [];
8709
8709
  for (const s of t) {
8710
8710
  const o = s.uuid;
@@ -13254,19 +13254,19 @@ var Dy = $y();
13254
13254
  const Cy = /* @__PURE__ */ Og(Dy), ja = {
13255
13255
  CONFIG_NOT_FOUND: "CONFIG_ERROR_NOT_FOUND",
13256
13256
  VALIDATION_FAILED: "CONFIG_ERROR_VALIDATION_FAILED"
13257
- }, S_ = async (t, e) => {
13257
+ }, v_ = async (t, e) => {
13258
13258
  const r = await Ly(t);
13259
13259
  if (!r)
13260
13260
  throw new Error(ja.CONFIG_NOT_FOUND);
13261
13261
  if (!await xy(r, e))
13262
13262
  throw new Error(ja.VALIDATION_FAILED);
13263
13263
  return r;
13264
- }, Ly = async (t) => await H(t), xy = async (t, e) => new Cy().compile(e)(t), R_ = async () => {
13264
+ }, Ly = async (t) => await H(t), xy = async (t, e) => new Cy().compile(e)(t), T_ = async () => {
13265
13265
  await bi(ys), ql.forEach((t) => Cd(t)), globalThis.location.href = mi;
13266
13266
  }, ky = (t) => W + `/form/${t}?v=custom:(uuid,name,version,published,resources:(value))`, My = (t) => {
13267
13267
  const e = W + "/bahmniie/form/latestPublishedForms";
13268
13268
  return t ? e + `?episodeUuid=${t}` : e;
13269
- }, O_ = (t) => W + `/user/${t}?v=full`, Uy = (t, e, r, n) => W + `/bahmniie/form/translations?formName=${encodeURIComponent(t)}&formUuid=${e}&formVersion=${r}&locale=${n}`, Vr = "Bahmni", qy = (t) => W + `/form?q=${encodeURIComponent(t)}&v=custom:(uuid,name,version,published,auditInfo:(dateCreated))`, Fy = (t, e, r) => {
13269
+ }, S_ = (t) => W + `/user/${t}?v=full`, Uy = (t, e, r, n) => W + `/bahmniie/form/translations?formName=${encodeURIComponent(t)}&formUuid=${e}&formVersion=${r}&locale=${n}`, Vr = "Bahmni", qy = (t) => W + `/form?q=${encodeURIComponent(t)}&v=custom:(uuid,name,version,published,auditInfo:(dateCreated))`, Fy = (t, e, r) => {
13270
13270
  let s = W + "/bahmnicore/patient/" + t + "/forms";
13271
13271
  return r ? s += `?patientProgramUuid=${r}` : e && (s += `?numberOfVisits=${e}`), s;
13272
13272
  }, dc = (t, e, r, n) => {
@@ -13281,23 +13281,23 @@ async function Vy(t, e, r) {
13281
13281
  const n = dc(t, e, r);
13282
13282
  return await H(n);
13283
13283
  }
13284
- async function A_(t, e) {
13284
+ async function R_(t, e) {
13285
13285
  const r = dc(t, e, void 0, !0);
13286
13286
  return await H(r);
13287
13287
  }
13288
- async function P_(t, e, r) {
13288
+ async function O_(t, e, r) {
13289
13289
  return (await Vy(
13290
13290
  t,
13291
13291
  e,
13292
13292
  r
13293
13293
  )).entry?.filter((o) => o.resource?.resourceType === "Observation").map((o) => o.resource) ?? [];
13294
13294
  }
13295
- async function N_(t) {
13295
+ async function A_(t) {
13296
13296
  return await H(
13297
13297
  jy(t)
13298
13298
  );
13299
13299
  }
13300
- const Hy = (t) => t.split("/").pop() ?? "", I_ = (t, e) => {
13300
+ const Hy = (t) => t.split("/").pop() ?? "", P_ = (t, e) => {
13301
13301
  const r = /* @__PURE__ */ new Map(), n = e.entry?.filter((o) => o.resource?.resourceType === "Encounter").map((o) => o.resource) ?? [], s = /* @__PURE__ */ new Map();
13302
13302
  return n.forEach((o) => {
13303
13303
  o.id && s.set(o.id, o);
@@ -13321,13 +13321,13 @@ const Hy = (t) => t.split("/").pop() ?? "", I_ = (t, e) => {
13321
13321
  (o, a) => a.encounterDateTime - o.encounterDateTime
13322
13322
  );
13323
13323
  }, fc = (t) => W + `/provider?user=${t}&v=custom:(uuid,display,person,attributes)`, By = W + "/provider?v=custom:(uuid,display,person,attributes)";
13324
- async function $_(t) {
13324
+ async function N_(t) {
13325
13325
  const e = await H(
13326
13326
  fc(t)
13327
13327
  );
13328
13328
  return !e.results || e.results.length === 0 ? null : e.results[0];
13329
13329
  }
13330
- async function D_() {
13330
+ async function I_() {
13331
13331
  const t = [];
13332
13332
  let e = By;
13333
13333
  for (; e; ) {
@@ -13336,7 +13336,7 @@ async function D_() {
13336
13336
  }
13337
13337
  return t;
13338
13338
  }
13339
- async function C_(t) {
13339
+ async function $_(t) {
13340
13340
  const e = await H(fc(t));
13341
13341
  if (!e.results || e.results.length === 0)
13342
13342
  return [];
@@ -13345,7 +13345,7 @@ async function C_(t) {
13345
13345
  (n) => !n.voided && n.attributeType.display === "Login Locations"
13346
13346
  ).map((n) => n.value) : [];
13347
13347
  }
13348
- const zy = se + "/Encounter", Yy = W + "/systemsetting/bahmni.encountersession.duration", L_ = {
13348
+ const zy = se + "/Encounter", Yy = W + "/systemsetting/bahmni.encountersession.duration", D_ = {
13349
13349
  MATCHED: "ENCOUNTER_MATCH_REASON_MATCHED",
13350
13350
  NO_ACTIVE_VISIT: "ENCOUNTER_MATCH_REASON_NO_ACTIVE_VISIT",
13351
13351
  NO_ACTIVE_ENCOUNTER: "ENCOUNTER_MATCH_REASON_NO_ACTIVE_ENCOUNTER",
@@ -13383,7 +13383,7 @@ async function Gy(t, e) {
13383
13383
  return null;
13384
13384
  }
13385
13385
  }
13386
- async function x_(t, e, r, n) {
13386
+ async function C_(t, e, r, n) {
13387
13387
  try {
13388
13388
  if (!t) return null;
13389
13389
  const s = r ?? await pc(), a = `ge${new Date(Date.now() - s * 60 * 1e3).toISOString()}`, i = {
@@ -13420,7 +13420,7 @@ function zn(t) {
13420
13420
  return new Date(r.period?.start ?? 0).getTime() - n;
13421
13421
  });
13422
13422
  }
13423
- async function k_(t, e, r, n) {
13423
+ async function L_(t, e, r, n) {
13424
13424
  try {
13425
13425
  const s = await Rs(t);
13426
13426
  if (!s?.id)
@@ -13485,7 +13485,7 @@ async function k_(t, e, r, n) {
13485
13485
  };
13486
13486
  }
13487
13487
  }
13488
- function M_(t) {
13488
+ function x_(t) {
13489
13489
  return t.matched || t.reasons.includes("LOCATION_MISMATCH") && !t.reasons.includes("SESSION_EXPIRED") && !t.reasons.includes("PROVIDER_MISMATCH");
13490
13490
  }
13491
13491
  const hc = {
@@ -13511,7 +13511,7 @@ function Wy(t) {
13511
13511
  function Jy() {
13512
13512
  return Ht;
13513
13513
  }
13514
- function U_(t) {
13514
+ function k_(t) {
13515
13515
  const e = t.reasons.some(
13516
13516
  (r) => Ky.includes(r)
13517
13517
  );
@@ -13522,20 +13522,20 @@ function U_(t) {
13522
13522
  isLoading: !1
13523
13523
  }, $s();
13524
13524
  }
13525
- function q_(t) {
13525
+ function M_(t) {
13526
13526
  Ht = { ...Ht, isLoading: t }, $s();
13527
13527
  }
13528
- function F_() {
13528
+ function U_() {
13529
13529
  Ht = { ...hc }, $s();
13530
13530
  }
13531
- function j_() {
13531
+ function q_() {
13532
13532
  return Oc(
13533
13533
  Wy,
13534
13534
  Jy
13535
13535
  );
13536
13536
  }
13537
13537
  const Qy = (t) => se + `/EpisodeOfCare?_revinclude=Encounter:episode-of-care&_id=${t}`;
13538
- async function V_(t) {
13538
+ async function F_(t) {
13539
13539
  const e = t.join(","), r = await H(Qy(e));
13540
13540
  if (r.total === 0)
13541
13541
  throw new Error(
@@ -13571,14 +13571,14 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13571
13571
  module: n
13572
13572
  };
13573
13573
  return await ge(yf, a), { logged: !0 };
13574
- }, H_ = () => gf(async (e) => {
13574
+ }, j_ = () => gf(async (e) => {
13575
13575
  await ew(
13576
13576
  e.patientUuid,
13577
13577
  e.eventType,
13578
13578
  e.messageParams,
13579
13579
  e.module
13580
13580
  );
13581
- }), B_ = async () => {
13581
+ }), V_ = async () => {
13582
13582
  try {
13583
13583
  const t = await H(ys);
13584
13584
  return t.user ? t.user.privileges : null;
@@ -13586,7 +13586,7 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13586
13586
  const { message: e } = Yr(t);
13587
13587
  throw new Error(e);
13588
13588
  }
13589
- }, z_ = (t, e) => {
13589
+ }, H_ = (t, e) => {
13590
13590
  if (!t || t.length === 0)
13591
13591
  return !1;
13592
13592
  if (!e || e.length === 0)
@@ -13626,12 +13626,12 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13626
13626
  editable: n.editable
13627
13627
  }))
13628
13628
  };
13629
- }, Y_ = async (t) => {
13629
+ }, B_ = async (t) => {
13630
13630
  const e = await tw(t), r = an();
13631
13631
  return e.map(
13632
13632
  (n) => nw(n, r)
13633
13633
  );
13634
- }, G_ = async (t) => {
13634
+ }, z_ = async (t) => {
13635
13635
  const e = await fetch(ky(t));
13636
13636
  if (!e.ok)
13637
13637
  throw new Error(
@@ -13665,7 +13665,7 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13665
13665
  schema: n,
13666
13666
  translations: u
13667
13667
  };
13668
- }, K_ = async (t, e, r) => {
13668
+ }, Y_ = async (t, e, r) => {
13669
13669
  const n = await fetch(qy(t));
13670
13670
  if (!n.ok) return null;
13671
13671
  const s = await n.json(), a = (Array.isArray(s.results) ? s.results : []).filter(
@@ -13687,7 +13687,7 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13687
13687
  (u) => new Date(u.auditInfo.dateCreated).getTime() <= r
13688
13688
  );
13689
13689
  return c.length === 0 ? i[0].uuid : c.at(-1).uuid;
13690
- }, W_ = async (t, e, r) => {
13690
+ }, G_ = async (t, e, r) => {
13691
13691
  let n;
13692
13692
  e && e.length > 0 && (n = e.join(","));
13693
13693
  const s = Fy(t, r, n), o = await H(s);
@@ -13732,7 +13732,7 @@ function yc(t, e) {
13732
13732
  };
13733
13733
  return n(r.controls);
13734
13734
  }
13735
- function J_(t, e) {
13735
+ function K_(t, e) {
13736
13736
  if (!t.controls || t.controls.length === 0)
13737
13737
  return [];
13738
13738
  const r = [], n = (/* @__PURE__ */ new Date()).toISOString();
@@ -13777,7 +13777,7 @@ function J_(t, e) {
13777
13777
  s.interpretation && (a.interpretation = s.interpretation), s.comment && (a.comment = s.comment), r.push(a);
13778
13778
  }), r;
13779
13779
  }
13780
- function Q_(t, e) {
13780
+ function W_(t, e) {
13781
13781
  if (!t || t.length === 0)
13782
13782
  return {
13783
13783
  controls: [],
@@ -13813,7 +13813,7 @@ function Q_(t, e) {
13813
13813
  function sw(t) {
13814
13814
  return t == null ? null : typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "object" ? t : null;
13815
13815
  }
13816
- function X_(t) {
13816
+ function J_(t) {
13817
13817
  const e = (n) => {
13818
13818
  const s = n.concept, o = typeof s == "object" && s !== null && "uuid" in s ? s.uuid : s, a = typeof s == "object" && s !== null && "datatype" in s ? s.datatype : void 0, i = {
13819
13819
  concept: {
@@ -13829,11 +13829,11 @@ function X_(t) {
13829
13829
  };
13830
13830
  return (t?.filter((n) => n.uuid && n.voided ? !0 : !(!n.uuid && n.voided || n.value && typeof n.value == "string" && n.value.endsWith("voided"))) ?? []).map(e);
13831
13831
  }
13832
- function Z_(t) {
13832
+ function Q_(t) {
13833
13833
  if (!(!t || typeof t != "object"))
13834
13834
  return "toJS" in t && typeof t.toJS == "function" ? t.toJS() : t;
13835
13835
  }
13836
- function ev(t, e) {
13836
+ function X_(t, e) {
13837
13837
  !t || !Array.isArray(t.children) || t.children.forEach((r) => {
13838
13838
  r && typeof r == "object" && wc(
13839
13839
  r,
@@ -13863,24 +13863,7 @@ function wc(t, e) {
13863
13863
  );
13864
13864
  });
13865
13865
  }
13866
- function ow(t) {
13867
- const e = t.value && typeof t.value == "object" ? t.value : null;
13868
- if (!e)
13869
- return t.value === null || t.value === void 0 || t.value === "";
13870
- const r = e.value;
13871
- if (r != null && r !== "")
13872
- return !1;
13873
- const n = e.concept;
13874
- return n != null ? Array.isArray(n) ? n.length === 0 : !1 : !0;
13875
- }
13876
- function aw(t) {
13877
- if (!t || typeof t != "object") return !1;
13878
- const e = t.children, r = Array.isArray(e) && e.length > 0, s = t.control?.properties;
13879
- return !r && s?.mandatory === !0 && !t.hidden && !t.voided && ow(t) ? !0 : t.hidden || t.voided ? !1 : r ? e.some(
13880
- (o) => o && typeof o == "object" && aw(o)
13881
- ) : !1;
13882
- }
13883
- const iw = W + "/bahmnicore/diseaseSummaryData?", tv = async (t, e, r, n) => {
13866
+ const ow = W + "/bahmnicore/diseaseSummaryData?", Z_ = async (t, e, r, n) => {
13884
13867
  const s = new URLSearchParams({
13885
13868
  groupBy: n,
13886
13869
  latestCount: e.toString(),
@@ -13889,17 +13872,17 @@ const iw = W + "/bahmnicore/diseaseSummaryData?", tv = async (t, e, r, n) => {
13889
13872
  r.forEach((a) => {
13890
13873
  s.append("obsConcepts", a);
13891
13874
  });
13892
- const o = iw + s.toString();
13875
+ const o = ow + s.toString();
13893
13876
  return H(o);
13894
- }, Ds = "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)", cw = (t) => `${W}/bahmniprogramenrollment?patient=${t}&v=${Ds}`, uw = (t, e = 15, r = 0) => `${W}/bahmniprogramenrollment?patient=${t}&v=${Ds}&limit=${e}&startIndex=${r}&totalCount=true`, Ec = (t) => `${W}/bahmniprogramenrollment/${t}`, lw = (t) => `${Ec(t)}?v=${Ds}`, rv = async (t) => await H(cw(t)), nv = async (t, e = 15, r = 1) => {
13877
+ }, Ds = "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)", aw = (t) => `${W}/bahmniprogramenrollment?patient=${t}&v=${Ds}`, iw = (t, e = 15, r = 0) => `${W}/bahmniprogramenrollment?patient=${t}&v=${Ds}&limit=${e}&startIndex=${r}&totalCount=true`, Ec = (t) => `${W}/bahmniprogramenrollment/${t}`, cw = (t) => `${Ec(t)}?v=${Ds}`, ev = async (t) => await H(aw(t)), tv = async (t, e = 15, r = 1) => {
13895
13878
  const n = (r - 1) * e, s = await H(
13896
- uw(t, e, n)
13879
+ iw(t, e, n)
13897
13880
  );
13898
13881
  return {
13899
13882
  programs: s.results,
13900
13883
  total: s.totalCount
13901
13884
  };
13902
- }, sv = async (t) => await H(lw(t)), ov = async (t, e) => {
13885
+ }, rv = async (t) => await H(cw(t)), nv = async (t, e) => {
13903
13886
  const r = {
13904
13887
  uuid: t,
13905
13888
  states: [
@@ -13913,7 +13896,7 @@ const iw = W + "/bahmnicore/diseaseSummaryData?", tv = async (t, e, r, n) => {
13913
13896
  r
13914
13897
  );
13915
13898
  };
13916
- function av(t) {
13899
+ function sv(t) {
13917
13900
  if (t.states.length === 0)
13918
13901
  return null;
13919
13902
  let e;
@@ -13929,7 +13912,7 @@ function av(t) {
13929
13912
  e = t.states.find((r) => r.endDate === null);
13930
13913
  return e ? ym(e.state.concept.names) ?? e.state.concept.display : null;
13931
13914
  }
13932
- function iv(t, e) {
13915
+ function ov(t, e) {
13933
13916
  if (e.length === 0)
13934
13917
  return {};
13935
13918
  const r = {};
@@ -13941,12 +13924,12 @@ function iv(t, e) {
13941
13924
  }
13942
13925
  return r;
13943
13926
  }
13944
- const as = "consultation:saved", cv = (t) => {
13927
+ const as = "consultation:saved", av = (t) => {
13945
13928
  const e = new CustomEvent(as, {
13946
13929
  detail: t
13947
13930
  });
13948
13931
  window.dispatchEvent(e);
13949
- }, uv = (t, e = []) => {
13932
+ }, iv = (t, e = []) => {
13950
13933
  const r = qt(t);
13951
13934
  nt(() => {
13952
13935
  r.current = t;
@@ -13959,17 +13942,17 @@ const as = "consultation:saved", cv = (t) => {
13959
13942
  window.removeEventListener(as, n);
13960
13943
  };
13961
13944
  }, e);
13962
- }, is = "cdss:check", cs = "cdss:results", lv = (t) => {
13945
+ }, is = "cdss:check", cs = "cdss:results", cv = (t) => {
13963
13946
  const e = new CustomEvent(is, {
13964
13947
  detail: t
13965
13948
  });
13966
13949
  globalThis.dispatchEvent(e);
13967
- }, dv = (t) => {
13950
+ }, uv = (t) => {
13968
13951
  const e = new CustomEvent(cs, {
13969
13952
  detail: t
13970
13953
  });
13971
13954
  globalThis.dispatchEvent(e);
13972
- }, fv = (t) => {
13955
+ }, lv = (t) => {
13973
13956
  const e = qt(t);
13974
13957
  nt(() => {
13975
13958
  e.current = t;
@@ -13982,7 +13965,7 @@ const as = "consultation:saved", cv = (t) => {
13982
13965
  globalThis.removeEventListener(is, r);
13983
13966
  };
13984
13967
  }, []);
13985
- }, pv = (t) => {
13968
+ }, dv = (t) => {
13986
13969
  const e = qt(t);
13987
13970
  nt(() => {
13988
13971
  e.current = t;
@@ -13995,17 +13978,17 @@ const as = "consultation:saved", cv = (t) => {
13995
13978
  globalThis.removeEventListener(cs, r);
13996
13979
  };
13997
13980
  }, []);
13998
- }, dw = `${se}/DocumentReference`, fw = "bahmni.documentUpload.maxFileSizeInMB", pw = `${W}/systemsetting?q=${fw}&v=custom:(property,value)`, bc = (t, e, r = 100, n = 0) => {
13981
+ }, uw = `${se}/DocumentReference`, lw = "bahmni.documentUpload.maxFileSizeInMB", dw = `${W}/systemsetting?q=${lw}&v=custom:(property,value)`, bc = (t, e, r = 100, n = 0) => {
13999
13982
  const s = `${se}/DocumentReference?patient=${t}&_sort=-_lastUpdated&_count=${r}&_getpagesoffset=${n}`;
14000
13983
  return e && e.length > 0 ? `${s}&encounter=${encodeURIComponent(e.join(","))}` : s;
14001
13984
  };
14002
- async function hv() {
13985
+ async function fv() {
14003
13986
  const t = await H(
14004
- pw
13987
+ dw
14005
13988
  ), e = Number(t.results?.[0]?.value);
14006
13989
  return Number.isFinite(e) && e > 0 ? e : void 0;
14007
13990
  }
14008
- async function mv(t) {
13991
+ async function pv(t) {
14009
13992
  return ((await gm(t, "custom:(setMembers:(uuid,display))"))?.setMembers ?? []).map((n) => ({
14010
13993
  id: n.uuid,
14011
13994
  label: n.display ?? ""
@@ -14028,17 +14011,17 @@ function _c(t) {
14028
14011
  };
14029
14012
  });
14030
14013
  }
14031
- async function hw(t, e) {
14014
+ async function fw(t, e) {
14032
14015
  const r = bc(t, e);
14033
14016
  return H(r);
14034
14017
  }
14035
- async function gv(t, e) {
14036
- const n = ((await hw(t, e)).entry ?? []).filter(
14018
+ async function hv(t, e) {
14019
+ const n = ((await fw(t, e)).entry ?? []).filter(
14037
14020
  (s) => !!s.resource
14038
14021
  );
14039
14022
  return _c(n);
14040
14023
  }
14041
- async function yv(t, e, r = 10, n = 1) {
14024
+ async function mv(t, e, r = 10, n = 1) {
14042
14025
  const s = (n - 1) * r, o = bc(
14043
14026
  t,
14044
14027
  e,
@@ -14078,7 +14061,7 @@ function vc(t, e) {
14078
14061
  }
14079
14062
  ]), r;
14080
14063
  }
14081
- function mw(t, e, r, n, s, o) {
14064
+ function pw(t, e, r, n, s, o) {
14082
14065
  const a = {
14083
14066
  resourceType: "Encounter",
14084
14067
  status: "finished",
@@ -14123,16 +14106,16 @@ function mw(t, e, r, n, s, o) {
14123
14106
  }
14124
14107
  ]), a;
14125
14108
  }
14126
- async function gw(t) {
14109
+ async function hw(t) {
14127
14110
  const e = vc(
14128
14111
  t,
14129
14112
  `Encounter/${t.encounterUuid}`
14130
14113
  );
14131
- return ge(dw, e);
14114
+ return ge(uw, e);
14132
14115
  }
14133
- async function wv(t) {
14116
+ async function gv(t) {
14134
14117
  if (t.encounterUuid)
14135
- return gw({
14118
+ return hw({
14136
14119
  ...t,
14137
14120
  encounterUuid: t.encounterUuid
14138
14121
  });
@@ -14140,7 +14123,7 @@ async function wv(t) {
14140
14123
  throw new Error(
14141
14124
  "saveDocument requires either encounterUuid or createEncounterInVisit"
14142
14125
  );
14143
- const { visitUuid: e, encounterTypeUuid: r, encounterTypeDisplay: n } = t.createEncounterInVisit, s = `urn:uuid:${Qr()}`, o = mw(
14126
+ const { visitUuid: e, encounterTypeUuid: r, encounterTypeDisplay: n } = t.createEncounterInVisit, s = `urn:uuid:${Qr()}`, o = pw(
14144
14127
  t.patientUuid,
14145
14128
  e,
14146
14129
  r,
@@ -14153,27 +14136,27 @@ async function wv(t) {
14153
14136
  ]);
14154
14137
  return ge(ns, i);
14155
14138
  }
14156
- const yw = (t) => `${W}/location?operator=ALL&s=byTags&tags=${encodeURIComponent(t)}&v=custom:(uuid,display,childLocations:(uuid,display,retired))`, ww = (t) => `${se}/Location?_tag=${encodeURIComponent(t)}`;
14157
- async function Ev(t) {
14158
- return (await H(yw(t))).results ?? [];
14139
+ const mw = (t) => `${W}/location?operator=ALL&s=byTags&tags=${encodeURIComponent(t)}&v=custom:(uuid,display,childLocations:(uuid,display,retired))`, gw = (t) => `${se}/Location?_tag=${encodeURIComponent(t)}`;
14140
+ async function yv(t) {
14141
+ return (await H(mw(t))).results ?? [];
14159
14142
  }
14160
- async function bv(t) {
14161
- return await H(ww(t));
14143
+ async function wv(t) {
14144
+ return await H(gw(t));
14162
14145
  }
14163
- const Ew = se + "/Immunization", bw = (t, e) => {
14164
- let r = `${Ew}?patient=${t}&_sort=-date&_count=100`;
14146
+ const yw = se + "/Immunization", ww = (t, e) => {
14147
+ let r = `${yw}?patient=${t}&_sort=-date&_count=100`;
14165
14148
  return e && (r += `&status=${e}`), r;
14166
14149
  };
14167
- async function _v(t, e) {
14168
- return (await _w(t, e)).entry?.filter((n) => n.resource?.resourceType === "Immunization").map((n) => n.resource) ?? [];
14150
+ async function Ev(t, e) {
14151
+ return (await Ew(t, e)).entry?.filter((n) => n.resource?.resourceType === "Immunization").map((n) => n.resource) ?? [];
14169
14152
  }
14170
- async function _w(t, e) {
14153
+ async function Ew(t, e) {
14171
14154
  return H(
14172
- bw(t, e)
14155
+ ww(t, e)
14173
14156
  );
14174
14157
  }
14175
- const vw = W + "/bahmnicore/visitDocument/uploadDocument", Tw = "application";
14176
- async function Sw(t) {
14158
+ const bw = W + "/bahmnicore/visitDocument/uploadDocument", _w = "application";
14159
+ async function vw(t) {
14177
14160
  return new Promise((e, r) => {
14178
14161
  const n = new FileReader();
14179
14162
  n.onload = () => {
@@ -14186,7 +14169,7 @@ async function Sw(t) {
14186
14169
  let a = o, i = "";
14187
14170
  const c = o.lastIndexOf(".");
14188
14171
  c !== -1 && (a = o.substring(0, c), i = o.substring(c + 1).toLowerCase());
14189
- const u = t.type ? t.type.split("/")[0] : Tw;
14172
+ const u = t.type ? t.type.split("/")[0] : _w;
14190
14173
  e({
14191
14174
  content: s,
14192
14175
  fileName: a,
@@ -14198,8 +14181,8 @@ async function Sw(t) {
14198
14181
  }, n.readAsDataURL(t);
14199
14182
  });
14200
14183
  }
14201
- async function vv(t, e, r) {
14202
- const n = await Sw(t), s = {
14184
+ async function bv(t, e, r) {
14185
+ const n = await vw(t), s = {
14203
14186
  content: n.content,
14204
14187
  encounterTypeName: e,
14205
14188
  fileName: n.fileName,
@@ -14207,29 +14190,29 @@ async function vv(t, e, r) {
14207
14190
  format: n.format,
14208
14191
  patientUuid: r
14209
14192
  };
14210
- return ge(vw, s);
14193
+ return ge(bw, s);
14211
14194
  }
14212
- const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow = (t) => Array.isArray(t) ? t : Object.values(t), Aw = async (t = "home") => {
14195
+ const Tw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Sw = (t) => Array.isArray(t) ? t : Object.values(t), Rw = async (t = "home") => {
14213
14196
  try {
14214
- const e = `${Rw}/${t}/v2/extension.json`, r = await fetch(e);
14197
+ const e = `${Tw}/${t}/v2/extension.json`, r = await fetch(e);
14215
14198
  if (!r.ok)
14216
14199
  throw new Error(`Failed to load base extensions: ${r.status}`);
14217
- return Ow(await r.json());
14200
+ return Sw(await r.json());
14218
14201
  } catch (e) {
14219
14202
  throw console.error("Error fetching module extensions:", e), e;
14220
14203
  }
14221
- }, Pw = (t, e = Tc, r = "link") => t.filter((n) => {
14204
+ }, Ow = (t, e = Tc, r = "link") => t.filter((n) => {
14222
14205
  const s = n.extensionPointId === e, o = r === "all" || n.type === r;
14223
14206
  return s && o;
14224
- }), Nw = (t, e) => e === void 0 ? t : t.filter((r) => r.requiredPrivilege ? e.includes(r.requiredPrivilege) : !0), Iw = (t) => {
14207
+ }), Aw = (t, e) => e === void 0 ? t : t.filter((r) => r.requiredPrivilege ? e.includes(r.requiredPrivilege) : !0), Pw = (t) => {
14225
14208
  const e = navigator.onLine;
14226
14209
  return t.filter((r) => !(r.exclusiveOnlineModule && !e || r.exclusiveOfflineModule && e));
14227
- }, $w = (t) => [...t].sort((e, r) => (e.order ?? 0) - (r.order ?? 0)), Tv = async (t = Tc, e) => {
14228
- const r = await Aw("home"), n = Pw(r, t), s = Nw(n, e), o = Iw(s);
14229
- return $w(o);
14230
- }, Dw = (t, e) => W + `/availableStocks?productUuid=${t}&locationUuid=${e}`, Sv = async (t, e) => await H(
14231
- Dw(t, e)
14232
- ), Cw = (t, e, r) => {
14210
+ }, Nw = (t) => [...t].sort((e, r) => (e.order ?? 0) - (r.order ?? 0)), _v = async (t = Tc, e) => {
14211
+ const r = await Rw("home"), n = Ow(r, t), s = Aw(n, e), o = Pw(s);
14212
+ return Nw(o);
14213
+ }, Iw = (t, e) => W + `/availableStocks?productUuid=${t}&locationUuid=${e}`, vv = async (t, e) => await H(
14214
+ Iw(t, e)
14215
+ ), $w = (t, e, r) => {
14233
14216
  const n = t.find((o) => o.server === e);
14234
14217
  if (!n)
14235
14218
  throw new Error(`CDSS server "${e}" not found in configuration`);
@@ -14241,7 +14224,7 @@ const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow =
14241
14224
  `CDSS service "${r}" not found in server "${e}"`
14242
14225
  );
14243
14226
  return { serverConfig: n, serviceConfig: s };
14244
- }, Lw = (t, e) => {
14227
+ }, Dw = (t, e) => {
14245
14228
  if (!e || e.length === 0)
14246
14229
  return {};
14247
14230
  const r = {};
@@ -14255,8 +14238,8 @@ const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow =
14255
14238
  entry: s
14256
14239
  });
14257
14240
  }), r;
14258
- }, Rv = async (t, e, r, n) => {
14259
- const s = Cw(t, e.server, e.service), { serverConfig: o, serviceConfig: a } = s, i = Lw(
14241
+ }, Tv = async (t, e, r, n) => {
14242
+ const s = $w(t, e.server, e.service), { serverConfig: o, serviceConfig: a } = s, i = Dw(
14260
14243
  n,
14261
14244
  a.contextResourceMap
14262
14245
  ), c = `${o.url}/${a.name}`, u = {
@@ -14273,7 +14256,7 @@ const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow =
14273
14256
  c,
14274
14257
  u
14275
14258
  )).cards || [];
14276
- }, Ov = (t, e) => {
14259
+ }, Sv = (t, e) => {
14277
14260
  const r = [];
14278
14261
  return t.forEach((n) => {
14279
14262
  !n.suggestions || n.suggestions.length === 0 || n.suggestions.forEach((s) => {
@@ -14290,43 +14273,43 @@ const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow =
14290
14273
  });
14291
14274
  }), r;
14292
14275
  };
14293
- async function Av() {
14276
+ async function Rv() {
14294
14277
  return H(`${ws}/templates`);
14295
14278
  }
14296
- async function Pv(t) {
14279
+ async function Ov(t) {
14297
14280
  return (await ge(
14298
14281
  `${ws}/render`,
14299
14282
  t
14300
14283
  )).html;
14301
14284
  }
14302
- const xw = (t, e, r) => {
14285
+ const Cw = (t, e, r) => {
14303
14286
  let s = se + "/Task?_sort=-_lastUpdated";
14304
14287
  return t && (s += `&subject:Patient=${t}`), e && (s += `&based-on=${e}`), r && r.length > 0 && (s += `&encounter=${r.join(",")}`), s;
14305
14288
  };
14306
- async function Nv(t, e, r) {
14289
+ async function Av(t, e, r) {
14307
14290
  return H(
14308
- xw(t, e, r)
14291
+ Cw(t, e, r)
14309
14292
  );
14310
14293
  }
14311
14294
  export {
14312
- gb as APPOINTMENT_IDENTIFIER_SYSTEM,
14313
- mb as APPOINTMENT_STATUSES,
14295
+ hb as APPOINTMENT_IDENTIFIER_SYSTEM,
14296
+ pb as APPOINTMENT_STATUSES,
14314
14297
  Zn as AUDIT_LOG_EVENT_DETAILS,
14315
14298
  Om as AllergySeverity,
14316
14299
  Rm as AllergyStatus,
14317
14300
  pf as AttributeFormat,
14318
14301
  hf as AttributeInputType,
14319
14302
  Fl as BAHMNI_APP_BASE_PATH,
14320
- sE as BAHMNI_HOME_PATH,
14303
+ rE as BAHMNI_HOME_PATH,
14321
14304
  wi as BAHMNI_USER_LOCATION_COOKIE,
14322
14305
  Nd as BIRTH_TIME_EXT_URL,
14323
14306
  is as CDSS_CHECK_EVENT,
14324
14307
  cs as CDSS_RESULTS_EVENT,
14325
- mE as CONCEPT_DATATYPE_COMPLEX,
14326
- hE as CONCEPT_DATATYPE_NUMERIC,
14308
+ pE as CONCEPT_DATATYPE_COMPLEX,
14309
+ fE as CONCEPT_DATATYPE_NUMERIC,
14327
14310
  as as CONSULTATION_SAVED_EVENT,
14328
14311
  Dd as DATETIME_REGEX_PATTERN,
14329
- wE as DATE_REGEX_PATTERN,
14312
+ gE as DATE_REGEX_PATTERN,
14330
14313
  Zi as DEFAULT_DATE_FORMAT,
14331
14314
  tm as DEFAULT_DATE_FORMAT_STORAGE_KEY,
14332
14315
  rm as DEFAULT_TIME_FORMAT,
@@ -14335,240 +14318,239 @@ export {
14335
14318
  Ni as FHIR_ENCOUNTER_CLASS_CODE_SYSTEM,
14336
14319
  Ii as FHIR_ENCOUNTER_TAG_SYSTEM,
14337
14320
  Pi as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
14338
- lE as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
14339
- fE as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
14340
- dE as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
14341
- gE as FHIR_OBSERVATION_STATUS_FINAL,
14342
- pE as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
14343
- yE as FHIR_RESOURCE_TYPE_OBSERVATION,
14321
+ cE as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
14322
+ lE as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
14323
+ uE as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
14324
+ hE as FHIR_OBSERVATION_STATUS_FINAL,
14325
+ dE as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
14326
+ mE as FHIR_RESOURCE_TYPE_OBSERVATION,
14344
14327
  $d as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
14345
14328
  Es as HL7_CONDITION_CATEGORY_CONDITION_CODE,
14346
14329
  $i as HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE,
14347
14330
  Id as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
14348
- uE as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
14349
- EE as INTERPRETATION_TO_CODE,
14350
- Nb as ISO_DATE_FORMAT,
14331
+ iE as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
14332
+ yE as INTERPRETATION_TO_CODE,
14333
+ Ab as ISO_DATE_FORMAT,
14351
14334
  mi as LOGIN_PATH,
14352
- L_ as MATCH_REASON_MESSAGES,
14353
- FE as MAX_NAME_LENGTH,
14354
- qE as MAX_PATIENT_AGE_YEARS,
14355
- jE as MAX_PHONE_NUMBER_LENGTH,
14356
- n_ as MEDICATIONS_INPUT_CONTROL_KEY,
14335
+ D_ as MATCH_REASON_MESSAGES,
14336
+ UE as MAX_NAME_LENGTH,
14337
+ ME as MAX_PATIENT_AGE_YEARS,
14338
+ qE as MAX_PHONE_NUMBER_LENGTH,
14339
+ t_ as MEDICATIONS_INPUT_CONTROL_KEY,
14357
14340
  Be as MedicationStatus,
14358
14341
  se as OPENMRS_FHIR_R4,
14359
14342
  W as OPENMRS_REST_V1,
14360
- E_ as ORDER_TYPE_QUERY_KEY,
14361
- w_ as PENDING_REPORT_STATUSES,
14362
- y_ as PROCESSED_REPORT_STATUSES,
14363
- O_ as USER_PINNED_PREFERENCE_URL,
14343
+ y_ as ORDER_TYPE_QUERY_KEY,
14344
+ g_ as PENDING_REPORT_STATUSES,
14345
+ m_ as PROCESSED_REPORT_STATUSES,
14346
+ S_ as USER_PINNED_PREFERENCE_URL,
14364
14347
  Im as buildEncounterResource,
14365
- $b as calculateAge,
14366
- Mb as calculateEndDate,
14367
- Cb as calculateOnsetDate,
14348
+ Nb as calculateAge,
14349
+ xb as calculateEndDate,
14350
+ $b as calculateOnsetDate,
14368
14351
  Ci as camelToScreamingSnakeCase,
14369
- M_ as canResumeOwnInSessionEncounter,
14370
- vE as capitalize,
14371
- pb as checkIfActiveVisitExists,
14372
- _b as checkInAppointment,
14373
- Ib as computeAgeDetails,
14374
- Z_ as convertImmutableToPlainObject,
14352
+ x_ as canResumeOwnInSessionEncounter,
14353
+ bE as capitalize,
14354
+ db as checkIfActiveVisitExists,
14355
+ Eb as checkInAppointment,
14356
+ Pb as computeAgeDetails,
14357
+ Q_ as convertImmutableToPlainObject,
14375
14358
  am as convertTo24HourFormat,
14376
- $E as convertToSentenceCase,
14377
- Pb as createAppointmentUnavailability,
14359
+ NE as convertToSentenceCase,
14360
+ Ob as createAppointmentUnavailability,
14378
14361
  yt as createBundleEntry,
14379
- gw as createDocumentReference,
14362
+ hw as createDocumentReference,
14380
14363
  rs as createEncounterBundle,
14381
14364
  Lm as createFhirEncounter,
14382
- QE as createFhirPatient,
14383
- WE as createPatient,
14384
- hb as createVisitForPatient,
14365
+ WE as createFhirPatient,
14366
+ GE as createPatient,
14367
+ fb as createVisitForPatient,
14385
14368
  bi as del,
14386
- Sb as deleteAppointmentService,
14369
+ vb as deleteAppointmentService,
14387
14370
  Cd as deleteCookie,
14388
14371
  mf as dispatchAuditEvent,
14389
- lv as dispatchCDSSCheck,
14390
- dv as dispatchCDSSResults,
14391
- cv as dispatchConsultationSaved,
14392
- Ub as doDateRangesOverlap,
14393
- iv as extractAttributes,
14394
- ev as extractNotesFromFormData,
14395
- D_ as fetchAllProviders,
14396
- Bb as fetchAndFormatAllergenConcepts,
14397
- G_ as fetchFormMetadata,
14398
- K_ as fetchFormUuidByObservationDate,
14399
- o_ as fetchMedicationOrdersMetadata,
14400
- Aw as fetchModuleExtensions,
14401
- Y_ as fetchObservationForms,
14402
- BE as fetchPatientPhotoFromUrl,
14403
- f_ as fetchQualityAssessment,
14404
- zb as fetchReactionConcepts,
14405
- Iw as filterByOnlineStatus,
14406
- Nw as filterByPrivilege,
14407
- Ov as filterCdsCardsForItems,
14408
- AE as filterReplacementEntries,
14409
- x_ as findActiveEncounterInSession,
14410
- CE as formatCountry,
14411
- Lb as formatDateDistance,
14412
- Db as formatDateTime,
14413
- DE as formatGender,
14414
- PE as formatUrl,
14415
- _E as generateId,
14416
- XE as generateIdentifier,
14372
+ cv as dispatchCDSSCheck,
14373
+ uv as dispatchCDSSResults,
14374
+ av as dispatchConsultationSaved,
14375
+ kb as doDateRangesOverlap,
14376
+ ov as extractAttributes,
14377
+ X_ as extractNotesFromFormData,
14378
+ I_ as fetchAllProviders,
14379
+ Vb as fetchAndFormatAllergenConcepts,
14380
+ z_ as fetchFormMetadata,
14381
+ Y_ as fetchFormUuidByObservationDate,
14382
+ n_ as fetchMedicationOrdersMetadata,
14383
+ Rw as fetchModuleExtensions,
14384
+ B_ as fetchObservationForms,
14385
+ VE as fetchPatientPhotoFromUrl,
14386
+ l_ as fetchQualityAssessment,
14387
+ Hb as fetchReactionConcepts,
14388
+ Pw as filterByOnlineStatus,
14389
+ Aw as filterByPrivilege,
14390
+ Sv as filterCdsCardsForItems,
14391
+ RE as filterReplacementEntries,
14392
+ C_ as findActiveEncounterInSession,
14393
+ $E as formatCountry,
14394
+ Db as formatDateDistance,
14395
+ Ib as formatDateTime,
14396
+ IE as formatGender,
14397
+ OE as formatUrl,
14398
+ EE as generateId,
14399
+ JE as generateIdentifier,
14417
14400
  Qr as generateUUID,
14418
14401
  H as get,
14419
14402
  Rs as getActiveVisit,
14420
14403
  Tf as getActiveVisitByPatient,
14421
- tb as getAddressHierarchyEntries,
14422
- Tb as getAllAppointmentServices,
14404
+ ZE as getAddressHierarchyEntries,
14405
+ _b as getAllAppointmentServices,
14423
14406
  Tm as getAllergies,
14424
- vb as getAppointmentById,
14425
- Ab as getAppointmentUnavailabilities,
14426
- kE as getAvailableLocations,
14427
- Sv as getAvailableStocks,
14428
- __ as getCategoryUuidFromOrderTypes,
14429
- Hb as getConceptById,
14430
- Zb as getConditionPage,
14431
- Xb as getConditions,
14432
- S_ as getConfig,
14407
+ bb as getAppointmentById,
14408
+ Rb as getAppointmentUnavailabilities,
14409
+ LE as getAvailableLocations,
14410
+ vv as getAvailableStocks,
14411
+ E_ as getCategoryUuidFromOrderTypes,
14412
+ jb as getConceptById,
14413
+ Qb as getConditionPage,
14414
+ Jb as getConditions,
14415
+ v_ as getConfig,
14433
14416
  Di as getCookieByName,
14434
- $_ as getCurrentProvider,
14435
- av as getCurrentStateName,
14436
- LE as getCurrentUser,
14437
- B_ as getCurrentUserPrivileges,
14438
- xE as getDefaultDateFormat,
14439
- r_ as getDiagnosesPage,
14440
- m_ as getDiagnosticReportBundle,
14441
- h_ as getDiagnosticReports,
14442
- yv as getDocumentReferencePage,
14443
- hw as getDocumentReferences,
14444
- mv as getDocumentTypes,
14445
- hv as getDocumentUploadMaxSizeMb,
14446
- Wb as getEncounterByUuid,
14417
+ N_ as getCurrentProvider,
14418
+ sv as getCurrentStateName,
14419
+ DE as getCurrentUser,
14420
+ V_ as getCurrentUserPrivileges,
14421
+ CE as getDefaultDateFormat,
14422
+ e_ as getDiagnosesPage,
14423
+ p_ as getDiagnosticReportBundle,
14424
+ f_ as getDiagnosticReports,
14425
+ mv as getDocumentReferencePage,
14426
+ fw as getDocumentReferences,
14427
+ pv as getDocumentTypes,
14428
+ fv as getDocumentUploadMaxSizeMb,
14429
+ Gb as getEncounterByUuid,
14447
14430
  pc as getEncounterSessionDuration,
14448
14431
  Jy as getEncounterSessionSnapshot,
14449
14432
  Cm as getEncounterTypeByName,
14450
- V_ as getEncountersAndVisitsForEOC,
14451
- T_ as getExistingServiceRequestsForAllCategories,
14452
- Pw as getExtensionsByPoint,
14453
- bv as getFHIRLocationsByTag,
14454
- b_ as getFlattenedInvestigations,
14455
- kb as getFormattedAge,
14456
- Yb as getFormattedAllergies,
14457
- gv as getFormattedDocumentReferences,
14433
+ F_ as getEncountersAndVisitsForEOC,
14434
+ __ as getExistingServiceRequestsForAllCategories,
14435
+ Ow as getExtensionsByPoint,
14436
+ wv as getFHIRLocationsByTag,
14437
+ w_ as getFlattenedInvestigations,
14438
+ Lb as getFormattedAge,
14439
+ Bb as getFormattedAllergies,
14440
+ hv as getFormattedDocumentReferences,
14458
14441
  Yr as getFormattedError,
14459
- HE as getFormattedPatientById,
14460
- eb as getGenders,
14461
- KE as getIdentifierData,
14462
- GE as getIdentifierTypes,
14463
- ab as getInputTypeForFormat,
14464
- p_ as getLabInvestigationsBundle,
14465
- Ev as getLocationByTag,
14466
- c_ as getMedicationByUuid,
14467
- N_ as getObservationsBundleByEncounterUuid,
14468
- v_ as getOrderTypeNames,
14442
+ jE as getFormattedPatientById,
14443
+ XE as getGenders,
14444
+ YE as getIdentifierData,
14445
+ zE as getIdentifierTypes,
14446
+ sb as getInputTypeForFormat,
14447
+ d_ as getLabInvestigationsBundle,
14448
+ yv as getLocationByTag,
14449
+ a_ as getMedicationByUuid,
14450
+ A_ as getObservationsBundleByEncounterUuid,
14451
+ b_ as getOrderTypeNames,
14469
14452
  Os as getOrderTypes,
14470
- rb as getOrderedAddressHierarchyLevels,
14471
- Eb as getPastAppointments,
14472
- Ob as getPastAppointmentsPage,
14453
+ eb as getOrderedAddressHierarchyLevels,
14454
+ yb as getPastAppointments,
14455
+ Sb as getPastAppointmentsPage,
14473
14456
  of as getPatientById,
14474
- t_ as getPatientDiagnoses,
14475
- Kb as getPatientEncounters,
14476
- W_ as getPatientFormData,
14477
- _v as getPatientImmunizations,
14457
+ Zb as getPatientDiagnoses,
14458
+ Yb as getPatientEncounters,
14459
+ G_ as getPatientFormData,
14460
+ Ev as getPatientImmunizations,
14478
14461
  Zm as getPatientMedicationBundle,
14479
- s_ as getPatientMedications,
14480
- P_ as getPatientObservations,
14462
+ r_ as getPatientMedications,
14463
+ O_ as getPatientObservations,
14481
14464
  Vy as getPatientObservationsBundle,
14482
- A_ as getPatientObservationsWithEncounterBundle,
14483
- nb as getPatientProfile,
14484
- rv as getPatientPrograms,
14485
- nv as getPatientProgramsPage,
14486
- u_ as getPatientRadiologyInvestigationBundle,
14487
- l_ as getPatientRadiologyInvestigationBundleWithImagingStudy,
14488
- d_ as getPatientRadiologyInvestigations,
14489
- ob as getPersonAttributeTypes,
14465
+ R_ as getPatientObservationsWithEncounterBundle,
14466
+ tb as getPatientProfile,
14467
+ ev as getPatientPrograms,
14468
+ tv as getPatientProgramsPage,
14469
+ i_ as getPatientRadiologyInvestigationBundle,
14470
+ c_ as getPatientRadiologyInvestigationBundleWithImagingStudy,
14471
+ u_ as getPatientRadiologyInvestigations,
14472
+ nb as getPersonAttributeTypes,
14490
14473
  ff as getPrimaryIdentifierType,
14491
- RE as getPriorityByOrder,
14492
- sv as getProgramByUUID,
14493
- C_ as getProviderLoginLocations,
14494
- sb as getRelationshipTypes,
14474
+ TE as getPriorityByOrder,
14475
+ rv as getProgramByUUID,
14476
+ $_ as getProviderLoginLocations,
14477
+ rb as getRelationshipTypes,
14495
14478
  Jt as getServiceRequests,
14496
- Nv as getTasks,
14497
- Av as getTemplates,
14498
- Fb as getTimeInMinutes,
14499
- xb as getTodayDate,
14500
- wb as getUpcomingAppointments,
14501
- Rb as getUpcomingAppointmentsPage,
14479
+ Av as getTasks,
14480
+ Rv as getTemplates,
14481
+ Ub as getTimeInMinutes,
14482
+ Cb as getTodayDate,
14483
+ gb as getUpcomingAppointments,
14484
+ Tb as getUpcomingAppointmentsPage,
14502
14485
  Kt as getUserLoginLocation,
14503
14486
  an as getUserPreferredLocale,
14504
- i_ as getVaccinations,
14505
- NE as getValueType,
14506
- Tv as getVisibleModules,
14507
- fb as getVisitTypes,
14487
+ o_ as getVaccinations,
14488
+ AE as getValueType,
14489
+ _v as getVisibleModules,
14490
+ lb as getVisitTypes,
14508
14491
  Dm as getVisits,
14509
- tv as getVitalFlowSheetData,
14510
- OE as groupByDate,
14511
- I_ as groupObservationsByEncounter,
14512
- aw as hasMissingMandatoryVisibleField,
14513
- z_ as hasPrivilege,
14514
- iE as initAppI18n,
14515
- H_ as initializeAuditListener,
14516
- Rv as invokeCDSSRule,
14517
- ib as isBooleanFormat,
14518
- cb as isConceptFormat,
14519
- lb as isDateFormat,
14520
- ub as isNumberFormat,
14521
- SE as isStringEmpty,
14522
- db as isTextFormat,
14492
+ Z_ as getVitalFlowSheetData,
14493
+ SE as groupByDate,
14494
+ P_ as groupObservationsByEncounter,
14495
+ H_ as hasPrivilege,
14496
+ oE as initAppI18n,
14497
+ j_ as initializeAuditListener,
14498
+ Tv as invokeCDSSRule,
14499
+ ob as isBooleanFormat,
14500
+ ab as isConceptFormat,
14501
+ cb as isDateFormat,
14502
+ ib as isNumberFormat,
14503
+ vE as isStringEmpty,
14504
+ ub as isTextFormat,
14523
14505
  ew as logAuditEvent,
14524
- R_ as logout,
14525
- Gb as mapAllergyToInputEntry,
14526
- VE as mapGenderFromFhir,
14527
- e_ as markConditionAsInactive,
14528
- aE as normalizeTranslationKey,
14529
- jb as notificationService,
14506
+ T_ as logout,
14507
+ zb as mapAllergyToInputEntry,
14508
+ FE as mapGenderFromFhir,
14509
+ Xb as markConditionAsInactive,
14510
+ sE as normalizeTranslationKey,
14511
+ qb as notificationService,
14530
14512
  Ld as parseQueryParams,
14531
- oE as patch,
14513
+ nE as patch,
14532
14514
  ge as post,
14533
14515
  Ei as put,
14534
- bE as refreshQueries,
14535
- Pv as renderAsHtml,
14536
- F_ as resetEncounterSession,
14537
- IE as resolveComboBoxItems,
14538
- k_ as resolveEncounterMatchDecision,
14539
- wv as saveDocument,
14540
- ME as saveUserLocation,
14541
- yb as searchAppointmentsByAttribute,
14516
+ wE as refreshQueries,
14517
+ Ov as renderAsHtml,
14518
+ U_ as resetEncounterSession,
14519
+ PE as resolveComboBoxItems,
14520
+ L_ as resolveEncounterMatchDecision,
14521
+ gv as saveDocument,
14522
+ xE as saveUserLocation,
14523
+ mb as searchAppointmentsByAttribute,
14542
14524
  gm as searchConceptByName,
14543
- Vb as searchConcepts,
14525
+ Fb as searchConcepts,
14544
14526
  ss as searchEncounters,
14545
14527
  jr as searchFHIRConcepts,
14546
14528
  mm as searchFHIRConceptsByName,
14547
- a_ as searchMedications,
14548
- YE as searchPatientByCustomAttribute,
14549
- zE as searchPatientByNameOrId,
14550
- TE as setCookie,
14551
- U_ as setEncounterSessionDecision,
14552
- q_ as setEncounterSessionLoading,
14553
- Qb as shouldEnableEncounterFilter,
14554
- qb as sortByDate,
14555
- $w as sortByOrder,
14529
+ s_ as searchMedications,
14530
+ BE as searchPatientByCustomAttribute,
14531
+ HE as searchPatientByNameOrId,
14532
+ _E as setCookie,
14533
+ k_ as setEncounterSessionDecision,
14534
+ M_ as setEncounterSessionLoading,
14535
+ Wb as shouldEnableEncounterFilter,
14536
+ Mb as sortByDate,
14537
+ Nw as sortByOrder,
14556
14538
  Wy as subscribeEncounterSession,
14557
- X_ as transformContainerObservationsToForm2Observations,
14558
- J_ as transformFormDataToObservations,
14559
- Q_ as transformObservationsToFormData,
14560
- bb as updateAppointmentStatus,
14561
- g_ as updateDiagnosticReportBundle,
14562
- Jb as updateFhirEncounter,
14563
- ZE as updateFhirPatient,
14564
- JE as updatePatient,
14565
- ov as updateProgramState,
14566
- UE as updateSessionLocation,
14567
- vv as uploadDocument,
14568
- fv as useCDSSCheckListener,
14569
- pv as useCDSSResultsListener,
14570
- cE as useCamera,
14571
- j_ as useEncounterSessionStore,
14572
- uv as useSubscribeConsultationSaved,
14573
- Dv as useTranslation
14539
+ J_ as transformContainerObservationsToForm2Observations,
14540
+ K_ as transformFormDataToObservations,
14541
+ W_ as transformObservationsToFormData,
14542
+ wb as updateAppointmentStatus,
14543
+ h_ as updateDiagnosticReportBundle,
14544
+ Kb as updateFhirEncounter,
14545
+ QE as updateFhirPatient,
14546
+ KE as updatePatient,
14547
+ nv as updateProgramState,
14548
+ kE as updateSessionLocation,
14549
+ bv as uploadDocument,
14550
+ lv as useCDSSCheckListener,
14551
+ dv as useCDSSResultsListener,
14552
+ aE as useCamera,
14553
+ q_ as useEncounterSessionStore,
14554
+ iv as useSubscribeConsultationSaved,
14555
+ Iv as useTranslation
14574
14556
  };