primary_care_admin_binder 0.1.49 → 0.1.50
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 +60 -19
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8264,8 +8264,11 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
|
|
|
8264
8264
|
|
|
8265
8265
|
if (data.identification && data.identification.length > 0) {
|
|
8266
8266
|
data.identification.map(function (val) {
|
|
8267
|
+
var _val$_key;
|
|
8268
|
+
|
|
8267
8269
|
var data = {
|
|
8268
8270
|
// "_id": "string",
|
|
8271
|
+
"_key": (_val$_key = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key !== void 0 ? _val$_key : "",
|
|
8269
8272
|
"user": val.id_type.value ? val.id_type.value : "",
|
|
8270
8273
|
"system": "",
|
|
8271
8274
|
"value": val.id_number ? val.id_number : "",
|
|
@@ -8289,8 +8292,11 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
|
|
|
8289
8292
|
|
|
8290
8293
|
if (data.names && data.names.length > 0) {
|
|
8291
8294
|
data.names.map(function (val) {
|
|
8295
|
+
var _val$_key2;
|
|
8296
|
+
|
|
8292
8297
|
var nameData = {
|
|
8293
8298
|
// "_id": "string",
|
|
8299
|
+
"_key": (_val$_key2 = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key2 !== void 0 ? _val$_key2 : "",
|
|
8294
8300
|
"use": val.use ? val.use.value : "",
|
|
8295
8301
|
"text": val.first_name ? val.first_name : "",
|
|
8296
8302
|
"family": val.last_name ? val.last_name : "",
|
|
@@ -8346,6 +8352,8 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
|
|
|
8346
8352
|
|
|
8347
8353
|
if (data.practitionerbyrole && data.practitionerbyrole.length > 0) {
|
|
8348
8354
|
data.practitionerbyrole.map(function (val) {
|
|
8355
|
+
var _val$speciality, _val$speciality2, _val$select_entity, _val$select_entity2, _val$entity_name, _val$entity_name2, _val$entity_name3, _val$entity_name4, _val$select_location, _val$select_location2;
|
|
8356
|
+
|
|
8349
8357
|
var key = {};
|
|
8350
8358
|
var roleId = {};
|
|
8351
8359
|
|
|
@@ -8369,14 +8377,14 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
|
|
|
8369
8377
|
end: val.end_date ? getUtcTime(moment(val.end_date)) : null // "id": "number"
|
|
8370
8378
|
|
|
8371
8379
|
}],
|
|
8372
|
-
SpecialtyID: val.speciality ? val.speciality.value : "",
|
|
8373
|
-
EntityType: val.select_entity ? val.select_entity._id : "",
|
|
8374
|
-
OrgID: val.entity_name ? "".concat(val.entity_name.value) : "",
|
|
8375
|
-
EntityName: val.entity_name ? "".concat(val.entity_name.value) : "",
|
|
8376
|
-
locationID: val.select_location ? val.select_location.value : "",
|
|
8377
|
-
primary_specialty: val.primary_specialty ? val.primary_specialty : false,
|
|
8380
|
+
SpecialtyID: val !== null && val !== void 0 && (_val$speciality = val.speciality) !== null && _val$speciality !== void 0 && _val$speciality.value ? val === null || val === void 0 ? void 0 : (_val$speciality2 = val.speciality) === null || _val$speciality2 === void 0 ? void 0 : _val$speciality2.value : "",
|
|
8381
|
+
EntityType: val !== null && val !== void 0 && (_val$select_entity = val.select_entity) !== null && _val$select_entity !== void 0 && _val$select_entity._id ? val === null || val === void 0 ? void 0 : (_val$select_entity2 = val.select_entity) === null || _val$select_entity2 === void 0 ? void 0 : _val$select_entity2._id : "",
|
|
8382
|
+
OrgID: val !== null && val !== void 0 && (_val$entity_name = val.entity_name) !== null && _val$entity_name !== void 0 && _val$entity_name.value ? "".concat(val === null || val === void 0 ? void 0 : (_val$entity_name2 = val.entity_name) === null || _val$entity_name2 === void 0 ? void 0 : _val$entity_name2.value) : "",
|
|
8383
|
+
EntityName: val !== null && val !== void 0 && (_val$entity_name3 = val.entity_name) !== null && _val$entity_name3 !== void 0 && _val$entity_name3.value ? "".concat(val === null || val === void 0 ? void 0 : (_val$entity_name4 = val.entity_name) === null || _val$entity_name4 === void 0 ? void 0 : _val$entity_name4.value) : "",
|
|
8384
|
+
locationID: val !== null && val !== void 0 && (_val$select_location = val.select_location) !== null && _val$select_location !== void 0 && _val$select_location.value ? val === null || val === void 0 ? void 0 : (_val$select_location2 = val.select_location) === null || _val$select_location2 === void 0 ? void 0 : _val$select_location2.value : "",
|
|
8385
|
+
primary_specialty: val !== null && val !== void 0 && val.primary_specialty ? val === null || val === void 0 ? void 0 : val.primary_specialty : false,
|
|
8378
8386
|
telecom: contactList(val.contact),
|
|
8379
|
-
files: val.doc ? val.doc : []
|
|
8387
|
+
files: val !== null && val !== void 0 && val.doc ? val === null || val === void 0 ? void 0 : val.doc : []
|
|
8380
8388
|
}, roleId), key);
|
|
8381
8389
|
|
|
8382
8390
|
practitioner_list.push(practitionerData);
|
|
@@ -8941,7 +8949,7 @@ var masterQuery$7 = {
|
|
|
8941
8949
|
"priority": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='PRIORITY'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
8942
8950
|
"address_type": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='ADDRESSTYPE'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
8943
8951
|
"role": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='PRACTROLE' && CodeableConceptMaster.status == true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
8944
|
-
"location": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"LocationMaster\",\n \"sort\":\"LocationMaster.shortdesc\",\n \"filter\": \"LocationMaster.activestatus==true && LocationMaster.status=='active'\"
|
|
8952
|
+
"location": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"LocationMaster\",\n \"sort\":\"LocationMaster.shortdesc\",\n \"filter\": \"LocationMaster.activestatus==true && lower(LocationMaster.status)=='active'\", \n \"return_fields\": \"LocationMaster\"\n }"),
|
|
8945
8953
|
// "city": `{
|
|
8946
8954
|
// "db_name": "${dbName}",
|
|
8947
8955
|
// "entity": "SMGeographicMaster",
|
|
@@ -9159,7 +9167,7 @@ var generateReadJSON$5 = function generateReadJSON(data, masters, countryData, s
|
|
|
9159
9167
|
|
|
9160
9168
|
if (data.identifier && ((_data$identifier = data.identifier) === null || _data$identifier === void 0 ? void 0 : _data$identifier.length) > 0) {
|
|
9161
9169
|
data.identifier.map(function (val) {
|
|
9162
|
-
var _val$user;
|
|
9170
|
+
var _val$user, _val$_key;
|
|
9163
9171
|
|
|
9164
9172
|
var identifierData = {
|
|
9165
9173
|
"id_type": ((_val$user = val.user) === null || _val$user === void 0 ? void 0 : _val$user.length) > 0 && masters.id_type.filter(function (idlabel) {
|
|
@@ -9169,7 +9177,8 @@ var generateReadJSON$5 = function generateReadJSON(data, masters, countryData, s
|
|
|
9169
9177
|
})[0] : {},
|
|
9170
9178
|
"id_number": val.value,
|
|
9171
9179
|
"expiry_date": val.period[0].end ? utcTOLocal(val.period[0].end, "YYYY-MM-DD") : null,
|
|
9172
|
-
"doc": val.files
|
|
9180
|
+
"doc": val.files,
|
|
9181
|
+
_key: (_val$_key = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key !== void 0 ? _val$_key : ""
|
|
9173
9182
|
};
|
|
9174
9183
|
identifier.push(identifierData);
|
|
9175
9184
|
});
|
|
@@ -9179,6 +9188,8 @@ var generateReadJSON$5 = function generateReadJSON(data, masters, countryData, s
|
|
|
9179
9188
|
|
|
9180
9189
|
if (data.name && ((_data$name = data.name) === null || _data$name === void 0 ? void 0 : _data$name.length) > 0) {
|
|
9181
9190
|
data.name.map(function (val) {
|
|
9191
|
+
var _val$_key2;
|
|
9192
|
+
|
|
9182
9193
|
var namedatas = {
|
|
9183
9194
|
use: val.use ? masters.use.filter(function (idlabel) {
|
|
9184
9195
|
return idlabel.value === val.use;
|
|
@@ -9191,7 +9202,8 @@ var generateReadJSON$5 = function generateReadJSON(data, masters, countryData, s
|
|
|
9191
9202
|
last_name: val.family,
|
|
9192
9203
|
suffix: val.suffix ? masters.suffix.filter(function (idlabel) {
|
|
9193
9204
|
return idlabel.value === val.suffix;
|
|
9194
|
-
})[0] : {}
|
|
9205
|
+
})[0] : {},
|
|
9206
|
+
_key: (_val$_key2 = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key2 !== void 0 ? _val$_key2 : ""
|
|
9195
9207
|
};
|
|
9196
9208
|
nameslist.push(namedatas);
|
|
9197
9209
|
});
|
|
@@ -36716,12 +36728,19 @@ var symptomAndSpecialtySlice$1 = symptomAndSpecialtySlice.reducer;
|
|
|
36716
36728
|
|
|
36717
36729
|
var queries = {
|
|
36718
36730
|
encounterType: function encounterType(type) {
|
|
36731
|
+
// return {
|
|
36732
|
+
// "db_name": dbName,
|
|
36733
|
+
// "entity": "AMPatientClass",
|
|
36734
|
+
// "filter": "AMPatientClass.activestatus==true",
|
|
36735
|
+
// "return_fields": "merge(AMPatientClass,{encType:document(AMPatientClass.encType).code},{encTypeDesc:document(AMPatientClass.encTypeDesc).display},{encClsType:document(AMPatientClass.encClsType).code},{encClsDesc:document(AMPatientClass.encClsDesc).display})",
|
|
36736
|
+
// "sort": "document(AMPatientClass.encTypeDesc).display"
|
|
36737
|
+
// }
|
|
36719
36738
|
return {
|
|
36720
36739
|
"db_name": dbName$1,
|
|
36721
36740
|
"entity": "AMPatientClass",
|
|
36722
36741
|
"filter": "AMPatientClass.activestatus==true",
|
|
36723
|
-
"return_fields": "merge(AMPatientClass,{
|
|
36724
|
-
"sort": "document(AMPatientClass.
|
|
36742
|
+
"return_fields": "merge(AMPatientClass,{encClsByTypes:(for encClsByTypes in (AMPatientClass.encClsByTypes) return merge(encClsByTypes,{encClsType:document(encClsByTypes.encClsType)}))},{encType:document(AMPatientClass.encType)})",
|
|
36743
|
+
"sort": "document(AMPatientClass.encType).display "
|
|
36725
36744
|
};
|
|
36726
36745
|
},
|
|
36727
36746
|
//STATUS CHANGE
|
|
@@ -36767,13 +36786,14 @@ var ENCOUNTER_TYPE_READ = createAsyncThunk("encouterTypeSlice/encouterTypeRead",
|
|
|
36767
36786
|
arry = [];
|
|
36768
36787
|
data.result.map(function (val, i) {
|
|
36769
36788
|
if (val !== null && val !== void 0 && val._id) {
|
|
36770
|
-
var _val$
|
|
36789
|
+
var _val$id, _val$_id, _val$encType$display, _val$encType, _val$encType$code, _val$encType2;
|
|
36771
36790
|
|
|
36772
36791
|
arry.push(_objectSpread2({
|
|
36773
|
-
id: val === null || val === void 0 ? void 0 : val.id,
|
|
36774
|
-
|
|
36775
|
-
|
|
36776
|
-
|
|
36792
|
+
id: (_val$id = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id !== void 0 ? _val$id : "",
|
|
36793
|
+
_id: (_val$_id = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id !== void 0 ? _val$_id : "",
|
|
36794
|
+
description: (_val$encType$display = val === null || val === void 0 ? void 0 : (_val$encType = val.encType) === null || _val$encType === void 0 ? void 0 : _val$encType.display) !== null && _val$encType$display !== void 0 ? _val$encType$display : "",
|
|
36795
|
+
code: (_val$encType$code = val === null || val === void 0 ? void 0 : (_val$encType2 = val.encType) === null || _val$encType2 === void 0 ? void 0 : _val$encType2.code) !== null && _val$encType$code !== void 0 ? _val$encType$code : "",
|
|
36796
|
+
encounter_class: constructEncounterClassData(val === null || val === void 0 ? void 0 : val.encClsByTypes).toString()
|
|
36777
36797
|
}, val));
|
|
36778
36798
|
}
|
|
36779
36799
|
});
|
|
@@ -36794,7 +36814,28 @@ var ENCOUNTER_TYPE_READ = createAsyncThunk("encouterTypeSlice/encouterTypeRead",
|
|
|
36794
36814
|
}
|
|
36795
36815
|
}
|
|
36796
36816
|
}, _callee, null, [[2, 12]]);
|
|
36797
|
-
})));
|
|
36817
|
+
})));
|
|
36818
|
+
|
|
36819
|
+
var constructEncounterClassData = function constructEncounterClassData(data) {
|
|
36820
|
+
var arr = [];
|
|
36821
|
+
|
|
36822
|
+
if (data.length > 0 && Array.isArray(data)) {
|
|
36823
|
+
data.map(function (val) {
|
|
36824
|
+
var _val$encClsType, _val$encClsType2;
|
|
36825
|
+
|
|
36826
|
+
if (val !== null && val !== void 0 && (_val$encClsType = val.encClsType) !== null && _val$encClsType !== void 0 && _val$encClsType.display && val !== null && val !== void 0 && (_val$encClsType2 = val.encClsType) !== null && _val$encClsType2 !== void 0 && _val$encClsType2.code) {
|
|
36827
|
+
var _val$encClsType3, _val$encClsType4, _val$encClsType5, _val$encClsType6;
|
|
36828
|
+
|
|
36829
|
+
var dis = val !== null && val !== void 0 && (_val$encClsType3 = val.encClsType) !== null && _val$encClsType3 !== void 0 && _val$encClsType3.display ? val === null || val === void 0 ? void 0 : (_val$encClsType4 = val.encClsType) === null || _val$encClsType4 === void 0 ? void 0 : _val$encClsType4.display : "";
|
|
36830
|
+
var co = val !== null && val !== void 0 && (_val$encClsType5 = val.encClsType) !== null && _val$encClsType5 !== void 0 && _val$encClsType5.code ? val === null || val === void 0 ? void 0 : (_val$encClsType6 = val.encClsType) === null || _val$encClsType6 === void 0 ? void 0 : _val$encClsType6.code : "" + " )";
|
|
36831
|
+
arr.push(dis + " (" + co + ")");
|
|
36832
|
+
}
|
|
36833
|
+
});
|
|
36834
|
+
}
|
|
36835
|
+
|
|
36836
|
+
return arr;
|
|
36837
|
+
}; //ENCOUNTER_TYPE_STATUS_CHANGE
|
|
36838
|
+
|
|
36798
36839
|
|
|
36799
36840
|
var ENCOUNTER_TYPE_STATUS_CHANGE = createAsyncThunk("encouterTypeSlice/encouterStatusChange", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
36800
36841
|
var payload,
|