@bahmni/registration-app 0.0.1-dev.204 → 0.0.1-dev.205

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as o, jsxs as l, Fragment as k } from "react/jsx-runtime";
2
- import { l as V, u as x, Q as F, s as H, y as q, C as Q, x as P, T as G } from "./index-C3dYT9FK.js";
2
+ import { l as V, u as x, Q as F, s as H, y as q, C as Q, x as P, T as G } from "./index-Gjf6R2kN.js";
3
3
  import { useQuery as Y } from "@tanstack/react-query";
4
4
  import { useState as I, useCallback as T, useEffect as U, useMemo as p } from "react";
5
5
  const z = "_documentsTableBody_1voj8_1", J = "_viewAttachmentsLink_1voj8_11", K = "_documentViewerContainer_1voj8_15", W = "_attachmentItem_1voj8_23", X = "_attachmentCounter_1voj8_27", Z = "_attachmentError_1voj8_36", ee = "_documentIframe_1voj8_44", te = "_documentImage_1voj8_50", d = {
@@ -1,5 +1,5 @@
1
1
  import { jsx as o, jsxs as p, Fragment as k } from "react/jsx-runtime";
2
- import { u as M, l as ae, o as te, i as oe, a as ne, b as se, n as de, f as me, C as ie, y as le, x as q, I as ce, Z as ue, T as be, O as pe, $ as H, t as fe, U as K, c as A, d as _e, D as $e, S as ye, R as ge, e as he } from "./index-C3dYT9FK.js";
2
+ import { u as M, l as ae, o as te, i as oe, a as ne, b as se, n as de, f as me, C as ie, y as le, x as q, I as ce, Z as ue, T as be, O as pe, $ as H, t as fe, U as K, c as A, d as _e, D as $e, S as ye, R as ge, e as he } from "./index-Gjf6R2kN.js";
3
3
  import { useQueryClient as ve, useQuery as R } from "@tanstack/react-query";
4
4
  import { useState as P, useMemo as h, useCallback as C } from "react";
5
5
  const Ne = "_formsTableBody_1pd36_1", Re = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Ae = "_formDetailsContainer_1pd36_25", Fe = "_observation_1pd36_30", Le = "_groupContainer_1pd36_39", Ie = "_rowContainer_1pd36_43", Oe = "_groupLabel_1pd36_48", Me = "_rowLabel_1pd36_58", Te = "_rowValue_1pd36_67", De = "_groupMembers_1pd36_75", Se = "_memberRow_1pd36_81", xe = "_memberLabel_1pd36_86", Ve = "_memberValue_1pd36_94", we = "_abnormalValue_1pd36_102", Ee = "_commentSection_1pd36_110", Be = "_commentText_1pd36_116", Ue = "_nestedGroup_1pd36_125", Ge = "_nestedGroupLabel_1pd36_132", qe = "_nestedGroupMembers_1pd36_141", n = {
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as v, D as u, Q as i } from "./YPM2AS64-DoJ2P-Sp.js";
2
- import { m as d, q as f, v as e } from "./index-C3dYT9FK.js";
1
+ import { c, T as l, P as m, a as v, D as u, Q as i } from "./YPM2AS64-DcHRGQIN.js";
2
+ import { m as d, q as f, v as e } from "./index-Gjf6R2kN.js";
3
3
  var p = (a) => {
4
4
  const [r, t] = c({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
- import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-DoJ2P-Sp.js";
2
- import { m as v, q as C, v as e } from "./index-C3dYT9FK.js";
1
+ import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-DcHRGQIN.js";
2
+ import { m as v, q as C, v as e } from "./index-Gjf6R2kN.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
1
  import { jsxs as I, jsx as l } from "react/jsx-runtime";
2
- import { l as B, Q, u as S, g as V, r as w, f as x, t as K, h as j, p as G, w as H, x as M, j as P, L as N, k as z, d as Y, E as J, D as W, S as X, R as Z } from "./index-C3dYT9FK.js";
2
+ import { l as B, Q, u as S, g as V, r as w, f as x, t as K, h as j, p as G, w as H, x as M, j as P, L as N, k as z, d as Y, E as J, D as W, S as X, R as Z } from "./index-Gjf6R2kN.js";
3
3
  import { useQueries as ee, useQuery as te } from "@tanstack/react-query";
4
4
  import { useRef as ae, useEffect as $, useMemo as R } from "react";
5
5
  const D = (t, d, i, u, r) => {
@@ -1,4 +1,4 @@
1
- import { z as we, A as z, B as xt, F as B, q, v as y, P as Ro, G as ye, H as R, J as _, K as k, M as N, N as A, V as bs, W as ir, X as $e, Y as G, _ as Hn, a0 as Vn, a1 as dt, a2 as D, a3 as xs, a4 as cn, a5 as Be, a6 as ws, a7 as qt, a8 as zt, a9 as $s, aa as Cs, ab as $n, ac as Ss, ad as Nr, ae as Bt, af as zo, ag as ks, ah as Es, ai as j, aj as Gr, ak as Ms, al as Ds, am as sr, an as As, ao as Ts, ap as zn, aq as Fs, ar as Is, as as Z, at as Ps, au as Ls } from "./index-C3dYT9FK.js";
1
+ import { z as we, A as z, B as xt, F as B, q, v as y, P as Ro, G as ye, H as R, J as _, K as k, M as N, N as A, V as bs, W as ir, X as $e, Y as G, _ as Hn, a0 as Vn, a1 as dt, a2 as D, a3 as xs, a4 as cn, a5 as Be, a6 as ws, a7 as qt, a8 as zt, a9 as $s, aa as Cs, ab as $n, ac as Ss, ad as Nr, ae as Bt, af as zo, ag as ks, ah as Es, ai as j, aj as Gr, ak as Ms, al as Ds, am as sr, an as As, ao as Ts, ap as zn, aq as Fs, ar as Is, as as Z, at as Ps, au as Ls } from "./index-Gjf6R2kN.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useUpdatePatient.d.ts","sourceRoot":"","sources":["../../src/hooks/useUpdatePatient.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EACjB,cAAc,EAOf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+DAA+D,CAAC;AAEtG,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAI3B,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,aAAa,GAAG;QACvB,YAAY,EAAE,OAAO,CAAC;QACtB,iBAAiB,EAAE,iBAAiB,CAAC;QACrC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,UAAU,EAAE,oBAAoB,CAAC;IACjC,qBAAqB,EAAE,yBAAyB,CAAC;IACjD,gCAAgC,CAAC,EAAE,yBAAyB,CAAC;IAC7D,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,kJA4C5B,CAAC"}
1
+ {"version":3,"file":"useUpdatePatient.d.ts","sourceRoot":"","sources":["../../src/hooks/useUpdatePatient.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EACjB,cAAc,EAOf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+DAA+D,CAAC;AAEtG,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAM3B,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,aAAa,GAAG;QACvB,YAAY,EAAE,OAAO,CAAC;QACtB,iBAAiB,EAAE,iBAAiB,CAAC;QACrC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,UAAU,EAAE,oBAAoB,CAAC;IACjC,qBAAqB,EAAE,yBAAyB,CAAC;IACjD,gCAAgC,CAAC,EAAE,yBAAyB,CAAC;IAC7D,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,kJA+C5B,CAAC"}
@@ -36929,7 +36929,7 @@ function wm({
36929
36929
  }, i), a));
36930
36930
  }
36931
36931
  const {
36932
- open: kB0,
36932
+ open: ZB0,
36933
36933
  ...ns2
36934
36934
  } = ea.propTypes ?? {};
36935
36935
  wm.propTypes = {
@@ -71090,22 +71090,22 @@ e0.getAdapter = bL1.getAdapter;
71090
71090
  e0.HttpStatusCode = bp;
71091
71091
  e0.default = e0;
71092
71092
  const {
71093
- Axios: BB0,
71094
- AxiosError: PB0,
71095
- CanceledError: jB0,
71096
- isCancel: FB0,
71097
- CancelToken: qB0,
71098
- VERSION: UB0,
71099
- all: WB0,
71100
- Cancel: KB0,
71101
- isAxiosError: YB0,
71102
- spread: GB0,
71103
- toFormData: JB0,
71104
- AxiosHeaders: QB0,
71105
- HttpStatusCode: XB0,
71106
- formToJSON: eP0,
71107
- getAdapter: tP0,
71108
- mergeConfig: rP0
71093
+ Axios: PB0,
71094
+ AxiosError: jB0,
71095
+ CanceledError: FB0,
71096
+ isCancel: qB0,
71097
+ CancelToken: UB0,
71098
+ VERSION: WB0,
71099
+ all: KB0,
71100
+ Cancel: YB0,
71101
+ isAxiosError: GB0,
71102
+ spread: JB0,
71103
+ toFormData: QB0,
71104
+ AxiosHeaders: XB0,
71105
+ HttpStatusCode: eP0,
71106
+ formToJSON: tP0,
71107
+ getAdapter: rP0,
71108
+ mergeConfig: nP0
71109
71109
  } = e0, NB2 = (t) => typeof t == "object" && t !== null && "resourceType" in t && t.resourceType === "OperationOutcome", CB2 = (t) => {
71110
71110
  if (!t.issue || !Array.isArray(t.issue))
71111
71111
  return null;
@@ -116177,7 +116177,7 @@ function e7({
116177
116177
  }, i), a));
116178
116178
  }
116179
116179
  const {
116180
- open: hP0,
116180
+ open: pP0,
116181
116181
  ...Zh0
116182
116182
  } = ha.propTypes ?? {};
116183
116183
  e7.propTypes = {
@@ -141065,7 +141065,7 @@ const XE0 = "_bahmniIcon_1cg5e_1", eM0 = "_paddingNone_1cg5e_1", tM0 = "_padding
141065
141065
  renderIcon: () => /* @__PURE__ */ ce(yA1, { className: e }),
141066
141066
  children: t
141067
141067
  }
141068
- ), pP0 = ({
141068
+ ), fP0 = ({
141069
141069
  testId: t,
141070
141070
  ...e
141071
141071
  }) => /* @__PURE__ */ ce(ZA1, { ...e, "data-testid": t }), EM0 = ({
@@ -141210,7 +141210,7 @@ const NM0 = ({
141210
141210
  container: CM0,
141211
141211
  accordion: LM0,
141212
141212
  rows: AM0
141213
- }, fP0 = ({
141213
+ }, mP0 = ({
141214
141214
  title: t,
141215
141215
  rows: e,
141216
141216
  children: r,
@@ -141278,7 +141278,7 @@ const ri = "/openmrs/auth?requested_document=/document_images/", _M0 = "_thumbna
141278
141278
  thumbnailImage: TM0,
141279
141279
  modalImageContainer: $M0,
141280
141280
  modalImage: OM0
141281
- }, mP0 = ({
141281
+ }, wP0 = ({
141282
141282
  imageSrc: t,
141283
141283
  alt: e,
141284
141284
  id: r,
@@ -141345,7 +141345,7 @@ const ri = "/openmrs/auth?requested_document=/document_images/", _M0 = "_thumbna
141345
141345
  fileTileButton: DM0,
141346
141346
  modalIframeContainer: RM0,
141347
141347
  modalIframe: SM0
141348
- }, wP0 = ({
141348
+ }, gP0 = ({
141349
141349
  src: t,
141350
141350
  id: e,
141351
141351
  className: r,
@@ -141410,7 +141410,7 @@ const ri = "/openmrs/auth?requested_document=/document_images/", _M0 = "_thumbna
141410
141410
  playIcon: BM0,
141411
141411
  modalVideoContainer: PM0,
141412
141412
  modalVideo: jM0
141413
- }, gP0 = ({
141413
+ }, vP0 = ({
141414
141414
  videoSrc: t,
141415
141415
  id: e,
141416
141416
  className: r,
@@ -143384,22 +143384,22 @@ t0.getAdapter = aD1.getAdapter;
143384
143384
  t0.HttpStatusCode = Nf;
143385
143385
  t0.default = t0;
143386
143386
  const {
143387
- Axios: vP0,
143388
- AxiosError: EP0,
143389
- CanceledError: MP0,
143390
- isCancel: yP0,
143391
- CancelToken: VP0,
143392
- VERSION: zP0,
143393
- all: HP0,
143394
- Cancel: xP0,
143395
- isAxiosError: bP0,
143396
- spread: NP0,
143397
- toFormData: CP0,
143398
- AxiosHeaders: LP0,
143399
- HttpStatusCode: AP0,
143400
- formToJSON: _P0,
143401
- getAdapter: TP0,
143402
- mergeConfig: $P0
143387
+ Axios: EP0,
143388
+ AxiosError: MP0,
143389
+ CanceledError: yP0,
143390
+ isCancel: VP0,
143391
+ CancelToken: zP0,
143392
+ VERSION: HP0,
143393
+ all: xP0,
143394
+ Cancel: bP0,
143395
+ isAxiosError: NP0,
143396
+ spread: CP0,
143397
+ toFormData: LP0,
143398
+ AxiosHeaders: AP0,
143399
+ HttpStatusCode: _P0,
143400
+ formToJSON: TP0,
143401
+ getAdapter: $P0,
143402
+ mergeConfig: OP0
143403
143403
  } = t0, HV0 = (t) => typeof t == "object" && t !== null && "resourceType" in t && t.resourceType === "OperationOutcome", xV0 = (t) => {
143404
143404
  if (!t.issue || !Array.isArray(t.issue))
143405
143405
  return null;
@@ -145029,7 +145029,7 @@ function pD1(t, e, r) {
145029
145029
  return !l && !s;
145030
145030
  });
145031
145031
  }
145032
- const OP0 = (t) => {
145032
+ const DP0 = (t) => {
145033
145033
  if (typeof t == "number" && !isNaN(t))
145034
145034
  return "number";
145035
145035
  if (typeof t != "string")
@@ -146800,7 +146800,7 @@ const ax0 = () => {
146800
146800
  }
146801
146801
  };
146802
146802
  }, LD1 = ax0(), cx0 = (t) => `${Ar}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(t)}`, ix0 = "SHORT", lx0 = "FULLY_SPECIFIED";
146803
- async function DP0(t) {
146803
+ async function RP0(t) {
146804
146804
  const e = cx0(t), r = await E0(e);
146805
146805
  return !r.results || r.results.length === 0 ? null : r.results[0];
146806
146806
  }
@@ -146850,7 +146850,7 @@ async function fx0(t) {
146850
146850
  return px0(e);
146851
146851
  }
146852
146852
  var _f = /* @__PURE__ */ ((t) => (t.Active = "Active", t.Inactive = "Inactive", t))(_f || {}), W6 = /* @__PURE__ */ ((t) => (t.mild = "mild", t.moderate = "moderate", t.severe = "severe", t))(W6 || {});
146853
- const mx0 = "problem-list-item", wx0 = "encounter-diagnosis", gx0 = "http://fhir.bahmni.org/ext/lab-order-concept-type", RP0 = "http://fhir.bahmni.org/ext/observation/form-namespace-path", vx0 = (t) => lr + `/Condition?category=${mx0}&patient=${t}&_count=100&_sort=-_lastUpdated`;
146853
+ const mx0 = "problem-list-item", wx0 = "encounter-diagnosis", gx0 = "http://fhir.bahmni.org/ext/lab-order-concept-type", SP0 = "http://fhir.bahmni.org/ext/observation/form-namespace-path", vx0 = (t) => lr + `/Condition?category=${mx0}&patient=${t}&_count=100&_sort=-_lastUpdated`;
146854
146854
  async function Ex0(t) {
146855
146855
  return await E0(`${vx0(t)}`);
146856
146856
  }
@@ -151547,12 +151547,12 @@ const sN0 = (t) => Ar + `/form/${t}?v=custom:(resources:(value))`, dN0 = (t) =>
151547
151547
  const r = e.join(",");
151548
151548
  return `${lr}/Observation?patient=${t}&code=${r}&_include=Observation:has-member&_include=Observation:encounter&_sort=-_lastUpdated`;
151549
151549
  };
151550
- async function SP0(t, e) {
151550
+ async function kP0(t, e) {
151551
151551
  const r = pN0(t, e);
151552
151552
  return await E0(r);
151553
151553
  }
151554
151554
  const fN0 = (t) => `${lr}/Observation/$fetch-all?encounter=${t}`;
151555
- async function kP0(t) {
151555
+ async function ZP0(t) {
151556
151556
  return await E0(
151557
151557
  fN0(t)
151558
151558
  );
@@ -151593,12 +151593,12 @@ const k7 = (t, e) => t?.length === 0 ? !1 : e?.length === 0, mN0 = async () => {
151593
151593
  editable: o.editable
151594
151594
  }))
151595
151595
  };
151596
- }, ZP0 = async (t) => {
151596
+ }, IP0 = async (t) => {
151597
151597
  const e = await wN0(), r = hD1();
151598
151598
  return e.map(
151599
151599
  (o) => vN0(o, r)
151600
151600
  );
151601
- }, IP0 = async (t) => {
151601
+ }, BP0 = async (t) => {
151602
151602
  const e = await fetch(sN0(t));
151603
151603
  if (!e.ok)
151604
151604
  throw new Error(
@@ -151632,7 +151632,7 @@ const k7 = (t, e) => t?.length === 0 ? !1 : e?.length === 0, mN0 = async () => {
151632
151632
  schema: o,
151633
151633
  translations: d
151634
151634
  };
151635
- }, BP0 = async (t, e, r) => {
151635
+ }, PP0 = async (t, e, r) => {
151636
151636
  const o = hN0(t, r), a = await E0(o);
151637
151637
  return Array.isArray(a) ? a : [];
151638
151638
  }, EN0 = Ar + "/bahmnicore/diseaseSummaryData?", MN0 = async (t, e, r, o) => {
@@ -151715,7 +151715,7 @@ async function CN0(t, e) {
151715
151715
  const r = bN0(t, e);
151716
151716
  return E0(r);
151717
151717
  }
151718
- async function PP0(t, e) {
151718
+ async function jP0(t, e) {
151719
151719
  const r = ((await CN0(t, e)).entry ?? []).filter(
151720
151720
  (o) => !!o.resource
151721
151721
  );
@@ -155210,7 +155210,7 @@ const cA0 = (t) => !t || t.length === 0 ? [] : [...t].sort((e, r) => {
155210
155210
  completed: "COMPLETED_STATUS",
155211
155211
  revoked: "REVOKED_STATUS",
155212
155212
  unknown: "UNKNOWN_STATUS"
155213
- }, uA0 = "normal", hA0 = "http://terminology.hl7.org/CodeSystem/referencerange-meaning", pA0 = "A", fA0 = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", jP0 = (t, e) => t?.date ? Q2(t.date, e).formattedResult : e("DATE_ERROR_PARSE"), dM = (t, e) => {
155213
+ }, uA0 = "normal", hA0 = "http://terminology.hl7.org/CodeSystem/referencerange-meaning", pA0 = "A", fA0 = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", FP0 = (t, e) => t?.date ? Q2(t.date, e).formattedResult : e("DATE_ERROR_PARSE"), dM = (t, e) => {
155214
155214
  if (!t.observationValue?.value)
155215
155215
  return "";
155216
155216
  const { value: r, unit: o, type: a } = t.observationValue;
@@ -155236,7 +155236,7 @@ const cA0 = (t) => !t || t.length === 0 ? [] : [...t].sort((e, r) => {
155236
155236
  return `${e} (<${i})`;
155237
155237
  }
155238
155238
  return e;
155239
- }, FP0 = (t, e, r) => ({
155239
+ }, qP0 = (t, e, r) => ({
155240
155240
  index: e,
155241
155241
  header: mA0(t),
155242
155242
  value: dM(t, r),
@@ -155370,7 +155370,7 @@ function EA0(t) {
155370
155370
  s.members ? c.push(s) : a.push(s);
155371
155371
  }), { observations: a, groupedObservations: c };
155372
155372
  }
155373
- function qP0(t) {
155373
+ function UP0(t) {
155374
155374
  const e = /* @__PURE__ */ new Map();
155375
155375
  return t.observations.forEach((r) => {
155376
155376
  if (!r.encounter?.id) return;
@@ -155396,7 +155396,7 @@ function qP0(t) {
155396
155396
  };
155397
155397
  });
155398
155398
  }
155399
- function UP0(t) {
155399
+ function WP0(t) {
155400
155400
  return [...t].sort((e, r) => {
155401
155401
  const o = e.encounterDetails?.date, a = r.encounterDetails?.date;
155402
155402
  return !o && !a ? 0 : o ? a ? new Date(a).getTime() - new Date(o).getTime() : -1 : 1;
@@ -157664,7 +157664,7 @@ function LT0(t, e, r) {
157664
157664
  return o;
157665
157665
  };
157666
157666
  }
157667
- Ht(() => Promise.resolve().then(() => pC0)), Ht(() => Promise.resolve().then(() => ZC0)), Ht(() => Promise.resolve().then(() => wL0)), Ht(() => Promise.resolve().then(() => zL0)), Ht(() => import("./DocumentsTable-Q5HkvbQZ-BwEhJrxa.js")), Ht(() => Promise.resolve().then(() => aT0)), Ht(() => import("./FormsTable-Cdd71yFV-qN6Mq3VU.js")), Ht(() => Promise.resolve().then(() => T_0)), Ht(() => import("./Observations-BYckgbFk-007k6Zri.js")), Ht(
157667
+ Ht(() => Promise.resolve().then(() => pC0)), Ht(() => Promise.resolve().then(() => ZC0)), Ht(() => Promise.resolve().then(() => wL0)), Ht(() => Promise.resolve().then(() => zL0)), Ht(() => import("./DocumentsTable-Q5HkvbQZ-D8gitcW-.js")), Ht(() => Promise.resolve().then(() => aT0)), Ht(() => import("./FormsTable-Cdd71yFV-QeUzZaB1.js")), Ht(() => Promise.resolve().then(() => T_0)), Ht(() => import("./Observations-BYckgbFk-DHluXpcV.js")), Ht(
157668
157668
  () => Promise.resolve().then(() => mT0)
157669
157669
  ), Ht(
157670
157670
  () => Promise.resolve().then(() => e_0)
@@ -157822,7 +157822,7 @@ function OT0(t, e, r) {
157822
157822
  mutate: M
157823
157823
  }];
157824
157824
  }
157825
- function WP0(t) {
157825
+ function KP0(t) {
157826
157826
  return nn(t, !1);
157827
157827
  }
157828
157828
  function R0(t) {
@@ -157835,7 +157835,7 @@ function R0(t) {
157835
157835
  T2 = e;
157836
157836
  }
157837
157837
  }
157838
- function KP0(t, e, r) {
157838
+ function YP0(t, e, r) {
157839
157839
  const o = Array.isArray(t);
157840
157840
  let a, c = r && r.defer;
157841
157841
  return (i) => {
@@ -157878,11 +157878,11 @@ function RT0(t) {
157878
157878
  return nn(t, !1), T2 = X1 = null, o ? o.done : void 0;
157879
157879
  });
157880
157880
  }
157881
- var [ST0, YP0] = /* @__PURE__ */ Y2(!1);
157882
- function GP0() {
157881
+ var [ST0, GP0] = /* @__PURE__ */ Y2(!1);
157882
+ function JP0() {
157883
157883
  return [ST0, RT0];
157884
157884
  }
157885
- function JP0(t, e) {
157885
+ function QP0(t, e) {
157886
157886
  const r = Symbol("context");
157887
157887
  return {
157888
157888
  id: r,
@@ -157890,7 +157890,7 @@ function JP0(t, e) {
157890
157890
  defaultValue: t
157891
157891
  };
157892
157892
  }
157893
- function QP0(t) {
157893
+ function XP0(t) {
157894
157894
  let e;
157895
157895
  return X1 && X1.context && (e = X1.context[t.id]) !== void 0 ? e : t.defaultValue;
157896
157896
  }
@@ -158290,23 +158290,23 @@ function NR1(t) {
158290
158290
  return o.preload = () => r || ((r = t()).then((a) => e = () => a.default), r), o;
158291
158291
  }
158292
158292
  var WT0 = 0;
158293
- function XP0() {
158293
+ function ej0() {
158294
158294
  return R1.context ? R1.getNextContextId() : `cl-${WT0++}`;
158295
158295
  }
158296
158296
  var CR1 = (t) => `Stale read from <${t}>.`;
158297
- function ej0(t) {
158297
+ function tj0(t) {
158298
158298
  const e = "fallback" in t && {
158299
158299
  fallback: () => t.fallback
158300
158300
  };
158301
158301
  return x0(jT0(() => t.each, t.children, e || void 0));
158302
158302
  }
158303
- function tj0(t) {
158303
+ function rj0(t) {
158304
158304
  const e = "fallback" in t && {
158305
158305
  fallback: () => t.fallback
158306
158306
  };
158307
158307
  return x0(FT0(() => t.each, t.children, e || void 0));
158308
158308
  }
158309
- function rj0(t) {
158309
+ function nj0(t) {
158310
158310
  const e = t.keyed, r = x0(() => t.when, void 0, void 0), o = e ? r : x0(r, void 0, {
158311
158311
  equals: (a, c) => !a == !c
158312
158312
  });
@@ -158322,7 +158322,7 @@ function rj0(t) {
158322
158322
  return t.fallback;
158323
158323
  }, void 0, void 0);
158324
158324
  }
158325
- function nj0(t) {
158325
+ function oj0(t) {
158326
158326
  const e = MR1(() => t.children), r = x0(() => {
158327
158327
  const o = e(), a = Array.isArray(o) ? o : [o];
158328
158328
  let c = () => {
@@ -158345,7 +158345,7 @@ function nj0(t) {
158345
158345
  })) : l;
158346
158346
  }, void 0, void 0);
158347
158347
  }
158348
- function oj0(t) {
158348
+ function aj0(t) {
158349
158349
  return t;
158350
158350
  }
158351
158351
  var KT0 = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], YT0 = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...KT0]), GT0 = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), JT0 = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
@@ -158465,7 +158465,7 @@ var e$0 = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextm
158465
158465
  ]), r$0 = {
158466
158466
  xlink: "http://www.w3.org/1999/xlink",
158467
158467
  xml: "http://www.w3.org/XML/1998/namespace"
158468
- }, aj0 = (t) => x0(() => t());
158468
+ }, cj0 = (t) => x0(() => t());
158469
158469
  function n$0(t, e, r) {
158470
158470
  let o = r.length, a = e.length, c = o, i = 0, l = 0, s = e[a - 1].nextSibling, d = null;
158471
158471
  for (; i < a || l < c; ) {
@@ -158514,7 +158514,7 @@ function LR1(t, e, r, o = {}) {
158514
158514
  a(), e.textContent = "";
158515
158515
  };
158516
158516
  }
158517
- function cj0(t, e, r, o) {
158517
+ function ij0(t, e, r, o) {
158518
158518
  let a;
158519
158519
  const c = () => {
158520
158520
  const l = document.createElement("template");
@@ -158529,7 +158529,7 @@ function o$0(t, e = window.document) {
158529
158529
  r.has(c) || (r.add(c), e.addEventListener(c, AR1));
158530
158530
  }
158531
158531
  }
158532
- function ij0(t = window.document) {
158532
+ function lj0(t = window.document) {
158533
158533
  if (t[_c]) {
158534
158534
  for (let e of t[_c].keys()) t.removeEventListener(e, AR1);
158535
158535
  delete t[_c];
@@ -158796,7 +158796,7 @@ var g$0 = "http://www.w3.org/2000/svg";
158796
158796
  function _R1(t, e = !1) {
158797
158797
  return e ? document.createElementNS(g$0, t) : document.createElement(t);
158798
158798
  }
158799
- function lj0(t) {
158799
+ function sj0(t) {
158800
158800
  const {
158801
158801
  useShadow: e
158802
158802
  } = t, r = document.createTextNode(""), o = () => t.mount || document.body, a = Yu1();
@@ -158835,7 +158835,7 @@ function v$0(t, e) {
158835
158835
  }
158836
158836
  });
158837
158837
  }
158838
- function sj0(t) {
158838
+ function dj0(t) {
158839
158839
  const [, e] = UT0(t, ["component"]);
158840
158840
  return v$0(() => t.component, e);
158841
158841
  }
@@ -159342,42 +159342,42 @@ D2.registerClass = D2.defaultInstance.registerClass.bind(D2.defaultInstance);
159342
159342
  D2.registerSymbol = D2.defaultInstance.registerSymbol.bind(D2.defaultInstance);
159343
159343
  D2.registerCustom = D2.defaultInstance.registerCustom.bind(D2.defaultInstance);
159344
159344
  D2.allowErrorProps = D2.defaultInstance.allowErrorProps.bind(D2.defaultInstance);
159345
- var K$0 = D2.serialize, dj0 = D2.stringify;
159346
- function uj0(t) {
159345
+ var K$0 = D2.serialize, uj0 = D2.stringify;
159346
+ function hj0(t) {
159347
159347
  return t.state.fetchStatus === "fetching" ? "fetching" : t.getObserversCount() ? t.state.fetchStatus === "paused" ? "paused" : t.isStale() ? "stale" : "fresh" : "inactive";
159348
159348
  }
159349
- function hj0(t, e) {
159349
+ function pj0(t, e) {
159350
159350
  return `${t}${e.charAt(0).toUpperCase() + e.slice(1)}`;
159351
159351
  }
159352
- function pj0({
159352
+ function fj0({
159353
159353
  queryState: t,
159354
159354
  observerCount: e,
159355
159355
  isStale: r
159356
159356
  }) {
159357
159357
  return t.fetchStatus === "fetching" ? "blue" : e ? t.fetchStatus === "paused" ? "purple" : r ? "yellow" : "green" : "gray";
159358
159358
  }
159359
- function fj0({
159359
+ function mj0({
159360
159360
  status: t,
159361
159361
  isPaused: e
159362
159362
  }) {
159363
159363
  return e ? "purple" : t === "error" ? "red" : t === "pending" ? "yellow" : t === "success" ? "green" : "gray";
159364
159364
  }
159365
- function mj0(t) {
159365
+ function wj0(t) {
159366
159366
  return t === "fresh" ? "green" : t === "stale" ? "yellow" : t === "paused" ? "purple" : t === "inactive" ? "gray" : "blue";
159367
159367
  }
159368
- var wj0 = (t, e = !1) => {
159368
+ var gj0 = (t, e = !1) => {
159369
159369
  const {
159370
159370
  json: r
159371
159371
  } = K$0(t);
159372
159372
  return JSON.stringify(r, null, e ? 2 : void 0);
159373
- }, f6 = (t) => t.state.fetchStatus !== "idle" ? 0 : t.getObserversCount() ? t.isStale() ? 2 : 1 : 3, Y$0 = (t, e) => t.queryHash.localeCompare(e.queryHash), UR1 = (t, e) => t.state.dataUpdatedAt < e.state.dataUpdatedAt ? 1 : -1, G$0 = (t, e) => f6(t) === f6(e) ? UR1(t, e) : f6(t) > f6(e) ? 1 : -1, gj0 = {
159373
+ }, f6 = (t) => t.state.fetchStatus !== "idle" ? 0 : t.getObserversCount() ? t.isStale() ? 2 : 1 : 3, Y$0 = (t, e) => t.queryHash.localeCompare(e.queryHash), UR1 = (t, e) => t.state.dataUpdatedAt < e.state.dataUpdatedAt ? 1 : -1, G$0 = (t, e) => f6(t) === f6(e) ? UR1(t, e) : f6(t) > f6(e) ? 1 : -1, vj0 = {
159374
159374
  status: G$0,
159375
159375
  "query hash": Y$0,
159376
159376
  "last updated": UR1
159377
- }, m6 = (t) => t.state.isPaused ? 0 : t.state.status === "error" ? 2 : t.state.status === "pending" ? 1 : 3, WR1 = (t, e) => t.state.submittedAt < e.state.submittedAt ? 1 : -1, J$0 = (t, e) => m6(t) === m6(e) ? WR1(t, e) : m6(t) > m6(e) ? 1 : -1, vj0 = {
159377
+ }, m6 = (t) => t.state.isPaused ? 0 : t.state.status === "error" ? 2 : t.state.status === "pending" ? 1 : 3, WR1 = (t, e) => t.state.submittedAt < e.state.submittedAt ? 1 : -1, J$0 = (t, e) => m6(t) === m6(e) ? WR1(t, e) : m6(t) > m6(e) ? 1 : -1, Ej0 = {
159378
159378
  status: J$0,
159379
159379
  "last updated": WR1
159380
- }, Ej0 = (t) => t * parseFloat(getComputedStyle(document.documentElement).fontSize), Mj0 = () => {
159380
+ }, Mj0 = (t) => t * parseFloat(getComputedStyle(document.documentElement).fontSize), yj0 = () => {
159381
159381
  const [t, e] = Y2("dark");
159382
159382
  return DT0(() => {
159383
159383
  const r = window.matchMedia("(prefers-color-scheme: dark)");
@@ -159503,7 +159503,7 @@ var wj0 = (t, e = !1) => {
159503
159503
  const e = LR1(() => {
159504
159504
  const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [i] = this.#c, [l] = this.#p, [s] = this.#t;
159505
159505
  let d;
159506
- return this.#i ? d = this.#i : (d = NR1(() => import("./LNWAZHJI-DHtVEptj.js")), this.#i = d), KR1(this.#h, this.#r), xR1(d, bR1({
159506
+ return this.#i ? d = this.#i : (d = NR1(() => import("./LNWAZHJI-Bg-PeUwH.js")), this.#i = d), KR1(this.#h, this.#r), xR1(d, bR1({
159507
159507
  get queryFlavor() {
159508
159508
  return r.#d;
159509
159509
  },
@@ -159601,7 +159601,7 @@ var wj0 = (t, e = !1) => {
159601
159601
  const e = LR1(() => {
159602
159602
  const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [i] = this.#c, [l] = this.#p, [s] = this.#t, [d] = this.#i;
159603
159603
  let u;
159604
- return this.#l ? u = this.#l : (u = NR1(() => import("./MWZ6AO7Z-BvSi7mNB.js")), this.#l = u), KR1(this.#h, this.#r), xR1(u, bR1({
159604
+ return this.#l ? u = this.#l : (u = NR1(() => import("./MWZ6AO7Z-DoYhwvwc.js")), this.#l = u), KR1(this.#h, this.#r), xR1(u, bR1({
159605
159605
  get queryFlavor() {
159606
159606
  return r.#d;
159607
159607
  },
@@ -167601,11 +167601,11 @@ const fI0 = (t, e) => {
167601
167601
  a({});
167602
167602
  }
167603
167603
  };
167604
- }, HI0 = () => {
167604
+ }, HI0 = /\s\[.*\]$/, xI0 = () => {
167605
167605
  const { t } = W1(), { addNotification: e } = S0(), { personAttributes: r } = MM(), o = pi();
167606
167606
  return ig1({
167607
167607
  mutationFn: (c) => {
167608
- const i = xI0(c, r);
167608
+ const i = bI0(c, r);
167609
167609
  return aj2(c.patientUuid, i);
167610
167610
  },
167611
167611
  onSuccess: (c, i) => {
@@ -167624,16 +167624,17 @@ const fI0 = (t, e) => {
167624
167624
  }));
167625
167625
  },
167626
167626
  onError: (c) => {
167627
+ const i = (c instanceof Error ? c.message : String(c)).replace(HI0, "");
167627
167628
  e({
167628
167629
  type: "error",
167629
167630
  title: t("ERROR_UPDATING_PATIENT"),
167630
- message: c instanceof Error ? c.message : String(c),
167631
+ message: i,
167631
167632
  timeout: 5e3
167632
167633
  });
167633
167634
  }
167634
167635
  });
167635
167636
  };
167636
- function xI0(t, e) {
167637
+ function bI0(t, e) {
167637
167638
  const {
167638
167639
  profile: r,
167639
167640
  address: o,
@@ -167721,7 +167722,7 @@ function xI0(t, e) {
167721
167722
  relationships: M
167722
167723
  };
167723
167724
  }
167724
- function bI0(t, e, r, o) {
167725
+ function NI0(t, e, r, o) {
167725
167726
  const {
167726
167727
  profileRef: a,
167727
167728
  addressRef: c,
@@ -167742,7 +167743,7 @@ function bI0(t, e, r, o) {
167742
167743
  timeout: 5e3
167743
167744
  }), m;
167744
167745
  }
167745
- function NI0(t, e, r) {
167746
+ function CI0(t, e, r) {
167746
167747
  const {
167747
167748
  profileRef: o,
167748
167749
  addressRef: a,
@@ -167795,11 +167796,11 @@ function NI0(t, e, r) {
167795
167796
  const Qw1 = (t, e, r) => {
167796
167797
  const o = LP2(e, r), a = t(o);
167797
167798
  return a === o ? r : a;
167798
- }, CI0 = "_formSection_givm0_1", LI0 = "_identifierField_givm0_6", AI0 = "_identifierTable_givm0_25", _I0 = "_requiredAsterisk_givm0_49", ic = {
167799
- formSection: CI0,
167800
- identifierField: LI0,
167801
- identifierTable: AI0,
167802
- requiredAsterisk: _I0
167799
+ }, LI0 = "_formSection_givm0_1", AI0 = "_identifierField_givm0_6", _I0 = "_identifierTable_givm0_25", TI0 = "_requiredAsterisk_givm0_49", ic = {
167800
+ formSection: LI0,
167801
+ identifierField: AI0,
167802
+ identifierTable: _I0,
167803
+ requiredAsterisk: TI0
167803
167804
  }, HS1 = ({
167804
167805
  initialData: t,
167805
167806
  ref: e
@@ -167952,9 +167953,9 @@ const xS1 = () => {
167952
167953
  }, CS1 = (t, e, r) => {
167953
167954
  const o = e[t] || t;
167954
167955
  return r(o);
167955
- }, TI0 = "_checkboxField_1xk5i_1", $I0 = {
167956
- checkboxField: TI0
167957
- }, OI0 = (t) => /^[0-9]*$/.test(t), yM = ({
167956
+ }, $I0 = "_checkboxField_1xk5i_1", OI0 = {
167957
+ checkboxField: $I0
167958
+ }, DI0 = (t) => /^[0-9]*$/.test(t), yM = ({
167958
167959
  uuid: t,
167959
167960
  name: e,
167960
167961
  label: r,
@@ -167990,7 +167991,7 @@ const xS1 = () => {
167990
167991
  {
167991
167992
  legendText: r,
167992
167993
  "data-testid": `person-attribute-checkbox-group-${e}`,
167993
- children: /* @__PURE__ */ ce("div", { className: $I0.checkboxField, children: /* @__PURE__ */ ce(
167994
+ children: /* @__PURE__ */ ce("div", { className: OI0.checkboxField, children: /* @__PURE__ */ ce(
167994
167995
  vp,
167995
167996
  {
167996
167997
  id: t,
@@ -168051,7 +168052,7 @@ const xS1 = () => {
168051
168052
  case J4.NUMBER: {
168052
168053
  const w = typeof a == "number" ? a.toString() : typeof a == "string" ? a : "", g = (E) => {
168053
168054
  const h = E.target.value;
168054
- OI0(h) && d(h);
168055
+ DI0(h) && d(h);
168055
168056
  }, f = (w.length > GP2 ? u("REGISTRATION_INVALID_NUMBER_MAX_LENGTH") : "") || i;
168056
168057
  return /* @__PURE__ */ ce(
168057
168058
  rr,
@@ -168095,7 +168096,7 @@ const VM = (t, e) => {
168095
168096
  pattern: r.pattern,
168096
168097
  errorMessage: r.errorMessage
168097
168098
  };
168098
- }, DI0 = (t, e, r) => {
168099
+ }, RI0 = (t, e, r) => {
168099
168100
  if (!t)
168100
168101
  return { isValid: !0, error: "" };
168101
168102
  const a = new RegExp(e.pattern).test(t);
@@ -168123,15 +168124,15 @@ const VM = (t, e) => {
168123
168124
  o
168124
168125
  );
168125
168126
  if (u && s && r) {
168126
- const p = DI0(s, u, r);
168127
+ const p = RI0(s, u, r);
168127
168128
  p.isValid || (a[l] = p.error, c = !1);
168128
168129
  }
168129
168130
  }), { isValid: c, errors: a };
168130
- }, RI0 = "_additionalInfoSection_1jwy4_1", SI0 = "_attributeField_1jwy4_8", kI0 = "_row_1jwy4_27", ZI0 = "_fieldsContainer_1jwy4_36", y6 = {
168131
- additionalInfoSection: RI0,
168132
- attributeField: SI0,
168133
- row: kI0,
168134
- fieldsContainer: ZI0
168131
+ }, SI0 = "_additionalInfoSection_1jwy4_1", kI0 = "_attributeField_1jwy4_8", ZI0 = "_row_1jwy4_27", II0 = "_fieldsContainer_1jwy4_36", y6 = {
168132
+ additionalInfoSection: SI0,
168133
+ attributeField: kI0,
168134
+ row: ZI0,
168135
+ fieldsContainer: II0
168135
168136
  }, AS1 = ({ initialData: t, ref: e }) => {
168136
168137
  const { t: r } = W1(), { registrationConfig: o } = H3(), { attributeFields: a } = xS1(), i = o?.patientInformation?.additionalPatientInformation?.attributes ?? [], l = Pe(
168137
168138
  () => bS1(a, i),
@@ -168210,7 +168211,7 @@ const VM = (t, e) => {
168210
168211
  );
168211
168212
  };
168212
168213
  AS1.displayName = "AdditionalInfo";
168213
- function II0(t, e, r) {
168214
+ function BI0(t, e, r) {
168214
168215
  const [o, a] = fe({}), [c, i] = fe({});
168215
168216
  ue(() => {
168216
168217
  if (r && Object.keys(r).length > 0) {
@@ -168352,7 +168353,7 @@ function II0(t, e, r) {
168352
168353
  setAddressData: h
168353
168354
  };
168354
168355
  }
168355
- function BI0(t) {
168356
+ function PI0(t) {
168356
168357
  const {
168357
168358
  data: e,
168358
168359
  isLoading: r,
@@ -168400,7 +168401,7 @@ function BI0(t) {
168400
168401
  }), (w) => p.get(w) ?? null;
168401
168402
  }, [i]);
168402
168403
  return {
168403
- ...II0(
168404
+ ...BI0(
168404
168405
  l,
168405
168406
  s,
168406
168407
  t
@@ -168412,7 +168413,7 @@ function BI0(t) {
168412
168413
  getTranslationKey: d
168413
168414
  };
168414
168415
  }
168415
- function PI0(t, e, r) {
168416
+ function jI0(t, e, r) {
168416
168417
  const [o, a] = fe(
168417
168418
  {}
168418
168419
  ), [c, i] = fe({}), [l, s] = fe(
@@ -168512,10 +168513,10 @@ function PI0(t, e, r) {
168512
168513
  unmarkFieldAsCleared: f
168513
168514
  };
168514
168515
  }
168515
- const jI0 = "_formSection_1fe3n_1", FI0 = "_row_1fe3n_7", qI0 = "_col_1fe3n_12", S3 = {
168516
- formSection: jI0,
168517
- row: FI0,
168518
- col: qI0
168516
+ const FI0 = "_formSection_1fe3n_1", qI0 = "_row_1fe3n_7", UI0 = "_col_1fe3n_12", S3 = {
168517
+ formSection: FI0,
168518
+ row: qI0,
168519
+ col: UI0
168519
168520
  }, _S1 = ({
168520
168521
  fieldName: t,
168521
168522
  level: e,
@@ -168583,7 +168584,7 @@ const TS1 = ({ initialData: t, ref: e }) => {
168583
168584
  isLoadingLevels: u,
168584
168585
  getTranslationKey: p,
168585
168586
  clearChildFields: w
168586
- } = BI0(t), [g, M] = fe(
168587
+ } = PI0(t), [g, M] = fe(
168587
168588
  {}
168588
168589
  ), m = he(/* @__PURE__ */ new Set()), f = he(!1), E = Pe(() => {
168589
168590
  const G = /* @__PURE__ */ new Set();
@@ -168597,7 +168598,7 @@ const TS1 = ({ initialData: t, ref: e }) => {
168597
168598
  debouncedSearchAddress: L,
168598
168599
  clearChildSuggestions: T,
168599
168600
  unmarkFieldAsCleared: $
168600
- } = PI0(
168601
+ } = jI0(
168601
168602
  h,
168602
168603
  l,
168603
168604
  d
@@ -168812,11 +168813,11 @@ const TS1 = ({ initialData: t, ref: e }) => {
168812
168813
  }) }) });
168813
168814
  };
168814
168815
  TS1.displayName = "AddressInfo";
168815
- const UI0 = "_formSection_8lwsr_1", WI0 = "_row_8lwsr_8", KI0 = "_phoneNumberField_8lwsr_14", YI0 = "_requiredAsterisk_8lwsr_23", V6 = {
168816
- formSection: UI0,
168817
- row: WI0,
168818
- phoneNumberField: KI0,
168819
- requiredAsterisk: YI0
168816
+ const WI0 = "_formSection_8lwsr_1", KI0 = "_row_8lwsr_8", YI0 = "_phoneNumberField_8lwsr_14", GI0 = "_requiredAsterisk_8lwsr_23", V6 = {
168817
+ formSection: WI0,
168818
+ row: KI0,
168819
+ phoneNumberField: YI0,
168820
+ requiredAsterisk: GI0
168820
168821
  }, $S1 = ({ initialData: t, ref: e }) => {
168821
168822
  const { t: r } = W1(), { attributeFields: o } = xS1(), { registrationConfig: a } = H3(), i = a?.patientInformation?.contactInformation?.attributes ?? [], l = a?.fieldValidation, s = Pe(
168822
168823
  () => bS1(o, i),
@@ -168888,14 +168889,14 @@ const UI0 = "_formSection_8lwsr_1", WI0 = "_row_8lwsr_8", KI0 = "_phoneNumberFie
168888
168889
  }) }) });
168889
168890
  };
168890
168891
  $S1.displayName = "ContactInfo";
168891
- const GI0 = "_relationshipSection_11bw3_1", JI0 = "_tableContainer_11bw3_7", QI0 = "_addButtonContainer_11bw3_68", XI0 = "_wrapButton_11bw3_72", eB0 = "_requiredAsterisk_11bw3_80", tB0 = "_readOnlyText_11bw3_85", rB0 = "_patientLink_11bw3_92", yn = {
168892
- relationshipSection: GI0,
168893
- tableContainer: JI0,
168894
- addButtonContainer: QI0,
168895
- wrapButton: XI0,
168896
- requiredAsterisk: eB0,
168897
- readOnlyText: tB0,
168898
- patientLink: rB0
168892
+ const JI0 = "_relationshipSection_11bw3_1", QI0 = "_tableContainer_11bw3_7", XI0 = "_addButtonContainer_11bw3_68", eB0 = "_wrapButton_11bw3_72", tB0 = "_requiredAsterisk_11bw3_80", rB0 = "_readOnlyText_11bw3_85", nB0 = "_patientLink_11bw3_92", yn = {
168893
+ relationshipSection: JI0,
168894
+ tableContainer: QI0,
168895
+ addButtonContainer: XI0,
168896
+ wrapButton: eB0,
168897
+ requiredAsterisk: tB0,
168898
+ readOnlyText: rB0,
168899
+ patientLink: nB0
168899
168900
  }, Xw1 = {
168900
168901
  RELATIONSHIP_TYPE: "relationshipType",
168901
168902
  TILL_DATE: "tillDate"
@@ -169032,7 +169033,7 @@ const GI0 = "_relationshipSection_11bw3_1", JI0 = "_tableContainer_11bw3_7", QI0
169032
169033
  };
169033
169034
  };
169034
169035
  OS1.displayName = "RelationshipRow";
169035
- const eg1 = 2, nB0 = (t) => `${t.givenName} ${t.middleName || ""} ${t.familyName}`.replace(/\s+/g, " ").trim(), oB0 = () => {
169036
+ const eg1 = 2, oB0 = (t) => `${t.givenName} ${t.middleName || ""} ${t.familyName}`.replace(/\s+/g, " ").trim(), aB0 = () => {
169036
169037
  const [t, e] = fe({}), [r, o] = fe(null), { data: a } = O2({
169037
169038
  queryKey: ["patientSearch", t[r ?? ""]],
169038
169039
  queryFn: () => ej2(t[r ?? ""]),
@@ -169044,7 +169045,7 @@ const eg1 = 2, nB0 = (t) => `${t.givenName} ${t.middleName || ""} ${t.familyName
169044
169045
  searchTerms: t,
169045
169046
  getPatientSuggestions: (d) => !t[d] || t[d].length < eg1 ? [] : (a?.pageOfResults ?? []).map(
169046
169047
  (u) => {
169047
- const p = nB0(u);
169048
+ const p = oB0(u);
169048
169049
  return {
169049
169050
  id: u.uuid,
169050
169051
  text: `${p} (${u.identifier})`,
@@ -169070,7 +169071,7 @@ const eg1 = 2, nB0 = (t) => `${t.givenName} ${t.middleName || ""} ${t.familyName
169070
169071
  }, lc = {
169071
169072
  RELATIONSHIP_TYPE: "relationshipType",
169072
169073
  PATIENT_ID: "patientId"
169073
- }, aB0 = ({
169074
+ }, cB0 = ({
169074
169075
  initialData: t
169075
169076
  }) => {
169076
169077
  const [e, r] = fe(
@@ -169098,7 +169099,7 @@ const eg1 = 2, nB0 = (t) => `${t.givenName} ${t.middleName || ""} ${t.familyName
169098
169099
  clearSearch: u,
169099
169100
  clearAllSearches: p,
169100
169101
  setSearchTerms: w
169101
- } = oB0(), g = Ve(
169102
+ } = aB0(), g = Ve(
169102
169103
  (L, T, $) => {
169103
169104
  r(
169104
169105
  (I) => I.map((Z) => Z.id === L ? T === lc.RELATIONSHIP_TYPE ? {
@@ -169196,7 +169197,7 @@ const eg1 = 2, nB0 = (t) => `${t.givenName} ${t.middleName || ""} ${t.familyName
169196
169197
  validate: g,
169197
169198
  clearData: M,
169198
169199
  removeDeletedRelationships: m
169199
- } = aB0({ initialData: t });
169200
+ } = cB0({ initialData: t });
169200
169201
  on(e, () => ({
169201
169202
  getData: w,
169202
169203
  validate: g,
@@ -169271,7 +169272,7 @@ const eg1 = 2, nB0 = (t) => `${t.givenName} ${t.middleName || ""} ${t.familyName
169271
169272
  );
169272
169273
  };
169273
169274
  DS1.displayName = "PatientRelationships";
169274
- const cB0 = [
169275
+ const iB0 = [
169275
169276
  {
169276
169277
  type: "address",
169277
169278
  render: (t, e) => /* @__PURE__ */ ce(
@@ -169322,7 +169323,7 @@ const cB0 = [
169322
169323
  }
169323
169324
  )
169324
169325
  }
169325
- ], iB0 = ({
169326
+ ], lB0 = ({
169326
169327
  section: t,
169327
169328
  refs: e,
169328
169329
  data: r,
@@ -169332,7 +169333,7 @@ const cB0 = [
169332
169333
  onToggle: i
169333
169334
  }) => {
169334
169335
  const { t: l } = W1(), s = (p) => {
169335
- const w = cB0.find((g) => g.type === p);
169336
+ const w = iB0.find((g) => g.type === p);
169336
169337
  return w ? w.render(e, r, o) : null;
169337
169338
  }, d = (p) => {
169338
169339
  const w = s(p.type);
@@ -169389,7 +169390,7 @@ const cB0 = [
169389
169390
  }, [x]), ue(() => {
169390
169391
  L?.patientUuid && c(L.patientUuid);
169391
169392
  }, [L]);
169392
- const I = hI0(), Z = HI0(), F = I.isPending || Z.isPending, [W, Y] = fe(
169393
+ const I = hI0(), Z = xI0(), F = I.isPending || Z.isPending, [W, Y] = fe(
169393
169394
  /* @__PURE__ */ new Set()
169394
169395
  );
169395
169396
  ue(() => {
@@ -169404,7 +169405,7 @@ const cB0 = [
169404
169405
  return K.has(A) ? K.delete(A) : K.add(A), K;
169405
169406
  });
169406
169407
  }, X = async () => {
169407
- if (!bI0(
169408
+ if (!NI0(
169408
169409
  {
169409
169410
  profileRef: d,
169410
169411
  addressRef: u,
@@ -169437,7 +169438,7 @@ const cB0 = [
169437
169438
  B.add(ee);
169438
169439
  }), Y(B), null;
169439
169440
  }
169440
- const R = NI0(
169441
+ const R = CI0(
169441
169442
  {
169442
169443
  profileRef: d,
169443
169444
  addressRef: u,
@@ -169573,7 +169574,7 @@ const cB0 = [
169573
169574
  }
169574
169575
  ),
169575
169576
  J.map((A) => /* @__PURE__ */ ce(
169576
- iB0,
169577
+ lB0,
169577
169578
  {
169578
169579
  section: A,
169579
169580
  refs: re,
@@ -169618,7 +169619,7 @@ const cB0 = [
169618
169619
  ] })
169619
169620
  }
169620
169621
  );
169621
- }, lB0 = (t) => {
169622
+ }, sB0 = (t) => {
169622
169623
  switch (t?.toLowerCase()) {
169623
169624
  case "scheduled":
169624
169625
  return "scheduledStatus";
@@ -169636,11 +169637,11 @@ const cB0 = [
169636
169637
  default:
169637
169638
  return "defaultStatus";
169638
169639
  }
169639
- }, sB0 = (t, e, r) => t.map((o) => (o.appointmentUuid === e && (o.appointmentStatus = r), o)), dB0 = (t, e, r) => {
169640
+ }, dB0 = (t, e, r) => t.map((o) => (o.appointmentUuid === e && (o.appointmentStatus = r), o)), uB0 = (t, e, r) => {
169640
169641
  if (!t) return;
169641
169642
  const o = IL1(t, e, !0);
169642
169643
  o.startsWith("#") ? r(o.slice(1)) : window.location.href = o;
169643
- }, uB0 = async (t, e, r, o, a) => {
169644
+ }, hB0 = async (t, e, r, o, a) => {
169644
169645
  const { status: c, navigation: i } = t.onAction;
169645
169646
  if (t.type === "changeStatus")
169646
169647
  await rq2(
@@ -169649,7 +169650,7 @@ const cB0 = [
169649
169650
  ).then((l) => {
169650
169651
  const s = {
169651
169652
  totalCount: r.totalCount,
169652
- pageOfResults: sB0(
169653
+ pageOfResults: dB0(
169653
169654
  r.pageOfResults,
169654
169655
  l.uuid,
169655
169656
  l.status
@@ -169659,25 +169660,25 @@ const cB0 = [
169659
169660
  });
169660
169661
  else if (t.type === "navigate") {
169661
169662
  const l = {};
169662
- l.patientUuid = e.uuid, l.appointmentNumber = e.appointmentNumber, l.appointmentUuid = e.appointmentUuid, dB0(i ?? "", l, a);
169663
+ l.patientUuid = e.uuid, l.appointmentNumber = e.appointmentNumber, l.appointmentUuid = e.appointmentUuid, uB0(i ?? "", l, a);
169663
169664
  }
169664
- }, hB0 = (t, e, r) => {
169665
+ }, pB0 = (t, e, r) => {
169665
169666
  if (!t || t.length === 0) return !0;
169666
169667
  const o = {
169667
169668
  privilegeCheck: RS1(r),
169668
- statusCheck: fB0,
169669
- appDateCheck: mB0
169669
+ statusCheck: mB0,
169670
+ appDateCheck: wB0
169670
169671
  };
169671
169672
  return t.every(
169672
169673
  (a) => o[a.type](a.values, e)
169673
169674
  );
169674
- }, pB0 = (t, e) => {
169675
+ }, fB0 = (t, e) => {
169675
169676
  const r = t.enabledRule?.filter((o) => o.type === "privilegeCheck").map((o) => o.values).flat() ?? [];
169676
169677
  return r.length === 0 ? !1 : RS1(e)(r);
169677
- }, RS1 = (t) => (e) => e.some((r) => aA1(t, r)), fB0 = (t, e) => {
169678
+ }, RS1 = (t) => (e) => e.some((r) => aA1(t, r)), mB0 = (t, e) => {
169678
169679
  const r = String(e.appointmentStatus ?? "");
169679
169680
  return t.includes(r);
169680
- }, mB0 = (t, e) => {
169681
+ }, wB0 = (t, e) => {
169681
169682
  const r = /* @__PURE__ */ new Date(), o = new Date(r.getFullYear(), r.getMonth(), r.getDate()), a = new Date(e.appointmentDate);
169682
169683
  return t.some((c) => {
169683
169684
  switch (c) {
@@ -169691,25 +169692,25 @@ const cB0 = [
169691
169692
  return !1;
169692
169693
  }
169693
169694
  });
169694
- }, wB0 = "_main_pvy9o_1", gB0 = "_patientSearchResult_pvy9o_8", vB0 = "_resultsTitle_pvy9o_13", EB0 = "_patientSearchTableBody_pvy9o_22", MB0 = "_scheduledStatus_pvy9o_26", yB0 = "_arrivedStatus_pvy9o_31", VB0 = "_checkedInStatus_pvy9o_36", zB0 = "_completedStatus_pvy9o_41", HB0 = "_missedStatus_pvy9o_46", xB0 = "_cancelledStatus_pvy9o_47", bB0 = "_actionButtonsContainer_pvy9o_57", NB0 = "_actionButton_pvy9o_57", CB0 = "_headerButton_pvy9o_75", Fn = {
169695
- main: wB0,
169696
- patientSearchResult: gB0,
169697
- resultsTitle: vB0,
169698
- patientSearchTableBody: EB0,
169699
- scheduledStatus: MB0,
169700
- arrivedStatus: yB0,
169701
- checkedInStatus: VB0,
169702
- completedStatus: zB0,
169703
- missedStatus: HB0,
169704
- cancelledStatus: xB0,
169705
- actionButtonsContainer: bB0,
169706
- actionButton: NB0,
169707
- headerButton: CB0
169708
- }, LB0 = (t) => {
169695
+ }, gB0 = "_main_pvy9o_1", vB0 = "_patientSearchResult_pvy9o_8", EB0 = "_resultsTitle_pvy9o_13", MB0 = "_patientSearchTableBody_pvy9o_22", yB0 = "_scheduledStatus_pvy9o_26", VB0 = "_arrivedStatus_pvy9o_31", zB0 = "_checkedInStatus_pvy9o_36", HB0 = "_completedStatus_pvy9o_41", xB0 = "_missedStatus_pvy9o_46", bB0 = "_cancelledStatus_pvy9o_47", NB0 = "_actionButtonsContainer_pvy9o_57", CB0 = "_actionButton_pvy9o_57", LB0 = "_headerButton_pvy9o_75", Fn = {
169696
+ main: gB0,
169697
+ patientSearchResult: vB0,
169698
+ resultsTitle: EB0,
169699
+ patientSearchTableBody: MB0,
169700
+ scheduledStatus: yB0,
169701
+ arrivedStatus: VB0,
169702
+ checkedInStatus: zB0,
169703
+ completedStatus: HB0,
169704
+ missedStatus: xB0,
169705
+ cancelledStatus: bB0,
169706
+ actionButtonsContainer: NB0,
169707
+ actionButton: CB0,
169708
+ headerButton: LB0
169709
+ }, AB0 = (t) => {
169709
169710
  const e = t.customAttribute ? JSON.parse(t.customAttribute) : {}, r = t.addressFieldValue ? JSON.parse(t.addressFieldValue) : {}, o = t.patientProgramAttributeValue ? JSON.parse(t.patientProgramAttributeValue) : {};
169710
169711
  return { customAttributes: e, addressAttributes: r, programAttributes: o };
169711
- }, AB0 = (t, e = []) => t ? t.pageOfResults.map((r) => {
169712
- const { customAttributes: o, addressAttributes: a, programAttributes: c } = LB0(r), i = {};
169712
+ }, _B0 = (t, e = []) => t ? t.pageOfResults.map((r) => {
169713
+ const { customAttributes: o, addressAttributes: a, programAttributes: c } = AB0(r), i = {};
169713
169714
  return e.forEach((l) => {
169714
169715
  l.fields.forEach((s) => {
169715
169716
  o[s] !== void 0 ? i[s] = o[s] : a[s] !== void 0 ? i[s] = a[s] : c[s] !== void 0 && (i[s] = c[s]);
@@ -169729,7 +169730,7 @@ const cB0 = [
169729
169730
  APPOINTMENT_STATUS: "appointmentStatus",
169730
169731
  GENDER: "gender",
169731
169732
  ACTIONS: "actions"
169732
- }, _B0 = () => {
169733
+ }, TB0 = () => {
169733
169734
  const [t, e] = fe(), [r, o] = fe(""), [a, c] = fe(!1), [i, l] = fe(!1), [s, d] = fe(!1), [u, p] = fe(!1), [w, g] = fe([]), { t: M } = W1(), m = R5(), [f, E] = fe(""), { userPrivileges: h } = uR1(), { registrationConfig: v } = H3(), C = () => {
169734
169735
  m("/registration/patient/new");
169735
169736
  };
@@ -169782,26 +169783,26 @@ const cB0 = [
169782
169783
  ), Z = (G, X) => /* @__PURE__ */ ce(
169783
169784
  _92,
169784
169785
  {
169785
- className: `${Fn[lB0(String(X))]}`,
169786
+ className: `${Fn[sB0(String(X))]}`,
169786
169787
  "data-testid": `appointment-status-${G}`,
169787
169788
  children: M(
169788
169789
  `REGISTRATION_SEARCH_PAGE_APPOINTMENT_STATUS_${String(X).replace(/([a-z])([A-Z])/g, "$1_$2").toUpperCase()}`
169789
169790
  )
169790
169791
  }
169791
169792
  ), F = (G) => /* @__PURE__ */ ce(CZ2, { gap: 3, className: Fn.actionButtonsContainer, children: w.map(
169792
- (X) => X.actions?.map((j) => pB0(j, h ?? []) ? /* @__PURE__ */ ce(
169793
+ (X) => X.actions?.map((j) => fB0(j, h ?? []) ? /* @__PURE__ */ ce(
169793
169794
  ot,
169794
169795
  {
169795
169796
  className: Fn.actionButton,
169796
169797
  kind: "tertiary",
169797
169798
  size: "sm",
169798
169799
  "data-testid": `patient-action-button-${j.translationKey}`,
169799
- disabled: !hB0(
169800
+ disabled: !pB0(
169800
169801
  j.enabledRule,
169801
169802
  G,
169802
169803
  h ?? []
169803
169804
  ),
169804
- onClick: () => uB0(
169805
+ onClick: () => hB0(
169805
169806
  j,
169806
169807
  G,
169807
169808
  t,
@@ -169906,7 +169907,7 @@ const cB0 = [
169906
169907
  headers: L,
169907
169908
  ariaLabel: "patient-search-sortable-data-table",
169908
169909
  loading: a,
169909
- rows: AB0(
169910
+ rows: _B0(
169910
169911
  t,
169911
169912
  w
169912
169913
  ),
@@ -169961,7 +169962,7 @@ const cB0 = [
169961
169962
  return /* @__PURE__ */ ce(yS1.Provider, { value: g, children: t });
169962
169963
  };
169963
169964
  SS1.displayName = "PersonAttributesProvider";
169964
- const TB0 = new ZS1(nO0), yj0 = () => {
169965
+ const $B0 = new ZS1(nO0), Vj0 = () => {
169965
169966
  const [t, e] = fe(!1);
169966
169967
  return ue(() => {
169967
169968
  (async () => {
@@ -169973,9 +169974,9 @@ const TB0 = new ZS1(nO0), yj0 = () => {
169973
169974
  })();
169974
169975
  }, []), t ? /* @__PURE__ */ ce(AM1, { children: /* @__PURE__ */ Qe(jD1, { children: [
169975
169976
  /* @__PURE__ */ ce(QN0, {}),
169976
- /* @__PURE__ */ Qe(IS1, { client: TB0, children: [
169977
+ /* @__PURE__ */ Qe(IS1, { client: $B0, children: [
169977
169978
  /* @__PURE__ */ ce(jO0, { children: /* @__PURE__ */ ce(SS1, { children: /* @__PURE__ */ ce(hR1, { children: /* @__PURE__ */ Qe(kS1, { children: [
169978
- /* @__PURE__ */ ce(W7, { path: "/search", element: /* @__PURE__ */ ce(_B0, {}) }),
169979
+ /* @__PURE__ */ ce(W7, { path: "/search", element: /* @__PURE__ */ ce(TB0, {}) }),
169979
169980
  /* @__PURE__ */ ce(W7, { path: "patient/new", element: /* @__PURE__ */ ce(tg1, {}) }),
169980
169981
  /* @__PURE__ */ ce(
169981
169982
  W7,
@@ -169994,88 +169995,88 @@ export {
169994
169995
  Y2 as A,
169995
169996
  DT0 as B,
169996
169997
  Q2 as C,
169997
- mP0 as D,
169998
+ wP0 as D,
169998
169999
  dM0 as E,
169999
170000
  vR1 as F,
170000
- aj0 as G,
170001
- rj0 as H,
170001
+ cj0 as G,
170002
+ nj0 as H,
170002
170003
  Ki as I,
170003
- cj0 as J,
170004
+ ij0 as J,
170004
170005
  If as K,
170005
- fP0 as L,
170006
+ mP0 as L,
170006
170007
  e4 as M,
170007
170008
  i$0 as N,
170008
- pP0 as O,
170009
- lj0 as P,
170009
+ fP0 as O,
170010
+ sj0 as P,
170010
170011
  S0 as Q,
170011
- wP0 as R,
170012
- gP0 as S,
170012
+ gP0 as R,
170013
+ vP0 as S,
170013
170014
  rn as T,
170014
170015
  dM as U,
170015
- ij0 as V,
170016
+ lj0 as V,
170016
170017
  o$0 as W,
170017
- QP0 as X,
170018
+ XP0 as X,
170018
170019
  ii as Y,
170019
170020
  Yi as Z,
170020
- gj0 as _,
170021
- ZP0 as a,
170022
- vj0 as a0,
170023
- KP0 as a1,
170021
+ vj0 as _,
170022
+ IP0 as a,
170023
+ Ej0 as a0,
170024
+ YP0 as a1,
170024
170025
  Zf as a2,
170025
- hj0 as a3,
170026
+ pj0 as a3,
170026
170027
  h$0 as a4,
170027
- XP0 as a5,
170028
- WP0 as a6,
170029
- uj0 as a7,
170030
- fj0 as a8,
170031
- pj0 as a9,
170032
- mj0 as aa,
170033
- wj0 as ab,
170034
- ej0 as ac,
170035
- Ej0 as ad,
170028
+ ej0 as a5,
170029
+ KP0 as a6,
170030
+ hj0 as a7,
170031
+ mj0 as a8,
170032
+ fj0 as a9,
170033
+ wj0 as aa,
170034
+ gj0 as ab,
170035
+ tj0 as ac,
170036
+ Mj0 as ad,
170036
170037
  R0 as ae,
170037
170038
  mR1 as af,
170038
- GP0 as ag,
170039
+ JP0 as ag,
170039
170040
  u$0 as ah,
170040
170041
  bR1 as ai,
170041
170042
  X3 as aj,
170042
170043
  K$0 as ak,
170043
- tj0 as al,
170044
+ rj0 as al,
170044
170045
  w6 as am,
170045
170046
  l$0 as an,
170046
- dj0 as ao,
170047
- oj0 as ap,
170048
- nj0 as aq,
170047
+ uj0 as ao,
170048
+ aj0 as ap,
170049
+ oj0 as aq,
170049
170050
  g6 as ar,
170050
170051
  UT0 as as,
170051
- sj0 as at,
170052
+ dj0 as at,
170052
170053
  TT0 as au,
170053
- yj0 as av,
170054
+ Vj0 as av,
170054
170055
  MS1 as aw,
170055
170056
  dI0 as ax,
170056
- IP0 as b,
170057
+ BP0 as b,
170057
170058
  ai as c,
170058
- OP0 as d,
170059
- RP0 as e,
170059
+ DP0 as d,
170060
+ SP0 as e,
170060
170061
  z3 as f,
170061
- DP0 as g,
170062
- qP0 as h,
170063
- BP0 as i,
170064
- jP0 as j,
170065
- FP0 as k,
170062
+ RP0 as g,
170063
+ UP0 as h,
170064
+ PP0 as i,
170065
+ FP0 as j,
170066
+ qP0 as k,
170066
170067
  Tr as l,
170067
- Mj0 as m,
170068
- kP0 as n,
170068
+ yj0 as m,
170069
+ ZP0 as n,
170069
170070
  k7 as o,
170070
- UP0 as p,
170071
+ WP0 as p,
170071
170072
  x0 as q,
170072
- SP0 as r,
170073
- PP0 as s,
170073
+ kP0 as r,
170074
+ jP0 as s,
170074
170075
  EA0 as t,
170075
170076
  W1 as u,
170076
170077
  xR1 as v,
170077
170078
  J$1 as w,
170078
170079
  it as x,
170079
170080
  zf as y,
170080
- JP0 as z
170081
+ QP0 as z
170081
170082
  };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ax as s, av as E, aw as i } from "./index-C3dYT9FK.js";
1
+ import { ax as s, av as E, aw as i } from "./index-Gjf6R2kN.js";
2
2
  export {
3
3
  s as IDENTIFIER_TYPES_QUERY_KEY,
4
4
  E as RegistrationApp,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/registration-app",
3
- "version": "0.0.1-dev.204",
3
+ "version": "0.0.1-dev.205",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",