primary_care_admin_binder 0.1.113 → 0.1.115
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 +123 -70
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -13087,7 +13087,7 @@ var overRideTimeslot = function overRideTimeslot(data) {
|
|
|
13087
13087
|
}
|
|
13088
13088
|
return overRideTimeSlot;
|
|
13089
13089
|
};
|
|
13090
|
-
var photoData = function photoData(data) {
|
|
13090
|
+
var photoData$1 = function photoData(data) {
|
|
13091
13091
|
var photo_Data = [];
|
|
13092
13092
|
if (data && data.length > 0) {
|
|
13093
13093
|
data.map(function (val) {
|
|
@@ -13243,7 +13243,7 @@ var generateReadJSON$4 = function generateReadJSON(data, state) {
|
|
|
13243
13243
|
overRideCard: overRideList(data.workingdayyearoverride),
|
|
13244
13244
|
working_days_yes_no: ((_data$workingdayyear$4 = data.workingdayyear[0]) === null || _data$workingdayyear$4 === void 0 ? void 0 : (_data$workingdayyear$5 = _data$workingdayyear$4.workDaysOfWeek) === null || _data$workingdayyear$5 === void 0 ? void 0 : _data$workingdayyear$5.length) > 0 ? "No" : "Yes",
|
|
13245
13245
|
is_visible: ((_data$workingdayyear$6 = data.workingdayyear[0]) === null || _data$workingdayyear$6 === void 0 ? void 0 : (_data$workingdayyear$7 = _data$workingdayyear$6.workDaysOfWeek) === null || _data$workingdayyear$7 === void 0 ? void 0 : _data$workingdayyear$7.length) > 0 ? true : false,
|
|
13246
|
-
photo: photoData(data.photo),
|
|
13246
|
+
photo: photoData$1(data.photo),
|
|
13247
13247
|
returnAllowed: data.pharmacy && data.pharmacy.length > 0 && Array.isArray(data.pharmacy) ? data.pharmacy[0].returnAllowed : false,
|
|
13248
13248
|
otcAllowed: data.pharmacy && data.pharmacy.length > 0 && Array.isArray(data.pharmacy) ? data.pharmacy[0].otcAllowed : false,
|
|
13249
13249
|
externalRxAllowed: data.pharmacy && data.pharmacy.length > 0 && Array.isArray(data.pharmacy) ? data.pharmacy[0].exRxAllowed : false,
|
|
@@ -23238,13 +23238,6 @@ var masterQuery$5 = {
|
|
|
23238
23238
|
};
|
|
23239
23239
|
var orderTypedata = {
|
|
23240
23240
|
ordertype: function ordertype(type) {
|
|
23241
|
-
// return{
|
|
23242
|
-
// db_name: dbName,
|
|
23243
|
-
// entity: "OrderType",
|
|
23244
|
-
// filter: `OrderType.activestatus==true && OrderType.status==true && OrderType.ordercategory=='${type}'`,
|
|
23245
|
-
// return_fields: "merge(OrderType,{ordercategory:(document(OrderType.ordercategory))})",
|
|
23246
|
-
// sort: "OrderType.ordertype"
|
|
23247
|
-
// }
|
|
23248
23241
|
return {
|
|
23249
23242
|
"db_name": dbName$1,
|
|
23250
23243
|
"filter": {
|
|
@@ -23270,18 +23263,6 @@ var Query = {
|
|
|
23270
23263
|
order_catalog_read: function order_catalog_read(_ref) {
|
|
23271
23264
|
var page = _ref.page,
|
|
23272
23265
|
perPage = _ref.perPage;
|
|
23273
|
-
// return {
|
|
23274
|
-
// "db_name": dbName,
|
|
23275
|
-
// "entity": "OrderCatalog",
|
|
23276
|
-
// "sort": "OrderCatalog.createddate ASC",
|
|
23277
|
-
// "limit": {
|
|
23278
|
-
// "offset": page,
|
|
23279
|
-
// "count": perPage
|
|
23280
|
-
// },
|
|
23281
|
-
// "filter": "OrderCatalog.activestatus==true",
|
|
23282
|
-
// "return_fields": "MERGE(OrderCatalog,{TotalCount:COUNT(FOR cnt IN OrderCatalog RETURN cnt._key)},{ordercategory:(document(OrderCatalog.ordercategory)),ordertype:(document(OrderCatalog.ordertype)),healthcareservicecode:(document(OrderCatalog.healthcareservicecode)),OrderCatalogByEncounterTypeAge:(for doc in CA_OrderCatalogByEncounterTypeAge filter doc._id in OrderCatalog.OrderCatalogByEncounterTypeAge return doc),OrderAttribApplicability:(for doc in CA_OrderAttribApplicability filter doc._id in OrderCatalog.OrderAttribApplicability return doc),dfltFastingPeriodUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltFastingPeriodUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenBodySite:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenBodySite return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenCollectionMethod:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenCollectionMethod return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenType:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenType return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenVolumeUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenVolumeUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),maxorderqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.maxorderqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),repeatCheckUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.repeatCheckUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),AvailablebyPerOrganization:(for doc in to_array(OrderCatalog.AvailablebyPerOrganization) return merge(doc,{perforganizationId:(document(doc.perforganizationId)),perfOrganizationEntity:(for docs in CodeableConceptMaster filter docs._id==doc.perfOrganizationEntity return merge(doc,{coding:(for cod in CodingMaster filter cod._id in docs.coding return cod.display)}))})),dfltSpecimenContainer:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenContainer return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)}))})"
|
|
23283
|
-
// };
|
|
23284
|
-
|
|
23285
23266
|
return {
|
|
23286
23267
|
"db_name": dbName$1,
|
|
23287
23268
|
"filter": {
|
|
@@ -23295,20 +23276,8 @@ var Query = {
|
|
|
23295
23276
|
var page = _ref2.page,
|
|
23296
23277
|
perPage = _ref2.perPage,
|
|
23297
23278
|
search = _ref2.search;
|
|
23298
|
-
// return {
|
|
23299
|
-
// "db_name": dbName,
|
|
23300
|
-
// "entity": "OrderCatalog",
|
|
23301
|
-
// "sort": "OrderCatalog.createddate ASC",
|
|
23302
|
-
// "limit": {
|
|
23303
|
-
// "offset": page,
|
|
23304
|
-
// "count": perPage
|
|
23305
|
-
// },
|
|
23306
|
-
// "filter": `(like(OrderCatalog.shortdesc,'%${search}%',true) || like(OrderCatalog.longdesc,'%${search}%',true) || like(OrderCatalog.ordercatalog,'%${search}%',true)) && OrderCatalog.activestatus==true`,
|
|
23307
|
-
// "return_fields": `MERGE(OrderCatalog,{TotalCount:COUNT(FOR cnt IN OrderCatalog FILTER (like(cnt.shortdesc,'%${search}%',true) || like(cnt.longdesc,'%${search}%',true) || like(cnt.ordercatalog,'%${search}%',true)) && cnt.activestatus==true RETURN cnt._key)},{ordercategory:(document(OrderCatalog.ordercategory)),ordertype:(document(OrderCatalog.ordertype)),healthcareservicecode:(document(OrderCatalog.healthcareservicecode)),OrderCatalogByEncounterTypeAge:(for doc in CA_OrderCatalogByEncounterTypeAge filter doc._id in OrderCatalog.OrderCatalogByEncounterTypeAge return doc),OrderAttribApplicability:(for doc in CA_OrderAttribApplicability filter doc._id in OrderCatalog.OrderAttribApplicability return doc),dfltFastingPeriodUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltFastingPeriodUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenBodySite:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenBodySite return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenCollectionMethod:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenCollectionMethod return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenType:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenType return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenVolumeUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenVolumeUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),maxorderqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.maxorderqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),repeatCheckUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.repeatCheckUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),AvailablebyPerOrganization:(for doc in to_array(OrderCatalog.AvailablebyPerOrganization) return merge(doc,{perforganizationId:(document(doc.perforganizationId)),perfOrganizationEntity:(for docs in CodeableConceptMaster filter docs._id==doc.perfOrganizationEntity return merge(doc,{coding:(for cod in CodingMaster filter cod._id in docs.coding return cod.display)}))})),dfltSpecimenContainer:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenContainer return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)}))})`
|
|
23308
|
-
// }
|
|
23309
|
-
|
|
23310
23279
|
return {
|
|
23311
|
-
"db_name":
|
|
23280
|
+
"db_name": dbName$1,
|
|
23312
23281
|
"filter": {
|
|
23313
23282
|
"searchval": search,
|
|
23314
23283
|
"page": page,
|
|
@@ -23318,13 +23287,6 @@ var Query = {
|
|
|
23318
23287
|
};
|
|
23319
23288
|
},
|
|
23320
23289
|
editOrderCatalog: function editOrderCatalog(id) {
|
|
23321
|
-
// return {
|
|
23322
|
-
// db_name: dbName,
|
|
23323
|
-
// entity: "OrderCatalog",
|
|
23324
|
-
// filter: `OrderCatalog.activestatus==true && OrderCatalog._id=='${id}'`,
|
|
23325
|
-
// return_fields:
|
|
23326
|
-
// "MERGE(OrderCatalog,{ordercategory:(document(OrderCatalog.ordercategory)),ordertype:(document(OrderCatalog.ordertype)),healthcareservicecode:(document(OrderCatalog.healthcareservicecode)),OrderCatalogByEncounterTypeAge:(for doc in CA_OrderCatalogByEncounterTypeAge filter doc._id in OrderCatalog.OrderCatalogByEncounterTypeAge return doc),OrderAttribApplicability:(for doc in CA_OrderAttribApplicability filter doc._id in OrderCatalog.OrderAttribApplicability return doc),dfltFastingPeriodUOM:document(OrderCatalog.dfltFastingPeriodUOM),dfltSpecimenBodySite:document(OrderCatalog.dfltSpecimenBodySite),dfltSpecimenCollectionMethod:document(OrderCatalog.dfltSpecimenCollectionMethod),dfltSpecimenType:document(OrderCatalog.dfltSpecimenType),dfltSpecimenVolumeUOM:document(OrderCatalog.dfltSpecimenVolumeUOM),dfltqtyUOM:document(OrderCatalog.dfltqtyUOM),maxorderqtyUOM:document(OrderCatalog.maxorderqtyUOM),repeatCheckUOM:document(OrderCatalog.repeatCheckUOM),AvailablebyPerOrganization:(for doc in to_array(OrderCatalog.AvailablebyPerOrganization) return merge(doc,{perforganizationId:(document(doc.perforganizationId)),perfOrganizationEntity:(document(doc.perfOrganizationEntity))})),dfltSpecimenContainer:document(OrderCatalog.dfltSpecimenContainer),repeatCheckAction:document(OrderCatalog.repeatCheckAction),resourcedefinition:(for i in TO_ARRAY(OrderCatalog.resourcedefinition) return {resourcetype:{label:document(i.resourcetype).display,value:document(i.resourcetype)._id,_id:document(i.resourcetype)._id},resourcerole:{label:document(i.resourcerole).display,value:document(i.resourcerole)._id,_id:document(i.resourcerole)._id},resourcename:(for resn in i.resourcename return {_id:document(resn)._id,value:document(resn)._id,label:CONCAT(document(document(resn).personid).name[0].fulname)}), resourcedepartment:(for resourcedepartment in i.resourcedepartment return {_id : document(resourcedepartment)._id,label:document(resourcedepartment).display,value : document(resourcedepartment)._id})}),observationdetails:(for obs in TO_ARRAY(OrderCatalog.observationdetails) return MERGE (obs,{vitalcode:{label:document(obs.vitalcode).longdesc,value:document(obs.vitalcode)._id,_id:document(obs.vitalcode)._id}}))})"
|
|
23327
|
-
// };
|
|
23328
23290
|
return {
|
|
23329
23291
|
"db_name": dbName$1,
|
|
23330
23292
|
"filter": {
|
|
@@ -23341,14 +23303,6 @@ var Query = {
|
|
|
23341
23303
|
};
|
|
23342
23304
|
},
|
|
23343
23305
|
entityTypeName: function entityTypeName(name) {
|
|
23344
|
-
// return {
|
|
23345
|
-
// db_name: dbName,
|
|
23346
|
-
// entity: "Organization",
|
|
23347
|
-
// sort: "Organization.name",
|
|
23348
|
-
// filter: `Organization.OrgType ANY =='${name}' && Organization.activestatus==true`,
|
|
23349
|
-
// return_fields: "Organization",
|
|
23350
|
-
// };
|
|
23351
|
-
|
|
23352
23306
|
return {
|
|
23353
23307
|
"db_name": dbName$1,
|
|
23354
23308
|
"filter": {
|
|
@@ -23393,7 +23347,7 @@ var generateSaveChargeCode = function generateSaveChargeCode(data) {
|
|
|
23393
23347
|
})];
|
|
23394
23348
|
};
|
|
23395
23349
|
var generateSaveJSON = function generateSaveJSON(data, rcchargeCode) {
|
|
23396
|
-
var _data$resourceList, _data$observationList, _data$
|
|
23350
|
+
var _data$resourceList, _data$observationList, _data$photo$, _data$photo$2, _data$photo$3, _data$photo$4, _data$DuplicatePeriod2, _data$CheckAction;
|
|
23397
23351
|
var resourceresult = data === null || data === void 0 ? void 0 : (_data$resourceList = data.resourceList) === null || _data$resourceList === void 0 ? void 0 : _data$resourceList.map(function (item) {
|
|
23398
23352
|
return {
|
|
23399
23353
|
resourcetype: item.resourcetype._id,
|
|
@@ -23435,6 +23389,15 @@ var generateSaveJSON = function generateSaveJSON(data, rcchargeCode) {
|
|
|
23435
23389
|
ordercatalog: data.code,
|
|
23436
23390
|
shortdesc: data.shortdes,
|
|
23437
23391
|
longdesc: data.longdes,
|
|
23392
|
+
photo: data !== null && data !== void 0 && data.photo && (data === null || data === void 0 ? void 0 : data.photo.length) > 0 ? [{
|
|
23393
|
+
date: "",
|
|
23394
|
+
url: "",
|
|
23395
|
+
id: 0,
|
|
23396
|
+
fileName: data === null || data === void 0 ? void 0 : (_data$photo$ = data.photo[0]) === null || _data$photo$ === void 0 ? void 0 : _data$photo$.filename,
|
|
23397
|
+
fileid: data === null || data === void 0 ? void 0 : (_data$photo$2 = data.photo[0]) === null || _data$photo$2 === void 0 ? void 0 : _data$photo$2.fileid,
|
|
23398
|
+
filetype: data === null || data === void 0 ? void 0 : (_data$photo$3 = data.photo[0]) === null || _data$photo$3 === void 0 ? void 0 : _data$photo$3.filetype,
|
|
23399
|
+
objectid: data === null || data === void 0 ? void 0 : (_data$photo$4 = data.photo[0]) === null || _data$photo$4 === void 0 ? void 0 : _data$photo$4.objectid
|
|
23400
|
+
}] : [],
|
|
23438
23401
|
catalogsynonym: data.catalogSynonym,
|
|
23439
23402
|
mappingcodes: [{
|
|
23440
23403
|
codesystem: "",
|
|
@@ -23452,8 +23415,8 @@ var generateSaveJSON = function generateSaveJSON(data, rcchargeCode) {
|
|
|
23452
23415
|
chargeable: data.characteristicJson[3].checked,
|
|
23453
23416
|
resultappl: data.characteristicJson[4].checked,
|
|
23454
23417
|
resultauthreqd: data.characteristicJson[5].checked,
|
|
23455
|
-
isitem:
|
|
23456
|
-
|
|
23418
|
+
// isitem:data.characteristicJson[6]?.checked,
|
|
23419
|
+
// itemdesc:data?.itemdesc?.value ?? "",
|
|
23457
23420
|
explanatorynote: data.explantorymsg,
|
|
23458
23421
|
// promptalertreqd: "boolean",
|
|
23459
23422
|
// alertmessageCriteria: "string",
|
|
@@ -23482,21 +23445,29 @@ var generateSaveJSON = function generateSaveJSON(data, rcchargeCode) {
|
|
|
23482
23445
|
dfltSpecimenBodySite: data.BodyType ? data.BodyType.value : "",
|
|
23483
23446
|
dfltFastingPeriod: data.FastingPeriodQuantity ? parseInt(data.FastingPeriodQuantity) : 0,
|
|
23484
23447
|
dfltFastingPeriodUOM: data.FastingPeriod ? data.FastingPeriod.value : "",
|
|
23485
|
-
OrderCatalogByEncounterTypeAge: getInstructionAndFrequency(
|
|
23448
|
+
// OrderCatalogByEncounterTypeAge: getInstructionAndFrequency(
|
|
23449
|
+
// data.instructions,
|
|
23450
|
+
// data.frequency,
|
|
23451
|
+
// data.Frequency_applicability
|
|
23452
|
+
// ),
|
|
23453
|
+
|
|
23486
23454
|
draftstatus: data.draftstatus,
|
|
23487
23455
|
OrderAttribApplicability: getAttributes(data.AttributeList, data.attribute),
|
|
23488
23456
|
resourcedefinition: resourceresult !== null && resourceresult !== void 0 ? resourceresult : [],
|
|
23489
|
-
observationdetails: observationresult !== null && observationresult !== void 0 ? observationresult : []
|
|
23457
|
+
observationdetails: observationresult !== null && observationresult !== void 0 ? observationresult : [],
|
|
23458
|
+
instruction: getInstruction(data.instructions),
|
|
23459
|
+
frequency: getFrequency(data.frequency, data.Frequency_applicability)
|
|
23490
23460
|
}
|
|
23491
23461
|
})];
|
|
23492
23462
|
};
|
|
23493
23463
|
var getAvailability = function getAvailability(data) {
|
|
23494
23464
|
var arr = data.map(function (v) {
|
|
23495
|
-
var _v$entity_name$_id, _v$entity_name, _v$entity_name2, _v$appointment, _parseInt, _v$entity_type$_id, _v$entity_type;
|
|
23465
|
+
var _v$entity_name$_id, _v$entity_name, _v$entity_name2, _v$appointment, _parseInt, _v$bill_nature$_id, _v$bill_nature, _v$entity_type$_id, _v$entity_type;
|
|
23496
23466
|
return {
|
|
23497
23467
|
perforganizationId: (_v$entity_name$_id = v === null || v === void 0 ? void 0 : (_v$entity_name = v.entity_name) === null || _v$entity_name === void 0 ? void 0 : _v$entity_name._id) !== null && _v$entity_name$_id !== void 0 ? _v$entity_name$_id : v === null || v === void 0 ? void 0 : (_v$entity_name2 = v.entity_name) === null || _v$entity_name2 === void 0 ? void 0 : _v$entity_name2.value,
|
|
23498
23468
|
apptreqd: (_v$appointment = v === null || v === void 0 ? void 0 : v.appointment) !== null && _v$appointment !== void 0 ? _v$appointment : false,
|
|
23499
23469
|
apptDurnInMinutes: (_parseInt = parseInt(v.duration)) !== null && _parseInt !== void 0 ? _parseInt : null,
|
|
23470
|
+
billnature: (_v$bill_nature$_id = v === null || v === void 0 ? void 0 : (_v$bill_nature = v.bill_nature) === null || _v$bill_nature === void 0 ? void 0 : _v$bill_nature._id) !== null && _v$bill_nature$_id !== void 0 ? _v$bill_nature$_id : null,
|
|
23500
23471
|
perfOrganizationEntity: (_v$entity_type$_id = v === null || v === void 0 ? void 0 : (_v$entity_type = v.entity_type) === null || _v$entity_type === void 0 ? void 0 : _v$entity_type._id) !== null && _v$entity_type$_id !== void 0 ? _v$entity_type$_id : null,
|
|
23501
23472
|
EffFrDate: v !== null && v !== void 0 && v.effective_from ? getUtcTime(moment(v.effective_from, "DD/MM/YYYY")) : null,
|
|
23502
23473
|
EffToDate: v !== null && v !== void 0 && v.effective_to ? getUtcTime(moment(v === null || v === void 0 ? void 0 : v.effective_to, "DD/MM/YYYY")) : null
|
|
@@ -23524,7 +23495,66 @@ var getAttributes = function getAttributes(data, attri) {
|
|
|
23524
23495
|
});
|
|
23525
23496
|
return arr;
|
|
23526
23497
|
};
|
|
23527
|
-
|
|
23498
|
+
|
|
23499
|
+
// const getInstructionAndFrequency = (insdata, fredata, freapp) => {
|
|
23500
|
+
// let arr = [];
|
|
23501
|
+
|
|
23502
|
+
// insdata.map((v, i) => {
|
|
23503
|
+
// arr.push({
|
|
23504
|
+
// _id: v._id,
|
|
23505
|
+
// id: 0,
|
|
23506
|
+
// serviceapplicability: "Service",
|
|
23507
|
+
// setuptypeInd: "Instruction",
|
|
23508
|
+
|
|
23509
|
+
// encountertype: v.encounterType ? v.encounterType._id : "",
|
|
23510
|
+
// gendercode: v.gender ? v.gender._id : "",
|
|
23511
|
+
// agegroup: v.ageRange ? v.ageRange.value : "",
|
|
23512
|
+
// agecatgcode: v.agecategory
|
|
23513
|
+
// ? v.agecategory.map((a) => {
|
|
23514
|
+
// return a.value;
|
|
23515
|
+
// })
|
|
23516
|
+
// : [],
|
|
23517
|
+
|
|
23518
|
+
// OrderInstr: [
|
|
23519
|
+
// {
|
|
23520
|
+
// patientInst: v.patientInstrction,
|
|
23521
|
+
// practionerInst: v.practitionerInstrction,
|
|
23522
|
+
// prepInstr: v.prepratoryInstrction,
|
|
23523
|
+
// deptInstr: v.departmentInstrction,
|
|
23524
|
+
// },
|
|
23525
|
+
// ],
|
|
23526
|
+
// });
|
|
23527
|
+
// });
|
|
23528
|
+
|
|
23529
|
+
// fredata.map((v) => {
|
|
23530
|
+
// arr.push({
|
|
23531
|
+
// _id: v._id,
|
|
23532
|
+
// id: 0,
|
|
23533
|
+
// serviceapplicability: "Service",
|
|
23534
|
+
// setuptypeInd: "DefaultValues",
|
|
23535
|
+
// ordercatalog: "string",
|
|
23536
|
+
// encountertype: v.encounterType ? v.encounterType._id : "",
|
|
23537
|
+
// gendercode: v.gender ? v.gender._id : "",
|
|
23538
|
+
// agegroup: v.ageRange ? v.ageRange.value : "",
|
|
23539
|
+
// agecatgcode: v.agecategory
|
|
23540
|
+
// ? v.agecategory.map((a) => {
|
|
23541
|
+
// return a.value;
|
|
23542
|
+
// })
|
|
23543
|
+
// : [],
|
|
23544
|
+
// freqappl: freapp,
|
|
23545
|
+
// dfltfreqValue: v.freqvalue ? parseInt(v.freqvalue) : 0,
|
|
23546
|
+
// dfltfreqValueUnit: v.freqValSelect ? v.freqValSelect._id : "",
|
|
23547
|
+
// dfltfreqRate: v.freqrate ? parseInt(v.freqrate) : 0,
|
|
23548
|
+
// dfltfreqRateUnit: v.freqRatSelect ? v.freqRatSelect._id : "",
|
|
23549
|
+
// dfltduration: v.freqdura ? parseInt(v.freqdura) : 0,
|
|
23550
|
+
// dfltdurationType: v.freqDuraSelect ? v.freqDuraSelect._id : "",
|
|
23551
|
+
// maxdurnallowedinDays: v.freqmax ? parseInt(v.freqmax) : 0,
|
|
23552
|
+
// });
|
|
23553
|
+
// });
|
|
23554
|
+
|
|
23555
|
+
// return arr;
|
|
23556
|
+
// };
|
|
23557
|
+
var getInstruction = function getInstruction(insdata) {
|
|
23528
23558
|
var arr = [];
|
|
23529
23559
|
insdata.map(function (v, i) {
|
|
23530
23560
|
arr.push({
|
|
@@ -23546,6 +23576,10 @@ var getInstructionAndFrequency = function getInstructionAndFrequency(insdata, fr
|
|
|
23546
23576
|
}]
|
|
23547
23577
|
});
|
|
23548
23578
|
});
|
|
23579
|
+
return arr;
|
|
23580
|
+
};
|
|
23581
|
+
var getFrequency = function getFrequency(fredata, freapp) {
|
|
23582
|
+
var arr = [];
|
|
23549
23583
|
fredata.map(function (v) {
|
|
23550
23584
|
arr.push({
|
|
23551
23585
|
_id: v._id,
|
|
@@ -23571,7 +23605,6 @@ var getInstructionAndFrequency = function getInstructionAndFrequency(insdata, fr
|
|
|
23571
23605
|
});
|
|
23572
23606
|
return arr;
|
|
23573
23607
|
};
|
|
23574
|
-
|
|
23575
23608
|
//for table response (readJSon)
|
|
23576
23609
|
var generateResJson = function generateResJson(data) {
|
|
23577
23610
|
var list = data.map(function (val) {
|
|
@@ -23602,8 +23635,27 @@ var generateUpdateJSON = function generateUpdateJSON(editID, Status) {
|
|
|
23602
23635
|
}];
|
|
23603
23636
|
};
|
|
23604
23637
|
|
|
23638
|
+
var photoData = function photoData(data) {
|
|
23639
|
+
var photo_Data = [];
|
|
23640
|
+
if (data && data.length > 0) {
|
|
23641
|
+
data.map(function (val) {
|
|
23642
|
+
var photo_data_obj = {
|
|
23643
|
+
_id: val._id,
|
|
23644
|
+
date: val.date,
|
|
23645
|
+
url: val.url,
|
|
23646
|
+
id: val.id,
|
|
23647
|
+
fileName: val.fileName,
|
|
23648
|
+
fileid: val.fileid,
|
|
23649
|
+
filetype: val.filetype,
|
|
23650
|
+
objectid: val.objectid
|
|
23651
|
+
};
|
|
23652
|
+
photo_Data.push(photo_data_obj);
|
|
23653
|
+
});
|
|
23654
|
+
}
|
|
23655
|
+
return photo_Data;
|
|
23656
|
+
};
|
|
23605
23657
|
var generateReadResJsonData = function generateReadResJsonData(val, state, resState) {
|
|
23606
|
-
var _val$catalogsynonym2, _val$ordercategory2, _val$ordertype2, _val$healthcareservic2, _val$dfltqtyUOM2, _val$maxorderqtyUOM2, _val$repeatCheckUOM2, _val$repeatCheckActio2, _generateAttribute2, _val$dfltSpecimenType2, _val$dfltSpecimenVolu2, _val$dfltSpecimenBody2, _val$dfltFastingPerio2, _val$dfltSpecimenCont2, _val$dfltSpecimenColl2, _generateResoure2, _generateObservation2;
|
|
23658
|
+
var _val$catalogsynonym2, _val$ordercategory2, _val$ordertype2, _val$healthcareservic2, _val$dfltqtyUOM2, _val$maxorderqtyUOM2, _photoData, _val$repeatCheckUOM2, _val$repeatCheckActio2, _generateAttribute2, _val$dfltSpecimenType2, _val$dfltSpecimenVolu2, _val$dfltSpecimenBody2, _val$dfltFastingPerio2, _val$dfltSpecimenCont2, _val$dfltSpecimenColl2, _generateResoure2, _generateObservation2;
|
|
23607
23659
|
return {
|
|
23608
23660
|
code: val.ordercatalog,
|
|
23609
23661
|
longdes: val.longdesc,
|
|
@@ -23618,6 +23670,7 @@ var generateReadResJsonData = function generateReadResJsonData(val, state, resSt
|
|
|
23618
23670
|
maxno: val.maxorderqty,
|
|
23619
23671
|
Maxorder: val.maxorderqtyUOM && (_val$maxorderqtyUOM2 = val.maxorderqtyUOM) !== null && _val$maxorderqtyUOM2 !== void 0 && _val$maxorderqtyUOM2._id ? val.maxorderqtyUOM : null,
|
|
23620
23672
|
explantorymsg: val.explanatorynote,
|
|
23673
|
+
photo: (_photoData = photoData(val === null || val === void 0 ? void 0 : val.photo)) !== null && _photoData !== void 0 ? _photoData : [],
|
|
23621
23674
|
characteristicJson: [{
|
|
23622
23675
|
label: "Complete On Order",
|
|
23623
23676
|
checked: val.completeonorder
|
|
@@ -23636,13 +23689,12 @@ var generateReadResJsonData = function generateReadResJsonData(val, state, resSt
|
|
|
23636
23689
|
}, {
|
|
23637
23690
|
label: "Result Authentication Required",
|
|
23638
23691
|
checked: val.resultauthreqd
|
|
23639
|
-
}, {
|
|
23640
|
-
label: "Item/Services",
|
|
23641
|
-
checked: val.isitem
|
|
23642
23692
|
}],
|
|
23643
|
-
itemdesc:
|
|
23644
|
-
|
|
23645
|
-
|
|
23693
|
+
// itemdesc:(val.itemdesc)
|
|
23694
|
+
// ? state.order_catalog_serviceItem.data.find(
|
|
23695
|
+
// (sys) => val.itemdesc.indexOf(sys.value) > -1
|
|
23696
|
+
// )
|
|
23697
|
+
// : null,
|
|
23646
23698
|
checkSwitch: val.checkforrepeatorders,
|
|
23647
23699
|
no: val.repeatcheckperiod,
|
|
23648
23700
|
DuplicatePeriod: val.repeatCheckUOM && (_val$repeatCheckUOM2 = val.repeatCheckUOM) !== null && _val$repeatCheckUOM2 !== void 0 && _val$repeatCheckUOM2._id ? val.repeatCheckUOM : null,
|
|
@@ -23660,9 +23712,9 @@ var generateReadResJsonData = function generateReadResJsonData(val, state, resSt
|
|
|
23660
23712
|
FastingPeriod: val.dfltFastingPeriodUOM && (_val$dfltFastingPerio2 = val.dfltFastingPeriodUOM) !== null && _val$dfltFastingPerio2 !== void 0 && _val$dfltFastingPerio2._id ? val.dfltFastingPeriodUOM : null,
|
|
23661
23713
|
SpecimenContainer: val.dfltSpecimenContainer && (_val$dfltSpecimenCont2 = val.dfltSpecimenContainer) !== null && _val$dfltSpecimenCont2 !== void 0 && _val$dfltSpecimenCont2._id ? val.dfltSpecimenContainer : null,
|
|
23662
23714
|
CollectionMethod: val.dfltSpecimenCollectionMethod && (_val$dfltSpecimenColl2 = val.dfltSpecimenCollectionMethod) !== null && _val$dfltSpecimenColl2 !== void 0 && _val$dfltSpecimenColl2._id ? val.dfltSpecimenCollectionMethod : null,
|
|
23663
|
-
instructions: generateInstruction(val.
|
|
23664
|
-
Frequency_applicability: generateFrequency(val.
|
|
23665
|
-
frequency: generateFrequency(val.
|
|
23715
|
+
instructions: generateInstruction(val.instruction),
|
|
23716
|
+
Frequency_applicability: generateFrequency(val.frequency).length > 0 ? true : false,
|
|
23717
|
+
frequency: generateFrequency(val.frequency),
|
|
23666
23718
|
editData: val._key,
|
|
23667
23719
|
id: val.id,
|
|
23668
23720
|
draftstatus: val.draftstatus,
|
|
@@ -23855,7 +23907,7 @@ var generateFrequency = function generateFrequency(data, state) {
|
|
|
23855
23907
|
};
|
|
23856
23908
|
var generatefaciltity = function generatefaciltity(data, state) {
|
|
23857
23909
|
var facilityArr = data.map(function (v) {
|
|
23858
|
-
var _v$apptreqd, _v$apptDurnInMinutes;
|
|
23910
|
+
var _v$apptreqd, _v$apptDurnInMinutes, _v$billnature;
|
|
23859
23911
|
return {
|
|
23860
23912
|
entity_type: v.perfOrganizationEntity && v.perfOrganizationEntity._id ? v.perfOrganizationEntity : null,
|
|
23861
23913
|
// entity_name: v.perforganizationId
|
|
@@ -23869,8 +23921,9 @@ var generatefaciltity = function generatefaciltity(data, state) {
|
|
|
23869
23921
|
} : null,
|
|
23870
23922
|
appointment: (_v$apptreqd = v === null || v === void 0 ? void 0 : v.apptreqd) !== null && _v$apptreqd !== void 0 ? _v$apptreqd : false,
|
|
23871
23923
|
duration: (_v$apptDurnInMinutes = v === null || v === void 0 ? void 0 : v.apptDurnInMinutes) !== null && _v$apptDurnInMinutes !== void 0 ? _v$apptDurnInMinutes : "",
|
|
23872
|
-
|
|
23873
|
-
|
|
23924
|
+
bill_nature: (_v$billnature = v === null || v === void 0 ? void 0 : v.billnature) !== null && _v$billnature !== void 0 ? _v$billnature : "",
|
|
23925
|
+
effective_from: v !== null && v !== void 0 && v.EffFrDate ? new Date(utcTOLocal(v.EffFrDate)).toLocaleDateString('en-GB') : "",
|
|
23926
|
+
effective_to: v !== null && v !== void 0 && v.EffToDate ? new Date(utcTOLocal(v.EffToDate)).toLocaleDateString('en-GB') : ""
|
|
23874
23927
|
};
|
|
23875
23928
|
});
|
|
23876
23929
|
return facilityArr;
|