@bahmni/services 0.0.1-dev.115 → 0.0.1-dev.116

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
@@ -12029,32 +12029,30 @@ const En = /* @__PURE__ */ new Map(), my = async (e) => {
12029
12029
  const r = await t.json();
12030
12030
  if (!r.resources || r.resources.length === 0)
12031
12031
  throw new Error(`No resources found for form ${e}`);
12032
- const n = JSON.parse(r.resources[0].value), s = Nt();
12033
- let a = { labels: {}, concepts: {} };
12034
- if (n && typeof n == "object" && "translationsUrl" in n && typeof n.translationsUrl == "string")
12035
- try {
12036
- const o = n.name ?? r.name, i = r.uuid ?? n.uuid, c = n.version ?? r.version ?? "1", d = Xg(
12037
- o,
12038
- i,
12039
- c,
12032
+ const n = JSON.parse(r.resources[0].value), s = Nt(), a = r.name ?? n.name, o = r.uuid ?? n.uuid, i = r.version ?? n.version ?? "1", c = r.published ?? !1;
12033
+ let d = { labels: {}, concepts: {} };
12034
+ if (n && typeof n == "object" && "translationsUrl" in n && typeof n.translationsUrl == "string") {
12035
+ const l = Xg(
12036
+ a,
12037
+ o,
12038
+ i,
12039
+ s
12040
+ ), m = await fetch(l);
12041
+ if (m.ok) {
12042
+ const y = await m.json();
12043
+ d = Xu(
12044
+ y,
12040
12045
  s
12041
- ), l = await fetch(d);
12042
- if (l.ok) {
12043
- const m = await l.json();
12044
- a = Xu(
12045
- m,
12046
- s
12047
- );
12048
- }
12049
- } catch {
12046
+ );
12050
12047
  }
12048
+ }
12051
12049
  return {
12052
- uuid: r.uuid,
12053
- name: r.name,
12054
- version: r.version,
12055
- published: r.published,
12050
+ uuid: o,
12051
+ name: a,
12052
+ version: i,
12053
+ published: c,
12056
12054
  schema: n,
12057
- translations: a
12055
+ translations: d
12058
12056
  };
12059
12057
  }, Ub = async (e, t, r) => {
12060
12058
  let n;
@@ -1,7 +1,4 @@
1
1
  import { ObservationForm, FormMetadata, FormResponseData } from './models';
2
- /**
3
- * Function to fetch and process observation forms
4
- */
5
2
  export declare const fetchObservationForms: () => Promise<ObservationForm[]>;
6
3
  /**
7
4
  * Fetches form metadata including the form schema/definition and translations
@@ -1 +1 @@
1
- {"version":3,"file":"observationFormsService.d.ts","sourceRoot":"","sources":["../../src/observationFormsService/observationFormsService.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,eAAe,EAGf,YAAY,EAEZ,gBAAgB,EACjB,MAAM,UAAU,CAAC;AA6DlB;;GAEG;AACH,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,eAAe,EAAE,CAOvE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,MAAM,KACf,OAAO,CAAC,YAAY,CA4DtB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,aAAa,MAAM,EACnB,eAAe,MAAM,EAAE,EACvB,iBAAiB,MAAM,KACtB,OAAO,CAAC,gBAAgB,EAAE,CAW5B,CAAC"}
1
+ {"version":3,"file":"observationFormsService.d.ts","sourceRoot":"","sources":["../../src/observationFormsService/observationFormsService.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,eAAe,EAGf,YAAY,EAEZ,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAoDlB,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,eAAe,EAAE,CAOvE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,MAAM,KACf,OAAO,CAAC,YAAY,CAwDtB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,aAAa,MAAM,EACnB,eAAe,MAAM,EAAE,EACvB,iBAAiB,MAAM,KACtB,OAAO,CAAC,gBAAgB,EAAE,CAW5B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/services",
3
- "version": "0.0.1-dev.115",
3
+ "version": "0.0.1-dev.116",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",