primary_care_admin_binder 0.1.113 → 0.1.114
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 +90 -20
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -23393,7 +23393,7 @@ var generateSaveChargeCode = function generateSaveChargeCode(data) {
|
|
|
23393
23393
|
})];
|
|
23394
23394
|
};
|
|
23395
23395
|
var generateSaveJSON = function generateSaveJSON(data, rcchargeCode) {
|
|
23396
|
-
var _data$resourceList, _data$observationList, _data$
|
|
23396
|
+
var _data$resourceList, _data$observationList, _data$DuplicatePeriod2, _data$CheckAction;
|
|
23397
23397
|
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
23398
|
return {
|
|
23399
23399
|
resourcetype: item.resourcetype._id,
|
|
@@ -23452,8 +23452,8 @@ var generateSaveJSON = function generateSaveJSON(data, rcchargeCode) {
|
|
|
23452
23452
|
chargeable: data.characteristicJson[3].checked,
|
|
23453
23453
|
resultappl: data.characteristicJson[4].checked,
|
|
23454
23454
|
resultauthreqd: data.characteristicJson[5].checked,
|
|
23455
|
-
isitem:
|
|
23456
|
-
|
|
23455
|
+
// isitem:data.characteristicJson[6]?.checked,
|
|
23456
|
+
// itemdesc:data?.itemdesc?.value ?? "",
|
|
23457
23457
|
explanatorynote: data.explantorymsg,
|
|
23458
23458
|
// promptalertreqd: "boolean",
|
|
23459
23459
|
// alertmessageCriteria: "string",
|
|
@@ -23482,21 +23482,29 @@ var generateSaveJSON = function generateSaveJSON(data, rcchargeCode) {
|
|
|
23482
23482
|
dfltSpecimenBodySite: data.BodyType ? data.BodyType.value : "",
|
|
23483
23483
|
dfltFastingPeriod: data.FastingPeriodQuantity ? parseInt(data.FastingPeriodQuantity) : 0,
|
|
23484
23484
|
dfltFastingPeriodUOM: data.FastingPeriod ? data.FastingPeriod.value : "",
|
|
23485
|
-
OrderCatalogByEncounterTypeAge: getInstructionAndFrequency(
|
|
23485
|
+
// OrderCatalogByEncounterTypeAge: getInstructionAndFrequency(
|
|
23486
|
+
// data.instructions,
|
|
23487
|
+
// data.frequency,
|
|
23488
|
+
// data.Frequency_applicability
|
|
23489
|
+
// ),
|
|
23490
|
+
|
|
23486
23491
|
draftstatus: data.draftstatus,
|
|
23487
23492
|
OrderAttribApplicability: getAttributes(data.AttributeList, data.attribute),
|
|
23488
23493
|
resourcedefinition: resourceresult !== null && resourceresult !== void 0 ? resourceresult : [],
|
|
23489
|
-
observationdetails: observationresult !== null && observationresult !== void 0 ? observationresult : []
|
|
23494
|
+
observationdetails: observationresult !== null && observationresult !== void 0 ? observationresult : [],
|
|
23495
|
+
instruction: getInstruction(data.instructions),
|
|
23496
|
+
frequency: getFrequency(data.frequency, data.Frequency_applicability)
|
|
23490
23497
|
}
|
|
23491
23498
|
})];
|
|
23492
23499
|
};
|
|
23493
23500
|
var getAvailability = function getAvailability(data) {
|
|
23494
23501
|
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;
|
|
23502
|
+
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
23503
|
return {
|
|
23497
23504
|
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
23505
|
apptreqd: (_v$appointment = v === null || v === void 0 ? void 0 : v.appointment) !== null && _v$appointment !== void 0 ? _v$appointment : false,
|
|
23499
23506
|
apptDurnInMinutes: (_parseInt = parseInt(v.duration)) !== null && _parseInt !== void 0 ? _parseInt : null,
|
|
23507
|
+
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
23508
|
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
23509
|
EffFrDate: v !== null && v !== void 0 && v.effective_from ? getUtcTime(moment(v.effective_from, "DD/MM/YYYY")) : null,
|
|
23502
23510
|
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 +23532,66 @@ var getAttributes = function getAttributes(data, attri) {
|
|
|
23524
23532
|
});
|
|
23525
23533
|
return arr;
|
|
23526
23534
|
};
|
|
23527
|
-
|
|
23535
|
+
|
|
23536
|
+
// const getInstructionAndFrequency = (insdata, fredata, freapp) => {
|
|
23537
|
+
// let arr = [];
|
|
23538
|
+
|
|
23539
|
+
// insdata.map((v, i) => {
|
|
23540
|
+
// arr.push({
|
|
23541
|
+
// _id: v._id,
|
|
23542
|
+
// id: 0,
|
|
23543
|
+
// serviceapplicability: "Service",
|
|
23544
|
+
// setuptypeInd: "Instruction",
|
|
23545
|
+
|
|
23546
|
+
// encountertype: v.encounterType ? v.encounterType._id : "",
|
|
23547
|
+
// gendercode: v.gender ? v.gender._id : "",
|
|
23548
|
+
// agegroup: v.ageRange ? v.ageRange.value : "",
|
|
23549
|
+
// agecatgcode: v.agecategory
|
|
23550
|
+
// ? v.agecategory.map((a) => {
|
|
23551
|
+
// return a.value;
|
|
23552
|
+
// })
|
|
23553
|
+
// : [],
|
|
23554
|
+
|
|
23555
|
+
// OrderInstr: [
|
|
23556
|
+
// {
|
|
23557
|
+
// patientInst: v.patientInstrction,
|
|
23558
|
+
// practionerInst: v.practitionerInstrction,
|
|
23559
|
+
// prepInstr: v.prepratoryInstrction,
|
|
23560
|
+
// deptInstr: v.departmentInstrction,
|
|
23561
|
+
// },
|
|
23562
|
+
// ],
|
|
23563
|
+
// });
|
|
23564
|
+
// });
|
|
23565
|
+
|
|
23566
|
+
// fredata.map((v) => {
|
|
23567
|
+
// arr.push({
|
|
23568
|
+
// _id: v._id,
|
|
23569
|
+
// id: 0,
|
|
23570
|
+
// serviceapplicability: "Service",
|
|
23571
|
+
// setuptypeInd: "DefaultValues",
|
|
23572
|
+
// ordercatalog: "string",
|
|
23573
|
+
// encountertype: v.encounterType ? v.encounterType._id : "",
|
|
23574
|
+
// gendercode: v.gender ? v.gender._id : "",
|
|
23575
|
+
// agegroup: v.ageRange ? v.ageRange.value : "",
|
|
23576
|
+
// agecatgcode: v.agecategory
|
|
23577
|
+
// ? v.agecategory.map((a) => {
|
|
23578
|
+
// return a.value;
|
|
23579
|
+
// })
|
|
23580
|
+
// : [],
|
|
23581
|
+
// freqappl: freapp,
|
|
23582
|
+
// dfltfreqValue: v.freqvalue ? parseInt(v.freqvalue) : 0,
|
|
23583
|
+
// dfltfreqValueUnit: v.freqValSelect ? v.freqValSelect._id : "",
|
|
23584
|
+
// dfltfreqRate: v.freqrate ? parseInt(v.freqrate) : 0,
|
|
23585
|
+
// dfltfreqRateUnit: v.freqRatSelect ? v.freqRatSelect._id : "",
|
|
23586
|
+
// dfltduration: v.freqdura ? parseInt(v.freqdura) : 0,
|
|
23587
|
+
// dfltdurationType: v.freqDuraSelect ? v.freqDuraSelect._id : "",
|
|
23588
|
+
// maxdurnallowedinDays: v.freqmax ? parseInt(v.freqmax) : 0,
|
|
23589
|
+
// });
|
|
23590
|
+
// });
|
|
23591
|
+
|
|
23592
|
+
// return arr;
|
|
23593
|
+
// };
|
|
23594
|
+
var getInstruction = function getInstruction(insdata) {
|
|
23528
23595
|
var arr = [];
|
|
23529
23596
|
insdata.map(function (v, i) {
|
|
23530
23597
|
arr.push({
|
|
@@ -23546,6 +23613,10 @@ var getInstructionAndFrequency = function getInstructionAndFrequency(insdata, fr
|
|
|
23546
23613
|
}]
|
|
23547
23614
|
});
|
|
23548
23615
|
});
|
|
23616
|
+
return arr;
|
|
23617
|
+
};
|
|
23618
|
+
var getFrequency = function getFrequency(fredata, freapp) {
|
|
23619
|
+
var arr = [];
|
|
23549
23620
|
fredata.map(function (v) {
|
|
23550
23621
|
arr.push({
|
|
23551
23622
|
_id: v._id,
|
|
@@ -23571,7 +23642,6 @@ var getInstructionAndFrequency = function getInstructionAndFrequency(insdata, fr
|
|
|
23571
23642
|
});
|
|
23572
23643
|
return arr;
|
|
23573
23644
|
};
|
|
23574
|
-
|
|
23575
23645
|
//for table response (readJSon)
|
|
23576
23646
|
var generateResJson = function generateResJson(data) {
|
|
23577
23647
|
var list = data.map(function (val) {
|
|
@@ -23636,13 +23706,12 @@ var generateReadResJsonData = function generateReadResJsonData(val, state, resSt
|
|
|
23636
23706
|
}, {
|
|
23637
23707
|
label: "Result Authentication Required",
|
|
23638
23708
|
checked: val.resultauthreqd
|
|
23639
|
-
}, {
|
|
23640
|
-
label: "Item/Services",
|
|
23641
|
-
checked: val.isitem
|
|
23642
23709
|
}],
|
|
23643
|
-
itemdesc:
|
|
23644
|
-
|
|
23645
|
-
|
|
23710
|
+
// itemdesc:(val.itemdesc)
|
|
23711
|
+
// ? state.order_catalog_serviceItem.data.find(
|
|
23712
|
+
// (sys) => val.itemdesc.indexOf(sys.value) > -1
|
|
23713
|
+
// )
|
|
23714
|
+
// : null,
|
|
23646
23715
|
checkSwitch: val.checkforrepeatorders,
|
|
23647
23716
|
no: val.repeatcheckperiod,
|
|
23648
23717
|
DuplicatePeriod: val.repeatCheckUOM && (_val$repeatCheckUOM2 = val.repeatCheckUOM) !== null && _val$repeatCheckUOM2 !== void 0 && _val$repeatCheckUOM2._id ? val.repeatCheckUOM : null,
|
|
@@ -23660,9 +23729,9 @@ var generateReadResJsonData = function generateReadResJsonData(val, state, resSt
|
|
|
23660
23729
|
FastingPeriod: val.dfltFastingPeriodUOM && (_val$dfltFastingPerio2 = val.dfltFastingPeriodUOM) !== null && _val$dfltFastingPerio2 !== void 0 && _val$dfltFastingPerio2._id ? val.dfltFastingPeriodUOM : null,
|
|
23661
23730
|
SpecimenContainer: val.dfltSpecimenContainer && (_val$dfltSpecimenCont2 = val.dfltSpecimenContainer) !== null && _val$dfltSpecimenCont2 !== void 0 && _val$dfltSpecimenCont2._id ? val.dfltSpecimenContainer : null,
|
|
23662
23731
|
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.
|
|
23732
|
+
instructions: generateInstruction(val.instruction),
|
|
23733
|
+
Frequency_applicability: generateFrequency(val.frequency).length > 0 ? true : false,
|
|
23734
|
+
frequency: generateFrequency(val.frequency),
|
|
23666
23735
|
editData: val._key,
|
|
23667
23736
|
id: val.id,
|
|
23668
23737
|
draftstatus: val.draftstatus,
|
|
@@ -23855,7 +23924,7 @@ var generateFrequency = function generateFrequency(data, state) {
|
|
|
23855
23924
|
};
|
|
23856
23925
|
var generatefaciltity = function generatefaciltity(data, state) {
|
|
23857
23926
|
var facilityArr = data.map(function (v) {
|
|
23858
|
-
var _v$apptreqd, _v$apptDurnInMinutes;
|
|
23927
|
+
var _v$apptreqd, _v$apptDurnInMinutes, _v$billnature;
|
|
23859
23928
|
return {
|
|
23860
23929
|
entity_type: v.perfOrganizationEntity && v.perfOrganizationEntity._id ? v.perfOrganizationEntity : null,
|
|
23861
23930
|
// entity_name: v.perforganizationId
|
|
@@ -23869,8 +23938,9 @@ var generatefaciltity = function generatefaciltity(data, state) {
|
|
|
23869
23938
|
} : null,
|
|
23870
23939
|
appointment: (_v$apptreqd = v === null || v === void 0 ? void 0 : v.apptreqd) !== null && _v$apptreqd !== void 0 ? _v$apptreqd : false,
|
|
23871
23940
|
duration: (_v$apptDurnInMinutes = v === null || v === void 0 ? void 0 : v.apptDurnInMinutes) !== null && _v$apptDurnInMinutes !== void 0 ? _v$apptDurnInMinutes : "",
|
|
23872
|
-
|
|
23873
|
-
|
|
23941
|
+
bill_nature: (_v$billnature = v === null || v === void 0 ? void 0 : v.billnature) !== null && _v$billnature !== void 0 ? _v$billnature : "",
|
|
23942
|
+
effective_from: v !== null && v !== void 0 && v.EffFrDate ? new Date(utcTOLocal(v.EffFrDate)).toLocaleDateString('en-GB') : "",
|
|
23943
|
+
effective_to: v !== null && v !== void 0 && v.EffToDate ? new Date(utcTOLocal(v.EffToDate)).toLocaleDateString('en-GB') : ""
|
|
23874
23944
|
};
|
|
23875
23945
|
});
|
|
23876
23946
|
return facilityArr;
|