primary_care_admin_binder 0.1.177 → 0.1.179
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 +52 -22
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8487,14 +8487,18 @@ var queries$o = {
|
|
|
8487
8487
|
var page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
8488
8488
|
var perPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
|
|
8489
8489
|
var search = arguments.length > 2 ? arguments[2] : undefined;
|
|
8490
|
+
var grcid = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "";
|
|
8490
8491
|
return {
|
|
8491
8492
|
appcode: dbName,
|
|
8492
8493
|
requestid: "b1b6a289-71c1-449a-be57-c6b7cddff699",
|
|
8493
|
-
filter: {
|
|
8494
|
-
search: "".concat(search)
|
|
8494
|
+
filter: _objectSpread2(_objectSpread2({
|
|
8495
|
+
search: "".concat(search)
|
|
8496
|
+
}, grcid ? {
|
|
8497
|
+
grcid: "".concat(grcid)
|
|
8498
|
+
} : {}), {}, {
|
|
8495
8499
|
offset: page,
|
|
8496
8500
|
count: perPage
|
|
8497
|
-
}
|
|
8501
|
+
})
|
|
8498
8502
|
};
|
|
8499
8503
|
},
|
|
8500
8504
|
status_update_practitioner: function status_update_practitioner(data) {
|
|
@@ -8637,7 +8641,7 @@ var PRACTITIONER_LIST_READ = createAsyncThunk("practitionerSlice/practitioner",
|
|
|
8637
8641
|
_context3.p = 1;
|
|
8638
8642
|
_context3.n = 2;
|
|
8639
8643
|
return fetchData({
|
|
8640
|
-
body: JSON.stringify(queries$o.practitioner_list(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : ''))
|
|
8644
|
+
body: JSON.stringify(queries$o.practitioner_list(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '', payload !== null && payload !== void 0 && payload.grcid ? payload === null || payload === void 0 ? void 0 : payload.grcid : ''))
|
|
8641
8645
|
}, __baseUrl__$1);
|
|
8642
8646
|
case 2:
|
|
8643
8647
|
data = _context3.v;
|
|
@@ -8651,7 +8655,8 @@ var PRACTITIONER_LIST_READ = createAsyncThunk("practitionerSlice/practitioner",
|
|
|
8651
8655
|
"primaryspeciality": val.Practitionerrole[0] && val.Practitionerrole[0].specialtyid ? (_val$Practitionerrole = val.Practitionerrole[0].specialtyid) === null || _val$Practitionerrole === void 0 ? void 0 : _val$Practitionerrole.display : "-",
|
|
8652
8656
|
"type": val !== null && val !== void 0 && val.type ? val.type : "-",
|
|
8653
8657
|
"_key": val === null || val === void 0 ? void 0 : val._key,
|
|
8654
|
-
'status': val === null || val === void 0 ? void 0 : val.status
|
|
8658
|
+
'status': val === null || val === void 0 ? void 0 : val.status,
|
|
8659
|
+
'grcid': val === null || val === void 0 ? void 0 : val.grcid
|
|
8655
8660
|
});
|
|
8656
8661
|
// }
|
|
8657
8662
|
});
|
|
@@ -8954,7 +8959,8 @@ var typeToKeyMap = {
|
|
|
8954
8959
|
var tables = {
|
|
8955
8960
|
"GEOGRAPHIC_MASTER": "SMGeographicMaster",
|
|
8956
8961
|
"FREQUENCY_MASTER": "FrequencyMaster",
|
|
8957
|
-
"GENERAL_MASTER": "CodingMaster"
|
|
8962
|
+
"GENERAL_MASTER": "CodingMaster",
|
|
8963
|
+
"ORGANIZATION_MASTER": "Organization"
|
|
8958
8964
|
};
|
|
8959
8965
|
|
|
8960
8966
|
var codingMasterFilter = function codingMasterFilter(type) {
|
|
@@ -30561,11 +30567,11 @@ var ReadTreeDetailJson = function ReadTreeDetailJson(data, parentOrgName) {
|
|
|
30561
30567
|
|
|
30562
30568
|
// Process specialty details
|
|
30563
30569
|
var specialtyDetailsArr = ((_data$specialtyDetail = data.specialtyDetails) !== null && _data$specialtyDetail !== void 0 ? _data$specialtyDetail : []).map(function (val) {
|
|
30564
|
-
var _val$specialty$
|
|
30570
|
+
var _val$specialty, _val$specialty2, _val$specialty3;
|
|
30565
30571
|
return {
|
|
30566
30572
|
effFrom: val !== null && val !== void 0 && val.effFrom ? moment.unix(val.effFrom).format('DD-MM-YYYY') : '',
|
|
30567
30573
|
effTo: val !== null && val !== void 0 && val.effTo ? moment.unix(val.effTo).format('DD-MM-YYYY') : '',
|
|
30568
|
-
specialty: (
|
|
30574
|
+
specialty: _typeof(val === null || val === void 0 ? void 0 : val.specialty) === 'object' ? (val === null || val === void 0 || (_val$specialty = val.specialty) === null || _val$specialty === void 0 ? void 0 : _val$specialty.display) || (val === null || val === void 0 || (_val$specialty2 = val.specialty) === null || _val$specialty2 === void 0 ? void 0 : _val$specialty2.description) || '' : (_val$specialty3 = val === null || val === void 0 ? void 0 : val.specialty) !== null && _val$specialty3 !== void 0 ? _val$specialty3 : ''
|
|
30569
30575
|
};
|
|
30570
30576
|
});
|
|
30571
30577
|
|
|
@@ -30736,8 +30742,10 @@ var generateJson$8 = {
|
|
|
30736
30742
|
};
|
|
30737
30743
|
});
|
|
30738
30744
|
var specialtyDetailsArr = data === null || data === void 0 || (_data$specialtyDetail = data.specialtyDetails) === null || _data$specialtyDetail === void 0 ? void 0 : _data$specialtyDetail.map(function (val, i) {
|
|
30745
|
+
var specId = (val === null || val === void 0 ? void 0 : val.dropdown.id) || (val === null || val === void 0 ? void 0 : val.dropdown.value);
|
|
30746
|
+
var cleanSpecId = typeof specId === "string" && specId.includes("/") ? specId.split("/")[1] : specId;
|
|
30739
30747
|
return {
|
|
30740
|
-
specialty:
|
|
30748
|
+
specialty: cleanSpecId,
|
|
30741
30749
|
effFrom: moment(val === null || val === void 0 ? void 0 : val.effFrom, "DD-MM-YYYY").unix(),
|
|
30742
30750
|
effTo: moment(val === null || val === void 0 ? void 0 : val.effTo, "DD-MM-YYYY").unix(),
|
|
30743
30751
|
external: false
|
|
@@ -30785,7 +30793,7 @@ var generateJson$8 = {
|
|
|
30785
30793
|
}
|
|
30786
30794
|
return [_objectSpread2(_objectSpread2({
|
|
30787
30795
|
appcode: dbName,
|
|
30788
|
-
collection:
|
|
30796
|
+
collection: tables.ORGANIZATION_MASTER,
|
|
30789
30797
|
is_metadata: true,
|
|
30790
30798
|
metadata_dbname: metaDatadbName$1,
|
|
30791
30799
|
metadataId: metaDataId$1
|
|
@@ -30827,8 +30835,21 @@ var generateJson$8 = {
|
|
|
30827
30835
|
}
|
|
30828
30836
|
};
|
|
30829
30837
|
var unixToLocalDate = function unixToLocalDate(unixTimestamp) {
|
|
30830
|
-
if (
|
|
30831
|
-
|
|
30838
|
+
if (unixTimestamp === null || unixTimestamp === undefined || unixTimestamp === "") return null;
|
|
30839
|
+
if (typeof unixTimestamp === "number" && unixTimestamp > 0) {
|
|
30840
|
+
return moment.unix(unixTimestamp).local().toDate();
|
|
30841
|
+
}
|
|
30842
|
+
if (typeof unixTimestamp === "string") {
|
|
30843
|
+
if (!isNaN(unixTimestamp) && Number(unixTimestamp) > 0) {
|
|
30844
|
+
return moment.unix(Number(unixTimestamp)).local().toDate();
|
|
30845
|
+
}
|
|
30846
|
+
var m = moment(unixTimestamp, ["YYYY-MM-DD", "DD-MM-YYYY", moment.ISO_8601], true);
|
|
30847
|
+
return m.isValid() ? m.toDate() : null;
|
|
30848
|
+
}
|
|
30849
|
+
if (unixTimestamp instanceof Date && !isNaN(unixTimestamp)) {
|
|
30850
|
+
return unixTimestamp;
|
|
30851
|
+
}
|
|
30852
|
+
return null;
|
|
30832
30853
|
};
|
|
30833
30854
|
var generateReadJson$2 = {
|
|
30834
30855
|
read_json: function read_json(data) {
|
|
@@ -30860,8 +30881,8 @@ var generateReadJson$2 = {
|
|
|
30860
30881
|
var AliasArr = ((_data$alias = data.alias) !== null && _data$alias !== void 0 ? _data$alias : []).map(function (v) {
|
|
30861
30882
|
var _v$aliasType$display, _v$aliasType$_id, _v$aliasDesc;
|
|
30862
30883
|
return {
|
|
30863
|
-
startdate: v
|
|
30864
|
-
enddate: v
|
|
30884
|
+
startdate: unixToLocalDate(v === null || v === void 0 ? void 0 : v.aliasStart),
|
|
30885
|
+
enddate: unixToLocalDate(v === null || v === void 0 ? void 0 : v.aliasEnd),
|
|
30865
30886
|
aliastype: v !== null && v !== void 0 && v.aliasType ? {
|
|
30866
30887
|
title: (_v$aliasType$display = v.aliasType.display) !== null && _v$aliasType$display !== void 0 ? _v$aliasType$display : "",
|
|
30867
30888
|
value: (_v$aliasType$_id = v.aliasType._id) !== null && _v$aliasType$_id !== void 0 ? _v$aliasType$_id : ""
|
|
@@ -30990,24 +31011,33 @@ var generateReadJson$2 = {
|
|
|
30990
31011
|
|
|
30991
31012
|
// --- Specialty Details ---
|
|
30992
31013
|
var specialtyDetailsArr = ((_data$specialtyDetail2 = data.specialtyDetails) !== null && _data$specialtyDetail2 !== void 0 ? _data$specialtyDetail2 : []).map(function (val) {
|
|
30993
|
-
var _specialty$descriptio, _specialty$specialtyC, _specialty$_id, _specialty$code, _specialty$descriptio2, _specialty$_id2;
|
|
30994
31014
|
var effFrom = unixToLocalDate(val === null || val === void 0 ? void 0 : val.effFrom);
|
|
30995
31015
|
var effTo = unixToLocalDate(val === null || val === void 0 ? void 0 : val.effTo);
|
|
30996
31016
|
var specialty = (val === null || val === void 0 ? void 0 : val.specialty) || {};
|
|
30997
|
-
var
|
|
31017
|
+
var specialty_id = "";
|
|
31018
|
+
var specialty_name = "";
|
|
31019
|
+
var specialty_code = "";
|
|
31020
|
+
if (typeof specialty === "string") {
|
|
31021
|
+
specialty_id = specialty;
|
|
31022
|
+
} else if (_typeof(specialty) === "object") {
|
|
31023
|
+
specialty_id = specialty._id || specialty.id || "";
|
|
31024
|
+
specialty_name = specialty.description || specialty.display || specialty.name || "";
|
|
31025
|
+
specialty_code = specialty.specialtyCode || specialty.code || "";
|
|
31026
|
+
}
|
|
31027
|
+
var label = specialty_name ? "".concat(specialty_name, " (").concat(specialty_code || "", ")") : "";
|
|
30998
31028
|
return {
|
|
30999
31029
|
effFrom: effFrom ? effFrom : null,
|
|
31000
31030
|
effTo: effTo ? effTo : null,
|
|
31001
|
-
specialty:
|
|
31002
|
-
code:
|
|
31003
|
-
specialty_id:
|
|
31031
|
+
specialty: specialty_name,
|
|
31032
|
+
code: specialty_code,
|
|
31033
|
+
specialty_id: specialty_id,
|
|
31004
31034
|
fromDate: effFrom,
|
|
31005
31035
|
toDate: effTo,
|
|
31006
31036
|
dropdown: {
|
|
31007
31037
|
label: label,
|
|
31008
|
-
value:
|
|
31009
|
-
name:
|
|
31010
|
-
id:
|
|
31038
|
+
value: specialty_code,
|
|
31039
|
+
name: specialty_name,
|
|
31040
|
+
id: specialty_id
|
|
31011
31041
|
}
|
|
31012
31042
|
};
|
|
31013
31043
|
});
|