@bahmni/services 0.0.1-dev.367 → 0.0.1-dev.369

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 Iv } from "react-i18next";
2
+ import { useTranslation as Dv } from "react-i18next";
3
3
  import { useRef as qt, useCallback as vn, useEffect as rt, useSyncExternalStore as Oc } from "react";
4
4
  function Ba(t, e) {
5
5
  return function() {
@@ -2288,23 +2288,23 @@ me.getAdapter = fi.getAdapter;
2288
2288
  me.HttpStatusCode = Jn;
2289
2289
  me.default = me;
2290
2290
  const {
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
2291
+ Axios: Fw,
2292
+ AxiosError: jw,
2293
+ CanceledError: Vw,
2294
+ isCancel: Hw,
2295
+ CancelToken: Bw,
2296
+ VERSION: zw,
2297
+ all: Yw,
2298
+ Cancel: Gw,
2299
+ isAxiosError: Kw,
2300
+ spread: Ww,
2301
+ toFormData: Jw,
2302
+ AxiosHeaders: Qw,
2303
+ HttpStatusCode: Xw,
2304
+ formToJSON: Zw,
2305
+ getAdapter: eE,
2306
+ mergeConfig: tE,
2307
+ create: rE
2308
2308
  } = me, 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 ?? "/", ne = "/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", rE = Fl + "/home", ys = W + "/session", ws = `${W}/bahmnicore/template/api`, Qn = (t) => {
2475
+ ], Fl = "/bahmni-v2", nE = 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 B = async (t, e) => (await Ke.get(t, e)).data, ye = 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, Q = (t) => typeof t == "string", Nt = () => {
2515
+ const B = async (t, e) => (await Ke.get(t, e)).data, ye = async (t, e) => (await Ke.post(t, e)).data, Ei = async (t, e) => (await Ke.put(t, e)).data, sE = async (t, e) => (await Ke.patch(t, e)).data, bi = async (t) => (await Ke.delete(t)).data, Q = (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
- }, sE = (t, e) => {
4213
+ }, oE = (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
- }, oE = async (t) => {
4230
+ }, aE = async (t) => {
4231
4231
  const e = an(), r = await Od(e, t);
4232
4232
  return fe.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
  }), fe;
4252
4252
  };
4253
- function aE() {
4253
+ function iE() {
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 aE() {
4290
4290
  );
4291
4291
  return rt(() => () => 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", 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 = {
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", cE = "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", uE = "http://fhir.bahmni.org/ext/lab-order-concept-type", lE = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", dE = "http://fhir.bahmni.org/ext/observation/form-namespace-path", fE = "http://fhir.bahmni.org/ext/observation/obs-value-attachment", pE = "Numeric", hE = "Complex", mE = "final", gE = "Observation", yE = /^\d{4}-\d{2}-\d{2}/, Dd = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/, wE = {
4294
4294
  ABNORMAL: { code: "A", display: "Abnormal" },
4295
4295
  NORMAL: { code: "N", display: "Normal" }
4296
- }, wE = async (t, e, r) => {
4296
+ }, EE = 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
- }, EE = () => Math.random().toString(36).substring(2, 9), Qr = () => {
4299
+ }, bE = () => 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 bE(t, e = " -") {
4311
+ function _E(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 _E(t, e) {
4326
+ function vE(t, e) {
4327
4327
  document.cookie = `${t}=${e}; path=/;`;
4328
4328
  }
4329
- const vE = (t) => !t || t.trim().length === 0, TE = (t, e) => {
4329
+ const TE = (t) => !t || t.trim().length === 0, SE = (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 vE = (t) => !t || t.trim().length === 0, TE = (t, e) => {
4334
4334
  );
4335
4335
  return r === -1 ? 999 : r;
4336
4336
  };
4337
- function SE(t, e) {
4337
+ function RE(t, e) {
4338
4338
  if (!t || t.length === 0)
4339
4339
  return [];
4340
4340
  const r = /* @__PURE__ */ new Map();
@@ -4346,7 +4346,7 @@ function SE(t, e) {
4346
4346
  items: s
4347
4347
  }));
4348
4348
  }
4349
- function RE(t, e, r) {
4349
+ function OE(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 OE(t, e, r) {
4370
+ function AE(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 OE(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
- }), AE = (t) => {
4383
+ }), PE = (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 PE(t, e, r, n, s) {
4394
+ function NE(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 NE(t) {
4401
+ function IE(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 IE = (t, e) => {
4404
+ const $E = (t, e) => {
4405
4405
  const r = t.trim();
4406
4406
  return r ? e(`GENDER_${Ci(r)}`) : null;
4407
- }, $E = (t, e) => {
4407
+ }, DE = (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 IE = (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 DE() {
4420
+ async function CE() {
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(fe.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
4443
4443
  return e;
4444
- }, CE = async () => (await B(qd("commons"))).find(
4444
+ }, LE = async () => (await B(qd("commons"))).find(
4445
4445
  (r) => r.property === Fd
4446
- )?.value ?? null, LE = async () => (await B(Md)).results ?? [], xE = async (t, e) => {
4446
+ )?.value ?? null, xE = async () => (await B(Md)).results ?? [], kE = async (t, e) => {
4447
4447
  await ye(Ud(t), {
4448
4448
  userProperties: { loginLocation: e.uuid }
4449
4449
  });
4450
- }, kE = async (t) => {
4450
+ }, ME = async (t) => {
4451
4451
  await ye(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 = ne + "/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, 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) => {
4498
+ }, Zd = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", ef = W + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", tf = 20, rf = 2, UE = 120, qE = 50, FE = 15, nf = /^[a-f0-9-]{36}$/i, sf = W + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", jE = (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
- }, jE = async (t) => {
4538
+ }, VE = async (t) => {
4539
4539
  const e = await of(t);
4540
4540
  return df(e);
4541
- }, VE = async (t) => {
4541
+ }, HE = async (t) => {
4542
4542
  if (!t.startsWith("/"))
4543
4543
  throw new Error("Photo URL must be a relative path");
4544
4544
  const e = await B(t, {
4545
4545
  responseType: "blob"
4546
4546
  });
4547
4547
  return await xd(e);
4548
- }, HE = async (t, e) => {
4548
+ }, BE = async (t, e) => {
4549
4549
  const r = Kt();
4550
4550
  return await B(
4551
4551
  Hd(t, r.uuid, e)
4552
4552
  );
4553
- }, BE = async (t, e, r, n, s) => {
4553
+ }, zE = async (t, e, r, n, s) => {
4554
4554
  const o = Kt();
4555
4555
  return await B(
4556
4556
  Bd(
@@ -4561,9 +4561,9 @@ const Kt = () => {
4561
4561
  o.uuid
4562
4562
  )
4563
4563
  );
4564
- }, zE = async () => B(xi), ff = async () => (await B(zd("core"))).find(
4564
+ }, YE = async () => B(xi), ff = async () => (await B(zd("core"))).find(
4565
4565
  (r) => r.property === Yd
4566
- )?.value ?? null, YE = async () => {
4566
+ )?.value ?? null, GE = async () => {
4567
4567
  const [t, e] = await Promise.all([
4568
4568
  B(xi),
4569
4569
  ff()
@@ -4591,10 +4591,10 @@ const Kt = () => {
4591
4591
  primaryIdentifierTypeUuid: e,
4592
4592
  primaryIdentifierTypeName: null
4593
4593
  };
4594
- }, GE = async (t) => ye(Gd, t), KE = async (t, e) => ye(
4594
+ }, KE = async (t) => ye(Gd, t), WE = async (t, e) => ye(
4595
4595
  Kd(t),
4596
4596
  e
4597
- ), WE = (t) => ye(Wd, t), JE = (t) => ye(Jd(t), {}), QE = (t, e) => Ei(Li(t), e), XE = async () => B(Ai("mrs.genders")), ZE = async (t, e, r = tf, n) => {
4597
+ ), JE = (t) => ye(Wd, t), QE = (t) => ye(Jd(t), {}), XE = (t, e) => Ei(Li(t), e), ZE = async () => B(Ai("mrs.genders")), eb = 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
- }, eb = async () => B(Zd), tb = async (t) => B(Qd(t)), rb = async () => {
4609
+ }, tb = async () => B(Zd), rb = async (t) => B(Qd(t)), nb = async () => {
4610
4610
  try {
4611
4611
  return (await B(
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
- }, nb = async () => B(sf);
4623
+ }, sb = async () => B(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 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) => {
4625
+ const ob = (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", ab = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype.datatype.BooleanDatatype", ib = (t) => t === "org.openmrs.Concept" || t === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || t === "org.openmrs.customdatatype.datatype.ConceptDatatype", cb = (t) => t === "java.lang.Integer" || t === "java.lang.Float", ub = (t) => t === "org.openmrs.util.AttributableDate" || t === "org.openmrs.customdatatype.datatype.DateDatatype", lb = (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) => {
@@ -4695,10 +4695,10 @@ const sb = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype
4695
4695
  }
4696
4696
  }, yf = W + "/auditlog", wf = {
4697
4697
  UNKNOWN_EVENT_TYPE: "AUDIT_LOG_ERROR_UNKNOWN_EVENT_TYPE"
4698
- }, Ef = () => W + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", bf = W + "/visit?v=custom:(uuid,startDatetime)", _f = (t) => W + `/visit?patient=${t}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, vf = (t) => W + `/bahmnicore/visitLocation/${t}`, lb = async () => B(Ef()), Tf = async (t) => B(_f(t)), Sf = async (t) => B(vf(t)), Rf = async (t) => ye(bf, t), db = async (t) => {
4698
+ }, Ef = () => W + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", bf = W + "/visit?v=custom:(uuid,startDatetime)", _f = (t) => W + `/visit?patient=${t}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, vf = (t) => W + `/bahmnicore/visitLocation/${t}`, db = async () => B(Ef()), Tf = async (t) => B(_f(t)), Sf = async (t) => B(vf(t)), Rf = async (t) => ye(bf, t), fb = async (t) => {
4699
4699
  const e = await Tf(t);
4700
4700
  return e?.results && e.results.length > 0;
4701
- }, fb = async (t, e) => {
4701
+ }, pb = async (t, e) => {
4702
4702
  const r = await Sf(
4703
4703
  Kt().uuid
4704
4704
  ), n = {
@@ -7629,7 +7629,7 @@ function Bh(t, e, r) {
7629
7629
  function zh(t, e, r) {
7630
7630
  return ln(t, -e, r);
7631
7631
  }
7632
- const pb = {
7632
+ const hb = {
7633
7633
  PROPOSED: "proposed",
7634
7634
  PENDING: "pending",
7635
7635
  BOOKED: "booked",
@@ -7640,51 +7640,51 @@ const pb = {
7640
7640
  CHECKED_IN: "checked-in",
7641
7641
  WAITLIST: "waitlist",
7642
7642
  ENTERED_IN_ERROR: "entered-in-error"
7643
- }, Yh = W + "/appointments/search", Qi = W + "/appointments", hb = "http://fhir.bahmni.org/code-system/appointments", Gh = (t) => `${Qi}/${t}`, hn = (t, e, r, n) => {
7643
+ }, Yh = W + "/appointments/search", Qi = W + "/appointments", mb = "http://fhir.bahmni.org/code-system/appointments", Gh = (t) => `${Qi}/${t}`, hn = (t, e, r, n) => {
7644
7644
  const s = e === "upcoming", o = s ? "ge" : "le", a = s ? "date" : "-date", i = s ? (/* @__PURE__ */ new Date()).toISOString() : Bh(/* @__PURE__ */ new Date()).toISOString();
7645
7645
  let c = `${ne}/Appointment?patient=${t}&date=${o}${i}&_sort=${a}`;
7646
7646
  return r !== void 0 && r > 0 && (c += `&_count=${r}`), n !== void 0 && n > 0 && (c += `&_getpagesoffset=${n}`), c;
7647
- }, 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 ye(Yh, t);
7648
- async function gb(t) {
7647
+ }, 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", gb = async (t) => await ye(Yh, t);
7648
+ async function yb(t) {
7649
7649
  return await B(Kh(t));
7650
7650
  }
7651
- async function yb(t, e) {
7651
+ async function wb(t, e) {
7652
7652
  return await B(
7653
7653
  Wh(t, e)
7654
7654
  );
7655
7655
  }
7656
- const wb = async (t, e, r) => await ye(Jh(t), {
7656
+ const Eb = async (t, e, r) => await ye(Jh(t), {
7657
7657
  toStatus: e,
7658
7658
  onDate: r
7659
- }), Eb = async (t, e) => ye(t, { appointmentUuid: e });
7660
- async function bb(t) {
7659
+ }), bb = async (t, e) => ye(t, { appointmentUuid: e });
7660
+ async function _b(t) {
7661
7661
  return await B(Gh(t));
7662
7662
  }
7663
- const _b = async () => await B(Qh), vb = async (t) => {
7663
+ const vb = async () => await B(Qh), Tb = async (t) => {
7664
7664
  await bi(Xh(t));
7665
7665
  };
7666
- async function Tb(t, e = 10, r = 1) {
7666
+ async function Sb(t, e = 10, r = 1) {
7667
7667
  const n = (r - 1) * e, s = await B(
7668
7668
  Zh(t, e, n)
7669
7669
  );
7670
7670
  return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
7671
7671
  }
7672
- async function Sb(t, e = 10, r = 1) {
7672
+ async function Rb(t, e = 10, r = 1) {
7673
7673
  const n = (r - 1) * e, s = await B(
7674
7674
  em(t, e, n)
7675
7675
  );
7676
7676
  return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
7677
7677
  }
7678
- const Rb = async () => await B(Xi), Ob = async (t) => {
7678
+ const Ob = async () => await B(Xi), Ab = async (t) => {
7679
7679
  await ye(Xi, t);
7680
- }, Zi = "dd/MM/yyyy", tm = "default_dateFormat", rm = "h:mm a", Ab = "yyyy-MM-dd", Le = {
7680
+ }, Zi = "dd/MM/yyyy", tm = "default_dateFormat", rm = "h:mm a", Pb = "yyyy-MM-dd", Le = {
7681
7681
  PARSE_ERROR: "DATE_ERROR_PARSE",
7682
7682
  FORMAT_ERROR: "DATE_ERROR_FORMAT",
7683
7683
  EMPTY_OR_INVALID: "DATE_ERROR_EMPTY_OR_INVALID",
7684
7684
  INVALID_FORMAT: "DATE_ERROR_INVALID_FORMAT",
7685
7685
  NULL_OR_UNDEFINED: "DATE_ERROR_NULL_OR_UNDEFINED"
7686
7686
  };
7687
- function Pb(t) {
7687
+ function Nb(t) {
7688
7688
  if (!t) return null;
7689
7689
  const e = pn(t);
7690
7690
  if (!ot(e)) return null;
@@ -7693,7 +7693,7 @@ function Pb(t) {
7693
7693
  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`;
7694
7694
  return { year: s, month: a, day: c, ageInDays: n, ageText: u };
7695
7695
  }
7696
- function Nb(t) {
7696
+ function Ib(t) {
7697
7697
  if (typeof t != "string" || !/^\d{4}-\d{2}-\d{2}$/.test(t))
7698
7698
  return null;
7699
7699
  const e = pn(t);
@@ -7761,7 +7761,7 @@ function sm() {
7761
7761
  return Zi;
7762
7762
  }
7763
7763
  }
7764
- function Ib(t, e, r = !1, n) {
7764
+ function $b(t, e, r = !1, n) {
7765
7765
  const s = e ?? ((a) => a);
7766
7766
  let o;
7767
7767
  try {
@@ -7771,7 +7771,7 @@ function Ib(t, e, r = !1, n) {
7771
7771
  }
7772
7772
  return r && !n && (o = `${o} ${rm}`), nm(t, o, s);
7773
7773
  }
7774
- function $b(t, e, r) {
7774
+ function Db(t, e, r) {
7775
7775
  if (!t || !ot(t) || e === null || e === void 0 || !r || typeof e != "number")
7776
7776
  return;
7777
7777
  const n = new Date(t);
@@ -7786,7 +7786,7 @@ function $b(t, e, r) {
7786
7786
  return;
7787
7787
  }
7788
7788
  }
7789
- function Db(t, e) {
7789
+ function Cb(t, e) {
7790
7790
  if (t == null)
7791
7791
  return {
7792
7792
  formattedResult: "",
@@ -7838,11 +7838,11 @@ function Db(t, e) {
7838
7838
  }
7839
7839
  return { formattedResult: c };
7840
7840
  }
7841
- const Cb = () => {
7841
+ const Lb = () => {
7842
7842
  const t = /* @__PURE__ */ new Date();
7843
7843
  return t.setHours(0, 0, 0, 0), t;
7844
7844
  };
7845
- function Lb(t, e) {
7845
+ function xb(t, e) {
7846
7846
  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 = {
7847
7847
  years: "YEARS",
7848
7848
  months: "MONTHS",
@@ -7876,14 +7876,14 @@ const om = {
7876
7876
  h: 1 / 24,
7877
7877
  min: 1 / 1440,
7878
7878
  s: 1 / 86400
7879
- }, xb = (t, e, r) => {
7879
+ }, kb = (t, e, r) => {
7880
7880
  const n = typeof t == "string" ? new Date(t) : t;
7881
7881
  if (isNaN(n.getTime()))
7882
7882
  throw new Error(`Invalid date: ${t}`);
7883
7883
  const s = om[r] ?? 1, o = e * s;
7884
7884
  return un(n, o);
7885
- }, kb = (t, e, r, n) => t <= n && r <= e;
7886
- function Mb(t, e, r = !1) {
7885
+ }, Mb = (t, e, r, n) => t <= n && r <= e;
7886
+ function Ub(t, e, r = !1) {
7887
7887
  return !t || !Array.isArray(t) ? [] : t.sort((n, s) => {
7888
7888
  const o = new Date(n[e]), a = new Date(s[e]);
7889
7889
  if (isNaN(o.getTime()) && isNaN(a.getTime())) return 0;
@@ -7898,7 +7898,7 @@ function am(t) {
7898
7898
  const e = Rh(t, "hh:mm aa", /* @__PURE__ */ new Date());
7899
7899
  return ot(e) ? zi(e, "HH:mm") : "";
7900
7900
  }
7901
- function Ub(t) {
7901
+ function qb(t) {
7902
7902
  const e = am(t);
7903
7903
  if (!e) return null;
7904
7904
  const [r, n] = e.split(":").map(Number);
@@ -7933,10 +7933,10 @@ const im = () => {
7933
7933
  );
7934
7934
  }
7935
7935
  };
7936
- }, qb = im(), cm = (t) => ne + `/ValueSet/${t}/$expand`, um = (t) => ne + `/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) => {
7936
+ }, Fb = im(), cm = (t) => ne + `/ValueSet/${t}/$expand`, um = (t) => ne + `/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) => {
7937
7937
  const r = `${W}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(t)}`;
7938
7938
  return e ? `${r}&v=${encodeURIComponent(e)}` : r;
7939
- }, pm = "SHORT", hm = "FULLY_SPECIFIED", Fb = async (t, e = 20) => {
7939
+ }, pm = "SHORT", hm = "FULLY_SPECIFIED", jb = async (t, e = 20) => {
7940
7940
  const r = an(), n = lm(t, e, r);
7941
7941
  return B(n);
7942
7942
  }, jr = async (t) => {
@@ -7946,7 +7946,7 @@ const im = () => {
7946
7946
  const e = `${um(t)}`;
7947
7947
  return B(e);
7948
7948
  };
7949
- async function jb(t) {
7949
+ async function Vb(t) {
7950
7950
  return await B(dm(t));
7951
7951
  }
7952
7952
  async function gm(t, e) {
@@ -7985,7 +7985,7 @@ const wm = (t) => ne + `/AllergyIntolerance?patient=${t}&_count=100&_sort=-_last
7985
7985
  }), Cn = (t, e) => {
7986
7986
  const r = t.expansion?.contains ?? [];
7987
7987
  return bm(r).map((s) => _m(s, e));
7988
- }, Vb = async (t, e, r) => {
7988
+ }, Hb = async (t, e, r) => {
7989
7989
  const n = t ?? ft.MEDICATION.code, s = e ?? ft.FOOD.code, o = r ?? ft.ENVIRONMENT.code, [a, i, c] = await Promise.all([
7990
7990
  jr(n),
7991
7991
  jr(s),
@@ -8005,7 +8005,7 @@ const wm = (t) => ne + `/AllergyIntolerance?patient=${t}&_count=100&_sort=-_last
8005
8005
  ft.ENVIRONMENT.display
8006
8006
  )
8007
8007
  ];
8008
- }, Hb = async (t) => {
8008
+ }, Bb = async (t) => {
8009
8009
  const e = t ?? Em.code;
8010
8010
  return (await jr(e)).compose?.include[0]?.concept ?? [];
8011
8011
  };
@@ -8045,12 +8045,12 @@ function Sm(t) {
8045
8045
  };
8046
8046
  });
8047
8047
  }
8048
- async function Bb(t) {
8048
+ async function zb(t) {
8049
8049
  const e = await Tm(t);
8050
8050
  return Sm(e);
8051
8051
  }
8052
8052
  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 || {});
8053
- function zb(t) {
8053
+ function Yb(t) {
8054
8054
  const e = t.code?.coding?.[0]?.code ?? t.id ?? "", r = t.reaction?.[0]?.severity, n = /* @__PURE__ */ new Set(), s = [];
8055
8055
  for (const o of t.reaction ?? [])
8056
8056
  for (const a of o.manifestation ?? [])
@@ -8134,7 +8134,7 @@ async function $m(t) {
8134
8134
  async function Dm(t) {
8135
8135
  return (await $m(t)).entry?.map((r) => r.resource).filter((r) => r !== void 0) ?? [];
8136
8136
  }
8137
- async function Yb(t) {
8137
+ async function Gb(t) {
8138
8138
  const r = [];
8139
8139
  let n = 0;
8140
8140
  for (; ; ) {
@@ -8155,7 +8155,7 @@ async function Cm(t) {
8155
8155
  async function Rs(t) {
8156
8156
  return (await Dm(t)).find((r) => !r.period?.end) ?? null;
8157
8157
  }
8158
- async function Gb(t, e) {
8158
+ async function Kb(t, e) {
8159
8159
  return await B(
8160
8160
  `/openmrs/ws/fhir2/R4/Encounter/${t}`,
8161
8161
  e
@@ -8164,20 +8164,20 @@ async function Gb(t, e) {
8164
8164
  async function Lm(t) {
8165
8165
  return await ye(tc, t);
8166
8166
  }
8167
- async function Kb(t, e) {
8167
+ async function Wb(t, e) {
8168
8168
  return await Ei(`${tc}/${t}`, e);
8169
8169
  }
8170
- const Wb = (t, e) => t?.length === 0 ? !1 : e?.length === 0, xm = (t) => ne + `/Condition?category=${Es}&patient=${t}&_count=100&_sort=-_lastUpdated`, km = (t, e = 10, r = 0, n) => {
8170
+ const Jb = (t, e) => t?.length === 0 ? !1 : e?.length === 0, xm = (t) => ne + `/Condition?category=${Es}&patient=${t}&_count=100&_sort=-_lastUpdated`, km = (t, e = 10, r = 0, n) => {
8171
8171
  const s = ne + `/Condition?category=${Es}&patient=${t}&_count=${e}&_getpagesoffset=${r}&_sort=-_lastUpdated`;
8172
8172
  return n ? `${s}&clinical-status=${n}` : s;
8173
8173
  };
8174
8174
  async function Mm(t) {
8175
8175
  return await B(`${xm(t)}`);
8176
8176
  }
8177
- async function Jb(t) {
8177
+ async function Qb(t) {
8178
8178
  return (await Mm(t)).entry?.filter((n) => n.resource?.resourceType === "Condition").map((n) => n.resource) ?? [];
8179
8179
  }
8180
- async function Qb(t, e = 10, r = 1, n) {
8180
+ async function Xb(t, e = 10, r = 1, n) {
8181
8181
  const s = (r - 1) * e, o = await B(
8182
8182
  km(t, e, s, n)
8183
8183
  );
@@ -8202,7 +8202,7 @@ function Oo(t, e, r, n) {
8202
8202
  practitionerUUIDs: n ? [n] : void 0
8203
8203
  });
8204
8204
  }
8205
- async function Xb(t, e, r = !1, n, s, o) {
8205
+ async function Zb(t, e, r = !1, n, s, o) {
8206
8206
  const a = {
8207
8207
  ...t,
8208
8208
  category: [
@@ -8370,11 +8370,11 @@ function Ym(t) {
8370
8370
  }
8371
8371
  return Array.from(e.values());
8372
8372
  }
8373
- async function Zb(t) {
8373
+ async function e_(t) {
8374
8374
  const e = await Vm(t), r = rc(e);
8375
8375
  return Ym(r);
8376
8376
  }
8377
- async function e_(t, e = 10, r = 1) {
8377
+ async function t_(t, e = 10, r = 1) {
8378
8378
  const n = (r - 1) * e, s = await Hm(
8379
8379
  t,
8380
8380
  e,
@@ -8400,7 +8400,7 @@ const Ut = {
8400
8400
  }, Km = (t, e, r) => {
8401
8401
  let s = `${ne + "/MedicationRequest?" + Ut.SORT + "&" + Ut.COUNT + "&" + Ut.INCLUDE_MEDICATION}&patient=${t}`;
8402
8402
  return e && (s += `&code=${e}`), r && (s += `&encounter=${r}`), s;
8403
- }, Wm = W + "/bahmnicore/config/drugOrders", Jm = (t, e) => ne + `/Medication?name=${encodeURIComponent(t)}&_count=${e}&_sort=-_lastUpdated`, Qm = ne + "/Medication?code=http://hl7.org/fhir/sid/cvx|&_count=100", t_ = "medication", Xm = (t) => {
8403
+ }, Wm = W + "/bahmnicore/config/drugOrders", Jm = (t, e) => ne + `/Medication?name=${encodeURIComponent(t)}&_count=${e}&_sort=-_lastUpdated`, Qm = ne + "/Medication?code=http://hl7.org/fhir/sid/cvx|&_count=100", r_ = "medication", Xm = (t) => {
8404
8404
  switch (t.status) {
8405
8405
  case "active":
8406
8406
  return Be.Active;
@@ -8557,7 +8557,7 @@ function lg(t) {
8557
8557
  });
8558
8558
  }
8559
8559
  const Ao = (t) => t.priority === "stat";
8560
- async function r_(t, e, r, n = !1) {
8560
+ async function n_(t, e, r, n = !1) {
8561
8561
  const s = await Zm(
8562
8562
  t,
8563
8563
  e,
@@ -8566,21 +8566,21 @@ async function r_(t, e, r, n = !1) {
8566
8566
  );
8567
8567
  return lg(s);
8568
8568
  }
8569
- async function n_() {
8569
+ async function s_() {
8570
8570
  return await B(
8571
8571
  Wm
8572
8572
  );
8573
8573
  }
8574
- async function s_(t, e = 20) {
8574
+ async function o_(t, e = 20) {
8575
8575
  return await B(
8576
8576
  Jm(t, e)
8577
8577
  );
8578
8578
  }
8579
- async function o_() {
8579
+ async function a_() {
8580
8580
  return await B(Qm);
8581
8581
  }
8582
8582
  const dg = (t) => `${ne}/Medication/${t}`;
8583
- async function a_(t) {
8583
+ async function i_(t) {
8584
8584
  return await B(dg(t));
8585
8585
  }
8586
8586
  const fg = 200, pg = (t, e, r, n, s) => {
@@ -8600,7 +8600,7 @@ async function Jt(t, e, r, n, s) {
8600
8600
  );
8601
8601
  }
8602
8602
  const hg = (t) => `${ne}/ImagingStudy/${t}/$fetch-quality-assessment`;
8603
- async function i_(t, e, r, n) {
8603
+ async function c_(t, e, r, n) {
8604
8604
  return await Jt(
8605
8605
  e,
8606
8606
  t,
@@ -8608,7 +8608,7 @@ async function i_(t, e, r, n) {
8608
8608
  n
8609
8609
  );
8610
8610
  }
8611
- async function c_(t, e, r, n) {
8611
+ async function u_(t, e, r, n) {
8612
8612
  return await Jt(
8613
8613
  e,
8614
8614
  t,
@@ -8617,7 +8617,7 @@ async function c_(t, e, r, n) {
8617
8617
  "ImagingStudy:basedon"
8618
8618
  );
8619
8619
  }
8620
- async function u_(t, e, r, n) {
8620
+ async function l_(t, e, r, n) {
8621
8621
  return (await Jt(
8622
8622
  e,
8623
8623
  t,
@@ -8625,10 +8625,10 @@ async function u_(t, e, r, n) {
8625
8625
  n
8626
8626
  )).entry?.filter((a) => a.resource?.resourceType === "ServiceRequest").map((a) => a.resource) ?? [];
8627
8627
  }
8628
- async function l_(t) {
8628
+ async function d_(t) {
8629
8629
  return await B(hg(t));
8630
8630
  }
8631
- async function d_(t, e, r, n) {
8631
+ async function f_(t, e, r, n) {
8632
8632
  return await Jt(
8633
8633
  e,
8634
8634
  t,
@@ -8640,29 +8640,29 @@ const mg = (t, e) => {
8640
8640
  const r = `${ne}/DiagnosticReport?patient=${t}`;
8641
8641
  return e ? `${r}&based-on=${e}` : r;
8642
8642
  }, gg = (t) => `${ne}/DiagnosticReport/${t}/$fetch-bundle`, yg = (t) => `${ne}/DiagnosticReport/${t}/$update-bundle`;
8643
- async function f_(t, e = []) {
8643
+ async function p_(t, e = []) {
8644
8644
  const r = e.length > 0 ? e.join(",") : void 0, n = mg(t, r);
8645
8645
  return await B(n);
8646
8646
  }
8647
- async function p_(t) {
8647
+ async function h_(t) {
8648
8648
  const e = gg(t);
8649
8649
  return await B(e);
8650
8650
  }
8651
- async function h_(t, e) {
8651
+ async function m_(t, e) {
8652
8652
  const r = yg(t);
8653
8653
  return await ye(r, e);
8654
8654
  }
8655
- const m_ = [
8655
+ const g_ = [
8656
8656
  "preliminary",
8657
8657
  "final",
8658
8658
  "amended",
8659
8659
  "corrected",
8660
8660
  "appended"
8661
- ], g_ = [
8661
+ ], y_ = [
8662
8662
  "registered",
8663
8663
  "unknown",
8664
8664
  "partial"
8665
- ], 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 B(Eg), Tg = (t) => {
8665
+ ], 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", w_ = ["orderTypes"], vg = async () => await mm(wg), Os = async () => await B(Eg), Tg = (t) => {
8666
8666
  let e = t.display ?? "Unknown investigation";
8667
8667
  return nc(t) === bg && (e += ` (${fe.t("INVESTIGATION_PANEL")})`), e;
8668
8668
  }, Sg = (t) => {
@@ -8694,12 +8694,12 @@ const m_ = [
8694
8694
  });
8695
8695
  });
8696
8696
  }), r;
8697
- }, w_ = async () => {
8697
+ }, E_ = async () => {
8698
8698
  const t = await vg(), e = await Os();
8699
8699
  return Rg(t, Sg(e));
8700
- }, E_ = async (t) => t ? (await Os()).results.find(
8700
+ }, b_ = async (t) => t ? (await Os()).results.find(
8701
8701
  (n) => n.display.toLowerCase() === t.toLowerCase()
8702
- )?.uuid ?? null : null, b_ = async () => (await Os()).results.map((e) => e.display), __ = async (t, e, r) => {
8702
+ )?.uuid ?? null : null, __ = async () => (await Os()).results.map((e) => e.display), v_ = async (t, e, r) => {
8703
8703
  const n = [];
8704
8704
  for (const s of t) {
8705
8705
  const o = s.uuid;
@@ -13257,19 +13257,19 @@ var Dy = $y();
13257
13257
  const Cy = /* @__PURE__ */ Og(Dy), ja = {
13258
13258
  CONFIG_NOT_FOUND: "CONFIG_ERROR_NOT_FOUND",
13259
13259
  VALIDATION_FAILED: "CONFIG_ERROR_VALIDATION_FAILED"
13260
- }, v_ = async (t, e) => {
13260
+ }, T_ = async (t, e) => {
13261
13261
  const r = await Ly(t);
13262
13262
  if (!r)
13263
13263
  throw new Error(ja.CONFIG_NOT_FOUND);
13264
13264
  if (!await xy(r, e))
13265
13265
  throw new Error(ja.VALIDATION_FAILED);
13266
13266
  return r;
13267
- }, Ly = async (t) => await B(t), xy = async (t, e) => new Cy().compile(e)(t), T_ = async () => {
13267
+ }, Ly = async (t) => await B(t), xy = async (t, e) => new Cy().compile(e)(t), S_ = async () => {
13268
13268
  await bi(ys), ql.forEach((t) => Cd(t)), globalThis.location.href = mi;
13269
13269
  }, ky = (t) => W + `/form/${t}?v=custom:(uuid,name,version,published,resources:(value))`, My = (t) => {
13270
13270
  const e = W + "/bahmniie/form/latestPublishedForms";
13271
13271
  return t ? e + `?episodeUuid=${t}` : e;
13272
- }, 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) => {
13272
+ }, R_ = (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) => {
13273
13273
  let s = W + "/bahmnicore/patient/" + t + "/forms";
13274
13274
  return r ? s += `?patientProgramUuid=${r}` : e && (s += `?numberOfVisits=${e}`), s;
13275
13275
  }, dc = (t, e, r, n) => {
@@ -13284,23 +13284,23 @@ async function Vy(t, e, r) {
13284
13284
  const n = dc(t, e, r);
13285
13285
  return await B(n);
13286
13286
  }
13287
- async function R_(t, e) {
13287
+ async function O_(t, e) {
13288
13288
  const r = dc(t, e, void 0, !0);
13289
13289
  return await B(r);
13290
13290
  }
13291
- async function O_(t, e, r) {
13291
+ async function A_(t, e, r) {
13292
13292
  return (await Vy(
13293
13293
  t,
13294
13294
  e,
13295
13295
  r
13296
13296
  )).entry?.filter((o) => o.resource?.resourceType === "Observation").map((o) => o.resource) ?? [];
13297
13297
  }
13298
- async function A_(t) {
13298
+ async function P_(t) {
13299
13299
  return await B(
13300
13300
  jy(t)
13301
13301
  );
13302
13302
  }
13303
- const Hy = (t) => t.split("/").pop() ?? "", P_ = (t, e) => {
13303
+ const Hy = (t) => t.split("/").pop() ?? "", N_ = (t, e) => {
13304
13304
  const r = /* @__PURE__ */ new Map(), n = e.entry?.filter((o) => o.resource?.resourceType === "Encounter").map((o) => o.resource) ?? [], s = /* @__PURE__ */ new Map();
13305
13305
  return n.forEach((o) => {
13306
13306
  o.id && s.set(o.id, o);
@@ -13324,13 +13324,13 @@ const Hy = (t) => t.split("/").pop() ?? "", P_ = (t, e) => {
13324
13324
  (o, a) => a.encounterDateTime - o.encounterDateTime
13325
13325
  );
13326
13326
  }, fc = (t) => W + `/provider?user=${t}&v=custom:(uuid,display,person,attributes)`, By = W + "/provider?v=custom:(uuid,display,person,attributes)";
13327
- async function N_(t) {
13327
+ async function I_(t) {
13328
13328
  const e = await B(
13329
13329
  fc(t)
13330
13330
  );
13331
13331
  return !e.results || e.results.length === 0 ? null : e.results[0];
13332
13332
  }
13333
- async function I_() {
13333
+ async function $_() {
13334
13334
  const t = [];
13335
13335
  let e = By;
13336
13336
  for (; e; ) {
@@ -13339,7 +13339,7 @@ async function I_() {
13339
13339
  }
13340
13340
  return t;
13341
13341
  }
13342
- async function $_(t) {
13342
+ async function D_(t) {
13343
13343
  const e = await B(fc(t));
13344
13344
  if (!e.results || e.results.length === 0)
13345
13345
  return [];
@@ -13348,7 +13348,7 @@ async function $_(t) {
13348
13348
  (n) => !n.voided && n.attributeType.display === "Login Locations"
13349
13349
  ).map((n) => n.value) : [];
13350
13350
  }
13351
- const zy = ne + "/Encounter", Yy = W + "/systemsetting/bahmni.encountersession.duration", D_ = {
13351
+ const zy = ne + "/Encounter", Yy = W + "/systemsetting/bahmni.encountersession.duration", C_ = {
13352
13352
  MATCHED: "ENCOUNTER_MATCH_REASON_MATCHED",
13353
13353
  NO_ACTIVE_VISIT: "ENCOUNTER_MATCH_REASON_NO_ACTIVE_VISIT",
13354
13354
  NO_ACTIVE_ENCOUNTER: "ENCOUNTER_MATCH_REASON_NO_ACTIVE_ENCOUNTER",
@@ -13386,7 +13386,7 @@ async function Gy(t, e) {
13386
13386
  return null;
13387
13387
  }
13388
13388
  }
13389
- async function C_(t, e, r, n) {
13389
+ async function L_(t, e, r, n) {
13390
13390
  try {
13391
13391
  if (!t) return null;
13392
13392
  const s = r ?? await pc(), a = `ge${new Date(Date.now() - s * 60 * 1e3).toISOString()}`, i = {
@@ -13423,7 +13423,7 @@ function zn(t) {
13423
13423
  return new Date(r.period?.start ?? 0).getTime() - n;
13424
13424
  });
13425
13425
  }
13426
- async function L_(t, e, r, n) {
13426
+ async function x_(t, e, r, n) {
13427
13427
  try {
13428
13428
  const s = await Rs(t);
13429
13429
  if (!s?.id)
@@ -13488,7 +13488,7 @@ async function L_(t, e, r, n) {
13488
13488
  };
13489
13489
  }
13490
13490
  }
13491
- function x_(t) {
13491
+ function k_(t) {
13492
13492
  return t.matched || t.reasons.includes("LOCATION_MISMATCH") && !t.reasons.includes("SESSION_EXPIRED") && !t.reasons.includes("PROVIDER_MISMATCH");
13493
13493
  }
13494
13494
  const hc = {
@@ -13514,7 +13514,7 @@ function Wy(t) {
13514
13514
  function Jy() {
13515
13515
  return Ht;
13516
13516
  }
13517
- function k_(t) {
13517
+ function M_(t) {
13518
13518
  const e = t.reasons.some(
13519
13519
  (r) => Ky.includes(r)
13520
13520
  );
@@ -13525,20 +13525,20 @@ function k_(t) {
13525
13525
  isLoading: !1
13526
13526
  }, $s();
13527
13527
  }
13528
- function M_(t) {
13528
+ function U_(t) {
13529
13529
  Ht = { ...Ht, isLoading: t }, $s();
13530
13530
  }
13531
- function U_() {
13531
+ function q_() {
13532
13532
  Ht = { ...hc }, $s();
13533
13533
  }
13534
- function q_() {
13534
+ function F_() {
13535
13535
  return Oc(
13536
13536
  Wy,
13537
13537
  Jy
13538
13538
  );
13539
13539
  }
13540
13540
  const Qy = (t) => ne + `/EpisodeOfCare?_revinclude=Encounter:episode-of-care&_id=${t}`;
13541
- async function F_(t) {
13541
+ async function j_(t) {
13542
13542
  const e = t.join(","), r = await B(Qy(e));
13543
13543
  if (r.total === 0)
13544
13544
  throw new Error(
@@ -13574,14 +13574,14 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13574
13574
  module: n
13575
13575
  };
13576
13576
  return await ye(yf, a), { logged: !0 };
13577
- }, j_ = () => gf(async (e) => {
13577
+ }, V_ = () => gf(async (e) => {
13578
13578
  await ew(
13579
13579
  e.patientUuid,
13580
13580
  e.eventType,
13581
13581
  e.messageParams,
13582
13582
  e.module
13583
13583
  );
13584
- }), V_ = async () => {
13584
+ }), H_ = async () => {
13585
13585
  try {
13586
13586
  const t = await B(ys);
13587
13587
  return t.user ? t.user.privileges : null;
@@ -13589,7 +13589,7 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13589
13589
  const { message: e } = Yr(t);
13590
13590
  throw new Error(e);
13591
13591
  }
13592
- }, H_ = (t, e) => {
13592
+ }, tw = (t, e) => {
13593
13593
  if (!t || t.length === 0)
13594
13594
  return !1;
13595
13595
  if (!e || e.length === 0)
@@ -13598,7 +13598,7 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13598
13598
  return t.some(
13599
13599
  (n) => r.includes(n.name)
13600
13600
  );
13601
- }, tw = async (t) => {
13601
+ }, rw = async (t) => {
13602
13602
  let e;
13603
13603
  t && t.length > 0 && (e = t.join(","));
13604
13604
  const r = await fetch(My(e));
@@ -13608,7 +13608,7 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13608
13608
  );
13609
13609
  const n = await r.json();
13610
13610
  return Array.isArray(n) ? n : [];
13611
- }, rw = (t, e) => {
13611
+ }, nw = (t, e) => {
13612
13612
  const r = JSON.parse(t.nameTranslation);
13613
13613
  if (Array.isArray(r) && r.length > 0) {
13614
13614
  const n = r.find(
@@ -13618,8 +13618,8 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13618
13618
  return n.display;
13619
13619
  }
13620
13620
  return t.name;
13621
- }, nw = (t, e) => {
13622
- const r = rw(t, e);
13621
+ }, sw = (t, e) => {
13622
+ const r = nw(t, e);
13623
13623
  return {
13624
13624
  uuid: t.uuid,
13625
13625
  name: r,
@@ -13630,9 +13630,9 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13630
13630
  }))
13631
13631
  };
13632
13632
  }, B_ = async (t) => {
13633
- const e = await tw(t), r = an();
13633
+ const e = await rw(t), r = an();
13634
13634
  return e.map(
13635
- (n) => nw(n, r)
13635
+ (n) => sw(n, r)
13636
13636
  );
13637
13637
  }, z_ = async (t) => {
13638
13638
  const e = await fetch(ky(t));
@@ -13813,7 +13813,7 @@ function W_(t, e) {
13813
13813
  metadata: { formMetadata: e }
13814
13814
  };
13815
13815
  }
13816
- function sw(t) {
13816
+ function ow(t) {
13817
13817
  return t == null ? null : typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "object" ? t : null;
13818
13818
  }
13819
13819
  function J_(t) {
@@ -13823,7 +13823,7 @@ function J_(t) {
13823
13823
  uuid: o,
13824
13824
  datatype: a
13825
13825
  },
13826
- value: sw(n.value),
13826
+ value: ow(n.value),
13827
13827
  obsDatetime: typeof n.observationDateTime == "string" ? n.observationDateTime : (/* @__PURE__ */ new Date()).toISOString(),
13828
13828
  formNamespace: typeof n.formNamespace == "string" ? n.formNamespace : "Bahmni",
13829
13829
  formFieldPath: typeof n.formFieldPath == "string" ? n.formFieldPath : void 0
@@ -13866,7 +13866,7 @@ function wc(t, e) {
13866
13866
  );
13867
13867
  });
13868
13868
  }
13869
- const ow = W + "/bahmnicore/diseaseSummaryData?", Z_ = async (t, e, r, n) => {
13869
+ const aw = W + "/bahmnicore/diseaseSummaryData?", Z_ = async (t, e, r, n) => {
13870
13870
  const s = new URLSearchParams({
13871
13871
  groupBy: n,
13872
13872
  latestCount: e.toString(),
@@ -13875,17 +13875,17 @@ const ow = W + "/bahmnicore/diseaseSummaryData?", Z_ = async (t, e, r, n) => {
13875
13875
  r.forEach((a) => {
13876
13876
  s.append("obsConcepts", a);
13877
13877
  });
13878
- const o = ow + s.toString();
13878
+ const o = aw + s.toString();
13879
13879
  return B(o);
13880
- }, 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 B(aw(t)), tv = async (t, e = 15, r = 1) => {
13880
+ }, 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)", iw = (t) => `${W}/bahmniprogramenrollment?patient=${t}&v=${Ds}`, cw = (t, e = 15, r = 0) => `${W}/bahmniprogramenrollment?patient=${t}&v=${Ds}&limit=${e}&startIndex=${r}&totalCount=true`, Ec = (t) => `${W}/bahmniprogramenrollment/${t}`, uw = (t) => `${Ec(t)}?v=${Ds}`, ev = async (t) => await B(iw(t)), tv = async (t, e = 15, r = 1) => {
13881
13881
  const n = (r - 1) * e, s = await B(
13882
- iw(t, e, n)
13882
+ cw(t, e, n)
13883
13883
  );
13884
13884
  return {
13885
13885
  programs: s.results,
13886
13886
  total: s.totalCount
13887
13887
  };
13888
- }, rv = async (t) => await B(cw(t)), nv = async (t, e) => {
13888
+ }, rv = async (t) => await B(uw(t)), nv = async (t, e) => {
13889
13889
  const r = {
13890
13890
  uuid: t,
13891
13891
  states: [
@@ -13981,13 +13981,13 @@ const as = "consultation:saved", av = (t) => {
13981
13981
  globalThis.removeEventListener(cs, r);
13982
13982
  };
13983
13983
  }, []);
13984
- }, uw = `${ne}/DocumentReference`, lw = "bahmni.documentUpload.maxFileSizeInMB", dw = `${W}/systemsetting?q=${lw}&v=custom:(property,value)`, bc = (t, e, r = 100, n = 0) => {
13984
+ }, lw = `${ne}/DocumentReference`, dw = "bahmni.documentUpload.maxFileSizeInMB", fw = `${W}/systemsetting?q=${dw}&v=custom:(property,value)`, bc = (t, e, r = 100, n = 0) => {
13985
13985
  const s = `${ne}/DocumentReference?patient=${t}&_sort=-_lastUpdated&_count=${r}&_getpagesoffset=${n}`;
13986
13986
  return e && e.length > 0 ? `${s}&encounter=${encodeURIComponent(e.join(","))}` : s;
13987
13987
  };
13988
13988
  async function fv() {
13989
13989
  const t = await B(
13990
- dw
13990
+ fw
13991
13991
  ), e = Number(t.results?.[0]?.value);
13992
13992
  return Number.isFinite(e) && e > 0 ? e : void 0;
13993
13993
  }
@@ -14014,12 +14014,12 @@ function _c(t) {
14014
14014
  };
14015
14015
  });
14016
14016
  }
14017
- async function fw(t, e) {
14017
+ async function pw(t, e) {
14018
14018
  const r = bc(t, e);
14019
14019
  return B(r);
14020
14020
  }
14021
14021
  async function hv(t, e) {
14022
- const n = ((await fw(t, e)).entry ?? []).filter(
14022
+ const n = ((await pw(t, e)).entry ?? []).filter(
14023
14023
  (s) => !!s.resource
14024
14024
  );
14025
14025
  return _c(n);
@@ -14064,7 +14064,7 @@ function vc(t, e) {
14064
14064
  }
14065
14065
  ]), r;
14066
14066
  }
14067
- function pw(t, e, r, n, s, o) {
14067
+ function hw(t, e, r, n, s, o) {
14068
14068
  const a = {
14069
14069
  resourceType: "Encounter",
14070
14070
  status: "finished",
@@ -14109,16 +14109,16 @@ function pw(t, e, r, n, s, o) {
14109
14109
  }
14110
14110
  ]), a;
14111
14111
  }
14112
- async function hw(t) {
14112
+ async function mw(t) {
14113
14113
  const e = vc(
14114
14114
  t,
14115
14115
  `Encounter/${t.encounterUuid}`
14116
14116
  );
14117
- return ye(uw, e);
14117
+ return ye(lw, e);
14118
14118
  }
14119
14119
  async function gv(t) {
14120
14120
  if (t.encounterUuid)
14121
- return hw({
14121
+ return mw({
14122
14122
  ...t,
14123
14123
  encounterUuid: t.encounterUuid
14124
14124
  });
@@ -14126,7 +14126,7 @@ async function gv(t) {
14126
14126
  throw new Error(
14127
14127
  "saveDocument requires either encounterUuid or createEncounterInVisit"
14128
14128
  );
14129
- const { visitUuid: e, encounterTypeUuid: r, encounterTypeDisplay: n } = t.createEncounterInVisit, s = `urn:uuid:${Qr()}`, o = pw(
14129
+ const { visitUuid: e, encounterTypeUuid: r, encounterTypeDisplay: n } = t.createEncounterInVisit, s = `urn:uuid:${Qr()}`, o = hw(
14130
14130
  t.patientUuid,
14131
14131
  e,
14132
14132
  r,
@@ -14139,27 +14139,27 @@ async function gv(t) {
14139
14139
  ]);
14140
14140
  return ye(ns, i);
14141
14141
  }
14142
- const mw = (t) => `${W}/location?operator=ALL&s=byTags&tags=${encodeURIComponent(t)}&v=custom:(uuid,display,childLocations:(uuid,display,retired))`, gw = (t) => `${ne}/Location?_tag=${encodeURIComponent(t)}`;
14142
+ const gw = (t) => `${W}/location?operator=ALL&s=byTags&tags=${encodeURIComponent(t)}&v=custom:(uuid,display,childLocations:(uuid,display,retired))`, yw = (t) => `${ne}/Location?_tag=${encodeURIComponent(t)}`;
14143
14143
  async function yv(t) {
14144
- return (await B(mw(t))).results ?? [];
14144
+ return (await B(gw(t))).results ?? [];
14145
14145
  }
14146
14146
  async function wv(t) {
14147
- return await B(gw(t));
14147
+ return await B(yw(t));
14148
14148
  }
14149
- const yw = ne + "/Immunization", ww = (t, e) => {
14150
- let r = `${yw}?patient=${t}&_sort=-date&_count=100`;
14149
+ const ww = ne + "/Immunization", Ew = (t, e) => {
14150
+ let r = `${ww}?patient=${t}&_sort=-date&_count=100`;
14151
14151
  return e && (r += `&status=${e}`), r;
14152
14152
  };
14153
14153
  async function Ev(t, e) {
14154
- return (await Ew(t, e)).entry?.filter((n) => n.resource?.resourceType === "Immunization").map((n) => n.resource) ?? [];
14154
+ return (await bw(t, e)).entry?.filter((n) => n.resource?.resourceType === "Immunization").map((n) => n.resource) ?? [];
14155
14155
  }
14156
- async function Ew(t, e) {
14156
+ async function bw(t, e) {
14157
14157
  return B(
14158
- ww(t, e)
14158
+ Ew(t, e)
14159
14159
  );
14160
14160
  }
14161
- const bw = W + "/bahmnicore/visitDocument/uploadDocument", _w = "application";
14162
- async function vw(t) {
14161
+ const _w = W + "/bahmnicore/visitDocument/uploadDocument", vw = "application";
14162
+ async function Tw(t) {
14163
14163
  return new Promise((e, r) => {
14164
14164
  const n = new FileReader();
14165
14165
  n.onload = () => {
@@ -14172,7 +14172,7 @@ async function vw(t) {
14172
14172
  let a = o, i = "";
14173
14173
  const c = o.lastIndexOf(".");
14174
14174
  c !== -1 && (a = o.substring(0, c), i = o.substring(c + 1).toLowerCase());
14175
- const u = t.type ? t.type.split("/")[0] : _w;
14175
+ const u = t.type ? t.type.split("/")[0] : vw;
14176
14176
  e({
14177
14177
  content: s,
14178
14178
  fileName: a,
@@ -14185,7 +14185,7 @@ async function vw(t) {
14185
14185
  });
14186
14186
  }
14187
14187
  async function bv(t, e, r) {
14188
- const n = await vw(t), s = {
14188
+ const n = await Tw(t), s = {
14189
14189
  content: n.content,
14190
14190
  encounterTypeName: e,
14191
14191
  fileName: n.fileName,
@@ -14193,29 +14193,29 @@ async function bv(t, e, r) {
14193
14193
  format: n.format,
14194
14194
  patientUuid: r
14195
14195
  };
14196
- return ye(bw, s);
14196
+ return ye(_w, s);
14197
14197
  }
14198
- const Tw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Sw = (t) => Array.isArray(t) ? t : Object.values(t), Rw = async (t = "home") => {
14198
+ const Sw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Rw = (t) => Array.isArray(t) ? t : Object.values(t), Ow = async (t = "home") => {
14199
14199
  try {
14200
- const e = `${Tw}/${t}/v2/extension.json`, r = await fetch(e);
14200
+ const e = `${Sw}/${t}/v2/extension.json`, r = await fetch(e);
14201
14201
  if (!r.ok)
14202
14202
  throw new Error(`Failed to load base extensions: ${r.status}`);
14203
- return Sw(await r.json());
14203
+ return Rw(await r.json());
14204
14204
  } catch (e) {
14205
14205
  throw console.error("Error fetching module extensions:", e), e;
14206
14206
  }
14207
- }, Ow = (t, e = Tc, r = "link") => t.filter((n) => {
14207
+ }, Aw = (t, e = Tc, r = "link") => t.filter((n) => {
14208
14208
  const s = n.extensionPointId === e, o = r === "all" || n.type === r;
14209
14209
  return s && o;
14210
- }), Aw = (t, e) => e === void 0 ? t : t.filter((r) => r.requiredPrivilege ? e.includes(r.requiredPrivilege) : !0), Pw = (t) => {
14210
+ }), Pw = (t, e) => e === void 0 ? t : t.filter((r) => r.requiredPrivilege ? e.includes(r.requiredPrivilege) : !0), Nw = (t) => {
14211
14211
  const e = navigator.onLine;
14212
14212
  return t.filter((r) => !(r.exclusiveOnlineModule && !e || r.exclusiveOfflineModule && e));
14213
- }, Nw = (t) => [...t].sort((e, r) => (e.order ?? 0) - (r.order ?? 0)), _v = async (t = Tc, e) => {
14214
- const r = await Rw("home"), n = Ow(r, t), s = Aw(n, e), o = Pw(s);
14215
- return Nw(o);
14216
- }, Iw = (t, e) => W + `/availableStocks?productUuid=${t}&locationUuid=${e}`, vv = async (t, e) => await B(
14217
- Iw(t, e)
14218
- ), $w = (t, e, r) => {
14213
+ }, Iw = (t) => [...t].sort((e, r) => (e.order ?? 0) - (r.order ?? 0)), _v = async (t = Tc, e) => {
14214
+ const r = await Ow("home"), n = Aw(r, t), s = Pw(n, e), o = Nw(s);
14215
+ return Iw(o);
14216
+ }, $w = (t, e) => W + `/availableStocks?productUuid=${t}&locationUuid=${e}`, vv = async (t, e) => await B(
14217
+ $w(t, e)
14218
+ ), Dw = (t, e, r) => {
14219
14219
  const n = t.find((o) => o.server === e);
14220
14220
  if (!n)
14221
14221
  throw new Error(`CDSS server "${e}" not found in configuration`);
@@ -14227,7 +14227,7 @@ const Tw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Sw =
14227
14227
  `CDSS service "${r}" not found in server "${e}"`
14228
14228
  );
14229
14229
  return { serverConfig: n, serviceConfig: s };
14230
- }, Dw = (t, e) => {
14230
+ }, Cw = (t, e) => {
14231
14231
  if (!e || e.length === 0)
14232
14232
  return {};
14233
14233
  const r = {};
@@ -14242,7 +14242,7 @@ const Tw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Sw =
14242
14242
  });
14243
14243
  }), r;
14244
14244
  }, Tv = async (t, e, r, n) => {
14245
- const s = $w(t, e.server, e.service), { serverConfig: o, serviceConfig: a } = s, i = Dw(
14245
+ const s = Dw(t, e.server, e.service), { serverConfig: o, serviceConfig: a } = s, i = Cw(
14246
14246
  n,
14247
14247
  a.contextResourceMap
14248
14248
  ), c = `${o.url}/${a.name}`, u = {
@@ -14285,34 +14285,44 @@ async function Ov(t) {
14285
14285
  t
14286
14286
  )).html;
14287
14287
  }
14288
- const Cw = (t, e, r) => {
14288
+ const Lw = (t, e, r) => {
14289
14289
  let s = ne + "/Task?_sort=-_lastUpdated";
14290
14290
  return t && (s += `&subject:Patient=${t}`), e && (s += `&based-on=${e}`), r && r.length > 0 && (s += `&encounter=${r.join(",")}`), s;
14291
14291
  };
14292
14292
  async function Av(t, e, r) {
14293
14293
  return B(
14294
- Cw(t, e, r)
14294
+ Lw(t, e, r)
14295
14295
  );
14296
14296
  }
14297
+ const Pv = (t) => {
14298
+ const e = /* @__PURE__ */ new Map();
14299
+ for (const r of t) {
14300
+ const n = e.get(r.extensionPointId) ?? [];
14301
+ n.push(r), e.set(r.extensionPointId, n);
14302
+ }
14303
+ return e;
14304
+ }, Nv = (t, e) => t.filter(
14305
+ (r) => !r.requiredPrivileges || r.requiredPrivileges.length === 0 || tw(e, r.requiredPrivileges)
14306
+ );
14297
14307
  export {
14298
- hb as APPOINTMENT_IDENTIFIER_SYSTEM,
14299
- pb as APPOINTMENT_STATUSES,
14308
+ mb as APPOINTMENT_IDENTIFIER_SYSTEM,
14309
+ hb as APPOINTMENT_STATUSES,
14300
14310
  Zn as AUDIT_LOG_EVENT_DETAILS,
14301
14311
  Om as AllergySeverity,
14302
14312
  Rm as AllergyStatus,
14303
14313
  pf as AttributeFormat,
14304
14314
  hf as AttributeInputType,
14305
14315
  Fl as BAHMNI_APP_BASE_PATH,
14306
- rE as BAHMNI_HOME_PATH,
14316
+ nE as BAHMNI_HOME_PATH,
14307
14317
  wi as BAHMNI_USER_LOCATION_COOKIE,
14308
14318
  Nd as BIRTH_TIME_EXT_URL,
14309
14319
  is as CDSS_CHECK_EVENT,
14310
14320
  cs as CDSS_RESULTS_EVENT,
14311
- pE as CONCEPT_DATATYPE_COMPLEX,
14312
- fE as CONCEPT_DATATYPE_NUMERIC,
14321
+ hE as CONCEPT_DATATYPE_COMPLEX,
14322
+ pE as CONCEPT_DATATYPE_NUMERIC,
14313
14323
  as as CONSULTATION_SAVED_EVENT,
14314
14324
  Dd as DATETIME_REGEX_PATTERN,
14315
- gE as DATE_REGEX_PATTERN,
14325
+ yE as DATE_REGEX_PATTERN,
14316
14326
  Zi as DEFAULT_DATE_FORMAT,
14317
14327
  tm as DEFAULT_DATE_FORMAT_STORAGE_KEY,
14318
14328
  rm as DEFAULT_TIME_FORMAT,
@@ -14321,240 +14331,242 @@ export {
14321
14331
  Ni as FHIR_ENCOUNTER_CLASS_CODE_SYSTEM,
14322
14332
  Ii as FHIR_ENCOUNTER_TAG_SYSTEM,
14323
14333
  Pi as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
14324
- cE as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
14325
- lE as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
14326
- uE as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
14327
- hE as FHIR_OBSERVATION_STATUS_FINAL,
14328
- dE as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
14329
- mE as FHIR_RESOURCE_TYPE_OBSERVATION,
14334
+ uE as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
14335
+ dE as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
14336
+ lE as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
14337
+ mE as FHIR_OBSERVATION_STATUS_FINAL,
14338
+ fE as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
14339
+ gE as FHIR_RESOURCE_TYPE_OBSERVATION,
14330
14340
  $d as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
14331
14341
  Es as HL7_CONDITION_CATEGORY_CONDITION_CODE,
14332
14342
  $i as HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE,
14333
14343
  Id as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
14334
- iE as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
14335
- yE as INTERPRETATION_TO_CODE,
14336
- Ab as ISO_DATE_FORMAT,
14344
+ cE as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
14345
+ wE as INTERPRETATION_TO_CODE,
14346
+ Pb as ISO_DATE_FORMAT,
14337
14347
  mi as LOGIN_PATH,
14338
- D_ as MATCH_REASON_MESSAGES,
14339
- UE as MAX_NAME_LENGTH,
14340
- ME as MAX_PATIENT_AGE_YEARS,
14341
- qE as MAX_PHONE_NUMBER_LENGTH,
14342
- t_ as MEDICATIONS_INPUT_CONTROL_KEY,
14348
+ C_ as MATCH_REASON_MESSAGES,
14349
+ qE as MAX_NAME_LENGTH,
14350
+ UE as MAX_PATIENT_AGE_YEARS,
14351
+ FE as MAX_PHONE_NUMBER_LENGTH,
14352
+ r_ as MEDICATIONS_INPUT_CONTROL_KEY,
14343
14353
  mt as MODULE_LABELS,
14344
14354
  Be as MedicationStatus,
14345
14355
  ne as OPENMRS_FHIR_R4,
14346
14356
  W as OPENMRS_REST_V1,
14347
- y_ as ORDER_TYPE_QUERY_KEY,
14348
- g_ as PENDING_REPORT_STATUSES,
14349
- m_ as PROCESSED_REPORT_STATUSES,
14350
- S_ as USER_PINNED_PREFERENCE_URL,
14357
+ w_ as ORDER_TYPE_QUERY_KEY,
14358
+ y_ as PENDING_REPORT_STATUSES,
14359
+ g_ as PROCESSED_REPORT_STATUSES,
14360
+ R_ as USER_PINNED_PREFERENCE_URL,
14351
14361
  Im as buildEncounterResource,
14352
- Nb as calculateAge,
14353
- xb as calculateEndDate,
14354
- $b as calculateOnsetDate,
14362
+ Ib as calculateAge,
14363
+ kb as calculateEndDate,
14364
+ Db as calculateOnsetDate,
14355
14365
  Ci as camelToScreamingSnakeCase,
14356
- x_ as canResumeOwnInSessionEncounter,
14357
- bE as capitalize,
14358
- db as checkIfActiveVisitExists,
14359
- Eb as checkInAppointment,
14360
- Pb as computeAgeDetails,
14366
+ k_ as canResumeOwnInSessionEncounter,
14367
+ _E as capitalize,
14368
+ fb as checkIfActiveVisitExists,
14369
+ bb as checkInAppointment,
14370
+ Nb as computeAgeDetails,
14361
14371
  Q_ as convertImmutableToPlainObject,
14362
14372
  am as convertTo24HourFormat,
14363
- NE as convertToSentenceCase,
14364
- Ob as createAppointmentUnavailability,
14373
+ IE as convertToSentenceCase,
14374
+ Ab as createAppointmentUnavailability,
14365
14375
  yt as createBundleEntry,
14366
- hw as createDocumentReference,
14376
+ mw as createDocumentReference,
14367
14377
  rs as createEncounterBundle,
14368
14378
  Lm as createFhirEncounter,
14369
- WE as createFhirPatient,
14370
- GE as createPatient,
14371
- fb as createVisitForPatient,
14379
+ JE as createFhirPatient,
14380
+ KE as createPatient,
14381
+ pb as createVisitForPatient,
14372
14382
  bi as del,
14373
- vb as deleteAppointmentService,
14383
+ Tb as deleteAppointmentService,
14374
14384
  Cd as deleteCookie,
14375
14385
  mf as dispatchAuditEvent,
14376
14386
  cv as dispatchCDSSCheck,
14377
14387
  uv as dispatchCDSSResults,
14378
14388
  av as dispatchConsultationSaved,
14379
- kb as doDateRangesOverlap,
14389
+ Mb as doDateRangesOverlap,
14380
14390
  ov as extractAttributes,
14381
14391
  X_ as extractNotesFromFormData,
14382
- I_ as fetchAllProviders,
14383
- Vb as fetchAndFormatAllergenConcepts,
14392
+ $_ as fetchAllProviders,
14393
+ Hb as fetchAndFormatAllergenConcepts,
14384
14394
  z_ as fetchFormMetadata,
14385
14395
  Y_ as fetchFormUuidByObservationDate,
14386
- n_ as fetchMedicationOrdersMetadata,
14387
- Rw as fetchModuleExtensions,
14396
+ s_ as fetchMedicationOrdersMetadata,
14397
+ Ow as fetchModuleExtensions,
14388
14398
  B_ as fetchObservationForms,
14389
- VE as fetchPatientPhotoFromUrl,
14390
- l_ as fetchQualityAssessment,
14391
- Hb as fetchReactionConcepts,
14392
- Pw as filterByOnlineStatus,
14393
- Aw as filterByPrivilege,
14399
+ HE as fetchPatientPhotoFromUrl,
14400
+ d_ as fetchQualityAssessment,
14401
+ Bb as fetchReactionConcepts,
14402
+ Nw as filterByOnlineStatus,
14403
+ Pw as filterByPrivilege,
14394
14404
  Sv as filterCdsCardsForItems,
14395
- RE as filterReplacementEntries,
14396
- C_ as findActiveEncounterInSession,
14397
- $E as formatCountry,
14398
- Db as formatDateDistance,
14399
- Ib as formatDateTime,
14400
- IE as formatGender,
14401
- OE as formatUrl,
14402
- EE as generateId,
14403
- JE as generateIdentifier,
14405
+ Nv as filterExtensionsByPrivileges,
14406
+ OE as filterReplacementEntries,
14407
+ L_ as findActiveEncounterInSession,
14408
+ DE as formatCountry,
14409
+ Cb as formatDateDistance,
14410
+ $b as formatDateTime,
14411
+ $E as formatGender,
14412
+ AE as formatUrl,
14413
+ bE as generateId,
14414
+ QE as generateIdentifier,
14404
14415
  Qr as generateUUID,
14405
14416
  B as get,
14406
14417
  Rs as getActiveVisit,
14407
14418
  Tf as getActiveVisitByPatient,
14408
- ZE as getAddressHierarchyEntries,
14409
- _b as getAllAppointmentServices,
14419
+ eb as getAddressHierarchyEntries,
14420
+ vb as getAllAppointmentServices,
14410
14421
  Tm as getAllergies,
14411
- bb as getAppointmentById,
14412
- Rb as getAppointmentUnavailabilities,
14413
- LE as getAvailableLocations,
14422
+ _b as getAppointmentById,
14423
+ Ob as getAppointmentUnavailabilities,
14424
+ xE as getAvailableLocations,
14414
14425
  vv as getAvailableStocks,
14415
- E_ as getCategoryUuidFromOrderTypes,
14416
- jb as getConceptById,
14417
- Qb as getConditionPage,
14418
- Jb as getConditions,
14419
- v_ as getConfig,
14426
+ b_ as getCategoryUuidFromOrderTypes,
14427
+ Vb as getConceptById,
14428
+ Xb as getConditionPage,
14429
+ Qb as getConditions,
14430
+ T_ as getConfig,
14420
14431
  Di as getCookieByName,
14421
- N_ as getCurrentProvider,
14432
+ I_ as getCurrentProvider,
14422
14433
  sv as getCurrentStateName,
14423
- DE as getCurrentUser,
14424
- V_ as getCurrentUserPrivileges,
14425
- CE as getDefaultDateFormat,
14426
- e_ as getDiagnosesPage,
14427
- p_ as getDiagnosticReportBundle,
14428
- f_ as getDiagnosticReports,
14434
+ CE as getCurrentUser,
14435
+ H_ as getCurrentUserPrivileges,
14436
+ LE as getDefaultDateFormat,
14437
+ t_ as getDiagnosesPage,
14438
+ h_ as getDiagnosticReportBundle,
14439
+ p_ as getDiagnosticReports,
14429
14440
  mv as getDocumentReferencePage,
14430
- fw as getDocumentReferences,
14441
+ pw as getDocumentReferences,
14431
14442
  pv as getDocumentTypes,
14432
14443
  fv as getDocumentUploadMaxSizeMb,
14433
- Gb as getEncounterByUuid,
14444
+ Kb as getEncounterByUuid,
14434
14445
  pc as getEncounterSessionDuration,
14435
14446
  Jy as getEncounterSessionSnapshot,
14436
14447
  Cm as getEncounterTypeByName,
14437
- F_ as getEncountersAndVisitsForEOC,
14438
- __ as getExistingServiceRequestsForAllCategories,
14439
- Ow as getExtensionsByPoint,
14448
+ j_ as getEncountersAndVisitsForEOC,
14449
+ v_ as getExistingServiceRequestsForAllCategories,
14450
+ Aw as getExtensionsByPoint,
14440
14451
  wv as getFHIRLocationsByTag,
14441
- w_ as getFlattenedInvestigations,
14442
- Lb as getFormattedAge,
14443
- Bb as getFormattedAllergies,
14452
+ E_ as getFlattenedInvestigations,
14453
+ xb as getFormattedAge,
14454
+ zb as getFormattedAllergies,
14444
14455
  hv as getFormattedDocumentReferences,
14445
14456
  Yr as getFormattedError,
14446
- jE as getFormattedPatientById,
14447
- XE as getGenders,
14448
- YE as getIdentifierData,
14449
- zE as getIdentifierTypes,
14450
- sb as getInputTypeForFormat,
14451
- d_ as getLabInvestigationsBundle,
14457
+ VE as getFormattedPatientById,
14458
+ ZE as getGenders,
14459
+ GE as getIdentifierData,
14460
+ YE as getIdentifierTypes,
14461
+ ob as getInputTypeForFormat,
14462
+ f_ as getLabInvestigationsBundle,
14452
14463
  yv as getLocationByTag,
14453
- a_ as getMedicationByUuid,
14454
- A_ as getObservationsBundleByEncounterUuid,
14455
- b_ as getOrderTypeNames,
14464
+ i_ as getMedicationByUuid,
14465
+ P_ as getObservationsBundleByEncounterUuid,
14466
+ __ as getOrderTypeNames,
14456
14467
  Os as getOrderTypes,
14457
- eb as getOrderedAddressHierarchyLevels,
14458
- yb as getPastAppointments,
14459
- Sb as getPastAppointmentsPage,
14468
+ tb as getOrderedAddressHierarchyLevels,
14469
+ wb as getPastAppointments,
14470
+ Rb as getPastAppointmentsPage,
14460
14471
  of as getPatientById,
14461
- Zb as getPatientDiagnoses,
14462
- Yb as getPatientEncounters,
14472
+ e_ as getPatientDiagnoses,
14473
+ Gb as getPatientEncounters,
14463
14474
  G_ as getPatientFormData,
14464
14475
  Ev as getPatientImmunizations,
14465
14476
  Zm as getPatientMedicationBundle,
14466
- r_ as getPatientMedications,
14467
- O_ as getPatientObservations,
14477
+ n_ as getPatientMedications,
14478
+ A_ as getPatientObservations,
14468
14479
  Vy as getPatientObservationsBundle,
14469
- R_ as getPatientObservationsWithEncounterBundle,
14470
- tb as getPatientProfile,
14480
+ O_ as getPatientObservationsWithEncounterBundle,
14481
+ rb as getPatientProfile,
14471
14482
  ev as getPatientPrograms,
14472
14483
  tv as getPatientProgramsPage,
14473
- i_ as getPatientRadiologyInvestigationBundle,
14474
- c_ as getPatientRadiologyInvestigationBundleWithImagingStudy,
14475
- u_ as getPatientRadiologyInvestigations,
14476
- nb as getPersonAttributeTypes,
14484
+ c_ as getPatientRadiologyInvestigationBundle,
14485
+ u_ as getPatientRadiologyInvestigationBundleWithImagingStudy,
14486
+ l_ as getPatientRadiologyInvestigations,
14487
+ sb as getPersonAttributeTypes,
14477
14488
  ff as getPrimaryIdentifierType,
14478
- TE as getPriorityByOrder,
14489
+ SE as getPriorityByOrder,
14479
14490
  rv as getProgramByUUID,
14480
- $_ as getProviderLoginLocations,
14481
- rb as getRelationshipTypes,
14491
+ D_ as getProviderLoginLocations,
14492
+ nb as getRelationshipTypes,
14482
14493
  Jt as getServiceRequests,
14483
14494
  Av as getTasks,
14484
14495
  Rv as getTemplates,
14485
- Ub as getTimeInMinutes,
14486
- Cb as getTodayDate,
14487
- gb as getUpcomingAppointments,
14488
- Tb as getUpcomingAppointmentsPage,
14496
+ qb as getTimeInMinutes,
14497
+ Lb as getTodayDate,
14498
+ yb as getUpcomingAppointments,
14499
+ Sb as getUpcomingAppointmentsPage,
14489
14500
  Kt as getUserLoginLocation,
14490
14501
  an as getUserPreferredLocale,
14491
- o_ as getVaccinations,
14492
- AE as getValueType,
14502
+ a_ as getVaccinations,
14503
+ PE as getValueType,
14493
14504
  _v as getVisibleModules,
14494
- lb as getVisitTypes,
14505
+ db as getVisitTypes,
14495
14506
  Dm as getVisits,
14496
14507
  Z_ as getVitalFlowSheetData,
14497
- SE as groupByDate,
14498
- P_ as groupObservationsByEncounter,
14499
- H_ as hasPrivilege,
14500
- oE as initAppI18n,
14501
- j_ as initializeAuditListener,
14508
+ RE as groupByDate,
14509
+ Pv as groupExtensionsByPoint,
14510
+ N_ as groupObservationsByEncounter,
14511
+ tw as hasPrivilege,
14512
+ aE as initAppI18n,
14513
+ V_ as initializeAuditListener,
14502
14514
  Tv as invokeCDSSRule,
14503
- ob as isBooleanFormat,
14504
- ab as isConceptFormat,
14505
- cb as isDateFormat,
14506
- ib as isNumberFormat,
14507
- vE as isStringEmpty,
14508
- ub as isTextFormat,
14515
+ ab as isBooleanFormat,
14516
+ ib as isConceptFormat,
14517
+ ub as isDateFormat,
14518
+ cb as isNumberFormat,
14519
+ TE as isStringEmpty,
14520
+ lb as isTextFormat,
14509
14521
  ew as logAuditEvent,
14510
- T_ as logout,
14511
- zb as mapAllergyToInputEntry,
14512
- FE as mapGenderFromFhir,
14513
- Xb as markConditionAsInactive,
14514
- sE as normalizeTranslationKey,
14515
- qb as notificationService,
14522
+ S_ as logout,
14523
+ Yb as mapAllergyToInputEntry,
14524
+ jE as mapGenderFromFhir,
14525
+ Zb as markConditionAsInactive,
14526
+ oE as normalizeTranslationKey,
14527
+ Fb as notificationService,
14516
14528
  Ld as parseQueryParams,
14517
- nE as patch,
14529
+ sE as patch,
14518
14530
  ye as post,
14519
14531
  Ei as put,
14520
- wE as refreshQueries,
14532
+ EE as refreshQueries,
14521
14533
  Ov as renderAsHtml,
14522
- U_ as resetEncounterSession,
14523
- PE as resolveComboBoxItems,
14524
- L_ as resolveEncounterMatchDecision,
14534
+ q_ as resetEncounterSession,
14535
+ NE as resolveComboBoxItems,
14536
+ x_ as resolveEncounterMatchDecision,
14525
14537
  gv as saveDocument,
14526
- xE as saveUserLocation,
14527
- mb as searchAppointmentsByAttribute,
14538
+ kE as saveUserLocation,
14539
+ gb as searchAppointmentsByAttribute,
14528
14540
  gm as searchConceptByName,
14529
- Fb as searchConcepts,
14541
+ jb as searchConcepts,
14530
14542
  ss as searchEncounters,
14531
14543
  jr as searchFHIRConcepts,
14532
14544
  mm as searchFHIRConceptsByName,
14533
- s_ as searchMedications,
14534
- BE as searchPatientByCustomAttribute,
14535
- HE as searchPatientByNameOrId,
14536
- _E as setCookie,
14537
- k_ as setEncounterSessionDecision,
14538
- M_ as setEncounterSessionLoading,
14539
- Wb as shouldEnableEncounterFilter,
14540
- Mb as sortByDate,
14541
- Nw as sortByOrder,
14545
+ o_ as searchMedications,
14546
+ zE as searchPatientByCustomAttribute,
14547
+ BE as searchPatientByNameOrId,
14548
+ vE as setCookie,
14549
+ M_ as setEncounterSessionDecision,
14550
+ U_ as setEncounterSessionLoading,
14551
+ Jb as shouldEnableEncounterFilter,
14552
+ Ub as sortByDate,
14553
+ Iw as sortByOrder,
14542
14554
  Wy as subscribeEncounterSession,
14543
14555
  J_ as transformContainerObservationsToForm2Observations,
14544
14556
  K_ as transformFormDataToObservations,
14545
14557
  W_ as transformObservationsToFormData,
14546
- wb as updateAppointmentStatus,
14547
- h_ as updateDiagnosticReportBundle,
14548
- Kb as updateFhirEncounter,
14549
- QE as updateFhirPatient,
14550
- KE as updatePatient,
14558
+ Eb as updateAppointmentStatus,
14559
+ m_ as updateDiagnosticReportBundle,
14560
+ Wb as updateFhirEncounter,
14561
+ XE as updateFhirPatient,
14562
+ WE as updatePatient,
14551
14563
  nv as updateProgramState,
14552
- kE as updateSessionLocation,
14564
+ ME as updateSessionLocation,
14553
14565
  bv as uploadDocument,
14554
14566
  lv as useCDSSCheckListener,
14555
14567
  dv as useCDSSResultsListener,
14556
- aE as useCamera,
14557
- q_ as useEncounterSessionStore,
14568
+ iE as useCamera,
14569
+ F_ as useEncounterSessionStore,
14558
14570
  iv as useSubscribeConsultationSaved,
14559
- Iv as useTranslation
14571
+ Dv as useTranslation
14560
14572
  };