primary_care_admin_binder 0.1.154 → 0.1.156
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 +100 -52
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -11164,7 +11164,10 @@ var query_ids = {
|
|
|
11164
11164
|
"resOrderCatalogVitalCode": "493389da-6789-4ed0-89e4-a2d546025f1e",
|
|
11165
11165
|
"gmLoadQuery": "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e",
|
|
11166
11166
|
"signInApiSlice/getpermissiondata": "1a91eea3-8c88-4f78-87c1-fcd6af54e81f",
|
|
11167
|
-
"getAllergyList": "777aa602-1905-48d3-b1cd-db1cca7d7697"
|
|
11167
|
+
"getAllergyList": "777aa602-1905-48d3-b1cd-db1cca7d7697",
|
|
11168
|
+
"getCodingmasterByType": "b283129b-9841-419b-bdfc-de5105ebbad7",
|
|
11169
|
+
"symptom_and_specialty_single_read": "b4157ebd-a966-4d06-8c02-7a9cf8e7f1f5",
|
|
11170
|
+
"symptom_and_specialty_read": "78c9fdd7-fd12-4d36-9729-88ea3174867c"
|
|
11168
11171
|
};
|
|
11169
11172
|
|
|
11170
11173
|
var query$9 = {
|
|
@@ -43016,7 +43019,7 @@ var queries$1 = {
|
|
|
43016
43019
|
},
|
|
43017
43020
|
is_metadata: true,
|
|
43018
43021
|
metadataId: metaDataId$1,
|
|
43019
|
-
metadata_dbname: metaDatadbName,
|
|
43022
|
+
metadata_dbname: metaDatadbName$1,
|
|
43020
43023
|
doc: {
|
|
43021
43024
|
status: data.status
|
|
43022
43025
|
}
|
|
@@ -43031,14 +43034,14 @@ var queries$1 = {
|
|
|
43031
43034
|
},
|
|
43032
43035
|
is_metadata: true,
|
|
43033
43036
|
metadataId: metaDataId$1,
|
|
43034
|
-
metadata_dbname: metaDatadbName,
|
|
43037
|
+
metadata_dbname: metaDatadbName$1,
|
|
43035
43038
|
doc: {
|
|
43036
43039
|
status: data.status
|
|
43037
43040
|
}
|
|
43038
43041
|
}];
|
|
43039
43042
|
},
|
|
43040
43043
|
symptom_and_specialty_upsert: function symptom_and_specialty_upsert(data) {
|
|
43041
|
-
var _data$symptomsname, _data$symptomscode$tr, _data$symptomscode, _data$speciality, _data$id, _data$status, _data$designation, _data$property, _data$description, _data$imageurl;
|
|
43044
|
+
var _data$symptomsname, _data$symptomscode$tr, _data$symptomscode, _data$speciality, _data$id, _data$status, _data$designation, _data$property, _data$questionnaire, _data$description, _data$imageurl;
|
|
43042
43045
|
var filter = {};
|
|
43043
43046
|
if (data._key) {
|
|
43044
43047
|
filter = {
|
|
@@ -43063,50 +43066,52 @@ var queries$1 = {
|
|
|
43063
43066
|
}, filter), {}, {
|
|
43064
43067
|
is_metadata: true,
|
|
43065
43068
|
metadataId: metaDataId$1,
|
|
43066
|
-
metadata_dbname: metaDatadbName,
|
|
43069
|
+
metadata_dbname: metaDatadbName$1,
|
|
43067
43070
|
doc: {
|
|
43068
|
-
|
|
43071
|
+
symptomsName: (_data$symptomsname = data === null || data === void 0 ? void 0 : data.symptomsname) !== null && _data$symptomsname !== void 0 ? _data$symptomsname : "",
|
|
43069
43072
|
symptomsCode: (_data$symptomscode$tr = data === null || data === void 0 || (_data$symptomscode = data.symptomscode) === null || _data$symptomscode === void 0 ? void 0 : _data$symptomscode.trim()) !== null && _data$symptomscode$tr !== void 0 ? _data$symptomscode$tr : "",
|
|
43070
43073
|
specialty: (_data$speciality = data === null || data === void 0 ? void 0 : data.speciality) !== null && _data$speciality !== void 0 ? _data$speciality : [],
|
|
43071
43074
|
id: (_data$id = data === null || data === void 0 ? void 0 : data.id) !== null && _data$id !== void 0 ? _data$id : 0,
|
|
43072
43075
|
status: (_data$status = data === null || data === void 0 ? void 0 : data.status) !== null && _data$status !== void 0 ? _data$status : true,
|
|
43073
|
-
designation: (_data$designation = data === null || data === void 0 ? void 0 : data.designation) !== null && _data$designation !== void 0 ? _data$designation :
|
|
43074
|
-
property: (_data$property = data === null || data === void 0 ? void 0 : data.property) !== null && _data$property !== void 0 ? _data$property :
|
|
43075
|
-
questionnaire:
|
|
43076
|
+
designation: (_data$designation = data === null || data === void 0 ? void 0 : data.designation) !== null && _data$designation !== void 0 ? _data$designation : [],
|
|
43077
|
+
property: (_data$property = data === null || data === void 0 ? void 0 : data.property) !== null && _data$property !== void 0 ? _data$property : [],
|
|
43078
|
+
questionnaire: (_data$questionnaire = data === null || data === void 0 ? void 0 : data.questionnaire) !== null && _data$questionnaire !== void 0 ? _data$questionnaire : [],
|
|
43076
43079
|
rule: parseJson(data === null || data === void 0 ? void 0 : data.rule),
|
|
43077
43080
|
description: (_data$description = data === null || data === void 0 ? void 0 : data.description) !== null && _data$description !== void 0 ? _data$description : "",
|
|
43078
|
-
|
|
43081
|
+
imageUrl: (_data$imageurl = data === null || data === void 0 ? void 0 : data.imageurl) !== null && _data$imageurl !== void 0 ? _data$imageurl : ""
|
|
43079
43082
|
}
|
|
43080
43083
|
})];
|
|
43081
43084
|
},
|
|
43082
|
-
symptom_and_specialty_read: function symptom_and_specialty_read(search, page, perPage
|
|
43085
|
+
symptom_and_specialty_read: function symptom_and_specialty_read(search, page, perPage) {
|
|
43083
43086
|
return {
|
|
43084
43087
|
db_name: dbName,
|
|
43085
|
-
|
|
43086
|
-
filter:
|
|
43087
|
-
|
|
43088
|
+
queryid: query_ids.symptom_and_specialty_read,
|
|
43089
|
+
filter: {
|
|
43090
|
+
search: "".concat(search),
|
|
43088
43091
|
offset: page,
|
|
43089
43092
|
count: perPage
|
|
43090
|
-
}
|
|
43091
|
-
return_fields: "merge(SymptomsMapping,{TotalCount:COUNT(".concat(search ? "FOR cnt IN SymptomsMapping filter UPPER(cnt.SymptomsName) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(cnt.symptomsCode) LIKE '%").concat(search.toUpperCase(), "%' RETURN cnt._key") : "FOR cnt IN SymptomsMapping RETURN cnt._key", "), specialty:(FOR cod IN CodeableConceptMaster filter cod._id in SymptomsMapping.specialty RETURN merge(cod,{coding:document(cod.coding)}))})"),
|
|
43092
|
-
sort: "".concat(sort === "Symptom Code" ? "SymptomsMapping.symptomsCode ".concat(direction) : "SymptomsMapping.SymptomsName ".concat(direction))
|
|
43093
|
+
}
|
|
43093
43094
|
};
|
|
43094
43095
|
},
|
|
43095
43096
|
symptom_and_specialty_single_read: function symptom_and_specialty_single_read(_key) {
|
|
43096
43097
|
return {
|
|
43097
43098
|
db_name: dbName,
|
|
43098
|
-
|
|
43099
|
-
filter:
|
|
43100
|
-
|
|
43099
|
+
queryid: query_ids.symptom_and_specialty_single_read,
|
|
43100
|
+
filter: {
|
|
43101
|
+
_key: _key
|
|
43102
|
+
}
|
|
43101
43103
|
};
|
|
43102
43104
|
},
|
|
43103
43105
|
specialtyMaster: function specialtyMaster() {
|
|
43104
43106
|
return {
|
|
43105
43107
|
db_name: dbName,
|
|
43106
|
-
|
|
43107
|
-
filter:
|
|
43108
|
-
|
|
43109
|
-
|
|
43108
|
+
queryid: query_ids.getCodingmasterByType,
|
|
43109
|
+
filter: {
|
|
43110
|
+
type: "SPECIALTY",
|
|
43111
|
+
code: "",
|
|
43112
|
+
status: true,
|
|
43113
|
+
sortField: "display"
|
|
43114
|
+
}
|
|
43110
43115
|
};
|
|
43111
43116
|
},
|
|
43112
43117
|
upsert: function upsert(data) {
|
|
@@ -43129,7 +43134,7 @@ var queries$1 = {
|
|
|
43129
43134
|
entity: "CodeableConceptMaster",
|
|
43130
43135
|
is_metadata: true,
|
|
43131
43136
|
mmetadataId: metaDataId$1,
|
|
43132
|
-
metadata_dbname: metaDatadbName
|
|
43137
|
+
metadata_dbname: metaDatadbName$1
|
|
43133
43138
|
}, filter), {}, {
|
|
43134
43139
|
doc: {
|
|
43135
43140
|
text: "",
|
|
@@ -43195,8 +43200,8 @@ var constructReadJSON = function constructReadJSON(data) {
|
|
|
43195
43200
|
if (!Array.isArray(data)) return "";
|
|
43196
43201
|
var arry = [];
|
|
43197
43202
|
data.map(function (val) {
|
|
43198
|
-
var _val$
|
|
43199
|
-
arry.push((_val$
|
|
43203
|
+
var _val$display;
|
|
43204
|
+
arry.push((_val$display = val === null || val === void 0 ? void 0 : val.display) !== null && _val$display !== void 0 ? _val$display : "");
|
|
43200
43205
|
});
|
|
43201
43206
|
return arry.join(", ");
|
|
43202
43207
|
};
|
|
@@ -43206,10 +43211,10 @@ var constructSingleReadJSON = function constructSingleReadJSON(data) {
|
|
|
43206
43211
|
if (!Array.isArray(data)) return [];
|
|
43207
43212
|
var arry = [];
|
|
43208
43213
|
data.map(function (val) {
|
|
43209
|
-
var _val$_id, _val$
|
|
43214
|
+
var _val$_id, _val$display2;
|
|
43210
43215
|
arry.push({
|
|
43211
|
-
value: (_val$_id = val._id) !== null && _val$_id !== void 0 ? _val$_id : 0,
|
|
43212
|
-
label: (_val$
|
|
43216
|
+
value: (_val$_id = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id !== void 0 ? _val$_id : 0,
|
|
43217
|
+
label: (_val$display2 = val === null || val === void 0 ? void 0 : val.display) !== null && _val$display2 !== void 0 ? _val$display2 : ""
|
|
43213
43218
|
});
|
|
43214
43219
|
});
|
|
43215
43220
|
return arry;
|
|
@@ -43229,30 +43234,29 @@ var SYMPTOM_AND_SPECIALTY_READ = createAsyncThunk("symptomAndSpecialtySlice/symp
|
|
|
43229
43234
|
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
43230
43235
|
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
43231
43236
|
_context2.p = 1;
|
|
43232
|
-
readqueries = queries$1.symptom_and_specialty_read(payload === null || payload === void 0 ? void 0 : payload.search, payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage
|
|
43237
|
+
readqueries = queries$1.symptom_and_specialty_read(payload === null || payload === void 0 ? void 0 : payload.search, payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage);
|
|
43233
43238
|
_context2.n = 2;
|
|
43234
43239
|
return fetchData({
|
|
43235
43240
|
body: JSON.stringify(readqueries)
|
|
43236
|
-
},
|
|
43241
|
+
}, __baseUrl__$1);
|
|
43237
43242
|
case 2:
|
|
43238
43243
|
data = _context2.v;
|
|
43239
43244
|
arry = [];
|
|
43240
|
-
data.
|
|
43245
|
+
data.map(function (val) {
|
|
43241
43246
|
if (val._key) {
|
|
43242
|
-
var _val$designation, _val$property, _val$description, _val$
|
|
43247
|
+
var _val$designation, _val$property, _val$description, _val$imageUrl;
|
|
43243
43248
|
arry.push({
|
|
43244
43249
|
total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
43245
43250
|
id: val.id ? val.id : 0,
|
|
43246
43251
|
_key: val._key ? val._key : "",
|
|
43247
43252
|
status: val.status ? val.status : false,
|
|
43248
|
-
|
|
43249
|
-
symptomsname: val.SymptomsName ? val.SymptomsName : "",
|
|
43253
|
+
symptomsname: val.symptomsName ? val.symptomsName : val.SymptomsName,
|
|
43250
43254
|
symptomscode: val.symptomsCode ? val.symptomsCode : "",
|
|
43251
43255
|
speciality: constructReadJSON(val.specialty),
|
|
43252
43256
|
designation: (_val$designation = val.designation) !== null && _val$designation !== void 0 ? _val$designation : "",
|
|
43253
43257
|
property: (_val$property = val.property) !== null && _val$property !== void 0 ? _val$property : "",
|
|
43254
43258
|
description: (_val$description = val.description) !== null && _val$description !== void 0 ? _val$description : "",
|
|
43255
|
-
imageurl: (_val$
|
|
43259
|
+
imageurl: (_val$imageUrl = val.imageUrl) !== null && _val$imageUrl !== void 0 ? _val$imageUrl : ""
|
|
43256
43260
|
});
|
|
43257
43261
|
}
|
|
43258
43262
|
});
|
|
@@ -43283,31 +43287,74 @@ var SYMPTOM_AND_SPECIALTY_SINGLE_READ = createAsyncThunk("symptomAndSpecialtySli
|
|
|
43283
43287
|
payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
43284
43288
|
_ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
|
|
43285
43289
|
_context3.p = 1;
|
|
43286
|
-
readqueries = queries$1.symptom_and_specialty_single_read(payload.
|
|
43290
|
+
readqueries = queries$1.symptom_and_specialty_single_read(payload === null || payload === void 0 ? void 0 : payload._key);
|
|
43287
43291
|
_context3.n = 2;
|
|
43288
43292
|
return fetchData({
|
|
43289
43293
|
body: JSON.stringify(readqueries)
|
|
43290
|
-
},
|
|
43294
|
+
}, __baseUrl__$1);
|
|
43291
43295
|
case 2:
|
|
43292
43296
|
data = _context3.v;
|
|
43293
43297
|
arry = [];
|
|
43294
|
-
data.
|
|
43298
|
+
data.map(function (val) {
|
|
43295
43299
|
if (val._key) {
|
|
43296
|
-
var _val$
|
|
43300
|
+
var _val$questionnaire, _val$rule, _val$designation2, _val$property2, _val$description2, _val$imageUrl2;
|
|
43301
|
+
// Normalize questionnaire — always an array [{lang, question}]
|
|
43302
|
+
var questionnaire = (_val$questionnaire = val.questionnaire) !== null && _val$questionnaire !== void 0 ? _val$questionnaire : [];
|
|
43303
|
+
if (typeof questionnaire === "string") {
|
|
43304
|
+
try {
|
|
43305
|
+
questionnaire = JSON.parse(questionnaire);
|
|
43306
|
+
} catch (_unused) {
|
|
43307
|
+
questionnaire = [];
|
|
43308
|
+
}
|
|
43309
|
+
}
|
|
43310
|
+
if (!Array.isArray(questionnaire)) questionnaire = [];
|
|
43311
|
+
|
|
43312
|
+
// Normalize rule — always an object or null
|
|
43313
|
+
var rule = (_val$rule = val.rule) !== null && _val$rule !== void 0 ? _val$rule : null;
|
|
43314
|
+
if (typeof rule === "string") {
|
|
43315
|
+
try {
|
|
43316
|
+
rule = JSON.parse(rule);
|
|
43317
|
+
} catch (_unused2) {
|
|
43318
|
+
rule = null;
|
|
43319
|
+
}
|
|
43320
|
+
}
|
|
43321
|
+
if (rule !== null && _typeof(rule) !== "object") rule = null;
|
|
43322
|
+
|
|
43323
|
+
// Normalize designation — always an array
|
|
43324
|
+
var designation = (_val$designation2 = val.designation) !== null && _val$designation2 !== void 0 ? _val$designation2 : [];
|
|
43325
|
+
if (typeof designation === "string") {
|
|
43326
|
+
try {
|
|
43327
|
+
designation = JSON.parse(designation);
|
|
43328
|
+
} catch (_unused3) {
|
|
43329
|
+
designation = [];
|
|
43330
|
+
}
|
|
43331
|
+
}
|
|
43332
|
+
if (!Array.isArray(designation)) designation = [];
|
|
43333
|
+
|
|
43334
|
+
// Normalize property — always an array
|
|
43335
|
+
var property = (_val$property2 = val.property) !== null && _val$property2 !== void 0 ? _val$property2 : [];
|
|
43336
|
+
if (typeof property === "string") {
|
|
43337
|
+
try {
|
|
43338
|
+
property = JSON.parse(property);
|
|
43339
|
+
} catch (_unused4) {
|
|
43340
|
+
property = [];
|
|
43341
|
+
}
|
|
43342
|
+
}
|
|
43343
|
+
if (!Array.isArray(property)) property = [];
|
|
43297
43344
|
arry.push({
|
|
43298
43345
|
id: val.id ? val.id : 0,
|
|
43346
|
+
_id: val._id ? val._id : "",
|
|
43299
43347
|
_key: val._key ? val._key : "",
|
|
43300
43348
|
status: val.status ? val.status : false,
|
|
43301
|
-
|
|
43302
|
-
symptomsname: val.SymptomsName ? val.SymptomsName : "",
|
|
43349
|
+
symptomsname: val.symptomsName ? val.symptomsName : "",
|
|
43303
43350
|
symptomscode: val.symptomsCode ? val.symptomsCode : "",
|
|
43304
43351
|
speciality: constructSingleReadJSON(val.specialty),
|
|
43305
|
-
designation:
|
|
43306
|
-
property:
|
|
43307
|
-
questionnaire:
|
|
43308
|
-
rule:
|
|
43352
|
+
designation: designation,
|
|
43353
|
+
property: property,
|
|
43354
|
+
questionnaire: questionnaire,
|
|
43355
|
+
rule: rule,
|
|
43309
43356
|
description: (_val$description2 = val.description) !== null && _val$description2 !== void 0 ? _val$description2 : "",
|
|
43310
|
-
imageurl: (_val$
|
|
43357
|
+
imageurl: (_val$imageUrl2 = val.imageUrl) !== null && _val$imageUrl2 !== void 0 ? _val$imageUrl2 : ""
|
|
43311
43358
|
});
|
|
43312
43359
|
}
|
|
43313
43360
|
});
|
|
@@ -43371,15 +43418,16 @@ var SYMPTOM_AND_SPECIALTY_MASTERS = createAsyncThunk("symptomAndSpecialtySlice/s
|
|
|
43371
43418
|
_context5.n = 2;
|
|
43372
43419
|
return fetchData({
|
|
43373
43420
|
body: JSON.stringify(queries$1.specialtyMaster())
|
|
43374
|
-
},
|
|
43421
|
+
}, __baseUrl__$1);
|
|
43375
43422
|
case 2:
|
|
43376
43423
|
data_arr = _context5.v;
|
|
43377
43424
|
arry = [];
|
|
43378
43425
|
_context5.n = 3;
|
|
43379
|
-
return data_arr.
|
|
43426
|
+
return data_arr.map(function (val) {
|
|
43427
|
+
var _val$display3, _val$_id2;
|
|
43380
43428
|
arry.push({
|
|
43381
|
-
label: val
|
|
43382
|
-
value: val._id
|
|
43429
|
+
label: (_val$display3 = val === null || val === void 0 ? void 0 : val.display) !== null && _val$display3 !== void 0 ? _val$display3 : "",
|
|
43430
|
+
value: (_val$_id2 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id2 !== void 0 ? _val$_id2 : ""
|
|
43383
43431
|
});
|
|
43384
43432
|
});
|
|
43385
43433
|
case 3:
|