primary_care_admin_binder 0.1.132 → 0.1.136
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 +251 -249
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -9781,14 +9781,14 @@ var getAgeRangeSort = function getAgeRangeSort(sort) {
|
|
|
9781
9781
|
}
|
|
9782
9782
|
};
|
|
9783
9783
|
var query$c = {
|
|
9784
|
-
unitUom: "{\n \"db_name\": \"".concat(
|
|
9784
|
+
unitUom: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\": \"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='VITALSUOM'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
9785
9785
|
// getAgeRange: `{
|
|
9786
9786
|
// "db_name": "${dbName}",
|
|
9787
9787
|
// "entity": "AgeRanges",
|
|
9788
9788
|
// "return_fields": "MERGE(AgeRanges, {AgeCategory: (FOR cat IN TO_ARRAY(AgeRanges.AgeCategory) RETURN MERGE(DOCUMENT(cat), {UOM:(FOR cod IN TO_ARRAY(DOCUMENT(DOCUMENT(cat).UOM).coding) RETURN MERGE(DOCUMENT(DOCUMENT(cat).UOM),{coding:DOCUMENT(cod)} ) ) } ) ) } )"
|
|
9789
9789
|
// }`,
|
|
9790
9790
|
getAgeRange: function getAgeRange(page, perPage, sort, direction, search) {
|
|
9791
|
-
return "{\n \"db_name\": \"".concat(
|
|
9791
|
+
return "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"AgeRanges\",\n \"filter\": \"(LIKE(AgeRanges.agerangecode,'%").concat(search, "%',true) || LIKE(AgeRanges.longdesc,'%").concat(search, "%',true) || LIKE(AgeRanges.shortdesc,'%").concat(search, "%',true)) && AgeRanges.activestatus == true\",\n \"limit\" : { \"offset\" : ").concat(page, ", \"count\": ").concat(perPage, "},\n \"return_fields\": \"MERGE(AgeRanges, {TotalCount:COUNT(").concat(search ? "FOR cnt IN AgeRanges filter UPPER(cnt.agerangecode) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(cnt.longdesc) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(cnt.shortdesc) LIKE '%").concat(search.toUpperCase(), "%' RETURN cnt._key") : "FOR cnt IN AgeRanges RETURN cnt._key", "), AgeCategory: (FOR cat IN TO_ARRAY(AgeRanges.AgeCategory) RETURN MERGE(DOCUMENT(cat), {UOM:(FOR cod IN TO_ARRAY(DOCUMENT(DOCUMENT(cat).UOM).coding) RETURN MERGE(DOCUMENT(DOCUMENT(cat).UOM),{coding:DOCUMENT(cod)} ) ) } ) ) } )\",\n \"sort\":\"").concat(getAgeRangeSort(sort), " ").concat(direction, "\"\n }");
|
|
9792
9792
|
}
|
|
9793
9793
|
};
|
|
9794
9794
|
|
|
@@ -10229,18 +10229,18 @@ var vitalsMeasureCodeSlice$1 = vitalsMeasureCodeSlice.reducer;
|
|
|
10229
10229
|
var query$a = {
|
|
10230
10230
|
entityName: function entityName(data) {
|
|
10231
10231
|
return {
|
|
10232
|
-
db_name:
|
|
10232
|
+
db_name: _dbName,
|
|
10233
10233
|
entity: "Organization",
|
|
10234
10234
|
sort: "Organization.name",
|
|
10235
10235
|
filter: "Organization.OrgType==['".concat(data, "'] && Organization.activestatus==true"),
|
|
10236
10236
|
return_fields: "Organization"
|
|
10237
10237
|
};
|
|
10238
10238
|
},
|
|
10239
|
-
entityType: "{ \n \"db_name\": \"".concat(
|
|
10240
|
-
gender: "{\n \"db_name\": \"".concat(
|
|
10239
|
+
entityType: "{ \n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\": \"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='ORGTYPE' AND CodeableConceptMaster.activestatus==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
10240
|
+
gender: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\": \"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='GENDER' AND CodeableConceptMaster.activestatus==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
10241
10241
|
specialityCodeOrgId: function specialityCodeOrgId(data) {
|
|
10242
10242
|
return {
|
|
10243
|
-
// db_name:
|
|
10243
|
+
// db_name: _dbName,
|
|
10244
10244
|
// entity: "HealthcareService,CodeableConceptMaster",
|
|
10245
10245
|
// filter: {
|
|
10246
10246
|
// HealthcareService: `HealthcareService.OrgID==${data.id}`,
|
|
@@ -10251,19 +10251,19 @@ var query$a = {
|
|
|
10251
10251
|
// return_fields:
|
|
10252
10252
|
// "MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})",
|
|
10253
10253
|
|
|
10254
|
-
db_name:
|
|
10254
|
+
db_name: _dbName,
|
|
10255
10255
|
entity: "Organization",
|
|
10256
10256
|
filter: "Organization.id==".concat(data.id, " && Organization.activestatus==true"),
|
|
10257
10257
|
return_fields: " DOCUMENT(Organization.specialtyDetails[0].specialty)"
|
|
10258
10258
|
};
|
|
10259
10259
|
},
|
|
10260
|
-
specialityCode: "{\n \"db_name\": \"".concat(
|
|
10261
|
-
diagnosis: "{\n \"db_name\": \"".concat(
|
|
10262
|
-
ageRanges: "{\n \"db_name\": \"".concat(
|
|
10263
|
-
vitalcode: "{\n \"db_name\": \"".concat(
|
|
10260
|
+
specialityCode: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"HealthcareService,CodeableConceptMaster\",\n \"filter\":{\"CodeableConceptMaster\":\"CodeableConceptMaster.id IN HealthcareService.SpecialtyID AND CodeableConceptMaster.Type=='SPECIALTY'\"},\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
10261
|
+
diagnosis: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"Diagnosis\",\n \"filter\": \"Diagnosis.activestatus==true\",\n \"return_fields\": \"{'_id':Diagnosis._id,'icdcode':Diagnosis.icdcode,'icdname':Diagnosis.icdname,'parenticdcode':Diagnosis.parenticdcode}\"\n }"),
|
|
10262
|
+
ageRanges: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"AgeRanges\",\n \"filter\": {\n \"AgeRanges\":\"AgeRanges.activestatus==true \"\n },\n \"sort\":\"AgeRanges.agerangecode\",\n \"return_fields\": \"{'AgeRangesDtl':AgeRanges,'AgeCategoryDtl':DOCUMENT(AgeRanges.AgeCategory)}\"\n }"),
|
|
10263
|
+
vitalcode: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"VitalsCodes\",\n \"sort\":\"VitalsCodes.vitalscode\",\n \"filter\": \"VitalsCodes.activestatus==true and VitalsCodes.status==true\",\n \"return_fields\": \"{'id':VitalsCodes._id,'obscode':VitalsCodes.vitalscode,'shortdesc':VitalsCodes.shortdesc,'longdesc':VitalsCodes.longdesc,'_id':VitalsCodes._id}\"\n }"),
|
|
10264
10264
|
ageCategory: function ageCategory(ageRangeId) {
|
|
10265
10265
|
return {
|
|
10266
|
-
db_name:
|
|
10266
|
+
db_name: _dbName,
|
|
10267
10267
|
entity: "AgeRanges",
|
|
10268
10268
|
sort: "AgeRanges.agerangecode",
|
|
10269
10269
|
filter: {
|
|
@@ -10274,7 +10274,7 @@ var query$a = {
|
|
|
10274
10274
|
},
|
|
10275
10275
|
VitalApplicableRead: function VitalApplicableRead(page, perPage, search) {
|
|
10276
10276
|
return {
|
|
10277
|
-
db_name:
|
|
10277
|
+
db_name: _dbName,
|
|
10278
10278
|
entity: "VitalsApplbyPatAtrrib",
|
|
10279
10279
|
sort: "VitalsApplbyPatAtrrib.createddate",
|
|
10280
10280
|
filter: "VitalsApplbyPatAtrrib.activestatus==true ".concat(search ? "&& UPPER(VitalsApplbyPatAtrrib.spltycode) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(VitalsApplbyPatAtrrib.diagcode.icdname) LIKE '%").concat(search.toUpperCase(), "%'") : ""),
|
|
@@ -10287,7 +10287,7 @@ var query$a = {
|
|
|
10287
10287
|
},
|
|
10288
10288
|
editVitalApplicable: function editVitalApplicable(id) {
|
|
10289
10289
|
return {
|
|
10290
|
-
db_name:
|
|
10290
|
+
db_name: _dbName,
|
|
10291
10291
|
entity: "VitalsApplbyPatAtrrib",
|
|
10292
10292
|
filter: "VitalsApplbyPatAtrrib.activestatus==true && VitalsApplbyPatAtrrib._key=='".concat(id.split("/")[1], "'"),
|
|
10293
10293
|
return_fields: "merge(VitalsApplbyPatAtrrib,{organization_id:(document(VitalsApplbyPatAtrrib.organization_id)),gender:(FOR cod IN CodeableConceptMaster filter cod._id==VitalsApplbyPatAtrrib.gender RETURN MERGE(cod,{coding:(FOR d IN TO_ARRAY(cod.coding) RETURN DOCUMENT(d).display)})),spltycode:(FOR cod IN CodeableConceptMaster filter cod._id==VitalsApplbyPatAtrrib.spltycode RETURN MERGE(cod,{coding:(FOR d IN TO_ARRAY(cod.coding) RETURN DOCUMENT(d))})),diagcode:(document(VitalsApplbyPatAtrrib.diagcode)),agecategorycode:(document(VitalsApplbyPatAtrrib.agecategorycode)),agerangecode:(document(VitalsApplbyPatAtrrib.agerangecode)),orgEntityType:(document(VitalsApplbyPatAtrrib.orgEntityType))})"
|
|
@@ -10295,7 +10295,7 @@ var query$a = {
|
|
|
10295
10295
|
},
|
|
10296
10296
|
Diagnosis: function Diagnosis(input_text) {
|
|
10297
10297
|
return {
|
|
10298
|
-
db_name:
|
|
10298
|
+
db_name: _dbName,
|
|
10299
10299
|
entity: "Diagnosis",
|
|
10300
10300
|
filter: "Diagnosis.activestatus==true && Diagnosis.icdname LIKE '%".concat(input_text, "%'"),
|
|
10301
10301
|
return_fields: "{'_id':Diagnosis._id,'icdcode':Diagnosis.icdcode,'icdname':Diagnosis.icdname,'parenticdcode':Diagnosis.parenticdcode}"
|
|
@@ -11173,8 +11173,8 @@ var query_ids = {
|
|
|
11173
11173
|
};
|
|
11174
11174
|
|
|
11175
11175
|
var query$9 = {
|
|
11176
|
-
gender: "{\n \"db_name\": \"".concat(
|
|
11177
|
-
unitAllowed: "{\n \"db_name\": \"".concat(
|
|
11176
|
+
gender: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\": \"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='GENDER'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
11177
|
+
unitAllowed: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"VitalsMeasureCodes\",\n \"sort\":\"VitalsMeasureCodes.ObsValMeasCode\",\n \"filter\": \"VitalsMeasureCodes.activestatus==true && VitalsMeasureCodes.status==true\",\n \"return_fields\": \"VitalsMeasureCodes\"\n }"),
|
|
11178
11178
|
// referenceUnitAllowed: `{
|
|
11179
11179
|
// "db_name": "${dbName}",
|
|
11180
11180
|
// "entity": "CodeableConceptMaster",
|
|
@@ -11182,11 +11182,11 @@ var query$9 = {
|
|
|
11182
11182
|
// "filter": "CodeableConceptMaster.Type=='VITALSUOM'",
|
|
11183
11183
|
// "return_fields": "MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
|
|
11184
11184
|
// }`,
|
|
11185
|
-
referenceUnitAllowed: "{\n \"db_name\": \"".concat(
|
|
11186
|
-
ageRanges: "{\n \"db_name\": \"".concat(
|
|
11185
|
+
referenceUnitAllowed: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"filter\": \"CodingMaster.Type == 'VITALSUOM' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"KEEP(CodingMaster,'_id','id','_key','code','display','Type','status','shortdesc','longdesc','activestatus')\",\n \"sort\": \"CodingMaster.display\"\n }"),
|
|
11186
|
+
ageRanges: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"AgeRanges\",\n \"filter\": {\n \"AgeRanges\":\"AgeRanges.activestatus==true \"\n },\n \"return_fields\": \"{'AgeRangesDtl':AgeRanges,'AgeCategoryDtl':DOCUMENT(AgeRanges.AgeCategory)}\"\n }"),
|
|
11187
11187
|
ageCategory: function ageCategory(ageRangeId) {
|
|
11188
11188
|
return {
|
|
11189
|
-
db_name:
|
|
11189
|
+
db_name: _dbName,
|
|
11190
11190
|
entity: "AgeRanges",
|
|
11191
11191
|
filter: {
|
|
11192
11192
|
AgeRanges: "AgeRanges.activestatus==true && AgeRanges._id=='".concat(ageRangeId, "' ")
|
|
@@ -11194,10 +11194,10 @@ var query$9 = {
|
|
|
11194
11194
|
return_fields: "DOCUMENT( AgeRanges.AgeCategory)"
|
|
11195
11195
|
};
|
|
11196
11196
|
},
|
|
11197
|
-
category: "{\n \"db_name\": \"".concat(
|
|
11197
|
+
category: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"AgeCategory\",\n \"filter\": \"AgeCategory.activestatus==true\",\n \"return_fields\": \"{_id:AgeCategory._id, id:AgeCategory.id, code:AgeCategory.code, age_minimum:AgeCategory.age_minimum, age_maximum:AgeCategory.age_maximum, UOM:AgeCategory.UOM}\"\n}"),
|
|
11198
11198
|
defaultUnit: function defaultUnit(AllowedUnit) {
|
|
11199
11199
|
return {
|
|
11200
|
-
db_name:
|
|
11200
|
+
db_name: _dbName,
|
|
11201
11201
|
entity: "VitalsMeasureCodes",
|
|
11202
11202
|
filter: "VitalsMeasureCodes.activestatus==true && VitalsMeasureCodes._id IN ['".concat(AllowedUnit.join("','"), "']"),
|
|
11203
11203
|
return_fields: "VitalsMeasureCodes"
|
|
@@ -11205,35 +11205,35 @@ var query$9 = {
|
|
|
11205
11205
|
},
|
|
11206
11206
|
VitalReadSearch: function VitalReadSearch(page, perPage, search) {
|
|
11207
11207
|
return {
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11208
|
+
db_name: _dbName,
|
|
11209
|
+
filter: {
|
|
11210
|
+
searchval: search,
|
|
11211
|
+
page: page,
|
|
11212
|
+
perPage: perPage
|
|
11213
11213
|
},
|
|
11214
|
-
|
|
11214
|
+
queryid: query_ids["VitalReadSearch"]
|
|
11215
11215
|
};
|
|
11216
11216
|
},
|
|
11217
11217
|
VitalRead: function VitalRead(page, perPage) {
|
|
11218
11218
|
return {
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11219
|
+
db_name: _dbName,
|
|
11220
|
+
filter: {
|
|
11221
|
+
page: page,
|
|
11222
|
+
perPage: perPage
|
|
11223
11223
|
},
|
|
11224
|
-
|
|
11224
|
+
queryid: query_ids["VitalRead"]
|
|
11225
11225
|
};
|
|
11226
11226
|
},
|
|
11227
11227
|
deleteVitalMaster: function deleteVitalMaster(id) {
|
|
11228
11228
|
return {
|
|
11229
|
-
db_name:
|
|
11229
|
+
db_name: _dbName,
|
|
11230
11230
|
entity: "VitalsCodes",
|
|
11231
11231
|
filter: "VitalsCodes._id=='".concat(id, "'")
|
|
11232
11232
|
};
|
|
11233
11233
|
},
|
|
11234
11234
|
editVitalmaster: function editVitalmaster(id) {
|
|
11235
11235
|
return {
|
|
11236
|
-
db_name:
|
|
11236
|
+
db_name: _dbName,
|
|
11237
11237
|
entity: "VitalsCodes",
|
|
11238
11238
|
filter: "VitalsCodes.activestatus==true && VitalsCodes._id=='".concat(id, "'"),
|
|
11239
11239
|
return_fields: "MERGE(VitalsCodes,{VitalsCodesReferenceRanges:(FOR cod IN VitalsCodes.VitalsCodesReferenceRanges RETURN DOCUMENT(cod))})"
|
|
@@ -15178,9 +15178,9 @@ var queries$j = {
|
|
|
15178
15178
|
};
|
|
15179
15179
|
},
|
|
15180
15180
|
holiday_master: {
|
|
15181
|
-
holiday_type: "{\n \"db_name\": \"".concat(
|
|
15182
|
-
entity_name: "{\n \"db_name\":\"".concat(
|
|
15183
|
-
entity_type: "{\n \"db_name\":\"".concat(
|
|
15181
|
+
holiday_type: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"filter\": \"CodingMaster.Type=='HOLIDAYTYPE' && CodingMaster.activestatus==true && CodingMaster.status==true\",\n \"return_fields\": \"KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')\",\n \"sort\": \"CodingMaster.display\"\n }"),
|
|
15182
|
+
entity_name: "{\n \"db_name\":\"".concat(_dbName, "\",\n \"entity\": \"Organization\",\n \"sort\":\"Organization.name\",\n \"filter\": \"'Hospital' IN Organization.OrgType\",\n \"return_fields\": \"{OrgID:Organization.id,name:Organization.name,_id:Organization._id,OrgType:Organization.OrgType}\"\n }"),
|
|
15183
|
+
entity_type: "{\n \"db_name\":\"".concat(_dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\": \"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='ORGTYPE' && CodeableConceptMaster.activestatus==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }")
|
|
15184
15184
|
},
|
|
15185
15185
|
appointment_type_read: function appointment_type_read(page, perPage, search) {
|
|
15186
15186
|
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \" CodeableConceptMaster.Type == 'APPTYPE' &&(LIKE(document(CodeableConceptMaster.coding[0]).code,'%").concat(search ? search : "", "%',true) ||LIKE(document(CodeableConceptMaster.coding[0]).shortdesc,'%").concat(search ? search : "", "%',true) || LIKE(document(CodeableConceptMaster.coding[0]).longdesc,'%").concat(search ? search : "", "%',true)) && CodeableConceptMaster.status == true && CodeableConceptMaster.activestatus == true\",\n \"limit\": {\n \"offset\": ").concat(page, ",\n \"count\": ").concat(perPage, "\n },\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)},{TotalCount:COUNT(FOR cnt IN CodeableConceptMaster filter cnt.Type=='APPTYPE' filter cnt.activestatus==true RETURN cnt._key)})\"\n}");
|
|
@@ -19940,7 +19940,6 @@ var drugRoutesActions = {
|
|
|
19940
19940
|
};
|
|
19941
19941
|
var drugRoutesSlice$1 = drugRoutesSlice.reducer;
|
|
19942
19942
|
|
|
19943
|
-
var _doc;
|
|
19944
19943
|
var queries$g = {
|
|
19945
19944
|
// drug_master: `{
|
|
19946
19945
|
// "db_name": "${dbName}",
|
|
@@ -19962,112 +19961,115 @@ var queries$g = {
|
|
|
19962
19961
|
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)})")
|
|
19963
19962
|
};
|
|
19964
19963
|
},
|
|
19965
|
-
drug_master_upsert:
|
|
19966
|
-
|
|
19967
|
-
|
|
19968
|
-
|
|
19969
|
-
|
|
19970
|
-
|
|
19971
|
-
|
|
19972
|
-
|
|
19973
|
-
|
|
19974
|
-
DrugCode: "string",
|
|
19975
|
-
ShortDesc: "string",
|
|
19976
|
-
LongDesc: "string",
|
|
19977
|
-
Formulary: "boolean",
|
|
19978
|
-
DrugSynonyms: "string",
|
|
19979
|
-
//Array of string
|
|
19980
|
-
DrugClass: "string",
|
|
19981
|
-
DrugCategory: "string",
|
|
19982
|
-
DrugType: "string",
|
|
19983
|
-
FormCode: "string",
|
|
19984
|
-
RoutesAllowed: "array",
|
|
19985
|
-
DefaultRouteCode: "string",
|
|
19986
|
-
//AVAILABLE STRENGTHS
|
|
19987
|
-
StrengthValuesPossible: [{
|
|
19988
|
-
StrengthValue: "number",
|
|
19989
|
-
StrengthUOM: "string",
|
|
19990
|
-
StrengthVolume: "number",
|
|
19991
|
-
StrengthVolumeUoM: "string",
|
|
19992
|
-
OrderUOMAllowed: [{
|
|
19993
|
-
AllowedOrderDoseVal: "number",
|
|
19994
|
-
AllowedOrderDoseUOM: "string",
|
|
19995
|
-
AllowedOrderDoseVolVal: "number",
|
|
19996
|
-
AllowedOrderDoseVolUoM: "string"
|
|
19997
|
-
}]
|
|
19998
|
-
}],
|
|
19999
|
-
//Drug Other Attributes
|
|
20000
|
-
TrialDrug: "boolean",
|
|
20001
|
-
Additive: "boolean",
|
|
20002
|
-
ApplicableForCompounding: "boolean",
|
|
20003
|
-
DispenseviaprescriptionOnly: "boolean",
|
|
20004
|
-
CounsellingRequired: "boolean",
|
|
20005
|
-
//Alternate drugs
|
|
20006
|
-
AlternateDrugs: "array",
|
|
20007
|
-
//INSTRUCTIONS
|
|
20008
|
-
Instruction_FrequencyRules: [{
|
|
19964
|
+
drug_master_upsert: function drug_master_upsert() {
|
|
19965
|
+
var _doc;
|
|
19966
|
+
return [{
|
|
19967
|
+
db_name: _dbName,
|
|
19968
|
+
entity: "DrugMaster",
|
|
19969
|
+
is_metadata: true,
|
|
19970
|
+
metadataId: metaDataId$1,
|
|
19971
|
+
metadata_dbname: metaDatadbName$1,
|
|
19972
|
+
doc: (_doc = {
|
|
20009
19973
|
_id: "string",
|
|
20010
19974
|
id: "number",
|
|
20011
|
-
|
|
20012
|
-
|
|
20013
|
-
|
|
20014
|
-
|
|
20015
|
-
|
|
20016
|
-
|
|
20017
|
-
|
|
20018
|
-
|
|
20019
|
-
|
|
19975
|
+
DrugCode: "string",
|
|
19976
|
+
ShortDesc: "string",
|
|
19977
|
+
LongDesc: "string",
|
|
19978
|
+
Formulary: "boolean",
|
|
19979
|
+
DrugSynonyms: "string",
|
|
19980
|
+
//Array of string
|
|
19981
|
+
DrugClass: "string",
|
|
19982
|
+
DrugCategory: "string",
|
|
19983
|
+
DrugType: "string",
|
|
19984
|
+
FormCode: "string",
|
|
19985
|
+
RoutesAllowed: "array",
|
|
19986
|
+
DefaultRouteCode: "string",
|
|
19987
|
+
//AVAILABLE STRENGTHS
|
|
19988
|
+
StrengthValuesPossible: [{
|
|
19989
|
+
StrengthValue: "number",
|
|
19990
|
+
StrengthUOM: "string",
|
|
19991
|
+
StrengthVolume: "number",
|
|
19992
|
+
StrengthVolumeUoM: "string",
|
|
19993
|
+
OrderUOMAllowed: [{
|
|
19994
|
+
AllowedOrderDoseVal: "number",
|
|
19995
|
+
AllowedOrderDoseUOM: "string",
|
|
19996
|
+
AllowedOrderDoseVolVal: "number",
|
|
19997
|
+
AllowedOrderDoseVolUoM: "string"
|
|
19998
|
+
}]
|
|
20020
19999
|
}],
|
|
20021
|
-
|
|
20000
|
+
//Drug Other Attributes
|
|
20001
|
+
TrialDrug: "boolean",
|
|
20002
|
+
Additive: "boolean",
|
|
20003
|
+
ApplicableForCompounding: "boolean",
|
|
20004
|
+
DispenseviaprescriptionOnly: "boolean",
|
|
20005
|
+
CounsellingRequired: "boolean",
|
|
20006
|
+
//Alternate drugs
|
|
20007
|
+
AlternateDrugs: "array",
|
|
20008
|
+
//INSTRUCTIONS
|
|
20009
|
+
Instruction_FrequencyRules: [{
|
|
20010
|
+
_id: "string",
|
|
20011
|
+
id: "number",
|
|
20012
|
+
encountertype: "string",
|
|
20013
|
+
gendercode: "string",
|
|
20014
|
+
agegroup: "string",
|
|
20015
|
+
agecatgcode: "array",
|
|
20016
|
+
OrderInstr: [{
|
|
20017
|
+
patientInst: "string",
|
|
20018
|
+
practionerInst: "string",
|
|
20019
|
+
prepInstr: "string",
|
|
20020
|
+
deptInstr: "string"
|
|
20021
|
+
}],
|
|
20022
|
+
setuptypeInd: "string",
|
|
20023
|
+
//No use
|
|
20024
|
+
serviceapplicability: "string",
|
|
20025
|
+
ordercatalog: "string",
|
|
20026
|
+
freqappl: "boolean",
|
|
20027
|
+
dfltfreqValue: "number",
|
|
20028
|
+
//Default Frequency number
|
|
20029
|
+
dfltfreqValueUnit: "string",
|
|
20030
|
+
//Default Frequency sel
|
|
20031
|
+
dfltfreqRate: "number",
|
|
20032
|
+
//Dose number
|
|
20033
|
+
dfltfreqRateUnit: "string",
|
|
20034
|
+
//Dose select
|
|
20035
|
+
dfltduration: "number",
|
|
20036
|
+
//valu
|
|
20037
|
+
dfltdurationType: "string",
|
|
20038
|
+
//select
|
|
20039
|
+
maxdurnallowedinDays: "number"
|
|
20040
|
+
}],
|
|
20041
|
+
//FREQUENCY RULES
|
|
20042
|
+
|
|
20043
|
+
//DISPENSE RULES
|
|
20044
|
+
DrugDispRules: [{
|
|
20045
|
+
_id: "string",
|
|
20046
|
+
id: "number",
|
|
20047
|
+
DrugCode: "string",
|
|
20048
|
+
MaxDispDurnRulebyEnctype: [{
|
|
20049
|
+
EncounterType: "string",
|
|
20050
|
+
MaxDispDurationVal: "number",
|
|
20051
|
+
MaxDispDurationUOM: "string",
|
|
20052
|
+
Action: "string",
|
|
20053
|
+
ActionMessage: "string",
|
|
20054
|
+
Status: "boolean"
|
|
20055
|
+
}]
|
|
20056
|
+
}],
|
|
20057
|
+
//STATUS
|
|
20058
|
+
Status: "string",
|
|
20059
|
+
EffectiveFrom: "number",
|
|
20060
|
+
EffectiveTo: "number",
|
|
20061
|
+
InactiveReason: "string",
|
|
20062
|
+
draftstatus: "boolean",
|
|
20022
20063
|
//No use
|
|
20023
|
-
|
|
20024
|
-
|
|
20025
|
-
|
|
20026
|
-
|
|
20027
|
-
|
|
20028
|
-
|
|
20029
|
-
|
|
20030
|
-
|
|
20031
|
-
|
|
20032
|
-
dfltfreqRateUnit: "string",
|
|
20033
|
-
//Dose select
|
|
20034
|
-
dfltduration: "number",
|
|
20035
|
-
//valu
|
|
20036
|
-
dfltdurationType: "string",
|
|
20037
|
-
//select
|
|
20038
|
-
maxdurnallowedinDays: "number"
|
|
20039
|
-
}],
|
|
20040
|
-
//FREQUENCY RULES
|
|
20041
|
-
|
|
20042
|
-
//DISPENSE RULES
|
|
20043
|
-
DrugDispRules: [{
|
|
20044
|
-
_id: "string",
|
|
20045
|
-
id: "number",
|
|
20046
|
-
DrugCode: "string",
|
|
20047
|
-
MaxDispDurnRulebyEnctype: [{
|
|
20048
|
-
EncounterType: "string",
|
|
20049
|
-
MaxDispDurationVal: "number",
|
|
20050
|
-
MaxDispDurationUOM: "string",
|
|
20051
|
-
Action: "string",
|
|
20052
|
-
ActionMessage: "string",
|
|
20053
|
-
Status: "boolean"
|
|
20054
|
-
}]
|
|
20055
|
-
}],
|
|
20056
|
-
//STATUS
|
|
20057
|
-
Status: "string",
|
|
20058
|
-
EffectiveFrom: "number",
|
|
20059
|
-
EffectiveTo: "number",
|
|
20060
|
-
InactiveReason: "string",
|
|
20061
|
-
draftstatus: "boolean",
|
|
20062
|
-
//No use
|
|
20063
|
-
Charge: "boolean",
|
|
20064
|
-
OrderUOMAllowed: "string",
|
|
20065
|
-
DoseRoundUpVal: "number",
|
|
20066
|
-
AdminUOM: "string",
|
|
20067
|
-
TotalVolContent: "string",
|
|
20068
|
-
TotalVolContentUoM: "string"
|
|
20069
|
-
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_doc, "FormCode", "string"), "IVFluid", "boolean"), "DfltInfuseOverDurationvalue", "number"), "DfltInfuseOverDurationType", "string"), "DfltFluidCode", "string"), "InactiveDate", "number"), "InactiveByid", "string"), "DispenseAlternateDrug", "boolean"), "SpecialInstructionText", "array"), "DrugImageID", "number"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_doc, "DrugItem", "boolean"), "SourceOfDrugOrderCatalog", "string"), "DrugGenericId", "string"), "IngredientListId", "string"), "statusactive", "boolean"))
|
|
20070
|
-
}],
|
|
20064
|
+
Charge: "boolean",
|
|
20065
|
+
OrderUOMAllowed: "string",
|
|
20066
|
+
DoseRoundUpVal: "number",
|
|
20067
|
+
AdminUOM: "string",
|
|
20068
|
+
TotalVolContent: "string",
|
|
20069
|
+
TotalVolContentUoM: "string"
|
|
20070
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_doc, "FormCode", "string"), "IVFluid", "boolean"), "DfltInfuseOverDurationvalue", "number"), "DfltInfuseOverDurationType", "string"), "DfltFluidCode", "string"), "InactiveDate", "number"), "InactiveByid", "string"), "DispenseAlternateDrug", "boolean"), "SpecialInstructionText", "array"), "DrugImageID", "number"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_doc, "DrugItem", "boolean"), "SourceOfDrugOrderCatalog", "string"), "DrugGenericId", "string"), "IngredientListId", "string"), "statusactive", "boolean"))
|
|
20071
|
+
}];
|
|
20072
|
+
},
|
|
20071
20073
|
status_update_drug_master: function status_update_drug_master(key, status) {
|
|
20072
20074
|
return [{
|
|
20073
20075
|
db_name: dbName,
|
|
@@ -20083,7 +20085,7 @@ var queries$g = {
|
|
|
20083
20085
|
}
|
|
20084
20086
|
}];
|
|
20085
20087
|
},
|
|
20086
|
-
drug_form_type: "{\n \"db_name\": \"".concat(
|
|
20088
|
+
drug_form_type: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"ParamsMapping\",\n \"filter\":\"ParamsMapping.paraCode=='SOURCEOFDRUGORDERCATALOG'\",\n \"return_fields\": \"{id:ParamsMapping.id,_id:ParamsMapping._id,paraCode:ParamsMapping.paraCode,paraVal:ParamsMapping.paraVal,paraDef:ParamsMapping.paraDef}\"\n }"),
|
|
20087
20089
|
drug_form_read: function drug_form_read(_id) {
|
|
20088
20090
|
// return {
|
|
20089
20091
|
// "db_name": dbName,
|
|
@@ -26153,11 +26155,11 @@ var timetableMasterSlice$1 = timetableMasterSlice.reducer;
|
|
|
26153
26155
|
var timeTableActions = _objectSpread2({}, timeTableMasterActions);
|
|
26154
26156
|
|
|
26155
26157
|
var query$7 = {
|
|
26156
|
-
role_type: "{\n \"db_name\": \"".concat(
|
|
26157
|
-
all_practitioner: "{\n \"db_name\": \"".concat(
|
|
26158
|
+
role_type: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\": \"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='RESOURCETYPE' AND CodeableConceptMaster.activestatus==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(for cod IN TO_ARRAY(CodeableConceptMaster.coding) RETURN DOCUMENT(cod))})\"\n}"),
|
|
26159
|
+
all_practitioner: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"Practitioner\",\n \"filter\": \"Practitioner.status==true\",\n \"return_fields\": \"MERGE(KEEP(Practitioner,'_id','id','name','_key','practitioner_role'),{name:(for hu in HumanNameMaster filter hu._id in Practitioner.name return merge(hu,{use:(for us in CodeableConceptMaster filter us._id == hu.use return merge(us,{coding:document(us.coding)}))},{prefix:(for pre in CodeableConceptMaster filter pre._id == hu.prefix return merge(pre,{coding:document(pre.coding)}))},{suffix:(for suf in CodeableConceptMaster filter suf._id == hu.suffix return merge(suf,{coding:document(suf.coding)}))}))},{practitioner_role:(for prac in PractitionerRole filter prac._id in Practitioner.practitioner_role return merge (keep(prac,'role'),{role:(for rol in CodeableConceptMaster filter rol._id == prac.role return merge(rol,{coding:document(rol.coding)}))}))})\"\n}"),
|
|
26158
26160
|
practitoner_slot: function practitoner_slot(startDate, endDate, practitonerId) {
|
|
26159
26161
|
return {
|
|
26160
|
-
db_name:
|
|
26162
|
+
db_name: _dbName,
|
|
26161
26163
|
filter: {
|
|
26162
26164
|
start: parseInt("".concat(startDate)),
|
|
26163
26165
|
end: parseInt("".concat(endDate)),
|
|
@@ -26168,7 +26170,7 @@ var query$7 = {
|
|
|
26168
26170
|
},
|
|
26169
26171
|
release_schedule: function release_schedule(startDate, endDate, practitonerId, reason) {
|
|
26170
26172
|
return {
|
|
26171
|
-
db_name:
|
|
26173
|
+
db_name: _dbName,
|
|
26172
26174
|
practitionerId: parseInt("".concat(practitonerId)),
|
|
26173
26175
|
start: parseInt("".concat(startDate)),
|
|
26174
26176
|
end: parseInt("".concat(endDate)),
|
|
@@ -26177,7 +26179,7 @@ var query$7 = {
|
|
|
26177
26179
|
},
|
|
26178
26180
|
block_schedule: function block_schedule(startDate, endDate, practitonerId, reason) {
|
|
26179
26181
|
return {
|
|
26180
|
-
db_name:
|
|
26182
|
+
db_name: _dbName,
|
|
26181
26183
|
practitionerId: parseInt("".concat(practitonerId)),
|
|
26182
26184
|
start: parseInt("".concat(startDate)),
|
|
26183
26185
|
end: parseInt("".concat(endDate)),
|
|
@@ -26186,7 +26188,7 @@ var query$7 = {
|
|
|
26186
26188
|
},
|
|
26187
26189
|
block_partial: function block_partial(startDate, endDate, starttime, endtime, practitonerId, days, reason) {
|
|
26188
26190
|
return {
|
|
26189
|
-
db_name:
|
|
26191
|
+
db_name: _dbName,
|
|
26190
26192
|
practitionerId: parseInt("".concat(practitonerId)),
|
|
26191
26193
|
startDate: "".concat(startDate),
|
|
26192
26194
|
endDate: "".concat(endDate),
|
|
@@ -26196,10 +26198,10 @@ var query$7 = {
|
|
|
26196
26198
|
blockreason: "".concat(reason)
|
|
26197
26199
|
};
|
|
26198
26200
|
},
|
|
26199
|
-
release_block_reason: "{\n \"db_name\": \"".concat(
|
|
26201
|
+
release_block_reason: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"ReasonMaster\",\n \"filter\": \"ReasonMaster.activestatus==true\",\n \"return_fields\": \"{_key:ReasonMaster._key,id:ReasonMaster.id,_id:ReasonMaster._id,ReasonCode:ReasonMaster.ReasonCode,ReasonDesc:ReasonMaster.ReasonDesc}\"\n}"),
|
|
26200
26202
|
specific_slots: function specific_slots(dayStart, practitonerID, slotStart, slotEnd) {
|
|
26201
26203
|
return {
|
|
26202
|
-
db_name:
|
|
26204
|
+
db_name: _dbName,
|
|
26203
26205
|
entity: "Schedule,Slot",
|
|
26204
26206
|
filter: {
|
|
26205
26207
|
Schedule: "Schedule.start>=".concat(dayStart, " AND DOCUMENT(Schedule.resourceCode).id==").concat(parseInt(practitonerID)),
|
|
@@ -37029,9 +37031,9 @@ var flexAttributeSort = function flexAttributeSort(val) {
|
|
|
37029
37031
|
}
|
|
37030
37032
|
};
|
|
37031
37033
|
var flexQuery = {
|
|
37032
|
-
attributeTypeDropDown: "{\n \"db_name\": \"".concat(
|
|
37033
|
-
numUomDropDown: "{\n \"db_name\":\"".concat(
|
|
37034
|
-
flexAttributeFullRead: "{\n \"db_name\": \"".concat(
|
|
37034
|
+
attributeTypeDropDown: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"filter\": \"CodingMaster.Type=='FLEXDATATYPE' && CodingMaster.activestatus==true && CodingMaster.status==true\",\n \"return_fields\": \"KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')\",\n \"sort\": \"CodingMaster.display\"\n }"),
|
|
37035
|
+
numUomDropDown: "{\n \"db_name\":\"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"filter\": \"CodingMaster.Type=='UOM' && CodingMaster.activestatus==true && CodingMaster.status==true\",\n \"return_fields\": \"KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')\",\n \"sort\": \"CodingMaster.display\"\n }"),
|
|
37036
|
+
flexAttributeFullRead: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CA_OrderAttribMaster\",\n \"filter\": \"CA_OrderAttribMaster.activestatus==true\",\n \"limit\": {\n \"offset\": \"page\",\n \"count\": \"perpage\",\n },\n \"return_fields\": \"merge(CA_OrderAttribMaster,{attribtype:document(CA_OrderAttribMaster.attribtype).display},{attribnumUOM:to_array(document(CA_OrderAttribMaster.attribnumUOM).display)})\"\n }"),
|
|
37035
37037
|
flexAttrFullRead: function flexAttrFullRead(page, perpage, search, sort, direction) {
|
|
37036
37038
|
return {
|
|
37037
37039
|
db_name: dbName,
|
|
@@ -38192,7 +38194,7 @@ var consultActions = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2
|
|
|
38192
38194
|
|
|
38193
38195
|
var query$1 = {
|
|
38194
38196
|
// pending list
|
|
38195
|
-
getList: "{\n \"db_name\": \"".concat(
|
|
38197
|
+
getList: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"queryid\": \"2b8b8013-75da-43c0-b2f8-c6f411e7e630\"\n }"),
|
|
38196
38198
|
// view pending detials
|
|
38197
38199
|
getPendingPatientList: function getPendingPatientList(data) {
|
|
38198
38200
|
// return`{
|
|
@@ -38204,7 +38206,7 @@ var query$1 = {
|
|
|
38204
38206
|
// },
|
|
38205
38207
|
// "return_fields": "MERGE(Appointment,{reasonCode: (FOR res in ReasonMaster filter Appointment.reasonCode any == res.ReasonCode return res),Patient:MERGE(Patient,{gender: (FOR cd in CodingMaster filter cd._id == Patient.gender RETURN cd.display),name:(FOR hn IN TO_ARRAY(Patient.name) RETURN DOCUMENT(hn)),telecom:(FOR tel IN TO_ARRAY(Patient.telecom) RETURN DOCUMENT(tel))})})"
|
|
38206
38208
|
// }`
|
|
38207
|
-
return "{\n \"db_name\": \"".concat(
|
|
38209
|
+
return "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"Appointment,Patient\",\n \"filter\": {\n \"Appointment\": \"").concat(data === null || data === void 0 ? void 0 : data.id, " == Document(Appointment.resourcecode).id AND Appointment.start>=DATE_TIMESTAMP(DATE_NOW()/1000) AND Appointment.appstatus == 'pending'\",\n \"Patient\": \"Patient.personID IN Appointment.PersonID\"\n },\n \"return_fields\": \"MERGE(Appointment,{reasonCode: (FOR res in ReasonMaster filter Appointment.reasonCode any == res.ReasonCode return res),Patient:MERGE(Patient,{gender: (FOR cd in CodingMaster filter cd._id == Patient.gender RETURN cd.display),name:(FOR hn IN TO_ARRAY(Patient.name) RETURN DOCUMENT(hn)),telecom:(FOR tel IN TO_ARRAY(Patient.telecom) RETURN DOCUMENT(tel)),slotID:(for doc in Slot filter doc.id in Appointment.slotID return merge(doc,{blockreason:document(doc.blockreason)}))})})\"\n }");
|
|
38208
38210
|
},
|
|
38209
38211
|
getPractitionerAgainstSpeciality: function getPractitionerAgainstSpeciality(data) {
|
|
38210
38212
|
// return`
|
|
@@ -38216,11 +38218,11 @@ var query$1 = {
|
|
|
38216
38218
|
// },
|
|
38217
38219
|
// "return_fields": "{ 'Practitioner':(FOR pract IN Practitioner FILTER Practitioner.id !=pract.id AND DOCUMENT(Practitioner.practitioner_role)[*].role ANY IN DOCUMENT(pract.practitioner_role)[*].role RETURN MERGE(pract,{name:(FOR hn IN TO_ARRAY(pract.name) RETURN DOCUMENT(hn)) ,practitioner_role:(FOR practrole IN TO_ARRAY(pract.practitioner_role) RETURN MERGE(DOCUMENT(practrole),{role:MERGE(DOCUMENT(DOCUMENT(practrole).role),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).role).coding)}) ,SpecialtyID:MERGE(DOCUMENT(DOCUMENT(practrole).SpecialtyID),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).SpecialtyID).coding)}) })) }))}"
|
|
38218
38220
|
// }`
|
|
38219
|
-
return "{\n \"db_name\": \"".concat(
|
|
38221
|
+
return "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"Appointment,Practitioner\",\n \"filter\": {\n \"Appointment\": \"Appointment.id==").concat(data === null || data === void 0 ? void 0 : data.appId, " && Appointment.activestatus==true\",\n \"Practitioner\": \"Practitioner.id == Document(Appointment.resourcecode).id && Practitioner.activestatus==true && Practitioner.status==true\"\n },\n \"return_fields\": \"{ 'Practitioner':(FOR pract IN Practitioner FILTER Practitioner.id !=pract.id AND DOCUMENT(Practitioner.practitioner_role)[*].role ANY IN DOCUMENT(pract.practitioner_role)[*].role and pract.activestatus==true && pract.status==true RETURN MERGE(pract,{name:(FOR hn IN TO_ARRAY(pract.name) RETURN merge(DOCUMENT(hn),{prefix:contains(DOCUMENT(hn).prefix,'CodingMaster')?document(DOCUMENT(hn).prefix).display:DOCUMENT(hn).prefix},{suffix:contains(DOCUMENT(hn).suffix,'CodingMaster')?document(DOCUMENT(hn).suffix).display:DOCUMENT(hn).suffix})) ,practitioner_role:(FOR practrole IN TO_ARRAY(pract.practitioner_role) RETURN MERGE(DOCUMENT(practrole),{role:MERGE(DOCUMENT(DOCUMENT(practrole).role),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).role).coding)}) ,SpecialtyID:MERGE(DOCUMENT(DOCUMENT(practrole).SpecialtyID),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).SpecialtyID).coding)}) })) }))}\"\n }");
|
|
38220
38222
|
// "return_fields": "{ 'Practitioner':(FOR pract IN Practitioner FILTER Practitioner.id !=pract.id AND DOCUMENT(Practitioner.practitioner_role)[*].role ANY IN DOCUMENT(pract.practitioner_role)[*].role RETURN MERGE(pract,{name:(FOR hn IN TO_ARRAY(pract.name) RETURN DOCUMENT(hn)) ,practitioner_role:(FOR practrole IN TO_ARRAY(pract.practitioner_role) RETURN MERGE(DOCUMENT(practrole),{role:MERGE(DOCUMENT(DOCUMENT(practrole).role),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).role).coding)}) ,SpecialtyID:MERGE(DOCUMENT(DOCUMENT(practrole).SpecialtyID),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).SpecialtyID).coding)}) })) }))}"
|
|
38221
38223
|
},
|
|
38222
38224
|
getCancellationReason: function getCancellationReason(data) {
|
|
38223
|
-
return "{\n \"db_name\": \"".concat(
|
|
38225
|
+
return "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"ReasonMaster\",\n \"filter\": \"ReasonMaster.ReasonCode == '").concat(data === null || data === void 0 ? void 0 : data.code, "'\",\n \"return_fields\": \"ReasonMaster\"\n }");
|
|
38224
38226
|
}
|
|
38225
38227
|
};
|
|
38226
38228
|
|
|
@@ -39321,11 +39323,11 @@ var additionalcolumns = function additionalcolumns(list) {
|
|
|
39321
39323
|
list === null || list === void 0 || list.map(function (val) {
|
|
39322
39324
|
var _val$columnName, _val$columnType$value, _val$columnType, _val$columnMaster, _val$mandatory;
|
|
39323
39325
|
var json = {
|
|
39324
|
-
|
|
39325
|
-
|
|
39326
|
-
|
|
39327
|
-
|
|
39328
|
-
|
|
39326
|
+
columnname: (_val$columnName = val === null || val === void 0 ? void 0 : val.columnName) !== null && _val$columnName !== void 0 ? _val$columnName : "",
|
|
39327
|
+
columntype: (_val$columnType$value = val === null || val === void 0 || (_val$columnType = val.columnType) === null || _val$columnType === void 0 ? void 0 : _val$columnType.value) !== null && _val$columnType$value !== void 0 ? _val$columnType$value : "",
|
|
39328
|
+
columnsize: val !== null && val !== void 0 && val.columnSize ? parseInt(val === null || val === void 0 ? void 0 : val.columnSize) : 0,
|
|
39329
|
+
columnmaster: (_val$columnMaster = val === null || val === void 0 ? void 0 : val.columnMaster) !== null && _val$columnMaster !== void 0 ? _val$columnMaster : null,
|
|
39330
|
+
ismandatory: (_val$mandatory = val === null || val === void 0 ? void 0 : val.mandatory) !== null && _val$mandatory !== void 0 ? _val$mandatory : false
|
|
39329
39331
|
};
|
|
39330
39332
|
datas.push(json);
|
|
39331
39333
|
});
|
|
@@ -39334,30 +39336,30 @@ var additionalcolumns = function additionalcolumns(list) {
|
|
|
39334
39336
|
};
|
|
39335
39337
|
var getMasterSort = function getMasterSort(sort) {
|
|
39336
39338
|
switch (sort) {
|
|
39337
|
-
case
|
|
39339
|
+
case "Long Description":
|
|
39338
39340
|
return "document(CodeableConceptMaster.coding)[0].display";
|
|
39339
|
-
case
|
|
39341
|
+
case "Short Description":
|
|
39340
39342
|
return "document(CodeableConceptMaster.coding)[0].shortdesc";
|
|
39341
|
-
case
|
|
39343
|
+
case "Code":
|
|
39342
39344
|
return "document(CodeableConceptMaster.coding)[0].code";
|
|
39343
|
-
case
|
|
39345
|
+
case "Visit Type Indicator":
|
|
39344
39346
|
return "document(CodeableConceptMaster.coding)[0].gmconfigvalues[\"Visit Type Indicator\"].label";
|
|
39345
|
-
case
|
|
39347
|
+
case "Grade":
|
|
39346
39348
|
return "((document(CodeableConceptMaster.coding[0]).gmconfigvalues).Grade).display";
|
|
39347
39349
|
default:
|
|
39348
39350
|
return "CodeableConceptMaster.createddate";
|
|
39349
39351
|
}
|
|
39350
39352
|
};
|
|
39351
39353
|
var queries$2 = {
|
|
39352
|
-
generalMasterlist_val: "{\n \"db_name\": \"".concat(
|
|
39354
|
+
generalMasterlist_val: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"GMvalues\",\n \"filter\": \"GMvalues.activestatus==true\",\n \"return_fields\": \"merge(GMvalues,{gentype:document(GMvalues.gentype)})\"\n }"),
|
|
39353
39355
|
generalMasterlist: function generalMasterlist() {
|
|
39354
|
-
var search = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
39356
|
+
var search = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
39355
39357
|
return {
|
|
39356
|
-
|
|
39357
|
-
|
|
39358
|
-
|
|
39359
|
-
|
|
39360
|
-
|
|
39358
|
+
db_name: "".concat(_dbName),
|
|
39359
|
+
entity: "GMdefinition",
|
|
39360
|
+
sort: "GMdefinition.gentype",
|
|
39361
|
+
filter: "".concat(search != "" ? "LIKE(GMdefinition.genname, \"%".concat(search, "%\", true) && GMdefinition.activestatus==true") : "GMdefinition.activestatus==true"),
|
|
39362
|
+
return_fields: "merge(GMdefinition,{additionalcolumns:(for ad in GMdefinition.additionalcolumns return merge(ad,{columntype:document(ad.columntype)}))})"
|
|
39361
39363
|
};
|
|
39362
39364
|
},
|
|
39363
39365
|
// column_type: `{
|
|
@@ -39367,8 +39369,8 @@ var queries$2 = {
|
|
|
39367
39369
|
// "filter": "CodingMaster.Type=='QDMDATATYPE' && CodingMaster.activestatus==true",
|
|
39368
39370
|
// "return_fields": "{ID:CodingMaster.id,_id:CodingMaster._id,Key:CodingMaster._key,ColumnType:CodingMaster.display,code:CodingMaster.code}"
|
|
39369
39371
|
// }`,
|
|
39370
|
-
column_type: "{\n \"db_name\": \"".concat(
|
|
39371
|
-
visit_type_indicator: "{\n \"db_name\": \"".concat(
|
|
39372
|
+
column_type: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"filter\": \"CodingMaster.Type=='QDMDATATYPE' && CodingMaster.activestatus==true && CodingMaster.status==true\",\n \"return_fields\": \"KEEP(CodingMaster,'_id','id','_key','code','display','Type')\"\n }"),
|
|
39373
|
+
visit_type_indicator: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"filter\": \"CodingMaster.Type=='VISITTYPEINDICATOR' && CodingMaster.activestatus==true && CodingMaster.status==true\",\n \"return_fields\": \"KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')\"\n }"),
|
|
39372
39374
|
upsert_general_master: function upsert_general_master(datas) {
|
|
39373
39375
|
var filter = {};
|
|
39374
39376
|
if (datas !== null && datas !== void 0 && datas._key) {
|
|
@@ -39379,46 +39381,46 @@ var queries$2 = {
|
|
|
39379
39381
|
}
|
|
39380
39382
|
};
|
|
39381
39383
|
return [_objectSpread2(_objectSpread2({
|
|
39382
|
-
|
|
39383
|
-
|
|
39384
|
-
|
|
39384
|
+
db_name: _dbName,
|
|
39385
|
+
entity: "GMdefinition",
|
|
39386
|
+
is_metadata: true
|
|
39385
39387
|
}, filter), {}, {
|
|
39386
|
-
|
|
39387
|
-
|
|
39388
|
-
|
|
39389
|
-
|
|
39388
|
+
metadataId: metaDataId$1,
|
|
39389
|
+
metadata_dbname: metaDatadbName$1,
|
|
39390
|
+
doc: {
|
|
39391
|
+
additionalcolumns: additionalcolumns((_datas$additional_col = datas === null || datas === void 0 ? void 0 : datas.additional_colum) !== null && _datas$additional_col !== void 0 ? _datas$additional_col : [])
|
|
39390
39392
|
}
|
|
39391
39393
|
})];
|
|
39392
39394
|
} else {
|
|
39393
39395
|
var _datas$general_type, _datas$general_name, _datas$additional_col2;
|
|
39394
39396
|
return [_objectSpread2(_objectSpread2({
|
|
39395
|
-
|
|
39396
|
-
|
|
39397
|
-
|
|
39397
|
+
db_name: _dbName,
|
|
39398
|
+
entity: "GMdefinition",
|
|
39399
|
+
is_metadata: true
|
|
39398
39400
|
}, filter), {}, {
|
|
39399
|
-
|
|
39400
|
-
|
|
39401
|
-
|
|
39402
|
-
|
|
39403
|
-
|
|
39404
|
-
|
|
39405
|
-
|
|
39406
|
-
|
|
39401
|
+
metadataId: metaDataId$1,
|
|
39402
|
+
metadata_dbname: metaDatadbName$1,
|
|
39403
|
+
doc: {
|
|
39404
|
+
id: 0,
|
|
39405
|
+
gentype: (_datas$general_type = datas === null || datas === void 0 ? void 0 : datas.general_type) !== null && _datas$general_type !== void 0 ? _datas$general_type : "",
|
|
39406
|
+
genname: (_datas$general_name = datas === null || datas === void 0 ? void 0 : datas.general_name) !== null && _datas$general_name !== void 0 ? _datas$general_name : "",
|
|
39407
|
+
additionalcolumns: additionalcolumns((_datas$additional_col2 = datas === null || datas === void 0 ? void 0 : datas.additional_colum) !== null && _datas$additional_col2 !== void 0 ? _datas$additional_col2 : []),
|
|
39408
|
+
issystemdefined: false
|
|
39407
39409
|
}
|
|
39408
39410
|
})];
|
|
39409
39411
|
}
|
|
39410
39412
|
},
|
|
39411
39413
|
get_general_master_type: function get_general_master_type(type, page, perPage, search, sort, direction) {
|
|
39412
39414
|
return {
|
|
39413
|
-
|
|
39414
|
-
|
|
39415
|
-
|
|
39416
|
-
|
|
39417
|
-
|
|
39418
|
-
|
|
39415
|
+
db_name: _dbName,
|
|
39416
|
+
entity: "CodeableConceptMaster",
|
|
39417
|
+
filter: "CodeableConceptMaster.Type == '".concat(type, "' &&(LIKE(document(CodeableConceptMaster.coding[0]).code,'%").concat(search, "%',true) ||LIKE(document(CodeableConceptMaster.coding[0]).shortdesc,'%").concat(search, "%',true) || LIKE(document(CodeableConceptMaster.coding[0]).longdesc,'%").concat(search, "%',true)) && CodeableConceptMaster.activestatus == true"),
|
|
39418
|
+
limit: {
|
|
39419
|
+
offset: "".concat(page),
|
|
39420
|
+
count: "".concat(perPage)
|
|
39419
39421
|
},
|
|
39420
|
-
|
|
39421
|
-
|
|
39422
|
+
return_fields: "MERGE(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)},{TotalCount:COUNT(FOR cnt IN CodeableConceptMaster filter cnt.Type=='".concat(type, "' filter cnt.activestatus==true RETURN cnt._key)})"),
|
|
39423
|
+
sort: "".concat(getMasterSort(sort), " ").concat(direction)
|
|
39422
39424
|
};
|
|
39423
39425
|
},
|
|
39424
39426
|
add_new_general_type: function add_new_general_type(data) {
|
|
@@ -39445,52 +39447,52 @@ var queries$2 = {
|
|
|
39445
39447
|
// }
|
|
39446
39448
|
// ]
|
|
39447
39449
|
return [{
|
|
39448
|
-
|
|
39449
|
-
|
|
39450
|
-
|
|
39451
|
-
|
|
39452
|
-
|
|
39453
|
-
|
|
39454
|
-
|
|
39455
|
-
|
|
39450
|
+
db_name: _dbName,
|
|
39451
|
+
entity: "CodeableConceptMaster",
|
|
39452
|
+
is_metadata: true,
|
|
39453
|
+
metadataId: metaDataId$1,
|
|
39454
|
+
metadata_dbname: metaDatadbName$1,
|
|
39455
|
+
doc: {
|
|
39456
|
+
text: (_data$code = data === null || data === void 0 ? void 0 : data.code) !== null && _data$code !== void 0 ? _data$code : "",
|
|
39457
|
+
coding: [{
|
|
39456
39458
|
// "system": "string",
|
|
39457
39459
|
// "version": "string",
|
|
39458
|
-
|
|
39459
|
-
|
|
39460
|
+
code: (_data$code$trim = data === null || data === void 0 || (_data$code2 = data.code) === null || _data$code2 === void 0 ? void 0 : _data$code2.trim()) !== null && _data$code$trim !== void 0 ? _data$code$trim : "",
|
|
39461
|
+
display: (_data$long_descriptio = data === null || data === void 0 ? void 0 : data.long_description) !== null && _data$long_descriptio !== void 0 ? _data$long_descriptio : "",
|
|
39460
39462
|
// "userSelected": "boolean",
|
|
39461
|
-
|
|
39462
|
-
|
|
39463
|
-
|
|
39464
|
-
|
|
39465
|
-
|
|
39463
|
+
id: 0,
|
|
39464
|
+
Type: (_data$type = data === null || data === void 0 ? void 0 : data.type) !== null && _data$type !== void 0 ? _data$type : "",
|
|
39465
|
+
shortdesc: (_data$short_descripti = data === null || data === void 0 ? void 0 : data.short_description) !== null && _data$short_descripti !== void 0 ? _data$short_descripti : "",
|
|
39466
|
+
gmconfigvalues: (_data$addition = data === null || data === void 0 ? void 0 : data.addition) !== null && _data$addition !== void 0 ? _data$addition : {},
|
|
39467
|
+
status: true
|
|
39466
39468
|
}],
|
|
39467
|
-
|
|
39468
|
-
|
|
39469
|
-
|
|
39469
|
+
id: 0,
|
|
39470
|
+
Type: (_data$type2 = data === null || data === void 0 ? void 0 : data.type) !== null && _data$type2 !== void 0 ? _data$type2 : "",
|
|
39471
|
+
status: true
|
|
39470
39472
|
}
|
|
39471
39473
|
}];
|
|
39472
39474
|
},
|
|
39473
39475
|
update_general_type: function update_general_type(edit_data) {
|
|
39474
39476
|
var _edit_data$_key, _edit_data$code$trim, _edit_data$code, _edit_data$long_descr, _edit_data$short_desc, _edit_data$addition;
|
|
39475
39477
|
return [{
|
|
39476
|
-
|
|
39477
|
-
|
|
39478
|
-
|
|
39479
|
-
|
|
39480
|
-
|
|
39478
|
+
db_name: _dbName,
|
|
39479
|
+
entity: "CodingMaster",
|
|
39480
|
+
is_metadata: true,
|
|
39481
|
+
filter: {
|
|
39482
|
+
_key: (_edit_data$_key = edit_data === null || edit_data === void 0 ? void 0 : edit_data._key) !== null && _edit_data$_key !== void 0 ? _edit_data$_key : ""
|
|
39481
39483
|
},
|
|
39482
|
-
|
|
39483
|
-
|
|
39484
|
-
|
|
39484
|
+
metadataId: metaDataId$1,
|
|
39485
|
+
metadata_dbname: metaDatadbName$1,
|
|
39486
|
+
doc: {
|
|
39485
39487
|
// "system": "string",
|
|
39486
39488
|
// "version": "string",
|
|
39487
|
-
|
|
39488
|
-
|
|
39489
|
+
code: (_edit_data$code$trim = edit_data === null || edit_data === void 0 || (_edit_data$code = edit_data.code) === null || _edit_data$code === void 0 ? void 0 : _edit_data$code.trim()) !== null && _edit_data$code$trim !== void 0 ? _edit_data$code$trim : "",
|
|
39490
|
+
display: (_edit_data$long_descr = edit_data === null || edit_data === void 0 ? void 0 : edit_data.long_description) !== null && _edit_data$long_descr !== void 0 ? _edit_data$long_descr : "",
|
|
39489
39491
|
// "userSelected": "boolean",
|
|
39490
39492
|
// "id": "number",
|
|
39491
|
-
|
|
39492
|
-
|
|
39493
|
-
|
|
39493
|
+
Type: edit_data === null || edit_data === void 0 ? void 0 : edit_data.type,
|
|
39494
|
+
shortdesc: (_edit_data$short_desc = edit_data === null || edit_data === void 0 ? void 0 : edit_data.short_description) !== null && _edit_data$short_desc !== void 0 ? _edit_data$short_desc : "",
|
|
39495
|
+
gmconfigvalues: (_edit_data$addition = edit_data === null || edit_data === void 0 ? void 0 : edit_data.addition) !== null && _edit_data$addition !== void 0 ? _edit_data$addition : {}
|
|
39494
39496
|
// "status": edit_data?.status_active??false,
|
|
39495
39497
|
}
|
|
39496
39498
|
}];
|
|
@@ -39512,29 +39514,29 @@ var queries$2 = {
|
|
|
39512
39514
|
// }
|
|
39513
39515
|
// ]
|
|
39514
39516
|
return [{
|
|
39515
|
-
|
|
39516
|
-
|
|
39517
|
-
|
|
39518
|
-
|
|
39519
|
-
|
|
39520
|
-
|
|
39521
|
-
|
|
39517
|
+
db_name: _dbName,
|
|
39518
|
+
entity: "CodeableConceptMaster",
|
|
39519
|
+
is_metadata: true,
|
|
39520
|
+
metadataId: metaDataId$1,
|
|
39521
|
+
metadata_dbname: metaDatadbName$1,
|
|
39522
|
+
filter: {
|
|
39523
|
+
_key: data === null || data === void 0 ? void 0 : data.codeable_concept_key
|
|
39522
39524
|
},
|
|
39523
|
-
|
|
39524
|
-
|
|
39525
|
-
|
|
39526
|
-
|
|
39525
|
+
doc: {
|
|
39526
|
+
coding: [{
|
|
39527
|
+
_key: data === null || data === void 0 ? void 0 : data.coding_key,
|
|
39528
|
+
status: (_data$status = data === null || data === void 0 ? void 0 : data.status) !== null && _data$status !== void 0 ? _data$status : false
|
|
39527
39529
|
}],
|
|
39528
|
-
|
|
39530
|
+
status: (_data$status2 = data === null || data === void 0 ? void 0 : data.status) !== null && _data$status2 !== void 0 ? _data$status2 : false
|
|
39529
39531
|
}
|
|
39530
39532
|
}];
|
|
39531
39533
|
},
|
|
39532
39534
|
codingMasterQuery: function codingMasterQuery(name) {
|
|
39533
39535
|
return {
|
|
39534
|
-
|
|
39535
|
-
|
|
39536
|
-
|
|
39537
|
-
|
|
39536
|
+
db_name: _dbName,
|
|
39537
|
+
entity: "CodingMaster",
|
|
39538
|
+
filter: "CodingMaster.Type== '".concat(name, "' && CodingMaster.activestatus==true && CodingMaster.status==true"),
|
|
39539
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')"
|
|
39538
39540
|
};
|
|
39539
39541
|
}
|
|
39540
39542
|
};
|