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

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,6 +1,6 @@
1
1
  import { initReactI18next as Rc } from "react-i18next";
2
- import { useTranslation as Dv } from "react-i18next";
3
- import { useRef as qt, useCallback as vn, useEffect as nt, useSyncExternalStore as Oc } from "react";
2
+ import { useTranslation as Iv } from "react-i18next";
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() {
6
6
  return t.apply(e, arguments);
@@ -20,7 +20,7 @@ const { toString: Ac } = Object.prototype, { getPrototypeOf: wt } = Object, { it
20
20
  }, Pc = (t, e) => t != null && Ft(t, e) ? t[e] : void 0, us = /* @__PURE__ */ ((t) => (e) => {
21
21
  const r = Ac.call(e);
22
22
  return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
23
- })(/* @__PURE__ */ Object.create(null)), ke = (t) => (t = t.toLowerCase(), (e) => us(e) === t), rn = (t) => (e) => typeof e === t, { isArray: st } = Array, Et = rn("undefined");
23
+ })(/* @__PURE__ */ Object.create(null)), ke = (t) => (t = t.toLowerCase(), (e) => us(e) === t), rn = (t) => (e) => typeof e === t, { isArray: nt } = Array, Et = rn("undefined");
24
24
  function Tt(t) {
25
25
  return t !== null && !Et(t) && t.constructor !== null && !Et(t.constructor) && Ie(t.constructor.isBuffer) && t.constructor.isBuffer(t);
26
26
  }
@@ -67,7 +67,7 @@ function zt(t, e, { allOwnKeys: r = !1 } = {}) {
67
67
  if (t === null || typeof t > "u")
68
68
  return;
69
69
  let n, s;
70
- if (typeof t != "object" && (t = [t]), st(t))
70
+ if (typeof t != "object" && (t = [t]), nt(t))
71
71
  for (n = 0, s = t.length; n < s; n++)
72
72
  e.call(null, t[n], n, t);
73
73
  else {
@@ -90,17 +90,17 @@ function Ka(t, e) {
90
90
  return s;
91
91
  return null;
92
92
  }
93
- const tt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Wa = (t) => !Et(t) && t !== tt;
93
+ const et = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Wa = (t) => !Et(t) && t !== et;
94
94
  function Gn(...t) {
95
95
  const { caseless: e, skipUndefined: r } = Wa(this) && this || {}, n = {}, s = (o, a) => {
96
96
  if (a === "__proto__" || a === "constructor" || a === "prototype")
97
97
  return;
98
98
  const i = e && typeof a == "string" && Ka(n, a) || a, c = Hr(n, i) ? n[i] : void 0;
99
- Ur(c) && Ur(o) ? n[i] = Gn(c, o) : Ur(o) ? n[i] = Gn({}, o) : st(o) ? n[i] = o.slice() : (!r || !Et(o)) && (n[i] = o);
99
+ Ur(c) && Ur(o) ? n[i] = Gn(c, o) : Ur(o) ? n[i] = Gn({}, o) : nt(o) ? n[i] = o.slice() : (!r || !Et(o)) && (n[i] = o);
100
100
  };
101
101
  for (let o = 0, a = t.length; o < a; o++) {
102
102
  const i = t[o];
103
- if (!i || Tt(i) || (zt(i, s), typeof i != "object" || st(i)))
103
+ if (!i || Tt(i) || (zt(i, s), typeof i != "object" || nt(i)))
104
104
  continue;
105
105
  const c = Object.getOwnPropertySymbols(i);
106
106
  for (let u = 0; u < c.length; u++) {
@@ -157,7 +157,7 @@ const Kc = (t, e, r, { allOwnKeys: n } = {}) => (zt(
157
157
  return n !== -1 && n === r;
158
158
  }, Zc = (t) => {
159
159
  if (!t) return null;
160
- if (st(t)) return t;
160
+ if (nt(t)) return t;
161
161
  let e = t.length;
162
162
  if (!Ga(e)) return null;
163
163
  const r = new Array(e);
@@ -206,7 +206,7 @@ const Kc = (t, e, r, { allOwnKeys: n } = {}) => (zt(
206
206
  r[o] = !0;
207
207
  });
208
208
  };
209
- return st(t) ? n(t) : n(String(t).split(e)), r;
209
+ return nt(t) ? n(t) : n(String(t).split(e)), r;
210
210
  }, uu = () => {
211
211
  }, lu = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
212
212
  function du(t) {
@@ -221,7 +221,7 @@ const fu = (t) => {
221
221
  return n;
222
222
  if (!("toJSON" in n)) {
223
223
  e.add(n);
224
- const s = st(n) ? [] : {};
224
+ const s = nt(n) ? [] : {};
225
225
  return zt(n, (o, a) => {
226
226
  const i = r(o);
227
227
  !Et(i) && (s[a] = i);
@@ -231,16 +231,16 @@ const fu = (t) => {
231
231
  return n;
232
232
  };
233
233
  return r(t);
234
- }, pu = ke("AsyncFunction"), hu = (t) => t && (St(t) || Ie(t)) && Ie(t.then) && Ie(t.catch), Qa = ((t, e) => t ? setImmediate : e ? ((r, n) => (tt.addEventListener(
234
+ }, pu = ke("AsyncFunction"), hu = (t) => t && (St(t) || Ie(t)) && Ie(t.then) && Ie(t.catch), Qa = ((t, e) => t ? setImmediate : e ? ((r, n) => (et.addEventListener(
235
235
  "message",
236
236
  ({ source: s, data: o }) => {
237
- s === tt && o === r && n.length && n.shift()();
237
+ s === et && o === r && n.length && n.shift()();
238
238
  },
239
239
  !1
240
240
  ), (s) => {
241
- n.push(s), tt.postMessage(r, "*");
242
- }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", Ie(tt.postMessage)), mu = typeof queueMicrotask < "u" ? queueMicrotask.bind(tt) : typeof process < "u" && process.nextTick || Qa, Xa = (t) => t != null && Ie(t[Bt]), gu = (t) => t != null && Ft(t, Bt) && Xa(t), A = {
243
- isArray: st,
241
+ n.push(s), et.postMessage(r, "*");
242
+ }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", Ie(et.postMessage)), mu = typeof queueMicrotask < "u" ? queueMicrotask.bind(et) : typeof process < "u" && process.nextTick || Qa, Xa = (t) => t != null && Ie(t[Bt]), gu = (t) => t != null && Ft(t, Bt) && Xa(t), A = {
243
+ isArray: nt,
244
244
  isArrayBuffer: Ya,
245
245
  isBuffer: Tt,
246
246
  isFormData: jc,
@@ -293,7 +293,7 @@ const fu = (t) => {
293
293
  noop: uu,
294
294
  toFiniteNumber: lu,
295
295
  findKey: Ka,
296
- global: tt,
296
+ global: et,
297
297
  isContextDefined: Wa,
298
298
  isSpecCompliantForm: du,
299
299
  toJSONObject: fu,
@@ -927,7 +927,7 @@ function ai(t) {
927
927
  }
928
928
  return null;
929
929
  }
930
- const it = (t, e) => t != null && A.hasOwnProp(t, e) ? t[e] : void 0;
930
+ const at = (t, e) => t != null && A.hasOwnProp(t, e) ? t[e] : void 0;
931
931
  function Yu(t, e, r) {
932
932
  if (A.isString(t))
933
933
  try {
@@ -954,11 +954,11 @@ const Yt = {
954
954
  return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
955
955
  let i;
956
956
  if (o) {
957
- const c = it(this, "formSerializer");
957
+ const c = at(this, "formSerializer");
958
958
  if (n.indexOf("application/x-www-form-urlencoded") > -1)
959
959
  return Hu(e, c).toString();
960
960
  if ((i = A.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
961
- const u = it(this, "env"), l = u && u.FormData;
961
+ const u = at(this, "env"), l = u && u.FormData;
962
962
  return nn(
963
963
  i ? { "files[]": e } : e,
964
964
  l && new l(),
@@ -971,16 +971,16 @@ const Yt = {
971
971
  ],
972
972
  transformResponse: [
973
973
  function(e) {
974
- const r = it(this, "transitional") || Yt.transitional, n = r && r.forcedJSONParsing, s = it(this, "responseType"), o = s === "json";
974
+ const r = at(this, "transitional") || Yt.transitional, n = r && r.forcedJSONParsing, s = at(this, "responseType"), o = s === "json";
975
975
  if (A.isResponse(e) || A.isReadableStream(e))
976
976
  return e;
977
977
  if (e && A.isString(e) && (n && !s || o)) {
978
978
  const i = !(r && r.silentJSONParsing) && o;
979
979
  try {
980
- return JSON.parse(e, it(this, "parseReviver"));
980
+ return JSON.parse(e, at(this, "parseReviver"));
981
981
  } catch (c) {
982
982
  if (i)
983
- throw c.name === "SyntaxError" ? B.from(c, B.ERR_BAD_RESPONSE, this, null, it(this, "response")) : c;
983
+ throw c.name === "SyntaxError" ? B.from(c, B.ERR_BAD_RESPONSE, this, null, at(this, "response")) : c;
984
984
  }
985
985
  }
986
986
  return e;
@@ -1180,7 +1180,7 @@ function ui(t, e, r, n) {
1180
1180
  return t && (s || r === !1) ? (Hs(t, n), Zu(t, e)) : e;
1181
1181
  }
1182
1182
  const Bs = (t) => t instanceof Pe ? { ...t } : t;
1183
- function ot(t, e) {
1183
+ function st(t, e) {
1184
1184
  t = t || {}, e = e || {};
1185
1185
  const r = /* @__PURE__ */ Object.create(null);
1186
1186
  Object.defineProperty(r, "hasOwnProperty", {
@@ -1282,7 +1282,7 @@ const al = (t) => encodeURIComponent(t).replace(
1282
1282
  (e, r) => String.fromCharCode(parseInt(r, 16))
1283
1283
  );
1284
1284
  function li(t) {
1285
- const e = ot({}, t), r = (y) => A.hasOwnProp(e, y) ? e[y] : void 0, n = r("data");
1285
+ const e = st({}, t), r = (y) => A.hasOwnProp(e, y) ? e[y] : void 0, n = r("data");
1286
1286
  let s = r("withXSRFToken");
1287
1287
  const o = r("xsrfHeaderName"), a = r("xsrfCookieName");
1288
1288
  let i = r("headers");
@@ -1952,7 +1952,7 @@ const Fr = {
1952
1952
  assertOptions: _l,
1953
1953
  validators: sn
1954
1954
  }, Ae = Fr.validators;
1955
- let rt = class {
1955
+ let tt = class {
1956
1956
  constructor(e) {
1957
1957
  this.defaults = e || {}, this.interceptors = {
1958
1958
  request: new qs(),
@@ -1998,7 +1998,7 @@ let rt = class {
1998
1998
  }
1999
1999
  }
2000
2000
  _request(e, r) {
2001
- typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = ot(this.defaults, r);
2001
+ typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = st(this.defaults, r);
2002
2002
  const { transitional: n, paramsSerializer: s, headers: o } = r;
2003
2003
  n !== void 0 && Fr.assertOptions(
2004
2004
  n,
@@ -2073,15 +2073,15 @@ let rt = class {
2073
2073
  return l;
2074
2074
  }
2075
2075
  getUri(e) {
2076
- e = ot(this.defaults, e);
2076
+ e = st(this.defaults, e);
2077
2077
  const r = ui(e.baseURL, e.url, e.allowAbsoluteUrls, e);
2078
2078
  return si(r, e.params, e.paramsSerializer);
2079
2079
  }
2080
2080
  };
2081
2081
  A.forEach(["delete", "get", "head", "options"], function(e) {
2082
- rt.prototype[e] = function(r, n) {
2082
+ tt.prototype[e] = function(r, n) {
2083
2083
  return this.request(
2084
- ot(n || {}, {
2084
+ st(n || {}, {
2085
2085
  method: e,
2086
2086
  url: r,
2087
2087
  data: n && A.hasOwnProp(n, "data") ? n.data : void 0
@@ -2093,7 +2093,7 @@ A.forEach(["post", "put", "patch", "query"], function(e) {
2093
2093
  function r(n) {
2094
2094
  return function(o, a, i) {
2095
2095
  return this.request(
2096
- ot(i || {}, {
2096
+ st(i || {}, {
2097
2097
  method: e,
2098
2098
  headers: n ? {
2099
2099
  "Content-Type": "multipart/form-data"
@@ -2104,7 +2104,7 @@ A.forEach(["post", "put", "patch", "query"], function(e) {
2104
2104
  );
2105
2105
  };
2106
2106
  }
2107
- rt.prototype[e] = r(), e !== "query" && (rt.prototype[e + "Form"] = r(!0));
2107
+ tt.prototype[e] = r(), e !== "query" && (tt.prototype[e + "Form"] = r(!0));
2108
2108
  });
2109
2109
  let vl = class pi {
2110
2110
  constructor(e) {
@@ -2262,13 +2262,13 @@ Object.entries(Jn).forEach(([t, e]) => {
2262
2262
  Jn[e] = t;
2263
2263
  });
2264
2264
  function hi(t) {
2265
- const e = new rt(t), r = Ba(rt.prototype.request, e);
2266
- return A.extend(r, rt.prototype, e, { allOwnKeys: !0 }), A.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
2267
- return hi(ot(t, s));
2265
+ const e = new tt(t), r = Ba(tt.prototype.request, e);
2266
+ return A.extend(r, tt.prototype, e, { allOwnKeys: !0 }), A.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
2267
+ return hi(st(t, s));
2268
2268
  }, r;
2269
2269
  }
2270
2270
  const he = hi(Yt);
2271
- he.Axios = rt;
2271
+ he.Axios = tt;
2272
2272
  he.CanceledError = Gt;
2273
2273
  he.CancelToken = vl;
2274
2274
  he.isCancel = ii;
@@ -2281,30 +2281,30 @@ he.all = function(e) {
2281
2281
  };
2282
2282
  he.spread = Tl;
2283
2283
  he.isAxiosError = Sl;
2284
- he.mergeConfig = ot;
2284
+ he.mergeConfig = st;
2285
2285
  he.AxiosHeaders = Pe;
2286
2286
  he.formToJSON = (t) => ai(A.isHTMLForm(t) ? new FormData(t) : t);
2287
2287
  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;
@@ -2567,7 +2567,7 @@ const H = async (t, e) => (await Ke.get(t, e)).data, ge = async (t, e) => (await
2567
2567
  for (const n in e)
2568
2568
  n !== "__proto__" && n !== "constructor" && (n in t ? J(t[n]) || t[n] instanceof String || J(e[n]) || e[n] instanceof String ? r && (t[n] = e[n]) : _i(t[n], e[n], r) : t[n] = e[n]);
2569
2569
  return t;
2570
- }, ct = (t) => t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
2570
+ }, it = (t) => t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
2571
2571
  var Kl = {
2572
2572
  "&": "&amp;",
2573
2573
  "<": "&lt;",
@@ -3207,7 +3207,7 @@ class rd {
3207
3207
  maxReplaces: h,
3208
3208
  alwaysFormat: p
3209
3209
  } = e.interpolation;
3210
- this.escape = r !== void 0 ? r : Wl, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = o ? ct(o) : a || "{{", this.suffix = i ? ct(i) : c || "}}", this.formatSeparator = u || ",", this.unescapePrefix = l ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = y ? ct(y) : _ || ct("$t("), this.nestingSuffix = v ? ct(v) : S || ct(")"), this.nestingOptionsSeparator = g || ",", this.maxReplaces = h || 1e3, this.alwaysFormat = p !== void 0 ? p : !1, this.resetRegExp();
3210
+ this.escape = r !== void 0 ? r : Wl, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = o ? it(o) : a || "{{", this.suffix = i ? it(i) : c || "}}", this.formatSeparator = u || ",", this.unescapePrefix = l ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = y ? it(y) : _ || it("$t("), this.nestingSuffix = v ? it(v) : S || it(")"), this.nestingOptionsSeparator = g || ",", this.maxReplaces = h || 1e3, this.alwaysFormat = p !== void 0 ? p : !1, this.resetRegExp();
3211
3211
  }
3212
3212
  reset() {
3213
3213
  this.options && this.init(this.options);
@@ -3320,7 +3320,7 @@ const nd = (t) => {
3320
3320
  formatName: e,
3321
3321
  formatOptions: r
3322
3322
  };
3323
- }, ut = (t) => {
3323
+ }, ct = (t) => {
3324
3324
  const e = {};
3325
3325
  return (r, n, s) => {
3326
3326
  let o = s;
@@ -3337,32 +3337,32 @@ class sd {
3337
3337
  constructor() {
3338
3338
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3339
3339
  this.logger = Fe.create("formatter"), this.options = e, this.formats = {
3340
- number: ut((r, n) => {
3340
+ number: ct((r, n) => {
3341
3341
  const s = new Intl.NumberFormat(r, {
3342
3342
  ...n
3343
3343
  });
3344
3344
  return (o) => s.format(o);
3345
3345
  }),
3346
- currency: ut((r, n) => {
3346
+ currency: ct((r, n) => {
3347
3347
  const s = new Intl.NumberFormat(r, {
3348
3348
  ...n,
3349
3349
  style: "currency"
3350
3350
  });
3351
3351
  return (o) => s.format(o);
3352
3352
  }),
3353
- datetime: ut((r, n) => {
3353
+ datetime: ct((r, n) => {
3354
3354
  const s = new Intl.DateTimeFormat(r, {
3355
3355
  ...n
3356
3356
  });
3357
3357
  return (o) => s.format(o);
3358
3358
  }),
3359
- relativetime: ut((r, n) => {
3359
+ relativetime: ct((r, n) => {
3360
3360
  const s = new Intl.RelativeTimeFormat(r, {
3361
3361
  ...n
3362
3362
  });
3363
3363
  return (o) => s.format(o, n.range || "day");
3364
3364
  }),
3365
- list: ut((r, n) => {
3365
+ list: ct((r, n) => {
3366
3366
  const s = new Intl.ListFormat(r, {
3367
3367
  ...n
3368
3368
  });
@@ -3380,7 +3380,7 @@ class sd {
3380
3380
  this.formats[e.toLowerCase().trim()] = r;
3381
3381
  }
3382
3382
  addCached(e, r) {
3383
- this.formats[e.toLowerCase().trim()] = ut(r);
3383
+ this.formats[e.toLowerCase().trim()] = ct(r);
3384
3384
  }
3385
3385
  format(e, r, n) {
3386
3386
  let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
@@ -4027,18 +4027,18 @@ var pd = {
4027
4027
  return n;
4028
4028
  }
4029
4029
  };
4030
- let lt = null;
4030
+ let ut = null;
4031
4031
  const mo = () => {
4032
- if (lt !== null) return lt;
4032
+ if (ut !== null) return ut;
4033
4033
  try {
4034
- if (lt = typeof window < "u" && window.localStorage !== null, !lt)
4034
+ if (ut = typeof window < "u" && window.localStorage !== null, !ut)
4035
4035
  return !1;
4036
4036
  const t = "i18next.translate.boo";
4037
4037
  window.localStorage.setItem(t, "foo"), window.localStorage.removeItem(t);
4038
4038
  } catch {
4039
- lt = !1;
4039
+ ut = !1;
4040
4040
  }
4041
- return lt;
4041
+ return ut;
4042
4042
  };
4043
4043
  var gd = {
4044
4044
  name: "localStorage",
@@ -4058,18 +4058,18 @@ var gd = {
4058
4058
  r && mo() && window.localStorage.setItem(r, t);
4059
4059
  }
4060
4060
  };
4061
- let dt = null;
4061
+ let lt = null;
4062
4062
  const go = () => {
4063
- if (dt !== null) return dt;
4063
+ if (lt !== null) return lt;
4064
4064
  try {
4065
- if (dt = typeof window < "u" && window.sessionStorage !== null, !dt)
4065
+ if (lt = typeof window < "u" && window.sessionStorage !== null, !lt)
4066
4066
  return !1;
4067
4067
  const t = "i18next.translate.boo";
4068
4068
  window.sessionStorage.setItem(t, "foo"), window.sessionStorage.removeItem(t);
4069
4069
  } catch {
4070
- dt = !1;
4070
+ lt = !1;
4071
4071
  }
4072
- return dt;
4072
+ return lt;
4073
4073
  };
4074
4074
  var yd = {
4075
4075
  name: "sessionStorage",
@@ -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({
@@ -4288,15 +4288,15 @@ function cE() {
4288
4288
  },
4289
4289
  []
4290
4290
  );
4291
- return nt(() => () => n(), [n]), { videoRef: t, start: r, stop: n, capture: s };
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", 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) => {
@@ -4632,7 +4632,7 @@ const ab = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype
4632
4632
  return window.addEventListener("bahmni-audit-log", e), () => {
4633
4633
  window.removeEventListener("bahmni-audit-log", e);
4634
4634
  };
4635
- }, Ze = {
4635
+ }, mt = {
4636
4636
  CLINICAL: "MODULE_LABEL_CLINICAL_KEY",
4637
4637
  REGISTRATION: "MODULE_LABEL_REGISTRATION_KEY"
4638
4638
  }, Zn = {
@@ -4647,27 +4647,27 @@ const ab = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype
4647
4647
  VIEWED_REGISTRATION_PATIENT_SEARCH: {
4648
4648
  eventType: "VIEWED_REGISTRATION_PATIENT_SEARCH",
4649
4649
  message: "VIEWED_REGISTRATION_PATIENT_SEARCH_MESSAGE",
4650
- module: Ze.REGISTRATION
4650
+ module: mt.REGISTRATION
4651
4651
  },
4652
4652
  REGISTER_NEW_PATIENT: {
4653
4653
  eventType: "REGISTER_NEW_PATIENT",
4654
4654
  message: "REGISTER_NEW_PATIENT_MESSAGE",
4655
- module: Ze.REGISTRATION
4655
+ module: mt.REGISTRATION
4656
4656
  },
4657
4657
  VIEWED_NEW_PATIENT_PAGE: {
4658
4658
  eventType: "VIEWED_NEW_PATIENT_PAGE",
4659
4659
  message: "VIEWED_NEW_PATIENT_PAGE_MESSAGE",
4660
- module: Ze.REGISTRATION
4660
+ module: mt.REGISTRATION
4661
4661
  },
4662
4662
  OPEN_VISIT: {
4663
4663
  eventType: "OPEN_VISIT",
4664
4664
  message: "OPEN_VISIT_MESSAGE",
4665
- module: Ze.REGISTRATION
4665
+ module: mt.REGISTRATION
4666
4666
  },
4667
4667
  EDIT_PATIENT_DETAILS: {
4668
4668
  eventType: "EDIT_PATIENT_DETAILS",
4669
4669
  message: "EDIT_PATIENT_DETAILS_MESSAGE",
4670
- module: Ze.REGISTRATION
4670
+ module: mt.REGISTRATION
4671
4671
  },
4672
4672
  VIEWED_RADIOLOGY_RESULTS: {
4673
4673
  eventType: "VIEWED_RADIOLOGY_RESULTS",
@@ -4677,11 +4677,6 @@ const ab = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype
4677
4677
  eventType: "STOP_MEDICATION",
4678
4678
  message: "STOP_MEDICATION_MESSAGE"
4679
4679
  },
4680
- CREATE_ENCOUNTER: {
4681
- eventType: "CREATE_ENCOUNTER",
4682
- message: "CREATE_ENCOUNTER_MESSAGE",
4683
- module: Ze.REGISTRATION
4684
- },
4685
4680
  UPLOAD_PATIENT_DOCUMENT: {
4686
4681
  eventType: "UPLOAD_PATIENT_DOCUMENT",
4687
4682
  message: "UPLOAD_PATIENT_DOCUMENT_MESSAGE"
@@ -4700,10 +4695,10 @@ const ab = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype
4700
4695
  }
4701
4696
  }, yf = W + "/auditlog", wf = {
4702
4697
  UNKNOWN_EVENT_TYPE: "AUDIT_LOG_ERROR_UNKNOWN_EVENT_TYPE"
4703
- }, Ef = () => W + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", bf = W + "/visit", _f = (t) => W + `/visit?patient=${t}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, vf = (t) => W + `/bahmnicore/visitLocation/${t}`, fb = async () => H(Ef()), Tf = async (t) => H(_f(t)), Sf = async (t) => H(vf(t)), Rf = async (t) => ge(bf, t), pb = async (t) => {
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 () => H(Ef()), Tf = async (t) => H(_f(t)), Sf = async (t) => H(vf(t)), Rf = async (t) => ge(bf, t), db = async (t) => {
4704
4699
  const e = await Tf(t);
4705
4700
  return e?.results && e.results.length > 0;
4706
- }, hb = async (t, e) => {
4701
+ }, fb = async (t, e) => {
4707
4702
  const r = await Sf(
4708
4703
  Kt().uuid
4709
4704
  ), n = {
@@ -4812,7 +4807,7 @@ function Mt(t, e) {
4812
4807
  function $f(t) {
4813
4808
  return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
4814
4809
  }
4815
- function at(t) {
4810
+ function ot(t) {
4816
4811
  return !(!$f(t) && typeof t != "number" || isNaN(+fe(t)));
4817
4812
  }
4818
4813
  function Df(t, e, r) {
@@ -5401,7 +5396,7 @@ const ze = {
5401
5396
  );
5402
5397
  return ue(s, e.length);
5403
5398
  }
5404
- }, ft = {
5399
+ }, dt = {
5405
5400
  midnight: "midnight",
5406
5401
  noon: "noon",
5407
5402
  morning: "morning",
@@ -5772,7 +5767,7 @@ const ze = {
5772
5767
  b: function(t, e, r) {
5773
5768
  const n = t.getHours();
5774
5769
  let s;
5775
- switch (n === 12 ? s = ft.noon : n === 0 ? s = ft.midnight : s = n / 12 >= 1 ? "pm" : "am", e) {
5770
+ switch (n === 12 ? s = dt.noon : n === 0 ? s = dt.midnight : s = n / 12 >= 1 ? "pm" : "am", e) {
5776
5771
  case "b":
5777
5772
  case "bb":
5778
5773
  return r.dayPeriod(s, {
@@ -5800,7 +5795,7 @@ const ze = {
5800
5795
  B: function(t, e, r) {
5801
5796
  const n = t.getHours();
5802
5797
  let s;
5803
- switch (n >= 17 ? s = ft.evening : n >= 12 ? s = ft.afternoon : n >= 4 ? s = ft.morning : s = ft.night, e) {
5798
+ switch (n >= 17 ? s = dt.evening : n >= 12 ? s = dt.afternoon : n >= 4 ? s = dt.morning : s = dt.night, e) {
5804
5799
  case "B":
5805
5800
  case "BB":
5806
5801
  case "BBB":
@@ -5868,10 +5863,10 @@ const ze = {
5868
5863
  // so this token always has the same output as `XX`
5869
5864
  case "XXXX":
5870
5865
  case "XX":
5871
- return et(n);
5866
+ return Ze(n);
5872
5867
  // Hours and minutes with `:` delimiter
5873
5868
  default:
5874
- return et(n, ":");
5869
+ return Ze(n, ":");
5875
5870
  }
5876
5871
  },
5877
5872
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
@@ -5886,10 +5881,10 @@ const ze = {
5886
5881
  // so this token always has the same output as `xx`
5887
5882
  case "xxxx":
5888
5883
  case "xx":
5889
- return et(n);
5884
+ return Ze(n);
5890
5885
  // Hours and minutes with `:` delimiter
5891
5886
  default:
5892
- return et(n, ":");
5887
+ return Ze(n, ":");
5893
5888
  }
5894
5889
  },
5895
5890
  // Timezone (GMT)
@@ -5902,7 +5897,7 @@ const ze = {
5902
5897
  case "OOO":
5903
5898
  return "GMT" + To(n, ":");
5904
5899
  default:
5905
- return "GMT" + et(n, ":");
5900
+ return "GMT" + Ze(n, ":");
5906
5901
  }
5907
5902
  },
5908
5903
  // Timezone (specific non-location)
@@ -5915,7 +5910,7 @@ const ze = {
5915
5910
  case "zzz":
5916
5911
  return "GMT" + To(n, ":");
5917
5912
  default:
5918
- return "GMT" + et(n, ":");
5913
+ return "GMT" + Ze(n, ":");
5919
5914
  }
5920
5915
  },
5921
5916
  // Seconds timestamp
@@ -5933,9 +5928,9 @@ function To(t, e = "") {
5933
5928
  return o === 0 ? r + String(s) : r + String(s) + e + ue(o, 2);
5934
5929
  }
5935
5930
  function So(t, e) {
5936
- return t % 60 === 0 ? (t > 0 ? "-" : "+") + ue(Math.abs(t) / 60, 2) : et(t, e);
5931
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + ue(Math.abs(t) / 60, 2) : Ze(t, e);
5937
5932
  }
5938
- function et(t, e = "") {
5933
+ function Ze(t, e = "") {
5939
5934
  const r = t > 0 ? "-" : "+", n = Math.abs(t), s = ue(Math.trunc(n / 60), 2), o = ue(n % 60, 2);
5940
5935
  return r + s + e + o;
5941
5936
  }
@@ -6002,7 +5997,7 @@ function vp(t, e, r) {
6002
5997
  const Tp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Sp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Rp = /^'([^]*?)'?$/, Op = /''/g, Ap = /[a-zA-Z]/;
6003
5998
  function zi(t, e, r) {
6004
5999
  const n = Rt(), s = n.locale ?? qi, o = n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = fe(t, r?.in);
6005
- if (!at(i))
6000
+ if (!ot(i))
6006
6001
  throw new RangeError("Invalid time value");
6007
6002
  let c = e.match(Sp).map((l) => {
6008
6003
  const f = l[0];
@@ -7634,7 +7629,7 @@ function Bh(t, e, r) {
7634
7629
  function zh(t, e, r) {
7635
7630
  return ln(t, -e, r);
7636
7631
  }
7637
- const mb = {
7632
+ const pb = {
7638
7633
  PROPOSED: "proposed",
7639
7634
  PENDING: "pending",
7640
7635
  BOOKED: "booked",
@@ -7645,64 +7640,64 @@ const mb = {
7645
7640
  CHECKED_IN: "checked-in",
7646
7641
  WAITLIST: "waitlist",
7647
7642
  ENTERED_IN_ERROR: "entered-in-error"
7648
- }, Yh = W + "/appointments/search", Qi = W + "/appointments", gb = "http://fhir.bahmni.org/code-system/appointments", Gh = (t) => `${Qi}/${t}`, hn = (t, e, r, n) => {
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) => {
7649
7644
  const s = e === "upcoming", o = s ? "ge" : "le", a = s ? "date" : "-date", i = s ? (/* @__PURE__ */ new Date()).toISOString() : Bh(/* @__PURE__ */ new Date()).toISOString();
7650
7645
  let c = `${se}/Appointment?patient=${t}&date=${o}${i}&_sort=${a}`;
7651
7646
  return r !== void 0 && r > 0 && (c += `&_count=${r}`), n !== void 0 && n > 0 && (c += `&_getpagesoffset=${n}`), c;
7652
- }, Kh = (t) => hn(t, "upcoming"), Wh = (t, e) => hn(t, "past", e), Jh = (t) => `${Qi}/${t}/status-change`, Qh = W + "/appointmentService/all/full", Xh = (t) => `${W}/appointmentService?uuid=${t}`, Zh = (t, e = 10, r = 0) => hn(t, "upcoming", e, r), em = (t, e = 10, r = 0) => hn(t, "past", e, r), Xi = W + "/appointmentUnavailability", yb = async (t) => await ge(Yh, t);
7653
- async function wb(t) {
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 ge(Yh, t);
7648
+ async function gb(t) {
7654
7649
  return await H(Kh(t));
7655
7650
  }
7656
- async function Eb(t, e) {
7651
+ async function yb(t, e) {
7657
7652
  return await H(
7658
7653
  Wh(t, e)
7659
7654
  );
7660
7655
  }
7661
- const bb = async (t, e, r) => await ge(Jh(t), {
7656
+ const wb = async (t, e, r) => await ge(Jh(t), {
7662
7657
  toStatus: e,
7663
7658
  onDate: r
7664
- }), _b = async (t, e) => ge(t, { appointmentUuid: e });
7665
- async function vb(t) {
7659
+ }), Eb = async (t, e) => ge(t, { appointmentUuid: e });
7660
+ async function bb(t) {
7666
7661
  return await H(Gh(t));
7667
7662
  }
7668
- const Tb = async () => await H(Qh), Sb = async (t) => {
7663
+ const _b = async () => await H(Qh), vb = async (t) => {
7669
7664
  await bi(Xh(t));
7670
7665
  };
7671
- async function Rb(t, e = 10, r = 1) {
7666
+ async function Tb(t, e = 10, r = 1) {
7672
7667
  const n = (r - 1) * e, s = await H(
7673
7668
  Zh(t, e, n)
7674
7669
  );
7675
7670
  return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
7676
7671
  }
7677
- async function Ob(t, e = 10, r = 1) {
7672
+ async function Sb(t, e = 10, r = 1) {
7678
7673
  const n = (r - 1) * e, s = await H(
7679
7674
  em(t, e, n)
7680
7675
  );
7681
7676
  return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
7682
7677
  }
7683
- const Ab = async () => await H(Xi), Pb = async (t) => {
7678
+ const Rb = async () => await H(Xi), Ob = async (t) => {
7684
7679
  await ge(Xi, t);
7685
- }, Zi = "dd/MM/yyyy", tm = "default_dateFormat", rm = "h:mm a", Nb = "yyyy-MM-dd", Le = {
7680
+ }, Zi = "dd/MM/yyyy", tm = "default_dateFormat", rm = "h:mm a", Ab = "yyyy-MM-dd", Le = {
7686
7681
  PARSE_ERROR: "DATE_ERROR_PARSE",
7687
7682
  FORMAT_ERROR: "DATE_ERROR_FORMAT",
7688
7683
  EMPTY_OR_INVALID: "DATE_ERROR_EMPTY_OR_INVALID",
7689
7684
  INVALID_FORMAT: "DATE_ERROR_INVALID_FORMAT",
7690
7685
  NULL_OR_UNDEFINED: "DATE_ERROR_NULL_OR_UNDEFINED"
7691
7686
  };
7692
- function Ib(t) {
7687
+ function Pb(t) {
7693
7688
  if (!t) return null;
7694
7689
  const e = pn(t);
7695
- if (!at(e)) return null;
7690
+ if (!ot(e)) return null;
7696
7691
  const r = /* @__PURE__ */ new Date();
7697
7692
  if (e > r) return null;
7698
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`;
7699
7694
  return { year: s, month: a, day: c, ageInDays: n, ageText: u };
7700
7695
  }
7701
- function $b(t) {
7696
+ function Nb(t) {
7702
7697
  if (typeof t != "string" || !/^\d{4}-\d{2}-\d{2}$/.test(t))
7703
7698
  return null;
7704
7699
  const e = pn(t);
7705
- if (!at(e)) return null;
7700
+ if (!ot(e)) return null;
7706
7701
  const r = /* @__PURE__ */ new Date();
7707
7702
  if (e > r) return null;
7708
7703
  const n = fn(r, e), s = ln(e, n), o = dn(r, s), a = Wt(s, o), i = Vt(r, a);
@@ -7718,7 +7713,7 @@ function ec(t, e) {
7718
7713
  }
7719
7714
  };
7720
7715
  const r = pn(t);
7721
- return at(r) ? { date: r } : {
7716
+ return ot(r) ? { date: r } : {
7722
7717
  date: null,
7723
7718
  error: {
7724
7719
  title: e(Le.PARSE_ERROR),
@@ -7746,7 +7741,7 @@ function nm(t, e, r) {
7746
7741
  n = s.date;
7747
7742
  } else
7748
7743
  n = new Date(t);
7749
- return !at(n) || !n ? {
7744
+ return !ot(n) || !n ? {
7750
7745
  formattedResult: "",
7751
7746
  error: {
7752
7747
  title: r(Le.PARSE_ERROR),
@@ -7766,7 +7761,7 @@ function sm() {
7766
7761
  return Zi;
7767
7762
  }
7768
7763
  }
7769
- function Db(t, e, r = !1, n) {
7764
+ function Ib(t, e, r = !1, n) {
7770
7765
  const s = e ?? ((a) => a);
7771
7766
  let o;
7772
7767
  try {
@@ -7776,8 +7771,8 @@ function Db(t, e, r = !1, n) {
7776
7771
  }
7777
7772
  return r && !n && (o = `${o} ${rm}`), nm(t, o, s);
7778
7773
  }
7779
- function Cb(t, e, r) {
7780
- if (!t || !at(t) || e === null || e === void 0 || !r || typeof e != "number")
7774
+ function $b(t, e, r) {
7775
+ if (!t || !ot(t) || e === null || e === void 0 || !r || typeof e != "number")
7781
7776
  return;
7782
7777
  const n = new Date(t);
7783
7778
  switch (r) {
@@ -7791,7 +7786,7 @@ function Cb(t, e, r) {
7791
7786
  return;
7792
7787
  }
7793
7788
  }
7794
- function Lb(t, e) {
7789
+ function Db(t, e) {
7795
7790
  if (t == null)
7796
7791
  return {
7797
7792
  formattedResult: "",
@@ -7843,11 +7838,11 @@ function Lb(t, e) {
7843
7838
  }
7844
7839
  return { formattedResult: c };
7845
7840
  }
7846
- const xb = () => {
7841
+ const Cb = () => {
7847
7842
  const t = /* @__PURE__ */ new Date();
7848
7843
  return t.setHours(0, 0, 0, 0), t;
7849
7844
  };
7850
- function kb(t, e) {
7845
+ function Lb(t, e) {
7851
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 = {
7852
7847
  years: "YEARS",
7853
7848
  months: "MONTHS",
@@ -7881,14 +7876,14 @@ const om = {
7881
7876
  h: 1 / 24,
7882
7877
  min: 1 / 1440,
7883
7878
  s: 1 / 86400
7884
- }, Mb = (t, e, r) => {
7879
+ }, xb = (t, e, r) => {
7885
7880
  const n = typeof t == "string" ? new Date(t) : t;
7886
7881
  if (isNaN(n.getTime()))
7887
7882
  throw new Error(`Invalid date: ${t}`);
7888
7883
  const s = om[r] ?? 1, o = e * s;
7889
7884
  return un(n, o);
7890
- }, Ub = (t, e, r, n) => t <= n && r <= e;
7891
- function qb(t, e, r = !1) {
7885
+ }, kb = (t, e, r, n) => t <= n && r <= e;
7886
+ function Mb(t, e, r = !1) {
7892
7887
  return !t || !Array.isArray(t) ? [] : t.sort((n, s) => {
7893
7888
  const o = new Date(n[e]), a = new Date(s[e]);
7894
7889
  if (isNaN(o.getTime()) && isNaN(a.getTime())) return 0;
@@ -7901,9 +7896,9 @@ function qb(t, e, r = !1) {
7901
7896
  function am(t) {
7902
7897
  if (!t?.trim()) return "";
7903
7898
  const e = Rh(t, "hh:mm aa", /* @__PURE__ */ new Date());
7904
- return at(e) ? zi(e, "HH:mm") : "";
7899
+ return ot(e) ? zi(e, "HH:mm") : "";
7905
7900
  }
7906
- function Fb(t) {
7901
+ function Ub(t) {
7907
7902
  const e = am(t);
7908
7903
  if (!e) return null;
7909
7904
  const [r, n] = e.split(":").map(Number);
@@ -7938,10 +7933,10 @@ const im = () => {
7938
7933
  );
7939
7934
  }
7940
7935
  };
7941
- }, jb = im(), cm = (t) => se + `/ValueSet/${t}/$expand`, um = (t) => se + `/ValueSet/$expand?filter=${encodeURIComponent(t)}`, lm = (t, e, r) => W + `/bahmni/terminologies/concepts?limit=${e}&locale=${r}&term=${t}`, dm = (t) => W + `/concept/${t}`, fm = (t, e) => {
7936
+ }, qb = im(), cm = (t) => se + `/ValueSet/${t}/$expand`, um = (t) => se + `/ValueSet/$expand?filter=${encodeURIComponent(t)}`, lm = (t, e, r) => W + `/bahmni/terminologies/concepts?limit=${e}&locale=${r}&term=${t}`, dm = (t) => W + `/concept/${t}`, fm = (t, e) => {
7942
7937
  const r = `${W}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(t)}`;
7943
7938
  return e ? `${r}&v=${encodeURIComponent(e)}` : r;
7944
- }, pm = "SHORT", hm = "FULLY_SPECIFIED", Vb = async (t, e = 20) => {
7939
+ }, pm = "SHORT", hm = "FULLY_SPECIFIED", Fb = async (t, e = 20) => {
7945
7940
  const r = an(), n = lm(t, e, r);
7946
7941
  return H(n);
7947
7942
  }, jr = async (t) => {
@@ -7951,7 +7946,7 @@ const im = () => {
7951
7946
  const e = `${um(t)}`;
7952
7947
  return H(e);
7953
7948
  };
7954
- async function Hb(t) {
7949
+ async function jb(t) {
7955
7950
  return await H(dm(t));
7956
7951
  }
7957
7952
  async function gm(t, e) {
@@ -7968,7 +7963,7 @@ function ym(t) {
7968
7963
  }
7969
7964
  return e ?? t[0].name ?? null;
7970
7965
  }
7971
- const wm = (t) => se + `/AllergyIntolerance?patient=${t}&_count=100&_sort=-_lastUpdated`, pt = {
7966
+ const wm = (t) => se + `/AllergyIntolerance?patient=${t}&_count=100&_sort=-_lastUpdated`, ft = {
7972
7967
  FOOD: {
7973
7968
  code: "162553AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
7974
7969
  display: "food"
@@ -7990,8 +7985,8 @@ const wm = (t) => se + `/AllergyIntolerance?patient=${t}&_count=100&_sort=-_last
7990
7985
  }), Cn = (t, e) => {
7991
7986
  const r = t.expansion?.contains ?? [];
7992
7987
  return bm(r).map((s) => _m(s, e));
7993
- }, Bb = async (t, e, r) => {
7994
- const n = t ?? pt.MEDICATION.code, s = e ?? pt.FOOD.code, o = r ?? pt.ENVIRONMENT.code, [a, i, c] = await Promise.all([
7988
+ }, Vb = async (t, e, r) => {
7989
+ const n = t ?? ft.MEDICATION.code, s = e ?? ft.FOOD.code, o = r ?? ft.ENVIRONMENT.code, [a, i, c] = await Promise.all([
7995
7990
  jr(n),
7996
7991
  jr(s),
7997
7992
  jr(o)
@@ -7999,18 +7994,18 @@ const wm = (t) => se + `/AllergyIntolerance?patient=${t}&_count=100&_sort=-_last
7999
7994
  return [
8000
7995
  ...Cn(
8001
7996
  a,
8002
- pt.MEDICATION.display
7997
+ ft.MEDICATION.display
8003
7998
  ),
8004
7999
  ...Cn(
8005
8000
  i,
8006
- pt.FOOD.display
8001
+ ft.FOOD.display
8007
8002
  ),
8008
8003
  ...Cn(
8009
8004
  c,
8010
- pt.ENVIRONMENT.display
8005
+ ft.ENVIRONMENT.display
8011
8006
  )
8012
8007
  ];
8013
- }, zb = async (t) => {
8008
+ }, Hb = async (t) => {
8014
8009
  const e = t ?? Em.code;
8015
8010
  return (await jr(e)).compose?.include[0]?.concept ?? [];
8016
8011
  };
@@ -8050,12 +8045,12 @@ function Sm(t) {
8050
8045
  };
8051
8046
  });
8052
8047
  }
8053
- async function Yb(t) {
8048
+ async function Bb(t) {
8054
8049
  const e = await Tm(t);
8055
8050
  return Sm(e);
8056
8051
  }
8057
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 || {});
8058
- function Gb(t) {
8053
+ function zb(t) {
8059
8054
  const e = t.code?.coding?.[0]?.code ?? t.id ?? "", r = t.reaction?.[0]?.severity, n = /* @__PURE__ */ new Set(), s = [];
8060
8055
  for (const o of t.reaction ?? [])
8061
8056
  for (const a of o.manifestation ?? [])
@@ -8139,7 +8134,7 @@ async function $m(t) {
8139
8134
  async function Dm(t) {
8140
8135
  return (await $m(t)).entry?.map((r) => r.resource).filter((r) => r !== void 0) ?? [];
8141
8136
  }
8142
- async function Kb(t) {
8137
+ async function Yb(t) {
8143
8138
  const r = [];
8144
8139
  let n = 0;
8145
8140
  for (; ; ) {
@@ -8160,7 +8155,7 @@ async function Cm(t) {
8160
8155
  async function Rs(t) {
8161
8156
  return (await Dm(t)).find((r) => !r.period?.end) ?? null;
8162
8157
  }
8163
- async function Wb(t, e) {
8158
+ async function Gb(t, e) {
8164
8159
  return await H(
8165
8160
  `/openmrs/ws/fhir2/R4/Encounter/${t}`,
8166
8161
  e
@@ -8169,20 +8164,20 @@ async function Wb(t, e) {
8169
8164
  async function Lm(t) {
8170
8165
  return await ge(tc, t);
8171
8166
  }
8172
- async function Jb(t, e) {
8167
+ async function Kb(t, e) {
8173
8168
  return await Ei(`${tc}/${t}`, e);
8174
8169
  }
8175
- const Qb = (t, e) => t?.length === 0 ? !1 : e?.length === 0, xm = (t) => se + `/Condition?category=${Es}&patient=${t}&_count=100&_sort=-_lastUpdated`, km = (t, e = 10, r = 0, n) => {
8170
+ const Wb = (t, e) => t?.length === 0 ? !1 : e?.length === 0, xm = (t) => se + `/Condition?category=${Es}&patient=${t}&_count=100&_sort=-_lastUpdated`, km = (t, e = 10, r = 0, n) => {
8176
8171
  const s = se + `/Condition?category=${Es}&patient=${t}&_count=${e}&_getpagesoffset=${r}&_sort=-_lastUpdated`;
8177
8172
  return n ? `${s}&clinical-status=${n}` : s;
8178
8173
  };
8179
8174
  async function Mm(t) {
8180
8175
  return await H(`${xm(t)}`);
8181
8176
  }
8182
- async function Xb(t) {
8177
+ async function Jb(t) {
8183
8178
  return (await Mm(t)).entry?.filter((n) => n.resource?.resourceType === "Condition").map((n) => n.resource) ?? [];
8184
8179
  }
8185
- async function Zb(t, e = 10, r = 1, n) {
8180
+ async function Qb(t, e = 10, r = 1, n) {
8186
8181
  const s = (r - 1) * e, o = await H(
8187
8182
  km(t, e, s, n)
8188
8183
  );
@@ -8207,7 +8202,7 @@ function Oo(t, e, r, n) {
8207
8202
  practitionerUUIDs: n ? [n] : void 0
8208
8203
  });
8209
8204
  }
8210
- async function e_(t, e, r = !1, n, s, o) {
8205
+ async function Xb(t, e, r = !1, n, s, o) {
8211
8206
  const a = {
8212
8207
  ...t,
8213
8208
  category: [
@@ -8375,11 +8370,11 @@ function Ym(t) {
8375
8370
  }
8376
8371
  return Array.from(e.values());
8377
8372
  }
8378
- async function t_(t) {
8373
+ async function Zb(t) {
8379
8374
  const e = await Vm(t), r = rc(e);
8380
8375
  return Ym(r);
8381
8376
  }
8382
- async function r_(t, e = 10, r = 1) {
8377
+ async function e_(t, e = 10, r = 1) {
8383
8378
  const n = (r - 1) * e, s = await Hm(
8384
8379
  t,
8385
8380
  e,
@@ -8405,7 +8400,7 @@ const Ut = {
8405
8400
  }, Km = (t, e, r) => {
8406
8401
  let s = `${se + "/MedicationRequest?" + Ut.SORT + "&" + Ut.COUNT + "&" + Ut.INCLUDE_MEDICATION}&patient=${t}`;
8407
8402
  return e && (s += `&code=${e}`), r && (s += `&encounter=${r}`), s;
8408
- }, Wm = W + "/bahmnicore/config/drugOrders", Jm = (t, e) => se + `/Medication?name=${encodeURIComponent(t)}&_count=${e}&_sort=-_lastUpdated`, Qm = se + "/Medication?code=http://hl7.org/fhir/sid/cvx|&_count=100", n_ = "medication", Xm = (t) => {
8403
+ }, Wm = W + "/bahmnicore/config/drugOrders", Jm = (t, e) => se + `/Medication?name=${encodeURIComponent(t)}&_count=${e}&_sort=-_lastUpdated`, Qm = se + "/Medication?code=http://hl7.org/fhir/sid/cvx|&_count=100", t_ = "medication", Xm = (t) => {
8409
8404
  switch (t.status) {
8410
8405
  case "active":
8411
8406
  return Be.Active;
@@ -8562,7 +8557,7 @@ function lg(t) {
8562
8557
  });
8563
8558
  }
8564
8559
  const Ao = (t) => t.priority === "stat";
8565
- async function s_(t, e, r, n = !1) {
8560
+ async function r_(t, e, r, n = !1) {
8566
8561
  const s = await Zm(
8567
8562
  t,
8568
8563
  e,
@@ -8571,21 +8566,21 @@ async function s_(t, e, r, n = !1) {
8571
8566
  );
8572
8567
  return lg(s);
8573
8568
  }
8574
- async function o_() {
8569
+ async function n_() {
8575
8570
  return await H(
8576
8571
  Wm
8577
8572
  );
8578
8573
  }
8579
- async function a_(t, e = 20) {
8574
+ async function s_(t, e = 20) {
8580
8575
  return await H(
8581
8576
  Jm(t, e)
8582
8577
  );
8583
8578
  }
8584
- async function i_() {
8579
+ async function o_() {
8585
8580
  return await H(Qm);
8586
8581
  }
8587
8582
  const dg = (t) => `${se}/Medication/${t}`;
8588
- async function c_(t) {
8583
+ async function a_(t) {
8589
8584
  return await H(dg(t));
8590
8585
  }
8591
8586
  const fg = 200, pg = (t, e, r, n, s) => {
@@ -8605,7 +8600,7 @@ async function Jt(t, e, r, n, s) {
8605
8600
  );
8606
8601
  }
8607
8602
  const hg = (t) => `${se}/ImagingStudy/${t}/$fetch-quality-assessment`;
8608
- async function u_(t, e, r, n) {
8603
+ async function i_(t, e, r, n) {
8609
8604
  return await Jt(
8610
8605
  e,
8611
8606
  t,
@@ -8613,7 +8608,7 @@ async function u_(t, e, r, n) {
8613
8608
  n
8614
8609
  );
8615
8610
  }
8616
- async function l_(t, e, r, n) {
8611
+ async function c_(t, e, r, n) {
8617
8612
  return await Jt(
8618
8613
  e,
8619
8614
  t,
@@ -8622,7 +8617,7 @@ async function l_(t, e, r, n) {
8622
8617
  "ImagingStudy:basedon"
8623
8618
  );
8624
8619
  }
8625
- async function d_(t, e, r, n) {
8620
+ async function u_(t, e, r, n) {
8626
8621
  return (await Jt(
8627
8622
  e,
8628
8623
  t,
@@ -8630,10 +8625,10 @@ async function d_(t, e, r, n) {
8630
8625
  n
8631
8626
  )).entry?.filter((a) => a.resource?.resourceType === "ServiceRequest").map((a) => a.resource) ?? [];
8632
8627
  }
8633
- async function f_(t) {
8628
+ async function l_(t) {
8634
8629
  return await H(hg(t));
8635
8630
  }
8636
- async function p_(t, e, r, n) {
8631
+ async function d_(t, e, r, n) {
8637
8632
  return await Jt(
8638
8633
  e,
8639
8634
  t,
@@ -8645,29 +8640,29 @@ const mg = (t, e) => {
8645
8640
  const r = `${se}/DiagnosticReport?patient=${t}`;
8646
8641
  return e ? `${r}&based-on=${e}` : r;
8647
8642
  }, gg = (t) => `${se}/DiagnosticReport/${t}/$fetch-bundle`, yg = (t) => `${se}/DiagnosticReport/${t}/$update-bundle`;
8648
- async function h_(t, e = []) {
8643
+ async function f_(t, e = []) {
8649
8644
  const r = e.length > 0 ? e.join(",") : void 0, n = mg(t, r);
8650
8645
  return await H(n);
8651
8646
  }
8652
- async function m_(t) {
8647
+ async function p_(t) {
8653
8648
  const e = gg(t);
8654
8649
  return await H(e);
8655
8650
  }
8656
- async function g_(t, e) {
8651
+ async function h_(t, e) {
8657
8652
  const r = yg(t);
8658
8653
  return await ge(r, e);
8659
8654
  }
8660
- const y_ = [
8655
+ const m_ = [
8661
8656
  "preliminary",
8662
8657
  "final",
8663
8658
  "amended",
8664
8659
  "corrected",
8665
8660
  "appended"
8666
- ], w_ = [
8661
+ ], g_ = [
8667
8662
  "registered",
8668
8663
  "unknown",
8669
8664
  "partial"
8670
- ], wg = "All Orderables", Eg = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", bg = "LabSet", _g = "http://fhir.bahmni.org/ext/ValueSet/concept-class", E_ = ["orderTypes"], vg = async () => await mm(wg), Os = async () => await H(Eg), Tg = (t) => {
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 H(Eg), Tg = (t) => {
8671
8666
  let e = t.display ?? "Unknown investigation";
8672
8667
  return nc(t) === bg && (e += ` (${de.t("INVESTIGATION_PANEL")})`), e;
8673
8668
  }, Sg = (t) => {
@@ -8699,12 +8694,12 @@ const y_ = [
8699
8694
  });
8700
8695
  });
8701
8696
  }), r;
8702
- }, b_ = async () => {
8697
+ }, w_ = async () => {
8703
8698
  const t = await vg(), e = await Os();
8704
8699
  return Rg(t, Sg(e));
8705
- }, __ = async (t) => t ? (await Os()).results.find(
8700
+ }, E_ = async (t) => t ? (await Os()).results.find(
8706
8701
  (n) => n.display.toLowerCase() === t.toLowerCase()
8707
- )?.uuid ?? null : null, v_ = async () => (await Os()).results.map((e) => e.display), T_ = async (t, e, r) => {
8702
+ )?.uuid ?? null : null, b_ = async () => (await Os()).results.map((e) => e.display), __ = async (t, e, r) => {
8708
8703
  const n = [];
8709
8704
  for (const s of t) {
8710
8705
  const o = s.uuid;
@@ -12400,10 +12395,10 @@ function ny() {
12400
12395
  ];
12401
12396
  return cr.default = l, cr;
12402
12397
  }
12403
- var _r = {}, ht = {}, ya;
12398
+ var _r = {}, pt = {}, ya;
12404
12399
  function cc() {
12405
- if (ya) return ht;
12406
- ya = 1, Object.defineProperty(ht, "__esModule", { value: !0 }), ht.validateAdditionalItems = void 0;
12400
+ if (ya) return pt;
12401
+ ya = 1, Object.defineProperty(pt, "__esModule", { value: !0 }), pt.validateAdditionalItems = void 0;
12407
12402
  const t = te(), e = oe(), n = {
12408
12403
  keyword: "additionalItems",
12409
12404
  type: "array",
@@ -12438,12 +12433,12 @@ function cc() {
12438
12433
  });
12439
12434
  }
12440
12435
  }
12441
- return ht.validateAdditionalItems = s, ht.default = n, ht;
12436
+ return pt.validateAdditionalItems = s, pt.default = n, pt;
12442
12437
  }
12443
- var vr = {}, mt = {}, wa;
12438
+ var vr = {}, ht = {}, wa;
12444
12439
  function uc() {
12445
- if (wa) return mt;
12446
- wa = 1, Object.defineProperty(mt, "__esModule", { value: !0 }), mt.validateTuple = void 0;
12440
+ if (wa) return ht;
12441
+ wa = 1, Object.defineProperty(ht, "__esModule", { value: !0 }), ht.validateTuple = void 0;
12447
12442
  const t = te(), e = oe(), r = Me(), n = {
12448
12443
  keyword: "items",
12449
12444
  type: "array",
@@ -12475,7 +12470,7 @@ function uc() {
12475
12470
  }
12476
12471
  }
12477
12472
  }
12478
- return mt.validateTuple = s, mt.default = n, mt;
12473
+ return ht.validateTuple = s, ht.default = n, ht;
12479
12474
  }
12480
12475
  var Ea;
12481
12476
  function sy() {
@@ -13254,19 +13249,19 @@ var Dy = $y();
13254
13249
  const Cy = /* @__PURE__ */ Og(Dy), ja = {
13255
13250
  CONFIG_NOT_FOUND: "CONFIG_ERROR_NOT_FOUND",
13256
13251
  VALIDATION_FAILED: "CONFIG_ERROR_VALIDATION_FAILED"
13257
- }, S_ = async (t, e) => {
13252
+ }, v_ = async (t, e) => {
13258
13253
  const r = await Ly(t);
13259
13254
  if (!r)
13260
13255
  throw new Error(ja.CONFIG_NOT_FOUND);
13261
13256
  if (!await xy(r, e))
13262
13257
  throw new Error(ja.VALIDATION_FAILED);
13263
13258
  return r;
13264
- }, Ly = async (t) => await H(t), xy = async (t, e) => new Cy().compile(e)(t), R_ = async () => {
13259
+ }, Ly = async (t) => await H(t), xy = async (t, e) => new Cy().compile(e)(t), T_ = async () => {
13265
13260
  await bi(ys), ql.forEach((t) => Cd(t)), globalThis.location.href = mi;
13266
13261
  }, ky = (t) => W + `/form/${t}?v=custom:(uuid,name,version,published,resources:(value))`, My = (t) => {
13267
13262
  const e = W + "/bahmniie/form/latestPublishedForms";
13268
13263
  return t ? e + `?episodeUuid=${t}` : e;
13269
- }, O_ = (t) => W + `/user/${t}?v=full`, Uy = (t, e, r, n) => W + `/bahmniie/form/translations?formName=${encodeURIComponent(t)}&formUuid=${e}&formVersion=${r}&locale=${n}`, Vr = "Bahmni", qy = (t) => W + `/form?q=${encodeURIComponent(t)}&v=custom:(uuid,name,version,published,auditInfo:(dateCreated))`, Fy = (t, e, r) => {
13264
+ }, S_ = (t) => W + `/user/${t}?v=full`, Uy = (t, e, r, n) => W + `/bahmniie/form/translations?formName=${encodeURIComponent(t)}&formUuid=${e}&formVersion=${r}&locale=${n}`, Vr = "Bahmni", qy = (t) => W + `/form?q=${encodeURIComponent(t)}&v=custom:(uuid,name,version,published,auditInfo:(dateCreated))`, Fy = (t, e, r) => {
13270
13265
  let s = W + "/bahmnicore/patient/" + t + "/forms";
13271
13266
  return r ? s += `?patientProgramUuid=${r}` : e && (s += `?numberOfVisits=${e}`), s;
13272
13267
  }, dc = (t, e, r, n) => {
@@ -13281,23 +13276,23 @@ async function Vy(t, e, r) {
13281
13276
  const n = dc(t, e, r);
13282
13277
  return await H(n);
13283
13278
  }
13284
- async function A_(t, e) {
13279
+ async function R_(t, e) {
13285
13280
  const r = dc(t, e, void 0, !0);
13286
13281
  return await H(r);
13287
13282
  }
13288
- async function P_(t, e, r) {
13283
+ async function O_(t, e, r) {
13289
13284
  return (await Vy(
13290
13285
  t,
13291
13286
  e,
13292
13287
  r
13293
13288
  )).entry?.filter((o) => o.resource?.resourceType === "Observation").map((o) => o.resource) ?? [];
13294
13289
  }
13295
- async function N_(t) {
13290
+ async function A_(t) {
13296
13291
  return await H(
13297
13292
  jy(t)
13298
13293
  );
13299
13294
  }
13300
- const Hy = (t) => t.split("/").pop() ?? "", I_ = (t, e) => {
13295
+ const Hy = (t) => t.split("/").pop() ?? "", P_ = (t, e) => {
13301
13296
  const r = /* @__PURE__ */ new Map(), n = e.entry?.filter((o) => o.resource?.resourceType === "Encounter").map((o) => o.resource) ?? [], s = /* @__PURE__ */ new Map();
13302
13297
  return n.forEach((o) => {
13303
13298
  o.id && s.set(o.id, o);
@@ -13321,13 +13316,13 @@ const Hy = (t) => t.split("/").pop() ?? "", I_ = (t, e) => {
13321
13316
  (o, a) => a.encounterDateTime - o.encounterDateTime
13322
13317
  );
13323
13318
  }, fc = (t) => W + `/provider?user=${t}&v=custom:(uuid,display,person,attributes)`, By = W + "/provider?v=custom:(uuid,display,person,attributes)";
13324
- async function $_(t) {
13319
+ async function N_(t) {
13325
13320
  const e = await H(
13326
13321
  fc(t)
13327
13322
  );
13328
13323
  return !e.results || e.results.length === 0 ? null : e.results[0];
13329
13324
  }
13330
- async function D_() {
13325
+ async function I_() {
13331
13326
  const t = [];
13332
13327
  let e = By;
13333
13328
  for (; e; ) {
@@ -13336,7 +13331,7 @@ async function D_() {
13336
13331
  }
13337
13332
  return t;
13338
13333
  }
13339
- async function C_(t) {
13334
+ async function $_(t) {
13340
13335
  const e = await H(fc(t));
13341
13336
  if (!e.results || e.results.length === 0)
13342
13337
  return [];
@@ -13345,7 +13340,7 @@ async function C_(t) {
13345
13340
  (n) => !n.voided && n.attributeType.display === "Login Locations"
13346
13341
  ).map((n) => n.value) : [];
13347
13342
  }
13348
- const zy = se + "/Encounter", Yy = W + "/systemsetting/bahmni.encountersession.duration", L_ = {
13343
+ const zy = se + "/Encounter", Yy = W + "/systemsetting/bahmni.encountersession.duration", D_ = {
13349
13344
  MATCHED: "ENCOUNTER_MATCH_REASON_MATCHED",
13350
13345
  NO_ACTIVE_VISIT: "ENCOUNTER_MATCH_REASON_NO_ACTIVE_VISIT",
13351
13346
  NO_ACTIVE_ENCOUNTER: "ENCOUNTER_MATCH_REASON_NO_ACTIVE_ENCOUNTER",
@@ -13383,7 +13378,7 @@ async function Gy(t, e) {
13383
13378
  return null;
13384
13379
  }
13385
13380
  }
13386
- async function x_(t, e, r, n) {
13381
+ async function C_(t, e, r, n) {
13387
13382
  try {
13388
13383
  if (!t) return null;
13389
13384
  const s = r ?? await pc(), a = `ge${new Date(Date.now() - s * 60 * 1e3).toISOString()}`, i = {
@@ -13420,7 +13415,7 @@ function zn(t) {
13420
13415
  return new Date(r.period?.start ?? 0).getTime() - n;
13421
13416
  });
13422
13417
  }
13423
- async function k_(t, e, r, n) {
13418
+ async function L_(t, e, r, n) {
13424
13419
  try {
13425
13420
  const s = await Rs(t);
13426
13421
  if (!s?.id)
@@ -13485,7 +13480,7 @@ async function k_(t, e, r, n) {
13485
13480
  };
13486
13481
  }
13487
13482
  }
13488
- function M_(t) {
13483
+ function x_(t) {
13489
13484
  return t.matched || t.reasons.includes("LOCATION_MISMATCH") && !t.reasons.includes("SESSION_EXPIRED") && !t.reasons.includes("PROVIDER_MISMATCH");
13490
13485
  }
13491
13486
  const hc = {
@@ -13511,7 +13506,7 @@ function Wy(t) {
13511
13506
  function Jy() {
13512
13507
  return Ht;
13513
13508
  }
13514
- function U_(t) {
13509
+ function k_(t) {
13515
13510
  const e = t.reasons.some(
13516
13511
  (r) => Ky.includes(r)
13517
13512
  );
@@ -13522,20 +13517,20 @@ function U_(t) {
13522
13517
  isLoading: !1
13523
13518
  }, $s();
13524
13519
  }
13525
- function q_(t) {
13520
+ function M_(t) {
13526
13521
  Ht = { ...Ht, isLoading: t }, $s();
13527
13522
  }
13528
- function F_() {
13523
+ function U_() {
13529
13524
  Ht = { ...hc }, $s();
13530
13525
  }
13531
- function j_() {
13526
+ function q_() {
13532
13527
  return Oc(
13533
13528
  Wy,
13534
13529
  Jy
13535
13530
  );
13536
13531
  }
13537
13532
  const Qy = (t) => se + `/EpisodeOfCare?_revinclude=Encounter:episode-of-care&_id=${t}`;
13538
- async function V_(t) {
13533
+ async function F_(t) {
13539
13534
  const e = t.join(","), r = await H(Qy(e));
13540
13535
  if (r.total === 0)
13541
13536
  throw new Error(
@@ -13553,7 +13548,7 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13553
13548
  return Yn.get(t) ?? null;
13554
13549
  const e = await H(Ai(t)), r = e ? String(e) : null;
13555
13550
  return Yn.set(t, r), r;
13556
- }, Zy = async () => await Xy(Pd) === "true", ew = async (t, e, r, n = Ze.CLINICAL) => {
13551
+ }, Zy = async () => await Xy(Pd) === "true", ew = async (t, e, r, n = mt.CLINICAL) => {
13557
13552
  if (!await Zy())
13558
13553
  return { logged: !1 };
13559
13554
  const o = Zn[e];
@@ -13571,14 +13566,14 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13571
13566
  module: n
13572
13567
  };
13573
13568
  return await ge(yf, a), { logged: !0 };
13574
- }, H_ = () => gf(async (e) => {
13569
+ }, j_ = () => gf(async (e) => {
13575
13570
  await ew(
13576
13571
  e.patientUuid,
13577
13572
  e.eventType,
13578
13573
  e.messageParams,
13579
13574
  e.module
13580
13575
  );
13581
- }), B_ = async () => {
13576
+ }), V_ = async () => {
13582
13577
  try {
13583
13578
  const t = await H(ys);
13584
13579
  return t.user ? t.user.privileges : null;
@@ -13586,7 +13581,7 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13586
13581
  const { message: e } = Yr(t);
13587
13582
  throw new Error(e);
13588
13583
  }
13589
- }, z_ = (t, e) => {
13584
+ }, H_ = (t, e) => {
13590
13585
  if (!t || t.length === 0)
13591
13586
  return !1;
13592
13587
  if (!e || e.length === 0)
@@ -13626,12 +13621,12 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13626
13621
  editable: n.editable
13627
13622
  }))
13628
13623
  };
13629
- }, Y_ = async (t) => {
13624
+ }, B_ = async (t) => {
13630
13625
  const e = await tw(t), r = an();
13631
13626
  return e.map(
13632
13627
  (n) => nw(n, r)
13633
13628
  );
13634
- }, G_ = async (t) => {
13629
+ }, z_ = async (t) => {
13635
13630
  const e = await fetch(ky(t));
13636
13631
  if (!e.ok)
13637
13632
  throw new Error(
@@ -13665,7 +13660,7 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13665
13660
  schema: n,
13666
13661
  translations: u
13667
13662
  };
13668
- }, K_ = async (t, e, r) => {
13663
+ }, Y_ = async (t, e, r) => {
13669
13664
  const n = await fetch(qy(t));
13670
13665
  if (!n.ok) return null;
13671
13666
  const s = await n.json(), a = (Array.isArray(s.results) ? s.results : []).filter(
@@ -13687,7 +13682,7 @@ const Yn = /* @__PURE__ */ new Map(), Xy = async (t) => {
13687
13682
  (u) => new Date(u.auditInfo.dateCreated).getTime() <= r
13688
13683
  );
13689
13684
  return c.length === 0 ? i[0].uuid : c.at(-1).uuid;
13690
- }, W_ = async (t, e, r) => {
13685
+ }, G_ = async (t, e, r) => {
13691
13686
  let n;
13692
13687
  e && e.length > 0 && (n = e.join(","));
13693
13688
  const s = Fy(t, r, n), o = await H(s);
@@ -13732,7 +13727,7 @@ function yc(t, e) {
13732
13727
  };
13733
13728
  return n(r.controls);
13734
13729
  }
13735
- function J_(t, e) {
13730
+ function K_(t, e) {
13736
13731
  if (!t.controls || t.controls.length === 0)
13737
13732
  return [];
13738
13733
  const r = [], n = (/* @__PURE__ */ new Date()).toISOString();
@@ -13777,7 +13772,7 @@ function J_(t, e) {
13777
13772
  s.interpretation && (a.interpretation = s.interpretation), s.comment && (a.comment = s.comment), r.push(a);
13778
13773
  }), r;
13779
13774
  }
13780
- function Q_(t, e) {
13775
+ function W_(t, e) {
13781
13776
  if (!t || t.length === 0)
13782
13777
  return {
13783
13778
  controls: [],
@@ -13813,7 +13808,7 @@ function Q_(t, e) {
13813
13808
  function sw(t) {
13814
13809
  return t == null ? null : typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "object" ? t : null;
13815
13810
  }
13816
- function X_(t) {
13811
+ function J_(t) {
13817
13812
  const e = (n) => {
13818
13813
  const s = n.concept, o = typeof s == "object" && s !== null && "uuid" in s ? s.uuid : s, a = typeof s == "object" && s !== null && "datatype" in s ? s.datatype : void 0, i = {
13819
13814
  concept: {
@@ -13829,11 +13824,11 @@ function X_(t) {
13829
13824
  };
13830
13825
  return (t?.filter((n) => n.uuid && n.voided ? !0 : !(!n.uuid && n.voided || n.value && typeof n.value == "string" && n.value.endsWith("voided"))) ?? []).map(e);
13831
13826
  }
13832
- function Z_(t) {
13827
+ function Q_(t) {
13833
13828
  if (!(!t || typeof t != "object"))
13834
13829
  return "toJS" in t && typeof t.toJS == "function" ? t.toJS() : t;
13835
13830
  }
13836
- function ev(t, e) {
13831
+ function X_(t, e) {
13837
13832
  !t || !Array.isArray(t.children) || t.children.forEach((r) => {
13838
13833
  r && typeof r == "object" && wc(
13839
13834
  r,
@@ -13863,24 +13858,7 @@ function wc(t, e) {
13863
13858
  );
13864
13859
  });
13865
13860
  }
13866
- function ow(t) {
13867
- const e = t.value && typeof t.value == "object" ? t.value : null;
13868
- if (!e)
13869
- return t.value === null || t.value === void 0 || t.value === "";
13870
- const r = e.value;
13871
- if (r != null && r !== "")
13872
- return !1;
13873
- const n = e.concept;
13874
- return n != null ? Array.isArray(n) ? n.length === 0 : !1 : !0;
13875
- }
13876
- function aw(t) {
13877
- if (!t || typeof t != "object") return !1;
13878
- const e = t.children, r = Array.isArray(e) && e.length > 0, s = t.control?.properties;
13879
- return !r && s?.mandatory === !0 && !t.hidden && !t.voided && ow(t) ? !0 : t.hidden || t.voided ? !1 : r ? e.some(
13880
- (o) => o && typeof o == "object" && aw(o)
13881
- ) : !1;
13882
- }
13883
- const iw = W + "/bahmnicore/diseaseSummaryData?", tv = async (t, e, r, n) => {
13861
+ const ow = W + "/bahmnicore/diseaseSummaryData?", Z_ = async (t, e, r, n) => {
13884
13862
  const s = new URLSearchParams({
13885
13863
  groupBy: n,
13886
13864
  latestCount: e.toString(),
@@ -13889,17 +13867,17 @@ const iw = W + "/bahmnicore/diseaseSummaryData?", tv = async (t, e, r, n) => {
13889
13867
  r.forEach((a) => {
13890
13868
  s.append("obsConcepts", a);
13891
13869
  });
13892
- const o = iw + s.toString();
13870
+ const o = ow + s.toString();
13893
13871
  return H(o);
13894
- }, Ds = "custom:(uuid,episodeUuid,patient,program,display,dateEnrolled,dateCompleted,location,voided,allowedStates,outcome,states:(uuid,startDate,endDate,voided,state:(uuid,concept:(uuid,display,name,names)),auditInfo),auditInfo,attributes)", cw = (t) => `${W}/bahmniprogramenrollment?patient=${t}&v=${Ds}`, uw = (t, e = 15, r = 0) => `${W}/bahmniprogramenrollment?patient=${t}&v=${Ds}&limit=${e}&startIndex=${r}&totalCount=true`, Ec = (t) => `${W}/bahmniprogramenrollment/${t}`, lw = (t) => `${Ec(t)}?v=${Ds}`, rv = async (t) => await H(cw(t)), nv = async (t, e = 15, r = 1) => {
13872
+ }, Ds = "custom:(uuid,episodeUuid,patient,program,display,dateEnrolled,dateCompleted,location,voided,allowedStates,outcome,states:(uuid,startDate,endDate,voided,state:(uuid,concept:(uuid,display,name,names)),auditInfo),auditInfo,attributes)", aw = (t) => `${W}/bahmniprogramenrollment?patient=${t}&v=${Ds}`, iw = (t, e = 15, r = 0) => `${W}/bahmniprogramenrollment?patient=${t}&v=${Ds}&limit=${e}&startIndex=${r}&totalCount=true`, Ec = (t) => `${W}/bahmniprogramenrollment/${t}`, cw = (t) => `${Ec(t)}?v=${Ds}`, ev = async (t) => await H(aw(t)), tv = async (t, e = 15, r = 1) => {
13895
13873
  const n = (r - 1) * e, s = await H(
13896
- uw(t, e, n)
13874
+ iw(t, e, n)
13897
13875
  );
13898
13876
  return {
13899
13877
  programs: s.results,
13900
13878
  total: s.totalCount
13901
13879
  };
13902
- }, sv = async (t) => await H(lw(t)), ov = async (t, e) => {
13880
+ }, rv = async (t) => await H(cw(t)), nv = async (t, e) => {
13903
13881
  const r = {
13904
13882
  uuid: t,
13905
13883
  states: [
@@ -13913,7 +13891,7 @@ const iw = W + "/bahmnicore/diseaseSummaryData?", tv = async (t, e, r, n) => {
13913
13891
  r
13914
13892
  );
13915
13893
  };
13916
- function av(t) {
13894
+ function sv(t) {
13917
13895
  if (t.states.length === 0)
13918
13896
  return null;
13919
13897
  let e;
@@ -13929,7 +13907,7 @@ function av(t) {
13929
13907
  e = t.states.find((r) => r.endDate === null);
13930
13908
  return e ? ym(e.state.concept.names) ?? e.state.concept.display : null;
13931
13909
  }
13932
- function iv(t, e) {
13910
+ function ov(t, e) {
13933
13911
  if (e.length === 0)
13934
13912
  return {};
13935
13913
  const r = {};
@@ -13941,16 +13919,16 @@ function iv(t, e) {
13941
13919
  }
13942
13920
  return r;
13943
13921
  }
13944
- const as = "consultation:saved", cv = (t) => {
13922
+ const as = "consultation:saved", av = (t) => {
13945
13923
  const e = new CustomEvent(as, {
13946
13924
  detail: t
13947
13925
  });
13948
13926
  window.dispatchEvent(e);
13949
- }, uv = (t, e = []) => {
13927
+ }, iv = (t, e = []) => {
13950
13928
  const r = qt(t);
13951
- nt(() => {
13929
+ rt(() => {
13952
13930
  r.current = t;
13953
- }, [t]), nt(() => {
13931
+ }, [t]), rt(() => {
13954
13932
  const n = (s) => {
13955
13933
  const o = s;
13956
13934
  r.current(o.detail);
@@ -13959,21 +13937,21 @@ const as = "consultation:saved", cv = (t) => {
13959
13937
  window.removeEventListener(as, n);
13960
13938
  };
13961
13939
  }, e);
13962
- }, is = "cdss:check", cs = "cdss:results", lv = (t) => {
13940
+ }, is = "cdss:check", cs = "cdss:results", cv = (t) => {
13963
13941
  const e = new CustomEvent(is, {
13964
13942
  detail: t
13965
13943
  });
13966
13944
  globalThis.dispatchEvent(e);
13967
- }, dv = (t) => {
13945
+ }, uv = (t) => {
13968
13946
  const e = new CustomEvent(cs, {
13969
13947
  detail: t
13970
13948
  });
13971
13949
  globalThis.dispatchEvent(e);
13972
- }, fv = (t) => {
13950
+ }, lv = (t) => {
13973
13951
  const e = qt(t);
13974
- nt(() => {
13952
+ rt(() => {
13975
13953
  e.current = t;
13976
- }, [t]), nt(() => {
13954
+ }, [t]), rt(() => {
13977
13955
  const r = (n) => {
13978
13956
  const s = n;
13979
13957
  e.current(s.detail);
@@ -13982,11 +13960,11 @@ const as = "consultation:saved", cv = (t) => {
13982
13960
  globalThis.removeEventListener(is, r);
13983
13961
  };
13984
13962
  }, []);
13985
- }, pv = (t) => {
13963
+ }, dv = (t) => {
13986
13964
  const e = qt(t);
13987
- nt(() => {
13965
+ rt(() => {
13988
13966
  e.current = t;
13989
- }, [t]), nt(() => {
13967
+ }, [t]), rt(() => {
13990
13968
  const r = (n) => {
13991
13969
  const s = n;
13992
13970
  e.current(s.detail);
@@ -13995,17 +13973,17 @@ const as = "consultation:saved", cv = (t) => {
13995
13973
  globalThis.removeEventListener(cs, r);
13996
13974
  };
13997
13975
  }, []);
13998
- }, dw = `${se}/DocumentReference`, fw = "bahmni.documentUpload.maxFileSizeInMB", pw = `${W}/systemsetting?q=${fw}&v=custom:(property,value)`, bc = (t, e, r = 100, n = 0) => {
13976
+ }, uw = `${se}/DocumentReference`, lw = "bahmni.documentUpload.maxFileSizeInMB", dw = `${W}/systemsetting?q=${lw}&v=custom:(property,value)`, bc = (t, e, r = 100, n = 0) => {
13999
13977
  const s = `${se}/DocumentReference?patient=${t}&_sort=-_lastUpdated&_count=${r}&_getpagesoffset=${n}`;
14000
13978
  return e && e.length > 0 ? `${s}&encounter=${encodeURIComponent(e.join(","))}` : s;
14001
13979
  };
14002
- async function hv() {
13980
+ async function fv() {
14003
13981
  const t = await H(
14004
- pw
13982
+ dw
14005
13983
  ), e = Number(t.results?.[0]?.value);
14006
13984
  return Number.isFinite(e) && e > 0 ? e : void 0;
14007
13985
  }
14008
- async function mv(t) {
13986
+ async function pv(t) {
14009
13987
  return ((await gm(t, "custom:(setMembers:(uuid,display))"))?.setMembers ?? []).map((n) => ({
14010
13988
  id: n.uuid,
14011
13989
  label: n.display ?? ""
@@ -14028,17 +14006,17 @@ function _c(t) {
14028
14006
  };
14029
14007
  });
14030
14008
  }
14031
- async function hw(t, e) {
14009
+ async function fw(t, e) {
14032
14010
  const r = bc(t, e);
14033
14011
  return H(r);
14034
14012
  }
14035
- async function gv(t, e) {
14036
- const n = ((await hw(t, e)).entry ?? []).filter(
14013
+ async function hv(t, e) {
14014
+ const n = ((await fw(t, e)).entry ?? []).filter(
14037
14015
  (s) => !!s.resource
14038
14016
  );
14039
14017
  return _c(n);
14040
14018
  }
14041
- async function yv(t, e, r = 10, n = 1) {
14019
+ async function mv(t, e, r = 10, n = 1) {
14042
14020
  const s = (n - 1) * r, o = bc(
14043
14021
  t,
14044
14022
  e,
@@ -14078,7 +14056,7 @@ function vc(t, e) {
14078
14056
  }
14079
14057
  ]), r;
14080
14058
  }
14081
- function mw(t, e, r, n, s, o) {
14059
+ function pw(t, e, r, n, s, o) {
14082
14060
  const a = {
14083
14061
  resourceType: "Encounter",
14084
14062
  status: "finished",
@@ -14123,16 +14101,16 @@ function mw(t, e, r, n, s, o) {
14123
14101
  }
14124
14102
  ]), a;
14125
14103
  }
14126
- async function gw(t) {
14104
+ async function hw(t) {
14127
14105
  const e = vc(
14128
14106
  t,
14129
14107
  `Encounter/${t.encounterUuid}`
14130
14108
  );
14131
- return ge(dw, e);
14109
+ return ge(uw, e);
14132
14110
  }
14133
- async function wv(t) {
14111
+ async function gv(t) {
14134
14112
  if (t.encounterUuid)
14135
- return gw({
14113
+ return hw({
14136
14114
  ...t,
14137
14115
  encounterUuid: t.encounterUuid
14138
14116
  });
@@ -14140,7 +14118,7 @@ async function wv(t) {
14140
14118
  throw new Error(
14141
14119
  "saveDocument requires either encounterUuid or createEncounterInVisit"
14142
14120
  );
14143
- const { visitUuid: e, encounterTypeUuid: r, encounterTypeDisplay: n } = t.createEncounterInVisit, s = `urn:uuid:${Qr()}`, o = mw(
14121
+ const { visitUuid: e, encounterTypeUuid: r, encounterTypeDisplay: n } = t.createEncounterInVisit, s = `urn:uuid:${Qr()}`, o = pw(
14144
14122
  t.patientUuid,
14145
14123
  e,
14146
14124
  r,
@@ -14153,27 +14131,27 @@ async function wv(t) {
14153
14131
  ]);
14154
14132
  return ge(ns, i);
14155
14133
  }
14156
- const yw = (t) => `${W}/location?operator=ALL&s=byTags&tags=${encodeURIComponent(t)}&v=custom:(uuid,display,childLocations:(uuid,display,retired))`, ww = (t) => `${se}/Location?_tag=${encodeURIComponent(t)}`;
14157
- async function Ev(t) {
14158
- return (await H(yw(t))).results ?? [];
14134
+ 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)}`;
14135
+ async function yv(t) {
14136
+ return (await H(mw(t))).results ?? [];
14159
14137
  }
14160
- async function bv(t) {
14161
- return await H(ww(t));
14138
+ async function wv(t) {
14139
+ return await H(gw(t));
14162
14140
  }
14163
- const Ew = se + "/Immunization", bw = (t, e) => {
14164
- let r = `${Ew}?patient=${t}&_sort=-date&_count=100`;
14141
+ const yw = se + "/Immunization", ww = (t, e) => {
14142
+ let r = `${yw}?patient=${t}&_sort=-date&_count=100`;
14165
14143
  return e && (r += `&status=${e}`), r;
14166
14144
  };
14167
- async function _v(t, e) {
14168
- return (await _w(t, e)).entry?.filter((n) => n.resource?.resourceType === "Immunization").map((n) => n.resource) ?? [];
14145
+ async function Ev(t, e) {
14146
+ return (await Ew(t, e)).entry?.filter((n) => n.resource?.resourceType === "Immunization").map((n) => n.resource) ?? [];
14169
14147
  }
14170
- async function _w(t, e) {
14148
+ async function Ew(t, e) {
14171
14149
  return H(
14172
- bw(t, e)
14150
+ ww(t, e)
14173
14151
  );
14174
14152
  }
14175
- const vw = W + "/bahmnicore/visitDocument/uploadDocument", Tw = "application";
14176
- async function Sw(t) {
14153
+ const bw = W + "/bahmnicore/visitDocument/uploadDocument", _w = "application";
14154
+ async function vw(t) {
14177
14155
  return new Promise((e, r) => {
14178
14156
  const n = new FileReader();
14179
14157
  n.onload = () => {
@@ -14186,7 +14164,7 @@ async function Sw(t) {
14186
14164
  let a = o, i = "";
14187
14165
  const c = o.lastIndexOf(".");
14188
14166
  c !== -1 && (a = o.substring(0, c), i = o.substring(c + 1).toLowerCase());
14189
- const u = t.type ? t.type.split("/")[0] : Tw;
14167
+ const u = t.type ? t.type.split("/")[0] : _w;
14190
14168
  e({
14191
14169
  content: s,
14192
14170
  fileName: a,
@@ -14198,8 +14176,8 @@ async function Sw(t) {
14198
14176
  }, n.readAsDataURL(t);
14199
14177
  });
14200
14178
  }
14201
- async function vv(t, e, r) {
14202
- const n = await Sw(t), s = {
14179
+ async function bv(t, e, r) {
14180
+ const n = await vw(t), s = {
14203
14181
  content: n.content,
14204
14182
  encounterTypeName: e,
14205
14183
  fileName: n.fileName,
@@ -14207,29 +14185,29 @@ async function vv(t, e, r) {
14207
14185
  format: n.format,
14208
14186
  patientUuid: r
14209
14187
  };
14210
- return ge(vw, s);
14188
+ return ge(bw, s);
14211
14189
  }
14212
- const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow = (t) => Array.isArray(t) ? t : Object.values(t), Aw = async (t = "home") => {
14190
+ const Tw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Sw = (t) => Array.isArray(t) ? t : Object.values(t), Rw = async (t = "home") => {
14213
14191
  try {
14214
- const e = `${Rw}/${t}/v2/extension.json`, r = await fetch(e);
14192
+ const e = `${Tw}/${t}/v2/extension.json`, r = await fetch(e);
14215
14193
  if (!r.ok)
14216
14194
  throw new Error(`Failed to load base extensions: ${r.status}`);
14217
- return Ow(await r.json());
14195
+ return Sw(await r.json());
14218
14196
  } catch (e) {
14219
14197
  throw console.error("Error fetching module extensions:", e), e;
14220
14198
  }
14221
- }, Pw = (t, e = Tc, r = "link") => t.filter((n) => {
14199
+ }, Ow = (t, e = Tc, r = "link") => t.filter((n) => {
14222
14200
  const s = n.extensionPointId === e, o = r === "all" || n.type === r;
14223
14201
  return s && o;
14224
- }), Nw = (t, e) => e === void 0 ? t : t.filter((r) => r.requiredPrivilege ? e.includes(r.requiredPrivilege) : !0), Iw = (t) => {
14202
+ }), Aw = (t, e) => e === void 0 ? t : t.filter((r) => r.requiredPrivilege ? e.includes(r.requiredPrivilege) : !0), Pw = (t) => {
14225
14203
  const e = navigator.onLine;
14226
14204
  return t.filter((r) => !(r.exclusiveOnlineModule && !e || r.exclusiveOfflineModule && e));
14227
- }, $w = (t) => [...t].sort((e, r) => (e.order ?? 0) - (r.order ?? 0)), Tv = async (t = Tc, e) => {
14228
- const r = await Aw("home"), n = Pw(r, t), s = Nw(n, e), o = Iw(s);
14229
- return $w(o);
14230
- }, Dw = (t, e) => W + `/availableStocks?productUuid=${t}&locationUuid=${e}`, Sv = async (t, e) => await H(
14231
- Dw(t, e)
14232
- ), Cw = (t, e, r) => {
14205
+ }, Nw = (t) => [...t].sort((e, r) => (e.order ?? 0) - (r.order ?? 0)), _v = async (t = Tc, e) => {
14206
+ const r = await Rw("home"), n = Ow(r, t), s = Aw(n, e), o = Pw(s);
14207
+ return Nw(o);
14208
+ }, Iw = (t, e) => W + `/availableStocks?productUuid=${t}&locationUuid=${e}`, vv = async (t, e) => await H(
14209
+ Iw(t, e)
14210
+ ), $w = (t, e, r) => {
14233
14211
  const n = t.find((o) => o.server === e);
14234
14212
  if (!n)
14235
14213
  throw new Error(`CDSS server "${e}" not found in configuration`);
@@ -14241,7 +14219,7 @@ const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow =
14241
14219
  `CDSS service "${r}" not found in server "${e}"`
14242
14220
  );
14243
14221
  return { serverConfig: n, serviceConfig: s };
14244
- }, Lw = (t, e) => {
14222
+ }, Dw = (t, e) => {
14245
14223
  if (!e || e.length === 0)
14246
14224
  return {};
14247
14225
  const r = {};
@@ -14255,8 +14233,8 @@ const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow =
14255
14233
  entry: s
14256
14234
  });
14257
14235
  }), r;
14258
- }, Rv = async (t, e, r, n) => {
14259
- const s = Cw(t, e.server, e.service), { serverConfig: o, serviceConfig: a } = s, i = Lw(
14236
+ }, Tv = async (t, e, r, n) => {
14237
+ const s = $w(t, e.server, e.service), { serverConfig: o, serviceConfig: a } = s, i = Dw(
14260
14238
  n,
14261
14239
  a.contextResourceMap
14262
14240
  ), c = `${o.url}/${a.name}`, u = {
@@ -14273,7 +14251,7 @@ const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow =
14273
14251
  c,
14274
14252
  u
14275
14253
  )).cards || [];
14276
- }, Ov = (t, e) => {
14254
+ }, Sv = (t, e) => {
14277
14255
  const r = [];
14278
14256
  return t.forEach((n) => {
14279
14257
  !n.suggestions || n.suggestions.length === 0 || n.suggestions.forEach((s) => {
@@ -14290,43 +14268,43 @@ const Rw = "/bahmni_config/openmrs/apps", Tc = "org.bahmni.home.dashboard", Ow =
14290
14268
  });
14291
14269
  }), r;
14292
14270
  };
14293
- async function Av() {
14271
+ async function Rv() {
14294
14272
  return H(`${ws}/templates`);
14295
14273
  }
14296
- async function Pv(t) {
14274
+ async function Ov(t) {
14297
14275
  return (await ge(
14298
14276
  `${ws}/render`,
14299
14277
  t
14300
14278
  )).html;
14301
14279
  }
14302
- const xw = (t, e, r) => {
14280
+ const Cw = (t, e, r) => {
14303
14281
  let s = se + "/Task?_sort=-_lastUpdated";
14304
14282
  return t && (s += `&subject:Patient=${t}`), e && (s += `&based-on=${e}`), r && r.length > 0 && (s += `&encounter=${r.join(",")}`), s;
14305
14283
  };
14306
- async function Nv(t, e, r) {
14284
+ async function Av(t, e, r) {
14307
14285
  return H(
14308
- xw(t, e, r)
14286
+ Cw(t, e, r)
14309
14287
  );
14310
14288
  }
14311
14289
  export {
14312
- gb as APPOINTMENT_IDENTIFIER_SYSTEM,
14313
- mb as APPOINTMENT_STATUSES,
14290
+ hb as APPOINTMENT_IDENTIFIER_SYSTEM,
14291
+ pb as APPOINTMENT_STATUSES,
14314
14292
  Zn as AUDIT_LOG_EVENT_DETAILS,
14315
14293
  Om as AllergySeverity,
14316
14294
  Rm as AllergyStatus,
14317
14295
  pf as AttributeFormat,
14318
14296
  hf as AttributeInputType,
14319
14297
  Fl as BAHMNI_APP_BASE_PATH,
14320
- sE as BAHMNI_HOME_PATH,
14298
+ rE as BAHMNI_HOME_PATH,
14321
14299
  wi as BAHMNI_USER_LOCATION_COOKIE,
14322
14300
  Nd as BIRTH_TIME_EXT_URL,
14323
14301
  is as CDSS_CHECK_EVENT,
14324
14302
  cs as CDSS_RESULTS_EVENT,
14325
- mE as CONCEPT_DATATYPE_COMPLEX,
14326
- hE as CONCEPT_DATATYPE_NUMERIC,
14303
+ pE as CONCEPT_DATATYPE_COMPLEX,
14304
+ fE as CONCEPT_DATATYPE_NUMERIC,
14327
14305
  as as CONSULTATION_SAVED_EVENT,
14328
14306
  Dd as DATETIME_REGEX_PATTERN,
14329
- wE as DATE_REGEX_PATTERN,
14307
+ gE as DATE_REGEX_PATTERN,
14330
14308
  Zi as DEFAULT_DATE_FORMAT,
14331
14309
  tm as DEFAULT_DATE_FORMAT_STORAGE_KEY,
14332
14310
  rm as DEFAULT_TIME_FORMAT,
@@ -14335,240 +14313,240 @@ export {
14335
14313
  Ni as FHIR_ENCOUNTER_CLASS_CODE_SYSTEM,
14336
14314
  Ii as FHIR_ENCOUNTER_TAG_SYSTEM,
14337
14315
  Pi as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
14338
- lE as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
14339
- fE as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
14340
- dE as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
14341
- gE as FHIR_OBSERVATION_STATUS_FINAL,
14342
- pE as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
14343
- yE as FHIR_RESOURCE_TYPE_OBSERVATION,
14316
+ cE as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
14317
+ lE as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
14318
+ uE as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
14319
+ hE as FHIR_OBSERVATION_STATUS_FINAL,
14320
+ dE as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
14321
+ mE as FHIR_RESOURCE_TYPE_OBSERVATION,
14344
14322
  $d as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
14345
14323
  Es as HL7_CONDITION_CATEGORY_CONDITION_CODE,
14346
14324
  $i as HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE,
14347
14325
  Id as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
14348
- uE as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
14349
- EE as INTERPRETATION_TO_CODE,
14350
- Nb as ISO_DATE_FORMAT,
14326
+ iE as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
14327
+ yE as INTERPRETATION_TO_CODE,
14328
+ Ab as ISO_DATE_FORMAT,
14351
14329
  mi as LOGIN_PATH,
14352
- L_ as MATCH_REASON_MESSAGES,
14353
- FE as MAX_NAME_LENGTH,
14354
- qE as MAX_PATIENT_AGE_YEARS,
14355
- jE as MAX_PHONE_NUMBER_LENGTH,
14356
- n_ as MEDICATIONS_INPUT_CONTROL_KEY,
14330
+ D_ as MATCH_REASON_MESSAGES,
14331
+ UE as MAX_NAME_LENGTH,
14332
+ ME as MAX_PATIENT_AGE_YEARS,
14333
+ qE as MAX_PHONE_NUMBER_LENGTH,
14334
+ t_ as MEDICATIONS_INPUT_CONTROL_KEY,
14335
+ mt as MODULE_LABELS,
14357
14336
  Be as MedicationStatus,
14358
14337
  se as OPENMRS_FHIR_R4,
14359
14338
  W as OPENMRS_REST_V1,
14360
- E_ as ORDER_TYPE_QUERY_KEY,
14361
- w_ as PENDING_REPORT_STATUSES,
14362
- y_ as PROCESSED_REPORT_STATUSES,
14363
- O_ as USER_PINNED_PREFERENCE_URL,
14339
+ y_ as ORDER_TYPE_QUERY_KEY,
14340
+ g_ as PENDING_REPORT_STATUSES,
14341
+ m_ as PROCESSED_REPORT_STATUSES,
14342
+ S_ as USER_PINNED_PREFERENCE_URL,
14364
14343
  Im as buildEncounterResource,
14365
- $b as calculateAge,
14366
- Mb as calculateEndDate,
14367
- Cb as calculateOnsetDate,
14344
+ Nb as calculateAge,
14345
+ xb as calculateEndDate,
14346
+ $b as calculateOnsetDate,
14368
14347
  Ci as camelToScreamingSnakeCase,
14369
- M_ as canResumeOwnInSessionEncounter,
14370
- vE as capitalize,
14371
- pb as checkIfActiveVisitExists,
14372
- _b as checkInAppointment,
14373
- Ib as computeAgeDetails,
14374
- Z_ as convertImmutableToPlainObject,
14348
+ x_ as canResumeOwnInSessionEncounter,
14349
+ bE as capitalize,
14350
+ db as checkIfActiveVisitExists,
14351
+ Eb as checkInAppointment,
14352
+ Pb as computeAgeDetails,
14353
+ Q_ as convertImmutableToPlainObject,
14375
14354
  am as convertTo24HourFormat,
14376
- $E as convertToSentenceCase,
14377
- Pb as createAppointmentUnavailability,
14355
+ NE as convertToSentenceCase,
14356
+ Ob as createAppointmentUnavailability,
14378
14357
  yt as createBundleEntry,
14379
- gw as createDocumentReference,
14358
+ hw as createDocumentReference,
14380
14359
  rs as createEncounterBundle,
14381
14360
  Lm as createFhirEncounter,
14382
- QE as createFhirPatient,
14383
- WE as createPatient,
14384
- hb as createVisitForPatient,
14361
+ WE as createFhirPatient,
14362
+ GE as createPatient,
14363
+ fb as createVisitForPatient,
14385
14364
  bi as del,
14386
- Sb as deleteAppointmentService,
14365
+ vb as deleteAppointmentService,
14387
14366
  Cd as deleteCookie,
14388
14367
  mf as dispatchAuditEvent,
14389
- lv as dispatchCDSSCheck,
14390
- dv as dispatchCDSSResults,
14391
- cv as dispatchConsultationSaved,
14392
- Ub as doDateRangesOverlap,
14393
- iv as extractAttributes,
14394
- ev as extractNotesFromFormData,
14395
- D_ as fetchAllProviders,
14396
- Bb as fetchAndFormatAllergenConcepts,
14397
- G_ as fetchFormMetadata,
14398
- K_ as fetchFormUuidByObservationDate,
14399
- o_ as fetchMedicationOrdersMetadata,
14400
- Aw as fetchModuleExtensions,
14401
- Y_ as fetchObservationForms,
14402
- BE as fetchPatientPhotoFromUrl,
14403
- f_ as fetchQualityAssessment,
14404
- zb as fetchReactionConcepts,
14405
- Iw as filterByOnlineStatus,
14406
- Nw as filterByPrivilege,
14407
- Ov as filterCdsCardsForItems,
14408
- AE as filterReplacementEntries,
14409
- x_ as findActiveEncounterInSession,
14410
- CE as formatCountry,
14411
- Lb as formatDateDistance,
14412
- Db as formatDateTime,
14413
- DE as formatGender,
14414
- PE as formatUrl,
14415
- _E as generateId,
14416
- XE as generateIdentifier,
14368
+ cv as dispatchCDSSCheck,
14369
+ uv as dispatchCDSSResults,
14370
+ av as dispatchConsultationSaved,
14371
+ kb as doDateRangesOverlap,
14372
+ ov as extractAttributes,
14373
+ X_ as extractNotesFromFormData,
14374
+ I_ as fetchAllProviders,
14375
+ Vb as fetchAndFormatAllergenConcepts,
14376
+ z_ as fetchFormMetadata,
14377
+ Y_ as fetchFormUuidByObservationDate,
14378
+ n_ as fetchMedicationOrdersMetadata,
14379
+ Rw as fetchModuleExtensions,
14380
+ B_ as fetchObservationForms,
14381
+ VE as fetchPatientPhotoFromUrl,
14382
+ l_ as fetchQualityAssessment,
14383
+ Hb as fetchReactionConcepts,
14384
+ Pw as filterByOnlineStatus,
14385
+ Aw as filterByPrivilege,
14386
+ Sv as filterCdsCardsForItems,
14387
+ RE as filterReplacementEntries,
14388
+ C_ as findActiveEncounterInSession,
14389
+ $E as formatCountry,
14390
+ Db as formatDateDistance,
14391
+ Ib as formatDateTime,
14392
+ IE as formatGender,
14393
+ OE as formatUrl,
14394
+ EE as generateId,
14395
+ JE as generateIdentifier,
14417
14396
  Qr as generateUUID,
14418
14397
  H as get,
14419
14398
  Rs as getActiveVisit,
14420
14399
  Tf as getActiveVisitByPatient,
14421
- tb as getAddressHierarchyEntries,
14422
- Tb as getAllAppointmentServices,
14400
+ ZE as getAddressHierarchyEntries,
14401
+ _b as getAllAppointmentServices,
14423
14402
  Tm as getAllergies,
14424
- vb as getAppointmentById,
14425
- Ab as getAppointmentUnavailabilities,
14426
- kE as getAvailableLocations,
14427
- Sv as getAvailableStocks,
14428
- __ as getCategoryUuidFromOrderTypes,
14429
- Hb as getConceptById,
14430
- Zb as getConditionPage,
14431
- Xb as getConditions,
14432
- S_ as getConfig,
14403
+ bb as getAppointmentById,
14404
+ Rb as getAppointmentUnavailabilities,
14405
+ LE as getAvailableLocations,
14406
+ vv as getAvailableStocks,
14407
+ E_ as getCategoryUuidFromOrderTypes,
14408
+ jb as getConceptById,
14409
+ Qb as getConditionPage,
14410
+ Jb as getConditions,
14411
+ v_ as getConfig,
14433
14412
  Di as getCookieByName,
14434
- $_ as getCurrentProvider,
14435
- av as getCurrentStateName,
14436
- LE as getCurrentUser,
14437
- B_ as getCurrentUserPrivileges,
14438
- xE as getDefaultDateFormat,
14439
- r_ as getDiagnosesPage,
14440
- m_ as getDiagnosticReportBundle,
14441
- h_ as getDiagnosticReports,
14442
- yv as getDocumentReferencePage,
14443
- hw as getDocumentReferences,
14444
- mv as getDocumentTypes,
14445
- hv as getDocumentUploadMaxSizeMb,
14446
- Wb as getEncounterByUuid,
14413
+ N_ as getCurrentProvider,
14414
+ sv as getCurrentStateName,
14415
+ DE as getCurrentUser,
14416
+ V_ as getCurrentUserPrivileges,
14417
+ CE as getDefaultDateFormat,
14418
+ e_ as getDiagnosesPage,
14419
+ p_ as getDiagnosticReportBundle,
14420
+ f_ as getDiagnosticReports,
14421
+ mv as getDocumentReferencePage,
14422
+ fw as getDocumentReferences,
14423
+ pv as getDocumentTypes,
14424
+ fv as getDocumentUploadMaxSizeMb,
14425
+ Gb as getEncounterByUuid,
14447
14426
  pc as getEncounterSessionDuration,
14448
14427
  Jy as getEncounterSessionSnapshot,
14449
14428
  Cm as getEncounterTypeByName,
14450
- V_ as getEncountersAndVisitsForEOC,
14451
- T_ as getExistingServiceRequestsForAllCategories,
14452
- Pw as getExtensionsByPoint,
14453
- bv as getFHIRLocationsByTag,
14454
- b_ as getFlattenedInvestigations,
14455
- kb as getFormattedAge,
14456
- Yb as getFormattedAllergies,
14457
- gv as getFormattedDocumentReferences,
14429
+ F_ as getEncountersAndVisitsForEOC,
14430
+ __ as getExistingServiceRequestsForAllCategories,
14431
+ Ow as getExtensionsByPoint,
14432
+ wv as getFHIRLocationsByTag,
14433
+ w_ as getFlattenedInvestigations,
14434
+ Lb as getFormattedAge,
14435
+ Bb as getFormattedAllergies,
14436
+ hv as getFormattedDocumentReferences,
14458
14437
  Yr as getFormattedError,
14459
- HE as getFormattedPatientById,
14460
- eb as getGenders,
14461
- KE as getIdentifierData,
14462
- GE as getIdentifierTypes,
14463
- ab as getInputTypeForFormat,
14464
- p_ as getLabInvestigationsBundle,
14465
- Ev as getLocationByTag,
14466
- c_ as getMedicationByUuid,
14467
- N_ as getObservationsBundleByEncounterUuid,
14468
- v_ as getOrderTypeNames,
14438
+ jE as getFormattedPatientById,
14439
+ XE as getGenders,
14440
+ YE as getIdentifierData,
14441
+ zE as getIdentifierTypes,
14442
+ sb as getInputTypeForFormat,
14443
+ d_ as getLabInvestigationsBundle,
14444
+ yv as getLocationByTag,
14445
+ a_ as getMedicationByUuid,
14446
+ A_ as getObservationsBundleByEncounterUuid,
14447
+ b_ as getOrderTypeNames,
14469
14448
  Os as getOrderTypes,
14470
- rb as getOrderedAddressHierarchyLevels,
14471
- Eb as getPastAppointments,
14472
- Ob as getPastAppointmentsPage,
14449
+ eb as getOrderedAddressHierarchyLevels,
14450
+ yb as getPastAppointments,
14451
+ Sb as getPastAppointmentsPage,
14473
14452
  of as getPatientById,
14474
- t_ as getPatientDiagnoses,
14475
- Kb as getPatientEncounters,
14476
- W_ as getPatientFormData,
14477
- _v as getPatientImmunizations,
14453
+ Zb as getPatientDiagnoses,
14454
+ Yb as getPatientEncounters,
14455
+ G_ as getPatientFormData,
14456
+ Ev as getPatientImmunizations,
14478
14457
  Zm as getPatientMedicationBundle,
14479
- s_ as getPatientMedications,
14480
- P_ as getPatientObservations,
14458
+ r_ as getPatientMedications,
14459
+ O_ as getPatientObservations,
14481
14460
  Vy as getPatientObservationsBundle,
14482
- A_ as getPatientObservationsWithEncounterBundle,
14483
- nb as getPatientProfile,
14484
- rv as getPatientPrograms,
14485
- nv as getPatientProgramsPage,
14486
- u_ as getPatientRadiologyInvestigationBundle,
14487
- l_ as getPatientRadiologyInvestigationBundleWithImagingStudy,
14488
- d_ as getPatientRadiologyInvestigations,
14489
- ob as getPersonAttributeTypes,
14461
+ R_ as getPatientObservationsWithEncounterBundle,
14462
+ tb as getPatientProfile,
14463
+ ev as getPatientPrograms,
14464
+ tv as getPatientProgramsPage,
14465
+ i_ as getPatientRadiologyInvestigationBundle,
14466
+ c_ as getPatientRadiologyInvestigationBundleWithImagingStudy,
14467
+ u_ as getPatientRadiologyInvestigations,
14468
+ nb as getPersonAttributeTypes,
14490
14469
  ff as getPrimaryIdentifierType,
14491
- RE as getPriorityByOrder,
14492
- sv as getProgramByUUID,
14493
- C_ as getProviderLoginLocations,
14494
- sb as getRelationshipTypes,
14470
+ TE as getPriorityByOrder,
14471
+ rv as getProgramByUUID,
14472
+ $_ as getProviderLoginLocations,
14473
+ rb as getRelationshipTypes,
14495
14474
  Jt as getServiceRequests,
14496
- Nv as getTasks,
14497
- Av as getTemplates,
14498
- Fb as getTimeInMinutes,
14499
- xb as getTodayDate,
14500
- wb as getUpcomingAppointments,
14501
- Rb as getUpcomingAppointmentsPage,
14475
+ Av as getTasks,
14476
+ Rv as getTemplates,
14477
+ Ub as getTimeInMinutes,
14478
+ Cb as getTodayDate,
14479
+ gb as getUpcomingAppointments,
14480
+ Tb as getUpcomingAppointmentsPage,
14502
14481
  Kt as getUserLoginLocation,
14503
14482
  an as getUserPreferredLocale,
14504
- i_ as getVaccinations,
14505
- NE as getValueType,
14506
- Tv as getVisibleModules,
14507
- fb as getVisitTypes,
14483
+ o_ as getVaccinations,
14484
+ AE as getValueType,
14485
+ _v as getVisibleModules,
14486
+ lb as getVisitTypes,
14508
14487
  Dm as getVisits,
14509
- tv as getVitalFlowSheetData,
14510
- OE as groupByDate,
14511
- I_ as groupObservationsByEncounter,
14512
- aw as hasMissingMandatoryVisibleField,
14513
- z_ as hasPrivilege,
14514
- iE as initAppI18n,
14515
- H_ as initializeAuditListener,
14516
- Rv as invokeCDSSRule,
14517
- ib as isBooleanFormat,
14518
- cb as isConceptFormat,
14519
- lb as isDateFormat,
14520
- ub as isNumberFormat,
14521
- SE as isStringEmpty,
14522
- db as isTextFormat,
14488
+ Z_ as getVitalFlowSheetData,
14489
+ SE as groupByDate,
14490
+ P_ as groupObservationsByEncounter,
14491
+ H_ as hasPrivilege,
14492
+ oE as initAppI18n,
14493
+ j_ as initializeAuditListener,
14494
+ Tv as invokeCDSSRule,
14495
+ ob as isBooleanFormat,
14496
+ ab as isConceptFormat,
14497
+ cb as isDateFormat,
14498
+ ib as isNumberFormat,
14499
+ vE as isStringEmpty,
14500
+ ub as isTextFormat,
14523
14501
  ew as logAuditEvent,
14524
- R_ as logout,
14525
- Gb as mapAllergyToInputEntry,
14526
- VE as mapGenderFromFhir,
14527
- e_ as markConditionAsInactive,
14528
- aE as normalizeTranslationKey,
14529
- jb as notificationService,
14502
+ T_ as logout,
14503
+ zb as mapAllergyToInputEntry,
14504
+ FE as mapGenderFromFhir,
14505
+ Xb as markConditionAsInactive,
14506
+ sE as normalizeTranslationKey,
14507
+ qb as notificationService,
14530
14508
  Ld as parseQueryParams,
14531
- oE as patch,
14509
+ nE as patch,
14532
14510
  ge as post,
14533
14511
  Ei as put,
14534
- bE as refreshQueries,
14535
- Pv as renderAsHtml,
14536
- F_ as resetEncounterSession,
14537
- IE as resolveComboBoxItems,
14538
- k_ as resolveEncounterMatchDecision,
14539
- wv as saveDocument,
14540
- ME as saveUserLocation,
14541
- yb as searchAppointmentsByAttribute,
14512
+ wE as refreshQueries,
14513
+ Ov as renderAsHtml,
14514
+ U_ as resetEncounterSession,
14515
+ PE as resolveComboBoxItems,
14516
+ L_ as resolveEncounterMatchDecision,
14517
+ gv as saveDocument,
14518
+ xE as saveUserLocation,
14519
+ mb as searchAppointmentsByAttribute,
14542
14520
  gm as searchConceptByName,
14543
- Vb as searchConcepts,
14521
+ Fb as searchConcepts,
14544
14522
  ss as searchEncounters,
14545
14523
  jr as searchFHIRConcepts,
14546
14524
  mm as searchFHIRConceptsByName,
14547
- a_ as searchMedications,
14548
- YE as searchPatientByCustomAttribute,
14549
- zE as searchPatientByNameOrId,
14550
- TE as setCookie,
14551
- U_ as setEncounterSessionDecision,
14552
- q_ as setEncounterSessionLoading,
14553
- Qb as shouldEnableEncounterFilter,
14554
- qb as sortByDate,
14555
- $w as sortByOrder,
14525
+ s_ as searchMedications,
14526
+ BE as searchPatientByCustomAttribute,
14527
+ HE as searchPatientByNameOrId,
14528
+ _E as setCookie,
14529
+ k_ as setEncounterSessionDecision,
14530
+ M_ as setEncounterSessionLoading,
14531
+ Wb as shouldEnableEncounterFilter,
14532
+ Mb as sortByDate,
14533
+ Nw as sortByOrder,
14556
14534
  Wy as subscribeEncounterSession,
14557
- X_ as transformContainerObservationsToForm2Observations,
14558
- J_ as transformFormDataToObservations,
14559
- Q_ as transformObservationsToFormData,
14560
- bb as updateAppointmentStatus,
14561
- g_ as updateDiagnosticReportBundle,
14562
- Jb as updateFhirEncounter,
14563
- ZE as updateFhirPatient,
14564
- JE as updatePatient,
14565
- ov as updateProgramState,
14566
- UE as updateSessionLocation,
14567
- vv as uploadDocument,
14568
- fv as useCDSSCheckListener,
14569
- pv as useCDSSResultsListener,
14570
- cE as useCamera,
14571
- j_ as useEncounterSessionStore,
14572
- uv as useSubscribeConsultationSaved,
14573
- Dv as useTranslation
14535
+ J_ as transformContainerObservationsToForm2Observations,
14536
+ K_ as transformFormDataToObservations,
14537
+ W_ as transformObservationsToFormData,
14538
+ wb as updateAppointmentStatus,
14539
+ h_ as updateDiagnosticReportBundle,
14540
+ Kb as updateFhirEncounter,
14541
+ QE as updateFhirPatient,
14542
+ KE as updatePatient,
14543
+ nv as updateProgramState,
14544
+ kE as updateSessionLocation,
14545
+ bv as uploadDocument,
14546
+ lv as useCDSSCheckListener,
14547
+ dv as useCDSSResultsListener,
14548
+ aE as useCamera,
14549
+ q_ as useEncounterSessionStore,
14550
+ iv as useSubscribeConsultationSaved,
14551
+ Iv as useTranslation
14574
14552
  };