primarycare-binder 1.1.9 → 1.1.10
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.cjs.js +20 -7
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -20973,8 +20973,14 @@ var queries$9 = {
|
|
|
20973
20973
|
deleteCC: function deleteCC(id) {
|
|
20974
20974
|
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CA_ChiefComplaints\",\n \"filter\": \"CA_ChiefComplaints._id =='").concat(id, "'\"\n }");
|
|
20975
20975
|
},
|
|
20976
|
+
// encounterDetails: (encounterId) => `{
|
|
20977
|
+
// "db_name": "${dbName}",
|
|
20978
|
+
// "entity": "Encounter",
|
|
20979
|
+
// "filter": "Encounter.id == ${encounterId}",
|
|
20980
|
+
// "return_fields": "MERGE(Encounter, {practitioner_details:(FOR practdet IN TO_ARRAY(Encounter.practitioner_details) RETURN MERGE(practdet,{speciality:MERGE(DOCUMENT(practdet.speciality),{coding:(FOR cod IN TO_ARRAY(DOCUMENT(practdet.speciality).coding) RETURN DOCUMENT(cod))})})),Patient: (for p in Patient filter p.id == Encounter.patient_id let hname = (FOR hn IN HumanNameMaster filter hn._id in p.name RETURN merge(hn,{prefix:document(hn.prefix)},{suffix:document(hn.suffix)},{use:document(hn.use)})) let gender = document(p.gender) let pidentifier = (FOR hn IN p.identifier RETURN DOCUMENT(hn)) return MERGE(p, {name: hname, pidentifier,gender})) })"
|
|
20981
|
+
// }`,
|
|
20976
20982
|
encounterDetails: function encounterDetails(encounterId) {
|
|
20977
|
-
return "{\n \"db_name\": \"
|
|
20983
|
+
return "{\n \"db_name\": \"primarycare\",\n \"entity\": \"Encounter\",\n \"filter\": \"Encounter.id == ".concat(encounterId, "\",\n \"return_fields\": \"MERGE(Encounter, {practitioner_details:(FOR practdet IN TO_ARRAY(Encounter.practitioner_details) RETURN MERGE(practdet,{speciality:MERGE(DOCUMENT(practdet.speciality),{coding:(FOR cod IN TO_ARRAY(DOCUMENT(practdet.speciality).coding) RETURN DOCUMENT(cod))})})),Patient: (for p in Patient filter p.id == Encounter.patient_id let hname = (FOR hn IN HumanNameMaster filter hn._id in p.name RETURN merge(hn,{prefix:document(hn.prefix)},{suffix:document(hn.suffix)},{use:document(hn.use)})) let gender = document(p.gender) let pidentifier = (FOR hn IN p.identifier RETURN DOCUMENT(hn)) return MERGE(p, {name: hname, pidentifier,gender,communicationLanguage:document(p.communicationLanguage)})) })\"\n }");
|
|
20978
20984
|
}
|
|
20979
20985
|
};
|
|
20980
20986
|
|
|
@@ -21678,10 +21684,10 @@ var GET_ENCOUNTER = createAsyncThunk("chiefCompilenceMastersSlice/encounter", /*
|
|
|
21678
21684
|
data = _context12.sent;
|
|
21679
21685
|
arr = [];
|
|
21680
21686
|
data.result.map(function (val) {
|
|
21681
|
-
var _val$Patient, _val$Patient$, _val$Patient$$communi, _val$
|
|
21687
|
+
var _val$Patient, _val$Patient$, _val$Patient$$communi, _val$_id, _val$_id$split, _val$practitioner_det, _val$practitioner_det2, _val$practitioner_det3, _val$practitioner_det4, _val$practitioner_det5, _ref25, _val$Patient2, _val$Patient2$, _val$Patient2$$name, _val$Patient2$$name$, _val$Patient2$$name$$, _val$Patient3, _val$Patient3$, _val$Patient3$$name, _val$Patient3$$name$, _val$Patient4, _val$Patient4$, _val$Patient4$$name, _val$Patient4$$name$, _val$Patient5, _val$Patient5$, _val$Patient5$$name, _val$Patient5$$name$, _val$Patient5$$name$$, _val$Patient6, _val$Patient6$, _val$Patient7, _val$Patient7$, _val$Patient8, _val$Patient8$, _val$Patient8$$gender, _val$Patient9, _val$Patient9$, _val$Patient$0$pident, _val$Patient10, _val$Patient10$, _val$Patient10$$piden, _val$Patient10$$piden2, _lang, _val$practitioner_det6, _val$practitioner_det7, _val$practitioner_det8;
|
|
21682
21688
|
|
|
21683
|
-
var lang = val === null || val === void 0 ? void 0 : (_val$Patient = val.Patient) === null || _val$Patient === void 0 ? void 0 : (_val$Patient$ = _val$Patient[0]) === null || _val$Patient$ === void 0 ? void 0 : (_val$Patient$$communi = _val$Patient$.
|
|
21684
|
-
return val.
|
|
21689
|
+
var lang = val === null || val === void 0 ? void 0 : (_val$Patient = val.Patient) === null || _val$Patient === void 0 ? void 0 : (_val$Patient$ = _val$Patient[0]) === null || _val$Patient$ === void 0 ? void 0 : (_val$Patient$$communi = _val$Patient$.communicationLanguage) === null || _val$Patient$$communi === void 0 ? void 0 : _val$Patient$$communi.map(function (val) {
|
|
21690
|
+
return val.display;
|
|
21685
21691
|
});
|
|
21686
21692
|
lang = lang ? lang : null;
|
|
21687
21693
|
arr.push({
|
|
@@ -24215,6 +24221,7 @@ var GET_VITALS_JSON = createAsyncThunk("VitalsApiSlice/getvitalsjson", /*#__PURE
|
|
|
24215
24221
|
body1,
|
|
24216
24222
|
data1,
|
|
24217
24223
|
vitelsJson,
|
|
24224
|
+
newObservations,
|
|
24218
24225
|
adjArray,
|
|
24219
24226
|
extraArr,
|
|
24220
24227
|
_args3 = arguments;
|
|
@@ -24306,7 +24313,11 @@ var GET_VITALS_JSON = createAsyncThunk("VitalsApiSlice/getvitalsjson", /*#__PURE
|
|
|
24306
24313
|
vitelsJson = [];
|
|
24307
24314
|
|
|
24308
24315
|
if (Array.isArray(data1[0].Observations)) {
|
|
24309
|
-
|
|
24316
|
+
newObservations = data1[0].Observations;
|
|
24317
|
+
newObservations.sort(function (a, b) {
|
|
24318
|
+
return Number(a.obsseq) - Number(b.obsseq);
|
|
24319
|
+
});
|
|
24320
|
+
vitelsJson = newObservations.map(function (val) {
|
|
24310
24321
|
var _val$obscode, _val$obscode2;
|
|
24311
24322
|
|
|
24312
24323
|
if ((val === null || val === void 0 ? void 0 : (_val$obscode = val.obscode) === null || _val$obscode === void 0 ? void 0 : _val$obscode.VitalsCodesReferenceRanges.length) > 0 && (val === null || val === void 0 ? void 0 : (_val$obscode2 = val.obscode) === null || _val$obscode2 === void 0 ? void 0 : _val$obscode2.vitalscode)) {
|
|
@@ -24319,7 +24330,9 @@ var GET_VITALS_JSON = createAsyncThunk("VitalsApiSlice/getvitalsjson", /*#__PURE
|
|
|
24319
24330
|
return element !== undefined;
|
|
24320
24331
|
});
|
|
24321
24332
|
adjArray = vitelsJson.filter(function (val, i) {
|
|
24322
|
-
|
|
24333
|
+
var _val$vitalscode, _val$vitalscode$toUpp, _val$vitalscode2, _val$vitalscode2$toUp;
|
|
24334
|
+
|
|
24335
|
+
return ((_val$vitalscode = val.vitalscode) === null || _val$vitalscode === void 0 ? void 0 : (_val$vitalscode$toUpp = _val$vitalscode.toUpperCase) === null || _val$vitalscode$toUpp === void 0 ? void 0 : _val$vitalscode$toUpp.call(_val$vitalscode)) === "HEIGHT" || ((_val$vitalscode2 = val.vitalscode) === null || _val$vitalscode2 === void 0 ? void 0 : (_val$vitalscode2$toUp = _val$vitalscode2.toUpperCase) === null || _val$vitalscode2$toUp === void 0 ? void 0 : _val$vitalscode2$toUp.call(_val$vitalscode2)) === "WEIGHT";
|
|
24323
24336
|
});
|
|
24324
24337
|
extraArr = [_objectSpread2(_objectSpread2({}, adjArray[0]), {}, {
|
|
24325
24338
|
vitalscode: "BMI",
|
|
@@ -24337,7 +24350,7 @@ var GET_VITALS_JSON = createAsyncThunk("VitalsApiSlice/getvitalsjson", /*#__PURE
|
|
|
24337
24350
|
disabled: true
|
|
24338
24351
|
})];
|
|
24339
24352
|
|
|
24340
|
-
if (adjArray) {
|
|
24353
|
+
if (adjArray.length === 2) {
|
|
24341
24354
|
vitelsJson = vitelsJson.concat(extraArr);
|
|
24342
24355
|
}
|
|
24343
24356
|
|