primary_care_admin_binder 0.0.50 → 0.0.54
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 +369 -112
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8843,7 +8843,7 @@ var addressListData = function addressListData(data, masters) {
|
|
|
8843
8843
|
return list;
|
|
8844
8844
|
};
|
|
8845
8845
|
|
|
8846
|
-
var generateReadJSON$
|
|
8846
|
+
var generateReadJSON$2 = function generateReadJSON(data, masters) {
|
|
8847
8847
|
var identifier = [];
|
|
8848
8848
|
|
|
8849
8849
|
if (data.identifier && data.identifier.length > 0) {
|
|
@@ -9288,7 +9288,7 @@ var PRACTITIONER_GET_BY_ID = createAsyncThunk("practitionerMasterSlice/practitio
|
|
|
9288
9288
|
|
|
9289
9289
|
case 9:
|
|
9290
9290
|
data = _context5.sent;
|
|
9291
|
-
readJSON = generateReadJSON$
|
|
9291
|
+
readJSON = generateReadJSON$2(data.result[0] ? data.result[0] : null, masterlist);
|
|
9292
9292
|
return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
9293
9293
|
data: readJSON
|
|
9294
9294
|
}));
|
|
@@ -9338,7 +9338,7 @@ var query$8 = {
|
|
|
9338
9338
|
getAgeRange: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"AgeRanges\",\n \"return_fields\": \"MERGE(AgeRanges, {AgeCategory: (FOR cat IN TO_ARRAY(AgeRanges.AgeCategory) RETURN MERGE(DOCUMENT(cat), {UOM:(FOR cod IN TO_ARRAY(DOCUMENT(DOCUMENT(cat).UOM).coding) RETURN MERGE(DOCUMENT(DOCUMENT(cat).UOM),{coding:DOCUMENT(cod)} ) ) } ) ) } )\"\n }")
|
|
9339
9339
|
};
|
|
9340
9340
|
|
|
9341
|
-
var generateJson$
|
|
9341
|
+
var generateJson$9 = function generateJson(data) {
|
|
9342
9342
|
var filter = {};
|
|
9343
9343
|
|
|
9344
9344
|
if (data.editData) {
|
|
@@ -9403,7 +9403,7 @@ var UPSERT_AGE_RANGE = createAsyncThunk("ageRangeMasterApiSlice/save_age_range",
|
|
|
9403
9403
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
9404
9404
|
_context.prev = 2;
|
|
9405
9405
|
dataList = payload.dataList;
|
|
9406
|
-
queriesjson = generateJson$
|
|
9406
|
+
queriesjson = generateJson$9(dataList);
|
|
9407
9407
|
_context.next = 7;
|
|
9408
9408
|
return fetchData({
|
|
9409
9409
|
body: JSON.stringify(queriesjson)
|
|
@@ -9611,7 +9611,7 @@ var query$7 = {
|
|
|
9611
9611
|
getList: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"VitalsMeasureCodes\",\n \"sort\": \"VitalsMeasureCodes.createddate\",\n \"filter\": {\n \"VitalsMeasureCodes\":\"VitalsMeasureCodes.activestatus==true\"\n },\n \"return_fields\": \"VitalsMeasureCodes\"\n }")
|
|
9612
9612
|
};
|
|
9613
9613
|
|
|
9614
|
-
var generateJson$
|
|
9614
|
+
var generateJson$8 = function generateJson(data) {
|
|
9615
9615
|
var filter = {};
|
|
9616
9616
|
|
|
9617
9617
|
if (data.edit_data) {
|
|
@@ -9696,7 +9696,7 @@ var UPSERT_MEASURE_CODE = createAsyncThunk("measureCodeApiSlice/save_measure_cod
|
|
|
9696
9696
|
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
9697
9697
|
_context2.prev = 2;
|
|
9698
9698
|
dataList = payload.dataList;
|
|
9699
|
-
queriesjson = generateJson$
|
|
9699
|
+
queriesjson = generateJson$8(dataList);
|
|
9700
9700
|
_context2.next = 7;
|
|
9701
9701
|
return fetchData({
|
|
9702
9702
|
body: JSON.stringify(queriesjson)
|
|
@@ -12501,7 +12501,7 @@ var photoData = function photoData(data) {
|
|
|
12501
12501
|
return photo_Data;
|
|
12502
12502
|
};
|
|
12503
12503
|
|
|
12504
|
-
var generateReadJSON = function generateReadJSON(data, state) {
|
|
12504
|
+
var generateReadJSON$1 = function generateReadJSON(data, state) {
|
|
12505
12505
|
var _data$managingOrgID$;
|
|
12506
12506
|
|
|
12507
12507
|
debugger;
|
|
@@ -13196,7 +13196,7 @@ var LOCATION_MASTER_GET_BY_ID = createAsyncThunk("locationMasterSlice/location_m
|
|
|
13196
13196
|
case 8:
|
|
13197
13197
|
data = _context12.sent;
|
|
13198
13198
|
// debugger;
|
|
13199
|
-
readJSON = generateReadJSON(data.result[0] ? data.result[0] : null, //masterlist
|
|
13199
|
+
readJSON = generateReadJSON$1(data.result[0] ? data.result[0] : null, //masterlist
|
|
13200
13200
|
ccState);
|
|
13201
13201
|
debugger;
|
|
13202
13202
|
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -15209,7 +15209,7 @@ var queries$9 = {
|
|
|
15209
15209
|
}
|
|
15210
15210
|
};
|
|
15211
15211
|
|
|
15212
|
-
var generateJson$
|
|
15212
|
+
var generateJson$7 = {
|
|
15213
15213
|
insert_json: function insert_json(data, key) {
|
|
15214
15214
|
var _data$TotNoOfResource, _data$generalInstruct, _data$ApptInstruction;
|
|
15215
15215
|
|
|
@@ -15886,7 +15886,7 @@ var RES_UPSERT_INSER_NEW = createAsyncThunk("resourceByAppointmentTypesSlice/res
|
|
|
15886
15886
|
_ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
|
|
15887
15887
|
_context11.prev = 2;
|
|
15888
15888
|
state = payload.state, key = payload.key;
|
|
15889
|
-
queriesjson = generateJson$
|
|
15889
|
+
queriesjson = generateJson$7.insert_json(state, key);
|
|
15890
15890
|
_context11.next = 7;
|
|
15891
15891
|
return fetchData({
|
|
15892
15892
|
body: JSON.stringify(queriesjson)
|
|
@@ -18686,7 +18686,14 @@ var drugRoutesDirectionSlice$1 = drugRoutesDirectionSlice.reducer;
|
|
|
18686
18686
|
|
|
18687
18687
|
var masterQuery$1 = {
|
|
18688
18688
|
orderCategory: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"OrderCategory\",\n \"filter\": \"OrderCategory.activestatus==true && OrderCategory.status==true\",\n \"return_fields\": \"OrderCategory\",\n \"sort\": \"OrderCategory.longdesc\"\n}"),
|
|
18689
|
-
orderType: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"OrderType\",\n \"filter\": \"OrderType.activestatus==true && OrderType.status==true
|
|
18689
|
+
orderType: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"OrderType\",\n \"filter\": \"OrderType.activestatus==true && OrderType.status==true\",\n \"return_fields\": \"merge(OrderType,{ordercategory:(document(OrderType.ordercategory))})\",\n \"sort\":\"OrderType.longdesc\"\n}"),
|
|
18690
|
+
// orderType: `{
|
|
18691
|
+
// "db_name": "${dbName}",
|
|
18692
|
+
// "entity": "OrderType",
|
|
18693
|
+
// "filter": "OrderType.activestatus==true && OrderType.status==true && OrderType.ordercategory=='OrderCategory/10013'",
|
|
18694
|
+
// "return_fields": "merge(OrderType,{ordercategory:(document(OrderType.ordercategory))})",
|
|
18695
|
+
// "sort":"OrderType.longdesc"
|
|
18696
|
+
// }`,
|
|
18690
18697
|
healthService: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"HealthcareService\",\n \"filter\": \"HealthcareService.activestatus==true\",\n \"return_fields\": \"{id:HealthcareService.id,_id:HealthcareService._id,name:HealthcareService.name}\"\n}"),
|
|
18691
18698
|
quantity: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='UOM' && CodeableConceptMaster.activestatus==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n}"),
|
|
18692
18699
|
entityType: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='ORGTYPE' && CodeableConceptMaster.activestatus==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n}"),
|
|
@@ -18726,11 +18733,12 @@ var Query = {
|
|
|
18726
18733
|
},
|
|
18727
18734
|
order_catalog_read: "{\n \"db_name\": \"primarycare\",\n \"entity\": \"OrderCatalog\",\n \"sort\":\"OrderCatalog.createddate\",\n \"filter\": \"OrderCatalog.activestatus==true\",\n \"return_fields\": \"MERGE(OrderCatalog,{ordercategory:(document(OrderCatalog.ordercategory)),ordertype:(document(OrderCatalog.ordertype)),healthcareservicecode:(document(OrderCatalog.healthcareservicecode)),OrderCatalogByEncounterTypeAge:(for doc in CA_OrderCatalogByEncounterTypeAge filter doc._id in OrderCatalog.OrderCatalogByEncounterTypeAge return doc),OrderAttribApplicability:(for doc in CA_OrderAttribApplicability filter doc._id in OrderCatalog.OrderAttribApplicability return doc),dfltFastingPeriodUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltFastingPeriodUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenBodySite:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenBodySite return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenCollectionMethod:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenCollectionMethod return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenType:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenType return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenVolumeUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenVolumeUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),maxorderqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.maxorderqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),repeatCheckUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.repeatCheckUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),AvailablebyPerOrganization:(for doc in to_array(OrderCatalog.AvailablebyPerOrganization) return merge(doc,{perforganizationId:(document(doc.perforganizationId)),perfOrganizationEntity:(for docs in CodeableConceptMaster filter docs._id==doc.perfOrganizationEntity return merge(doc,{coding:(for cod in CodingMaster filter cod._id in docs.coding return cod.display)}))})),dfltSpecimenContainer:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenContainer return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)}))})\"\n}",
|
|
18728
18735
|
editOrderCatalog: function editOrderCatalog(id) {
|
|
18736
|
+
debugger;
|
|
18729
18737
|
return {
|
|
18730
18738
|
db_name: "primarycare",
|
|
18731
18739
|
entity: "OrderCatalog",
|
|
18732
18740
|
filter: "OrderCatalog.activestatus==true && OrderCatalog._key=='".concat(id, "'"),
|
|
18733
|
-
return_fields: "MERGE(OrderCatalog,{ordercategory:(document(OrderCatalog.ordercategory)),ordertype:(document(OrderCatalog.ordertype)),healthcareservicecode:(document(OrderCatalog.healthcareservicecode)),OrderCatalogByEncounterTypeAge:(for doc in CA_OrderCatalogByEncounterTypeAge filter doc._id in OrderCatalog.OrderCatalogByEncounterTypeAge return doc),OrderAttribApplicability:(for doc in CA_OrderAttribApplicability filter doc._id in OrderCatalog.OrderAttribApplicability
|
|
18741
|
+
return_fields: "MERGE(OrderCatalog,{ordercategory:(document(OrderCatalog.ordercategory)),ordertype:(document(OrderCatalog.ordertype)),healthcareservicecode:(document(OrderCatalog.healthcareservicecode)),OrderCatalogByEncounterTypeAge:(for doc in CA_OrderCatalogByEncounterTypeAge filter doc._id in OrderCatalog.OrderCatalogByEncounterTypeAge return doc),OrderAttribApplicability:(for doc in CA_OrderAttribApplicability filter doc._id in OrderCatalog.OrderAttribApplicability return doc),dfltFastingPeriodUOM:document(OrderCatalog.dfltFastingPeriodUOM),dfltSpecimenBodySite:document(OrderCatalog.dfltSpecimenBodySite),dfltSpecimenCollectionMethod:document(OrderCatalog.dfltSpecimenCollectionMethod),dfltSpecimenType:document(OrderCatalog.dfltSpecimenType),dfltSpecimenVolumeUOM:document(OrderCatalog.dfltSpecimenVolumeUOM),dfltqtyUOM:document(OrderCatalog.dfltqtyUOM),maxorderqtyUOM:document(OrderCatalog.maxorderqtyUOM),repeatCheckUOM:document(OrderCatalog.repeatCheckUOM),AvailablebyPerOrganization:(for doc in to_array(OrderCatalog.AvailablebyPerOrganization) return merge(doc,{perforganizationId:(document(doc.perforganizationId)),perfOrganizationEntity:(document(doc.perfOrganizationEntity))})),dfltSpecimenContainer:document(OrderCatalog.dfltSpecimenContainer),repeatCheckAction:document(OrderCatalog.repeatCheckAction)})"
|
|
18734
18742
|
};
|
|
18735
18743
|
},
|
|
18736
18744
|
attributeDelete: function attributeDelete(id) {
|
|
@@ -18935,28 +18943,31 @@ var generateUpdateJSON = function generateUpdateJSON(editID, Status) {
|
|
|
18935
18943
|
}; //for edit read JSON
|
|
18936
18944
|
|
|
18937
18945
|
var generateReadResJson = function generateReadResJson(val, state) {
|
|
18946
|
+
var _val$catalogsynonym, _val$ordercategory;
|
|
18947
|
+
|
|
18948
|
+
debugger;
|
|
18938
18949
|
return {
|
|
18939
18950
|
code: val.ordercatalog,
|
|
18940
18951
|
longdes: val.longdesc,
|
|
18941
18952
|
shortdes: val.shortdesc,
|
|
18942
|
-
catalogSynonym: val.catalogsynonym
|
|
18943
|
-
orderCategory: val.ordercategory ? state.order_catalog_masters.data.orderCategory.find(function (sys) {
|
|
18953
|
+
catalogSynonym: (_val$catalogsynonym = val.catalogsynonym) !== null && _val$catalogsynonym !== void 0 ? _val$catalogsynonym : "",
|
|
18954
|
+
orderCategory: val !== null && val !== void 0 && val.ordercategory && val !== null && val !== void 0 && (_val$ordercategory = val.ordercategory) !== null && _val$ordercategory !== void 0 && _val$ordercategory._id ? state.order_catalog_masters.data.orderCategory.find(function (sys) {
|
|
18944
18955
|
return val.ordercategory._id.indexOf(sys.value) > -1;
|
|
18945
18956
|
}) : null,
|
|
18946
|
-
orderType: val.ordertype ? state.order_catalog_masters.data.orderType.find(function (sys) {
|
|
18957
|
+
orderType: val.ordertype && val.ordertype._id ? state.order_catalog_masters.data.orderType.find(function (sys) {
|
|
18947
18958
|
return val.ordertype._id.indexOf(sys.value) > -1;
|
|
18948
18959
|
}) : null,
|
|
18949
|
-
healthcareService: val.healthcareservicecode ? state.order_catalog_masters.data.healthService.find(function (sys) {
|
|
18960
|
+
healthcareService: val.healthcareservicecode && val.healthcareservicecode._id ? state.order_catalog_masters.data.healthService.find(function (sys) {
|
|
18950
18961
|
return val.healthcareservicecode._id.indexOf(sys.value) > -1;
|
|
18951
18962
|
}) : null,
|
|
18952
18963
|
Qtyno: val.dfltqty,
|
|
18953
|
-
DefaultQuantity: val.dfltqtyUOM ? state.order_catalog_masters.data.quantity.find(function (sys) {
|
|
18954
|
-
return val.dfltqtyUOM
|
|
18964
|
+
DefaultQuantity: val.dfltqtyUOM && val.dfltqtyUOM._id ? state.order_catalog_masters.data.quantity.find(function (sys) {
|
|
18965
|
+
return val.dfltqtyUOM._id.indexOf(sys.value) > -1;
|
|
18955
18966
|
}) : null,
|
|
18956
18967
|
AllowQtyCheck: val.allowqtychange,
|
|
18957
18968
|
maxno: val.maxorderqty,
|
|
18958
|
-
Maxorder: val.maxorderqtyUOM
|
|
18959
|
-
return val.maxorderqtyUOM
|
|
18969
|
+
Maxorder: val.maxorderqtyUOM && val.maxorderqtyUOM._id ? state.order_catalog_masters.data.quantity.find(function (sys) {
|
|
18970
|
+
return val.maxorderqtyUOM._id.indexOf(sys.value) > -1;
|
|
18960
18971
|
}) : null,
|
|
18961
18972
|
explantorymsg: val.explanatorynote,
|
|
18962
18973
|
characteristicJson: [{
|
|
@@ -18980,36 +18991,36 @@ var generateReadResJson = function generateReadResJson(val, state) {
|
|
|
18980
18991
|
}],
|
|
18981
18992
|
checkSwitch: val.checkforrepeatorders,
|
|
18982
18993
|
no: val.repeatcheckperiod,
|
|
18983
|
-
DuplicatePeriod: val.repeatCheckUOM
|
|
18984
|
-
return val.repeatCheckUOM
|
|
18994
|
+
DuplicatePeriod: val.repeatCheckUOM && val.repeatCheckUOM._id ? state.order_catalog_masters.data.quantity.find(function (sys) {
|
|
18995
|
+
return val.repeatCheckUOM._id.indexOf(sys.value) > -1;
|
|
18985
18996
|
}) : null,
|
|
18986
|
-
CheckAction: val.repeatCheckAction ? state.order_catalog_masters.data.checkaction.find(function (sys) {
|
|
18987
|
-
return val.repeatCheckAction.indexOf(sys.value) > -1;
|
|
18997
|
+
CheckAction: val.repeatCheckAction && val.repeatCheckAction._id ? state.order_catalog_masters.data.checkaction.find(function (sys) {
|
|
18998
|
+
return val.repeatCheckAction._id.indexOf(sys.value) > -1;
|
|
18988
18999
|
}) : null,
|
|
18989
19000
|
consentSwitch: val.consentreqd,
|
|
18990
19001
|
ConsentForm: null,
|
|
18991
19002
|
attribute: val.OrderAttribApplicability.length > 0 ? val.OrderAttribApplicability[0].winlabelName : "",
|
|
18992
19003
|
AttributeList: generateAttribute(val.OrderAttribApplicability, state),
|
|
18993
19004
|
FacilityData: generatefaciltity(val.AvailablebyPerOrganization, state),
|
|
18994
|
-
SpecimenType: val.dfltSpecimenType ? state.order_catalog_masters.data.specimenType.find(function (sys) {
|
|
18995
|
-
return val.dfltSpecimenType
|
|
19005
|
+
SpecimenType: val.dfltSpecimenType._id ? state.order_catalog_masters.data.specimenType.find(function (sys) {
|
|
19006
|
+
return val.dfltSpecimenType._id.indexOf(sys.value) > -1;
|
|
18996
19007
|
}) : null,
|
|
18997
19008
|
VolumeQuantity: val.dfltSpecimenVolume,
|
|
18998
|
-
Volume: val.dfltSpecimenVolumeUOM
|
|
18999
|
-
return val.dfltSpecimenVolumeUOM
|
|
19009
|
+
Volume: val.dfltSpecimenVolumeUOM && val.dfltSpecimenVolumeUOM._id ? state.order_catalog_masters.data.quantity.find(function (sys) {
|
|
19010
|
+
return val.dfltSpecimenVolumeUOM._id.indexOf(sys.value) > -1;
|
|
19000
19011
|
}) : null,
|
|
19001
|
-
BodyType: val.dfltSpecimenBodySite
|
|
19002
|
-
return val.dfltSpecimenBodySite
|
|
19012
|
+
BodyType: val.dfltSpecimenBodySite && val.dfltSpecimenBodySite._id ? state.order_catalog_masters.data.bodySite.find(function (sys) {
|
|
19013
|
+
return val.dfltSpecimenBodySite._id.indexOf(sys.value) > -1;
|
|
19003
19014
|
}) : null,
|
|
19004
19015
|
FastingPeriodQuantity: val.dfltFastingPeriod,
|
|
19005
|
-
FastingPeriod: val.dfltFastingPeriodUOM
|
|
19006
|
-
return val.dfltFastingPeriodUOM
|
|
19016
|
+
FastingPeriod: val.dfltFastingPeriodUOM && val.dfltFastingPeriodUOM._id ? state.order_catalog_masters.data.quantity.find(function (sys) {
|
|
19017
|
+
return val.dfltFastingPeriodUOM._id.indexOf(sys.value) > -1;
|
|
19007
19018
|
}) : null,
|
|
19008
|
-
SpecimenContainer: val.dfltSpecimenContainer
|
|
19009
|
-
return val.dfltSpecimenContainer
|
|
19019
|
+
SpecimenContainer: val.dfltSpecimenContainer && val.dfltSpecimenContainer._id ? state.order_catalog_masters.data.specimenContainer.find(function (sys) {
|
|
19020
|
+
return val.dfltSpecimenContainer._id.indexOf(sys.value) > -1;
|
|
19010
19021
|
}) : null,
|
|
19011
|
-
CollectionMethod: val.dfltSpecimenCollectionMethod
|
|
19012
|
-
return val.dfltSpecimenCollectionMethod
|
|
19022
|
+
CollectionMethod: val.dfltSpecimenCollectionMethod && val.dfltSpecimenCollectionMethod._id ? state.order_catalog_masters.data.collectionMethod.find(function (sys) {
|
|
19023
|
+
return val.dfltSpecimenCollectionMethod._id.indexOf(sys.value) > -1;
|
|
19013
19024
|
}) : null,
|
|
19014
19025
|
instructions: generateInstruction(val.OrderCatalogByEncounterTypeAge, state),
|
|
19015
19026
|
Frequency_applicability: generateFrequency(val.OrderCatalogByEncounterTypeAge, state).length > 0 ? true : false,
|
|
@@ -19203,16 +19214,22 @@ var generateFrequency = function generateFrequency(data, state) {
|
|
|
19203
19214
|
var generatefaciltity = function generatefaciltity(data, state) {
|
|
19204
19215
|
var facilityArr = data.map(function (v) {
|
|
19205
19216
|
return {
|
|
19206
|
-
entity_type: v.perfOrganizationEntity
|
|
19207
|
-
return v.perfOrganizationEntity
|
|
19208
|
-
}) : null,
|
|
19209
|
-
entity_name: v.perforganizationId ? state.order_catalog_masters.data.entitytName.find(function (sys) {
|
|
19210
|
-
return v.perforganizationId._id.indexOf(sys.value) > -1;
|
|
19217
|
+
entity_type: v.perfOrganizationEntity ? state.order_catalog_masters.data.entityType.find(function (sys) {
|
|
19218
|
+
return v.perfOrganizationEntity._id.indexOf(sys.value) > -1;
|
|
19211
19219
|
}) : null,
|
|
19220
|
+
// entity_name: v.perforganizationId
|
|
19221
|
+
// ? state.order_catalog_masters.data.entitytName.find(
|
|
19222
|
+
// (sys) => v.perforganizationId._id.indexOf(sys.value) > -1
|
|
19223
|
+
// )
|
|
19224
|
+
// : null,
|
|
19225
|
+
entity_name: v.perforganizationId && v.perforganizationId._id ? {
|
|
19226
|
+
label: v.perforganizationId.name,
|
|
19227
|
+
value: v.perforganizationId._id
|
|
19228
|
+
} : null,
|
|
19212
19229
|
appointment: v.apptreqd,
|
|
19213
19230
|
duration: v.apptDurnInMinutes,
|
|
19214
|
-
effective_from: moment.unix(v.EffFrDate).
|
|
19215
|
-
effective_to: moment.unix(v.EffToDate).
|
|
19231
|
+
effective_from: new Date(moment.unix(v.EffFrDate)).toLocaleDateString(),
|
|
19232
|
+
effective_to: new Date(moment.unix(v.EffToDate)).toLocaleDateString()
|
|
19216
19233
|
};
|
|
19217
19234
|
});
|
|
19218
19235
|
return facilityArr;
|
|
@@ -19291,13 +19308,12 @@ var loopMasters$1 = function loopMasters() {
|
|
|
19291
19308
|
label: value.ordercategory,
|
|
19292
19309
|
value: value._id
|
|
19293
19310
|
});
|
|
19294
|
-
}
|
|
19295
|
-
|
|
19296
|
-
|
|
19297
|
-
|
|
19298
|
-
|
|
19299
|
-
|
|
19300
|
-
else if ("healthService" === val.name) {
|
|
19311
|
+
} else if ("orderType" === val.name) {
|
|
19312
|
+
arr.push({
|
|
19313
|
+
label: value.ordertype,
|
|
19314
|
+
value: value._id
|
|
19315
|
+
});
|
|
19316
|
+
} else if ("healthService" === val.name) {
|
|
19301
19317
|
arr.push({
|
|
19302
19318
|
label: value.name,
|
|
19303
19319
|
value: value._id
|
|
@@ -19729,24 +19745,26 @@ var EDIT_ORDER_CATALOG = createAsyncThunk("orderCatalogApiSlice/editOrderCatalog
|
|
|
19729
19745
|
|
|
19730
19746
|
case 8:
|
|
19731
19747
|
data = _context11.sent;
|
|
19748
|
+
debugger;
|
|
19732
19749
|
res = generateReadResJson(data.result[0], ccState);
|
|
19750
|
+
debugger;
|
|
19733
19751
|
return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19734
19752
|
data: res
|
|
19735
19753
|
}));
|
|
19736
19754
|
|
|
19737
|
-
case
|
|
19738
|
-
_context11.prev =
|
|
19755
|
+
case 15:
|
|
19756
|
+
_context11.prev = 15;
|
|
19739
19757
|
_context11.t0 = _context11["catch"](2);
|
|
19740
19758
|
return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19741
19759
|
message: _context11.t0.message
|
|
19742
19760
|
})));
|
|
19743
19761
|
|
|
19744
|
-
case
|
|
19762
|
+
case 18:
|
|
19745
19763
|
case "end":
|
|
19746
19764
|
return _context11.stop();
|
|
19747
19765
|
}
|
|
19748
19766
|
}
|
|
19749
|
-
}, _callee11, null, [[2,
|
|
19767
|
+
}, _callee11, null, [[2, 15]]);
|
|
19750
19768
|
})));
|
|
19751
19769
|
var DELETE_ATTRIBUTE_DELETE = createAsyncThunk("orderCatalogApiSlice/attributesDelete", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
|
|
19752
19770
|
var payload,
|
|
@@ -19914,7 +19932,7 @@ var queries$5 = {
|
|
|
19914
19932
|
}
|
|
19915
19933
|
};
|
|
19916
19934
|
|
|
19917
|
-
var generateJson$
|
|
19935
|
+
var generateJson$6 = function generateJson(data, _key) {
|
|
19918
19936
|
var _data$performingData, _data$orderingFacilit, _data$orderingFacilit2, _data$locationType$va, _data$locationType, _data$sourceLocation$, _data$sourceLocation, _data$ServiceApplicab, _data$ServiceApplicab2, _data$status;
|
|
19919
19937
|
|
|
19920
19938
|
debugger;
|
|
@@ -20175,7 +20193,7 @@ var UPSERT_PERFORMINGLOCATION = createAsyncThunk("performLocationSlice/save_perf
|
|
|
20175
20193
|
_ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
|
|
20176
20194
|
_context5.prev = 2;
|
|
20177
20195
|
list = payload.list, _key = payload._key;
|
|
20178
|
-
queriesjson = generateJson$
|
|
20196
|
+
queriesjson = generateJson$6(list, _key); // return
|
|
20179
20197
|
|
|
20180
20198
|
console.log("recived", list);
|
|
20181
20199
|
_context5.next = 8;
|
|
@@ -20498,19 +20516,15 @@ var appointmentDurationArr = function appointmentDurationArr(lisy) {
|
|
|
20498
20516
|
lisy.map(function (val) {
|
|
20499
20517
|
var _val$duration_type, _val$day_type, _val$consultation_typ, _val$consultation_typ2;
|
|
20500
20518
|
|
|
20501
|
-
|
|
20502
|
-
|
|
20519
|
+
// let st = val.start_time.split(":");
|
|
20520
|
+
// let et = val.end_time.split(":");
|
|
20503
20521
|
arr.push({
|
|
20504
20522
|
"SlotSlabInd": (_val$duration_type = val === null || val === void 0 ? void 0 : val.duration_type) !== null && _val$duration_type !== void 0 ? _val$duration_type : "",
|
|
20505
20523
|
"DayType": val === null || val === void 0 ? void 0 : (_val$day_type = val.day_type) === null || _val$day_type === void 0 ? void 0 : _val$day_type.value,
|
|
20506
|
-
"starttime": moment({
|
|
20507
|
-
|
|
20508
|
-
|
|
20509
|
-
|
|
20510
|
-
"endtime": moment({
|
|
20511
|
-
hour: et[0],
|
|
20512
|
-
minute: et[1]
|
|
20513
|
-
}).unix(),
|
|
20524
|
+
// "starttime": moment({ hour: st[0], minute: st[1] }).unix(),
|
|
20525
|
+
"starttime": "".concat(val.start_time),
|
|
20526
|
+
// "endtime": moment({ hour: et[0], minute: et[1] }).unix(),
|
|
20527
|
+
"endtime": "".concat(val.end_time),
|
|
20514
20528
|
"slotduration": val.slot_duration ? parseInt(val.slot_duration) : 0,
|
|
20515
20529
|
"maxAppointment": val !== null && val !== void 0 && val.max_appoinment ? parseInt(val.max_appoinment) : 0,
|
|
20516
20530
|
"maxAppAllowed": val !== null && val !== void 0 && val.max_appoinment ? parseInt(val.max_appoinment) : 0,
|
|
@@ -21695,7 +21709,7 @@ var ReadTreeDetailJson = function ReadTreeDetailJson(data, parentOrgName) {
|
|
|
21695
21709
|
return obj;
|
|
21696
21710
|
};
|
|
21697
21711
|
|
|
21698
|
-
var generateJson$
|
|
21712
|
+
var generateJson$5 = {
|
|
21699
21713
|
insert_json: function insert_json(data, key) {
|
|
21700
21714
|
var _data$Identification, _data$Alias, _data$Address, _data$Contact, _data$ContactPersonDe, _data$specialtyDetail, _data$ParentEntity, _data$ParentEntity2, _data$LevelOfCare, _data$imageDetails$, _data$imageDetails$2, _data$imageDetails$3, _data$imageDetails$4;
|
|
21701
21715
|
|
|
@@ -23242,7 +23256,7 @@ var SET_ORGANIZATION = createAsyncThunk("organizationSlice/setOrganization", /*#
|
|
|
23242
23256
|
_context24.prev = 2;
|
|
23243
23257
|
state = payload.state, key = payload.key;
|
|
23244
23258
|
debugger;
|
|
23245
|
-
queriesjson = generateJson$
|
|
23259
|
+
queriesjson = generateJson$5.insert_json(state, key);
|
|
23246
23260
|
debugger;
|
|
23247
23261
|
_context24.next = 9;
|
|
23248
23262
|
return fetchData({
|
|
@@ -23740,7 +23754,7 @@ var queries$3 = {
|
|
|
23740
23754
|
}
|
|
23741
23755
|
};
|
|
23742
23756
|
|
|
23743
|
-
var generateJson$
|
|
23757
|
+
var generateJson$4 = function generateJson(data) {
|
|
23744
23758
|
var _data$status, _data$serviceDescript, _data$comment, _data$id, _data$speciality$valu, _data$speciality, _data$serviceCategory, _data$serviceCategory2, _data$serviceType$val, _data$serviceType, _data$serviceCode;
|
|
23745
23759
|
|
|
23746
23760
|
var filter = {};
|
|
@@ -24361,7 +24375,7 @@ var HEALTH_CARE_SERVICE_INSERT = createAsyncThunk("organizationConfigApiSlice/sa
|
|
|
24361
24375
|
_ref16 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref16.rejectWithValue;
|
|
24362
24376
|
_context8.prev = 2;
|
|
24363
24377
|
dataList = payload.dataList;
|
|
24364
|
-
queriesjson = generateJson$
|
|
24378
|
+
queriesjson = generateJson$4(dataList);
|
|
24365
24379
|
_context8.next = 7;
|
|
24366
24380
|
return fetchData({
|
|
24367
24381
|
body: JSON.stringify(queriesjson)
|
|
@@ -25243,7 +25257,7 @@ var signInSlice$1 = signInSlice.reducer;
|
|
|
25243
25257
|
|
|
25244
25258
|
var sign_in_actions = _objectSpread2({}, signinActions);
|
|
25245
25259
|
|
|
25246
|
-
var generateJson$
|
|
25260
|
+
var generateJson$3 = function generateJson(data, _key) {
|
|
25247
25261
|
var _data$approvalData, _data$orderingFacilit, _data$orderingFacilit2, _data$ServiceApplicab, _data$ServiceApplicab2, _data$ruleType$_id, _data$ruleType, _data$PrivilegeType$_, _data$PrivilegeType, _data$status;
|
|
25248
25262
|
|
|
25249
25263
|
debugger;
|
|
@@ -25305,7 +25319,7 @@ var UPSERT_ALERT = createAsyncThunk("alertRestictionsMasterSlice/save_alert", /*
|
|
|
25305
25319
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
25306
25320
|
_context.prev = 2;
|
|
25307
25321
|
list = payload.list, _key = payload._key;
|
|
25308
|
-
queriesjson = generateJson$
|
|
25322
|
+
queriesjson = generateJson$3(list, _key); // return
|
|
25309
25323
|
|
|
25310
25324
|
_context.next = 7;
|
|
25311
25325
|
return fetchData({
|
|
@@ -25694,7 +25708,7 @@ var queries$2 = {
|
|
|
25694
25708
|
}
|
|
25695
25709
|
};
|
|
25696
25710
|
|
|
25697
|
-
var generateJson$
|
|
25711
|
+
var generateJson$2 = {
|
|
25698
25712
|
insert_json: function insert_json(data, key) {
|
|
25699
25713
|
var _data$coversionData;
|
|
25700
25714
|
|
|
@@ -25967,7 +25981,7 @@ var UOM_CODE_INSERT = createAsyncThunk("drugRoutesSlice/drug_uom_code_insert", /
|
|
|
25967
25981
|
_ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
|
|
25968
25982
|
_context4.prev = 2;
|
|
25969
25983
|
data = payload.data, key = payload.key;
|
|
25970
|
-
queriesjson = generateJson$
|
|
25984
|
+
queriesjson = generateJson$2.insert_json(data, key);
|
|
25971
25985
|
_context4.next = 7;
|
|
25972
25986
|
return fetchData({
|
|
25973
25987
|
body: JSON.stringify(queriesjson)
|
|
@@ -26214,7 +26228,7 @@ var queries$1 = {
|
|
|
26214
26228
|
}
|
|
26215
26229
|
};
|
|
26216
26230
|
|
|
26217
|
-
var generateJson = {
|
|
26231
|
+
var generateJson$1 = {
|
|
26218
26232
|
insert_json: function insert_json(data, key) {
|
|
26219
26233
|
var _data$frequencyDefini, _data$frequencyDefini2, _data$frequencyDefini3, _data$frequencyDescri, _data$frequencyDescri2, _data$frequencyDescri3, _data$frequencyDescri4, _data$frequencyDescri5, _data$frequencyDescri6, _data$frequencyDescri7, _data$frequencyDescri8, _data$frequencyDescri9, _data$frequencyDescri10, _data$frequencyDescri11, _data$frequencyDescri12, _data$frequencyDescri13, _data$frequencyDescri14, _data$frequencyDescri15;
|
|
26220
26234
|
|
|
@@ -26637,7 +26651,7 @@ var UOM_DRUG_FREQ_INSERT = createAsyncThunk("drugMasterFREQUENCYSlice/drug_uom_f
|
|
|
26637
26651
|
_ref14 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref14.rejectWithValue;
|
|
26638
26652
|
_context7.prev = 2;
|
|
26639
26653
|
data = payload.data, key = payload.key;
|
|
26640
|
-
queriesjson = generateJson.insert_json(data, key);
|
|
26654
|
+
queriesjson = generateJson$1.insert_json(data, key);
|
|
26641
26655
|
_context7.next = 7;
|
|
26642
26656
|
return fetchData({
|
|
26643
26657
|
body: JSON.stringify(queriesjson)
|
|
@@ -27133,7 +27147,7 @@ var queries = {
|
|
|
27133
27147
|
db_name: dbName,
|
|
27134
27148
|
entity: "SMGeographicMaster",
|
|
27135
27149
|
filter: "SMGeographicMaster.activestatus==true && lower(document(SMGeographicMaster.geogLevelType).display)=='country'",
|
|
27136
|
-
return_fields: "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.
|
|
27150
|
+
return_fields: "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, GeoLocationISDCode :SMGeographicMaster.GeoLocationISDCode, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.active,_key:SMGeographicMaster._key}"
|
|
27137
27151
|
};
|
|
27138
27152
|
},
|
|
27139
27153
|
//STATE READ
|
|
@@ -27142,7 +27156,7 @@ var queries = {
|
|
|
27142
27156
|
db_name: dbName,
|
|
27143
27157
|
entity: "SMGeographicMaster",
|
|
27144
27158
|
filter: "SMGeographicMaster.activestatus==true && upper(document(SMGeographicMaster.geogLevelType).display)=='STATE' && upper(document(SMGeographicMaster.parentGeogLevelCode).geogLevelCode)=='".concat(id, "'"),
|
|
27145
|
-
return_fields: "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.
|
|
27159
|
+
return_fields: "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.active,_key:SMGeographicMaster._key}"
|
|
27146
27160
|
};
|
|
27147
27161
|
},
|
|
27148
27162
|
//DISTRICT READ
|
|
@@ -27151,7 +27165,7 @@ var queries = {
|
|
|
27151
27165
|
db_name: dbName,
|
|
27152
27166
|
entity: "SMGeographicMaster",
|
|
27153
27167
|
filter: "SMGeographicMaster.activestatus==true && upper(document(SMGeographicMaster.geogLevelType).display)=='DISTRICT' && upper(document(SMGeographicMaster.parentGeogLevelCode).geogLevelCode)=='".concat(id, "'"),
|
|
27154
|
-
return_fields: "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.
|
|
27168
|
+
return_fields: "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.active,_key:SMGeographicMaster._key}"
|
|
27155
27169
|
};
|
|
27156
27170
|
},
|
|
27157
27171
|
//CITY READ
|
|
@@ -27159,8 +27173,8 @@ var queries = {
|
|
|
27159
27173
|
return {
|
|
27160
27174
|
db_name: dbName,
|
|
27161
27175
|
entity: "SMGeographicMaster",
|
|
27162
|
-
filter: "SMGeographicMaster.activestatus==true && upper(document(SMGeographicMaster.geogLevelType).display)=='CITY' && upper(document(SMGeographicMaster.parentGeogLevelCode).geogLevelCode)=='
|
|
27163
|
-
return_fields: "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.
|
|
27176
|
+
filter: "SMGeographicMaster.activestatus==true && upper(document(SMGeographicMaster.geogLevelType).display)=='CITY' && upper(document(SMGeographicMaster.parentGeogLevelCode).geogLevelCode)=='".concat(id, "'"),
|
|
27177
|
+
return_fields: "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.active,_key:SMGeographicMaster._key}"
|
|
27164
27178
|
};
|
|
27165
27179
|
},
|
|
27166
27180
|
//PINCODE READ
|
|
@@ -27169,7 +27183,7 @@ var queries = {
|
|
|
27169
27183
|
db_name: dbName,
|
|
27170
27184
|
entity: "SMGeographicMaster",
|
|
27171
27185
|
filter: "SMGeographicMaster.activestatus==true && upper(document(SMGeographicMaster.geogLevelType).display)=='PINCODE' && upper(document(SMGeographicMaster.parentGeogLevelCode).geogLevelCode)=='".concat(id, "'"),
|
|
27172
|
-
return_fields: "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.
|
|
27186
|
+
return_fields: "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.active,_key:SMGeographicMaster._key}"
|
|
27173
27187
|
};
|
|
27174
27188
|
},
|
|
27175
27189
|
//STATUS CHANGE
|
|
@@ -27201,11 +27215,80 @@ var queries = {
|
|
|
27201
27215
|
return {
|
|
27202
27216
|
db_name: dbName,
|
|
27203
27217
|
entity: "SMGeographicMaster",
|
|
27204
|
-
filter: "SMGeographicMaster.
|
|
27205
|
-
//filter: `SMGeographicMaster.parentGeogLevelCode=='${id}' && SMGeographicMaster.activestatus==true`,
|
|
27218
|
+
filter: "SMGeographicMaster.geogLevelType=='".concat(id, "' && SMGeographicMaster.activestatus==true"),
|
|
27206
27219
|
return_fields: "{id:SMGeographicMaster.id,_id:SMGeographicMaster._id,geogLevelCode:SMGeographicMaster.geogLevelCode,geogLevelName:SMGeographicMaster.geogLevelName,geogLevelType:document(SMGeographicMaster.geogLevelType).display,parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType),parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode),GeoLocationISDCode:SMGeographicMaster.GeoLocationISDCode,_key:SMGeographicMaster._key}"
|
|
27207
27220
|
};
|
|
27221
|
+
},
|
|
27222
|
+
//GEOGRAPHIC_SINGLE_READ
|
|
27223
|
+
editGeoGraphicSingleRead: function editGeoGraphicSingleRead(id) {
|
|
27224
|
+
return {
|
|
27225
|
+
db_name: dbName,
|
|
27226
|
+
entity: "SMGeographicMaster",
|
|
27227
|
+
filter: "SMGeographicMaster.activestatus==true && SMGeographicMaster._key=='".concat(id, "'"),
|
|
27228
|
+
return_fields: "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), GeoLocationISDCode :SMGeographicMaster.GeoLocationISDCode, parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.activestatus,_key:SMGeographicMaster._key}"
|
|
27229
|
+
};
|
|
27230
|
+
}
|
|
27231
|
+
};
|
|
27232
|
+
|
|
27233
|
+
var generateJson = function generateJson(data) {
|
|
27234
|
+
var _data$id, _data$type$value, _data$code, _data$name, _data$parentType$valu, _data$parentCode$valu, _data$status, _data$geolocationISD;
|
|
27235
|
+
|
|
27236
|
+
var filter = {};
|
|
27237
|
+
|
|
27238
|
+
if (data._key) {
|
|
27239
|
+
filter = {
|
|
27240
|
+
filter: {
|
|
27241
|
+
_key: data._key
|
|
27242
|
+
}
|
|
27243
|
+
};
|
|
27208
27244
|
}
|
|
27245
|
+
|
|
27246
|
+
var arr = [_objectSpread2(_objectSpread2({
|
|
27247
|
+
"db_name": dbName,
|
|
27248
|
+
"entity": "SMGeographicMaster",
|
|
27249
|
+
"is_metadata": true
|
|
27250
|
+
}, filter), {}, {
|
|
27251
|
+
"metadataId": "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
27252
|
+
"doc": {
|
|
27253
|
+
"_id": "",
|
|
27254
|
+
"id": (_data$id = data.id) !== null && _data$id !== void 0 ? _data$id : "",
|
|
27255
|
+
"geogLevelType": (_data$type$value = data.type.value) !== null && _data$type$value !== void 0 ? _data$type$value : "",
|
|
27256
|
+
"geogLevelCode": (_data$code = data.code) !== null && _data$code !== void 0 ? _data$code : "",
|
|
27257
|
+
"geogLevelName": (_data$name = data.name) !== null && _data$name !== void 0 ? _data$name : "",
|
|
27258
|
+
"parentGeogLevelType": (_data$parentType$valu = data.parentType.value) !== null && _data$parentType$valu !== void 0 ? _data$parentType$valu : "",
|
|
27259
|
+
"parentGeogLevelCode": (_data$parentCode$valu = data.parentCode.value) !== null && _data$parentCode$valu !== void 0 ? _data$parentCode$valu : "",
|
|
27260
|
+
"active": (_data$status = data.status) !== null && _data$status !== void 0 ? _data$status : "",
|
|
27261
|
+
"GeoLocationISDCode": (_data$geolocationISD = data.geolocationISD) !== null && _data$geolocationISD !== void 0 ? _data$geolocationISD : ""
|
|
27262
|
+
}
|
|
27263
|
+
})];
|
|
27264
|
+
return arr;
|
|
27265
|
+
};
|
|
27266
|
+
|
|
27267
|
+
var generateReadJSON = function generateReadJSON(val, state) {
|
|
27268
|
+
var _val$geogLevelType$_i, _val$geogLevelType, _val$geogLevelType$di, _val$geogLevelType2, _val$GeoLocationISDCo, _val$geogLevelCode, _val$geogLevelName, _val$parentGeogLevelT, _val$parentGeogLevelT2, _val$parentGeogLevelT3, _val$parentGeogLevelT4, _val$parentGeogLevelC, _val$parentGeogLevelC2, _val$parentGeogLevelC3, _val$parentGeogLevelC4, _val$_id, _val$id, _val$_key, _val$active;
|
|
27269
|
+
|
|
27270
|
+
var json = {
|
|
27271
|
+
type: val.geogLevelType ? {
|
|
27272
|
+
value: (_val$geogLevelType$_i = (_val$geogLevelType = val.geogLevelType) === null || _val$geogLevelType === void 0 ? void 0 : _val$geogLevelType._id) !== null && _val$geogLevelType$_i !== void 0 ? _val$geogLevelType$_i : "",
|
|
27273
|
+
label: (_val$geogLevelType$di = (_val$geogLevelType2 = val.geogLevelType) === null || _val$geogLevelType2 === void 0 ? void 0 : _val$geogLevelType2.display) !== null && _val$geogLevelType$di !== void 0 ? _val$geogLevelType$di : ""
|
|
27274
|
+
} : "",
|
|
27275
|
+
geolocationISD: (_val$GeoLocationISDCo = val.GeoLocationISDCode) !== null && _val$GeoLocationISDCo !== void 0 ? _val$GeoLocationISDCo : "",
|
|
27276
|
+
code: (_val$geogLevelCode = val.geogLevelCode) !== null && _val$geogLevelCode !== void 0 ? _val$geogLevelCode : "",
|
|
27277
|
+
name: (_val$geogLevelName = val.geogLevelName) !== null && _val$geogLevelName !== void 0 ? _val$geogLevelName : "",
|
|
27278
|
+
parentType: val.parentGeogLevelType ? {
|
|
27279
|
+
value: (_val$parentGeogLevelT = (_val$parentGeogLevelT2 = val.parentGeogLevelType) === null || _val$parentGeogLevelT2 === void 0 ? void 0 : _val$parentGeogLevelT2._id) !== null && _val$parentGeogLevelT !== void 0 ? _val$parentGeogLevelT : "",
|
|
27280
|
+
label: (_val$parentGeogLevelT3 = (_val$parentGeogLevelT4 = val.parentGeogLevelType) === null || _val$parentGeogLevelT4 === void 0 ? void 0 : _val$parentGeogLevelT4.display) !== null && _val$parentGeogLevelT3 !== void 0 ? _val$parentGeogLevelT3 : ""
|
|
27281
|
+
} : "",
|
|
27282
|
+
parentCode: val.parentGeogLevelCode ? {
|
|
27283
|
+
value: (_val$parentGeogLevelC = (_val$parentGeogLevelC2 = val.parentGeogLevelCode) === null || _val$parentGeogLevelC2 === void 0 ? void 0 : _val$parentGeogLevelC2._id) !== null && _val$parentGeogLevelC !== void 0 ? _val$parentGeogLevelC : "",
|
|
27284
|
+
label: (_val$parentGeogLevelC3 = (_val$parentGeogLevelC4 = val.parentGeogLevelCode) === null || _val$parentGeogLevelC4 === void 0 ? void 0 : _val$parentGeogLevelC4.geogLevelName) !== null && _val$parentGeogLevelC3 !== void 0 ? _val$parentGeogLevelC3 : ""
|
|
27285
|
+
} : "",
|
|
27286
|
+
_id: (_val$_id = val._id) !== null && _val$_id !== void 0 ? _val$_id : "",
|
|
27287
|
+
id: (_val$id = val.id) !== null && _val$id !== void 0 ? _val$id : "",
|
|
27288
|
+
_key: (_val$_key = val._key) !== null && _val$_key !== void 0 ? _val$_key : "",
|
|
27289
|
+
status: (_val$active = val.active) !== null && _val$active !== void 0 ? _val$active : ""
|
|
27290
|
+
};
|
|
27291
|
+
return json;
|
|
27209
27292
|
};
|
|
27210
27293
|
|
|
27211
27294
|
var _extraReducers$2;
|
|
@@ -27349,23 +27432,24 @@ var GEOGRAPHIC_COUNTRY_READ = createAsyncThunk("geographicSlice/geoCountryRead",
|
|
|
27349
27432
|
status: val === null || val === void 0 ? void 0 : val.active
|
|
27350
27433
|
});
|
|
27351
27434
|
});
|
|
27435
|
+
debugger;
|
|
27352
27436
|
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
27353
27437
|
data: arry
|
|
27354
27438
|
}));
|
|
27355
27439
|
|
|
27356
|
-
case
|
|
27357
|
-
_context3.prev =
|
|
27440
|
+
case 13:
|
|
27441
|
+
_context3.prev = 13;
|
|
27358
27442
|
_context3.t0 = _context3["catch"](2);
|
|
27359
27443
|
return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
27360
27444
|
message: _context3.t0.message
|
|
27361
27445
|
})));
|
|
27362
27446
|
|
|
27363
|
-
case
|
|
27447
|
+
case 16:
|
|
27364
27448
|
case "end":
|
|
27365
27449
|
return _context3.stop();
|
|
27366
27450
|
}
|
|
27367
27451
|
}
|
|
27368
|
-
}, _callee3, null, [[2,
|
|
27452
|
+
}, _callee3, null, [[2, 13]]);
|
|
27369
27453
|
}))); //GEOGRAPHIC_STATE_READ
|
|
27370
27454
|
|
|
27371
27455
|
var GEOGRAPHIC_STATE_READ = createAsyncThunk("geographicSlice/geoStateRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
@@ -27616,33 +27700,31 @@ var GEOGRAPHIC_STATUS_CHANGE = createAsyncThunk("geographicSlice/geoStatusChange
|
|
|
27616
27700
|
_key: payload._key,
|
|
27617
27701
|
status: payload.status
|
|
27618
27702
|
};
|
|
27619
|
-
debugger;
|
|
27620
27703
|
queriesjson = queries.geoStatusChange(statuschange);
|
|
27621
|
-
_context8.next =
|
|
27704
|
+
_context8.next = 7;
|
|
27622
27705
|
return fetchData({
|
|
27623
27706
|
body: JSON.stringify(queriesjson)
|
|
27624
27707
|
}, __uspsertUrl__);
|
|
27625
27708
|
|
|
27626
|
-
case
|
|
27709
|
+
case 7:
|
|
27627
27710
|
data = _context8.sent;
|
|
27628
|
-
debugger;
|
|
27629
27711
|
return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
27630
27712
|
data: data
|
|
27631
27713
|
}));
|
|
27632
27714
|
|
|
27633
|
-
case
|
|
27634
|
-
_context8.prev =
|
|
27715
|
+
case 11:
|
|
27716
|
+
_context8.prev = 11;
|
|
27635
27717
|
_context8.t0 = _context8["catch"](2);
|
|
27636
27718
|
return _context8.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
27637
27719
|
message: _context8.t0.message
|
|
27638
27720
|
})));
|
|
27639
27721
|
|
|
27640
|
-
case
|
|
27722
|
+
case 14:
|
|
27641
27723
|
case "end":
|
|
27642
27724
|
return _context8.stop();
|
|
27643
27725
|
}
|
|
27644
27726
|
}
|
|
27645
|
-
}, _callee8, null, [[2,
|
|
27727
|
+
}, _callee8, null, [[2, 11]]);
|
|
27646
27728
|
}))); //GEOGRAPHIC_MASTER_MASTER
|
|
27647
27729
|
|
|
27648
27730
|
var GEOGRAPHIC_MASTER_MASTER = createAsyncThunk("geographicSlice/geoMasterMaster", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
|
|
@@ -27711,13 +27793,12 @@ var GEOGRAPHIC_PARENT_CODE = createAsyncThunk("geographicSlice/geoMasterParentCo
|
|
|
27711
27793
|
_ref20 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref20.rejectWithValue;
|
|
27712
27794
|
_context10.prev = 2;
|
|
27713
27795
|
id = payload.id;
|
|
27714
|
-
|
|
27715
|
-
_context10.next = 7;
|
|
27796
|
+
_context10.next = 6;
|
|
27716
27797
|
return fetchData({
|
|
27717
27798
|
body: JSON.stringify(queries.geoMasterParentCode(id))
|
|
27718
27799
|
}, __readDocumentUrl__);
|
|
27719
27800
|
|
|
27720
|
-
case
|
|
27801
|
+
case 6:
|
|
27721
27802
|
data = _context10.sent;
|
|
27722
27803
|
arry = [];
|
|
27723
27804
|
data.result.map(function (val) {
|
|
@@ -27728,25 +27809,113 @@ var GEOGRAPHIC_PARENT_CODE = createAsyncThunk("geographicSlice/geoMasterParentCo
|
|
|
27728
27809
|
label: (_val$geogLevelName6 = val.geogLevelName) !== null && _val$geogLevelName6 !== void 0 ? _val$geogLevelName6 : ""
|
|
27729
27810
|
});
|
|
27730
27811
|
});
|
|
27731
|
-
debugger;
|
|
27732
27812
|
return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
27733
27813
|
data: arry
|
|
27734
27814
|
}));
|
|
27735
27815
|
|
|
27736
|
-
case
|
|
27737
|
-
_context10.prev =
|
|
27816
|
+
case 12:
|
|
27817
|
+
_context10.prev = 12;
|
|
27738
27818
|
_context10.t0 = _context10["catch"](2);
|
|
27739
27819
|
alert("error");
|
|
27740
27820
|
return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
27741
27821
|
message: _context10.t0.message
|
|
27742
27822
|
})));
|
|
27743
27823
|
|
|
27744
|
-
case
|
|
27824
|
+
case 16:
|
|
27745
27825
|
case "end":
|
|
27746
27826
|
return _context10.stop();
|
|
27747
27827
|
}
|
|
27748
27828
|
}
|
|
27749
|
-
}, _callee10, null, [[2,
|
|
27829
|
+
}, _callee10, null, [[2, 12]]);
|
|
27830
|
+
}))); //GEOGRAPIC_INSERT
|
|
27831
|
+
|
|
27832
|
+
var GEOGRAPIC_INSERT = createAsyncThunk("geographicSlice/geoGraphicInsert", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
|
|
27833
|
+
var payload,
|
|
27834
|
+
_ref22,
|
|
27835
|
+
rejectWithValue,
|
|
27836
|
+
dataList,
|
|
27837
|
+
queriesjson,
|
|
27838
|
+
data,
|
|
27839
|
+
_args11 = arguments;
|
|
27840
|
+
|
|
27841
|
+
return regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
27842
|
+
while (1) {
|
|
27843
|
+
switch (_context11.prev = _context11.next) {
|
|
27844
|
+
case 0:
|
|
27845
|
+
payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
|
|
27846
|
+
_ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
|
|
27847
|
+
_context11.prev = 2;
|
|
27848
|
+
dataList = payload.dataList;
|
|
27849
|
+
queriesjson = generateJson(dataList);
|
|
27850
|
+
_context11.next = 7;
|
|
27851
|
+
return fetchData({
|
|
27852
|
+
body: JSON.stringify(queriesjson)
|
|
27853
|
+
}, __uspsertUrl__);
|
|
27854
|
+
|
|
27855
|
+
case 7:
|
|
27856
|
+
data = _context11.sent;
|
|
27857
|
+
return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
27858
|
+
data: data
|
|
27859
|
+
}));
|
|
27860
|
+
|
|
27861
|
+
case 11:
|
|
27862
|
+
_context11.prev = 11;
|
|
27863
|
+
_context11.t0 = _context11["catch"](2);
|
|
27864
|
+
return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
27865
|
+
message: _context11.t0.message
|
|
27866
|
+
})));
|
|
27867
|
+
|
|
27868
|
+
case 14:
|
|
27869
|
+
case "end":
|
|
27870
|
+
return _context11.stop();
|
|
27871
|
+
}
|
|
27872
|
+
}
|
|
27873
|
+
}, _callee11, null, [[2, 11]]);
|
|
27874
|
+
})));
|
|
27875
|
+
var GEOGRAPHIC_SINGLE_READ = createAsyncThunk("geographicSlice/geoGraphicSingleRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
|
|
27876
|
+
var payload,
|
|
27877
|
+
_ref24,
|
|
27878
|
+
rejectWithValue,
|
|
27879
|
+
getState,
|
|
27880
|
+
_key,
|
|
27881
|
+
data,
|
|
27882
|
+
res,
|
|
27883
|
+
_args12 = arguments;
|
|
27884
|
+
|
|
27885
|
+
return regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
27886
|
+
while (1) {
|
|
27887
|
+
switch (_context12.prev = _context12.next) {
|
|
27888
|
+
case 0:
|
|
27889
|
+
payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
|
|
27890
|
+
_ref24 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref24.rejectWithValue, getState = _ref24.getState;
|
|
27891
|
+
_context12.prev = 2;
|
|
27892
|
+
_key = payload._key;
|
|
27893
|
+
getState();
|
|
27894
|
+
_context12.next = 8;
|
|
27895
|
+
return fetchData({
|
|
27896
|
+
body: JSON.stringify(queries.editGeoGraphicSingleRead(_key))
|
|
27897
|
+
}, __readDocumentUrl__);
|
|
27898
|
+
|
|
27899
|
+
case 8:
|
|
27900
|
+
data = _context12.sent;
|
|
27901
|
+
res = generateReadJSON(data.result[0]);
|
|
27902
|
+
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
27903
|
+
data: res
|
|
27904
|
+
}));
|
|
27905
|
+
|
|
27906
|
+
case 13:
|
|
27907
|
+
_context12.prev = 13;
|
|
27908
|
+
_context12.t0 = _context12["catch"](2);
|
|
27909
|
+
return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
27910
|
+
message: _context12.t0.message
|
|
27911
|
+
})));
|
|
27912
|
+
|
|
27913
|
+
case 16:
|
|
27914
|
+
case "end":
|
|
27915
|
+
return _context12.stop();
|
|
27916
|
+
}
|
|
27917
|
+
}
|
|
27918
|
+
}, _callee12, null, [[2, 13]]);
|
|
27750
27919
|
})));
|
|
27751
27920
|
var geoGraphicSlice = createSlice({
|
|
27752
27921
|
name: "geographicApiSlice",
|
|
@@ -27760,7 +27929,9 @@ var geoGraphicSlice = createSlice({
|
|
|
27760
27929
|
geoPincodeRead: _objectSpread2({}, defaultState.List),
|
|
27761
27930
|
geoStatusChange: _objectSpread2({}, defaultState.List),
|
|
27762
27931
|
geoMasterMaster: _objectSpread2({}, defaultState.List),
|
|
27763
|
-
geoMasterParentCode: _objectSpread2({}, defaultState.List)
|
|
27932
|
+
geoMasterParentCode: _objectSpread2({}, defaultState.List),
|
|
27933
|
+
geoGraphicInsert: _objectSpread2({}, defaultState.List),
|
|
27934
|
+
geoGraphicSingleRead: _objectSpread2({}, defaultState.List)
|
|
27764
27935
|
},
|
|
27765
27936
|
extraReducers: (_extraReducers$2 = {}, _defineProperty(_extraReducers$2, GEOGRAPHIC_TYPE_READ.fulfilled, function (state, action) {
|
|
27766
27937
|
state.geoGraphicTypeRead.loading = false, state.geoGraphicTypeRead.error = false, state.geoGraphicTypeRead = action.payload;
|
|
@@ -27822,6 +27993,18 @@ var geoGraphicSlice = createSlice({
|
|
|
27822
27993
|
state.geoMasterParentCode.loading = true, state.geoMasterParentCode.error = false, state.geoMasterParentCode.loading = true;
|
|
27823
27994
|
}), _defineProperty(_extraReducers$2, GEOGRAPHIC_PARENT_CODE.rejected, function (state, action) {
|
|
27824
27995
|
state.geoMasterParentCode.loading = false, state.geoMasterParentCode.error = true, state.geoMasterParentCode = action.payload;
|
|
27996
|
+
}), _defineProperty(_extraReducers$2, GEOGRAPIC_INSERT.fulfilled, function (state, action) {
|
|
27997
|
+
state.geoGraphicInsert.loading = false, state.geoGraphicInsert.error = false, state.geoGraphicInsert = action.payload;
|
|
27998
|
+
}), _defineProperty(_extraReducers$2, GEOGRAPIC_INSERT.pending, function (state, action) {
|
|
27999
|
+
state.geoGraphicInsert.loading = true, state.geoGraphicInsert.error = false, state.geoGraphicInsert.loading = true;
|
|
28000
|
+
}), _defineProperty(_extraReducers$2, GEOGRAPIC_INSERT.rejected, function (state, action) {
|
|
28001
|
+
state.geoGraphicInsert.loading = false, state.geoGraphicInsert.error = true, state.geoGraphicInsert = action.payload;
|
|
28002
|
+
}), _defineProperty(_extraReducers$2, GEOGRAPHIC_SINGLE_READ.fulfilled, function (state, action) {
|
|
28003
|
+
state.geoGraphicSingleRead.loading = false, state.geoGraphicSingleRead.error = false, state.geoGraphicSingleRead = action.payload;
|
|
28004
|
+
}), _defineProperty(_extraReducers$2, GEOGRAPHIC_SINGLE_READ.pending, function (state, action) {
|
|
28005
|
+
state.geoGraphicSingleRead.loading = true, state.geoGraphicSingleRead.error = false, state.geoGraphicSingleRead.loading = true;
|
|
28006
|
+
}), _defineProperty(_extraReducers$2, GEOGRAPHIC_SINGLE_READ.rejected, function (state, action) {
|
|
28007
|
+
state.geoGraphicSingleRead.loading = false, state.geoGraphicSingleRead.error = true, state.geoGraphicSingleRead = action.payload;
|
|
27825
28008
|
}), _extraReducers$2)
|
|
27826
28009
|
});
|
|
27827
28010
|
var geoGraphicActions = {
|
|
@@ -27834,7 +28017,9 @@ var geoGraphicActions = {
|
|
|
27834
28017
|
GEOGRAPHIC_PINCODE_READ: GEOGRAPHIC_PINCODE_READ,
|
|
27835
28018
|
GEOGRAPHIC_STATUS_CHANGE: GEOGRAPHIC_STATUS_CHANGE,
|
|
27836
28019
|
GEOGRAPHIC_MASTER_MASTER: GEOGRAPHIC_MASTER_MASTER,
|
|
27837
|
-
GEOGRAPHIC_PARENT_CODE: GEOGRAPHIC_PARENT_CODE
|
|
28020
|
+
GEOGRAPHIC_PARENT_CODE: GEOGRAPHIC_PARENT_CODE,
|
|
28021
|
+
GEOGRAPIC_INSERT: GEOGRAPIC_INSERT,
|
|
28022
|
+
GEOGRAPHIC_SINGLE_READ: GEOGRAPHIC_SINGLE_READ
|
|
27838
28023
|
};
|
|
27839
28024
|
var geoGraphicSlice$1 = geoGraphicSlice.reducer;
|
|
27840
28025
|
|
|
@@ -28005,7 +28190,7 @@ var slotAvailabilityApiActions = {
|
|
|
28005
28190
|
READ_SLOT: READ_SLOT,
|
|
28006
28191
|
SLOT_AVAILABILITY: SLOT_AVAILABILITY
|
|
28007
28192
|
};
|
|
28008
|
-
var
|
|
28193
|
+
var slotAvailabilityApiSlice$1 = slotAvailabilityApiSlice.reducer;
|
|
28009
28194
|
|
|
28010
28195
|
var query = {
|
|
28011
28196
|
modifyStatusAppointment: function modifyStatusAppointment(data) {
|
|
@@ -28232,14 +28417,78 @@ var APPOINTMENT_MODIFY_STATUS = createAsyncThunk("appointmentApiSlice/modifyStat
|
|
|
28232
28417
|
}
|
|
28233
28418
|
}
|
|
28234
28419
|
}, _callee4, null, [[2, 9]]);
|
|
28420
|
+
}))); // REASON_FOR_APPT_CANCEL_MODIFY
|
|
28421
|
+
|
|
28422
|
+
var REASON_FOR_APPT_CANCEL_MODIFY = createAsyncThunk("appointmentReducer/getReasonForApptCancelModify", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
28423
|
+
var payload,
|
|
28424
|
+
_ref10,
|
|
28425
|
+
rejectWithValue,
|
|
28426
|
+
body,
|
|
28427
|
+
data,
|
|
28428
|
+
returnData,
|
|
28429
|
+
_data$result,
|
|
28430
|
+
_args5 = arguments;
|
|
28431
|
+
|
|
28432
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
28433
|
+
while (1) {
|
|
28434
|
+
switch (_context5.prev = _context5.next) {
|
|
28435
|
+
case 0:
|
|
28436
|
+
payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
28437
|
+
_ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
|
|
28438
|
+
_context5.prev = 2;
|
|
28439
|
+
body = {
|
|
28440
|
+
db_name: dbName,
|
|
28441
|
+
entity: "CodingMaster",
|
|
28442
|
+
filter: "CodingMaster.Type=='".concat(payload.type, "' && CodingMaster.activestatus==true"),
|
|
28443
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type')"
|
|
28444
|
+
};
|
|
28445
|
+
_context5.next = 6;
|
|
28446
|
+
return fetchData({
|
|
28447
|
+
body: JSON.stringify(body)
|
|
28448
|
+
}, __readDocumentUrl__);
|
|
28449
|
+
|
|
28450
|
+
case 6:
|
|
28451
|
+
data = _context5.sent;
|
|
28452
|
+
returnData = [];
|
|
28453
|
+
|
|
28454
|
+
if (Array.isArray(data === null || data === void 0 ? void 0 : data.result)) {
|
|
28455
|
+
data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : _data$result.map(function (_) {
|
|
28456
|
+
returnData.push({
|
|
28457
|
+
label: _ === null || _ === void 0 ? void 0 : _.display,
|
|
28458
|
+
value: _ === null || _ === void 0 ? void 0 : _.id,
|
|
28459
|
+
id: _ === null || _ === void 0 ? void 0 : _.id,
|
|
28460
|
+
code: _ === null || _ === void 0 ? void 0 : _.code,
|
|
28461
|
+
_id: _ === null || _ === void 0 ? void 0 : _._id
|
|
28462
|
+
});
|
|
28463
|
+
});
|
|
28464
|
+
}
|
|
28465
|
+
|
|
28466
|
+
return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
28467
|
+
data: returnData
|
|
28468
|
+
}));
|
|
28469
|
+
|
|
28470
|
+
case 12:
|
|
28471
|
+
_context5.prev = 12;
|
|
28472
|
+
_context5.t0 = _context5["catch"](2);
|
|
28473
|
+
return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
28474
|
+
message: _context5.t0.message
|
|
28475
|
+
})));
|
|
28476
|
+
|
|
28477
|
+
case 15:
|
|
28478
|
+
case "end":
|
|
28479
|
+
return _context5.stop();
|
|
28480
|
+
}
|
|
28481
|
+
}
|
|
28482
|
+
}, _callee5, null, [[2, 12]]);
|
|
28235
28483
|
})));
|
|
28236
|
-
createSlice({
|
|
28484
|
+
var appointmentApiSlice = createSlice({
|
|
28237
28485
|
name: "appointmentApiSlice",
|
|
28238
28486
|
initialState: {
|
|
28239
28487
|
readAppointment: _objectSpread2({}, defaultState.List),
|
|
28240
28488
|
deleteAppointment: _objectSpread2({}, defaultState.List),
|
|
28241
28489
|
updateAppointment: _objectSpread2({}, defaultState.List),
|
|
28242
|
-
modifyStatusAppoinment: _objectSpread2({}, defaultState.List)
|
|
28490
|
+
modifyStatusAppoinment: _objectSpread2({}, defaultState.List),
|
|
28491
|
+
reasonForApptCancelModify: _objectSpread2({}, defaultState.List)
|
|
28243
28492
|
},
|
|
28244
28493
|
extraReducers: (_extraReducers = {}, _defineProperty(_extraReducers, APPOINTMENT_READ.fulfilled, function (state, action) {
|
|
28245
28494
|
state.readAppointment.loading = false, state.readAppointment.error = false, state.readAppointment = action.payload;
|
|
@@ -28265,14 +28514,22 @@ createSlice({
|
|
|
28265
28514
|
state.modifyStatusAppoinment.loading = true, state.modifyStatusAppoinment.error = false, state.modifyStatusAppoinment.loading = true;
|
|
28266
28515
|
}), _defineProperty(_extraReducers, APPOINTMENT_MODIFY_STATUS.rejected, function (state, action) {
|
|
28267
28516
|
state.modifyStatusAppoinment.loading = false, state.modifyStatusAppoinment.error = true, state.modifyStatusAppoinment = action.payload;
|
|
28517
|
+
}), _defineProperty(_extraReducers, REASON_FOR_APPT_CANCEL_MODIFY.fulfilled, function (state, action) {
|
|
28518
|
+
state.reasonForApptCancelModify.loading = false, state.reasonForApptCancelModify.error = false, state.reasonForApptCancelModify = action.payload;
|
|
28519
|
+
}), _defineProperty(_extraReducers, REASON_FOR_APPT_CANCEL_MODIFY.pending, function (state, action) {
|
|
28520
|
+
state.reasonForApptCancelModify.loading = true, state.reasonForApptCancelModify.error = false, state.reasonForApptCancelModify.loading = true;
|
|
28521
|
+
}), _defineProperty(_extraReducers, REASON_FOR_APPT_CANCEL_MODIFY.rejected, function (state, action) {
|
|
28522
|
+
state.reasonForApptCancelModify.loading = false, state.reasonForApptCancelModify.error = true, state.reasonForApptCancelModify = action.payload;
|
|
28268
28523
|
}), _extraReducers)
|
|
28269
28524
|
});
|
|
28270
28525
|
var appointmentApiActions = {
|
|
28271
28526
|
APPOINTMENT_READ: APPOINTMENT_READ,
|
|
28272
28527
|
APPOINTMENT_DELETE: APPOINTMENT_DELETE,
|
|
28273
28528
|
APPOINTMENT_UPDATE: APPOINTMENT_UPDATE,
|
|
28274
|
-
APPOINTMENT_MODIFY_STATUS: APPOINTMENT_MODIFY_STATUS
|
|
28529
|
+
APPOINTMENT_MODIFY_STATUS: APPOINTMENT_MODIFY_STATUS,
|
|
28530
|
+
REASON_FOR_APPT_CANCEL_MODIFY: REASON_FOR_APPT_CANCEL_MODIFY
|
|
28275
28531
|
};
|
|
28532
|
+
var appointmentApiSlice$1 = appointmentApiSlice.reducer;
|
|
28276
28533
|
|
|
28277
28534
|
var practitionerActions = _objectSpread2({}, practitioner_role_actions);
|
|
28278
28535
|
var locationActions = _objectSpread2({}, location_master_actions);
|
|
@@ -28318,8 +28575,8 @@ var index = combineReducers({
|
|
|
28318
28575
|
scheduleManagementSlice: scheduleManagementSlice$1,
|
|
28319
28576
|
organizationConfigSlice: organizationConfigSlice$1,
|
|
28320
28577
|
organizationConfigMasterSlice: organizationConfigMasterSlice$1,
|
|
28321
|
-
slotAvailabilityApiSlice:
|
|
28322
|
-
appointmentApiSlice: appointmentApiSlice
|
|
28578
|
+
slotAvailabilityApiSlice: slotAvailabilityApiSlice$1,
|
|
28579
|
+
appointmentApiSlice: appointmentApiSlice$1
|
|
28323
28580
|
});
|
|
28324
28581
|
|
|
28325
28582
|
var actions = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, practitionerActions), locationActions), consultActions), ordertypeActions), ordernatureActions), availabilityManagementActions), pendingRescheduleListMasters), organizationMasterActions), signInActionsCall), slotAvailabilityApiActions), appointmentApiActions), organizationConfiActions), organizationConfigMasterAction);
|