primary_care_admin_binder 0.1.50 → 0.1.51
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 +1516 -309
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2235,6 +2235,10 @@ function unwrapResult(action) {
|
|
|
2235
2235
|
// src/index.ts
|
|
2236
2236
|
N();
|
|
2237
2237
|
|
|
2238
|
+
var httpMessage = {
|
|
2239
|
+
OkMessage: "200 Successful",
|
|
2240
|
+
ErroMessage: "500 Internal server error"
|
|
2241
|
+
};
|
|
2238
2242
|
var defaultReject = {
|
|
2239
2243
|
loading: false,
|
|
2240
2244
|
error: true,
|
|
@@ -8920,7 +8924,7 @@ var practitionerActions$1 = {
|
|
|
8920
8924
|
};
|
|
8921
8925
|
var practitionerSlice$1 = practitionerSlice.reducer;
|
|
8922
8926
|
|
|
8923
|
-
var masterQuery$
|
|
8927
|
+
var masterQuery$6 = {
|
|
8924
8928
|
"id_type": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='ALTERNATEIDTYPE' && CodeableConceptMaster.status == true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
8925
8929
|
"id_number": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='RELATIONSHIP'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
8926
8930
|
"prefix": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='NAMEPREFIX'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
@@ -9440,14 +9444,14 @@ var loopMasters$8 = function loopMasters() {
|
|
|
9440
9444
|
while (1) {
|
|
9441
9445
|
switch (_context2.prev = _context2.next) {
|
|
9442
9446
|
case 0:
|
|
9443
|
-
calls = Object.keys(masterQuery$
|
|
9447
|
+
calls = Object.keys(masterQuery$6).map( /*#__PURE__*/function () {
|
|
9444
9448
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(val) {
|
|
9445
9449
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
9446
9450
|
while (1) {
|
|
9447
9451
|
switch (_context.prev = _context.next) {
|
|
9448
9452
|
case 0:
|
|
9449
9453
|
_context.next = 2;
|
|
9450
|
-
return fetchMaster$8(val, masterQuery$
|
|
9454
|
+
return fetchMaster$8(val, masterQuery$6[val]);
|
|
9451
9455
|
|
|
9452
9456
|
case 2:
|
|
9453
9457
|
return _context.abrupt("return", _context.sent);
|
|
@@ -12875,7 +12879,7 @@ var locationActions$1 = {
|
|
|
12875
12879
|
};
|
|
12876
12880
|
var locationSlice$1 = locationSlice.reducer;
|
|
12877
12881
|
|
|
12878
|
-
var masterQuery$
|
|
12882
|
+
var masterQuery$5 = {
|
|
12879
12883
|
locationMasterEntityType: function locationMasterEntityType() {
|
|
12880
12884
|
return {
|
|
12881
12885
|
db_name: dbName$1,
|
|
@@ -13395,7 +13399,7 @@ var LOCATION_MASTERS_ENTITYTYPE = createAsyncThunk("locationMasterSlice/location
|
|
|
13395
13399
|
_context.prev = 2;
|
|
13396
13400
|
_context.next = 5;
|
|
13397
13401
|
return fetchData({
|
|
13398
|
-
body: JSON.stringify(masterQuery$
|
|
13402
|
+
body: JSON.stringify(masterQuery$5.locationMasterEntityType())
|
|
13399
13403
|
}, __readDocumentUrl__);
|
|
13400
13404
|
|
|
13401
13405
|
case 5:
|
|
@@ -13448,7 +13452,7 @@ var LOCATION_MASTERS_ENTITYNAME = createAsyncThunk("locationMasterSlice/location
|
|
|
13448
13452
|
type = payload.type;
|
|
13449
13453
|
_context2.next = 6;
|
|
13450
13454
|
return fetchData({
|
|
13451
|
-
body: JSON.stringify(masterQuery$
|
|
13455
|
+
body: JSON.stringify(masterQuery$5.locationMasterEntityName(type))
|
|
13452
13456
|
}, __readDocumentUrl__);
|
|
13453
13457
|
|
|
13454
13458
|
case 6:
|
|
@@ -13497,7 +13501,7 @@ var LOCATION_MASTERS_LOCATIONTYPE = createAsyncThunk("locationMasterSlice/locati
|
|
|
13497
13501
|
_context3.prev = 2;
|
|
13498
13502
|
_context3.next = 5;
|
|
13499
13503
|
return fetchData({
|
|
13500
|
-
body: JSON.stringify(masterQuery$
|
|
13504
|
+
body: JSON.stringify(masterQuery$5.locationMasterLocationType())
|
|
13501
13505
|
}, __readDocumentUrl__);
|
|
13502
13506
|
|
|
13503
13507
|
case 5:
|
|
@@ -13545,7 +13549,7 @@ var LOCATION_MASTERS_OPERATIONALSTATUS = createAsyncThunk("locationMasterSlice/l
|
|
|
13545
13549
|
_context4.prev = 2;
|
|
13546
13550
|
_context4.next = 5;
|
|
13547
13551
|
return fetchData({
|
|
13548
|
-
body: JSON.stringify(masterQuery$
|
|
13552
|
+
body: JSON.stringify(masterQuery$5.locationMasterOperationalStatus())
|
|
13549
13553
|
}, __readDocumentUrl__);
|
|
13550
13554
|
|
|
13551
13555
|
case 5:
|
|
@@ -13593,7 +13597,7 @@ var LOCATION_MASTERS_PARENT_LOCATION_ID_DESCRIPTION = createAsyncThunk("location
|
|
|
13593
13597
|
_context5.prev = 2;
|
|
13594
13598
|
_context5.next = 5;
|
|
13595
13599
|
return fetchData({
|
|
13596
|
-
body: JSON.stringify(masterQuery$
|
|
13600
|
+
body: JSON.stringify(masterQuery$5.locationMasterParentLocationIdDescription())
|
|
13597
13601
|
}, __readDocumentUrl__);
|
|
13598
13602
|
|
|
13599
13603
|
case 5:
|
|
@@ -13641,7 +13645,7 @@ var LOCATION_MASTERS_LOCATIONROLETYPE = createAsyncThunk("locationMasterSlice/lo
|
|
|
13641
13645
|
_context6.prev = 2;
|
|
13642
13646
|
_context6.next = 5;
|
|
13643
13647
|
return fetchData({
|
|
13644
|
-
body: JSON.stringify(masterQuery$
|
|
13648
|
+
body: JSON.stringify(masterQuery$5.locationMasterLocationRoleType())
|
|
13645
13649
|
}, __readDocumentUrl__);
|
|
13646
13650
|
|
|
13647
13651
|
case 5:
|
|
@@ -13695,7 +13699,7 @@ var LOCATION_MASTER_SPECIALITY = createAsyncThunk("locationMasterSlice/location_
|
|
|
13695
13699
|
id = payload.id;
|
|
13696
13700
|
_context7.next = 6;
|
|
13697
13701
|
return fetchData({
|
|
13698
|
-
body: JSON.stringify(masterQuery$
|
|
13702
|
+
body: JSON.stringify(masterQuery$5.locationMasterSpeciality(id))
|
|
13699
13703
|
}, __readDocumentUrl__);
|
|
13700
13704
|
|
|
13701
13705
|
case 6:
|
|
@@ -13745,7 +13749,7 @@ var LOCATION_MASTER_CONTACTMODE = createAsyncThunk("locationMasterSlice/location
|
|
|
13745
13749
|
_context8.prev = 2;
|
|
13746
13750
|
_context8.next = 5;
|
|
13747
13751
|
return fetchData({
|
|
13748
|
-
body: JSON.stringify(masterQuery$
|
|
13752
|
+
body: JSON.stringify(masterQuery$5.locationMasterContactMode())
|
|
13749
13753
|
}, __readDocumentUrl__);
|
|
13750
13754
|
|
|
13751
13755
|
case 5:
|
|
@@ -13793,7 +13797,7 @@ var LOCATION_MASTER_ISD = createAsyncThunk("locationMasterSlice/location_masters
|
|
|
13793
13797
|
_context9.prev = 2;
|
|
13794
13798
|
_context9.next = 5;
|
|
13795
13799
|
return fetchData({
|
|
13796
|
-
body: JSON.stringify(masterQuery$
|
|
13800
|
+
body: JSON.stringify(masterQuery$5.locationMasterISD())
|
|
13797
13801
|
}, __readDocumentUrl__);
|
|
13798
13802
|
|
|
13799
13803
|
case 5:
|
|
@@ -13841,7 +13845,7 @@ var LOCATION_MASTER_USE = createAsyncThunk("locationMasterSlice/location_masters
|
|
|
13841
13845
|
_context10.prev = 2;
|
|
13842
13846
|
_context10.next = 5;
|
|
13843
13847
|
return fetchData({
|
|
13844
|
-
body: JSON.stringify(masterQuery$
|
|
13848
|
+
body: JSON.stringify(masterQuery$5.locationMasterUse())
|
|
13845
13849
|
}, __readDocumentUrl__);
|
|
13846
13850
|
|
|
13847
13851
|
case 5:
|
|
@@ -13889,7 +13893,7 @@ var LOCATION_MASTER_PRIORITY = createAsyncThunk("locationMasterSlice/location_ma
|
|
|
13889
13893
|
_context11.prev = 2;
|
|
13890
13894
|
_context11.next = 5;
|
|
13891
13895
|
return fetchData({
|
|
13892
|
-
body: JSON.stringify(masterQuery$
|
|
13896
|
+
body: JSON.stringify(masterQuery$5.locationMasterPriority())
|
|
13893
13897
|
}, __readDocumentUrl__);
|
|
13894
13898
|
|
|
13895
13899
|
case 5:
|
|
@@ -17675,134 +17679,134 @@ var queries$f = {
|
|
|
17675
17679
|
// "filter": "DrugMaster.activestatus==true ",
|
|
17676
17680
|
// "return_fields": "{id:DrugMaster.id,_id:DrugMaster._id,DrugCode:DrugMaster.DrugCode,ShortDesc:DrugMaster.ShortDesc,LongDesc:DrugMaster.LongDesc,statusactive:DrugMaster.statusactive,draftstatus:DrugMaster.draftstatus}"
|
|
17677
17681
|
// }`,
|
|
17678
|
-
drug_master: function drug_master(page, perpage) {
|
|
17682
|
+
drug_master: function drug_master(page, perpage, searchQuery) {
|
|
17679
17683
|
return {
|
|
17680
17684
|
db_name: dbName$1,
|
|
17681
17685
|
entity: "DrugMaster",
|
|
17682
|
-
sort: "DrugMaster.
|
|
17683
|
-
filter: "DrugMaster.activestatus==true ",
|
|
17686
|
+
sort: "DrugMaster.createddate desc",
|
|
17687
|
+
filter: "(LIKE(DrugMaster.DrugCode,'%".concat(searchQuery, "%',true) || LIKE(document(DrugMaster.DrugType).longdesc,'%").concat(searchQuery, "%',true) || LIKE(DrugMaster.ShortDesc,'%").concat(searchQuery, "%',true)) && DrugMaster.activestatus == true "),
|
|
17684
17688
|
limit: {
|
|
17685
17689
|
offset: page,
|
|
17686
17690
|
count: perpage
|
|
17687
17691
|
},
|
|
17688
|
-
return_fields: "{
|
|
17692
|
+
return_fields: "merge(DrugMaster,{DrugCode:DrugMaster.DrugCode},{Count:count( for drgmst in DrugMaster filter (LIKE(drgmst.DrugCode,'%".concat(searchQuery, "%',true) || LIKE(document(drgmst.DrugType).longdesc,'%").concat(searchQuery, "%',true) || LIKE(drgmst.ShortDesc,'%").concat(searchQuery, "%',true)) && drgmst.activestatus == true return drgmst._id )},{ShortDesc:DrugMaster.ShortDesc},{DrugClass:DOCUMENT(DrugMaster.DrugClass)},{DrugType:DOCUMENT(DrugMaster.DrugType)},{DrugCategory:DOCUMENT(DrugMaster.DrugCategory)},{FormCode:DOCUMENT(DrugMaster.FormCode)},{StrengthValuesPossible:(for strValPoss in to_array(DrugMaster.StrengthValuesPossible) return merge(strValPoss,{StrengthUOM:document(strValPoss.StrengthUOM)},{StrengthVolumeUoM:document(strValPoss.StrengthVolumeUoM)},{OrderUOMAllowed:(for OrderUOMAllowed in to_array(strValPoss.OrderUOMAllowed) return merge(OrderUOMAllowed,{AllowedOrderDoseUOM:document(OrderUOMAllowed.AllowedOrderDoseUOM)},{AllowedOrderDoseVolUoM:document(OrderUOMAllowed.AllowedOrderDoseVolUoM)}))}))},{RoutesAllowed:document(DrugMaster.RoutesAllowed)})")
|
|
17689
17693
|
};
|
|
17690
17694
|
},
|
|
17691
17695
|
drug_master_upsert: [{
|
|
17692
|
-
|
|
17693
|
-
|
|
17694
|
-
|
|
17695
|
-
|
|
17696
|
-
|
|
17697
|
-
|
|
17698
|
-
|
|
17699
|
-
|
|
17700
|
-
|
|
17701
|
-
|
|
17702
|
-
|
|
17703
|
-
|
|
17696
|
+
db_name: dbName$1,
|
|
17697
|
+
entity: "DrugMaster",
|
|
17698
|
+
is_metadata: true,
|
|
17699
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
17700
|
+
doc: (_doc = {
|
|
17701
|
+
_id: "string",
|
|
17702
|
+
id: "number",
|
|
17703
|
+
DrugCode: "string",
|
|
17704
|
+
ShortDesc: "string",
|
|
17705
|
+
LongDesc: "string",
|
|
17706
|
+
Formulary: "boolean",
|
|
17707
|
+
DrugSynonyms: "string",
|
|
17704
17708
|
//Array of string
|
|
17705
|
-
|
|
17706
|
-
|
|
17707
|
-
|
|
17708
|
-
|
|
17709
|
-
|
|
17710
|
-
|
|
17709
|
+
DrugClass: "string",
|
|
17710
|
+
DrugCategory: "string",
|
|
17711
|
+
DrugType: "string",
|
|
17712
|
+
FormCode: "string",
|
|
17713
|
+
RoutesAllowed: "array",
|
|
17714
|
+
DefaultRouteCode: "string",
|
|
17711
17715
|
//AVAILABLE STRENGTHS
|
|
17712
|
-
|
|
17713
|
-
|
|
17714
|
-
|
|
17715
|
-
|
|
17716
|
-
|
|
17717
|
-
|
|
17718
|
-
|
|
17719
|
-
|
|
17720
|
-
|
|
17721
|
-
|
|
17716
|
+
StrengthValuesPossible: [{
|
|
17717
|
+
StrengthValue: "number",
|
|
17718
|
+
StrengthUOM: "string",
|
|
17719
|
+
StrengthVolume: "number",
|
|
17720
|
+
StrengthVolumeUoM: "string",
|
|
17721
|
+
OrderUOMAllowed: [{
|
|
17722
|
+
AllowedOrderDoseVal: "number",
|
|
17723
|
+
AllowedOrderDoseUOM: "string",
|
|
17724
|
+
AllowedOrderDoseVolVal: "number",
|
|
17725
|
+
AllowedOrderDoseVolUoM: "string"
|
|
17722
17726
|
}]
|
|
17723
17727
|
}],
|
|
17724
17728
|
//Drug Other Attributes
|
|
17725
|
-
|
|
17726
|
-
|
|
17727
|
-
|
|
17728
|
-
|
|
17729
|
-
|
|
17729
|
+
TrialDrug: "boolean",
|
|
17730
|
+
Additive: "boolean",
|
|
17731
|
+
ApplicableForCompounding: "boolean",
|
|
17732
|
+
DispenseviaprescriptionOnly: "boolean",
|
|
17733
|
+
CounsellingRequired: "boolean",
|
|
17730
17734
|
//Alternate drugs
|
|
17731
|
-
|
|
17735
|
+
AlternateDrugs: "array",
|
|
17732
17736
|
//INSTRUCTIONS
|
|
17733
|
-
|
|
17734
|
-
|
|
17735
|
-
|
|
17736
|
-
|
|
17737
|
-
|
|
17738
|
-
|
|
17739
|
-
|
|
17740
|
-
|
|
17741
|
-
|
|
17742
|
-
|
|
17743
|
-
|
|
17744
|
-
|
|
17737
|
+
Instruction_FrequencyRules: [{
|
|
17738
|
+
_id: "string",
|
|
17739
|
+
id: "number",
|
|
17740
|
+
encountertype: "string",
|
|
17741
|
+
gendercode: "string",
|
|
17742
|
+
agegroup: "string",
|
|
17743
|
+
agecatgcode: "array",
|
|
17744
|
+
OrderInstr: [{
|
|
17745
|
+
patientInst: "string",
|
|
17746
|
+
practionerInst: "string",
|
|
17747
|
+
prepInstr: "string",
|
|
17748
|
+
deptInstr: "string"
|
|
17745
17749
|
}],
|
|
17746
|
-
|
|
17750
|
+
setuptypeInd: "string",
|
|
17747
17751
|
//No use
|
|
17748
|
-
|
|
17749
|
-
|
|
17750
|
-
|
|
17751
|
-
|
|
17752
|
+
serviceapplicability: "string",
|
|
17753
|
+
ordercatalog: "string",
|
|
17754
|
+
freqappl: "boolean",
|
|
17755
|
+
dfltfreqValue: "number",
|
|
17752
17756
|
//Default Frequency number
|
|
17753
|
-
|
|
17757
|
+
dfltfreqValueUnit: "string",
|
|
17754
17758
|
//Default Frequency sel
|
|
17755
|
-
|
|
17759
|
+
dfltfreqRate: "number",
|
|
17756
17760
|
//Dose number
|
|
17757
|
-
|
|
17761
|
+
dfltfreqRateUnit: "string",
|
|
17758
17762
|
//Dose select
|
|
17759
|
-
|
|
17763
|
+
dfltduration: "number",
|
|
17760
17764
|
//valu
|
|
17761
|
-
|
|
17765
|
+
dfltdurationType: "string",
|
|
17762
17766
|
//select
|
|
17763
|
-
|
|
17767
|
+
maxdurnallowedinDays: "number"
|
|
17764
17768
|
}],
|
|
17765
17769
|
//FREQUENCY RULES
|
|
17766
17770
|
//DISPENSE RULES
|
|
17767
|
-
|
|
17768
|
-
|
|
17769
|
-
|
|
17770
|
-
|
|
17771
|
-
|
|
17772
|
-
|
|
17773
|
-
|
|
17774
|
-
|
|
17775
|
-
|
|
17776
|
-
|
|
17777
|
-
|
|
17771
|
+
DrugDispRules: [{
|
|
17772
|
+
_id: "string",
|
|
17773
|
+
id: "number",
|
|
17774
|
+
DrugCode: "string",
|
|
17775
|
+
MaxDispDurnRulebyEnctype: [{
|
|
17776
|
+
EncounterType: "string",
|
|
17777
|
+
MaxDispDurationVal: "number",
|
|
17778
|
+
MaxDispDurationUOM: "string",
|
|
17779
|
+
Action: "string",
|
|
17780
|
+
ActionMessage: "string",
|
|
17781
|
+
Status: "boolean"
|
|
17778
17782
|
}]
|
|
17779
17783
|
}],
|
|
17780
17784
|
//STATUS
|
|
17781
|
-
|
|
17782
|
-
|
|
17783
|
-
|
|
17784
|
-
|
|
17785
|
-
|
|
17785
|
+
Status: "string",
|
|
17786
|
+
EffectiveFrom: "number",
|
|
17787
|
+
EffectiveTo: "number",
|
|
17788
|
+
InactiveReason: "string",
|
|
17789
|
+
draftstatus: "boolean",
|
|
17786
17790
|
//No use
|
|
17787
|
-
|
|
17788
|
-
|
|
17789
|
-
|
|
17790
|
-
|
|
17791
|
-
|
|
17792
|
-
|
|
17791
|
+
Charge: "boolean",
|
|
17792
|
+
OrderUOMAllowed: "string",
|
|
17793
|
+
DoseRoundUpVal: "number",
|
|
17794
|
+
AdminUOM: "string",
|
|
17795
|
+
TotalVolContent: "string",
|
|
17796
|
+
TotalVolContentUoM: "string"
|
|
17793
17797
|
}, _defineProperty(_doc, "FormCode", "string"), _defineProperty(_doc, "IVFluid", "boolean"), _defineProperty(_doc, "DfltInfuseOverDurationvalue", "number"), _defineProperty(_doc, "DfltInfuseOverDurationType", "string"), _defineProperty(_doc, "DfltFluidCode", "string"), _defineProperty(_doc, "InactiveDate", "number"), _defineProperty(_doc, "InactiveByid", "string"), _defineProperty(_doc, "DispenseAlternateDrug", "boolean"), _defineProperty(_doc, "SpecialInstructionText", "array"), _defineProperty(_doc, "DrugImageID", "number"), _defineProperty(_doc, "DrugItem", "boolean"), _defineProperty(_doc, "SourceOfDrugOrderCatalog", "string"), _defineProperty(_doc, "DrugGenericId", "string"), _defineProperty(_doc, "IngredientListId", "string"), _defineProperty(_doc, "statusactive", "boolean"), _doc)
|
|
17794
17798
|
}],
|
|
17795
|
-
status_update_drug_master: function status_update_drug_master(
|
|
17799
|
+
status_update_drug_master: function status_update_drug_master(key, status) {
|
|
17796
17800
|
return [{
|
|
17797
|
-
|
|
17798
|
-
|
|
17799
|
-
|
|
17800
|
-
|
|
17801
|
+
db_name: dbName$1,
|
|
17802
|
+
entity: "DrugMaster",
|
|
17803
|
+
filter: {
|
|
17804
|
+
_key: key
|
|
17801
17805
|
},
|
|
17802
|
-
|
|
17803
|
-
|
|
17804
|
-
|
|
17805
|
-
|
|
17806
|
+
is_metadata: true,
|
|
17807
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
17808
|
+
doc: {
|
|
17809
|
+
status: status
|
|
17806
17810
|
}
|
|
17807
17811
|
}];
|
|
17808
17812
|
},
|
|
@@ -17815,20 +17819,20 @@ var queries$f = {
|
|
|
17815
17819
|
// "return_fields": "merge(DrugMaster,{Status:document(DrugMaster.Status).display},{DrugClass:document(DrugMaster.DrugClass)},{DrugType:document(DrugMaster.DrugType)},{DrugCategory:document(DrugMaster.DrugCategory)},{FormCode:document(DrugMaster.FormCode)},{DefaultRouteCode:document(DrugMaster.DefaultRouteCode)},{RoutesAllowed:document(DrugMaster.RoutesAllowed)},{DfltInfuseOverDurationType:document(DrugMaster.DfltInfuseOverDurationType)},{Instruction: (for i in CA_OrderCatalogByEncounterTypeAge filter i._id in DrugMaster.Instruction return merge(i,{encountertype: (for en in CodingMaster filter en._id == i.encountertype return en)},{gendercode:(for gen in CodingMaster filter gen._id == i.gendercode return gen)},{agegroup:(for ag in AgeRanges filter ag._id == i.agegroup return ag)},{agecatgcode:(for ac in AgeCategory filter ac._id in i.agecatgcode return ac)},{dfltfreqValueUnit:(for df in FrequencyMaster filter df._id == i.dfltfreqValueUnit return df)},{dfltfreqRateUnit:(for dfr in DrugUOM filter dfr._id == i.dfltfreqRateUnit return dfr)},{dfltdurationType:(for ddt in DrugUOM filter ddt._id == i.dfltdurationType return ddt)}))},{FrequencyRules: (for fr in DrugDefaultFeqRules filter fr._id in DrugMaster.FrequencyRules return merge(fr,{DfltFreqbyPatAttrib:(for dfpa in fr.DfltFreqbyPatAttrib return merge(dfpa,{encountertype:document(dfpa.encountertype)},{AgeCatgCode:document(dfpa.AgeCatgCode)},{DfltInfuseOverDurationType:document(dfpa.DfltInfuseOverDurationType)},{agegroup:document(dfpa.agegroup)},{ageunit:document(dfpa.ageunit)},{dfltdoseUOM:document(dfpa.dfltdoseUOM)},{dfltdurnUOM:document(dfpa.dfltdurnUOM)},{dfltfreqcode:document(dfpa.dfltfreqcode)}))}))},{DrugDispRules:(for dd in DrugDispRules filter dd._id in DrugMaster.DrugDispRules return merge(dd,{MaxDispDurnRulebyEnctype: (for mdd in dd.MaxDispDurnRulebyEnctype return merge(mdd,{Action:(document(mdd.Action).display)},{EncounterType:(for etype in CodingMaster filter etype._id == mdd.EncounterType return etype)},{MaxDispDurationUOM:(for mduom in DrugUOM filter mduom._id == mdd.MaxDispDurationUOM return mduom)}))}))},{StrengthValuesPossible:(for dr in DrugMaster.StrengthValuesPossible return merge(dr,{StrengthUOM:(document(dr.StrengthUOM))},{StrengthVolumeUoM:(document(dr.StrengthVolumeUoM))},{OrderUOMAllowed:(for od in dr.OrderUOMAllowed return merge(od,{AllowedOrderDoseUOM:(document(od.AllowedOrderDoseUOM))},{AllowedOrderDoseVolUoM:(document(od.AllowedOrderDoseVolUoM))}))}))})"
|
|
17816
17820
|
// }
|
|
17817
17821
|
return {
|
|
17818
|
-
|
|
17819
|
-
|
|
17820
|
-
|
|
17821
|
-
|
|
17822
|
+
db_name: dbName$1,
|
|
17823
|
+
entity: "DrugMaster",
|
|
17824
|
+
filter: "DrugMaster.activestatus==true && DrugMaster._id=='".concat(_id, "'"),
|
|
17825
|
+
return_fields: "merge(DrugMaster,{Status:document(DrugMaster.Status).display},{DrugClass:document(DrugMaster.DrugClass)},{DrugType:document(DrugMaster.DrugType)},{DrugCategory:document(DrugMaster.DrugCategory)},{FormCode:document(DrugMaster.FormCode)},{DefaultRouteCode:document(DrugMaster.DefaultRouteCode)},{RoutesAllowed:document(DrugMaster.RoutesAllowed)},{DfltInfuseOverDurationType:document(DrugMaster.DfltInfuseOverDurationType)},{Instruction: (for i in CA_OrderCatalogByEncounterTypeAge filter i._id in DrugMaster.Instruction return merge(i,{encountertype: (for en in CodingMaster filter en._id == i.encountertype return en)},{gendercode:(for gen in CodingMaster filter gen._id == i.gendercode return gen)},{agegroup:(for ag in AgeRanges filter ag._id == i.agegroup return ag)},{agecatgcode:(for ac in AgeCategory filter ac._id in i.agecatgcode return ac)},{dfltfreqValueUnit:(for df in FrequencyMaster filter df._id == i.dfltfreqValueUnit return df)},{dfltfreqRateUnit:(for dfr in DrugUOM filter dfr._id == i.dfltfreqRateUnit return dfr)},{dfltdurationType:(for ddt in DrugUOM filter ddt._id == i.dfltdurationType return ddt)}))},{FrequencyRules: (for fr in DrugDefaultFeqRules filter fr._id in DrugMaster.FrequencyRules return merge(fr,{DfltFreqbyPatAttrib:(for dfpa in fr.DfltFreqbyPatAttrib return merge(dfpa,{encountertype:document(dfpa.encountertype)},{AgeCatgCode:document(dfpa.AgeCatgCode)},{DfltInfuseOverDurationType:document(dfpa.DfltInfuseOverDurationType)},{agegroup:document(dfpa.agegroup)},{ageunit:document(dfpa.ageunit)},{dfltdoseUOM:document(dfpa.dfltdoseUOM)},{dfltdurnUOM:document(dfpa.dfltdurnUOM)},{dfltfreqcode:document(dfpa.dfltfreqcode)}))}))},{mappedItems:(for SIDC in StockItemsbyDrugCode filter SIDC._id in DrugMaster.mappedItems return merge(SIDC, {StockItemCodes:(for ssidc in SIDC.StockItemCodes return merge (ssidc,{stkitemcode:(for sic in DrugItemMaster filter sic._id ==ssidc.stkitemcode return {_id:sic._id,id:sic.id,itemcode:sic.itemcode,shortdesc:sic.shortdesc,longdesc:sic.longdesc})} ))}))},{DrugDispRules:(for dd in DrugDispRules filter dd._id in DrugMaster.DrugDispRules return merge(dd,{MaxDispDurnRulebyEnctype: (for mdd in dd.MaxDispDurnRulebyEnctype return merge(mdd,{Action:(document(mdd.Action).display)},{EncounterType:(for etype in CodingMaster filter etype._id == mdd.EncounterType return etype)},{MaxDispDurationUOM:(for mduom in DrugUOM filter mduom._id == mdd.MaxDispDurationUOM return mduom)}))}))},{StrengthValuesPossible:(for dr in DrugMaster.StrengthValuesPossible return merge(dr,{StrengthUOM:(document(dr.StrengthUOM))},{StrengthVolumeUoM:(document(dr.StrengthVolumeUoM))},{OrderUOMAllowed:(for od in dr.OrderUOMAllowed return merge(od,{AllowedOrderDoseUOM:(document(od.AllowedOrderDoseUOM))},{AllowedOrderDoseVolUoM:(document(od.AllowedOrderDoseVolUoM))}))}))})"
|
|
17822
17826
|
};
|
|
17823
17827
|
},
|
|
17824
17828
|
age_category_by_id: function age_category_by_id(ids) {
|
|
17825
17829
|
// ['${AllowedUnit.join("','")}']
|
|
17826
17830
|
return {
|
|
17827
|
-
|
|
17828
|
-
|
|
17829
|
-
|
|
17830
|
-
|
|
17831
|
-
|
|
17831
|
+
db_name: dbName$1,
|
|
17832
|
+
entity: "AgeCategory",
|
|
17833
|
+
filter: "AgeCategory.activestatus == true && AgeCategory._id in ['".concat(ids.join("','"), "']"),
|
|
17834
|
+
return_fields: "{id:AgeCategory.id, _id:AgeCategory._id, code:AgeCategory.code, age_minimum:AgeCategory.age_minimum, age_maximum:AgeCategory.age_maximum, description:AgeCategory.description,UOM:document(document(AgeCategory.UOM).coding)}",
|
|
17835
|
+
sort: "AgeCategory.description"
|
|
17832
17836
|
};
|
|
17833
17837
|
},
|
|
17834
17838
|
ageCategory: function ageCategory(ageRangeId) {
|
|
@@ -17840,43 +17844,354 @@ var queries$f = {
|
|
|
17840
17844
|
},
|
|
17841
17845
|
return_fields: "DOCUMENT( AgeRanges.AgeCategory)"
|
|
17842
17846
|
};
|
|
17847
|
+
},
|
|
17848
|
+
entityNameOptionsQuery: function entityNameOptionsQuery() {
|
|
17849
|
+
var entityTypeCode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "OT003";
|
|
17850
|
+
return {
|
|
17851
|
+
db_name: dbName$1,
|
|
17852
|
+
entity: "Organization",
|
|
17853
|
+
filter: "FIRST(DOCUMENT(Organization.OrgType)[*].code) == '".concat(entityTypeCode, "' && Organization.active==true && Organization.activestatus== true"),
|
|
17854
|
+
return_fields: "KEEP(Organization,'_id','id','_key','name','entitycode','active','activestatus','isExternal')"
|
|
17855
|
+
};
|
|
17843
17856
|
}
|
|
17844
17857
|
};
|
|
17845
|
-
var
|
|
17846
|
-
|
|
17847
|
-
|
|
17848
|
-
|
|
17849
|
-
|
|
17850
|
-
|
|
17851
|
-
|
|
17852
|
-
|
|
17853
|
-
|
|
17854
|
-
|
|
17855
|
-
|
|
17856
|
-
|
|
17857
|
-
|
|
17858
|
-
|
|
17859
|
-
|
|
17860
|
-
|
|
17861
|
-
|
|
17862
|
-
|
|
17863
|
-
|
|
17864
|
-
|
|
17865
|
-
|
|
17866
|
-
|
|
17867
|
-
|
|
17868
|
-
|
|
17869
|
-
|
|
17870
|
-
|
|
17871
|
-
|
|
17872
|
-
|
|
17873
|
-
|
|
17874
|
-
|
|
17875
|
-
|
|
17876
|
-
|
|
17877
|
-
|
|
17878
|
-
|
|
17879
|
-
|
|
17858
|
+
var masterNewQuery = {
|
|
17859
|
+
code_standara: function code_standara() {
|
|
17860
|
+
return {
|
|
17861
|
+
db_name: dbName$1,
|
|
17862
|
+
entity: "CodingMaster",
|
|
17863
|
+
filter: "CodingMaster.Type=='DBSOURCE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
17864
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
17865
|
+
sort: "CodingMaster.shortdesc"
|
|
17866
|
+
};
|
|
17867
|
+
},
|
|
17868
|
+
drug_category: function drug_category() {
|
|
17869
|
+
return {
|
|
17870
|
+
db_name: dbName$1,
|
|
17871
|
+
entity: "DrugCategory",
|
|
17872
|
+
filter: "DrugCategory.activestatus == true && DrugCategory.status==true",
|
|
17873
|
+
return_fields: "KEEP(DrugCategory,'_key','_id','id','drugcategory','shortdesc','longdesc','status','activestatus')",
|
|
17874
|
+
sort: "DrugCategory.longdesc"
|
|
17875
|
+
};
|
|
17876
|
+
},
|
|
17877
|
+
drug_class: function drug_class() {
|
|
17878
|
+
return {
|
|
17879
|
+
db_name: dbName$1,
|
|
17880
|
+
entity: "DrugClass",
|
|
17881
|
+
filter: "DrugClass.activestatus == true && DrugClass.status == true",
|
|
17882
|
+
return_fields: "KEEP(DrugClass,'_key','_id','id','drugclass','shortdesc','longdesc','status','activestatus')",
|
|
17883
|
+
sort: "DrugClass.longdesc"
|
|
17884
|
+
};
|
|
17885
|
+
},
|
|
17886
|
+
drug_generic: function drug_generic() {
|
|
17887
|
+
return {
|
|
17888
|
+
db_name: dbName$1,
|
|
17889
|
+
entity: "GenericDrugMaster",
|
|
17890
|
+
filter: "GenericDrugMaster.activestatus == true ",
|
|
17891
|
+
limit: {
|
|
17892
|
+
count: 20,
|
|
17893
|
+
offset: 0
|
|
17894
|
+
},
|
|
17895
|
+
return_fields: "keep(GenericDrugMaster,'id','_id','longdesc','shortdesc','activestatus','mappedextsourcedb')",
|
|
17896
|
+
sort: "GenericDrugMaster.shortdesc"
|
|
17897
|
+
};
|
|
17898
|
+
},
|
|
17899
|
+
drug_type: function drug_type() {
|
|
17900
|
+
return {
|
|
17901
|
+
db_name: dbName$1,
|
|
17902
|
+
entity: "DrugType",
|
|
17903
|
+
filter: "DrugType.status==true && DrugType.activestatus == true ",
|
|
17904
|
+
return_fields: "KEEP(DrugType,'_key','_id','id','drugtype','shortdesc','longdesc','status','activestatus')",
|
|
17905
|
+
sort: "DrugType.longdesc"
|
|
17906
|
+
};
|
|
17907
|
+
},
|
|
17908
|
+
form: function form() {
|
|
17909
|
+
return {
|
|
17910
|
+
db_name: dbName$1,
|
|
17911
|
+
entity: "DosageForm",
|
|
17912
|
+
filter: "DosageForm.activestatus == true && DosageForm.status==true",
|
|
17913
|
+
return_fields: "KEEP(DosageForm,'_key','_id','id','dosageform','shortdesc','longdesc','status','activestatus')",
|
|
17914
|
+
sort: "DosageForm.longdesc"
|
|
17915
|
+
};
|
|
17916
|
+
},
|
|
17917
|
+
synonym_type: function synonym_type() {
|
|
17918
|
+
return {
|
|
17919
|
+
db_name: dbName$1,
|
|
17920
|
+
entity: "CodingMaster",
|
|
17921
|
+
filter: "CodingMaster.Type=='SYNONYMTYPE' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
17922
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
17923
|
+
sort: "CodingMaster.display"
|
|
17924
|
+
};
|
|
17925
|
+
},
|
|
17926
|
+
source: function source() {
|
|
17927
|
+
return {
|
|
17928
|
+
db_name: dbName$1,
|
|
17929
|
+
entity: "CodingMaster",
|
|
17930
|
+
filter: "CodingMaster.Type=='ALIASSOURCE' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
17931
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
17932
|
+
sort: "CodingMaster.display"
|
|
17933
|
+
};
|
|
17934
|
+
},
|
|
17935
|
+
drug_uom: function drug_uom() {
|
|
17936
|
+
return {
|
|
17937
|
+
db_name: dbName$1,
|
|
17938
|
+
entity: "CodingMaster",
|
|
17939
|
+
filter: "CodingMaster.Type=='DRUGUOMCODE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
17940
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
17941
|
+
sort: "CodingMaster.shortdesc"
|
|
17942
|
+
};
|
|
17943
|
+
},
|
|
17944
|
+
default_route: function default_route() {
|
|
17945
|
+
return {
|
|
17946
|
+
db_name: dbName$1,
|
|
17947
|
+
entity: "DrugRoutes",
|
|
17948
|
+
filter: "DrugRoutes.activestatus==true && DrugRoutes.status == true",
|
|
17949
|
+
return_fields: "kEEP(DrugRoutes,'id','_id','_key','routecode','shortdesc','longdesc','status','activestatus')",
|
|
17950
|
+
sort: "DrugRoutes.shortdesc"
|
|
17951
|
+
};
|
|
17952
|
+
},
|
|
17953
|
+
frequency: function frequency() {
|
|
17954
|
+
return {
|
|
17955
|
+
db_name: dbName$1,
|
|
17956
|
+
entity: "FrequencyMaster",
|
|
17957
|
+
filter: "FrequencyMaster.activestatus==true && FrequencyMaster.status == true",
|
|
17958
|
+
return_fields: "kEEP(FrequencyMaster,'id','_id','_key','freqcode','shortdesc','longdesc','status','activestatus')",
|
|
17959
|
+
sort: "CodingMaster.shortdesc"
|
|
17960
|
+
};
|
|
17961
|
+
},
|
|
17962
|
+
routes_allowed: function routes_allowed() {
|
|
17963
|
+
return {
|
|
17964
|
+
db_name: dbName$1,
|
|
17965
|
+
entity: "DrugRoutes",
|
|
17966
|
+
filter: "DrugRoutes.activestatus==true && DrugRoutes.status == true",
|
|
17967
|
+
return_fields: "kEEP(DrugRoutes,'id','_id','_key','routecode','shortdesc','longdesc','status','activestatus')",
|
|
17968
|
+
sort: "DrugRoutes.shortdesc"
|
|
17969
|
+
};
|
|
17970
|
+
},
|
|
17971
|
+
drug_followUom: function drug_followUom() {
|
|
17972
|
+
return {
|
|
17973
|
+
db_name: dbName$1,
|
|
17974
|
+
entity: "CodingMaster",
|
|
17975
|
+
filter: "CodingMaster.Type=='FOLLOWUOM' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
17976
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
17977
|
+
sort: "CodingMaster.shortdesc"
|
|
17978
|
+
};
|
|
17979
|
+
},
|
|
17980
|
+
action: function action() {
|
|
17981
|
+
return {
|
|
17982
|
+
db_name: dbName$1,
|
|
17983
|
+
entity: "CodingMaster",
|
|
17984
|
+
filter: "CodingMaster.Type=='DRUGACTION' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
17985
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
17986
|
+
sort: "CodingMaster.shortdesc"
|
|
17987
|
+
};
|
|
17988
|
+
},
|
|
17989
|
+
instruction_type: function instruction_type() {
|
|
17990
|
+
return {
|
|
17991
|
+
db_name: dbName$1,
|
|
17992
|
+
entity: "CodingMaster",
|
|
17993
|
+
filter: "CodingMaster.Type=='INSTRUCTIONTYPE' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
17994
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
17995
|
+
sort: "CodingMaster.display"
|
|
17996
|
+
};
|
|
17997
|
+
},
|
|
17998
|
+
drug_status: function drug_status() {
|
|
17999
|
+
return {
|
|
18000
|
+
db_name: dbName$1,
|
|
18001
|
+
entity: "CodingMaster",
|
|
18002
|
+
filter: "CodingMaster.Type=='DRUGSTATUS' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
18003
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
18004
|
+
sort: "CodingMaster.display"
|
|
18005
|
+
};
|
|
18006
|
+
},
|
|
18007
|
+
entity_type: function entity_type() {
|
|
18008
|
+
return {
|
|
18009
|
+
db_name: dbName$1,
|
|
18010
|
+
entity: "CodingMaster",
|
|
18011
|
+
filter: "CodingMaster.Type=='ORGTYPE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18012
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status','shortdesc','activestatus')",
|
|
18013
|
+
sort: "CodingMaster.display"
|
|
18014
|
+
};
|
|
18015
|
+
},
|
|
18016
|
+
applicability: function applicability() {
|
|
18017
|
+
return {
|
|
18018
|
+
db_name: dbName$1,
|
|
18019
|
+
entity: "CodingMaster",
|
|
18020
|
+
filter: "CodingMaster.Type=='APPLICABLEUOM' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
18021
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
18022
|
+
sort: "CodingMaster.display"
|
|
18023
|
+
};
|
|
18024
|
+
},
|
|
18025
|
+
privilege_type: function privilege_type() {
|
|
18026
|
+
return {
|
|
18027
|
+
db_name: dbName$1,
|
|
18028
|
+
entity: "CodingMaster",
|
|
18029
|
+
filter: "CodingMaster.Type == 'PRIVILEGETYPE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18030
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
18031
|
+
sort: "CodingMaster.shortdesc"
|
|
18032
|
+
};
|
|
18033
|
+
},
|
|
18034
|
+
rule_type: function rule_type() {
|
|
18035
|
+
return {
|
|
18036
|
+
db_name: dbName$1,
|
|
18037
|
+
entity: "CodingMaster",
|
|
18038
|
+
filter: "CodingMaster.Type == 'RULETYPE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18039
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
18040
|
+
sort: "CodingMaster.shortdesc"
|
|
18041
|
+
};
|
|
18042
|
+
},
|
|
18043
|
+
round_off_type: function round_off_type() {
|
|
18044
|
+
return {
|
|
18045
|
+
db_name: dbName$1,
|
|
18046
|
+
entity: "CodingMaster",
|
|
18047
|
+
filter: "CodingMaster.Type=='ROUNDOFFTYPE' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
18048
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
18049
|
+
sort: "CodingMaster.display"
|
|
18050
|
+
};
|
|
18051
|
+
},
|
|
18052
|
+
drug_code: function drug_code() {
|
|
18053
|
+
return {
|
|
18054
|
+
db_name: dbName$1,
|
|
18055
|
+
entity: "DrugMaster",
|
|
18056
|
+
filter: "DrugMaster.activestatus == true ",
|
|
18057
|
+
limit: {
|
|
18058
|
+
count: 20,
|
|
18059
|
+
offset: 0
|
|
18060
|
+
},
|
|
18061
|
+
return_fields: "keep(DrugMaster,'_id','id','_key','DrugCode','ShortDesc','StrengthValuesPossible','activestatus')",
|
|
18062
|
+
sort: "DrugMaster.shortdesc"
|
|
18063
|
+
};
|
|
18064
|
+
},
|
|
18065
|
+
item_code: function item_code(_ref) {
|
|
18066
|
+
var id = _ref.id;
|
|
18067
|
+
return {
|
|
18068
|
+
db_name: dbName$1,
|
|
18069
|
+
entity: "DrugMaster",
|
|
18070
|
+
filter: "DrugMaster._id !='".concat(id, "' && DrugMaster.activestatus == true && DrugMaster.IsDispensible == true"),
|
|
18071
|
+
limit: {
|
|
18072
|
+
count: 20,
|
|
18073
|
+
offset: 0
|
|
18074
|
+
},
|
|
18075
|
+
return_fields: "keep(DrugMaster,'_id','id','_key','DrugCode', 'ShortDesc','StrengthValuesPossible','activestatus')",
|
|
18076
|
+
sort: "DrugMaster.shortdesc"
|
|
18077
|
+
};
|
|
18078
|
+
},
|
|
18079
|
+
return_reason: function return_reason() {
|
|
18080
|
+
return {
|
|
18081
|
+
db_name: dbName$1,
|
|
18082
|
+
entity: "CodingMaster",
|
|
18083
|
+
filter: "CodingMaster.Type=='MEDRETURNREASON' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
18084
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
18085
|
+
sort: "CodingMaster.display"
|
|
18086
|
+
};
|
|
18087
|
+
},
|
|
18088
|
+
duration_uom: function duration_uom() {
|
|
18089
|
+
return {
|
|
18090
|
+
db_name: dbName$1,
|
|
18091
|
+
entity: "CodingMaster",
|
|
18092
|
+
filter: "CodingMaster.Type=='DURATIONUOM' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18093
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
18094
|
+
sort: "CodingMaster.shortdesc"
|
|
18095
|
+
};
|
|
18096
|
+
}
|
|
18097
|
+
};
|
|
18098
|
+
var drugCatalogMasterQuery = {
|
|
18099
|
+
drugCatalogMasterRead: function drugCatalogMasterRead(page, perPage) {
|
|
18100
|
+
var searchQuery = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
|
18101
|
+
return {
|
|
18102
|
+
db_name: dbName$1,
|
|
18103
|
+
entity: "DrugMaster",
|
|
18104
|
+
filter: "(LIKE(DrugMaster.DrugCode,'%".concat(searchQuery, "%',true) || LIKE(document(DrugMaster.DrugType).longdesc,'%").concat(searchQuery, "%',true) || LIKE(DrugMaster.ShortDesc,'%").concat(searchQuery, "%',true)) && DrugMaster.activestatus == true "),
|
|
18105
|
+
limit: {
|
|
18106
|
+
count: perPage,
|
|
18107
|
+
offset: page
|
|
18108
|
+
},
|
|
18109
|
+
return_fields: "merge(DrugMaster,{DrugCode:DrugMaster.DrugCode},{Count:count( for drgmst in DrugMaster filter (LIKE(drgmst.DrugCode,'%".concat(searchQuery, "%',true) || LIKE(document(drgmst.DrugType).longdesc,'%").concat(searchQuery, "%',true) || LIKE(drgmst.ShortDesc,'%").concat(searchQuery, "%',true)) && drgmst.activestatus == true return drgmst._id )},{ShortDesc:DrugMaster.ShortDesc},{DrugClass:DOCUMENT(DrugMaster.DrugClass)},{DrugType:DOCUMENT(DrugMaster.DrugType)},{DrugCategory:DOCUMENT(DrugMaster.DrugCategory)},{FormCode:DOCUMENT(DrugMaster.FormCode)},{StrengthValuesPossible:(for strValPoss in to_array(DrugMaster.StrengthValuesPossible) return merge(strValPoss,{StrengthUOM:document(strValPoss.StrengthUOM)},{StrengthVolumeUoM:document(strValPoss.StrengthVolumeUoM)},{OrderUOMAllowed:(for OrderUOMAllowed in to_array(strValPoss.OrderUOMAllowed) return merge(OrderUOMAllowed,{AllowedOrderDoseUOM:document(OrderUOMAllowed.AllowedOrderDoseUOM)},{AllowedOrderDoseVolUoM:document(OrderUOMAllowed.AllowedOrderDoseVolUoM)}))}))},{RoutesAllowed:document(DrugMaster.RoutesAllowed)})"),
|
|
18110
|
+
sort: "DrugMaster.createddate desc"
|
|
18111
|
+
};
|
|
18112
|
+
},
|
|
18113
|
+
drugCatalogMasterSingleRead: function drugCatalogMasterSingleRead(id) {
|
|
18114
|
+
return {
|
|
18115
|
+
db_name: dbName$1,
|
|
18116
|
+
entity: "DrugMaster",
|
|
18117
|
+
filter: "DrugMaster._id == '".concat(id, "' && DrugMaster.activestatus == true"),
|
|
18118
|
+
return_fields: "merge(DrugMaster,{DrugClass:document(DrugMaster.DrugClass)},{DrugType:DOCUMENT(DrugMaster.DrugType)},{DrugGenericId:DOCUMENT(DrugMaster.DrugGenericId)},{DrugCategory:DOCUMENT(DrugMaster.DrugCategory)},{StrengthValuesPossible:(for strValPoss in to_array(DrugMaster.StrengthValuesPossible) return merge(strValPoss,{StrengthUOM:document(strValPoss.StrengthUOM)},{StrengthVolumeUoM:document(strValPoss.StrengthVolumeUoM)},{OrderUOMAllowed:(for OrderUOMAllowed in to_array(strValPoss.OrderUOMAllowed) return merge(OrderUOMAllowed,{AllowedOrderDoseUOM:document(OrderUOMAllowed.AllowedOrderDoseUOM)},{AllowedOrderDoseVolUoM:document(OrderUOMAllowed.AllowedOrderDoseVolUoM)}))}))},{TotalVolContentUoM:(for DrugUOM in to_array(document(DrugMaster.TotalVolContentUoM)) return merge(DrugUOM,{UOMType:document(DrugUOM.UOMType)}))},{FormCode:DOCUMENT(DrugMaster.FormCode)},{DefaultRouteCode:DOCUMENT(DrugMaster.DefaultRouteCode)},{RoutesAllowed:document(DrugMaster.RoutesAllowed)},{AlternateDrugs:DOCUMENT(DrugMaster.AlternateDrugs)},{GenericIngrListId:DOCUMENT(DrugMaster.GenericIngrListId)},{DrugDispRules:(for DrugDispRules in to_array(document(DrugMaster.DrugDispRules)) return merge(DrugDispRules,{Action:document(DrugDispRules.Action)},{maxDispDurationUOM:document(DrugDispRules.maxDispDurationUOM)},{dfltDispDurationUOM:document(DrugDispRules.dfltDispDurationUOM)}))},{FrequencyRules:(for FrequencyRules in to_array(document(DrugMaster.FrequencyRules)) return merge(FrequencyRules,{freqcode:document(FrequencyRules.freqcode) },{durnUOM:document(FrequencyRules.durnUOM)},{doseUOM:document(FrequencyRules.doseUOM)},{InfuseOverDurType:document(FrequencyRules.InfuseOverDurType)},{InfuseRateUom:document(FrequencyRules.InfuseRateUom)}))},{mappedItems:(for mappedItems in to_array(DrugMaster.mappedItems) return merge(mappedItems,{dispensedrugcode:document(mappedItems.dispensedrugcode)}))},{codeStandard:DOCUMENT(DrugMaster.codeStandard)},{entityLevelStatus:(for entityLevelStatus in to_array(document(DrugMaster.entityLevelStatus)) return merge(entityLevelStatus,{status:document(entityLevelStatus.status)},{entityCode:document(entityLevelStatus.entityCode)},{entityType:document(entityLevelStatus.entityType)}))},{packSizeApplicability:(for packSizeApplicability in to_array(document(DrugMaster.packSizeApplicability)) return merge(packSizeApplicability,{applicableInd:document(packSizeApplicability.applicableInd)},{roundtype:document(packSizeApplicability.roundtype)},{applicablityUOM:document(packSizeApplicability.applicablityUOM)},{packSizeUoM:document(packSizeApplicability.packSizeUoM)},{packUnitUoM:document(packSizeApplicability.packUnitUoM)}))},{aliasDtls:(for aliasDtls in to_array(DrugMaster.aliasDtls) return merge(aliasDtls,{aliasType:document(aliasDtls.aliasType)}) )},{instrDtls:(for instrDtls in to_array(DrugMaster.instrDtls) return merge(instrDtls,{instrType:document(instrDtls.instrType)}))},{drugSynonyms:(for drugSynonyms in to_array(DrugMaster.drugSynonyms) return merge(drugSynonyms,{synonymType:document(drugSynonyms.synonymType)}))},{photo:(for ph in document(to_array(DrugMaster.photo)) return ph)},{baseStkUoM:document(DrugMaster.baseStkUoM)},{compondCompDTls:(for compondCompDTls in to_array(DrugMaster.compondCompDTls) return merge(compondCompDTls,{compDrugCode:(for compDrugCode in to_array(compondCompDTls.compDrugCode) return document(compDrugCode))},{compQtyUom:document(compondCompDTls.compQtyUom)},{compStrengthUOM:document(compondCompDTls.compStrengthUOM)},{compStrengthVolumeUoM:document(compondCompDTls.compStrengthVolumeUoM)} ))},{directiontag:DrugMaster.directiontag},{directiontaglocal:DrugMaster.directiontaglocal},{returnPeriodUOM:document(DrugMaster.returnPeriodUOM)},{newReturnParams:(for nr in to_array(DrugMaster.newReturnParams) return merge(nr,{returnReason:document(nr.returnReason)}))})"
|
|
18119
|
+
};
|
|
18120
|
+
},
|
|
18121
|
+
status_update: function status_update(key, status) {
|
|
18122
|
+
return [{
|
|
18123
|
+
db_name: dbName$1,
|
|
18124
|
+
entity: "DrugMaster",
|
|
18125
|
+
filter: {
|
|
18126
|
+
_key: key
|
|
18127
|
+
},
|
|
18128
|
+
is_metadata: true,
|
|
18129
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
18130
|
+
doc: {
|
|
18131
|
+
status: status
|
|
18132
|
+
}
|
|
18133
|
+
}];
|
|
18134
|
+
},
|
|
18135
|
+
// Alerts & Restrictions Query
|
|
18136
|
+
drugRuleType: function drugRuleType() {
|
|
18137
|
+
return {
|
|
18138
|
+
db_name: dbName$1,
|
|
18139
|
+
entity: "CodingMaster",
|
|
18140
|
+
filter: "CodingMaster.Type == 'RULETYPE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18141
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
18142
|
+
sort: "CodingMaster.shortdesc"
|
|
18143
|
+
};
|
|
18144
|
+
},
|
|
18145
|
+
drugPrivilegeType: function drugPrivilegeType() {
|
|
18146
|
+
return {
|
|
18147
|
+
db_name: dbName$1,
|
|
18148
|
+
entity: "CodingMaster",
|
|
18149
|
+
filter: "CodingMaster.Type == 'PRIVILEGETYPE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18150
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
18151
|
+
sort: "CodingMaster.shortdesc"
|
|
18152
|
+
};
|
|
18153
|
+
},
|
|
18154
|
+
drugServiceApplicabilityType: function drugServiceApplicabilityType() {
|
|
18155
|
+
return {
|
|
18156
|
+
db_name: dbName$1,
|
|
18157
|
+
entity: "CodingMaster",
|
|
18158
|
+
filter: "CodingMaster.Type == 'SERVICEAPPLICABILITY' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18159
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
18160
|
+
sort: "CodingMaster.shortdesc"
|
|
18161
|
+
};
|
|
18162
|
+
},
|
|
18163
|
+
drugFacilityOptions: function drugFacilityOptions() {
|
|
18164
|
+
return {
|
|
18165
|
+
db_name: dbName$1,
|
|
18166
|
+
entity: "Organization",
|
|
18167
|
+
filter: "DOCUMENT(Organization.OrgType)[*].code ANY == 'OT003'",
|
|
18168
|
+
return_fields: "{_id:Organization._id,name:Organization.name}"
|
|
18169
|
+
};
|
|
18170
|
+
},
|
|
18171
|
+
drugApprovalWorkflowOptions: function drugApprovalWorkflowOptions() {
|
|
18172
|
+
return {
|
|
18173
|
+
db_name: dbName$1,
|
|
18174
|
+
entity: "queuescenarios",
|
|
18175
|
+
filter: "queuescenarios.activestatus==true && queuescenarios.status==true",
|
|
18176
|
+
return_fields: "Keep(queuescenarios,'_id','queueid','scenarioid','scenarioname')"
|
|
18177
|
+
};
|
|
18178
|
+
},
|
|
18179
|
+
drugalertRestrictionSingleRead: function drugalertRestrictionSingleRead(id) {
|
|
18180
|
+
return {
|
|
18181
|
+
db_name: dbName$1,
|
|
18182
|
+
entity: "CA_OrderCatalogPrivilegeLevel",
|
|
18183
|
+
filter: "CA_OrderCatalogPrivilegeLevel.activestatus == true && CA_OrderCatalogPrivilegeLevel.status==true && CA_OrderCatalogPrivilegeLevel.relationID=='".concat(id, "'"),
|
|
18184
|
+
return_fields: "{id:CA_OrderCatalogPrivilegeLevel.id,orgn_code:CA_OrderCatalogPrivilegeLevel.orgn_code,service_applicablity:CA_OrderCatalogPrivilegeLevel.service_applicablity,patient_criteria:CA_OrderCatalogPrivilegeLevel.patient_criteria,pract_criteria:CA_OrderCatalogPrivilegeLevel.pract_criteria,rule_type:CA_OrderCatalogPrivilegeLevel.rule_type,privilege_type:CA_OrderCatalogPrivilegeLevel.privilege_type,alert_test_message:CA_OrderCatalogPrivilegeLevel.alert_test_message,workflow:CA_OrderCatalogPrivilegeLevel.workflow}"
|
|
18185
|
+
};
|
|
18186
|
+
},
|
|
18187
|
+
ruleGroup: function ruleGroup() {
|
|
18188
|
+
return {
|
|
18189
|
+
db_name: "RuleBuilder",
|
|
18190
|
+
entity: "Groups",
|
|
18191
|
+
filter: "Groups.activestatus==true",
|
|
18192
|
+
return_fields: "{label : Groups.name, value:Groups.id}"
|
|
18193
|
+
};
|
|
18194
|
+
}
|
|
17880
18195
|
};
|
|
17881
18196
|
|
|
17882
18197
|
var allowedJsonFun = function allowedJsonFun(val) {
|
|
@@ -18547,34 +18862,163 @@ var readDrugMasterJSON = function readDrugMasterJSON(data, state) {
|
|
|
18547
18862
|
return json;
|
|
18548
18863
|
};
|
|
18549
18864
|
|
|
18550
|
-
var
|
|
18551
|
-
|
|
18552
|
-
var loopMasters$6 = function loopMasters() {
|
|
18553
|
-
return new es6Promise.Promise( /*#__PURE__*/function () {
|
|
18554
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(resolve, reject) {
|
|
18555
|
-
var calls;
|
|
18556
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
18557
|
-
while (1) {
|
|
18558
|
-
switch (_context2.prev = _context2.next) {
|
|
18559
|
-
case 0:
|
|
18560
|
-
calls = Object.keys(masterQuery$5).map( /*#__PURE__*/function () {
|
|
18561
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(val) {
|
|
18562
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
18563
|
-
while (1) {
|
|
18564
|
-
switch (_context.prev = _context.next) {
|
|
18565
|
-
case 0:
|
|
18566
|
-
_context.next = 2;
|
|
18567
|
-
return fetchMaster$6(val, masterQuery$5[val]);
|
|
18865
|
+
var GenerateUpsert = function GenerateUpsert(data) {
|
|
18866
|
+
var filter = {};
|
|
18568
18867
|
|
|
18569
|
-
|
|
18570
|
-
|
|
18868
|
+
if (data !== null && data !== void 0 && data.isEdit) {
|
|
18869
|
+
filter = {
|
|
18870
|
+
filter: {
|
|
18871
|
+
_key: data === null || data === void 0 ? void 0 : data._key
|
|
18872
|
+
}
|
|
18873
|
+
};
|
|
18874
|
+
}
|
|
18571
18875
|
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
|
|
18577
|
-
|
|
18876
|
+
return [_objectSpread2(_objectSpread2({
|
|
18877
|
+
db_name: dbName$1,
|
|
18878
|
+
entity: "DrugMaster",
|
|
18879
|
+
is_metadata: true,
|
|
18880
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd"
|
|
18881
|
+
}, filter), {}, {
|
|
18882
|
+
doc: {
|
|
18883
|
+
id: 0,
|
|
18884
|
+
DrugCode: data === null || data === void 0 ? void 0 : data.DrugCode,
|
|
18885
|
+
ShortDesc: data === null || data === void 0 ? void 0 : data.ShortDesc,
|
|
18886
|
+
LongDesc: data === null || data === void 0 ? void 0 : data.LongDesc,
|
|
18887
|
+
// Charge: "boolean",
|
|
18888
|
+
DrugClass: data === null || data === void 0 ? void 0 : data.DrugClass,
|
|
18889
|
+
DrugType: data === null || data === void 0 ? void 0 : data.DrugType,
|
|
18890
|
+
DrugCategory: data === null || data === void 0 ? void 0 : data.DrugCategory,
|
|
18891
|
+
StrengthValuesPossible: data === null || data === void 0 ? void 0 : data.StrengthValuesPossible,
|
|
18892
|
+
// TotalVolContent: "string",
|
|
18893
|
+
// TotalVolContentUoM: "string",
|
|
18894
|
+
FormCode: data === null || data === void 0 ? void 0 : data.FormCode,
|
|
18895
|
+
DefaultRouteCode: data === null || data === void 0 ? void 0 : data.DefaultRouteCode,
|
|
18896
|
+
RoutesAllowed: data === null || data === void 0 ? void 0 : data.RoutesAllowed,
|
|
18897
|
+
DispenseviaprescriptionOnly: data === null || data === void 0 ? void 0 : data.DispenseviaprescriptionOnly,
|
|
18898
|
+
// IVFluid: "boolean",
|
|
18899
|
+
// DfltFluidCode: "string",
|
|
18900
|
+
// DispenseAlternateDrug: "boolean",
|
|
18901
|
+
// AlternateDrugs: "array",
|
|
18902
|
+
// SpecialInstructionText: "array",
|
|
18903
|
+
CounsellingRequired: data === null || data === void 0 ? void 0 : data.CounsellingRequired,
|
|
18904
|
+
// DrugImageID: "number",
|
|
18905
|
+
ApplicableForCompounding: data === null || data === void 0 ? void 0 : data.ApplicableForCompounding,
|
|
18906
|
+
Additive: data === null || data === void 0 ? void 0 : data.Additive,
|
|
18907
|
+
// SourceOfDrugOrderCatalog: "string",
|
|
18908
|
+
DrugGenericId: data === null || data === void 0 ? void 0 : data.DrugGenericId,
|
|
18909
|
+
// GenericIngrListId: "string",
|
|
18910
|
+
status: data === null || data === void 0 ? void 0 : data.status,
|
|
18911
|
+
// statusactive: data?.status,
|
|
18912
|
+
DrugDispRules: data === null || data === void 0 ? void 0 : data.DrugDispRules,
|
|
18913
|
+
FrequencyRules: data === null || data === void 0 ? void 0 : data.FrequencyRules,
|
|
18914
|
+
mappedItems: data === null || data === void 0 ? void 0 : data.mappedItems,
|
|
18915
|
+
// drugroutegenid: "string",
|
|
18916
|
+
codeStandard: data === null || data === void 0 ? void 0 : data.codeStandard,
|
|
18917
|
+
IsDispensible: data === null || data === void 0 ? void 0 : data.IsDispensible,
|
|
18918
|
+
entityLevelStatus: data === null || data === void 0 ? void 0 : data.entityLevelStatus,
|
|
18919
|
+
packSizeApplicability: data === null || data === void 0 ? void 0 : data.packSizeApplicability,
|
|
18920
|
+
aliasDtls: data === null || data === void 0 ? void 0 : data.aliasDtls,
|
|
18921
|
+
instrDtls: data === null || data === void 0 ? void 0 : data.instrDtls,
|
|
18922
|
+
directiontag: data === null || data === void 0 ? void 0 : data.directiontag,
|
|
18923
|
+
directiontaglocal: data === null || data === void 0 ? void 0 : data.directiontaglocal,
|
|
18924
|
+
drugSynonyms: data === null || data === void 0 ? void 0 : data.drugSynonyms,
|
|
18925
|
+
photo: data === null || data === void 0 ? void 0 : data.photo,
|
|
18926
|
+
// baseStkUoM: "string",
|
|
18927
|
+
// avgRate: "number",
|
|
18928
|
+
compondCompDTls: data === null || data === void 0 ? void 0 : data.compondCompDTls,
|
|
18929
|
+
// privilegeID: "array",
|
|
18930
|
+
// extDrugGenericId: "string",
|
|
18931
|
+
returnApplicable: data === null || data === void 0 ? void 0 : data.returnApplicable,
|
|
18932
|
+
returnPeriodVal: data === null || data === void 0 ? void 0 : data.returnPeriodVal,
|
|
18933
|
+
returnPeriodUOM: data === null || data === void 0 ? void 0 : data.returnPeriodUOM,
|
|
18934
|
+
partialQtyAllow: data === null || data === void 0 ? void 0 : data.partialQtyAllow,
|
|
18935
|
+
returnPolicy: data === null || data === void 0 ? void 0 : data.returnPolicy,
|
|
18936
|
+
newReturnParams: data === null || data === void 0 ? void 0 : data.newReturnParams
|
|
18937
|
+
}
|
|
18938
|
+
})];
|
|
18939
|
+
};
|
|
18940
|
+
var GenerateAlertRestrictionUpsert = function GenerateAlertRestrictionUpsert(data) {
|
|
18941
|
+
var filter = {};
|
|
18942
|
+
|
|
18943
|
+
if (data !== null && data !== void 0 && data.isEdit) {
|
|
18944
|
+
filter = {
|
|
18945
|
+
filter: {
|
|
18946
|
+
_key: data === null || data === void 0 ? void 0 : data._key
|
|
18947
|
+
}
|
|
18948
|
+
};
|
|
18949
|
+
}
|
|
18950
|
+
|
|
18951
|
+
return [_objectSpread2(_objectSpread2({
|
|
18952
|
+
db_name: dbName$1,
|
|
18953
|
+
entity: "CA_OrderCatalogPrivilegeLevel",
|
|
18954
|
+
is_metadata: true,
|
|
18955
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd"
|
|
18956
|
+
}, filter), {}, {
|
|
18957
|
+
doc: {
|
|
18958
|
+
id: 0,
|
|
18959
|
+
orgn_code: data === null || data === void 0 ? void 0 : data.orgn_code,
|
|
18960
|
+
service_applicablity: data === null || data === void 0 ? void 0 : data.service_applicablity,
|
|
18961
|
+
order_catalog_criteria: data === null || data === void 0 ? void 0 : data.order_catalog_criteria,
|
|
18962
|
+
patient_criteria: data === null || data === void 0 ? void 0 : data.patient_criteria,
|
|
18963
|
+
pract_criteria: data === null || data === void 0 ? void 0 : data.pract_criteria,
|
|
18964
|
+
// appr_leveles: [
|
|
18965
|
+
// {
|
|
18966
|
+
// appr_level: "string",
|
|
18967
|
+
// appr_level_description: "string",
|
|
18968
|
+
// approval_authority_criteria: "array",
|
|
18969
|
+
// },
|
|
18970
|
+
// ],
|
|
18971
|
+
rule_type: data === null || data === void 0 ? void 0 : data.rule_type,
|
|
18972
|
+
privilege_type: data === null || data === void 0 ? void 0 : data.privilege_type,
|
|
18973
|
+
status: data === null || data === void 0 ? void 0 : data.status,
|
|
18974
|
+
alert_test_message: data === null || data === void 0 ? void 0 : data.alert_test_message,
|
|
18975
|
+
workflow: data === null || data === void 0 ? void 0 : data.workflow,
|
|
18976
|
+
relationID: data === null || data === void 0 ? void 0 : data.relationID // This is mandatory for further reading of documents on Update mode. Do not remove this field.
|
|
18977
|
+
|
|
18978
|
+
}
|
|
18979
|
+
})];
|
|
18980
|
+
};
|
|
18981
|
+
|
|
18982
|
+
var _extraReducers$t;
|
|
18983
|
+
|
|
18984
|
+
var loopMasters$6 = function loopMasters(params) {
|
|
18985
|
+
return new es6Promise.Promise( /*#__PURE__*/function () {
|
|
18986
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(resolve, reject) {
|
|
18987
|
+
var calls;
|
|
18988
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
18989
|
+
while (1) {
|
|
18990
|
+
switch (_context2.prev = _context2.next) {
|
|
18991
|
+
case 0:
|
|
18992
|
+
calls = Object.keys(masterNewQuery).map( /*#__PURE__*/function () {
|
|
18993
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(val) {
|
|
18994
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
18995
|
+
while (1) {
|
|
18996
|
+
switch (_context.prev = _context.next) {
|
|
18997
|
+
case 0:
|
|
18998
|
+
if (!(val === "item_code")) {
|
|
18999
|
+
_context.next = 4;
|
|
19000
|
+
break;
|
|
19001
|
+
}
|
|
19002
|
+
|
|
19003
|
+
_context.next = 3;
|
|
19004
|
+
return fetchMaster$6(val, masterNewQuery[val], params === null || params === void 0 ? void 0 : params[val]);
|
|
19005
|
+
|
|
19006
|
+
case 3:
|
|
19007
|
+
return _context.abrupt("return", _context.sent);
|
|
19008
|
+
|
|
19009
|
+
case 4:
|
|
19010
|
+
_context.next = 6;
|
|
19011
|
+
return fetchMaster$6(val, masterNewQuery[val]);
|
|
19012
|
+
|
|
19013
|
+
case 6:
|
|
19014
|
+
return _context.abrupt("return", _context.sent);
|
|
19015
|
+
|
|
19016
|
+
case 7:
|
|
19017
|
+
case "end":
|
|
19018
|
+
return _context.stop();
|
|
19019
|
+
}
|
|
19020
|
+
}
|
|
19021
|
+
}, _callee);
|
|
18578
19022
|
}));
|
|
18579
19023
|
|
|
18580
19024
|
return function (_x3) {
|
|
@@ -18586,59 +19030,48 @@ var loopMasters$6 = function loopMasters() {
|
|
|
18586
19030
|
data.map(function (val) {
|
|
18587
19031
|
var arr = [];
|
|
18588
19032
|
val.data.map(function (value) {
|
|
18589
|
-
var _value$coding;
|
|
18590
|
-
|
|
18591
19033
|
switch (val.name) {
|
|
18592
|
-
case "
|
|
18593
|
-
case "
|
|
18594
|
-
|
|
18595
|
-
|
|
18596
|
-
|
|
18597
|
-
|
|
18598
|
-
|
|
19034
|
+
case "synonym_type":
|
|
19035
|
+
case "source":
|
|
19036
|
+
case "drug_uom":
|
|
19037
|
+
case "instruction_type":
|
|
19038
|
+
case "drug_status":
|
|
19039
|
+
case "applicability":
|
|
19040
|
+
case "rule_type":
|
|
19041
|
+
case "round_off_type":
|
|
19042
|
+
case "return_reason":
|
|
19043
|
+
case "duration_uom":
|
|
19044
|
+
arr.push({
|
|
19045
|
+
label: value !== null && value !== void 0 && value.display ? value === null || value === void 0 ? void 0 : value.display : "",
|
|
19046
|
+
value: value !== null && value !== void 0 && value._id ? value === null || value === void 0 ? void 0 : value._id : ""
|
|
18599
19047
|
});
|
|
18600
19048
|
break;
|
|
18601
19049
|
|
|
18602
|
-
case "
|
|
18603
|
-
case "gender":
|
|
18604
|
-
arr.push(_objectSpread2({
|
|
18605
|
-
label: value.coding ? value.coding[0] ? value.coding[0].display : "" : val,
|
|
18606
|
-
value: value.coding ? value.coding[0] ? value.coding[0]._id : "" : val
|
|
18607
|
-
}, value));
|
|
18608
|
-
break;
|
|
18609
|
-
|
|
18610
|
-
case "alternate_drug_code":
|
|
18611
|
-
arr.push(_objectSpread2({
|
|
18612
|
-
label: value.ShortDesc ? value.ShortDesc : "",
|
|
18613
|
-
value: value._id
|
|
18614
|
-
}, value));
|
|
18615
|
-
break;
|
|
18616
|
-
|
|
18617
|
-
case "age_range_group":
|
|
18618
|
-
arr.push(_objectSpread2({
|
|
18619
|
-
label: value.agerangecode,
|
|
18620
|
-
value: value._id
|
|
18621
|
-
}, value));
|
|
18622
|
-
break;
|
|
18623
|
-
|
|
18624
|
-
case "default_route":
|
|
18625
|
-
case "routes_allowed":
|
|
18626
|
-
case "default_frequency":
|
|
18627
|
-
case "drug_item_master":
|
|
19050
|
+
case "code_standara":
|
|
18628
19051
|
case "drug_class":
|
|
19052
|
+
case "drug_generic":
|
|
19053
|
+
case "drug_type":
|
|
19054
|
+
case "form":
|
|
18629
19055
|
case "drug_category":
|
|
18630
19056
|
case "drug_type":
|
|
18631
19057
|
case "form":
|
|
18632
|
-
case "
|
|
19058
|
+
case "default_route":
|
|
19059
|
+
case "frequency":
|
|
19060
|
+
case "routes_allowed":
|
|
19061
|
+
case "drug_followUom":
|
|
19062
|
+
case "action":
|
|
19063
|
+
case "entity_type":
|
|
19064
|
+
case "privilege_type":
|
|
18633
19065
|
arr.push(_objectSpread2({
|
|
18634
19066
|
label: value.shortdesc ? value.shortdesc : "",
|
|
18635
19067
|
value: value._id
|
|
18636
19068
|
}, value));
|
|
18637
19069
|
break;
|
|
18638
19070
|
|
|
18639
|
-
case "
|
|
19071
|
+
case "drug_code":
|
|
19072
|
+
case "item_code":
|
|
18640
19073
|
arr.push(_objectSpread2({
|
|
18641
|
-
label: value.
|
|
19074
|
+
label: value.ShortDesc ? value.ShortDesc : "",
|
|
18642
19075
|
value: value._id
|
|
18643
19076
|
}, value));
|
|
18644
19077
|
break;
|
|
@@ -18673,7 +19106,7 @@ var loopMasters$6 = function loopMasters() {
|
|
|
18673
19106
|
}());
|
|
18674
19107
|
};
|
|
18675
19108
|
|
|
18676
|
-
var fetchMaster$6 = function fetchMaster(name, query) {
|
|
19109
|
+
var fetchMaster$6 = function fetchMaster(name, query, params) {
|
|
18677
19110
|
return new es6Promise.Promise( /*#__PURE__*/function () {
|
|
18678
19111
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(resolve, reject) {
|
|
18679
19112
|
var data;
|
|
@@ -18683,7 +19116,7 @@ var fetchMaster$6 = function fetchMaster(name, query) {
|
|
|
18683
19116
|
case 0:
|
|
18684
19117
|
_context3.next = 2;
|
|
18685
19118
|
return fetchData({
|
|
18686
|
-
body: query
|
|
19119
|
+
body: JSON.stringify(query(params))
|
|
18687
19120
|
}, __readDocumentUrl__);
|
|
18688
19121
|
|
|
18689
19122
|
case 2:
|
|
@@ -18711,8 +19144,15 @@ var DRUG_MASTER_READ = createAsyncThunk("drugMasterSlice/drug_master_list", /*#_
|
|
|
18711
19144
|
var payload,
|
|
18712
19145
|
_ref5,
|
|
18713
19146
|
rejectWithValue,
|
|
19147
|
+
isWithoutLimit,
|
|
18714
19148
|
page,
|
|
18715
19149
|
perpage,
|
|
19150
|
+
_payload$searchQuery,
|
|
19151
|
+
searchQuery,
|
|
19152
|
+
queryId,
|
|
19153
|
+
withoutLimitFilter,
|
|
19154
|
+
withLimitFilter,
|
|
19155
|
+
fullReadQDMQuery,
|
|
18716
19156
|
data,
|
|
18717
19157
|
arry,
|
|
18718
19158
|
_args4 = arguments;
|
|
@@ -18724,24 +19164,47 @@ var DRUG_MASTER_READ = createAsyncThunk("drugMasterSlice/drug_master_list", /*#_
|
|
|
18724
19164
|
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
18725
19165
|
_ref5 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref5.rejectWithValue;
|
|
18726
19166
|
_context4.prev = 2;
|
|
18727
|
-
page = payload.page, perpage = payload.perpage;
|
|
18728
|
-
|
|
19167
|
+
isWithoutLimit = payload.isWithoutLimit, page = payload.page, perpage = payload.perpage, _payload$searchQuery = payload.searchQuery, searchQuery = _payload$searchQuery === void 0 ? "" : _payload$searchQuery;
|
|
19168
|
+
queryId = isWithoutLimit ? "b1656253-8d63-4954-98ea-3765c230a3d5" : "2d926ad5-19f5-4140-9158-f4cd17e7c307";
|
|
19169
|
+
withoutLimitFilter = {
|
|
19170
|
+
filter: {
|
|
19171
|
+
search: "%".concat(searchQuery, "%")
|
|
19172
|
+
}
|
|
19173
|
+
};
|
|
19174
|
+
withLimitFilter = {
|
|
19175
|
+
filter: {
|
|
19176
|
+
search: "%".concat(searchQuery, "%"),
|
|
19177
|
+
page: page,
|
|
19178
|
+
perPage: perpage
|
|
19179
|
+
}
|
|
19180
|
+
};
|
|
19181
|
+
fullReadQDMQuery = _objectSpread2({
|
|
19182
|
+
db_name: dbName$1,
|
|
19183
|
+
queryid: queryId
|
|
19184
|
+
}, isWithoutLimit ? withoutLimitFilter : withLimitFilter);
|
|
19185
|
+
_context4.next = 10;
|
|
18729
19186
|
return fetchData({
|
|
18730
|
-
body: JSON.stringify(
|
|
18731
|
-
},
|
|
19187
|
+
body: JSON.stringify(fullReadQDMQuery)
|
|
19188
|
+
}, __baseUrl__$1);
|
|
18732
19189
|
|
|
18733
|
-
case
|
|
19190
|
+
case 10:
|
|
18734
19191
|
data = _context4.sent;
|
|
18735
19192
|
arry = [];
|
|
18736
|
-
data.
|
|
19193
|
+
data.map(function (val) {
|
|
18737
19194
|
if (val._id) {
|
|
19195
|
+
var _val$DrugCode, _val$LongDesc, _val$DrugClass$longde, _val$DrugClass, _val$DrugCategory$lon, _val$DrugCategory, _val$DrugType$longdes, _val$DrugType, _val$FormCode$longdes, _val$FormCode, _val$RoutesAllowed, _val$StrengthValuesPo;
|
|
19196
|
+
|
|
18738
19197
|
arry.push(_objectSpread2(_objectSpread2({}, val), {}, {
|
|
18739
|
-
"
|
|
18740
|
-
"
|
|
18741
|
-
|
|
18742
|
-
|
|
18743
|
-
|
|
18744
|
-
|
|
19198
|
+
code_des: "".concat((_val$DrugCode = val === null || val === void 0 ? void 0 : val.DrugCode) !== null && _val$DrugCode !== void 0 ? _val$DrugCode : "", " & ").concat((_val$LongDesc = val === null || val === void 0 ? void 0 : val.LongDesc) !== null && _val$LongDesc !== void 0 ? _val$LongDesc : ""),
|
|
19199
|
+
"class": (_val$DrugClass$longde = val === null || val === void 0 ? void 0 : (_val$DrugClass = val.DrugClass) === null || _val$DrugClass === void 0 ? void 0 : _val$DrugClass.longdesc) !== null && _val$DrugClass$longde !== void 0 ? _val$DrugClass$longde : "",
|
|
19200
|
+
category: (_val$DrugCategory$lon = val === null || val === void 0 ? void 0 : (_val$DrugCategory = val.DrugCategory) === null || _val$DrugCategory === void 0 ? void 0 : _val$DrugCategory.longdesc) !== null && _val$DrugCategory$lon !== void 0 ? _val$DrugCategory$lon : "",
|
|
19201
|
+
type: (_val$DrugType$longdes = val === null || val === void 0 ? void 0 : (_val$DrugType = val.DrugType) === null || _val$DrugType === void 0 ? void 0 : _val$DrugType.longdesc) !== null && _val$DrugType$longdes !== void 0 ? _val$DrugType$longdes : "",
|
|
19202
|
+
form: (_val$FormCode$longdes = val === null || val === void 0 ? void 0 : (_val$FormCode = val.FormCode) === null || _val$FormCode === void 0 ? void 0 : _val$FormCode.longdesc) !== null && _val$FormCode$longdes !== void 0 ? _val$FormCode$longdes : "",
|
|
19203
|
+
route: val !== null && val !== void 0 && val.RoutesAllowed ? val === null || val === void 0 ? void 0 : (_val$RoutesAllowed = val.RoutesAllowed) === null || _val$RoutesAllowed === void 0 ? void 0 : _val$RoutesAllowed.map(function (data) {
|
|
19204
|
+
return data === null || data === void 0 ? void 0 : data.longdesc;
|
|
19205
|
+
}).join(", ") : [],
|
|
19206
|
+
strength: (_val$StrengthValuesPo = val === null || val === void 0 ? void 0 : val.StrengthValuesPossible) !== null && _val$StrengthValuesPo !== void 0 ? _val$StrengthValuesPo : {},
|
|
19207
|
+
status: val !== null && val !== void 0 && val.status ? true : false
|
|
18745
19208
|
}));
|
|
18746
19209
|
}
|
|
18747
19210
|
});
|
|
@@ -18749,19 +19212,19 @@ var DRUG_MASTER_READ = createAsyncThunk("drugMasterSlice/drug_master_list", /*#_
|
|
|
18749
19212
|
data: arry
|
|
18750
19213
|
}));
|
|
18751
19214
|
|
|
18752
|
-
case
|
|
18753
|
-
_context4.prev =
|
|
19215
|
+
case 16:
|
|
19216
|
+
_context4.prev = 16;
|
|
18754
19217
|
_context4.t0 = _context4["catch"](2);
|
|
18755
|
-
return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject
|
|
19218
|
+
return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18756
19219
|
message: _context4.t0.message
|
|
18757
19220
|
})));
|
|
18758
19221
|
|
|
18759
|
-
case
|
|
19222
|
+
case 19:
|
|
18760
19223
|
case "end":
|
|
18761
19224
|
return _context4.stop();
|
|
18762
19225
|
}
|
|
18763
19226
|
}
|
|
18764
|
-
}, _callee4, null, [[2,
|
|
19227
|
+
}, _callee4, null, [[2, 16]]);
|
|
18765
19228
|
})));
|
|
18766
19229
|
var DRUG_MASTER_UPSERT = createAsyncThunk("drugMasterSlice/drug_master_upsert", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
18767
19230
|
var payload,
|
|
@@ -18816,7 +19279,8 @@ var DRUG_MASTER_STATUS_CHANGE = createAsyncThunk("drugMasterSlice/drug_master_st
|
|
|
18816
19279
|
var payload,
|
|
18817
19280
|
_ref9,
|
|
18818
19281
|
rejectWithValue,
|
|
18819
|
-
|
|
19282
|
+
key,
|
|
19283
|
+
status,
|
|
18820
19284
|
queriesjson,
|
|
18821
19285
|
data,
|
|
18822
19286
|
_args6 = arguments;
|
|
@@ -18828,11 +19292,8 @@ var DRUG_MASTER_STATUS_CHANGE = createAsyncThunk("drugMasterSlice/drug_master_st
|
|
|
18828
19292
|
payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
18829
19293
|
_ref9 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref9.rejectWithValue;
|
|
18830
19294
|
_context6.prev = 2;
|
|
18831
|
-
|
|
18832
|
-
|
|
18833
|
-
status: payload.status
|
|
18834
|
-
};
|
|
18835
|
-
queriesjson = queries$f.status_update_drug_master(statuschange);
|
|
19295
|
+
key = payload.key, status = payload.status;
|
|
19296
|
+
queriesjson = queries$f.status_update_drug_master(key, status);
|
|
18836
19297
|
_context6.next = 7;
|
|
18837
19298
|
return fetchData({
|
|
18838
19299
|
body: JSON.stringify(queriesjson)
|
|
@@ -18859,8 +19320,11 @@ var DRUG_MASTER_STATUS_CHANGE = createAsyncThunk("drugMasterSlice/drug_master_st
|
|
|
18859
19320
|
}, _callee6, null, [[2, 11]]);
|
|
18860
19321
|
})));
|
|
18861
19322
|
var DRUG_MASTERS = createAsyncThunk("drugMasterSlice/masterlist", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
|
|
18862
|
-
var
|
|
19323
|
+
var payload,
|
|
19324
|
+
_ref11,
|
|
18863
19325
|
rejectWithValue,
|
|
19326
|
+
itemCodeId,
|
|
19327
|
+
params,
|
|
18864
19328
|
data,
|
|
18865
19329
|
_args7 = arguments;
|
|
18866
19330
|
|
|
@@ -18868,30 +19332,37 @@ var DRUG_MASTERS = createAsyncThunk("drugMasterSlice/masterlist", /*#__PURE__*/_
|
|
|
18868
19332
|
while (1) {
|
|
18869
19333
|
switch (_context7.prev = _context7.next) {
|
|
18870
19334
|
case 0:
|
|
19335
|
+
payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
|
18871
19336
|
_ref11 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref11.rejectWithValue;
|
|
18872
19337
|
_context7.prev = 2;
|
|
18873
|
-
|
|
18874
|
-
|
|
19338
|
+
itemCodeId = payload.itemCodeId;
|
|
19339
|
+
params = {
|
|
19340
|
+
item_code: {
|
|
19341
|
+
id: itemCodeId
|
|
19342
|
+
}
|
|
19343
|
+
};
|
|
19344
|
+
_context7.next = 7;
|
|
19345
|
+
return loopMasters$6(params);
|
|
18875
19346
|
|
|
18876
|
-
case
|
|
19347
|
+
case 7:
|
|
18877
19348
|
data = _context7.sent;
|
|
18878
19349
|
return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18879
19350
|
data: data
|
|
18880
19351
|
}));
|
|
18881
19352
|
|
|
18882
|
-
case
|
|
18883
|
-
_context7.prev =
|
|
19353
|
+
case 11:
|
|
19354
|
+
_context7.prev = 11;
|
|
18884
19355
|
_context7.t0 = _context7["catch"](2);
|
|
18885
19356
|
return _context7.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18886
19357
|
message: _context7.t0.message
|
|
18887
19358
|
})));
|
|
18888
19359
|
|
|
18889
|
-
case
|
|
19360
|
+
case 14:
|
|
18890
19361
|
case "end":
|
|
18891
19362
|
return _context7.stop();
|
|
18892
19363
|
}
|
|
18893
19364
|
}
|
|
18894
|
-
}, _callee7, null, [[2,
|
|
19365
|
+
}, _callee7, null, [[2, 11]]);
|
|
18895
19366
|
})));
|
|
18896
19367
|
var SAVE_DRUG_MASTER = createAsyncThunk("drugMasterSlice/create_drug_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
18897
19368
|
var payload,
|
|
@@ -19084,66 +19555,791 @@ var AGE_CATEGORY_BY_ID = createAsyncThunk("drugMasterSlice/age_category_by_id",
|
|
|
19084
19555
|
}
|
|
19085
19556
|
}, _callee11, null, [[2, 13]]);
|
|
19086
19557
|
})));
|
|
19087
|
-
var
|
|
19088
|
-
|
|
19089
|
-
|
|
19090
|
-
|
|
19091
|
-
|
|
19092
|
-
|
|
19093
|
-
|
|
19094
|
-
|
|
19095
|
-
|
|
19096
|
-
|
|
19097
|
-
|
|
19098
|
-
|
|
19099
|
-
|
|
19100
|
-
|
|
19101
|
-
|
|
19102
|
-
|
|
19103
|
-
|
|
19104
|
-
|
|
19105
|
-
|
|
19106
|
-
|
|
19107
|
-
|
|
19108
|
-
|
|
19109
|
-
|
|
19110
|
-
|
|
19111
|
-
|
|
19112
|
-
|
|
19113
|
-
|
|
19114
|
-
|
|
19115
|
-
|
|
19116
|
-
|
|
19117
|
-
|
|
19118
|
-
|
|
19119
|
-
|
|
19120
|
-
|
|
19121
|
-
|
|
19122
|
-
|
|
19123
|
-
|
|
19124
|
-
|
|
19125
|
-
|
|
19126
|
-
|
|
19127
|
-
|
|
19128
|
-
|
|
19129
|
-
|
|
19130
|
-
|
|
19131
|
-
|
|
19132
|
-
|
|
19133
|
-
|
|
19134
|
-
|
|
19135
|
-
|
|
19136
|
-
|
|
19137
|
-
|
|
19138
|
-
|
|
19139
|
-
|
|
19140
|
-
|
|
19141
|
-
|
|
19142
|
-
|
|
19143
|
-
|
|
19144
|
-
|
|
19145
|
-
|
|
19146
|
-
|
|
19558
|
+
var DRUG_MASTER_ENTITY_NAME_OPTIONS = createAsyncThunk("drugMasterSlice/drug_catalog_master_entity_name_options", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
|
|
19559
|
+
var payload,
|
|
19560
|
+
_ref21,
|
|
19561
|
+
rejectWithValue,
|
|
19562
|
+
entityTypeCode,
|
|
19563
|
+
data,
|
|
19564
|
+
_data,
|
|
19565
|
+
_data$result3,
|
|
19566
|
+
_args12 = arguments;
|
|
19567
|
+
|
|
19568
|
+
return regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
19569
|
+
while (1) {
|
|
19570
|
+
switch (_context12.prev = _context12.next) {
|
|
19571
|
+
case 0:
|
|
19572
|
+
payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
|
|
19573
|
+
_ref21 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref21.rejectWithValue;
|
|
19574
|
+
_context12.prev = 2;
|
|
19575
|
+
entityTypeCode = payload.entityTypeCode;
|
|
19576
|
+
_context12.next = 6;
|
|
19577
|
+
return fetchData({
|
|
19578
|
+
body: JSON.stringify(queries$f.entityNameOptionsQuery(entityTypeCode))
|
|
19579
|
+
}, __readDocumentUrl__);
|
|
19580
|
+
|
|
19581
|
+
case 6:
|
|
19582
|
+
data = _context12.sent;
|
|
19583
|
+
|
|
19584
|
+
if (!(data.result.length > 0)) {
|
|
19585
|
+
_context12.next = 12;
|
|
19586
|
+
break;
|
|
19587
|
+
}
|
|
19588
|
+
|
|
19589
|
+
data = (_data = data) === null || _data === void 0 ? void 0 : (_data$result3 = _data.result) === null || _data$result3 === void 0 ? void 0 : _data$result3.map(function (option) {
|
|
19590
|
+
return _objectSpread2({
|
|
19591
|
+
label: option,
|
|
19592
|
+
value: option._id
|
|
19593
|
+
}, option);
|
|
19594
|
+
});
|
|
19595
|
+
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19596
|
+
data: data
|
|
19597
|
+
}));
|
|
19598
|
+
|
|
19599
|
+
case 12:
|
|
19600
|
+
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19601
|
+
data: []
|
|
19602
|
+
}));
|
|
19603
|
+
|
|
19604
|
+
case 13:
|
|
19605
|
+
_context12.next = 18;
|
|
19606
|
+
break;
|
|
19607
|
+
|
|
19608
|
+
case 15:
|
|
19609
|
+
_context12.prev = 15;
|
|
19610
|
+
_context12.t0 = _context12["catch"](2);
|
|
19611
|
+
return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19612
|
+
message: _context12.t0.message
|
|
19613
|
+
})));
|
|
19614
|
+
|
|
19615
|
+
case 18:
|
|
19616
|
+
case "end":
|
|
19617
|
+
return _context12.stop();
|
|
19618
|
+
}
|
|
19619
|
+
}
|
|
19620
|
+
}, _callee12, null, [[2, 15]]);
|
|
19621
|
+
})));
|
|
19622
|
+
var DRUG_MASTER_SINGLE_READ = createAsyncThunk("drugMasterSlice/drug_catalog_master_singleRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
|
|
19623
|
+
var payload,
|
|
19624
|
+
_ref23,
|
|
19625
|
+
rejectWithValue,
|
|
19626
|
+
id,
|
|
19627
|
+
data,
|
|
19628
|
+
_args13 = arguments;
|
|
19629
|
+
|
|
19630
|
+
return regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
19631
|
+
while (1) {
|
|
19632
|
+
switch (_context13.prev = _context13.next) {
|
|
19633
|
+
case 0:
|
|
19634
|
+
payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
|
|
19635
|
+
_ref23 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref23.rejectWithValue;
|
|
19636
|
+
_context13.prev = 2;
|
|
19637
|
+
id = payload.id;
|
|
19638
|
+
_context13.next = 6;
|
|
19639
|
+
return fetchData({
|
|
19640
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugCatalogMasterSingleRead(id))
|
|
19641
|
+
}, __readDocumentUrl__);
|
|
19642
|
+
|
|
19643
|
+
case 6:
|
|
19644
|
+
data = _context13.sent;
|
|
19645
|
+
return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19646
|
+
data: data.result
|
|
19647
|
+
}));
|
|
19648
|
+
|
|
19649
|
+
case 10:
|
|
19650
|
+
_context13.prev = 10;
|
|
19651
|
+
_context13.t0 = _context13["catch"](2);
|
|
19652
|
+
return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19653
|
+
message: _context13.t0.message
|
|
19654
|
+
})));
|
|
19655
|
+
|
|
19656
|
+
case 13:
|
|
19657
|
+
case "end":
|
|
19658
|
+
return _context13.stop();
|
|
19659
|
+
}
|
|
19660
|
+
}
|
|
19661
|
+
}, _callee13, null, [[2, 10]]);
|
|
19662
|
+
})));
|
|
19663
|
+
var DRUG_MASTER_SAVE = createAsyncThunk("drugMasterSlice/drug_catalog_master_save", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
|
|
19664
|
+
var payload,
|
|
19665
|
+
_ref25,
|
|
19666
|
+
rejectWithValue,
|
|
19667
|
+
body,
|
|
19668
|
+
Body,
|
|
19669
|
+
data,
|
|
19670
|
+
_args14 = arguments;
|
|
19671
|
+
|
|
19672
|
+
return regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
19673
|
+
while (1) {
|
|
19674
|
+
switch (_context14.prev = _context14.next) {
|
|
19675
|
+
case 0:
|
|
19676
|
+
payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
|
|
19677
|
+
_ref25 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref25.rejectWithValue;
|
|
19678
|
+
_context14.prev = 2;
|
|
19679
|
+
body = payload.body;
|
|
19680
|
+
Body = GenerateUpsert(body);
|
|
19681
|
+
_context14.next = 7;
|
|
19682
|
+
return fetchData({
|
|
19683
|
+
body: JSON.stringify(Body)
|
|
19684
|
+
}, __uspsertUrl__);
|
|
19685
|
+
|
|
19686
|
+
case 7:
|
|
19687
|
+
data = _context14.sent;
|
|
19688
|
+
return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
19689
|
+
data: data
|
|
19690
|
+
}));
|
|
19691
|
+
|
|
19692
|
+
case 11:
|
|
19693
|
+
_context14.prev = 11;
|
|
19694
|
+
_context14.t0 = _context14["catch"](2);
|
|
19695
|
+
return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19696
|
+
message: _context14.t0.message
|
|
19697
|
+
})));
|
|
19698
|
+
|
|
19699
|
+
case 14:
|
|
19700
|
+
case "end":
|
|
19701
|
+
return _context14.stop();
|
|
19702
|
+
}
|
|
19703
|
+
}
|
|
19704
|
+
}, _callee14, null, [[2, 11]]);
|
|
19705
|
+
})));
|
|
19706
|
+
var RULE_GROUP_DROPDOWN = createAsyncThunk("drugMasterSlice/getGroup", /*#__PURE__*/function () {
|
|
19707
|
+
var _ref26 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(payload, action) {
|
|
19708
|
+
var _rejectWithValue, body, options, _res, response;
|
|
19709
|
+
|
|
19710
|
+
return regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
19711
|
+
while (1) {
|
|
19712
|
+
switch (_context15.prev = _context15.next) {
|
|
19713
|
+
case 0:
|
|
19714
|
+
_context15.prev = 0;
|
|
19715
|
+
_rejectWithValue = action.rejectWithValue;
|
|
19716
|
+
body = {};
|
|
19717
|
+
body = JSON.stringify(drugCatalogMasterQuery.ruleGroup());
|
|
19718
|
+
options = {
|
|
19719
|
+
method: "Post",
|
|
19720
|
+
headers: {
|
|
19721
|
+
"Content-Type": "application/json",
|
|
19722
|
+
Accept: "application/json"
|
|
19723
|
+
},
|
|
19724
|
+
body: body
|
|
19725
|
+
};
|
|
19726
|
+
_context15.next = 7;
|
|
19727
|
+
return fetch(__readDocumentUrl__, options);
|
|
19728
|
+
|
|
19729
|
+
case 7:
|
|
19730
|
+
_res = _context15.sent;
|
|
19731
|
+
|
|
19732
|
+
if (_res.ok) {
|
|
19733
|
+
_context15.next = 10;
|
|
19734
|
+
break;
|
|
19735
|
+
}
|
|
19736
|
+
|
|
19737
|
+
return _context15.abrupt("return", _rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19738
|
+
message: _res === null || _res === void 0 ? void 0 : _res.statusText,
|
|
19739
|
+
Code: _res.status
|
|
19740
|
+
})));
|
|
19741
|
+
|
|
19742
|
+
case 10:
|
|
19743
|
+
_context15.next = 12;
|
|
19744
|
+
return _res.json();
|
|
19745
|
+
|
|
19746
|
+
case 12:
|
|
19747
|
+
response = _context15.sent;
|
|
19748
|
+
return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, response), {}, {
|
|
19749
|
+
Code: _res.status
|
|
19750
|
+
}));
|
|
19751
|
+
|
|
19752
|
+
case 16:
|
|
19753
|
+
_context15.prev = 16;
|
|
19754
|
+
_context15.t0 = _context15["catch"](0);
|
|
19755
|
+
return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19756
|
+
message: _context15.t0.message
|
|
19757
|
+
})));
|
|
19758
|
+
|
|
19759
|
+
case 19:
|
|
19760
|
+
case "end":
|
|
19761
|
+
return _context15.stop();
|
|
19762
|
+
}
|
|
19763
|
+
}
|
|
19764
|
+
}, _callee15, null, [[0, 16]]);
|
|
19765
|
+
}));
|
|
19766
|
+
|
|
19767
|
+
return function (_x6, _x7) {
|
|
19768
|
+
return _ref26.apply(this, arguments);
|
|
19769
|
+
};
|
|
19770
|
+
}());
|
|
19771
|
+
var DRUG_RULE_TYPE = createAsyncThunk("drugMasterSlice/drug_rule_type", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
|
|
19772
|
+
var _ref28,
|
|
19773
|
+
rejectWithValue,
|
|
19774
|
+
_data$result4,
|
|
19775
|
+
data,
|
|
19776
|
+
_data$result5,
|
|
19777
|
+
_data$result5$map,
|
|
19778
|
+
res,
|
|
19779
|
+
_args16 = arguments;
|
|
19780
|
+
|
|
19781
|
+
return regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
19782
|
+
while (1) {
|
|
19783
|
+
switch (_context16.prev = _context16.next) {
|
|
19784
|
+
case 0:
|
|
19785
|
+
_ref28 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref28.rejectWithValue;
|
|
19786
|
+
_context16.prev = 2;
|
|
19787
|
+
_context16.next = 5;
|
|
19788
|
+
return fetchData({
|
|
19789
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugRuleType())
|
|
19790
|
+
}, __readDocumentUrl__);
|
|
19791
|
+
|
|
19792
|
+
case 5:
|
|
19793
|
+
data = _context16.sent;
|
|
19794
|
+
|
|
19795
|
+
if (!((data === null || data === void 0 ? void 0 : (_data$result4 = data.result) === null || _data$result4 === void 0 ? void 0 : _data$result4.length) > 0)) {
|
|
19796
|
+
_context16.next = 11;
|
|
19797
|
+
break;
|
|
19798
|
+
}
|
|
19799
|
+
|
|
19800
|
+
res = data === null || data === void 0 ? void 0 : (_data$result5 = data.result) === null || _data$result5 === void 0 ? void 0 : (_data$result5$map = _data$result5.map(function (option) {
|
|
19801
|
+
return _objectSpread2(_objectSpread2({}, option), {}, {
|
|
19802
|
+
label: option === null || option === void 0 ? void 0 : option.display,
|
|
19803
|
+
value: option === null || option === void 0 ? void 0 : option._id
|
|
19804
|
+
});
|
|
19805
|
+
})) === null || _data$result5$map === void 0 ? void 0 : _data$result5$map.reverse();
|
|
19806
|
+
return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19807
|
+
data: res
|
|
19808
|
+
}));
|
|
19809
|
+
|
|
19810
|
+
case 11:
|
|
19811
|
+
return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19812
|
+
data: []
|
|
19813
|
+
}));
|
|
19814
|
+
|
|
19815
|
+
case 12:
|
|
19816
|
+
_context16.next = 17;
|
|
19817
|
+
break;
|
|
19818
|
+
|
|
19819
|
+
case 14:
|
|
19820
|
+
_context16.prev = 14;
|
|
19821
|
+
_context16.t0 = _context16["catch"](2);
|
|
19822
|
+
return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19823
|
+
message: _context16.t0.message
|
|
19824
|
+
})));
|
|
19825
|
+
|
|
19826
|
+
case 17:
|
|
19827
|
+
case "end":
|
|
19828
|
+
return _context16.stop();
|
|
19829
|
+
}
|
|
19830
|
+
}
|
|
19831
|
+
}, _callee16, null, [[2, 14]]);
|
|
19832
|
+
})));
|
|
19833
|
+
var DRUG_PRIVILEGE_TYPE = createAsyncThunk("drugMasterSlice/drug_privilege_type", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
|
|
19834
|
+
var _ref30,
|
|
19835
|
+
rejectWithValue,
|
|
19836
|
+
_data$result6,
|
|
19837
|
+
data,
|
|
19838
|
+
_data$result7,
|
|
19839
|
+
res,
|
|
19840
|
+
_args17 = arguments;
|
|
19841
|
+
|
|
19842
|
+
return regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
19843
|
+
while (1) {
|
|
19844
|
+
switch (_context17.prev = _context17.next) {
|
|
19845
|
+
case 0:
|
|
19846
|
+
_ref30 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref30.rejectWithValue;
|
|
19847
|
+
_context17.prev = 2;
|
|
19848
|
+
_context17.next = 5;
|
|
19849
|
+
return fetchData({
|
|
19850
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugPrivilegeType())
|
|
19851
|
+
}, __readDocumentUrl__);
|
|
19852
|
+
|
|
19853
|
+
case 5:
|
|
19854
|
+
data = _context17.sent;
|
|
19855
|
+
|
|
19856
|
+
if (!((data === null || data === void 0 ? void 0 : (_data$result6 = data.result) === null || _data$result6 === void 0 ? void 0 : _data$result6.length) > 0)) {
|
|
19857
|
+
_context17.next = 11;
|
|
19858
|
+
break;
|
|
19859
|
+
}
|
|
19860
|
+
|
|
19861
|
+
res = data === null || data === void 0 ? void 0 : (_data$result7 = data.result) === null || _data$result7 === void 0 ? void 0 : _data$result7.map(function (option) {
|
|
19862
|
+
return _objectSpread2(_objectSpread2({}, option), {}, {
|
|
19863
|
+
label: option === null || option === void 0 ? void 0 : option.display,
|
|
19864
|
+
value: option === null || option === void 0 ? void 0 : option._id
|
|
19865
|
+
});
|
|
19866
|
+
});
|
|
19867
|
+
return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19868
|
+
data: res
|
|
19869
|
+
}));
|
|
19870
|
+
|
|
19871
|
+
case 11:
|
|
19872
|
+
return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19873
|
+
data: []
|
|
19874
|
+
}));
|
|
19875
|
+
|
|
19876
|
+
case 12:
|
|
19877
|
+
_context17.next = 17;
|
|
19878
|
+
break;
|
|
19879
|
+
|
|
19880
|
+
case 14:
|
|
19881
|
+
_context17.prev = 14;
|
|
19882
|
+
_context17.t0 = _context17["catch"](2);
|
|
19883
|
+
return _context17.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19884
|
+
message: _context17.t0.message
|
|
19885
|
+
})));
|
|
19886
|
+
|
|
19887
|
+
case 17:
|
|
19888
|
+
case "end":
|
|
19889
|
+
return _context17.stop();
|
|
19890
|
+
}
|
|
19891
|
+
}
|
|
19892
|
+
}, _callee17, null, [[2, 14]]);
|
|
19893
|
+
})));
|
|
19894
|
+
var DRUG_SERVICE_APPLICABILITY_TYPE = createAsyncThunk("drugMasterSlice/drug_service_applicability_type", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
|
|
19895
|
+
var _ref32,
|
|
19896
|
+
rejectWithValue,
|
|
19897
|
+
_data$result8,
|
|
19898
|
+
data,
|
|
19899
|
+
_data$result9,
|
|
19900
|
+
_data$result9$map,
|
|
19901
|
+
res,
|
|
19902
|
+
_args18 = arguments;
|
|
19903
|
+
|
|
19904
|
+
return regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
19905
|
+
while (1) {
|
|
19906
|
+
switch (_context18.prev = _context18.next) {
|
|
19907
|
+
case 0:
|
|
19908
|
+
_ref32 = _args18.length > 1 ? _args18[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
|
|
19909
|
+
_context18.prev = 2;
|
|
19910
|
+
_context18.next = 5;
|
|
19911
|
+
return fetchData({
|
|
19912
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugServiceApplicabilityType())
|
|
19913
|
+
}, __readDocumentUrl__);
|
|
19914
|
+
|
|
19915
|
+
case 5:
|
|
19916
|
+
data = _context18.sent;
|
|
19917
|
+
|
|
19918
|
+
if (!((data === null || data === void 0 ? void 0 : (_data$result8 = data.result) === null || _data$result8 === void 0 ? void 0 : _data$result8.length) > 0)) {
|
|
19919
|
+
_context18.next = 11;
|
|
19920
|
+
break;
|
|
19921
|
+
}
|
|
19922
|
+
|
|
19923
|
+
res = data === null || data === void 0 ? void 0 : (_data$result9 = data.result) === null || _data$result9 === void 0 ? void 0 : (_data$result9$map = _data$result9.map(function (option) {
|
|
19924
|
+
return _objectSpread2(_objectSpread2({}, option), {}, {
|
|
19925
|
+
label: option === null || option === void 0 ? void 0 : option.display,
|
|
19926
|
+
value: option === null || option === void 0 ? void 0 : option._id
|
|
19927
|
+
});
|
|
19928
|
+
})) === null || _data$result9$map === void 0 ? void 0 : _data$result9$map.reverse();
|
|
19929
|
+
return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19930
|
+
data: res
|
|
19931
|
+
}));
|
|
19932
|
+
|
|
19933
|
+
case 11:
|
|
19934
|
+
return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19935
|
+
data: []
|
|
19936
|
+
}));
|
|
19937
|
+
|
|
19938
|
+
case 12:
|
|
19939
|
+
_context18.next = 17;
|
|
19940
|
+
break;
|
|
19941
|
+
|
|
19942
|
+
case 14:
|
|
19943
|
+
_context18.prev = 14;
|
|
19944
|
+
_context18.t0 = _context18["catch"](2);
|
|
19945
|
+
return _context18.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19946
|
+
message: _context18.t0.message
|
|
19947
|
+
})));
|
|
19948
|
+
|
|
19949
|
+
case 17:
|
|
19950
|
+
case "end":
|
|
19951
|
+
return _context18.stop();
|
|
19952
|
+
}
|
|
19953
|
+
}
|
|
19954
|
+
}, _callee18, null, [[2, 14]]);
|
|
19955
|
+
})));
|
|
19956
|
+
var DRUG_FACILITY_OPTIONS = createAsyncThunk("drugMasterSlice/drug_facility_options", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19() {
|
|
19957
|
+
var _ref34,
|
|
19958
|
+
rejectWithValue,
|
|
19959
|
+
_data$result10,
|
|
19960
|
+
data,
|
|
19961
|
+
_data$result11,
|
|
19962
|
+
res,
|
|
19963
|
+
_args19 = arguments;
|
|
19964
|
+
|
|
19965
|
+
return regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
19966
|
+
while (1) {
|
|
19967
|
+
switch (_context19.prev = _context19.next) {
|
|
19968
|
+
case 0:
|
|
19969
|
+
_ref34 = _args19.length > 1 ? _args19[1] : undefined, rejectWithValue = _ref34.rejectWithValue;
|
|
19970
|
+
_context19.prev = 2;
|
|
19971
|
+
_context19.next = 5;
|
|
19972
|
+
return fetchData({
|
|
19973
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugFacilityOptions())
|
|
19974
|
+
}, __readDocumentUrl__);
|
|
19975
|
+
|
|
19976
|
+
case 5:
|
|
19977
|
+
data = _context19.sent;
|
|
19978
|
+
|
|
19979
|
+
if (!((data === null || data === void 0 ? void 0 : (_data$result10 = data.result) === null || _data$result10 === void 0 ? void 0 : _data$result10.length) > 0)) {
|
|
19980
|
+
_context19.next = 11;
|
|
19981
|
+
break;
|
|
19982
|
+
}
|
|
19983
|
+
|
|
19984
|
+
res = data === null || data === void 0 ? void 0 : (_data$result11 = data.result) === null || _data$result11 === void 0 ? void 0 : _data$result11.map(function (option) {
|
|
19985
|
+
return _objectSpread2(_objectSpread2({}, option), {}, {
|
|
19986
|
+
label: option === null || option === void 0 ? void 0 : option.name,
|
|
19987
|
+
value: option === null || option === void 0 ? void 0 : option._id
|
|
19988
|
+
});
|
|
19989
|
+
});
|
|
19990
|
+
return _context19.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19991
|
+
data: res
|
|
19992
|
+
}));
|
|
19993
|
+
|
|
19994
|
+
case 11:
|
|
19995
|
+
return _context19.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19996
|
+
data: []
|
|
19997
|
+
}));
|
|
19998
|
+
|
|
19999
|
+
case 12:
|
|
20000
|
+
_context19.next = 17;
|
|
20001
|
+
break;
|
|
20002
|
+
|
|
20003
|
+
case 14:
|
|
20004
|
+
_context19.prev = 14;
|
|
20005
|
+
_context19.t0 = _context19["catch"](2);
|
|
20006
|
+
return _context19.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
20007
|
+
message: _context19.t0.message
|
|
20008
|
+
})));
|
|
20009
|
+
|
|
20010
|
+
case 17:
|
|
20011
|
+
case "end":
|
|
20012
|
+
return _context19.stop();
|
|
20013
|
+
}
|
|
20014
|
+
}
|
|
20015
|
+
}, _callee19, null, [[2, 14]]);
|
|
20016
|
+
})));
|
|
20017
|
+
var DRUG_APPROVAL_WORKFLOW_OPTIONS = createAsyncThunk("drugMasterSlice/drug_approval_workflow_options", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20() {
|
|
20018
|
+
var _ref36,
|
|
20019
|
+
rejectWithValue,
|
|
20020
|
+
_data$result12,
|
|
20021
|
+
data,
|
|
20022
|
+
_data$result13,
|
|
20023
|
+
res,
|
|
20024
|
+
_args20 = arguments;
|
|
20025
|
+
|
|
20026
|
+
return regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
20027
|
+
while (1) {
|
|
20028
|
+
switch (_context20.prev = _context20.next) {
|
|
20029
|
+
case 0:
|
|
20030
|
+
_ref36 = _args20.length > 1 ? _args20[1] : undefined, rejectWithValue = _ref36.rejectWithValue;
|
|
20031
|
+
_context20.prev = 2;
|
|
20032
|
+
_context20.next = 5;
|
|
20033
|
+
return fetchData({
|
|
20034
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugApprovalWorkflowOptions())
|
|
20035
|
+
}, __readDocumentUrl__);
|
|
20036
|
+
|
|
20037
|
+
case 5:
|
|
20038
|
+
data = _context20.sent;
|
|
20039
|
+
|
|
20040
|
+
if (!((data === null || data === void 0 ? void 0 : (_data$result12 = data.result) === null || _data$result12 === void 0 ? void 0 : _data$result12.length) > 0)) {
|
|
20041
|
+
_context20.next = 11;
|
|
20042
|
+
break;
|
|
20043
|
+
}
|
|
20044
|
+
|
|
20045
|
+
res = data === null || data === void 0 ? void 0 : (_data$result13 = data.result) === null || _data$result13 === void 0 ? void 0 : _data$result13.map(function (option) {
|
|
20046
|
+
return _objectSpread2(_objectSpread2({}, option), {}, {
|
|
20047
|
+
label: option === null || option === void 0 ? void 0 : option.scenarioname,
|
|
20048
|
+
value: option === null || option === void 0 ? void 0 : option._id
|
|
20049
|
+
});
|
|
20050
|
+
});
|
|
20051
|
+
return _context20.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
20052
|
+
data: res
|
|
20053
|
+
}));
|
|
20054
|
+
|
|
20055
|
+
case 11:
|
|
20056
|
+
return _context20.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
20057
|
+
data: []
|
|
20058
|
+
}));
|
|
20059
|
+
|
|
20060
|
+
case 12:
|
|
20061
|
+
_context20.next = 17;
|
|
20062
|
+
break;
|
|
20063
|
+
|
|
20064
|
+
case 14:
|
|
20065
|
+
_context20.prev = 14;
|
|
20066
|
+
_context20.t0 = _context20["catch"](2);
|
|
20067
|
+
return _context20.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
20068
|
+
message: _context20.t0.message
|
|
20069
|
+
})));
|
|
20070
|
+
|
|
20071
|
+
case 17:
|
|
20072
|
+
case "end":
|
|
20073
|
+
return _context20.stop();
|
|
20074
|
+
}
|
|
20075
|
+
}
|
|
20076
|
+
}, _callee20, null, [[2, 14]]);
|
|
20077
|
+
})));
|
|
20078
|
+
var DRUG_ALERTS_RESTRICTIONS_SINGLE_READ = createAsyncThunk("drugMasterSlice/drug_alerts_restriction_singleRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee21() {
|
|
20079
|
+
var payload,
|
|
20080
|
+
_ref38,
|
|
20081
|
+
rejectWithValue,
|
|
20082
|
+
id,
|
|
20083
|
+
data,
|
|
20084
|
+
_args21 = arguments;
|
|
20085
|
+
|
|
20086
|
+
return regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
20087
|
+
while (1) {
|
|
20088
|
+
switch (_context21.prev = _context21.next) {
|
|
20089
|
+
case 0:
|
|
20090
|
+
payload = _args21.length > 0 && _args21[0] !== undefined ? _args21[0] : {};
|
|
20091
|
+
_ref38 = _args21.length > 1 ? _args21[1] : undefined, rejectWithValue = _ref38.rejectWithValue;
|
|
20092
|
+
_context21.prev = 2;
|
|
20093
|
+
id = payload.id;
|
|
20094
|
+
_context21.next = 6;
|
|
20095
|
+
return fetchData({
|
|
20096
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugalertRestrictionSingleRead(id))
|
|
20097
|
+
}, __readDocumentUrl__);
|
|
20098
|
+
|
|
20099
|
+
case 6:
|
|
20100
|
+
data = _context21.sent;
|
|
20101
|
+
return _context21.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
20102
|
+
data: data.result
|
|
20103
|
+
}));
|
|
20104
|
+
|
|
20105
|
+
case 10:
|
|
20106
|
+
_context21.prev = 10;
|
|
20107
|
+
_context21.t0 = _context21["catch"](2);
|
|
20108
|
+
return _context21.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
20109
|
+
message: _context21.t0.message
|
|
20110
|
+
})));
|
|
20111
|
+
|
|
20112
|
+
case 13:
|
|
20113
|
+
case "end":
|
|
20114
|
+
return _context21.stop();
|
|
20115
|
+
}
|
|
20116
|
+
}
|
|
20117
|
+
}, _callee21, null, [[2, 10]]);
|
|
20118
|
+
})));
|
|
20119
|
+
var DRUG_ALERTS_RESTRICTIONS_SAVE = createAsyncThunk("drugMasterSlice/drug_alerts_restrictions_save", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee22() {
|
|
20120
|
+
var payload,
|
|
20121
|
+
_ref40,
|
|
20122
|
+
rejectWithValue,
|
|
20123
|
+
body,
|
|
20124
|
+
Body,
|
|
20125
|
+
data,
|
|
20126
|
+
_args22 = arguments;
|
|
20127
|
+
|
|
20128
|
+
return regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
20129
|
+
while (1) {
|
|
20130
|
+
switch (_context22.prev = _context22.next) {
|
|
20131
|
+
case 0:
|
|
20132
|
+
payload = _args22.length > 0 && _args22[0] !== undefined ? _args22[0] : {};
|
|
20133
|
+
_ref40 = _args22.length > 1 ? _args22[1] : undefined, rejectWithValue = _ref40.rejectWithValue;
|
|
20134
|
+
_context22.prev = 2;
|
|
20135
|
+
body = payload.body;
|
|
20136
|
+
Body = GenerateAlertRestrictionUpsert(body);
|
|
20137
|
+
_context22.next = 7;
|
|
20138
|
+
return fetchData({
|
|
20139
|
+
body: JSON.stringify(Body)
|
|
20140
|
+
}, __uspsertUrl__);
|
|
20141
|
+
|
|
20142
|
+
case 7:
|
|
20143
|
+
data = _context22.sent;
|
|
20144
|
+
return _context22.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
20145
|
+
data: data
|
|
20146
|
+
}));
|
|
20147
|
+
|
|
20148
|
+
case 11:
|
|
20149
|
+
_context22.prev = 11;
|
|
20150
|
+
_context22.t0 = _context22["catch"](2);
|
|
20151
|
+
return _context22.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
20152
|
+
message: _context22.t0.message
|
|
20153
|
+
})));
|
|
20154
|
+
|
|
20155
|
+
case 14:
|
|
20156
|
+
case "end":
|
|
20157
|
+
return _context22.stop();
|
|
20158
|
+
}
|
|
20159
|
+
}
|
|
20160
|
+
}, _callee22, null, [[2, 11]]);
|
|
20161
|
+
})));
|
|
20162
|
+
var drugMasterSlice = createSlice({
|
|
20163
|
+
name: "drugMasterSlice",
|
|
20164
|
+
initialState: {
|
|
20165
|
+
drug_master_list: _objectSpread2({}, defaultState.List),
|
|
20166
|
+
drug_master_upsert: _objectSpread2({}, defaultState.List),
|
|
20167
|
+
drug_master_status: _objectSpread2({}, defaultState.List),
|
|
20168
|
+
drug_master: _objectSpread2({}, defaultState.Info),
|
|
20169
|
+
upsert_drug_master: _objectSpread2({}, defaultState.List),
|
|
20170
|
+
drug_form_type: _objectSpread2({}, defaultState.List),
|
|
20171
|
+
drug_form_read: _objectSpread2({}, defaultState.List),
|
|
20172
|
+
age_category_by_id: _objectSpread2({}, defaultState.List),
|
|
20173
|
+
drugCatalogMasterEntityNameOptions: _objectSpread2({}, defaultState.List),
|
|
20174
|
+
drugCatalogMasterSingleread: _objectSpread2({}, defaultState.List),
|
|
20175
|
+
drugCatalogMasterSave: _objectSpread2({}, defaultState.Info),
|
|
20176
|
+
getGroup: _objectSpread2({}, defaultState.Info),
|
|
20177
|
+
drugRuleType: _objectSpread2({}, defaultState.List),
|
|
20178
|
+
drugPrivilegeType: _objectSpread2({}, defaultState.List),
|
|
20179
|
+
drugServiceApplicabilityType: _objectSpread2({}, defaultState.List),
|
|
20180
|
+
drugFacilityOptions: _objectSpread2({}, defaultState.List),
|
|
20181
|
+
drugApprovalWorkflowOptions: _objectSpread2({}, defaultState.List),
|
|
20182
|
+
drugAlertsRestrictionSingleRead: _objectSpread2({}, defaultState.Info),
|
|
20183
|
+
drugAlertsRestrictionSave: _objectSpread2({}, defaultState.Info)
|
|
20184
|
+
},
|
|
20185
|
+
extraReducers: (_extraReducers$t = {}, _defineProperty(_extraReducers$t, DRUG_MASTER_READ.fulfilled, function (state, action) {
|
|
20186
|
+
state.drug_master_list.loading = false, state.drug_master_list.error = false, state.drug_master_list = action.payload;
|
|
20187
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_READ.pending, function (state, action) {
|
|
20188
|
+
state.drug_master_list.loading = true, state.drug_master_list.error = false, state.drug_master_list.loading = true;
|
|
20189
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_READ.rejected, function (state, action) {
|
|
20190
|
+
state.drug_master_list.loading = false, state.drug_master_list.error = true, state.drug_master_list = action.payload;
|
|
20191
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_UPSERT.fulfilled, function (state, action) {
|
|
20192
|
+
state.drug_master_upsert.loading = false, state.drug_master_upsert.error = false, state.drug_master_upsert = action.payload;
|
|
20193
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_UPSERT.pending, function (state, action) {
|
|
20194
|
+
state.drug_master_upsert.loading = true, state.drug_master_upsert.error = false, state.drug_master_upsert.loading = true;
|
|
20195
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_UPSERT.rejected, function (state, action) {
|
|
20196
|
+
state.drug_master_upsert.loading = false, state.drug_master_upsert.error = true, state.drug_master_upsert = action.payload;
|
|
20197
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_STATUS_CHANGE.fulfilled, function (state, action) {
|
|
20198
|
+
state.drug_master_status.loading = false, state.drug_master_status.error = false, state.drug_master_status = action.payload;
|
|
20199
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_STATUS_CHANGE.pending, function (state, action) {
|
|
20200
|
+
state.drug_master_status.loading = true, state.drug_master_status.error = false, state.drug_master_status.loading = true;
|
|
20201
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_STATUS_CHANGE.rejected, function (state, action) {
|
|
20202
|
+
state.drug_master_status.loading = false, state.drug_master_status.error = true, state.drug_master_status = action.payload;
|
|
20203
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTERS.fulfilled, function (state, action) {
|
|
20204
|
+
state.drug_master.loading = false, state.drug_master.error = false, state.drug_master = action.payload;
|
|
20205
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTERS.pending, function (state, action) {
|
|
20206
|
+
state.drug_master.loading = true, state.drug_master.error = false, state.drug_master.loading = true;
|
|
20207
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTERS.rejected, function (state, action) {
|
|
20208
|
+
state.drug_master.loading = false, state.drug_master.error = true, state.drug_master = action.payload;
|
|
20209
|
+
}), _defineProperty(_extraReducers$t, SAVE_DRUG_MASTER.fulfilled, function (state, action) {
|
|
20210
|
+
state.upsert_drug_master.loading = false, state.upsert_drug_master.error = false, state.upsert_drug_master = action.payload;
|
|
20211
|
+
}), _defineProperty(_extraReducers$t, SAVE_DRUG_MASTER.pending, function (state, action) {
|
|
20212
|
+
state.upsert_drug_master.loading = true, state.upsert_drug_master.error = false, state.upsert_drug_master.loading = true;
|
|
20213
|
+
}), _defineProperty(_extraReducers$t, SAVE_DRUG_MASTER.rejected, function (state, action) {
|
|
20214
|
+
state.upsert_drug_master.loading = false, state.upsert_drug_master.error = true, state.upsert_drug_master = action.payload;
|
|
20215
|
+
}), _defineProperty(_extraReducers$t, DRUG_FORM_TYPE.fulfilled, function (state, action) {
|
|
20216
|
+
state.drug_form_type.loading = false, state.drug_form_type.error = false, state.drug_form_type = action.payload;
|
|
20217
|
+
}), _defineProperty(_extraReducers$t, DRUG_FORM_TYPE.pending, function (state, action) {
|
|
20218
|
+
state.drug_form_type.loading = true, state.drug_form_type.error = false, state.drug_form_type.loading = true;
|
|
20219
|
+
}), _defineProperty(_extraReducers$t, DRUG_FORM_TYPE.rejected, function (state, action) {
|
|
20220
|
+
state.drug_form_type.loading = false, state.drug_form_type.error = true, state.drug_form_type = action.payload;
|
|
20221
|
+
}), _defineProperty(_extraReducers$t, DRUG_READ_FORM.fulfilled, function (state, action) {
|
|
20222
|
+
state.drug_form_read.loading = false, state.drug_form_read.error = false, state.drug_form_read = action.payload;
|
|
20223
|
+
}), _defineProperty(_extraReducers$t, DRUG_READ_FORM.pending, function (state, action) {
|
|
20224
|
+
state.drug_form_read.loading = true, state.drug_form_read.error = false, state.drug_form_read.loading = true;
|
|
20225
|
+
}), _defineProperty(_extraReducers$t, DRUG_READ_FORM.rejected, function (state, action) {
|
|
20226
|
+
state.drug_form_read.loading = false, state.drug_form_read.error = true, state.drug_form_read = action.payload;
|
|
20227
|
+
}), _defineProperty(_extraReducers$t, AGE_CATEGORY_BY_ID.fulfilled, function (state, action) {
|
|
20228
|
+
state.age_category_by_id.loading = false, state.age_category_by_id.error = false, state.age_category_by_id = action.payload;
|
|
20229
|
+
}), _defineProperty(_extraReducers$t, AGE_CATEGORY_BY_ID.pending, function (state, action) {
|
|
20230
|
+
state.age_category_by_id.loading = true, state.age_category_by_id.error = false, state.age_category_by_id.loading = true;
|
|
20231
|
+
}), _defineProperty(_extraReducers$t, AGE_CATEGORY_BY_ID.rejected, function (state, action) {
|
|
20232
|
+
state.age_category_by_id.loading = false, state.age_category_by_id.error = true, state.age_category_by_id = action.payload;
|
|
20233
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_ENTITY_NAME_OPTIONS.fulfilled, function (state, action) {
|
|
20234
|
+
var _action$payload;
|
|
20235
|
+
|
|
20236
|
+
state.drugCatalogMasterEntityNameOptions = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
|
|
20237
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_ENTITY_NAME_OPTIONS.pending, function (state, action) {
|
|
20238
|
+
state.drugCatalogMasterEntityNameOptions.loading = true;
|
|
20239
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_ENTITY_NAME_OPTIONS.rejected, function (state, action) {
|
|
20240
|
+
var _action$payload2;
|
|
20241
|
+
|
|
20242
|
+
state.drugCatalogMasterEntityNameOptions = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
|
|
20243
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_SINGLE_READ.fulfilled, function (state, action) {
|
|
20244
|
+
var _action$payload3;
|
|
20245
|
+
|
|
20246
|
+
state.drugCatalogMasterSingleread = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
|
|
20247
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_SINGLE_READ.pending, function (state, action) {
|
|
20248
|
+
state.drugCatalogMasterSingleread.loading = true;
|
|
20249
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_SINGLE_READ.rejected, function (state, action) {
|
|
20250
|
+
var _action$payload4;
|
|
20251
|
+
|
|
20252
|
+
state.drugCatalogMasterSingleread = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
|
|
20253
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_SAVE.fulfilled, function (state, action) {
|
|
20254
|
+
var _action$payload5;
|
|
20255
|
+
|
|
20256
|
+
state.drugCatalogMasterSave = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
|
|
20257
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_SAVE.pending, function (state, action) {
|
|
20258
|
+
state.drugCatalogMasterSave.loading = true;
|
|
20259
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_SAVE.rejected, function (state, action) {
|
|
20260
|
+
var _action$payload6;
|
|
20261
|
+
|
|
20262
|
+
state.drugCatalogMasterSave = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
|
|
20263
|
+
}), _defineProperty(_extraReducers$t, RULE_GROUP_DROPDOWN.fulfilled, function (state, action) {
|
|
20264
|
+
var _action$payload$data, _action$payload7;
|
|
20265
|
+
|
|
20266
|
+
state.getGroup.loading = false, state.getGroup.data = (_action$payload$data = action === null || action === void 0 ? void 0 : (_action$payload7 = action.payload) === null || _action$payload7 === void 0 ? void 0 : _action$payload7.data) !== null && _action$payload$data !== void 0 ? _action$payload$data : action === null || action === void 0 ? void 0 : action.payload, state.getGroup.error = false, state.getGroup.message = httpMessage.OkMessage;
|
|
20267
|
+
}), _defineProperty(_extraReducers$t, RULE_GROUP_DROPDOWN.rejected, function (state, action) {
|
|
20268
|
+
var _action$payload8;
|
|
20269
|
+
|
|
20270
|
+
state.getGroup = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
|
|
20271
|
+
}), _defineProperty(_extraReducers$t, RULE_GROUP_DROPDOWN.pending, function (state, action) {
|
|
20272
|
+
state.getGroup.loading = true;
|
|
20273
|
+
}), _defineProperty(_extraReducers$t, DRUG_RULE_TYPE.fulfilled, function (state, action) {
|
|
20274
|
+
var _action$payload9;
|
|
20275
|
+
|
|
20276
|
+
state.drugRuleType = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
|
|
20277
|
+
}), _defineProperty(_extraReducers$t, DRUG_RULE_TYPE.pending, function (state, action) {
|
|
20278
|
+
state.drugRuleType.loading = true;
|
|
20279
|
+
}), _defineProperty(_extraReducers$t, DRUG_RULE_TYPE.rejected, function (state, action) {
|
|
20280
|
+
var _action$payload10;
|
|
20281
|
+
|
|
20282
|
+
state.drugRuleType = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
|
|
20283
|
+
}), _defineProperty(_extraReducers$t, DRUG_PRIVILEGE_TYPE.fulfilled, function (state, action) {
|
|
20284
|
+
var _action$payload11;
|
|
20285
|
+
|
|
20286
|
+
state.drugPrivilegeType = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
|
|
20287
|
+
}), _defineProperty(_extraReducers$t, DRUG_PRIVILEGE_TYPE.pending, function (state, action) {
|
|
20288
|
+
state.drugPrivilegeType.loading = true;
|
|
20289
|
+
}), _defineProperty(_extraReducers$t, DRUG_PRIVILEGE_TYPE.rejected, function (state, action) {
|
|
20290
|
+
var _action$payload12;
|
|
20291
|
+
|
|
20292
|
+
state.drugPrivilegeType = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
|
|
20293
|
+
}), _defineProperty(_extraReducers$t, DRUG_SERVICE_APPLICABILITY_TYPE.fulfilled, function (state, action) {
|
|
20294
|
+
var _action$payload13;
|
|
20295
|
+
|
|
20296
|
+
state.drugServiceApplicabilityType = (_action$payload13 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload13 !== void 0 ? _action$payload13 : {};
|
|
20297
|
+
}), _defineProperty(_extraReducers$t, DRUG_SERVICE_APPLICABILITY_TYPE.pending, function (state, action) {
|
|
20298
|
+
state.drugServiceApplicabilityType.loading = true;
|
|
20299
|
+
}), _defineProperty(_extraReducers$t, DRUG_SERVICE_APPLICABILITY_TYPE.rejected, function (state, action) {
|
|
20300
|
+
var _action$payload14;
|
|
20301
|
+
|
|
20302
|
+
state.drugServiceApplicabilityType = (_action$payload14 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload14 !== void 0 ? _action$payload14 : {};
|
|
20303
|
+
}), _defineProperty(_extraReducers$t, DRUG_FACILITY_OPTIONS.fulfilled, function (state, action) {
|
|
20304
|
+
var _action$payload15;
|
|
20305
|
+
|
|
20306
|
+
state.drugFacilityOptions = (_action$payload15 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload15 !== void 0 ? _action$payload15 : {};
|
|
20307
|
+
}), _defineProperty(_extraReducers$t, DRUG_FACILITY_OPTIONS.pending, function (state, action) {
|
|
20308
|
+
state.drugFacilityOptions.loading = true;
|
|
20309
|
+
}), _defineProperty(_extraReducers$t, DRUG_FACILITY_OPTIONS.rejected, function (state, action) {
|
|
20310
|
+
var _action$payload16;
|
|
20311
|
+
|
|
20312
|
+
state.drugFacilityOptions = (_action$payload16 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload16 !== void 0 ? _action$payload16 : {};
|
|
20313
|
+
}), _defineProperty(_extraReducers$t, DRUG_APPROVAL_WORKFLOW_OPTIONS.fulfilled, function (state, action) {
|
|
20314
|
+
var _action$payload17;
|
|
20315
|
+
|
|
20316
|
+
state.drugApprovalWorkflowOptions = (_action$payload17 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload17 !== void 0 ? _action$payload17 : {};
|
|
20317
|
+
}), _defineProperty(_extraReducers$t, DRUG_APPROVAL_WORKFLOW_OPTIONS.pending, function (state, action) {
|
|
20318
|
+
state.drugApprovalWorkflowOptions.loading = true;
|
|
20319
|
+
}), _defineProperty(_extraReducers$t, DRUG_APPROVAL_WORKFLOW_OPTIONS.rejected, function (state, action) {
|
|
20320
|
+
var _action$payload18;
|
|
20321
|
+
|
|
20322
|
+
state.drugApprovalWorkflowOptions = (_action$payload18 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload18 !== void 0 ? _action$payload18 : {};
|
|
20323
|
+
}), _defineProperty(_extraReducers$t, DRUG_ALERTS_RESTRICTIONS_SINGLE_READ.fulfilled, function (state, action) {
|
|
20324
|
+
var _action$payload19;
|
|
20325
|
+
|
|
20326
|
+
state.drugAlertsRestrictionSingleRead = (_action$payload19 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload19 !== void 0 ? _action$payload19 : {};
|
|
20327
|
+
}), _defineProperty(_extraReducers$t, DRUG_ALERTS_RESTRICTIONS_SINGLE_READ.pending, function (state, action) {
|
|
20328
|
+
state.drugAlertsRestrictionSingleRead.loading = true;
|
|
20329
|
+
}), _defineProperty(_extraReducers$t, DRUG_ALERTS_RESTRICTIONS_SINGLE_READ.rejected, function (state, action) {
|
|
20330
|
+
var _action$payload20;
|
|
20331
|
+
|
|
20332
|
+
state.drugAlertsRestrictionSingleRead = (_action$payload20 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload20 !== void 0 ? _action$payload20 : {};
|
|
20333
|
+
}), _defineProperty(_extraReducers$t, DRUG_ALERTS_RESTRICTIONS_SAVE.fulfilled, function (state, action) {
|
|
20334
|
+
var _action$payload21;
|
|
20335
|
+
|
|
20336
|
+
state.drugAlertsRestrictionSave = (_action$payload21 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload21 !== void 0 ? _action$payload21 : {};
|
|
20337
|
+
}), _defineProperty(_extraReducers$t, DRUG_ALERTS_RESTRICTIONS_SAVE.pending, function (state, action) {
|
|
20338
|
+
state.drugAlertsRestrictionSave.loading = true;
|
|
20339
|
+
}), _defineProperty(_extraReducers$t, DRUG_ALERTS_RESTRICTIONS_SAVE.rejected, function (state, action) {
|
|
20340
|
+
var _action$payload22;
|
|
20341
|
+
|
|
20342
|
+
state.drugAlertsRestrictionSave = (_action$payload22 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload22 !== void 0 ? _action$payload22 : {};
|
|
19147
20343
|
}), _extraReducers$t)
|
|
19148
20344
|
});
|
|
19149
20345
|
var drugMasterActions = {
|
|
@@ -19154,7 +20350,18 @@ var drugMasterActions = {
|
|
|
19154
20350
|
SAVE_DRUG_MASTER: SAVE_DRUG_MASTER,
|
|
19155
20351
|
DRUG_FORM_TYPE: DRUG_FORM_TYPE,
|
|
19156
20352
|
DRUG_READ_FORM: DRUG_READ_FORM,
|
|
19157
|
-
AGE_CATEGORY_BY_ID: AGE_CATEGORY_BY_ID
|
|
20353
|
+
AGE_CATEGORY_BY_ID: AGE_CATEGORY_BY_ID,
|
|
20354
|
+
DRUG_MASTER_ENTITY_NAME_OPTIONS: DRUG_MASTER_ENTITY_NAME_OPTIONS,
|
|
20355
|
+
DRUG_MASTER_SINGLE_READ: DRUG_MASTER_SINGLE_READ,
|
|
20356
|
+
DRUG_MASTER_SAVE: DRUG_MASTER_SAVE,
|
|
20357
|
+
RULE_GROUP_DROPDOWN: RULE_GROUP_DROPDOWN,
|
|
20358
|
+
DRUG_RULE_TYPE: DRUG_RULE_TYPE,
|
|
20359
|
+
DRUG_PRIVILEGE_TYPE: DRUG_PRIVILEGE_TYPE,
|
|
20360
|
+
DRUG_SERVICE_APPLICABILITY_TYPE: DRUG_SERVICE_APPLICABILITY_TYPE,
|
|
20361
|
+
DRUG_FACILITY_OPTIONS: DRUG_FACILITY_OPTIONS,
|
|
20362
|
+
DRUG_APPROVAL_WORKFLOW_OPTIONS: DRUG_APPROVAL_WORKFLOW_OPTIONS,
|
|
20363
|
+
DRUG_ALERTS_RESTRICTIONS_SINGLE_READ: DRUG_ALERTS_RESTRICTIONS_SINGLE_READ,
|
|
20364
|
+
DRUG_ALERTS_RESTRICTIONS_SAVE: DRUG_ALERTS_RESTRICTIONS_SAVE
|
|
19158
20365
|
};
|
|
19159
20366
|
var drugMasterSlice$1 = drugMasterSlice.reducer;
|
|
19160
20367
|
|