primary_care_admin_binder 0.1.9 → 0.1.13
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 +96 -17
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -7997,7 +7997,26 @@ var makeName = function makeName() {
|
|
|
7997
7997
|
var prefixVal = (prefix === null || prefix === void 0 ? void 0 : (_prefix$coding = prefix.coding) === null || _prefix$coding === void 0 ? void 0 : (_prefix$coding$ = _prefix$coding[0]) === null || _prefix$coding$ === void 0 ? void 0 : _prefix$coding$.display) || "";
|
|
7998
7998
|
var suffixVal = (suffix === null || suffix === void 0 ? void 0 : (_suffix$coding = suffix.coding) === null || _suffix$coding === void 0 ? void 0 : (_suffix$coding$ = _suffix$coding[0]) === null || _suffix$coding$ === void 0 ? void 0 : _suffix$coding$.display) || "";
|
|
7999
7999
|
return "".concat(prefixVal && prefixVal + ".").concat(text && text + " ").concat(given && given + " ").concat(suffixVal && suffixVal);
|
|
8000
|
-
};
|
|
8000
|
+
}; // const getUtcTime = (date) => {
|
|
8001
|
+
// let a = null
|
|
8002
|
+
// if (date) {
|
|
8003
|
+
// a = new Date(moment(date))
|
|
8004
|
+
// } else {
|
|
8005
|
+
// a = new Date(date)
|
|
8006
|
+
// }
|
|
8007
|
+
// a = a.toUTCString()
|
|
8008
|
+
// return (new Date(a).getTime()) / 1000
|
|
8009
|
+
// };
|
|
8010
|
+
// const utcTOLocal = (date, format) => {
|
|
8011
|
+
// let Ndate = new Date(date * 1000);
|
|
8012
|
+
// let fmt = format ? format : "DD-MM-YYYY"
|
|
8013
|
+
// if (format) {
|
|
8014
|
+
// return moment(Ndate).format(fmt);
|
|
8015
|
+
// } else {
|
|
8016
|
+
// return moment(Ndate)
|
|
8017
|
+
// }
|
|
8018
|
+
// };
|
|
8019
|
+
|
|
8001
8020
|
|
|
8002
8021
|
var getUtcTime = function getUtcTime(date) {
|
|
8003
8022
|
if (date) {
|
|
@@ -21846,7 +21865,7 @@ var queries$c = {
|
|
|
21846
21865
|
db_name: dbName,
|
|
21847
21866
|
entity: "CodeableConceptMaster",
|
|
21848
21867
|
sort: "document(CodeableConceptMaster.coding[0]).display",
|
|
21849
|
-
filter: "CodeableConceptMaster.Type=='
|
|
21868
|
+
filter: "CodeableConceptMaster.Type=='ACCOUNTENTITYTYPE' AND CodeableConceptMaster.activestatus==true",
|
|
21850
21869
|
return_fields: "MERGE(CodeableConceptMaster,{coding:(FOR cod IN TO_ARRAY(CodeableConceptMaster.coding) RETURN DOCUMENT(cod))})"
|
|
21851
21870
|
};
|
|
21852
21871
|
},
|
|
@@ -32441,6 +32460,12 @@ var queries$3 = {
|
|
|
32441
32460
|
filter: "SMGeographicMaster.activestatus==true && SMGeographicMaster._key=='".concat(id, "'"),
|
|
32442
32461
|
return_fields: "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), GeoLocationISDCode :SMGeographicMaster.GeoLocationISDCode, parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.activestatus,_key:SMGeographicMaster._key}"
|
|
32443
32462
|
};
|
|
32463
|
+
},
|
|
32464
|
+
//geo code exits checking
|
|
32465
|
+
geoCodeExits: function geoCodeExits(_ref) {
|
|
32466
|
+
var levelType = _ref.levelType,
|
|
32467
|
+
geoLevelCode = _ref.geoLevelCode;
|
|
32468
|
+
return "{\n\t\t\t\"db_name\": \"primarycare\",\n\t\t\t\"entity\": \"SMGeographicMaster\",\n\t\t\t\"filter\": \"SMGeographicMaster.geogLevelType=='".concat(levelType, "' && SMGeographicMaster.geogLevelCode=='").concat(geoLevelCode, "'\",\n\t\t\t\"return_fields\": \"SMGeographicMaster\"\n\t\t }");
|
|
32444
32469
|
}
|
|
32445
32470
|
};
|
|
32446
32471
|
|
|
@@ -33084,15 +33109,15 @@ var GEOGRAPIC_INSERT = createAsyncThunk("geographicSlice/geoGraphicInsert", /*#_
|
|
|
33084
33109
|
}
|
|
33085
33110
|
}
|
|
33086
33111
|
}, _callee11, null, [[2, 11]]);
|
|
33087
|
-
})));
|
|
33088
|
-
|
|
33112
|
+
}))); //GEOGRAPIC EXITS CHECK
|
|
33113
|
+
|
|
33114
|
+
var GEOGRAPIC_EXITS_DATA = createAsyncThunk("geographicSlice/geogrpicExitsData", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
|
|
33089
33115
|
var payload,
|
|
33090
33116
|
_ref24,
|
|
33091
33117
|
rejectWithValue,
|
|
33092
|
-
|
|
33093
|
-
|
|
33118
|
+
levelType,
|
|
33119
|
+
geoLevelCode,
|
|
33094
33120
|
data,
|
|
33095
|
-
res,
|
|
33096
33121
|
_args12 = arguments;
|
|
33097
33122
|
|
|
33098
33123
|
return regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
@@ -33100,35 +33125,81 @@ var GEOGRAPHIC_SINGLE_READ = createAsyncThunk("geographicSlice/geoGraphicSingleR
|
|
|
33100
33125
|
switch (_context12.prev = _context12.next) {
|
|
33101
33126
|
case 0:
|
|
33102
33127
|
payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
|
|
33103
|
-
_ref24 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref24.rejectWithValue
|
|
33128
|
+
_ref24 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref24.rejectWithValue;
|
|
33104
33129
|
_context12.prev = 2;
|
|
33130
|
+
levelType = payload.levelType, geoLevelCode = payload.geoLevelCode;
|
|
33131
|
+
_context12.next = 6;
|
|
33132
|
+
return fetchData({
|
|
33133
|
+
body: queries$3.geoCodeExits({
|
|
33134
|
+
levelType: levelType,
|
|
33135
|
+
geoLevelCode: geoLevelCode
|
|
33136
|
+
})
|
|
33137
|
+
}, __readDocumentUrl__);
|
|
33138
|
+
|
|
33139
|
+
case 6:
|
|
33140
|
+
data = _context12.sent;
|
|
33141
|
+
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
33142
|
+
data: data
|
|
33143
|
+
}));
|
|
33144
|
+
|
|
33145
|
+
case 10:
|
|
33146
|
+
_context12.prev = 10;
|
|
33147
|
+
_context12.t0 = _context12["catch"](2);
|
|
33148
|
+
return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
33149
|
+
message: _context12.t0.message
|
|
33150
|
+
})));
|
|
33151
|
+
|
|
33152
|
+
case 13:
|
|
33153
|
+
case "end":
|
|
33154
|
+
return _context12.stop();
|
|
33155
|
+
}
|
|
33156
|
+
}
|
|
33157
|
+
}, _callee12, null, [[2, 10]]);
|
|
33158
|
+
})));
|
|
33159
|
+
var GEOGRAPHIC_SINGLE_READ = createAsyncThunk("geographicSlice/geoGraphicSingleRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
|
|
33160
|
+
var payload,
|
|
33161
|
+
_ref26,
|
|
33162
|
+
rejectWithValue,
|
|
33163
|
+
getState,
|
|
33164
|
+
_key,
|
|
33165
|
+
data,
|
|
33166
|
+
res,
|
|
33167
|
+
_args13 = arguments;
|
|
33168
|
+
|
|
33169
|
+
return regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
33170
|
+
while (1) {
|
|
33171
|
+
switch (_context13.prev = _context13.next) {
|
|
33172
|
+
case 0:
|
|
33173
|
+
payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
|
|
33174
|
+
_ref26 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref26.rejectWithValue, getState = _ref26.getState;
|
|
33175
|
+
_context13.prev = 2;
|
|
33105
33176
|
_key = payload._key;
|
|
33106
33177
|
getState();
|
|
33107
|
-
|
|
33178
|
+
_context13.next = 8;
|
|
33108
33179
|
return fetchData({
|
|
33109
33180
|
body: JSON.stringify(queries$3.editGeoGraphicSingleRead(_key))
|
|
33110
33181
|
}, __readDocumentUrl__);
|
|
33111
33182
|
|
|
33112
33183
|
case 8:
|
|
33113
|
-
data =
|
|
33184
|
+
data = _context13.sent;
|
|
33114
33185
|
res = generateReadJSON(data.result[0]);
|
|
33115
|
-
return
|
|
33186
|
+
return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
33116
33187
|
data: res
|
|
33117
33188
|
}));
|
|
33118
33189
|
|
|
33119
33190
|
case 13:
|
|
33120
|
-
|
|
33121
|
-
|
|
33122
|
-
return
|
|
33123
|
-
message:
|
|
33191
|
+
_context13.prev = 13;
|
|
33192
|
+
_context13.t0 = _context13["catch"](2);
|
|
33193
|
+
return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
33194
|
+
message: _context13.t0.message
|
|
33124
33195
|
})));
|
|
33125
33196
|
|
|
33126
33197
|
case 16:
|
|
33127
33198
|
case "end":
|
|
33128
|
-
return
|
|
33199
|
+
return _context13.stop();
|
|
33129
33200
|
}
|
|
33130
33201
|
}
|
|
33131
|
-
},
|
|
33202
|
+
}, _callee13, null, [[2, 13]]);
|
|
33132
33203
|
})));
|
|
33133
33204
|
var geoGraphicSlice = createSlice({
|
|
33134
33205
|
name: "geographicApiSlice",
|
|
@@ -33144,6 +33215,7 @@ var geoGraphicSlice = createSlice({
|
|
|
33144
33215
|
geoMasterMaster: _objectSpread2({}, defaultState.List),
|
|
33145
33216
|
geoMasterParentCode: _objectSpread2({}, defaultState.List),
|
|
33146
33217
|
geoGraphicInsert: _objectSpread2({}, defaultState.List),
|
|
33218
|
+
geogrpicExitsData: _objectSpread2({}, defaultState.Info),
|
|
33147
33219
|
geoGraphicSingleRead: _objectSpread2({}, defaultState.List)
|
|
33148
33220
|
},
|
|
33149
33221
|
extraReducers: (_extraReducers$5 = {}, _defineProperty(_extraReducers$5, GEOGRAPHIC_TYPE_READ.fulfilled, function (state, action) {
|
|
@@ -33218,6 +33290,12 @@ var geoGraphicSlice = createSlice({
|
|
|
33218
33290
|
state.geoGraphicSingleRead.loading = true, state.geoGraphicSingleRead.error = false, state.geoGraphicSingleRead.loading = true;
|
|
33219
33291
|
}), _defineProperty(_extraReducers$5, GEOGRAPHIC_SINGLE_READ.rejected, function (state, action) {
|
|
33220
33292
|
state.geoGraphicSingleRead.loading = false, state.geoGraphicSingleRead.error = true, state.geoGraphicSingleRead = action.payload;
|
|
33293
|
+
}), _defineProperty(_extraReducers$5, GEOGRAPIC_EXITS_DATA.fulfilled, function (state, action) {
|
|
33294
|
+
state.geogrpicExitsData.loading = false, state.geogrpicExitsData.error = false, state.geogrpicExitsData = action.payload;
|
|
33295
|
+
}), _defineProperty(_extraReducers$5, GEOGRAPIC_EXITS_DATA.pending, function (state, action) {
|
|
33296
|
+
state.geogrpicExitsData.loading = true, state.geogrpicExitsData.error = false, state.geogrpicExitsData.loading = true;
|
|
33297
|
+
}), _defineProperty(_extraReducers$5, GEOGRAPIC_EXITS_DATA.rejected, function (state, action) {
|
|
33298
|
+
state.geogrpicExitsData.loading = false, state.geogrpicExitsData.error = true, state.geogrpicExitsData = action.payload;
|
|
33221
33299
|
}), _extraReducers$5)
|
|
33222
33300
|
});
|
|
33223
33301
|
var geoGraphicActions = {
|
|
@@ -33232,6 +33310,7 @@ var geoGraphicActions = {
|
|
|
33232
33310
|
GEOGRAPHIC_MASTER_MASTER: GEOGRAPHIC_MASTER_MASTER,
|
|
33233
33311
|
GEOGRAPHIC_PARENT_CODE: GEOGRAPHIC_PARENT_CODE,
|
|
33234
33312
|
GEOGRAPIC_INSERT: GEOGRAPIC_INSERT,
|
|
33313
|
+
GEOGRAPIC_EXITS_DATA: GEOGRAPIC_EXITS_DATA,
|
|
33235
33314
|
GEOGRAPHIC_SINGLE_READ: GEOGRAPHIC_SINGLE_READ
|
|
33236
33315
|
};
|
|
33237
33316
|
var geoGraphicSlice$1 = geoGraphicSlice.reducer;
|