@bahmni/services 0.0.1-dev.351 → 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) => {
@@ -4685,13 +4685,25 @@ const ab = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype
4685
4685
  UPLOAD_PATIENT_DOCUMENT: {
4686
4686
  eventType: "UPLOAD_PATIENT_DOCUMENT",
4687
4687
  message: "UPLOAD_PATIENT_DOCUMENT_MESSAGE"
4688
+ },
4689
+ SEARCHED_PATIENT: {
4690
+ eventType: "SEARCHED_PATIENT",
4691
+ message: "SEARCHED_PATIENT_MESSAGE"
4692
+ },
4693
+ SEARCHED_APPOINTMENT: {
4694
+ eventType: "SEARCHED_APPOINTMENT",
4695
+ message: "SEARCHED_APPOINTMENT_MESSAGE"
4696
+ },
4697
+ SEARCHED_PATIENT_PROGRAM: {
4698
+ eventType: "SEARCHED_PATIENT_PROGRAM",
4699
+ message: "SEARCHED_PATIENT_PROGRAM_MESSAGE"
4688
4700
  }
4689
4701
  }, yf = W + "/auditlog", wf = {
4690
4702
  UNKNOWN_EVENT_TYPE: "AUDIT_LOG_ERROR_UNKNOWN_EVENT_TYPE"
4691
- }, 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) => {
4692
4704
  const e = await Tf(t);
4693
4705
  return e?.results && e.results.length > 0;
4694
- }, hb = async (t, e) => {
4706
+ }, fb = async (t, e) => {
4695
4707
  const r = await Sf(
4696
4708
  Kt().uuid
4697
4709
  ), n = {
@@ -7622,7 +7634,7 @@ function Bh(t, e, r) {
7622
7634
  function zh(t, e, r) {
7623
7635
  return ln(t, -e, r);
7624
7636
  }
7625
- const mb = {
7637
+ const pb = {
7626
7638
  PROPOSED: "proposed",
7627
7639
  PENDING: "pending",
7628
7640
  BOOKED: "booked",
@@ -7633,51 +7645,51 @@ const mb = {
7633
7645
  CHECKED_IN: "checked-in",
7634
7646
  WAITLIST: "waitlist",
7635
7647
  ENTERED_IN_ERROR: "entered-in-error"
7636
- }, 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) => {
7637
7649
  const s = e === "upcoming", o = s ? "ge" : "le", a = s ? "date" : "-date", i = s ? (/* @__PURE__ */ new Date()).toISOString() : Bh(/* @__PURE__ */ new Date()).toISOString();
7638
7650
  let c = `${se}/Appointment?patient=${t}&date=${o}${i}&_sort=${a}`;
7639
7651
  return r !== void 0 && r > 0 && (c += `&_count=${r}`), n !== void 0 && n > 0 && (c += `&_getpagesoffset=${n}`), c;
7640
- }, 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);
7641
- 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) {
7642
7654
  return await H(Kh(t));
7643
7655
  }
7644
- async function Eb(t, e) {
7656
+ async function yb(t, e) {
7645
7657
  return await H(
7646
7658
  Wh(t, e)
7647
7659
  );
7648
7660
  }
7649
- const bb = async (t, e, r) => await ge(Jh(t), {
7661
+ const wb = async (t, e, r) => await ge(Jh(t), {
7650
7662
  toStatus: e,
7651
7663
  onDate: r
7652
- }), _b = async (t, e) => ge(t, { appointmentUuid: e });
7653
- async function vb(t) {
7664
+ }), Eb = async (t, e) => ge(t, { appointmentUuid: e });
7665
+ async function bb(t) {
7654
7666
  return await H(Gh(t));
7655
7667
  }
7656
- const Tb = async () => await H(Qh), Sb = async (t) => {
7668
+ const _b = async () => await H(Qh), vb = async (t) => {
7657
7669
  await bi(Xh(t));
7658
7670
  };
7659
- async function Rb(t, e = 10, r = 1) {
7671
+ async function Tb(t, e = 10, r = 1) {
7660
7672
  const n = (r - 1) * e, s = await H(
7661
7673
  Zh(t, e, n)
7662
7674
  );
7663
7675
  return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
7664
7676
  }
7665
- async function Ob(t, e = 10, r = 1) {
7677
+ async function Sb(t, e = 10, r = 1) {
7666
7678
  const n = (r - 1) * e, s = await H(
7667
7679
  em(t, e, n)
7668
7680
  );
7669
7681
  return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
7670
7682
  }
7671
- const Ab = async () => await H(Xi), Pb = async (t) => {
7683
+ const Rb = async () => await H(Xi), Ob = async (t) => {
7672
7684
  await ge(Xi, t);
7673
- }, 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 = {
7674
7686
  PARSE_ERROR: "DATE_ERROR_PARSE",
7675
7687
  FORMAT_ERROR: "DATE_ERROR_FORMAT",
7676
7688
  EMPTY_OR_INVALID: "DATE_ERROR_EMPTY_OR_INVALID",
7677
7689
  INVALID_FORMAT: "DATE_ERROR_INVALID_FORMAT",
7678
7690
  NULL_OR_UNDEFINED: "DATE_ERROR_NULL_OR_UNDEFINED"
7679
7691
  };
7680
- function Ib(t) {
7692
+ function Pb(t) {
7681
7693
  if (!t) return null;
7682
7694
  const e = pn(t);
7683
7695
  if (!at(e)) return null;
@@ -7686,7 +7698,7 @@ function Ib(t) {
7686
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`;
7687
7699
  return { year: s, month: a, day: c, ageInDays: n, ageText: u };
7688
7700
  }
7689
- function $b(t) {
7701
+ function Nb(t) {
7690
7702
  if (typeof t != "string" || !/^\d{4}-\d{2}-\d{2}$/.test(t))
7691
7703
  return null;
7692
7704
  const e = pn(t);
@@ -7754,7 +7766,7 @@ function sm() {
7754
7766
  return Zi;
7755
7767
  }
7756
7768
  }
7757
- function Db(t, e, r = !1, n) {
7769
+ function Ib(t, e, r = !1, n) {
7758
7770
  const s = e ?? ((a) => a);
7759
7771
  let o;
7760
7772
  try {
@@ -7764,7 +7776,7 @@ function Db(t, e, r = !1, n) {
7764
7776
  }
7765
7777
  return r && !n && (o = `${o} ${rm}`), nm(t, o, s);
7766
7778
  }
7767
- function Cb(t, e, r) {
7779
+ function $b(t, e, r) {
7768
7780
  if (!t || !at(t) || e === null || e === void 0 || !r || typeof e != "number")
7769
7781
  return;
7770
7782
  const n = new Date(t);
@@ -7779,7 +7791,7 @@ function Cb(t, e, r) {
7779
7791
  return;
7780
7792
  }
7781
7793
  }
7782
- function Lb(t, e) {
7794
+ function Db(t, e) {
7783
7795
  if (t == null)
7784
7796
  return {
7785
7797
  formattedResult: "",
@@ -7831,11 +7843,11 @@ function Lb(t, e) {
7831
7843
  }
7832
7844
  return { formattedResult: c };
7833
7845
  }
7834
- const xb = () => {
7846
+ const Cb = () => {
7835
7847
  const t = /* @__PURE__ */ new Date();
7836
7848
  return t.setHours(0, 0, 0, 0), t;
7837
7849
  };
7838
- function kb(t, e) {
7850
+ function Lb(t, e) {
7839
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 = {
7840
7852
  years: "YEARS",
7841
7853
  months: "MONTHS",
@@ -7869,14 +7881,14 @@ const om = {
7869
7881
  h: 1 / 24,
7870
7882
  min: 1 / 1440,
7871
7883
  s: 1 / 86400
7872
- }, Mb = (t, e, r) => {
7884
+ }, xb = (t, e, r) => {
7873
7885
  const n = typeof t == "string" ? new Date(t) : t;
7874
7886
  if (isNaN(n.getTime()))
7875
7887
  throw new Error(`Invalid date: ${t}`);
7876
7888
  const s = om[r] ?? 1, o = e * s;
7877
7889
  return un(n, o);
7878
- }, Ub = (t, e, r, n) => t <= n && r <= e;
7879
- function qb(t, e, r = !1) {
7890
+ }, kb = (t, e, r, n) => t <= n && r <= e;
7891
+ function Mb(t, e, r = !1) {
7880
7892
  return !t || !Array.isArray(t) ? [] : t.sort((n, s) => {
7881
7893
  const o = new Date(n[e]), a = new Date(s[e]);
7882
7894
  if (isNaN(o.getTime()) && isNaN(a.getTime())) return 0;
@@ -7891,7 +7903,7 @@ function am(t) {
7891
7903
  const e = Rh(t, "hh:mm aa", /* @__PURE__ */ new Date());
7892
7904
  return at(e) ? zi(e, "HH:mm") : "";
7893
7905
  }
7894
- function Fb(t) {
7906
+ function Ub(t) {
7895
7907
  const e = am(t);
7896
7908
  if (!e) return null;
7897
7909
  const [r, n] = e.split(":").map(Number);
@@ -7926,10 +7938,10 @@ const im = () => {
7926
7938
  );
7927
7939
  }
7928
7940
  };
7929
- }, 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) => {
7930
7942
  const r = `${W}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(t)}`;
7931
7943
  return e ? `${r}&v=${encodeURIComponent(e)}` : r;
7932
- }, pm = "SHORT", hm = "FULLY_SPECIFIED", Vb = async (t, e = 20) => {
7944
+ }, pm = "SHORT", hm = "FULLY_SPECIFIED", Fb = async (t, e = 20) => {
7933
7945
  const r = an(), n = lm(t, e, r);
7934
7946
  return H(n);
7935
7947
  }, jr = async (t) => {
@@ -7939,7 +7951,7 @@ const im = () => {
7939
7951
  const e = `${um(t)}`;
7940
7952
  return H(e);
7941
7953
  };
7942
- async function Hb(t) {
7954
+ async function jb(t) {
7943
7955
  return await H(dm(t));
7944
7956
  }
7945
7957
  async function gm(t, e) {
@@ -7978,7 +7990,7 @@ const wm = (t) => se + `/AllergyIntolerance?patient=${t}&_count=100&_sort=-_last
7978
7990
  }), Cn = (t, e) => {
7979
7991
  const r = t.expansion?.contains ?? [];
7980
7992
  return bm(r).map((s) => _m(s, e));
7981
- }, Bb = async (t, e, r) => {
7993
+ }, Vb = async (t, e, r) => {
7982
7994
  const n = t ?? pt.MEDICATION.code, s = e ?? pt.FOOD.code, o = r ?? pt.ENVIRONMENT.code, [a, i, c] = await Promise.all([
7983
7995
  jr(n),
7984
7996
  jr(s),
@@ -7998,7 +8010,7 @@ const wm = (t) => se + `/AllergyIntolerance?patient=${t}&_count=100&_sort=-_last
7998
8010
  pt.ENVIRONMENT.display
7999
8011
  )
8000
8012
  ];
8001
- }, zb = async (t) => {
8013
+ }, Hb = async (t) => {
8002
8014
  const e = t ?? Em.code;
8003
8015
  return (await jr(e)).compose?.include[0]?.concept ?? [];
8004
8016
  };
@@ -8038,12 +8050,12 @@ function Sm(t) {
8038
8050
  };
8039
8051
  });
8040
8052
  }
8041
- async function Yb(t) {
8053
+ async function Bb(t) {
8042
8054
  const e = await Tm(t);
8043
8055
  return Sm(e);
8044
8056
  }
8045
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 || {});
8046
- function Gb(t) {
8058
+ function zb(t) {
8047
8059
  const e = t.code?.coding?.[0]?.code ?? t.id ?? "", r = t.reaction?.[0]?.severity, n = /* @__PURE__ */ new Set(), s = [];
8048
8060
  for (const o of t.reaction ?? [])
8049
8061
  for (const a of o.manifestation ?? [])
@@ -8127,7 +8139,7 @@ async function $m(t) {
8127
8139
  async function Dm(t) {
8128
8140
  return (await $m(t)).entry?.map((r) => r.resource).filter((r) => r !== void 0) ?? [];
8129
8141
  }
8130
- async function Kb(t) {
8142
+ async function Yb(t) {
8131
8143
  const r = [];
8132
8144
  let n = 0;
8133
8145
  for (; ; ) {
@@ -8148,7 +8160,7 @@ async function Cm(t) {
8148
8160
  async function Rs(t) {
8149
8161
  return (await Dm(t)).find((r) => !r.period?.end) ?? null;
8150
8162
  }
8151
- async function Wb(t, e) {
8163
+ async function Gb(t, e) {
8152
8164
  return await H(
8153
8165
  `/openmrs/ws/fhir2/R4/Encounter/${t}`,
8154
8166
  e
@@ -8157,20 +8169,20 @@ async function Wb(t, e) {
8157
8169
  async function Lm(t) {
8158
8170
  return await ge(tc, t);
8159
8171
  }
8160
- async function Jb(t, e) {
8172
+ async function Kb(t, e) {
8161
8173
  return await Ei(`${tc}/${t}`, e);
8162
8174
  }
8163
- 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) => {
8164
8176
  const s = se + `/Condition?category=${Es}&patient=${t}&_count=${e}&_getpagesoffset=${r}&_sort=-_lastUpdated`;
8165
8177
  return n ? `${s}&clinical-status=${n}` : s;
8166
8178
  };
8167
8179
  async function Mm(t) {
8168
8180
  return await H(`${xm(t)}`);
8169
8181
  }
8170
- async function Xb(t) {
8182
+ async function Jb(t) {
8171
8183
  return (await Mm(t)).entry?.filter((n) => n.resource?.resourceType === "Condition").map((n) => n.resource) ?? [];
8172
8184
  }
8173
- async function Zb(t, e = 10, r = 1, n) {
8185
+ async function Qb(t, e = 10, r = 1, n) {
8174
8186
  const s = (r - 1) * e, o = await H(
8175
8187
  km(t, e, s, n)
8176
8188
  );
@@ -8195,7 +8207,7 @@ function Oo(t, e, r, n) {
8195
8207
  practitionerUUIDs: n ? [n] : void 0
8196
8208
  });
8197
8209
  }
8198
- async function e_(t, e, r = !1, n, s, o) {
8210
+ async function Xb(t, e, r = !1, n, s, o) {
8199
8211
  const a = {
8200
8212
  ...t,
8201
8213
  category: [
@@ -8363,11 +8375,11 @@ function Ym(t) {
8363
8375
  }
8364
8376
  return Array.from(e.values());
8365
8377
  }
8366
- async function t_(t) {
8378
+ async function Zb(t) {
8367
8379
  const e = await Vm(t), r = rc(e);
8368
8380
  return Ym(r);
8369
8381
  }
8370
- async function r_(t, e = 10, r = 1) {
8382
+ async function e_(t, e = 10, r = 1) {
8371
8383
  const n = (r - 1) * e, s = await Hm(
8372
8384
  t,
8373
8385
  e,
@@ -8393,7 +8405,7 @@ const Ut = {
8393
8405
  }, Km = (t, e, r) => {
8394
8406
  let s = `${se + "/MedicationRequest?" + Ut.SORT + "&" + Ut.COUNT + "&" + Ut.INCLUDE_MEDICATION}&patient=${t}`;
8395
8407
  return e && (s += `&code=${e}`), r && (s += `&encounter=${r}`), s;
8396
- }, 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) => {
8397
8409
  switch (t.status) {
8398
8410
  case "active":
8399
8411
  return Be.Active;
@@ -8550,7 +8562,7 @@ function lg(t) {
8550
8562
  });
8551
8563
  }
8552
8564
  const Ao = (t) => t.priority === "stat";
8553
- async function s_(t, e, r, n = !1) {
8565
+ async function r_(t, e, r, n = !1) {
8554
8566
  const s = await Zm(
8555
8567
  t,
8556
8568
  e,
@@ -8559,21 +8571,21 @@ async function s_(t, e, r, n = !1) {
8559
8571
  );
8560
8572
  return lg(s);
8561
8573
  }
8562
- async function o_() {
8574
+ async function n_() {
8563
8575
  return await H(
8564
8576
  Wm
8565
8577
  );
8566
8578
  }
8567
- async function a_(t, e = 20) {
8579
+ async function s_(t, e = 20) {
8568
8580
  return await H(
8569
8581
  Jm(t, e)
8570
8582
  );
8571
8583
  }
8572
- async function i_() {
8584
+ async function o_() {
8573
8585
  return await H(Qm);
8574
8586
  }
8575
8587
  const dg = (t) => `${se}/Medication/${t}`;
8576
- async function c_(t) {
8588
+ async function a_(t) {
8577
8589
  return await H(dg(t));
8578
8590
  }
8579
8591
  const fg = 200, pg = (t, e, r, n, s) => {
@@ -8593,7 +8605,7 @@ async function Jt(t, e, r, n, s) {
8593
8605
  );
8594
8606
  }
8595
8607
  const hg = (t) => `${se}/ImagingStudy/${t}/$fetch-quality-assessment`;
8596
- async function u_(t, e, r, n) {
8608
+ async function i_(t, e, r, n) {
8597
8609
  return await Jt(
8598
8610
  e,
8599
8611
  t,
@@ -8601,7 +8613,7 @@ async function u_(t, e, r, n) {
8601
8613
  n
8602
8614
  );
8603
8615
  }
8604
- async function l_(t, e, r, n) {
8616
+ async function c_(t, e, r, n) {
8605
8617
  return await Jt(
8606
8618
  e,
8607
8619
  t,
@@ -8610,7 +8622,7 @@ async function l_(t, e, r, n) {
8610
8622
  "ImagingStudy:basedon"
8611
8623
  );
8612
8624
  }
8613
- async function d_(t, e, r, n) {
8625
+ async function u_(t, e, r, n) {
8614
8626
  return (await Jt(
8615
8627
  e,
8616
8628
  t,
@@ -8618,10 +8630,10 @@ async function d_(t, e, r, n) {
8618
8630
  n
8619
8631
  )).entry?.filter((a) => a.resource?.resourceType === "ServiceRequest").map((a) => a.resource) ?? [];
8620
8632
  }
8621
- async function f_(t) {
8633
+ async function l_(t) {
8622
8634
  return await H(hg(t));
8623
8635
  }
8624
- async function p_(t, e, r, n) {
8636
+ async function d_(t, e, r, n) {
8625
8637
  return await Jt(
8626
8638
  e,
8627
8639
  t,
@@ -8633,29 +8645,29 @@ const mg = (t, e) => {
8633
8645
  const r = `${se}/DiagnosticReport?patient=${t}`;
8634
8646
  return e ? `${r}&based-on=${e}` : r;
8635
8647
  }, gg = (t) => `${se}/DiagnosticReport/${t}/$fetch-bundle`, yg = (t) => `${se}/DiagnosticReport/${t}/$update-bundle`;
8636
- async function h_(t, e = []) {
8648
+ async function f_(t, e = []) {
8637
8649
  const r = e.length > 0 ? e.join(",") : void 0, n = mg(t, r);
8638
8650
  return await H(n);
8639
8651
  }
8640
- async function m_(t) {
8652
+ async function p_(t) {
8641
8653
  const e = gg(t);
8642
8654
  return await H(e);
8643
8655
  }
8644
- async function g_(t, e) {
8656
+ async function h_(t, e) {
8645
8657
  const r = yg(t);
8646
8658
  return await ge(r, e);
8647
8659
  }
8648
- const y_ = [
8660
+ const m_ = [
8649
8661
  "preliminary",
8650
8662
  "final",
8651
8663
  "amended",
8652
8664
  "corrected",
8653
8665
  "appended"
8654
- ], w_ = [
8666
+ ], g_ = [
8655
8667
  "registered",
8656
8668
  "unknown",
8657
8669
  "partial"
8658
- ], 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) => {
8659
8671
  let e = t.display ?? "Unknown investigation";
8660
8672
  return nc(t) === bg && (e += ` (${de.t("INVESTIGATION_PANEL")})`), e;
8661
8673
  }, Sg = (t) => {
@@ -8687,12 +8699,12 @@ const y_ = [
8687
8699
  });
8688
8700
  });
8689
8701
  }), r;
8690
- }, b_ = async () => {
8702
+ }, w_ = async () => {
8691
8703
  const t = await vg(), e = await Os();
8692
8704
  return Rg(t, Sg(e));
8693
- }, __ = async (t) => t ? (await Os()).results.find(
8705
+ }, E_ = async (t) => t ? (await Os()).results.find(
8694
8706
  (n) => n.display.toLowerCase() === t.toLowerCase()
8695
- )?.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) => {
8696
8708
  const n = [];
8697
8709
  for (const s of t) {
8698
8710
  const o = s.uuid;
@@ -13242,19 +13254,19 @@ var Dy = $y();
13242
13254
  const Cy = /* @__PURE__ */ Og(Dy), ja = {
13243
13255
  CONFIG_NOT_FOUND: "CONFIG_ERROR_NOT_FOUND",
13244
13256
  VALIDATION_FAILED: "CONFIG_ERROR_VALIDATION_FAILED"
13245
- }, S_ = async (t, e) => {
13257
+ }, v_ = async (t, e) => {
13246
13258
  const r = await Ly(t);
13247
13259
  if (!r)
13248
13260
  throw new Error(ja.CONFIG_NOT_FOUND);
13249
13261
  if (!await xy(r, e))
13250
13262
  throw new Error(ja.VALIDATION_FAILED);
13251
13263
  return r;
13252
- }, 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 () => {
13253
13265
  await bi(ys), ql.forEach((t) => Cd(t)), globalThis.location.href = mi;
13254
13266
  }, ky = (t) => W + `/form/${t}?v=custom:(uuid,name,version,published,resources:(value))`, My = (t) => {
13255
13267
  const e = W + "/bahmniie/form/latestPublishedForms";
13256
13268
  return t ? e + `?episodeUuid=${t}` : e;
13257
- }, 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) => {
13258
13270
  let s = W + "/bahmnicore/patient/" + t + "/forms";
13259
13271
  return r ? s += `?patientProgramUuid=${r}` : e && (s += `?numberOfVisits=${e}`), s;
13260
13272
  }, dc = (t, e, r, n) => {
@@ -13269,23 +13281,23 @@ async function Vy(t, e, r) {
13269
13281
  const n = dc(t, e, r);
13270
13282
  return await H(n);
13271
13283
  }
13272
- async function A_(t, e) {
13284
+ async function R_(t, e) {
13273
13285
  const r = dc(t, e, void 0, !0);
13274
13286
  return await H(r);
13275
13287
  }
13276
- async function P_(t, e, r) {
13288
+ async function O_(t, e, r) {
13277
13289
  return (await Vy(
13278
13290
  t,
13279
13291
  e,
13280
13292
  r
13281
13293
  )).entry?.filter((o) => o.resource?.resourceType === "Observation").map((o) => o.resource) ?? [];
13282
13294
  }
13283
- async function N_(t) {
13295
+ async function A_(t) {
13284
13296
  return await H(
13285
13297
  jy(t)
13286
13298
  );
13287
13299
  }
13288
- const Hy = (t) => t.split("/").pop() ?? "", I_ = (t, e) => {
13300
+ const Hy = (t) => t.split("/").pop() ?? "", P_ = (t, e) => {
13289
13301
  const r = /* @__PURE__ */ new Map(), n = e.entry?.filter((o) => o.resource?.resourceType === "Encounter").map((o) => o.resource) ?? [], s = /* @__PURE__ */ new Map();
13290
13302
  return n.forEach((o) => {
13291
13303
  o.id && s.set(o.id, o);
@@ -13309,13 +13321,13 @@ const Hy = (t) => t.split("/").pop() ?? "", I_ = (t, e) => {
13309
13321
  (o, a) => a.encounterDateTime - o.encounterDateTime
13310
13322
  );
13311
13323
  }, fc = (t) => W + `/provider?user=${t}&v=custom:(uuid,display,person,attributes)`, By = W + "/provider?v=custom:(uuid,display,person,attributes)";
13312
- async function $_(t) {
13324
+ async function N_(t) {
13313
13325
  const e = await H(
13314
13326
  fc(t)
13315
13327
  );
13316
13328
  return !e.results || e.results.length === 0 ? null : e.results[0];
13317
13329
  }
13318
- async function D_() {
13330
+ async function I_() {
13319
13331
  const t = [];
13320
13332
  let e = By;
13321
13333
  for (; e; ) {
@@ -13324,7 +13336,7 @@ async function D_() {
13324
13336
  }
13325
13337
  return t;
13326
13338
  }
13327
- async function C_(t) {
13339
+ async function $_(t) {
13328
13340
  const e = await H(fc(t));
13329
13341
  if (!e.results || e.results.length === 0)
13330
13342
  return [];
@@ -13333,7 +13345,7 @@ async function C_(t) {
13333
13345
  (n) => !n.voided && n.attributeType.display === "Login Locations"
13334
13346
  ).map((n) => n.value) : [];
13335
13347
  }
13336
- const zy = se + "/Encounter", Yy = W + "/systemsetting/bahmni.encountersession.duration", L_ = {
13348
+ const zy = se + "/Encounter", Yy = W + "/systemsetting/bahmni.encountersession.duration", D_ = {
13337
13349
  MATCHED: "ENCOUNTER_MATCH_REASON_MATCHED",
13338
13350
  NO_ACTIVE_VISIT: "ENCOUNTER_MATCH_REASON_NO_ACTIVE_VISIT",
13339
13351
  NO_ACTIVE_ENCOUNTER: "ENCOUNTER_MATCH_REASON_NO_ACTIVE_ENCOUNTER",
@@ -13371,7 +13383,7 @@ async function Gy(t, e) {
13371
13383
  return null;
13372
13384
  }
13373
13385
  }
13374
- async function x_(t, e, r, n) {
13386
+ async function C_(t, e, r, n) {
13375
13387
  try {
13376
13388
  if (!t) return null;
13377
13389
  const s = r ?? await pc(), a = `ge${new Date(Date.now() - s * 60 * 1e3).toISOString()}`, i = {
@@ -13408,7 +13420,7 @@ function zn(t) {
13408
13420
  return new Date(r.period?.start ?? 0).getTime() - n;
13409
13421
  });
13410
13422
  }
13411
- async function k_(t, e, r, n) {
13423
+ async function L_(t, e, r, n) {
13412
13424
  try {
13413
13425
  const s = await Rs(t);
13414
13426
  if (!s?.id)
@@ -13473,7 +13485,7 @@ async function k_(t, e, r, n) {
13473
13485
  };
13474
13486
  }
13475
13487
  }
13476
- function M_(t) {
13488
+ function x_(t) {
13477
13489
  return t.matched || t.reasons.includes("LOCATION_MISMATCH") && !t.reasons.includes("SESSION_EXPIRED") && !t.reasons.includes("PROVIDER_MISMATCH");
13478
13490
  }
13479
13491
  const hc = {
@@ -13499,7 +13511,7 @@ function Wy(t) {
13499
13511
  function Jy() {
13500
13512
  return Ht;
13501
13513
  }
13502
- function U_(t) {
13514
+ function k_(t) {
13503
13515
  const e = t.reasons.some(
13504
13516
  (r) => Ky.includes(r)
13505
13517
  );
@@ -13510,20 +13522,20 @@ function U_(t) {
13510
13522
  isLoading: !1
13511
13523
  }, $s();
13512
13524
  }
13513
- function q_(t) {
13525
+ function M_(t) {
13514
13526
  Ht = { ...Ht, isLoading: t }, $s();
13515
13527
  }
13516
- function F_() {
13528
+ function U_() {
13517
13529
  Ht = { ...hc }, $s();
13518
13530
  }
13519
- function j_() {
13531
+ function q_() {
13520
13532
  return Oc(
13521
13533
  Wy,
13522
13534
  Jy
13523
13535
  );
13524
13536
  }
13525
13537
  const Qy = (t) => se + `/EpisodeOfCare?_revinclude=Encounter:episode-of-care&_id=${t}`;
13526
- async function V_(t) {
13538
+ async function F_(t) {
13527
13539
  const e = t.join(","), r = await H(Qy(e));
13528
13540
  if (r.total === 0)
13529
13541
  throw new Error(
@@ -13559,14 +13571,14 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13559
13571
  module: n
13560
13572
  };
13561
13573
  return await ge(yf, a), { logged: !0 };
13562
- }, H_ = () => gf(async (e) => {
13574
+ }, j_ = () => gf(async (e) => {
13563
13575
  await ew(
13564
13576
  e.patientUuid,
13565
13577
  e.eventType,
13566
13578
  e.messageParams,
13567
13579
  e.module
13568
13580
  );
13569
- }), B_ = async () => {
13581
+ }), V_ = async () => {
13570
13582
  try {
13571
13583
  const t = await H(ys);
13572
13584
  return t.user ? t.user.privileges : null;
@@ -13574,7 +13586,7 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13574
13586
  const { message: e } = Yr(t);
13575
13587
  throw new Error(e);
13576
13588
  }
13577
- }, z_ = (t, e) => {
13589
+ }, H_ = (t, e) => {
13578
13590
  if (!t || t.length === 0)
13579
13591
  return !1;
13580
13592
  if (!e || e.length === 0)
@@ -13614,12 +13626,12 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13614
13626
  editable: n.editable
13615
13627
  }))
13616
13628
  };
13617
- }, Y_ = async (t) => {
13629
+ }, B_ = async (t) => {
13618
13630
  const e = await tw(t), r = an();
13619
13631
  return e.map(
13620
13632
  (n) => nw(n, r)
13621
13633
  );
13622
- }, G_ = async (t) => {
13634
+ }, z_ = async (t) => {
13623
13635
  const e = await fetch(ky(t));
13624
13636
  if (!e.ok)
13625
13637
  throw new Error(
@@ -13653,7 +13665,7 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13653
13665
  schema: n,
13654
13666
  translations: u
13655
13667
  };
13656
- }, K_ = async (t, e, r) => {
13668
+ }, Y_ = async (t, e, r) => {
13657
13669
  const n = await fetch(qy(t));
13658
13670
  if (!n.ok) return null;
13659
13671
  const s = await n.json(), a = (Array.isArray(s.results) ? s.results : []).filter(
@@ -13675,7 +13687,7 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13675
13687
  (u) => new Date(u.auditInfo.dateCreated).getTime() <= r
13676
13688
  );
13677
13689
  return c.length === 0 ? i[0].uuid : c.at(-1).uuid;
13678
- }, W_ = async (t, e, r) => {
13690
+ }, G_ = async (t, e, r) => {
13679
13691
  let n;
13680
13692
  e && e.length > 0 && (n = e.join(","));
13681
13693
  const s = Fy(t, r, n), o = await H(s);
@@ -13720,7 +13732,7 @@ function yc(t, e) {
13720
13732
  };
13721
13733
  return n(r.controls);
13722
13734
  }
13723
- function J_(t, e) {
13735
+ function K_(t, e) {
13724
13736
  if (!t.controls || t.controls.length === 0)
13725
13737
  return [];
13726
13738
  const r = [], n = (/* @__PURE__ */ new Date()).toISOString();
@@ -13765,7 +13777,7 @@ function J_(t, e) {
13765
13777
  s.interpretation && (a.interpretation = s.interpretation), s.comment && (a.comment = s.comment), r.push(a);
13766
13778
  }), r;
13767
13779
  }
13768
- function Q_(t, e) {
13780
+ function W_(t, e) {
13769
13781
  if (!t || t.length === 0)
13770
13782
  return {
13771
13783
  controls: [],
@@ -13801,7 +13813,7 @@ function Q_(t, e) {
13801
13813
  function sw(t) {
13802
13814
  return t == null ? null : typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "object" ? t : null;
13803
13815
  }
13804
- function X_(t) {
13816
+ function J_(t) {
13805
13817
  const e = (n) => {
13806
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 = {
13807
13819
  concept: {
@@ -13817,11 +13829,11 @@ function X_(t) {
13817
13829
  };
13818
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);
13819
13831
  }
13820
- function Z_(t) {
13832
+ function Q_(t) {
13821
13833
  if (!(!t || typeof t != "object"))
13822
13834
  return "toJS" in t && typeof t.toJS == "function" ? t.toJS() : t;
13823
13835
  }
13824
- function ev(t, e) {
13836
+ function X_(t, e) {
13825
13837
  !t || !Array.isArray(t.children) || t.children.forEach((r) => {
13826
13838
  r && typeof r == "object" && wc(
13827
13839
  r,
@@ -13851,24 +13863,7 @@ function wc(t, e) {
13851
13863
  );
13852
13864
  });
13853
13865
  }
13854
- function ow(t) {
13855
- const e = t.value && typeof t.value == "object" ? t.value : null;
13856
- if (!e)
13857
- return t.value === null || t.value === void 0 || t.value === "";
13858
- const r = e.value;
13859
- if (r != null && r !== "")
13860
- return !1;
13861
- const n = e.concept;
13862
- return n != null ? Array.isArray(n) ? n.length === 0 : !1 : !0;
13863
- }
13864
- function aw(t) {
13865
- if (!t || typeof t != "object") return !1;
13866
- const e = t.children, r = Array.isArray(e) && e.length > 0, s = t.control?.properties;
13867
- return !r && s?.mandatory === !0 && !t.hidden && !t.voided && ow(t) ? !0 : t.hidden || t.voided ? !1 : r ? e.some(
13868
- (o) => o && typeof o == "object" && aw(o)
13869
- ) : !1;
13870
- }
13871
- const iw = W + "/bahmnicore/diseaseSummaryData?", tv = async (t, e, r, n) => {
13866
+ const ow = W + "/bahmnicore/diseaseSummaryData?", Z_ = async (t, e, r, n) => {
13872
13867
  const s = new URLSearchParams({
13873
13868
  groupBy: n,
13874
13869
  latestCount: e.toString(),
@@ -13877,17 +13872,17 @@ const iw = W + "/bahmnicore/diseaseSummaryData?", tv = async (t, e, r, n) => {
13877
13872
  r.forEach((a) => {
13878
13873
  s.append("obsConcepts", a);
13879
13874
  });
13880
- const o = iw + s.toString();
13875
+ const o = ow + s.toString();
13881
13876
  return H(o);
13882
- }, 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) => {
13883
13878
  const n = (r - 1) * e, s = await H(
13884
- uw(t, e, n)
13879
+ iw(t, e, n)
13885
13880
  );
13886
13881
  return {
13887
13882
  programs: s.results,
13888
13883
  total: s.totalCount
13889
13884
  };
13890
- }, sv = async (t) => await H(lw(t)), ov = async (t, e) => {
13885
+ }, rv = async (t) => await H(cw(t)), nv = async (t, e) => {
13891
13886
  const r = {
13892
13887
  uuid: t,
13893
13888
  states: [
@@ -13901,7 +13896,7 @@ const iw = W + "/bahmnicore/diseaseSummaryData?", tv = async (t, e, r, n) => {
13901
13896
  r
13902
13897
  );
13903
13898
  };
13904
- function av(t) {
13899
+ function sv(t) {
13905
13900
  if (t.states.length === 0)
13906
13901
  return null;
13907
13902
  let e;
@@ -13917,7 +13912,7 @@ function av(t) {
13917
13912
  e = t.states.find((r) => r.endDate === null);
13918
13913
  return e ? ym(e.state.concept.names) ?? e.state.concept.display : null;
13919
13914
  }
13920
- function iv(t, e) {
13915
+ function ov(t, e) {
13921
13916
  if (e.length === 0)
13922
13917
  return {};
13923
13918
  const r = {};
@@ -13929,12 +13924,12 @@ function iv(t, e) {
13929
13924
  }
13930
13925
  return r;
13931
13926
  }
13932
- const as = "consultation:saved", cv = (t) => {
13927
+ const as = "consultation:saved", av = (t) => {
13933
13928
  const e = new CustomEvent(as, {
13934
13929
  detail: t
13935
13930
  });
13936
13931
  window.dispatchEvent(e);
13937
- }, uv = (t, e = []) => {
13932
+ }, iv = (t, e = []) => {
13938
13933
  const r = qt(t);
13939
13934
  nt(() => {
13940
13935
  r.current = t;
@@ -13947,17 +13942,17 @@ const as = "consultation:saved", cv = (t) => {
13947
13942
  window.removeEventListener(as, n);
13948
13943
  };
13949
13944
  }, e);
13950
- }, is = "cdss:check", cs = "cdss:results", lv = (t) => {
13945
+ }, is = "cdss:check", cs = "cdss:results", cv = (t) => {
13951
13946
  const e = new CustomEvent(is, {
13952
13947
  detail: t
13953
13948
  });
13954
13949
  globalThis.dispatchEvent(e);
13955
- }, dv = (t) => {
13950
+ }, uv = (t) => {
13956
13951
  const e = new CustomEvent(cs, {
13957
13952
  detail: t
13958
13953
  });
13959
13954
  globalThis.dispatchEvent(e);
13960
- }, fv = (t) => {
13955
+ }, lv = (t) => {
13961
13956
  const e = qt(t);
13962
13957
  nt(() => {
13963
13958
  e.current = t;
@@ -13970,7 +13965,7 @@ const as = "consultation:saved", cv = (t) => {
13970
13965
  globalThis.removeEventListener(is, r);
13971
13966
  };
13972
13967
  }, []);
13973
- }, pv = (t) => {
13968
+ }, dv = (t) => {
13974
13969
  const e = qt(t);
13975
13970
  nt(() => {
13976
13971
  e.current = t;
@@ -13983,17 +13978,17 @@ const as = "consultation:saved", cv = (t) => {
13983
13978
  globalThis.removeEventListener(cs, r);
13984
13979
  };
13985
13980
  }, []);
13986
- }, 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) => {
13987
13982
  const s = `${se}/DocumentReference?patient=${t}&_sort=-_lastUpdated&_count=${r}&_getpagesoffset=${n}`;
13988
13983
  return e && e.length > 0 ? `${s}&encounter=${encodeURIComponent(e.join(","))}` : s;
13989
13984
  };
13990
- async function hv() {
13985
+ async function fv() {
13991
13986
  const t = await H(
13992
- pw
13987
+ dw
13993
13988
  ), e = Number(t.results?.[0]?.value);
13994
13989
  return Number.isFinite(e) && e > 0 ? e : void 0;
13995
13990
  }
13996
- async function mv(t) {
13991
+ async function pv(t) {
13997
13992
  return ((await gm(t, "custom:(setMembers:(uuid,display))"))?.setMembers ?? []).map((n) => ({
13998
13993
  id: n.uuid,
13999
13994
  label: n.display ?? ""
@@ -14016,17 +14011,17 @@ function _c(t) {
14016
14011
  };
14017
14012
  });
14018
14013
  }
14019
- async function hw(t, e) {
14014
+ async function fw(t, e) {
14020
14015
  const r = bc(t, e);
14021
14016
  return H(r);
14022
14017
  }
14023
- async function gv(t, e) {
14024
- const n = ((await hw(t, e)).entry ?? []).filter(
14018
+ async function hv(t, e) {
14019
+ const n = ((await fw(t, e)).entry ?? []).filter(
14025
14020
  (s) => !!s.resource
14026
14021
  );
14027
14022
  return _c(n);
14028
14023
  }
14029
- async function yv(t, e, r = 10, n = 1) {
14024
+ async function mv(t, e, r = 10, n = 1) {
14030
14025
  const s = (n - 1) * r, o = bc(
14031
14026
  t,
14032
14027
  e,
@@ -14066,7 +14061,7 @@ function vc(t, e) {
14066
14061
  }
14067
14062
  ]), r;
14068
14063
  }
14069
- function mw(t, e, r, n, s, o) {
14064
+ function pw(t, e, r, n, s, o) {
14070
14065
  const a = {
14071
14066
  resourceType: "Encounter",
14072
14067
  status: "finished",
@@ -14111,16 +14106,16 @@ function mw(t, e, r, n, s, o) {
14111
14106
  }
14112
14107
  ]), a;
14113
14108
  }
14114
- async function gw(t) {
14109
+ async function hw(t) {
14115
14110
  const e = vc(
14116
14111
  t,
14117
14112
  `Encounter/${t.encounterUuid}`
14118
14113
  );
14119
- return ge(dw, e);
14114
+ return ge(uw, e);
14120
14115
  }
14121
- async function wv(t) {
14116
+ async function gv(t) {
14122
14117
  if (t.encounterUuid)
14123
- return gw({
14118
+ return hw({
14124
14119
  ...t,
14125
14120
  encounterUuid: t.encounterUuid
14126
14121
  });
@@ -14128,7 +14123,7 @@ async function wv(t) {
14128
14123
  throw new Error(
14129
14124
  "saveDocument requires either encounterUuid or createEncounterInVisit"
14130
14125
  );
14131
- 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(
14132
14127
  t.patientUuid,
14133
14128
  e,
14134
14129
  r,
@@ -14141,27 +14136,27 @@ async function wv(t) {
14141
14136
  ]);
14142
14137
  return ge(ns, i);
14143
14138
  }
14144
- 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)}`;
14145
- async function Ev(t) {
14146
- 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 ?? [];
14147
14142
  }
14148
- async function bv(t) {
14149
- return await H(ww(t));
14143
+ async function wv(t) {
14144
+ return await H(gw(t));
14150
14145
  }
14151
- const Ew = se + "/Immunization", bw = (t, e) => {
14152
- 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`;
14153
14148
  return e && (r += `&status=${e}`), r;
14154
14149
  };
14155
- async function _v(t, e) {
14156
- 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) ?? [];
14157
14152
  }
14158
- async function _w(t, e) {
14153
+ async function Ew(t, e) {
14159
14154
  return H(
14160
- bw(t, e)
14155
+ ww(t, e)
14161
14156
  );
14162
14157
  }
14163
- const vw = W + "/bahmnicore/visitDocument/uploadDocument", Tw = "application";
14164
- async function Sw(t) {
14158
+ const bw = W + "/bahmnicore/visitDocument/uploadDocument", _w = "application";
14159
+ async function vw(t) {
14165
14160
  return new Promise((e, r) => {
14166
14161
  const n = new FileReader();
14167
14162
  n.onload = () => {
@@ -14174,7 +14169,7 @@ async function Sw(t) {
14174
14169
  let a = o, i = "";
14175
14170
  const c = o.lastIndexOf(".");
14176
14171
  c !== -1 && (a = o.substring(0, c), i = o.substring(c + 1).toLowerCase());
14177
- const u = t.type ? t.type.split("/")[0] : Tw;
14172
+ const u = t.type ? t.type.split("/")[0] : _w;
14178
14173
  e({
14179
14174
  content: s,
14180
14175
  fileName: a,
@@ -14186,8 +14181,8 @@ async function Sw(t) {
14186
14181
  }, n.readAsDataURL(t);
14187
14182
  });
14188
14183
  }
14189
- async function vv(t, e, r) {
14190
- const n = await Sw(t), s = {
14184
+ async function bv(t, e, r) {
14185
+ const n = await vw(t), s = {
14191
14186
  content: n.content,
14192
14187
  encounterTypeName: e,
14193
14188
  fileName: n.fileName,
@@ -14195,29 +14190,29 @@ async function vv(t, e, r) {
14195
14190
  format: n.format,
14196
14191
  patientUuid: r
14197
14192
  };
14198
- return ge(vw, s);
14193
+ return ge(bw, s);
14199
14194
  }
14200
- 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") => {
14201
14196
  try {
14202
- const e = `${Rw}/${t}/v2/extension.json`, r = await fetch(e);
14197
+ const e = `${Tw}/${t}/v2/extension.json`, r = await fetch(e);
14203
14198
  if (!r.ok)
14204
14199
  throw new Error(`Failed to load base extensions: ${r.status}`);
14205
- return Ow(await r.json());
14200
+ return Sw(await r.json());
14206
14201
  } catch (e) {
14207
14202
  throw console.error("Error fetching module extensions:", e), e;
14208
14203
  }
14209
- }, Pw = (t, e = Tc, r = "link") => t.filter((n) => {
14204
+ }, Ow = (t, e = Tc, r = "link") => t.filter((n) => {
14210
14205
  const s = n.extensionPointId === e, o = r === "all" || n.type === r;
14211
14206
  return s && o;
14212
- }), 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) => {
14213
14208
  const e = navigator.onLine;
14214
14209
  return t.filter((r) => !(r.exclusiveOnlineModule && !e || r.exclusiveOfflineModule && e));
14215
- }, $w = (t) => [...t].sort((e, r) => (e.order ?? 0) - (r.order ?? 0)), Tv = async (t = Tc, e) => {
14216
- const r = await Aw("home"), n = Pw(r, t), s = Nw(n, e), o = Iw(s);
14217
- return $w(o);
14218
- }, Dw = (t, e) => W + `/availableStocks?productUuid=${t}&locationUuid=${e}`, Sv = async (t, e) => await H(
14219
- Dw(t, e)
14220
- ), 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) => {
14221
14216
  const n = t.find((o) => o.server === e);
14222
14217
  if (!n)
14223
14218
  throw new Error(`CDSS server "${e}" not found in configuration`);
@@ -14229,7 +14224,7 @@ const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow =
14229
14224
  `CDSS service "${r}" not found in server "${e}"`
14230
14225
  );
14231
14226
  return { serverConfig: n, serviceConfig: s };
14232
- }, Lw = (t, e) => {
14227
+ }, Dw = (t, e) => {
14233
14228
  if (!e || e.length === 0)
14234
14229
  return {};
14235
14230
  const r = {};
@@ -14243,8 +14238,8 @@ const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow =
14243
14238
  entry: s
14244
14239
  });
14245
14240
  }), r;
14246
- }, Rv = async (t, e, r, n) => {
14247
- 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(
14248
14243
  n,
14249
14244
  a.contextResourceMap
14250
14245
  ), c = `${o.url}/${a.name}`, u = {
@@ -14261,7 +14256,7 @@ const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow =
14261
14256
  c,
14262
14257
  u
14263
14258
  )).cards || [];
14264
- }, Ov = (t, e) => {
14259
+ }, Sv = (t, e) => {
14265
14260
  const r = [];
14266
14261
  return t.forEach((n) => {
14267
14262
  !n.suggestions || n.suggestions.length === 0 || n.suggestions.forEach((s) => {
@@ -14278,43 +14273,43 @@ const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow =
14278
14273
  });
14279
14274
  }), r;
14280
14275
  };
14281
- async function Av() {
14276
+ async function Rv() {
14282
14277
  return H(`${ws}/templates`);
14283
14278
  }
14284
- async function Pv(t) {
14279
+ async function Ov(t) {
14285
14280
  return (await ge(
14286
14281
  `${ws}/render`,
14287
14282
  t
14288
14283
  )).html;
14289
14284
  }
14290
- const xw = (t, e, r) => {
14285
+ const Cw = (t, e, r) => {
14291
14286
  let s = se + "/Task?_sort=-_lastUpdated";
14292
14287
  return t && (s += `&subject:Patient=${t}`), e && (s += `&based-on=${e}`), r && r.length > 0 && (s += `&encounter=${r.join(",")}`), s;
14293
14288
  };
14294
- async function Nv(t, e, r) {
14289
+ async function Av(t, e, r) {
14295
14290
  return H(
14296
- xw(t, e, r)
14291
+ Cw(t, e, r)
14297
14292
  );
14298
14293
  }
14299
14294
  export {
14300
- gb as APPOINTMENT_IDENTIFIER_SYSTEM,
14301
- mb as APPOINTMENT_STATUSES,
14295
+ hb as APPOINTMENT_IDENTIFIER_SYSTEM,
14296
+ pb as APPOINTMENT_STATUSES,
14302
14297
  Zn as AUDIT_LOG_EVENT_DETAILS,
14303
14298
  Om as AllergySeverity,
14304
14299
  Rm as AllergyStatus,
14305
14300
  pf as AttributeFormat,
14306
14301
  hf as AttributeInputType,
14307
14302
  Fl as BAHMNI_APP_BASE_PATH,
14308
- sE as BAHMNI_HOME_PATH,
14303
+ rE as BAHMNI_HOME_PATH,
14309
14304
  wi as BAHMNI_USER_LOCATION_COOKIE,
14310
14305
  Nd as BIRTH_TIME_EXT_URL,
14311
14306
  is as CDSS_CHECK_EVENT,
14312
14307
  cs as CDSS_RESULTS_EVENT,
14313
- mE as CONCEPT_DATATYPE_COMPLEX,
14314
- hE as CONCEPT_DATATYPE_NUMERIC,
14308
+ pE as CONCEPT_DATATYPE_COMPLEX,
14309
+ fE as CONCEPT_DATATYPE_NUMERIC,
14315
14310
  as as CONSULTATION_SAVED_EVENT,
14316
14311
  Dd as DATETIME_REGEX_PATTERN,
14317
- wE as DATE_REGEX_PATTERN,
14312
+ gE as DATE_REGEX_PATTERN,
14318
14313
  Zi as DEFAULT_DATE_FORMAT,
14319
14314
  tm as DEFAULT_DATE_FORMAT_STORAGE_KEY,
14320
14315
  rm as DEFAULT_TIME_FORMAT,
@@ -14323,240 +14318,239 @@ export {
14323
14318
  Ni as FHIR_ENCOUNTER_CLASS_CODE_SYSTEM,
14324
14319
  Ii as FHIR_ENCOUNTER_TAG_SYSTEM,
14325
14320
  Pi as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
14326
- lE as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
14327
- fE as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
14328
- dE as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
14329
- gE as FHIR_OBSERVATION_STATUS_FINAL,
14330
- pE as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
14331
- 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,
14332
14327
  $d as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
14333
14328
  Es as HL7_CONDITION_CATEGORY_CONDITION_CODE,
14334
14329
  $i as HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE,
14335
14330
  Id as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
14336
- uE as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
14337
- EE as INTERPRETATION_TO_CODE,
14338
- 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,
14339
14334
  mi as LOGIN_PATH,
14340
- L_ as MATCH_REASON_MESSAGES,
14341
- FE as MAX_NAME_LENGTH,
14342
- qE as MAX_PATIENT_AGE_YEARS,
14343
- jE as MAX_PHONE_NUMBER_LENGTH,
14344
- 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,
14345
14340
  Be as MedicationStatus,
14346
14341
  se as OPENMRS_FHIR_R4,
14347
14342
  W as OPENMRS_REST_V1,
14348
- E_ as ORDER_TYPE_QUERY_KEY,
14349
- w_ as PENDING_REPORT_STATUSES,
14350
- y_ as PROCESSED_REPORT_STATUSES,
14351
- 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,
14352
14347
  Im as buildEncounterResource,
14353
- $b as calculateAge,
14354
- Mb as calculateEndDate,
14355
- Cb as calculateOnsetDate,
14348
+ Nb as calculateAge,
14349
+ xb as calculateEndDate,
14350
+ $b as calculateOnsetDate,
14356
14351
  Ci as camelToScreamingSnakeCase,
14357
- M_ as canResumeOwnInSessionEncounter,
14358
- vE as capitalize,
14359
- pb as checkIfActiveVisitExists,
14360
- _b as checkInAppointment,
14361
- Ib as computeAgeDetails,
14362
- 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,
14363
14358
  am as convertTo24HourFormat,
14364
- $E as convertToSentenceCase,
14365
- Pb as createAppointmentUnavailability,
14359
+ NE as convertToSentenceCase,
14360
+ Ob as createAppointmentUnavailability,
14366
14361
  yt as createBundleEntry,
14367
- gw as createDocumentReference,
14362
+ hw as createDocumentReference,
14368
14363
  rs as createEncounterBundle,
14369
14364
  Lm as createFhirEncounter,
14370
- QE as createFhirPatient,
14371
- WE as createPatient,
14372
- hb as createVisitForPatient,
14365
+ WE as createFhirPatient,
14366
+ GE as createPatient,
14367
+ fb as createVisitForPatient,
14373
14368
  bi as del,
14374
- Sb as deleteAppointmentService,
14369
+ vb as deleteAppointmentService,
14375
14370
  Cd as deleteCookie,
14376
14371
  mf as dispatchAuditEvent,
14377
- lv as dispatchCDSSCheck,
14378
- dv as dispatchCDSSResults,
14379
- cv as dispatchConsultationSaved,
14380
- Ub as doDateRangesOverlap,
14381
- iv as extractAttributes,
14382
- ev as extractNotesFromFormData,
14383
- D_ as fetchAllProviders,
14384
- Bb as fetchAndFormatAllergenConcepts,
14385
- G_ as fetchFormMetadata,
14386
- K_ as fetchFormUuidByObservationDate,
14387
- o_ as fetchMedicationOrdersMetadata,
14388
- Aw as fetchModuleExtensions,
14389
- Y_ as fetchObservationForms,
14390
- BE as fetchPatientPhotoFromUrl,
14391
- f_ as fetchQualityAssessment,
14392
- zb as fetchReactionConcepts,
14393
- Iw as filterByOnlineStatus,
14394
- Nw as filterByPrivilege,
14395
- Ov as filterCdsCardsForItems,
14396
- AE as filterReplacementEntries,
14397
- x_ as findActiveEncounterInSession,
14398
- CE as formatCountry,
14399
- Lb as formatDateDistance,
14400
- Db as formatDateTime,
14401
- DE as formatGender,
14402
- PE as formatUrl,
14403
- _E as generateId,
14404
- 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,
14405
14400
  Qr as generateUUID,
14406
14401
  H as get,
14407
14402
  Rs as getActiveVisit,
14408
14403
  Tf as getActiveVisitByPatient,
14409
- tb as getAddressHierarchyEntries,
14410
- Tb as getAllAppointmentServices,
14404
+ ZE as getAddressHierarchyEntries,
14405
+ _b as getAllAppointmentServices,
14411
14406
  Tm as getAllergies,
14412
- vb as getAppointmentById,
14413
- Ab as getAppointmentUnavailabilities,
14414
- kE as getAvailableLocations,
14415
- Sv as getAvailableStocks,
14416
- __ as getCategoryUuidFromOrderTypes,
14417
- Hb as getConceptById,
14418
- Zb as getConditionPage,
14419
- Xb as getConditions,
14420
- 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,
14421
14416
  Di as getCookieByName,
14422
- $_ as getCurrentProvider,
14423
- av as getCurrentStateName,
14424
- LE as getCurrentUser,
14425
- B_ as getCurrentUserPrivileges,
14426
- xE as getDefaultDateFormat,
14427
- r_ as getDiagnosesPage,
14428
- m_ as getDiagnosticReportBundle,
14429
- h_ as getDiagnosticReports,
14430
- yv as getDocumentReferencePage,
14431
- hw as getDocumentReferences,
14432
- mv as getDocumentTypes,
14433
- hv as getDocumentUploadMaxSizeMb,
14434
- 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,
14435
14430
  pc as getEncounterSessionDuration,
14436
14431
  Jy as getEncounterSessionSnapshot,
14437
14432
  Cm as getEncounterTypeByName,
14438
- V_ as getEncountersAndVisitsForEOC,
14439
- T_ as getExistingServiceRequestsForAllCategories,
14440
- Pw as getExtensionsByPoint,
14441
- bv as getFHIRLocationsByTag,
14442
- b_ as getFlattenedInvestigations,
14443
- kb as getFormattedAge,
14444
- Yb as getFormattedAllergies,
14445
- 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,
14446
14441
  Yr as getFormattedError,
14447
- HE as getFormattedPatientById,
14448
- eb as getGenders,
14449
- KE as getIdentifierData,
14450
- GE as getIdentifierTypes,
14451
- ab as getInputTypeForFormat,
14452
- p_ as getLabInvestigationsBundle,
14453
- Ev as getLocationByTag,
14454
- c_ as getMedicationByUuid,
14455
- N_ as getObservationsBundleByEncounterUuid,
14456
- 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,
14457
14452
  Os as getOrderTypes,
14458
- rb as getOrderedAddressHierarchyLevels,
14459
- Eb as getPastAppointments,
14460
- Ob as getPastAppointmentsPage,
14453
+ eb as getOrderedAddressHierarchyLevels,
14454
+ yb as getPastAppointments,
14455
+ Sb as getPastAppointmentsPage,
14461
14456
  of as getPatientById,
14462
- t_ as getPatientDiagnoses,
14463
- Kb as getPatientEncounters,
14464
- W_ as getPatientFormData,
14465
- _v as getPatientImmunizations,
14457
+ Zb as getPatientDiagnoses,
14458
+ Yb as getPatientEncounters,
14459
+ G_ as getPatientFormData,
14460
+ Ev as getPatientImmunizations,
14466
14461
  Zm as getPatientMedicationBundle,
14467
- s_ as getPatientMedications,
14468
- P_ as getPatientObservations,
14462
+ r_ as getPatientMedications,
14463
+ O_ as getPatientObservations,
14469
14464
  Vy as getPatientObservationsBundle,
14470
- A_ as getPatientObservationsWithEncounterBundle,
14471
- nb as getPatientProfile,
14472
- rv as getPatientPrograms,
14473
- nv as getPatientProgramsPage,
14474
- u_ as getPatientRadiologyInvestigationBundle,
14475
- l_ as getPatientRadiologyInvestigationBundleWithImagingStudy,
14476
- d_ as getPatientRadiologyInvestigations,
14477
- 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,
14478
14473
  ff as getPrimaryIdentifierType,
14479
- RE as getPriorityByOrder,
14480
- sv as getProgramByUUID,
14481
- C_ as getProviderLoginLocations,
14482
- sb as getRelationshipTypes,
14474
+ TE as getPriorityByOrder,
14475
+ rv as getProgramByUUID,
14476
+ $_ as getProviderLoginLocations,
14477
+ rb as getRelationshipTypes,
14483
14478
  Jt as getServiceRequests,
14484
- Nv as getTasks,
14485
- Av as getTemplates,
14486
- Fb as getTimeInMinutes,
14487
- xb as getTodayDate,
14488
- wb as getUpcomingAppointments,
14489
- 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,
14490
14485
  Kt as getUserLoginLocation,
14491
14486
  an as getUserPreferredLocale,
14492
- i_ as getVaccinations,
14493
- NE as getValueType,
14494
- Tv as getVisibleModules,
14495
- fb as getVisitTypes,
14487
+ o_ as getVaccinations,
14488
+ AE as getValueType,
14489
+ _v as getVisibleModules,
14490
+ lb as getVisitTypes,
14496
14491
  Dm as getVisits,
14497
- tv as getVitalFlowSheetData,
14498
- OE as groupByDate,
14499
- I_ as groupObservationsByEncounter,
14500
- aw as hasMissingMandatoryVisibleField,
14501
- z_ as hasPrivilege,
14502
- iE as initAppI18n,
14503
- H_ as initializeAuditListener,
14504
- Rv as invokeCDSSRule,
14505
- ib as isBooleanFormat,
14506
- cb as isConceptFormat,
14507
- lb as isDateFormat,
14508
- ub as isNumberFormat,
14509
- SE as isStringEmpty,
14510
- 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,
14511
14505
  ew as logAuditEvent,
14512
- R_ as logout,
14513
- Gb as mapAllergyToInputEntry,
14514
- VE as mapGenderFromFhir,
14515
- e_ as markConditionAsInactive,
14516
- aE as normalizeTranslationKey,
14517
- 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,
14518
14512
  Ld as parseQueryParams,
14519
- oE as patch,
14513
+ nE as patch,
14520
14514
  ge as post,
14521
14515
  Ei as put,
14522
- bE as refreshQueries,
14523
- Pv as renderAsHtml,
14524
- F_ as resetEncounterSession,
14525
- IE as resolveComboBoxItems,
14526
- k_ as resolveEncounterMatchDecision,
14527
- wv as saveDocument,
14528
- ME as saveUserLocation,
14529
- 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,
14530
14524
  gm as searchConceptByName,
14531
- Vb as searchConcepts,
14525
+ Fb as searchConcepts,
14532
14526
  ss as searchEncounters,
14533
14527
  jr as searchFHIRConcepts,
14534
14528
  mm as searchFHIRConceptsByName,
14535
- a_ as searchMedications,
14536
- YE as searchPatientByCustomAttribute,
14537
- zE as searchPatientByNameOrId,
14538
- TE as setCookie,
14539
- U_ as setEncounterSessionDecision,
14540
- q_ as setEncounterSessionLoading,
14541
- Qb as shouldEnableEncounterFilter,
14542
- qb as sortByDate,
14543
- $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,
14544
14538
  Wy as subscribeEncounterSession,
14545
- X_ as transformContainerObservationsToForm2Observations,
14546
- J_ as transformFormDataToObservations,
14547
- Q_ as transformObservationsToFormData,
14548
- bb as updateAppointmentStatus,
14549
- g_ as updateDiagnosticReportBundle,
14550
- Jb as updateFhirEncounter,
14551
- ZE as updateFhirPatient,
14552
- JE as updatePatient,
14553
- ov as updateProgramState,
14554
- UE as updateSessionLocation,
14555
- vv as uploadDocument,
14556
- fv as useCDSSCheckListener,
14557
- pv as useCDSSResultsListener,
14558
- cE as useCamera,
14559
- j_ as useEncounterSessionStore,
14560
- uv as useSubscribeConsultationSaved,
14561
- 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
14562
14556
  };