@bahmni/services 0.0.1-dev.64 → 0.0.1-dev.66

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,3 +1,4 @@
1
1
  export { default as initAppI18n } from './i18n';
2
2
  export { useTranslation } from 'react-i18next';
3
+ export { normalizeTranslationKey } from './translationService';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -22,4 +22,5 @@ export declare const getTranslationFile: (url: string) => Promise<Record<string,
22
22
  * @throws Will not throw errors, but will return empty translations on failure
23
23
  */
24
24
  export declare const getTranslations: (lang: string, namespace: string) => Promise<Record<string, Record<string, Record<string, string>>>>;
25
+ export declare const normalizeTranslationKey: (module: string, fieldName: string) => string;
25
26
  //# sourceMappingURL=translationService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"translationService.d.ts","sourceRoot":"","sources":["../../src/i18n/translationService.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAO,MAIzC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,KAAK,MAAM,KACV,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAchC,CAAC;AAiCF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,MAAM,EACZ,WAAW,MAAM,KAChB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAmBhE,CAAC"}
1
+ {"version":3,"file":"translationService.d.ts","sourceRoot":"","sources":["../../src/i18n/translationService.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAO,MAIzC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,KAAK,MAAM,KACV,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAchC,CAAC;AAiCF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,MAAM,EACZ,WAAW,MAAM,KAChB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAmBhE,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,QAAQ,MAAM,EACd,WAAW,MAAM,KAChB,MAOF,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { get, post, put, del } from './api';
2
- export { initAppI18n, useTranslation } from './i18n';
2
+ export { initAppI18n, useTranslation, normalizeTranslationKey } from './i18n';
3
3
  export { useCamera } from './cameraService';
4
4
  export { getPatientById, getFormattedPatientById, searchPatientByNameOrId, searchPatientByCustomAttribute, getIdentifierTypes, getPrimaryIdentifierType, createPatient, updatePatient, createVisit, getActiveVisitByPatient, getIdentifierData, getGenders, getAddressHierarchyEntries, getVisitTypes, getVisitLocationUUID, getOrderedAddressHierarchyLevels, getPatientImageAsDataUrl, getPatientProfile, getPersonAttributeTypes, getRelationshipTypes, type FormattedPatientData, type PatientSearchResult, type PatientSearchResultBundle, type IdentifierSource, type IdentifierType, type IdentifierTypesResponse, type CreatePatientRequest, type CreatePatientResponse, type VisitData, type PatientName, type PatientAddress, type PatientIdentifier, type PatientAttribute, type AddressHierarchyEntry, type OrderedAddressHierarchyLevel, type OrderedAddressHierarchyLevels, type PatientProfileResponse, type PersonAttributeType, type PersonAttributeTypesResponse, type ConceptAnswer, type PersonAttributeConcept, AttributeFormat, AttributeInputType, getInputTypeForFormat, isBooleanFormat, isConceptFormat, isNumberFormat, isDateFormat, isTextFormat, MAX_PATIENT_AGE_YEARS, MAX_NAME_LENGTH, MAX_PHONE_NUMBER_LENGTH, } from './patientService';
5
5
  export { searchAppointmentsByAttribute, updateAppointmentStatus, getAppointmentById, } from './AppointmentService/appointmmetService';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,WAAW,EACX,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,0BAA0B,EAC1B,aAAa,EACb,oBAAoB,EACpB,gCAAgC,EAChC,wBAAwB,EACxB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,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AC"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { initReactI18next as uo } from "react-i18next";
2
- import { useTranslation as Zb } from "react-i18next";
2
+ import { useTranslation as ew } from "react-i18next";
3
3
  import { useRef as Un, useCallback as Yr, useEffect as lo } from "react";
4
4
  function Zs(e, t) {
5
5
  return function() {
@@ -3672,7 +3672,10 @@ const Du = process.env.PUBLIC_URL ?? "/", De = "/openmrs/ws/fhir2/R4", ie = "/op
3672
3672
  }, e !== "en" && (r.en = {
3673
3673
  [t]: await _a(t, "en")
3674
3674
  }), r;
3675
- }, Ry = async (e) => {
3675
+ }, Ry = (e, t) => {
3676
+ const r = e.toUpperCase(), n = t.toUpperCase().replace(/\s+/g, "_").replace(/[^A-Z0-9_]/g, "");
3677
+ return `${r}_${n}`;
3678
+ }, Py = async (e) => {
3676
3679
  const t = qr(), r = await Uu(t, e);
3677
3680
  return await se.use(Ai).use(uo).init({
3678
3681
  fallbackLng: "en",
@@ -3691,7 +3694,7 @@ const Du = process.env.PUBLIC_URL ?? "/", De = "/openmrs/ws/fhir2/R4", ie = "/op
3691
3694
  }
3692
3695
  }), se;
3693
3696
  };
3694
- function Py() {
3697
+ function Ty() {
3695
3698
  const e = Un(null), t = Un(null), r = Yr(async () => {
3696
3699
  t.current && (t.current.getTracks().forEach((i) => i.stop()), t.current = null);
3697
3700
  const s = await navigator.mediaDevices.getUserMedia({
@@ -6426,7 +6429,7 @@ const Na = {
6426
6429
  weekStartsOn: 1,
6427
6430
  firstWeekContainsDate: 4
6428
6431
  }
6429
- }, Xf = "dd/MM/yyyy", Ty = "MMMM dd, yyyy", Oy = "do MMM, yyyy", Qf = "dd/MM/yyyy HH:mm", Ay = "yyyy-MM-dd", Ny = "d/m/Y", Pe = {
6432
+ }, Xf = "dd/MM/yyyy", Oy = "MMMM dd, yyyy", Ay = "do MMM, yyyy", Qf = "dd/MM/yyyy HH:mm", Ny = "yyyy-MM-dd", Dy = "d/m/Y", Pe = {
6430
6433
  PARSE_ERROR: "DATE_ERROR_PARSE",
6431
6434
  FORMAT_ERROR: "DATE_ERROR_FORMAT",
6432
6435
  EMPTY_OR_INVALID: "DATE_ERROR_EMPTY_OR_INVALID",
@@ -6506,13 +6509,13 @@ function Ji(e, t, r) {
6506
6509
  const a = Zf();
6507
6510
  return { formattedResult: Gl(n, t, { locale: a }) };
6508
6511
  }
6509
- function Dy(e, t) {
6512
+ function Cy(e, t) {
6510
6513
  return Ji(e, Qf, t);
6511
6514
  }
6512
6515
  function th(e, t, r = Xf) {
6513
6516
  return Ji(e, r, t);
6514
6517
  }
6515
- function Cy(e, t, r) {
6518
+ function Iy(e, t, r) {
6516
6519
  if (!e || !Nt(e) || t === null || t === void 0 || !r || typeof t != "number")
6517
6520
  return;
6518
6521
  const n = new Date(e);
@@ -6527,7 +6530,7 @@ function Cy(e, t, r) {
6527
6530
  return;
6528
6531
  }
6529
6532
  }
6530
- function Iy(e, t) {
6533
+ function ky(e, t) {
6531
6534
  if (e == null)
6532
6535
  return {
6533
6536
  formattedResult: "",
@@ -6579,11 +6582,11 @@ function Iy(e, t) {
6579
6582
  }
6580
6583
  return { formattedResult: c };
6581
6584
  }
6582
- const ky = () => {
6585
+ const Ly = () => {
6583
6586
  const e = /* @__PURE__ */ new Date();
6584
6587
  return e.setHours(0, 0, 0, 0), e;
6585
6588
  };
6586
- function Ly(e, t) {
6589
+ function My(e, t) {
6587
6590
  var l, d, p;
6588
6591
  const r = new Date(e), a = new Intl.DateTimeFormat("en-US", {
6589
6592
  day: "2-digit",
@@ -6600,11 +6603,11 @@ function Ly(e, t) {
6600
6603
  }
6601
6604
  return c;
6602
6605
  }
6603
- function My(e) {
6606
+ function xy(e) {
6604
6607
  const t = new Date(e), r = /* @__PURE__ */ new Date(), n = In(r, t), a = Cn(r, t) - n * 12;
6605
6608
  return `${n} years ${a} months`;
6606
6609
  }
6607
- function xy(e, t, r = !1) {
6610
+ function qy(e, t, r = !1) {
6608
6611
  return !e || !Array.isArray(e) ? [] : e.sort((n, a) => {
6609
6612
  const s = new Date(n[t]), i = new Date(a[t]);
6610
6613
  if (isNaN(s.getTime()) && isNaN(i.getTime())) return 0;
@@ -6614,18 +6617,18 @@ function xy(e, t, r = !1) {
6614
6617
  return r ? o : -o;
6615
6618
  });
6616
6619
  }
6617
- const qy = (e, t) => {
6620
+ const jy = (e, t) => {
6618
6621
  const r = /* @__PURE__ */ new Date(), n = new Date(r.getFullYear(), r.getMonth(), r.getDate()), a = new Date(e);
6619
6622
  return {
6620
6623
  today: () => Gu(a, n),
6621
6624
  past: () => Jl(a, n),
6622
6625
  future: () => Yl(a, n)
6623
6626
  }[t]();
6624
- }, jy = async (e, t, r) => {
6627
+ }, Uy = async (e, t, r) => {
6625
6628
  const { exact: n = !0, refetchActiveNow: a = !0 } = r ?? {};
6626
6629
  await e.cancelQueries({ queryKey: t, exact: n }), await e.removeQueries({ queryKey: t, exact: n }), await e.invalidateQueries({ queryKey: t, exact: n }), a && await e.refetchQueries({ queryKey: t, exact: n, type: "active" });
6627
6630
  }, rh = () => Math.random().toString(36).substring(2, 9);
6628
- function Uy(e, t = " -") {
6631
+ function Fy(e, t = " -") {
6629
6632
  return e ? e.toLowerCase().split(new RegExp(`[${t}]+`)).map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ") : "";
6630
6633
  }
6631
6634
  function Xi(e) {
@@ -6637,7 +6640,7 @@ function Xi(e) {
6637
6640
  }
6638
6641
  return "";
6639
6642
  }
6640
- const Fy = (e) => !e || e.trim().length === 0, Vy = (e, t) => {
6643
+ const Vy = (e) => !e || e.trim().length === 0, Hy = (e, t) => {
6641
6644
  if (!e || !t || t.length === 0)
6642
6645
  return 999;
6643
6646
  const r = t.findIndex(
@@ -6645,7 +6648,7 @@ const Fy = (e) => !e || e.trim().length === 0, Vy = (e, t) => {
6645
6648
  );
6646
6649
  return r === -1 ? 999 : r;
6647
6650
  };
6648
- function Hy(e, t) {
6651
+ function By(e, t) {
6649
6652
  if (!e || e.length === 0)
6650
6653
  return [];
6651
6654
  const r = /* @__PURE__ */ new Map();
@@ -6657,7 +6660,7 @@ function Hy(e, t) {
6657
6660
  items: a
6658
6661
  }));
6659
6662
  }
6660
- function By(e, t, r) {
6663
+ function zy(e, t, r) {
6661
6664
  if (!e || e.length === 0)
6662
6665
  return [];
6663
6666
  const n = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
@@ -6678,7 +6681,7 @@ function nh(e) {
6678
6681
  s[n(i[1])] = n(i[2]);
6679
6682
  return s;
6680
6683
  }
6681
- function zy(e, t, r) {
6684
+ function Wy(e, t, r) {
6682
6685
  const n = /{{([^}]*)}}/g, a = e.match(n);
6683
6686
  let s = e;
6684
6687
  const i = r ?? !1, o = i ? nh() : {};
@@ -6692,7 +6695,7 @@ const ah = (e) => new Promise((t, r) => {
6692
6695
  const n = new FileReader();
6693
6696
  n.onloadend = () => t(n.result), n.onerror = r, n.readAsDataURL(e);
6694
6697
  }), sh = (e) => ie + `/user?username=${e}&v=custom:(username,uuid)`, ih = "bahmni.user.location";
6695
- async function Wy() {
6698
+ async function Gy() {
6696
6699
  const e = Xi(Iu);
6697
6700
  if (!e)
6698
6701
  return null;
@@ -6750,7 +6753,7 @@ const Qi = () => {
6750
6753
  }, Zi = ie + "/idgen/identifiertype", lh = (e) => ie + `/bahmni/app/setting?module=${e}`, dh = "bahmni.primaryIdentifierType", fh = ie + "/bahmnicore/patientprofile", hh = (e) => ie + `/bahmnicore/patientprofile/${e}`, mh = (e) => ie + `/patientprofile/${e}?v=full`, ph = ie + "/visit", gh = (e) => ie + `/visit?includeInactive=false&patient=${e}&v=custom:(uuid,visitType,location:(uuid))`, yh = (e) => Mu + `${e}`, bh = (e, t, r = 20, n) => {
6751
6754
  let a = `/openmrs/module/addresshierarchy/ajax/getPossibleAddressHierarchyEntriesWithParents.form?addressField=${e}&limit=${r}&searchString=${encodeURIComponent(t)}`;
6752
6755
  return n && (a += `&parent=${n}`), a;
6753
- }, wh = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", vh = ie + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)", Eh = 20, _h = 2, Gy = 120, Ky = 50, Yy = 15, Sh = /^[a-f0-9-]{36}$/i, $h = () => ie + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", Rh = (e) => Cu + `/patientImage?patientUuid=${e}`, Ph = ie + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", Th = async (e) => {
6756
+ }, wh = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", vh = ie + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)", Eh = 20, _h = 2, Ky = 120, Yy = 50, Jy = 15, Sh = /^[a-f0-9-]{36}$/i, $h = () => ie + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", Rh = (e) => Cu + `/patientImage?patientUuid=${e}`, Ph = ie + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", Th = async (e) => {
6754
6757
  if (!e || e.trim() === "")
6755
6758
  throw new Error("Invalid patient UUID: UUID cannot be empty");
6756
6759
  if (!Sh.test(e))
@@ -6788,20 +6791,20 @@ const Qi = () => {
6788
6791
  identifiers: a,
6789
6792
  age: s
6790
6793
  };
6791
- }, Jy = async (e) => {
6794
+ }, Xy = async (e) => {
6792
6795
  const t = await Th(e);
6793
6796
  return Ch(t);
6794
- }, Xy = async (e) => {
6797
+ }, Qy = async (e) => {
6795
6798
  const t = await fetch(Rh(e));
6796
6799
  if (!t.ok) return null;
6797
6800
  const r = await t.blob();
6798
6801
  return await ah(r);
6799
- }, Qy = async (e) => {
6802
+ }, Zy = async (e) => {
6800
6803
  const t = Qi();
6801
6804
  return await Q(
6802
6805
  ch(e, t.uuid)
6803
6806
  );
6804
- }, Zy = async (e, t, r, n, a) => {
6807
+ }, eb = async (e, t, r, n, a) => {
6805
6808
  const s = Qi();
6806
6809
  return await Q(
6807
6810
  uh(
@@ -6812,12 +6815,12 @@ const Qi = () => {
6812
6815
  s.uuid
6813
6816
  )
6814
6817
  );
6815
- }, eb = async () => Q(Zi), Ih = async () => {
6818
+ }, tb = async () => Q(Zi), Ih = async () => {
6816
6819
  const t = (await Q(lh("core"))).find(
6817
6820
  (r) => r.property === dh
6818
6821
  );
6819
6822
  return (t == null ? void 0 : t.value) ?? null;
6820
- }, tb = async () => {
6823
+ }, rb = async () => {
6821
6824
  const [e, t] = await Promise.all([
6822
6825
  Q(Zi),
6823
6826
  Ih()
@@ -6834,10 +6837,10 @@ const Qi = () => {
6834
6837
  sourcesByPrefix: n,
6835
6838
  primaryIdentifierTypeUuid: t
6836
6839
  }) : { prefixes: r, sourcesByPrefix: n, primaryIdentifierTypeUuid: t };
6837
- }, rb = async (e) => mt(fh, e), nb = async (e, t) => mt(
6840
+ }, nb = async (e) => mt(fh, e), ab = async (e, t) => mt(
6838
6841
  hh(e),
6839
6842
  t
6840
- ), ab = async () => Q(Di("mrs.genders")), sb = async (e, t, r = Eh, n) => {
6843
+ ), sb = async () => Q(Di("mrs.genders")), ib = async (e, t, r = Eh, n) => {
6841
6844
  if (!t || t.length < _h)
6842
6845
  return [];
6843
6846
  try {
@@ -6849,7 +6852,7 @@ const Qi = () => {
6849
6852
  `Failed to fetch address hierarchy for field "${e}": ${a instanceof Error ? a.message : "Unknown error"}`
6850
6853
  );
6851
6854
  }
6852
- }, ib = async () => Q($h()), ob = async (e) => mt(ph, e), cb = async (e) => Q(gh(e)), ub = async (e) => Q(yh(e)), lb = async () => Q(wh), db = async (e) => Q(mh(e)), fb = async () => {
6855
+ }, ob = async () => Q($h()), cb = async (e) => mt(ph, e), ub = async (e) => Q(gh(e)), lb = async (e) => Q(yh(e)), db = async () => Q(wh), fb = async (e) => Q(mh(e)), hb = async () => {
6853
6856
  try {
6854
6857
  return (await Q(
6855
6858
  vh
@@ -6863,16 +6866,16 @@ const Qi = () => {
6863
6866
  `Failed to fetch relationship types: ${e instanceof Error ? e.message : "Unknown error"}`
6864
6867
  );
6865
6868
  }
6866
- }, hb = async () => Q(Ph);
6869
+ }, mb = async () => Q(Ph);
6867
6870
  var kh = /* @__PURE__ */ ((e) => (e.BOOLEAN = "java.lang.Boolean", e.BOOLEAN_DATATYPE = "org.openmrs.customdatatype.datatype.BooleanDatatype", e.CONCEPT = "org.openmrs.Concept", e.CODED_CONCEPT = "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype", e.CONCEPT_DATATYPE = "org.openmrs.customdatatype.datatype.ConceptDatatype", e.STRING = "java.lang.String", e.FREE_TEXT = "org.openmrs.customdatatype.datatype.FreeTextDatatype", e.REGEX_VALIDATED_TEXT = "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", e.INTEGER = "java.lang.Integer", e.FLOAT = "java.lang.Float", e.ATTRIBUTABLE_DATE = "org.openmrs.util.AttributableDate", e.DATE_DATATYPE = "org.openmrs.customdatatype.datatype.DateDatatype", e))(kh || {}), Lh = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.DROPDOWN = "dropdown", e.TEXT = "text", e.NUMBER = "number", e.DATE = "date", e))(Lh || {});
6868
- const mb = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype" ? "checkbox" : e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype" ? "dropdown" : e === "java.lang.Integer" || e === "java.lang.Float" ? "number" : e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype" ? "date" : "text", pb = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype", gb = (e) => e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype", yb = (e) => e === "java.lang.Integer" || e === "java.lang.Float", bb = (e) => e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype", wb = (e) => e === "java.lang.String" || e === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || e === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", Mh = ie + "/appointments/search", eo = ie + "/appointments", vb = async (e) => await mt(
6871
+ const pb = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype" ? "checkbox" : e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype" ? "dropdown" : e === "java.lang.Integer" || e === "java.lang.Float" ? "number" : e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype" ? "date" : "text", gb = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype", yb = (e) => e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype", bb = (e) => e === "java.lang.Integer" || e === "java.lang.Float", wb = (e) => e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype", vb = (e) => e === "java.lang.String" || e === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || e === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", Mh = ie + "/appointments/search", eo = ie + "/appointments", Eb = async (e) => await mt(
6869
6872
  Mh,
6870
6873
  e
6871
- ), Eb = async (e, t, r) => await mt(
6874
+ ), _b = async (e, t, r) => await mt(
6872
6875
  `${eo}/${e}/status-change`,
6873
6876
  { toStatus: t, onDate: r }
6874
6877
  );
6875
- async function _b(e) {
6878
+ async function Sb(e) {
6876
6879
  return await Q(`${eo}/${e}`);
6877
6880
  }
6878
6881
  const xh = () => {
@@ -6904,7 +6907,7 @@ const xh = () => {
6904
6907
  );
6905
6908
  }
6906
6909
  };
6907
- }, an = xh(), qh = (e) => De + `/ValueSet/${e}/$expand`, jh = (e) => De + `/ValueSet/$expand?filter=${encodeURIComponent(e)}`, Uh = (e, t, r) => ie + `/bahmni/terminologies/concepts?limit=${t}&locale=${r}&term=${e}`, Fh = (e) => ie + `/concept/${e}`, Sb = async (e, t = 20) => {
6910
+ }, an = xh(), qh = (e) => De + `/ValueSet/${e}/$expand`, jh = (e) => De + `/ValueSet/$expand?filter=${encodeURIComponent(e)}`, Uh = (e, t, r) => ie + `/bahmni/terminologies/concepts?limit=${t}&locale=${r}&term=${e}`, Fh = (e) => ie + `/concept/${e}`, $b = async (e, t = 20) => {
6908
6911
  const r = qr(), n = Uh(e, t, r);
6909
6912
  return Q(n);
6910
6913
  }, Er = async (e) => {
@@ -6914,7 +6917,7 @@ const xh = () => {
6914
6917
  const t = `${jh(e)}`;
6915
6918
  return Q(t);
6916
6919
  };
6917
- async function $b(e) {
6920
+ async function Rb(e) {
6918
6921
  return await Q(Fh(e));
6919
6922
  }
6920
6923
  const Hh = (e) => De + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_lastUpdated`, nt = {
@@ -6940,7 +6943,7 @@ const Hh = (e) => De + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
6940
6943
  var a;
6941
6944
  const r = ((a = e.expansion) == null ? void 0 : a.contains) ?? [];
6942
6945
  return zh(r).map((s) => Wh(s, t));
6943
- }, Rb = async (e, t, r) => {
6946
+ }, Pb = async (e, t, r) => {
6944
6947
  const n = e ?? nt.MEDICATION.code, a = t ?? nt.FOOD.code, s = r ?? nt.ENVIRONMENT.code, [i, o, c] = await Promise.all([
6945
6948
  Er(n),
6946
6949
  Er(a),
@@ -6960,7 +6963,7 @@ const Hh = (e) => De + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
6960
6963
  nt.ENVIRONMENT.display
6961
6964
  )
6962
6965
  ];
6963
- }, Pb = async (e) => {
6966
+ }, Tb = async (e) => {
6964
6967
  var n, a;
6965
6968
  const t = e ?? Bh.code;
6966
6969
  return ((a = (n = (await Er(t)).compose) == null ? void 0 : n.include[0]) == null ? void 0 : a.concept) ?? [];
@@ -6997,16 +7000,16 @@ function Yh(e) {
6997
7000
  };
6998
7001
  });
6999
7002
  }
7000
- async function Tb(e) {
7003
+ async function Ob(e) {
7001
7004
  const t = await Kh(e);
7002
7005
  return Yh(t);
7003
7006
  }
7004
7007
  var Jh = /* @__PURE__ */ ((e) => (e.Active = "Active", e.Inactive = "Inactive", e))(Jh || {}), Xh = /* @__PURE__ */ ((e) => (e.mild = "mild", e.moderate = "moderate", e.severe = "severe", e))(Xh || {});
7005
- const Ob = "http://fhir.openmrs.org/code-system/encounter-type", Qh = "problem-list-item", Ab = "http://terminology.hl7.org/CodeSystem/condition-ver-status", Zh = "encounter-diagnosis", Nb = "http://terminology.hl7.org/CodeSystem/condition-clinical", Db = "http://terminology.hl7.org/CodeSystem/condition-category", em = (e) => De + `/Condition?category=${Qh}&patient=${e}&_count=100&_sort=-_lastUpdated`;
7008
+ const Ab = "http://fhir.openmrs.org/code-system/encounter-type", Qh = "problem-list-item", Nb = "http://terminology.hl7.org/CodeSystem/condition-ver-status", Zh = "encounter-diagnosis", Db = "http://terminology.hl7.org/CodeSystem/condition-clinical", Cb = "http://terminology.hl7.org/CodeSystem/condition-category", em = (e) => De + `/Condition?category=${Qh}&patient=${e}&_count=100&_sort=-_lastUpdated`;
7006
7009
  async function tm(e) {
7007
7010
  return await Q(`${em(e)}`);
7008
7011
  }
7009
- async function Cb(e) {
7012
+ async function Ib(e) {
7010
7013
  var n;
7011
7014
  return ((n = (await tm(e)).entry) == null ? void 0 : n.filter((a) => {
7012
7015
  var s;
@@ -7059,7 +7062,7 @@ function cm(e) {
7059
7062
  };
7060
7063
  });
7061
7064
  }
7062
- async function Ib(e) {
7065
+ async function kb(e) {
7063
7066
  const t = await sm(e);
7064
7067
  return cm(t);
7065
7068
  }
@@ -7169,7 +7172,7 @@ const Ma = (e) => {
7169
7172
  var t, r, n, a;
7170
7173
  return e.priority === "stat" || ((a = (n = (r = (t = e.dosageInstruction) == null ? void 0 : t[0]) == null ? void 0 : r.timing) == null ? void 0 : n.code) == null ? void 0 : a.text) === "Immediately" || !1;
7171
7174
  };
7172
- async function kb(e) {
7175
+ async function Lb(e) {
7173
7176
  const t = await dm(e);
7174
7177
  return wm(t);
7175
7178
  }
@@ -7193,7 +7196,7 @@ function Sm(e) {
7193
7196
  };
7194
7197
  });
7195
7198
  }
7196
- async function Lb(e) {
7199
+ async function Mb(e) {
7197
7200
  const t = await _m(e);
7198
7201
  return Sm(t);
7199
7202
  }
@@ -7264,7 +7267,7 @@ function Dm(e, t) {
7264
7267
  };
7265
7268
  });
7266
7269
  }
7267
- function Mb(e) {
7270
+ function xb(e) {
7268
7271
  const t = /* @__PURE__ */ new Map();
7269
7272
  return e.forEach((r) => {
7270
7273
  var a;
@@ -7278,7 +7281,7 @@ function Mb(e) {
7278
7281
  (r, n) => new Date(n.rawDate).getTime() - new Date(r.rawDate).getTime()
7279
7282
  );
7280
7283
  }
7281
- async function xb(e, t) {
7284
+ async function qb(e, t) {
7282
7285
  var a;
7283
7286
  const n = ((a = (await Am(e)).entry) == null ? void 0 : a.map((s) => s.resource).filter((s) => s !== void 0)) ?? [];
7284
7287
  return Dm(n, t);
@@ -7319,7 +7322,7 @@ const Cm = "All Orderables", Im = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,
7319
7322
  });
7320
7323
  });
7321
7324
  }), r;
7322
- }, qb = async () => {
7325
+ }, jb = async () => {
7323
7326
  const e = await Mm(), t = await xm();
7324
7327
  return Um(e, jm(t));
7325
7328
  };
@@ -11752,7 +11755,7 @@ const Jp = /* @__PURE__ */ Fm(Yp), xn = "/bahmni_config/openmrs/apps/clinical/v2
11752
11755
  type: Tg,
11753
11756
  additionalProperties: Og,
11754
11757
  properties: Ag
11755
- }, jb = async () => zr(Qp, ug), Ub = async (e) => {
11758
+ }, Ub = async () => zr(Qp, ug), Fb = async (e) => {
11756
11759
  const t = await zr(
11757
11760
  tg(e),
11758
11761
  yg
@@ -11761,10 +11764,10 @@ const Jp = /* @__PURE__ */ Fm(Yp), xn = "/bahmni_config/openmrs/apps/clinical/v2
11761
11764
  ...r,
11762
11765
  id: rh()
11763
11766
  })), t;
11764
- }, Fb = async () => zr(
11767
+ }, Vb = async () => zr(
11765
11768
  eg,
11766
11769
  Sg
11767
- ), Vb = async () => zr(
11770
+ ), Hb = async () => zr(
11768
11771
  Zp,
11769
11772
  Ng
11770
11773
  ), zr = async (e, t) => {
@@ -11789,7 +11792,7 @@ const Jp = /* @__PURE__ */ Fm(Yp), xn = "/bahmni_config/openmrs/apps/clinical/v2
11789
11792
  throw new Error(r);
11790
11793
  }
11791
11794
  }, Cg = async (e, t) => new Jp().compile(t)(e), Ig = (e) => ie + `/provider?user=${e}&v=custom:(uuid,display,person)`;
11792
- async function Hb(e) {
11795
+ async function Bb(e) {
11793
11796
  const t = await Q(
11794
11797
  Ig(e)
11795
11798
  );
@@ -11842,7 +11845,7 @@ async function Hg(e, t) {
11842
11845
  return null;
11843
11846
  }
11844
11847
  }
11845
- async function Bb(e, t, r) {
11848
+ async function zb(e, t, r) {
11846
11849
  try {
11847
11850
  if (!e) return null;
11848
11851
  const n = r ?? await Vg(), s = `ge${new Date(Date.now() - n * 60 * 1e3).toISOString()}`, i = {
@@ -11858,7 +11861,7 @@ async function Bb(e, t, r) {
11858
11861
  return null;
11859
11862
  }
11860
11863
  }
11861
- const zb = (e) => {
11864
+ const Wb = (e) => {
11862
11865
  const t = new CustomEvent("bahmni-audit-log", { detail: e });
11863
11866
  window.dispatchEvent(t);
11864
11867
  }, Bg = (e) => {
@@ -11930,21 +11933,21 @@ const zb = (e) => {
11930
11933
  module: n
11931
11934
  };
11932
11935
  return await mt(Wg, i), { logged: !0 };
11933
- }, Wb = () => Bg(async (t) => {
11936
+ }, Gb = () => Bg(async (t) => {
11934
11937
  await Jg(
11935
11938
  t.patientUuid,
11936
11939
  t.eventType,
11937
11940
  t.messageParams,
11938
11941
  t.module
11939
11942
  );
11940
- }), Gb = async () => {
11943
+ }), Kb = async () => {
11941
11944
  try {
11942
11945
  return await Q(ku);
11943
11946
  } catch (e) {
11944
11947
  const { message: t } = ut(e);
11945
11948
  throw new Error(t);
11946
11949
  }
11947
- }, Kb = (e, t) => !e || e.length === 0 ? !1 : e.some((r) => r.name === t), Xg = async () => {
11950
+ }, Yb = (e, t) => !e || e.length === 0 ? !1 : e.some((r) => r.name === t), Xg = async () => {
11948
11951
  const e = await fetch(Lu);
11949
11952
  if (!e.ok)
11950
11953
  throw new Error(
@@ -11973,12 +11976,12 @@ const zb = (e) => {
11973
11976
  editable: n.editable
11974
11977
  }))
11975
11978
  };
11976
- }, Yb = async () => {
11979
+ }, Jb = async () => {
11977
11980
  const e = await Xg(), t = qr();
11978
11981
  return e.map(
11979
11982
  (r) => Zg(r, t)
11980
11983
  );
11981
- }, ey = ie + "/bahmnicore/diseaseSummaryData?", Jb = async (e, t, r, n) => {
11984
+ }, ey = ie + "/bahmnicore/diseaseSummaryData?", Xb = async (e, t, r, n) => {
11982
11985
  const a = new URLSearchParams({
11983
11986
  groupBy: n,
11984
11987
  latestCount: t.toString(),
@@ -11998,115 +12001,116 @@ export {
11998
12001
  Lh as AttributeInputType,
11999
12002
  Sy as BAHMNI_HOME_PATH,
12000
12003
  Xf as DATE_FORMAT,
12001
- Ny as DATE_PICKER_INPUT_FORMAT,
12004
+ Dy as DATE_PICKER_INPUT_FORMAT,
12002
12005
  Qf as DATE_TIME_FORMAT,
12003
- Ob as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
12004
- Ty as FULL_MONTH_DATE_FORMAT,
12005
- Db as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
12006
+ Ab as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
12007
+ Oy as FULL_MONTH_DATE_FORMAT,
12008
+ Cb as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
12006
12009
  Qh as HL7_CONDITION_CATEGORY_CONDITION_CODE,
12007
12010
  Zh as HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE,
12008
- Nb as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
12009
- Ab as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
12010
- Ay as ISO_DATE_FORMAT,
12011
+ Db as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
12012
+ Nb as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
12013
+ Ny as ISO_DATE_FORMAT,
12011
12014
  _r as LabTestPriority,
12012
- Ky as MAX_NAME_LENGTH,
12013
- Gy as MAX_PATIENT_AGE_YEARS,
12014
- Yy as MAX_PHONE_NUMBER_LENGTH,
12015
+ Yy as MAX_NAME_LENGTH,
12016
+ Ky as MAX_PATIENT_AGE_YEARS,
12017
+ Jy as MAX_PHONE_NUMBER_LENGTH,
12015
12018
  qe as MedicationStatus,
12016
12019
  De as OPENMRS_FHIR_R4,
12017
12020
  ie as OPENMRS_REST_V1,
12018
- Oy as REGISTRATION_DATE_FORMAT,
12021
+ Ay as REGISTRATION_DATE_FORMAT,
12019
12022
  $y as USER_PINNED_PREFERENCE_URL,
12020
12023
  eh as calculateAge,
12021
- My as calculateAgeinYearsAndMonths,
12022
- Cy as calculateOnsetDate,
12023
- Uy as capitalize,
12024
- rb as createPatient,
12025
- ob as createVisit,
12026
- qy as dateComparator,
12024
+ xy as calculateAgeinYearsAndMonths,
12025
+ Iy as calculateOnsetDate,
12026
+ Fy as capitalize,
12027
+ nb as createPatient,
12028
+ cb as createVisit,
12029
+ jy as dateComparator,
12027
12030
  _y as del,
12028
- zb as dispatchAuditEvent,
12029
- Rb as fetchAndFormatAllergenConcepts,
12030
- Yb as fetchObservationForms,
12031
- Pb as fetchReactionConcepts,
12032
- By as filterReplacementEntries,
12033
- Bb as findActiveEncounterInSession,
12031
+ Wb as dispatchAuditEvent,
12032
+ Pb as fetchAndFormatAllergenConcepts,
12033
+ Jb as fetchObservationForms,
12034
+ Tb as fetchReactionConcepts,
12035
+ zy as filterReplacementEntries,
12036
+ zb as findActiveEncounterInSession,
12034
12037
  th as formatDate,
12035
- Ly as formatDateAndTime,
12036
- Iy as formatDateDistance,
12037
- Dy as formatDateTime,
12038
- zy as formatUrl,
12038
+ My as formatDateAndTime,
12039
+ ky as formatDateDistance,
12040
+ Cy as formatDateTime,
12041
+ Wy as formatUrl,
12039
12042
  rh as generateId,
12040
12043
  Q as get,
12041
12044
  xg as getActiveVisit,
12042
- cb as getActiveVisitByPatient,
12043
- sb as getAddressHierarchyEntries,
12045
+ ub as getActiveVisitByPatient,
12046
+ ib as getAddressHierarchyEntries,
12044
12047
  Kh as getAllergies,
12045
- _b as getAppointmentById,
12046
- jb as getClinicalConfig,
12047
- $b as getConceptById,
12048
- Cb as getConditions,
12048
+ Sb as getAppointmentById,
12049
+ Ub as getClinicalConfig,
12050
+ Rb as getConceptById,
12051
+ Ib as getConditions,
12049
12052
  Xi as getCookieByName,
12050
- Hb as getCurrentProvider,
12051
- Wy as getCurrentUser,
12052
- Gb as getCurrentUserPrivileges,
12053
- Ub as getDashboardConfig,
12054
- qb as getFlattenedInvestigations,
12055
- Tb as getFormattedAllergies,
12053
+ Bb as getCurrentProvider,
12054
+ Gy as getCurrentUser,
12055
+ Kb as getCurrentUserPrivileges,
12056
+ Fb as getDashboardConfig,
12057
+ jb as getFlattenedInvestigations,
12058
+ Ob as getFormattedAllergies,
12056
12059
  ut as getFormattedError,
12057
- Jy as getFormattedPatientById,
12058
- ab as getGenders,
12059
- tb as getIdentifierData,
12060
- eb as getIdentifierTypes,
12061
- mb as getInputTypeForFormat,
12062
- Fb as getMedicationConfig,
12063
- lb as getOrderedAddressHierarchyLevels,
12060
+ Xy as getFormattedPatientById,
12061
+ sb as getGenders,
12062
+ rb as getIdentifierData,
12063
+ tb as getIdentifierTypes,
12064
+ pb as getInputTypeForFormat,
12065
+ Vb as getMedicationConfig,
12066
+ db as getOrderedAddressHierarchyLevels,
12064
12067
  Th as getPatientById,
12065
- Ib as getPatientDiagnoses,
12066
- Xy as getPatientImageAsDataUrl,
12067
- xb as getPatientLabInvestigations,
12068
+ kb as getPatientDiagnoses,
12069
+ Qy as getPatientImageAsDataUrl,
12070
+ qb as getPatientLabInvestigations,
12068
12071
  Am as getPatientLabTestsBundle,
12069
12072
  dm as getPatientMedicationBundle,
12070
- kb as getPatientMedications,
12071
- db as getPatientProfile,
12073
+ Lb as getPatientMedications,
12074
+ fb as getPatientProfile,
12072
12075
  _m as getPatientRadiologyInvestigationBundle,
12073
- Lb as getPatientRadiologyInvestigations,
12074
- hb as getPersonAttributeTypes,
12076
+ Mb as getPatientRadiologyInvestigations,
12077
+ mb as getPersonAttributeTypes,
12075
12078
  Ih as getPrimaryIdentifierType,
12076
- Vy as getPriorityByOrder,
12077
- Vb as getRegistrationConfig,
12078
- fb as getRelationshipTypes,
12079
- ky as getTodayDate,
12079
+ Hy as getPriorityByOrder,
12080
+ Hb as getRegistrationConfig,
12081
+ hb as getRelationshipTypes,
12082
+ Ly as getTodayDate,
12080
12083
  Qi as getUserLoginLocation,
12081
- ub as getVisitLocationUUID,
12082
- ib as getVisitTypes,
12083
- Jb as getVitalFlowSheetData,
12084
- Hy as groupByDate,
12085
- Mb as groupLabTestsByDate,
12086
- Kb as hasPrivilege,
12087
- Ry as initAppI18n,
12088
- Wb as initializeAuditListener,
12089
- pb as isBooleanFormat,
12090
- gb as isConceptFormat,
12091
- bb as isDateFormat,
12092
- yb as isNumberFormat,
12093
- Fy as isStringEmpty,
12094
- wb as isTextFormat,
12084
+ lb as getVisitLocationUUID,
12085
+ ob as getVisitTypes,
12086
+ Xb as getVitalFlowSheetData,
12087
+ By as groupByDate,
12088
+ xb as groupLabTestsByDate,
12089
+ Yb as hasPrivilege,
12090
+ Py as initAppI18n,
12091
+ Gb as initializeAuditListener,
12092
+ gb as isBooleanFormat,
12093
+ yb as isConceptFormat,
12094
+ wb as isDateFormat,
12095
+ bb as isNumberFormat,
12096
+ Vy as isStringEmpty,
12097
+ vb as isTextFormat,
12095
12098
  Jg as logAuditEvent,
12099
+ Ry as normalizeTranslationKey,
12096
12100
  an as notificationService,
12097
12101
  nh as parseQueryParams,
12098
12102
  mt as post,
12099
12103
  Ey as put,
12100
- jy as refreshQueries,
12101
- vb as searchAppointmentsByAttribute,
12102
- Sb as searchConcepts,
12104
+ Uy as refreshQueries,
12105
+ Eb as searchAppointmentsByAttribute,
12106
+ $b as searchConcepts,
12103
12107
  Er as searchFHIRConcepts,
12104
12108
  Vh as searchFHIRConceptsByName,
12105
- Zy as searchPatientByCustomAttribute,
12106
- Qy as searchPatientByNameOrId,
12107
- xy as sortByDate,
12108
- Eb as updateAppointmentStatus,
12109
- nb as updatePatient,
12110
- Py as useCamera,
12111
- Zb as useTranslation
12109
+ eb as searchPatientByCustomAttribute,
12110
+ Zy as searchPatientByNameOrId,
12111
+ qy as sortByDate,
12112
+ _b as updateAppointmentStatus,
12113
+ ab as updatePatient,
12114
+ Ty as useCamera,
12115
+ ew as useTranslation
12112
12116
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/services",
3
- "version": "0.0.1-dev.64",
3
+ "version": "0.0.1-dev.66",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",