primary_care_admin_binder 0.1.173 → 0.1.175
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 +388 -118
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8878,6 +8878,59 @@ var practitionerActions$1 = {
|
|
|
8878
8878
|
};
|
|
8879
8879
|
var practitionerSlice$1 = practitionerSlice.reducer;
|
|
8880
8880
|
|
|
8881
|
+
var query_ids = {
|
|
8882
|
+
"scheduleManagementApiSlice/practitionerSlots": "562d7099-7b83-49ec-9bdc-364246ca185d",
|
|
8883
|
+
"slotApiSlice/readSlot": {
|
|
8884
|
+
practionerid: "30fcb559-96fb-48f6-a955-e47dd97bc851",
|
|
8885
|
+
clinicid: "30fcb559-96fb-48f6-a955-e47dd97bc951",
|
|
8886
|
+
query: function query(_ref) {
|
|
8887
|
+
var start = _ref.start,
|
|
8888
|
+
end = _ref.end,
|
|
8889
|
+
id = _ref.id;
|
|
8890
|
+
return {
|
|
8891
|
+
"db_name": dbName,
|
|
8892
|
+
"entity": "Schedule",
|
|
8893
|
+
"filter": "Schedule.start >= ".concat(start, " AND Schedule.end <= ").concat(end, " AND Schedule.activestatus == true AND DOCUMENT(Schedule.resourceCode).id == ").concat(id),
|
|
8894
|
+
"return_fields": "MERGE(Schedule, {slots : (FOR slt IN Slot FILTER Schedule.id IN slt.ScheduleID AND slt.status!='blocked' AND slt.start >= ".concat(moment.utc().unix(), " AND slt.activestatus==true sort slt._id asc RETURN merge(slt, {DayType: Document(slt.DayType)}))})")
|
|
8895
|
+
};
|
|
8896
|
+
}
|
|
8897
|
+
},
|
|
8898
|
+
"appointmentApiSlice/readAppointment": "0bfea3d4-fe24-43f9-b5b8-cf9ff4365fab",
|
|
8899
|
+
"slotAvailabilityApiSlice/slotAvailability": "c21732eb-9330-45d2-a6bd-e67dca2136d5",
|
|
8900
|
+
"signInApiSlice/SearchPractioner": "2fef3beb-6f38-48b0-955f-90f88dab2822",
|
|
8901
|
+
"VitalReadSearch": "8eefa71f-d48c-44a4-b5e1-e8271eb734d5",
|
|
8902
|
+
"VitalRead": "eebb32ae-0a5f-49b4-9484-41111ec83fa3",
|
|
8903
|
+
"getQDMDataType": "14a1a710-c539-494f-a405-49ca98c5950d",
|
|
8904
|
+
"generalMasterSearch": "92774963-ed7d-4bb7-a2fc-35e71668956b",
|
|
8905
|
+
"rcChargeRateSearch": "b6adb851-754e-4c7d-964f-b217e33945dd",
|
|
8906
|
+
"resOrderCatalogVitalCode": "493389da-6789-4ed0-89e4-a2d546025f1e",
|
|
8907
|
+
"gmLoadQuery": "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e",
|
|
8908
|
+
"signInApiSlice/getpermissiondata": "1a91eea3-8c88-4f78-87c1-fcd6af54e81f",
|
|
8909
|
+
"getAllergyList": "777aa602-1905-48d3-b1cd-db1cca7d7697",
|
|
8910
|
+
"getCodingmasterByType": "b283129b-9841-419b-bdfc-de5105ebbad7",
|
|
8911
|
+
"symptom_and_specialty_single_read": "b4157ebd-a966-4d06-8c02-7a9cf8e7f1f5",
|
|
8912
|
+
"symptom_and_specialty_read": "78c9fdd7-fd12-4d36-9729-88ea3174867c",
|
|
8913
|
+
"locationmasterFormId": "f9634cd2-a5c3-46e5-9486-4cc8fd1b42ed",
|
|
8914
|
+
"getformsDetails": "23c2ee00-7c17-4235-943d-dc9e65b7ded8",
|
|
8915
|
+
"getAgeRange": "c5a0a155-4fab-4397-92a9-b89ad94fe3fc",
|
|
8916
|
+
"getsearchDiagonsis": "16d56d62-980e-4f0f-9b4e-cb4ee50e99e9",
|
|
8917
|
+
"getdiagnosisListChild": "4646f218-21bb-43b0-8900-ecfae67e3df5",
|
|
8918
|
+
"diagnosisList": "07820016-0010-4c9f-b724-26018658c4b7",
|
|
8919
|
+
"vitalsEdit": "3f69846f-8758-498e-ab5e-a6f590dc5416",
|
|
8920
|
+
"ageRanges": "e1002f54-d214-4f8d-b535-28bcc67a3926",
|
|
8921
|
+
"vitalsMeasureCodesList": "2ef8a78f-086c-4ebe-a5ef-2be95c26f2fe",
|
|
8922
|
+
"vitalsApplicableList": "7d5ed06f-91a4-4822-b409-9b189e49f439",
|
|
8923
|
+
"vitalsApplicableEdit": "a27804ae-8f06-471a-9216-e846860e8b8a",
|
|
8924
|
+
"ageCategory": "313b0701-3354-4421-8951-488f8daec57b",
|
|
8925
|
+
"form_list": "fbcd603d-eaa3-471c-ae12-2572cdb49c0e",
|
|
8926
|
+
"geoMasterTypeRead": "b283129b-9841-419b-bdfc-de5105ebbad7",
|
|
8927
|
+
"geoHierarchicalRead": "ad647bcf-edcc-44ac-9ca9-67c3b277b8df",
|
|
8928
|
+
"geoCountryRead": "e2cb9d5c-3491-40da-8a5b-c8f90c39e286",
|
|
8929
|
+
"editGeoGraphicSingleRead": "be0b63d3-9d9a-46e3-8073-94a66c050541",
|
|
8930
|
+
"geoMasterParentCode": "063ee1f3-c2ea-4cb9-bcf5-75e434b7e583",
|
|
8931
|
+
"schedule_line_day": "95931016-caf1-413c-8bf5-96f05c5709fb"
|
|
8932
|
+
};
|
|
8933
|
+
|
|
8881
8934
|
var codingMasterTypes = ["ALTERNATEIDTYPE", "RELATIONSHIP", "NAMEPREFIX", "NAMESUFFIX", "GENDER", "USE", "PRACTTYPE", "LANGUAGE", "SPECIALTY", "ORGTYPE", "CONTACTSYSTEM", "PRIORITY", "ADDRESSTYPE", "PRACTROLE", "POSITION", "EMPSTATUS", "MARITALSTATUS"];
|
|
8882
8935
|
var typeToKeyMap = {
|
|
8883
8936
|
"ALTERNATEIDTYPE": ["id_type"],
|
|
@@ -8898,6 +8951,11 @@ var typeToKeyMap = {
|
|
|
8898
8951
|
"EMPSTATUS": ["employee_type"],
|
|
8899
8952
|
"MARITALSTATUS": ["marital_status"]
|
|
8900
8953
|
};
|
|
8954
|
+
var tables = {
|
|
8955
|
+
"GEOGRAPHIC_MASTER": "SMGeographicMaster",
|
|
8956
|
+
"FREQUENCY_MASTER": "FrequencyMaster",
|
|
8957
|
+
"GENERAL_MASTER": "CodingMaster"
|
|
8958
|
+
};
|
|
8901
8959
|
|
|
8902
8960
|
var codingMasterFilter = function codingMasterFilter(type) {
|
|
8903
8961
|
return {
|
|
@@ -8920,7 +8978,7 @@ var masterQuery$8 = {
|
|
|
8920
8978
|
var geoQuery = function geoQuery(display, geogLevelCode) {
|
|
8921
8979
|
return {
|
|
8922
8980
|
appcode: _dbName,
|
|
8923
|
-
requestid:
|
|
8981
|
+
requestid: query_ids.geoHierarchicalRead,
|
|
8924
8982
|
filter: _objectSpread2({
|
|
8925
8983
|
activestatus: true,
|
|
8926
8984
|
display: display
|
|
@@ -9743,52 +9801,6 @@ var practitionerMasterActions = {
|
|
|
9743
9801
|
};
|
|
9744
9802
|
var practitionerMasterSlice$1 = practitionerMasterSlice.reducer;
|
|
9745
9803
|
|
|
9746
|
-
var query_ids = {
|
|
9747
|
-
"scheduleManagementApiSlice/practitionerSlots": "562d7099-7b83-49ec-9bdc-364246ca185d",
|
|
9748
|
-
"slotApiSlice/readSlot": {
|
|
9749
|
-
practionerid: "30fcb559-96fb-48f6-a955-e47dd97bc851",
|
|
9750
|
-
clinicid: "30fcb559-96fb-48f6-a955-e47dd97bc951",
|
|
9751
|
-
query: function query(_ref) {
|
|
9752
|
-
var start = _ref.start,
|
|
9753
|
-
end = _ref.end,
|
|
9754
|
-
id = _ref.id;
|
|
9755
|
-
return {
|
|
9756
|
-
"db_name": dbName,
|
|
9757
|
-
"entity": "Schedule",
|
|
9758
|
-
"filter": "Schedule.start >= ".concat(start, " AND Schedule.end <= ").concat(end, " AND Schedule.activestatus == true AND DOCUMENT(Schedule.resourceCode).id == ").concat(id),
|
|
9759
|
-
"return_fields": "MERGE(Schedule, {slots : (FOR slt IN Slot FILTER Schedule.id IN slt.ScheduleID AND slt.status!='blocked' AND slt.start >= ".concat(moment.utc().unix(), " AND slt.activestatus==true sort slt._id asc RETURN merge(slt, {DayType: Document(slt.DayType)}))})")
|
|
9760
|
-
};
|
|
9761
|
-
}
|
|
9762
|
-
},
|
|
9763
|
-
"appointmentApiSlice/readAppointment": "0bfea3d4-fe24-43f9-b5b8-cf9ff4365fab",
|
|
9764
|
-
"slotAvailabilityApiSlice/slotAvailability": "c21732eb-9330-45d2-a6bd-e67dca2136d5",
|
|
9765
|
-
"signInApiSlice/SearchPractioner": "2fef3beb-6f38-48b0-955f-90f88dab2822",
|
|
9766
|
-
"VitalReadSearch": "8eefa71f-d48c-44a4-b5e1-e8271eb734d5",
|
|
9767
|
-
"VitalRead": "eebb32ae-0a5f-49b4-9484-41111ec83fa3",
|
|
9768
|
-
"getQDMDataType": "14a1a710-c539-494f-a405-49ca98c5950d",
|
|
9769
|
-
"generalMasterSearch": "92774963-ed7d-4bb7-a2fc-35e71668956b",
|
|
9770
|
-
"rcChargeRateSearch": "b6adb851-754e-4c7d-964f-b217e33945dd",
|
|
9771
|
-
"resOrderCatalogVitalCode": "493389da-6789-4ed0-89e4-a2d546025f1e",
|
|
9772
|
-
"gmLoadQuery": "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e",
|
|
9773
|
-
"signInApiSlice/getpermissiondata": "1a91eea3-8c88-4f78-87c1-fcd6af54e81f",
|
|
9774
|
-
"getAllergyList": "777aa602-1905-48d3-b1cd-db1cca7d7697",
|
|
9775
|
-
"getCodingmasterByType": "b283129b-9841-419b-bdfc-de5105ebbad7",
|
|
9776
|
-
"symptom_and_specialty_single_read": "b4157ebd-a966-4d06-8c02-7a9cf8e7f1f5",
|
|
9777
|
-
"symptom_and_specialty_read": "78c9fdd7-fd12-4d36-9729-88ea3174867c",
|
|
9778
|
-
"locationmasterFormId": "f9634cd2-a5c3-46e5-9486-4cc8fd1b42ed",
|
|
9779
|
-
"getformsDetails": "23c2ee00-7c17-4235-943d-dc9e65b7ded8",
|
|
9780
|
-
"getAgeRange": "c5a0a155-4fab-4397-92a9-b89ad94fe3fc",
|
|
9781
|
-
"getsearchDiagonsis": "16d56d62-980e-4f0f-9b4e-cb4ee50e99e9",
|
|
9782
|
-
"getdiagnosisListChild": "4646f218-21bb-43b0-8900-ecfae67e3df5",
|
|
9783
|
-
"diagnosisList": "07820016-0010-4c9f-b724-26018658c4b7",
|
|
9784
|
-
"vitalsEdit": "3f69846f-8758-498e-ab5e-a6f590dc5416",
|
|
9785
|
-
"ageRanges": "e1002f54-d214-4f8d-b535-28bcc67a3926",
|
|
9786
|
-
"vitalsMeasureCodesList": "2ef8a78f-086c-4ebe-a5ef-2be95c26f2fe",
|
|
9787
|
-
"vitalsApplicableList": "7d5ed06f-91a4-4822-b409-9b189e49f439",
|
|
9788
|
-
"vitalsApplicableEdit": "a27804ae-8f06-471a-9216-e846860e8b8a",
|
|
9789
|
-
"ageCategory": "313b0701-3354-4421-8951-488f8daec57b"
|
|
9790
|
-
};
|
|
9791
|
-
|
|
9792
9804
|
var getAgeRangeSort = function getAgeRangeSort(sort) {
|
|
9793
9805
|
switch (sort) {
|
|
9794
9806
|
case "Long Description":
|
|
@@ -10360,7 +10372,7 @@ var query$a = {
|
|
|
10360
10372
|
}
|
|
10361
10373
|
};
|
|
10362
10374
|
|
|
10363
|
-
var getRawId$
|
|
10375
|
+
var getRawId$3 = function getRawId(val) {
|
|
10364
10376
|
if (val === undefined || val === null) return "";
|
|
10365
10377
|
var str = String(val);
|
|
10366
10378
|
var slashIdx = str.lastIndexOf("/");
|
|
@@ -10547,7 +10559,7 @@ var generateApplicableReadResJson = function generateApplicableReadResJson() {
|
|
|
10547
10559
|
|
|
10548
10560
|
// Look up org name from the entity_name dropdown list loaded in state
|
|
10549
10561
|
var orgEntry = state === null || state === void 0 || (_state$entity_name = state.entity_name) === null || _state$entity_name === void 0 || (_state$entity_name = _state$entity_name.data) === null || _state$entity_name === void 0 ? void 0 : _state$entity_name.find(function (sys) {
|
|
10550
|
-
return getRawId$
|
|
10562
|
+
return getRawId$3(sys.value) === orgIdStr || getRawId$3(sys._id) === orgIdStr;
|
|
10551
10563
|
});
|
|
10552
10564
|
var orgName = (orgEntry === null || orgEntry === void 0 ? void 0 : orgEntry.label) || (orgEntry === null || orgEntry === void 0 ? void 0 : orgEntry.name) || orgIdStr;
|
|
10553
10565
|
|
|
@@ -10555,7 +10567,7 @@ var generateApplicableReadResJson = function generateApplicableReadResJson() {
|
|
|
10555
10567
|
var orgTypeRaw = v.orgentitytype || v.orgEntityType || v.OrgEntityType;
|
|
10556
10568
|
var orgTypeId = _typeof(orgTypeRaw) === "object" && orgTypeRaw !== null ? orgTypeRaw._id || orgTypeRaw.value || "" : String(orgTypeRaw || "");
|
|
10557
10569
|
var entityTypeVal = orgTypeId ? (state === null || state === void 0 || (_state$entity_type = state.entity_type) === null || _state$entity_type === void 0 || (_state$entity_type = _state$entity_type.data) === null || _state$entity_type === void 0 ? void 0 : _state$entity_type.find(function (sys) {
|
|
10558
|
-
return getRawId$
|
|
10570
|
+
return getRawId$3(sys.value) === getRawId$3(orgTypeId);
|
|
10559
10571
|
})) || {
|
|
10560
10572
|
_id: orgTypeId,
|
|
10561
10573
|
value: orgTypeId,
|
|
@@ -10576,9 +10588,9 @@ var generateApplicableReadResJson = function generateApplicableReadResJson() {
|
|
|
10576
10588
|
} else {
|
|
10577
10589
|
var _state$speciality_cod2, _state$speciality_cod3;
|
|
10578
10590
|
var foundSp = (state === null || state === void 0 || (_state$speciality_cod2 = state.speciality_code_org) === null || _state$speciality_cod2 === void 0 || (_state$speciality_cod2 = _state$speciality_cod2.data) === null || _state$speciality_cod2 === void 0 ? void 0 : _state$speciality_cod2.find(function (sys) {
|
|
10579
|
-
return getRawId$
|
|
10591
|
+
return getRawId$3(sys.value) === getRawId$3(firstSply);
|
|
10580
10592
|
})) || (state === null || state === void 0 || (_state$speciality_cod3 = state.speciality_code) === null || _state$speciality_cod3 === void 0 || (_state$speciality_cod3 = _state$speciality_cod3.data) === null || _state$speciality_cod3 === void 0 ? void 0 : _state$speciality_cod3.find(function (sys) {
|
|
10581
|
-
return getRawId$
|
|
10593
|
+
return getRawId$3(sys.value) === getRawId$3(firstSply);
|
|
10582
10594
|
}));
|
|
10583
10595
|
specialCodeVal = foundSp || (firstSply ? {
|
|
10584
10596
|
_id: String(v.spltycodeId || firstSply),
|
|
@@ -10597,7 +10609,7 @@ var generateApplicableReadResJson = function generateApplicableReadResJson() {
|
|
|
10597
10609
|
var _state$gender2;
|
|
10598
10610
|
var gIdStr = String(genderId).toLowerCase();
|
|
10599
10611
|
genderVal = (state === null || state === void 0 || (_state$gender2 = state.gender) === null || _state$gender2 === void 0 || (_state$gender2 = _state$gender2.data) === null || _state$gender2 === void 0 ? void 0 : _state$gender2.find(function (sys) {
|
|
10600
|
-
return getRawId$
|
|
10612
|
+
return getRawId$3(sys.value).toLowerCase() === gIdStr || String(sys.code).toLowerCase() === gIdStr || String(sys.label).toLowerCase() === gIdStr;
|
|
10601
10613
|
})) || null;
|
|
10602
10614
|
// Fallback: try matching by gender code if genderId doesn't match
|
|
10603
10615
|
var genderCodeStr = (firstGender === null || firstGender === void 0 ? void 0 : firstGender.code) || (firstGender === null || firstGender === void 0 ? void 0 : firstGender.display) || v.gender;
|
|
@@ -10605,7 +10617,7 @@ var generateApplicableReadResJson = function generateApplicableReadResJson() {
|
|
|
10605
10617
|
var _state$gender3;
|
|
10606
10618
|
var gCodeStr = String(genderCodeStr).toLowerCase();
|
|
10607
10619
|
genderVal = (state === null || state === void 0 || (_state$gender3 = state.gender) === null || _state$gender3 === void 0 || (_state$gender3 = _state$gender3.data) === null || _state$gender3 === void 0 ? void 0 : _state$gender3.find(function (sys) {
|
|
10608
|
-
return getRawId$
|
|
10620
|
+
return getRawId$3(sys.value).toLowerCase() === gCodeStr || String(sys.code).toLowerCase() === gCodeStr || String(sys.label).toLowerCase() === gCodeStr;
|
|
10609
10621
|
})) || null;
|
|
10610
10622
|
}
|
|
10611
10623
|
// If still not found, fallback to 'Other' option from the list
|
|
@@ -10622,11 +10634,11 @@ var generateApplicableReadResJson = function generateApplicableReadResJson() {
|
|
|
10622
10634
|
var ageRangeVal = null;
|
|
10623
10635
|
if (ageRangeIdRaw) {
|
|
10624
10636
|
var firstAgeRange = _typeof(ageRangeIdRaw) === "object" && ageRangeIdRaw !== null ? ageRangeIdRaw._id || ageRangeIdRaw.value || ageRangeIdRaw.id || ageRangeIdRaw.agerangecode || "" : ageRangeIdRaw;
|
|
10625
|
-
var cleanAgeRangeId = getRawId$
|
|
10637
|
+
var cleanAgeRangeId = getRawId$3(firstAgeRange);
|
|
10626
10638
|
if (cleanAgeRangeId) {
|
|
10627
10639
|
var _state$ageranges_code2;
|
|
10628
10640
|
ageRangeVal = (state === null || state === void 0 || (_state$ageranges_code2 = state.ageranges_code) === null || _state$ageranges_code2 === void 0 || (_state$ageranges_code2 = _state$ageranges_code2.data) === null || _state$ageranges_code2 === void 0 ? void 0 : _state$ageranges_code2.find(function (sys) {
|
|
10629
|
-
return getRawId$
|
|
10641
|
+
return getRawId$3(sys.value) === cleanAgeRangeId;
|
|
10630
10642
|
})) || null;
|
|
10631
10643
|
}
|
|
10632
10644
|
}
|
|
@@ -11553,19 +11565,19 @@ var query$9 = {
|
|
|
11553
11565
|
}
|
|
11554
11566
|
};
|
|
11555
11567
|
|
|
11556
|
-
var getRawId = function getRawId(val) {
|
|
11568
|
+
var getRawId$2 = function getRawId(val) {
|
|
11557
11569
|
if (val === undefined || val === null) return "";
|
|
11558
11570
|
var str = String(val);
|
|
11559
11571
|
var slashIdx = str.lastIndexOf("/");
|
|
11560
11572
|
return slashIdx !== -1 ? str.substring(slashIdx + 1) : str;
|
|
11561
11573
|
};
|
|
11562
11574
|
var mapUomToCodingMaster = function mapUomToCodingMaster(uomVal, codeableConcepts) {
|
|
11563
|
-
var idStr = getRawId(uomVal);
|
|
11575
|
+
var idStr = getRawId$2(uomVal);
|
|
11564
11576
|
var concept = (codeableConcepts || []).find(function (c) {
|
|
11565
|
-
return getRawId(c === null || c === void 0 ? void 0 : c._id) === idStr;
|
|
11577
|
+
return getRawId$2(c === null || c === void 0 ? void 0 : c._id) === idStr;
|
|
11566
11578
|
});
|
|
11567
11579
|
if (concept && Array.isArray(concept.coding) && concept.coding.length > 0) {
|
|
11568
|
-
return getRawId(concept.coding[0]);
|
|
11580
|
+
return getRawId$2(concept.coding[0]);
|
|
11569
11581
|
}
|
|
11570
11582
|
return idStr;
|
|
11571
11583
|
};
|
|
@@ -11574,14 +11586,14 @@ var categoryJson = function categoryJson(data, state, agecategory, codeableConce
|
|
|
11574
11586
|
var _state$reference_unit;
|
|
11575
11587
|
return {
|
|
11576
11588
|
category: agecategory.find(function (sys) {
|
|
11577
|
-
return getRawId(v._id) === getRawId(sys._id);
|
|
11589
|
+
return getRawId$2(v._id) === getRawId$2(sys._id);
|
|
11578
11590
|
}),
|
|
11579
11591
|
description: v.description,
|
|
11580
11592
|
ageMin: v.age_minimum,
|
|
11581
11593
|
ageMax: v.age_maximum,
|
|
11582
11594
|
unit: (((_state$reference_unit = state.reference_unit_allowed) === null || _state$reference_unit === void 0 ? void 0 : _state$reference_unit.data) || []).find(function (sys) {
|
|
11583
11595
|
var vUom = mapUomToCodingMaster(v.UOM || v.uom, codeableConcepts);
|
|
11584
|
-
return getRawId(vUom) === getRawId(sys.value);
|
|
11596
|
+
return getRawId$2(vUom) === getRawId$2(sys.value);
|
|
11585
11597
|
}),
|
|
11586
11598
|
normalMin: "",
|
|
11587
11599
|
normalMax: "",
|
|
@@ -11730,17 +11742,17 @@ var generateReadResJson = function generateReadResJson(data, state, ageCategory)
|
|
|
11730
11742
|
var generateReference = function generateReference(ref, state, ageCategory) {
|
|
11731
11743
|
var obj = {};
|
|
11732
11744
|
ref.forEach(function (element) {
|
|
11733
|
-
var ageRange = getRawId(element.agerangecode);
|
|
11745
|
+
var ageRange = getRawId$2(element.agerangecode);
|
|
11734
11746
|
if (ageRange in obj) {
|
|
11735
11747
|
var tableObj = {
|
|
11736
11748
|
_id: element._id,
|
|
11737
11749
|
category: ageCategory.find(function (sys) {
|
|
11738
|
-
return getRawId(element.agecategory) === getRawId(sys._id);
|
|
11750
|
+
return getRawId$2(element.agecategory) === getRawId$2(sys._id);
|
|
11739
11751
|
}),
|
|
11740
11752
|
ageMin: element.age_minimum,
|
|
11741
11753
|
ageMax: element.age_maximum,
|
|
11742
11754
|
unit: state.reference_unit_allowed.data.find(function (sys) {
|
|
11743
|
-
return getRawId(element.RefValUOM) === getRawId(sys.value);
|
|
11755
|
+
return getRawId$2(element.RefValUOM) === getRawId$2(sys.value);
|
|
11744
11756
|
}),
|
|
11745
11757
|
normalMin: element.normal_min,
|
|
11746
11758
|
normalMax: element.normal_max,
|
|
@@ -11751,25 +11763,25 @@ var generateReference = function generateReference(ref, state, ageCategory) {
|
|
|
11751
11763
|
} else {
|
|
11752
11764
|
obj[ageRange] = {
|
|
11753
11765
|
ageRange: state.reference_ageranges.data.find(function (sys) {
|
|
11754
|
-
return getRawId(element.agerangecode) === getRawId(sys.value);
|
|
11766
|
+
return getRawId$2(element.agerangecode) === getRawId$2(sys.value);
|
|
11755
11767
|
}),
|
|
11756
11768
|
gender: state.master_gender.data.find(function (sys) {
|
|
11757
|
-
return getRawId(element.gender) === getRawId(sys.value);
|
|
11769
|
+
return getRawId$2(element.gender) === getRawId$2(sys.value);
|
|
11758
11770
|
}),
|
|
11759
11771
|
Unit: state.reference_unit_allowed.data.find(function (sys) {
|
|
11760
|
-
return getRawId(element.UOM) === getRawId(sys.value);
|
|
11772
|
+
return getRawId$2(element.UOM) === getRawId$2(sys.value);
|
|
11761
11773
|
}),
|
|
11762
11774
|
table: []
|
|
11763
11775
|
};
|
|
11764
11776
|
var _tableObj = {
|
|
11765
11777
|
_id: element._id,
|
|
11766
11778
|
category: ageCategory.find(function (sys) {
|
|
11767
|
-
return getRawId(element.agecategory) === getRawId(sys._id);
|
|
11779
|
+
return getRawId$2(element.agecategory) === getRawId$2(sys._id);
|
|
11768
11780
|
}),
|
|
11769
11781
|
ageMin: element.age_minimum,
|
|
11770
11782
|
ageMax: element.age_maximum,
|
|
11771
11783
|
unit: state.reference_unit_allowed.data.find(function (sys) {
|
|
11772
|
-
return getRawId(element.RefValUOM) === getRawId(sys.value);
|
|
11784
|
+
return getRawId$2(element.RefValUOM) === getRawId$2(sys.value);
|
|
11773
11785
|
}),
|
|
11774
11786
|
normalMin: element.normal_min,
|
|
11775
11787
|
normalMax: element.normal_max,
|
|
@@ -42177,7 +42189,7 @@ var queries$3 = {
|
|
|
42177
42189
|
var filterType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "GEOCODE";
|
|
42178
42190
|
return {
|
|
42179
42191
|
appcode: dbName,
|
|
42180
|
-
requestid:
|
|
42192
|
+
requestid: query_ids.geoMasterTypeRead,
|
|
42181
42193
|
filter: {
|
|
42182
42194
|
type: filterType,
|
|
42183
42195
|
code: "",
|
|
@@ -42190,7 +42202,7 @@ var queries$3 = {
|
|
|
42190
42202
|
var parentCode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
42191
42203
|
return {
|
|
42192
42204
|
appcode: dbName,
|
|
42193
|
-
requestid:
|
|
42205
|
+
requestid: query_ids.geoHierarchicalRead,
|
|
42194
42206
|
filter: {
|
|
42195
42207
|
activestatus: true,
|
|
42196
42208
|
display: displayLevel.toUpperCase(),
|
|
@@ -42201,7 +42213,7 @@ var queries$3 = {
|
|
|
42201
42213
|
geoCountryRead: function geoCountryRead() {
|
|
42202
42214
|
return {
|
|
42203
42215
|
appcode: dbName,
|
|
42204
|
-
requestid:
|
|
42216
|
+
requestid: query_ids.geoCountryRead,
|
|
42205
42217
|
filter: {
|
|
42206
42218
|
Leveltype: "country",
|
|
42207
42219
|
activestatus: true
|
|
@@ -42211,7 +42223,7 @@ var queries$3 = {
|
|
|
42211
42223
|
geoStatusChange: function geoStatusChange(data) {
|
|
42212
42224
|
return [{
|
|
42213
42225
|
appcode: dbName,
|
|
42214
|
-
|
|
42226
|
+
collection: tables.GEOGRAPHIC_MASTER,
|
|
42215
42227
|
filter: {
|
|
42216
42228
|
_key: data._key
|
|
42217
42229
|
},
|
|
@@ -42226,7 +42238,7 @@ var queries$3 = {
|
|
|
42226
42238
|
editGeoGraphicSingleRead: function editGeoGraphicSingleRead(id) {
|
|
42227
42239
|
return {
|
|
42228
42240
|
appcode: dbName,
|
|
42229
|
-
requestid:
|
|
42241
|
+
requestid: query_ids.editGeoGraphicSingleRead,
|
|
42230
42242
|
filter: {
|
|
42231
42243
|
activestatus: true,
|
|
42232
42244
|
key: id || ""
|
|
@@ -42234,12 +42246,16 @@ var queries$3 = {
|
|
|
42234
42246
|
};
|
|
42235
42247
|
},
|
|
42236
42248
|
geoMasterParentCode: function geoMasterParentCode(id) {
|
|
42249
|
+
var rawId = id || "";
|
|
42250
|
+
if (rawId.includes("/")) {
|
|
42251
|
+
rawId = rawId.substring(rawId.lastIndexOf("/") + 1);
|
|
42252
|
+
}
|
|
42237
42253
|
return {
|
|
42238
42254
|
appcode: dbName,
|
|
42239
|
-
requestid:
|
|
42255
|
+
requestid: query_ids.geoMasterParentCode,
|
|
42240
42256
|
filter: {
|
|
42241
42257
|
activestatus: true,
|
|
42242
|
-
Leveltype:
|
|
42258
|
+
Leveltype: rawId,
|
|
42243
42259
|
code: ""
|
|
42244
42260
|
}
|
|
42245
42261
|
};
|
|
@@ -42249,7 +42265,7 @@ var queries$3 = {
|
|
|
42249
42265
|
geoLevelCode = _ref.geoLevelCode;
|
|
42250
42266
|
return {
|
|
42251
42267
|
appcode: dbName,
|
|
42252
|
-
requestid:
|
|
42268
|
+
requestid: query_ids.geoMasterParentCode,
|
|
42253
42269
|
filter: {
|
|
42254
42270
|
Leveltype: levelType,
|
|
42255
42271
|
code: geoLevelCode,
|
|
@@ -42259,19 +42275,25 @@ var queries$3 = {
|
|
|
42259
42275
|
}
|
|
42260
42276
|
};
|
|
42261
42277
|
|
|
42278
|
+
var getRawId$1 = function getRawId(val) {
|
|
42279
|
+
if (val === undefined || val === null) return null;
|
|
42280
|
+
var str = String(val);
|
|
42281
|
+
var slashIdx = str.lastIndexOf("/");
|
|
42282
|
+
return slashIdx !== -1 ? str.substring(slashIdx + 1) : str;
|
|
42283
|
+
};
|
|
42262
42284
|
var generateJson = function generateJson(data) {
|
|
42263
|
-
var _data$id, _data$type, _data$code, _data$name, _data$parentType, _ref, _data$parentCode$valu, _data$parentCode, _data$status, _data$geolocationISD;
|
|
42285
|
+
var _data$id, _data$type, _data$code, _data$name, _data$parentType, _ref, _data$parentCode$valu, _data$parentCode, _ref2, _data$parentCode$valu2, _data$parentCode2, _data$status, _data$geolocationISD;
|
|
42264
42286
|
var isEdit = !!data._key;
|
|
42265
42287
|
var doc = _objectSpread2(_objectSpread2(_objectSpread2({}, isEdit && data._id && data._id !== "" ? {
|
|
42266
42288
|
_id: data._id
|
|
42267
42289
|
} : {}), !isEdit ? {
|
|
42268
42290
|
id: ((_data$id = data.id) === null || _data$id === void 0 ? void 0 : _data$id.toString()) || ""
|
|
42269
42291
|
} : {}), {}, {
|
|
42270
|
-
geogLevelType: (_data$type = data.type) !== null && _data$type !== void 0 && _data$type.value ? data.type.value : null,
|
|
42292
|
+
geogLevelType: (_data$type = data.type) !== null && _data$type !== void 0 && _data$type.value ? getRawId$1(data.type.value) : null,
|
|
42271
42293
|
geogLevelCode: ((_data$code = data.code) !== null && _data$code !== void 0 ? _data$code : "").trim() || null,
|
|
42272
42294
|
geogLevelName: ((_data$name = data.name) !== null && _data$name !== void 0 ? _data$name : "").trim() || null,
|
|
42273
|
-
parentGeogLevelType: (_data$parentType = data.parentType) !== null && _data$parentType !== void 0 && _data$parentType.value ? data.parentType.value : null,
|
|
42274
|
-
parentGeogLevelCode: ((_ref = (_data$parentCode$valu = (_data$parentCode = data.parentCode) === null || _data$parentCode === void 0 ? void 0 : _data$parentCode.value) !== null && _data$parentCode$valu !== void 0 ? _data$parentCode$valu : data.parentCode) !== null && _ref !== void 0 ? _ref : "").trim() || null,
|
|
42295
|
+
parentGeogLevelType: (_data$parentType = data.parentType) !== null && _data$parentType !== void 0 && _data$parentType.value ? getRawId$1(data.parentType.value) : null,
|
|
42296
|
+
parentGeogLevelCode: ((_ref = (_data$parentCode$valu = (_data$parentCode = data.parentCode) === null || _data$parentCode === void 0 ? void 0 : _data$parentCode.value) !== null && _data$parentCode$valu !== void 0 ? _data$parentCode$valu : data.parentCode) !== null && _ref !== void 0 ? _ref : "").trim() ? getRawId$1((_ref2 = (_data$parentCode$valu2 = (_data$parentCode2 = data.parentCode) === null || _data$parentCode2 === void 0 ? void 0 : _data$parentCode2.value) !== null && _data$parentCode$valu2 !== void 0 ? _data$parentCode$valu2 : data.parentCode) !== null && _ref2 !== void 0 ? _ref2 : "") : null,
|
|
42275
42297
|
active: (_data$status = data.status) !== null && _data$status !== void 0 ? _data$status : true,
|
|
42276
42298
|
GeoLocationISDCode: ((_data$geolocationISD = data.geolocationISD) !== null && _data$geolocationISD !== void 0 ? _data$geolocationISD : "").trim() || null
|
|
42277
42299
|
});
|
|
@@ -42282,7 +42304,7 @@ var generateJson = function generateJson(data) {
|
|
|
42282
42304
|
});
|
|
42283
42305
|
var payloadItem = {
|
|
42284
42306
|
appcode: dbName,
|
|
42285
|
-
|
|
42307
|
+
collection: tables.GEOGRAPHIC_MASTER,
|
|
42286
42308
|
is_metadata: true,
|
|
42287
42309
|
metadataId: metaDataId$1,
|
|
42288
42310
|
metadata_dbname: metaDatadbName$1,
|
|
@@ -42296,28 +42318,84 @@ var generateJson = function generateJson(data) {
|
|
|
42296
42318
|
return [payloadItem];
|
|
42297
42319
|
};
|
|
42298
42320
|
|
|
42321
|
+
var getRawId = function getRawId(val) {
|
|
42322
|
+
if (val === undefined || val === null) return "";
|
|
42323
|
+
var str = String(val);
|
|
42324
|
+
var slashIdx = str.lastIndexOf("/");
|
|
42325
|
+
return slashIdx !== -1 ? str.substring(slashIdx + 1) : str;
|
|
42326
|
+
};
|
|
42327
|
+
|
|
42299
42328
|
//EDIT READ JSON
|
|
42300
42329
|
var generateReadJSON = function generateReadJSON(val, state) {
|
|
42301
|
-
var _val$geogLevelType, _val$
|
|
42330
|
+
var _val$geogLevelType, _val$parentGeogLevelT, _val$parentGeogLevelC, _ref, _val$GeoLocationISDCo, _ref2, _val$geogLevelCode, _ref3, _val$geogLevelName, _val$_id, _val$id, _ref4, _val$_key, _val$active;
|
|
42331
|
+
if (!val) return {};
|
|
42332
|
+
|
|
42333
|
+
// Extract type
|
|
42334
|
+
var typeObj = (_val$geogLevelType = val.geogLevelType) !== null && _val$geogLevelType !== void 0 ? _val$geogLevelType : val.geogleveltype;
|
|
42335
|
+
var typeOpt = "";
|
|
42336
|
+
if (typeObj) {
|
|
42337
|
+
if (_typeof(typeObj) === "object") {
|
|
42338
|
+
var typeId = getRawId(typeObj._id || typeObj.id);
|
|
42339
|
+
typeOpt = {
|
|
42340
|
+
value: "".concat(tables.GENERAL_MASTER, "/").concat(typeId),
|
|
42341
|
+
label: typeObj.display || typeObj.shortdesc || typeObj.label || ""
|
|
42342
|
+
};
|
|
42343
|
+
} else {
|
|
42344
|
+
var _typeId = getRawId(typeObj);
|
|
42345
|
+
typeOpt = {
|
|
42346
|
+
value: "".concat(tables.GENERAL_MASTER, "/").concat(_typeId),
|
|
42347
|
+
label: ""
|
|
42348
|
+
};
|
|
42349
|
+
}
|
|
42350
|
+
}
|
|
42351
|
+
|
|
42352
|
+
// Extract parentType
|
|
42353
|
+
var parentTypeObj = (_val$parentGeogLevelT = val.parentGeogLevelType) !== null && _val$parentGeogLevelT !== void 0 ? _val$parentGeogLevelT : val.parentgeogleveltype;
|
|
42354
|
+
var parentTypeOpt = "";
|
|
42355
|
+
if (parentTypeObj) {
|
|
42356
|
+
if (_typeof(parentTypeObj) === "object") {
|
|
42357
|
+
var parentTypeId = getRawId(parentTypeObj._id || parentTypeObj.id);
|
|
42358
|
+
parentTypeOpt = {
|
|
42359
|
+
value: "".concat(tables.GENERAL_MASTER, "/").concat(parentTypeId),
|
|
42360
|
+
label: parentTypeObj.display || parentTypeObj.shortdesc || parentTypeObj.label || ""
|
|
42361
|
+
};
|
|
42362
|
+
} else {
|
|
42363
|
+
var _parentTypeId = getRawId(parentTypeObj);
|
|
42364
|
+
parentTypeOpt = {
|
|
42365
|
+
value: "".concat(tables.GENERAL_MASTER, "/").concat(_parentTypeId),
|
|
42366
|
+
label: ""
|
|
42367
|
+
};
|
|
42368
|
+
}
|
|
42369
|
+
}
|
|
42370
|
+
|
|
42371
|
+
// Extract parentCode
|
|
42372
|
+
var parentCodeObj = (_val$parentGeogLevelC = val.parentGeogLevelCode) !== null && _val$parentGeogLevelC !== void 0 ? _val$parentGeogLevelC : val.parentgeoglevelcode;
|
|
42373
|
+
var parentCodeOpt = "";
|
|
42374
|
+
if (parentCodeObj) {
|
|
42375
|
+
if (_typeof(parentCodeObj) === "object") {
|
|
42376
|
+
var parentCodeId = getRawId(parentCodeObj._id || parentCodeObj.id);
|
|
42377
|
+
parentCodeOpt = {
|
|
42378
|
+
value: "".concat(tables.GEOGRAPHIC_MASTER, "/").concat(parentCodeId),
|
|
42379
|
+
label: parentCodeObj.geogLevelName || parentCodeObj.display || parentCodeObj.shortdesc || parentCodeObj.label || ""
|
|
42380
|
+
};
|
|
42381
|
+
} else {
|
|
42382
|
+
var _parentCodeId = getRawId(parentCodeObj);
|
|
42383
|
+
parentCodeOpt = {
|
|
42384
|
+
value: "".concat(tables.GEOGRAPHIC_MASTER, "/").concat(_parentCodeId),
|
|
42385
|
+
label: ""
|
|
42386
|
+
};
|
|
42387
|
+
}
|
|
42388
|
+
}
|
|
42302
42389
|
var json = {
|
|
42303
|
-
type:
|
|
42304
|
-
|
|
42305
|
-
|
|
42306
|
-
|
|
42307
|
-
|
|
42308
|
-
|
|
42309
|
-
name: (_val$geogLevelName = val.geogLevelName) !== null && _val$geogLevelName !== void 0 ? _val$geogLevelName : "",
|
|
42310
|
-
parentType: val.parentGeogLevelType && (_val$parentGeogLevelT = val.parentGeogLevelType) !== null && _val$parentGeogLevelT !== void 0 && _val$parentGeogLevelT._id ? {
|
|
42311
|
-
value: (_val$parentGeogLevelT2 = (_val$parentGeogLevelT3 = val.parentGeogLevelType) === null || _val$parentGeogLevelT3 === void 0 ? void 0 : _val$parentGeogLevelT3._id) !== null && _val$parentGeogLevelT2 !== void 0 ? _val$parentGeogLevelT2 : "",
|
|
42312
|
-
label: (_val$parentGeogLevelT4 = (_val$parentGeogLevelT5 = val.parentGeogLevelType) === null || _val$parentGeogLevelT5 === void 0 ? void 0 : _val$parentGeogLevelT5.display) !== null && _val$parentGeogLevelT4 !== void 0 ? _val$parentGeogLevelT4 : ""
|
|
42313
|
-
} : "",
|
|
42314
|
-
parentCode: val.parentGeogLevelCode && (_val$parentGeogLevelC = val.parentGeogLevelCode) !== null && _val$parentGeogLevelC !== void 0 && _val$parentGeogLevelC._id ? {
|
|
42315
|
-
value: (_val$parentGeogLevelC2 = (_val$parentGeogLevelC3 = val.parentGeogLevelCode) === null || _val$parentGeogLevelC3 === void 0 ? void 0 : _val$parentGeogLevelC3._id) !== null && _val$parentGeogLevelC2 !== void 0 ? _val$parentGeogLevelC2 : "",
|
|
42316
|
-
label: (_val$parentGeogLevelC4 = (_val$parentGeogLevelC5 = val.parentGeogLevelCode) === null || _val$parentGeogLevelC5 === void 0 ? void 0 : _val$parentGeogLevelC5.geogLevelName) !== null && _val$parentGeogLevelC4 !== void 0 ? _val$parentGeogLevelC4 : ""
|
|
42317
|
-
} : "",
|
|
42390
|
+
type: typeOpt,
|
|
42391
|
+
geolocationISD: (_ref = (_val$GeoLocationISDCo = val.GeoLocationISDCode) !== null && _val$GeoLocationISDCo !== void 0 ? _val$GeoLocationISDCo : val.geolocationisdcode) !== null && _ref !== void 0 ? _ref : "",
|
|
42392
|
+
code: (_ref2 = (_val$geogLevelCode = val.geogLevelCode) !== null && _val$geogLevelCode !== void 0 ? _val$geogLevelCode : val.geoglevelcode) !== null && _ref2 !== void 0 ? _ref2 : "",
|
|
42393
|
+
name: (_ref3 = (_val$geogLevelName = val.geogLevelName) !== null && _val$geogLevelName !== void 0 ? _val$geogLevelName : val.geoglevelname) !== null && _ref3 !== void 0 ? _ref3 : "",
|
|
42394
|
+
parentType: parentTypeOpt,
|
|
42395
|
+
parentCode: parentCodeOpt,
|
|
42318
42396
|
_id: (_val$_id = val._id) !== null && _val$_id !== void 0 ? _val$_id : "",
|
|
42319
42397
|
id: (_val$id = val.id) !== null && _val$id !== void 0 ? _val$id : "",
|
|
42320
|
-
_key: (_val$_key = val._key) !== null && _val$_key !== void 0 ? _val$_key : "",
|
|
42398
|
+
_key: (_ref4 = (_val$_key = val._key) !== null && _val$_key !== void 0 ? _val$_key : val._id) !== null && _ref4 !== void 0 ? _ref4 : "",
|
|
42321
42399
|
status: (_val$active = val.active) !== null && _val$active !== void 0 ? _val$active : ""
|
|
42322
42400
|
};
|
|
42323
42401
|
return json;
|
|
@@ -42809,6 +42887,7 @@ var GEOGRAPHIC_SINGLE_READ = createAsyncThunk("geographicSlice/geoGraphicSingleR
|
|
|
42809
42887
|
_key,
|
|
42810
42888
|
state,
|
|
42811
42889
|
data,
|
|
42890
|
+
singleItem,
|
|
42812
42891
|
res,
|
|
42813
42892
|
_args11 = arguments,
|
|
42814
42893
|
_t11;
|
|
@@ -42827,7 +42906,8 @@ var GEOGRAPHIC_SINGLE_READ = createAsyncThunk("geographicSlice/geoGraphicSingleR
|
|
|
42827
42906
|
}, __baseUrl__$1);
|
|
42828
42907
|
case 2:
|
|
42829
42908
|
data = _context11.v;
|
|
42830
|
-
|
|
42909
|
+
singleItem = Array.isArray(data === null || data === void 0 ? void 0 : data.result) ? data.result[0] : Array.isArray(data) ? data[0] : data;
|
|
42910
|
+
res = generateReadJSON(singleItem);
|
|
42831
42911
|
return _context11.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
42832
42912
|
data: res
|
|
42833
42913
|
}));
|
|
@@ -43890,7 +43970,7 @@ var queries$1 = {
|
|
|
43890
43970
|
}
|
|
43891
43971
|
})];
|
|
43892
43972
|
},
|
|
43893
|
-
|
|
43973
|
+
form_upsert: function form_upsert(data) {
|
|
43894
43974
|
var filter = {};
|
|
43895
43975
|
if (data._key) {
|
|
43896
43976
|
filter = {
|
|
@@ -43905,21 +43985,35 @@ var queries$1 = {
|
|
|
43905
43985
|
}, filter), {}, {
|
|
43906
43986
|
is_metadata: false,
|
|
43907
43987
|
doc: {
|
|
43908
|
-
_id: data._id,
|
|
43988
|
+
_id: data._id || "",
|
|
43909
43989
|
form_id: data.form_id,
|
|
43910
43990
|
form_name: data.form_name,
|
|
43911
43991
|
form_type_id: data.form_type_id,
|
|
43992
|
+
is_active: data.is_active,
|
|
43993
|
+
attachment: data.attachment || null,
|
|
43912
43994
|
assessment: data.assessment
|
|
43913
43995
|
}
|
|
43914
43996
|
})];
|
|
43915
43997
|
},
|
|
43916
|
-
|
|
43998
|
+
form_list: function form_list(offset, count, search) {
|
|
43999
|
+
return {
|
|
44000
|
+
appcode: dbName,
|
|
44001
|
+
// TODO: Update requestid after creating the FORM_LIST query in QDM Query Tool
|
|
44002
|
+
requestid: query_ids.form_list,
|
|
44003
|
+
filter: {
|
|
44004
|
+
search: "".concat(search !== null && search !== void 0 ? search : ""),
|
|
44005
|
+
offset: offset !== null && offset !== void 0 ? offset : 0,
|
|
44006
|
+
count: count !== null && count !== void 0 ? count : 10
|
|
44007
|
+
}
|
|
44008
|
+
};
|
|
44009
|
+
},
|
|
44010
|
+
form_read: function form_read(form_id) {
|
|
43917
44011
|
return {
|
|
43918
44012
|
appcode: dbName,
|
|
44013
|
+
requestid: query_ids.getformsDetails,
|
|
43919
44014
|
filter: {
|
|
43920
44015
|
_id: form_id
|
|
43921
|
-
}
|
|
43922
|
-
requestid: query_ids.getformsDetails
|
|
44016
|
+
}
|
|
43923
44017
|
};
|
|
43924
44018
|
}
|
|
43925
44019
|
};
|
|
@@ -44227,7 +44321,7 @@ var GUIDELINE_UPSERT = createAsyncThunk("symptomAndSpecialtySlice/guideline_upse
|
|
|
44227
44321
|
payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
44228
44322
|
_ref10 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
|
|
44229
44323
|
_context6.p = 1;
|
|
44230
|
-
queriesjson = queries$1.
|
|
44324
|
+
queriesjson = queries$1.form_upsert(payload);
|
|
44231
44325
|
_context6.n = 2;
|
|
44232
44326
|
return fetchData({
|
|
44233
44327
|
body: JSON.stringify(queriesjson)
|
|
@@ -44261,7 +44355,7 @@ var GUIDELINE_READ = createAsyncThunk("symptomAndSpecialtySlice/guideline_read",
|
|
|
44261
44355
|
payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
|
44262
44356
|
_ref12 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref12.rejectWithValue;
|
|
44263
44357
|
_context7.p = 1;
|
|
44264
|
-
queriesjson = queries$1.
|
|
44358
|
+
queriesjson = queries$1.form_read(payload.form_id);
|
|
44265
44359
|
_context7.n = 2;
|
|
44266
44360
|
return fetchData({
|
|
44267
44361
|
body: JSON.stringify(queriesjson)
|
|
@@ -44282,6 +44376,133 @@ var GUIDELINE_READ = createAsyncThunk("symptomAndSpecialtySlice/guideline_read",
|
|
|
44282
44376
|
}
|
|
44283
44377
|
}, _callee7, null, [[1, 3]]);
|
|
44284
44378
|
})));
|
|
44379
|
+
|
|
44380
|
+
/* ── FORM_UPSERT ── */
|
|
44381
|
+
var FORM_UPSERT = createAsyncThunk("symptomAndSpecialtySlice/form_upsert", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
|
|
44382
|
+
var payload,
|
|
44383
|
+
_ref14,
|
|
44384
|
+
rejectWithValue,
|
|
44385
|
+
queriesjson,
|
|
44386
|
+
data,
|
|
44387
|
+
_args8 = arguments,
|
|
44388
|
+
_t8;
|
|
44389
|
+
return _regenerator().w(function (_context8) {
|
|
44390
|
+
while (1) switch (_context8.p = _context8.n) {
|
|
44391
|
+
case 0:
|
|
44392
|
+
payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
44393
|
+
_ref14 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref14.rejectWithValue;
|
|
44394
|
+
_context8.p = 1;
|
|
44395
|
+
queriesjson = queries$1.form_upsert(payload);
|
|
44396
|
+
_context8.n = 2;
|
|
44397
|
+
return fetchData({
|
|
44398
|
+
body: JSON.stringify(queriesjson)
|
|
44399
|
+
}, __uspsertUrl__);
|
|
44400
|
+
case 2:
|
|
44401
|
+
data = _context8.v;
|
|
44402
|
+
return _context8.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
44403
|
+
data: data
|
|
44404
|
+
}));
|
|
44405
|
+
case 3:
|
|
44406
|
+
_context8.p = 3;
|
|
44407
|
+
_t8 = _context8.v;
|
|
44408
|
+
return _context8.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
44409
|
+
message: _t8.message
|
|
44410
|
+
})));
|
|
44411
|
+
}
|
|
44412
|
+
}, _callee8, null, [[1, 3]]);
|
|
44413
|
+
})));
|
|
44414
|
+
|
|
44415
|
+
/* ── FORM_LIST ── */
|
|
44416
|
+
var FORM_LIST = createAsyncThunk("symptomAndSpecialtySlice/form_list", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9() {
|
|
44417
|
+
var payload,
|
|
44418
|
+
_ref16,
|
|
44419
|
+
rejectWithValue,
|
|
44420
|
+
queriesjson,
|
|
44421
|
+
data,
|
|
44422
|
+
arry,
|
|
44423
|
+
_args9 = arguments,
|
|
44424
|
+
_t9;
|
|
44425
|
+
return _regenerator().w(function (_context9) {
|
|
44426
|
+
while (1) switch (_context9.p = _context9.n) {
|
|
44427
|
+
case 0:
|
|
44428
|
+
payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
|
|
44429
|
+
_ref16 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref16.rejectWithValue;
|
|
44430
|
+
_context9.p = 1;
|
|
44431
|
+
queriesjson = queries$1.form_list(payload.offset, payload.count, payload.search);
|
|
44432
|
+
_context9.n = 2;
|
|
44433
|
+
return fetchData({
|
|
44434
|
+
body: JSON.stringify(queriesjson)
|
|
44435
|
+
}, __baseUrl__$1);
|
|
44436
|
+
case 2:
|
|
44437
|
+
data = _context9.v;
|
|
44438
|
+
arry = [];
|
|
44439
|
+
if (Array.isArray(data)) {
|
|
44440
|
+
data.forEach(function (val) {
|
|
44441
|
+
if (val.form_id || val._key) {
|
|
44442
|
+
var _val$TotalCount, _val$_id3, _val$_key, _val$form_id, _val$form_name, _val$form_type_id, _val$attachment;
|
|
44443
|
+
arry.push({
|
|
44444
|
+
TotalCount: (_val$TotalCount = val.TotalCount) !== null && _val$TotalCount !== void 0 ? _val$TotalCount : 0,
|
|
44445
|
+
_id: (_val$_id3 = val._id) !== null && _val$_id3 !== void 0 ? _val$_id3 : "",
|
|
44446
|
+
_key: (_val$_key = val._key) !== null && _val$_key !== void 0 ? _val$_key : "",
|
|
44447
|
+
form_id: (_val$form_id = val.form_id) !== null && _val$form_id !== void 0 ? _val$form_id : "",
|
|
44448
|
+
form_name: (_val$form_name = val.form_name) !== null && _val$form_name !== void 0 ? _val$form_name : "",
|
|
44449
|
+
form_type_id: (_val$form_type_id = val.form_type_id) !== null && _val$form_type_id !== void 0 ? _val$form_type_id : "",
|
|
44450
|
+
is_active: val.is_active,
|
|
44451
|
+
assessment: val.assessment,
|
|
44452
|
+
attachment: (_val$attachment = val.attachment) !== null && _val$attachment !== void 0 ? _val$attachment : null
|
|
44453
|
+
});
|
|
44454
|
+
}
|
|
44455
|
+
});
|
|
44456
|
+
}
|
|
44457
|
+
return _context9.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
44458
|
+
data: arry
|
|
44459
|
+
}));
|
|
44460
|
+
case 3:
|
|
44461
|
+
_context9.p = 3;
|
|
44462
|
+
_t9 = _context9.v;
|
|
44463
|
+
return _context9.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
44464
|
+
message: _t9.message
|
|
44465
|
+
})));
|
|
44466
|
+
}
|
|
44467
|
+
}, _callee9, null, [[1, 3]]);
|
|
44468
|
+
})));
|
|
44469
|
+
|
|
44470
|
+
/* ── FORM_READ ── */
|
|
44471
|
+
var FORM_READ = createAsyncThunk("symptomAndSpecialtySlice/form_read", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0() {
|
|
44472
|
+
var payload,
|
|
44473
|
+
_ref18,
|
|
44474
|
+
rejectWithValue,
|
|
44475
|
+
queriesjson,
|
|
44476
|
+
data,
|
|
44477
|
+
record,
|
|
44478
|
+
_args0 = arguments,
|
|
44479
|
+
_t0;
|
|
44480
|
+
return _regenerator().w(function (_context0) {
|
|
44481
|
+
while (1) switch (_context0.p = _context0.n) {
|
|
44482
|
+
case 0:
|
|
44483
|
+
payload = _args0.length > 0 && _args0[0] !== undefined ? _args0[0] : {};
|
|
44484
|
+
_ref18 = _args0.length > 1 ? _args0[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
|
|
44485
|
+
_context0.p = 1;
|
|
44486
|
+
queriesjson = queries$1.form_read(payload.form_id);
|
|
44487
|
+
_context0.n = 2;
|
|
44488
|
+
return fetchData({
|
|
44489
|
+
body: JSON.stringify(queriesjson)
|
|
44490
|
+
}, __baseUrl__$1);
|
|
44491
|
+
case 2:
|
|
44492
|
+
data = _context0.v;
|
|
44493
|
+
record = Array.isArray(data) ? data[0] : null;
|
|
44494
|
+
return _context0.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
44495
|
+
data: record
|
|
44496
|
+
}));
|
|
44497
|
+
case 3:
|
|
44498
|
+
_context0.p = 3;
|
|
44499
|
+
_t0 = _context0.v;
|
|
44500
|
+
return _context0.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
44501
|
+
message: _t0.message
|
|
44502
|
+
})));
|
|
44503
|
+
}
|
|
44504
|
+
}, _callee0, null, [[1, 3]]);
|
|
44505
|
+
})));
|
|
44285
44506
|
var symptomAndSpecialtySlice = createSlice({
|
|
44286
44507
|
name: "symptomAndSpecialtySlice",
|
|
44287
44508
|
initialState: {
|
|
@@ -44291,7 +44512,10 @@ var symptomAndSpecialtySlice = createSlice({
|
|
|
44291
44512
|
symptom_and_specialty_upsert: _objectSpread2({}, defaultState.List),
|
|
44292
44513
|
symptom_and_specialty_master: _objectSpread2({}, defaultState.List),
|
|
44293
44514
|
guideline_upsert: _objectSpread2({}, defaultState.List),
|
|
44294
|
-
guideline_read: _objectSpread2({}, defaultState.List)
|
|
44515
|
+
guideline_read: _objectSpread2({}, defaultState.List),
|
|
44516
|
+
form_upsert: _objectSpread2({}, defaultState.List),
|
|
44517
|
+
form_list: _objectSpread2({}, defaultState.List),
|
|
44518
|
+
form_read: _objectSpread2({}, defaultState.List)
|
|
44295
44519
|
},
|
|
44296
44520
|
extraReducers: (_extraReducers$4 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extraReducers$4, SYMPTOM_AND_SPECIALTY_STATUS_CHANGE.fulfilled, function (state, action) {
|
|
44297
44521
|
state.symptom_and_specialty_status_update.loading = false, state.symptom_and_specialty_status_update.error = false, state.symptom_and_specialty_status_update = action.payload;
|
|
@@ -44346,10 +44570,43 @@ var symptomAndSpecialtySlice = createSlice({
|
|
|
44346
44570
|
}), GUIDELINE_READ.pending, function (state) {
|
|
44347
44571
|
state.guideline_read.loading = true;
|
|
44348
44572
|
state.guideline_read.error = false;
|
|
44349
|
-
}), _defineProperty(_extraReducers$4, GUIDELINE_READ.rejected, function (state, action) {
|
|
44573
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extraReducers$4, GUIDELINE_READ.rejected, function (state, action) {
|
|
44350
44574
|
state.guideline_read.loading = false;
|
|
44351
44575
|
state.guideline_read.error = true;
|
|
44352
44576
|
state.guideline_read = action.payload;
|
|
44577
|
+
}), FORM_UPSERT.fulfilled, function (state, action) {
|
|
44578
|
+
state.form_upsert.loading = false;
|
|
44579
|
+
state.form_upsert.error = false;
|
|
44580
|
+
state.form_upsert = action.payload;
|
|
44581
|
+
}), FORM_UPSERT.pending, function (state) {
|
|
44582
|
+
state.form_upsert.loading = true;
|
|
44583
|
+
state.form_upsert.error = false;
|
|
44584
|
+
}), FORM_UPSERT.rejected, function (state, action) {
|
|
44585
|
+
state.form_upsert.loading = false;
|
|
44586
|
+
state.form_upsert.error = true;
|
|
44587
|
+
state.form_upsert = action.payload;
|
|
44588
|
+
}), FORM_LIST.fulfilled, function (state, action) {
|
|
44589
|
+
state.form_list.loading = false;
|
|
44590
|
+
state.form_list.error = false;
|
|
44591
|
+
state.form_list = action.payload;
|
|
44592
|
+
}), FORM_LIST.pending, function (state) {
|
|
44593
|
+
state.form_list.loading = true;
|
|
44594
|
+
state.form_list.error = false;
|
|
44595
|
+
}), FORM_LIST.rejected, function (state, action) {
|
|
44596
|
+
state.form_list.loading = false;
|
|
44597
|
+
state.form_list.error = true;
|
|
44598
|
+
state.form_list = action.payload;
|
|
44599
|
+
}), FORM_READ.fulfilled, function (state, action) {
|
|
44600
|
+
state.form_read.loading = false;
|
|
44601
|
+
state.form_read.error = false;
|
|
44602
|
+
state.form_read = action.payload;
|
|
44603
|
+
}), FORM_READ.pending, function (state) {
|
|
44604
|
+
state.form_read.loading = true;
|
|
44605
|
+
state.form_read.error = false;
|
|
44606
|
+
}), FORM_READ.rejected, function (state, action) {
|
|
44607
|
+
state.form_read.loading = false;
|
|
44608
|
+
state.form_read.error = true;
|
|
44609
|
+
state.form_read = action.payload;
|
|
44353
44610
|
}))
|
|
44354
44611
|
});
|
|
44355
44612
|
var symptomAndSpecialtyActions = {
|
|
@@ -44359,7 +44616,10 @@ var symptomAndSpecialtyActions = {
|
|
|
44359
44616
|
SYMPTOM_AND_SPECIALTY_UPSERT: SYMPTOM_AND_SPECIALTY_UPSERT,
|
|
44360
44617
|
SYMPTOM_AND_SPECIALTY_SINGLE_READ: SYMPTOM_AND_SPECIALTY_SINGLE_READ,
|
|
44361
44618
|
GUIDELINE_UPSERT: GUIDELINE_UPSERT,
|
|
44362
|
-
GUIDELINE_READ: GUIDELINE_READ
|
|
44619
|
+
GUIDELINE_READ: GUIDELINE_READ,
|
|
44620
|
+
FORM_UPSERT: FORM_UPSERT,
|
|
44621
|
+
FORM_LIST: FORM_LIST,
|
|
44622
|
+
FORM_READ: FORM_READ
|
|
44363
44623
|
};
|
|
44364
44624
|
var symptomAndSpecialtySlice$1 = symptomAndSpecialtySlice.reducer;
|
|
44365
44625
|
|
|
@@ -47536,7 +47796,7 @@ var addnewfrequency_orgfrequencymaster_uom_dropdown = createAsyncThunk("frequenc
|
|
|
47536
47796
|
}());
|
|
47537
47797
|
var EditNewFrequency_orgbase_frequency_dropdown = createAsyncThunk("frequencyMasterSlice/EditNewFrequency_orgbase_frequency_dropdown", /*#__PURE__*/function () {
|
|
47538
47798
|
var _ref10 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(payload, _ref1) {
|
|
47539
|
-
var rejectWithValue, data, _t6;
|
|
47799
|
+
var rejectWithValue, data, resultList, arr, _t6;
|
|
47540
47800
|
return _regenerator().w(function (_context6) {
|
|
47541
47801
|
while (1) switch (_context6.p = _context6.n) {
|
|
47542
47802
|
case 0:
|
|
@@ -47548,8 +47808,18 @@ var EditNewFrequency_orgbase_frequency_dropdown = createAsyncThunk("frequencyMas
|
|
|
47548
47808
|
}, __baseUrl__$1);
|
|
47549
47809
|
case 2:
|
|
47550
47810
|
data = _context6.v;
|
|
47811
|
+
resultList = Array.isArray(data === null || data === void 0 ? void 0 : data.result) ? data.result : Array.isArray(data) ? data : [];
|
|
47812
|
+
arr = [];
|
|
47813
|
+
resultList.forEach(function (val) {
|
|
47814
|
+
if (!val) return;
|
|
47815
|
+
arr.push(_objectSpread2(_objectSpread2({}, val), {}, {
|
|
47816
|
+
_id: String(val._id || val.value || val.id || ""),
|
|
47817
|
+
value: val._id || val.value || val.id || "",
|
|
47818
|
+
label: String(val.shortdesc || val.freqcode || val.display || val._id || "")
|
|
47819
|
+
}));
|
|
47820
|
+
});
|
|
47551
47821
|
return _context6.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
47552
|
-
data:
|
|
47822
|
+
data: arr
|
|
47553
47823
|
}));
|
|
47554
47824
|
case 3:
|
|
47555
47825
|
_context6.p = 3;
|
|
@@ -47641,9 +47911,9 @@ var addnewfrequency_orgfrequencymaster_insert = createAsyncThunk("frequencyMaste
|
|
|
47641
47911
|
_context9.p = 1;
|
|
47642
47912
|
body = JSON.stringify([{
|
|
47643
47913
|
appcode: dbName,
|
|
47644
|
-
|
|
47914
|
+
collection: tables.FREQUENCY_MASTER,
|
|
47645
47915
|
is_metadata: true,
|
|
47646
|
-
metadataId:
|
|
47916
|
+
metadataId: metaDataId$1,
|
|
47647
47917
|
doc: {
|
|
47648
47918
|
id: payload === null || payload === void 0 ? void 0 : payload.id,
|
|
47649
47919
|
freqcode: payload === null || payload === void 0 ? void 0 : payload.freqcode,
|
|
@@ -47693,12 +47963,12 @@ var EditNewFrequency_orgfrequencymaster_update = createAsyncThunk("frequencyMast
|
|
|
47693
47963
|
_context0.p = 1;
|
|
47694
47964
|
body = JSON.stringify([{
|
|
47695
47965
|
appcode: dbName,
|
|
47696
|
-
|
|
47966
|
+
collection: tables.FREQUENCY_MASTER,
|
|
47697
47967
|
is_metadata: true,
|
|
47698
47968
|
filter: {
|
|
47699
47969
|
_key: payload === null || payload === void 0 ? void 0 : payload.editfrequency_key
|
|
47700
47970
|
},
|
|
47701
|
-
metadataId:
|
|
47971
|
+
metadataId: metaDataId$1,
|
|
47702
47972
|
doc: {
|
|
47703
47973
|
id: payload === null || payload === void 0 ? void 0 : payload.id,
|
|
47704
47974
|
freqcode: payload === null || payload === void 0 ? void 0 : payload.freqcode,
|
|
@@ -47753,7 +48023,7 @@ var schedule_line_day_dropdown = createAsyncThunk("schedule_line_day_dropdownRed
|
|
|
47753
48023
|
status: true,
|
|
47754
48024
|
type: "WEEKDAYS"
|
|
47755
48025
|
},
|
|
47756
|
-
requestid:
|
|
48026
|
+
requestid: query_ids.schedule_line_day
|
|
47757
48027
|
});
|
|
47758
48028
|
_context1.n = 2;
|
|
47759
48029
|
return fetchData({
|