primarycare-binder 1.1.107 → 1.1.108
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 +55 -38
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8174,8 +8174,11 @@ var queries$b = {
|
|
|
8174
8174
|
returnFields: "{AppointmentID:Appointment.id,_id:Appointment._id,status:Appointment.status,appStatus:first(for en in Encounter filter Appointment.id in en.appointmentId return document(en.status)),avc:Appointment.avc,appnumber:Appointment.appno,end:Appointment.end,start:Appointment.start,createddate:Appointment.createddate,updatedate:Appointment.updatedate, personId:Appointment.PersonID, patient:(FOR adqolcPatient IN Patient FILTER adqolcPatient.personID IN Appointment.PersonID RETURN merge(adqolcPatient,{identifier:document(adqolcPatient.identifier)},{martialStatus:document(adqolcPatient.martialStatus)},{name:document(adqolcPatient.name)},{telecom:document(adqolcPatient.telecom)},{photo:document(adqolcPatient.photo)},{personID:(for pid in Person filter pid.Id == adqolcPatient.personID return pid)},{address:document(adqolcPatient.address)},{activereason:(DOCUMENT(adqolcPatient.activereason)),deceasedreason:(DOCUMENT(adqolcPatient.deceasedreason))},{isdeceased:(for doc in CodeableConceptMaster filter doc._id==adqolcPatient.isdeceased return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod)}))})) ,Person:MERGE(Person,{name:(FOR hn IN TO_ARRAY(Person.name) RETURN DOCUMENT(hn)),telecom:(FOR tel IN TO_ARRAY(Person.telecom) RETURN DOCUMENT(tel) ),photo:document(Person.photo)})}"
|
|
8175
8175
|
},
|
|
8176
8176
|
codablemasterGetPatientname: {
|
|
8177
|
-
query: function query(
|
|
8178
|
-
|
|
8177
|
+
query: function query(_ref2) {
|
|
8178
|
+
var firstName = _ref2.firstName,
|
|
8179
|
+
secondName = _ref2.secondName,
|
|
8180
|
+
thirdName = _ref2.thirdName;
|
|
8181
|
+
return "(LIKE(DOCUMENT(Person.name)[0].text,'%".concat(firstName, "%',true) || LIKE(DOCUMENT(Person.name)[0].given,'%").concat(secondName, "%',true) || LIKE(DOCUMENT(Person.name)[0].family,'%").concat(thirdName, "%',true)) && Person.activestatus == true");
|
|
8179
8182
|
},
|
|
8180
8183
|
returnFields: "{prefix: DOCUMENT(Person.name)[*].prefix,gender: Person.gender,birthDate: Person.birthDay,suffix: DOCUMENT(Person.name)[*].suffix, nameObj: DOCUMENT(Person.name)[*], name: DOCUMENT(Person.name)[*].text, personId: Person.Id,patientDetail: (for pat in Patient FILTER pat.personID == Person.Id RETURN merge(pat,{name:(for nam in HumanNameMaster filter nam._id in pat.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{photo:document(pat.photo)})),telecom: Document(Person.telecom),photo:document(Person.photo)}"
|
|
8181
8184
|
},
|
|
@@ -8192,9 +8195,9 @@ var queries$b = {
|
|
|
8192
8195
|
},
|
|
8193
8196
|
returnFields: "DISTINCT {Organization:Organization.name, OrgID:Organization.id}"
|
|
8194
8197
|
},
|
|
8195
|
-
getCodableConceptMaster: function getCodableConceptMaster(
|
|
8196
|
-
var
|
|
8197
|
-
type =
|
|
8198
|
+
getCodableConceptMaster: function getCodableConceptMaster(_ref3) {
|
|
8199
|
+
var _ref3$type = _ref3.type,
|
|
8200
|
+
type = _ref3$type === void 0 ? "" : _ref3$type;
|
|
8198
8201
|
return {
|
|
8199
8202
|
db_name: dbName,
|
|
8200
8203
|
entity: "CodeableConceptMaster",
|
|
@@ -8243,9 +8246,9 @@ var queries$b = {
|
|
|
8243
8246
|
sort: "OrderType.shortdesc asc"
|
|
8244
8247
|
};
|
|
8245
8248
|
},
|
|
8246
|
-
getCaOrderLine: function getCaOrderLine(
|
|
8247
|
-
var
|
|
8248
|
-
id =
|
|
8249
|
+
getCaOrderLine: function getCaOrderLine(_ref4) {
|
|
8250
|
+
var _ref4$id = _ref4.id,
|
|
8251
|
+
id = _ref4$id === void 0 ? 0 : _ref4$id;
|
|
8249
8252
|
return {
|
|
8250
8253
|
db_name: dbName,
|
|
8251
8254
|
entity: "CA_OrderLine",
|
|
@@ -8253,9 +8256,9 @@ var queries$b = {
|
|
|
8253
8256
|
return_fields: "CA_OrderLine"
|
|
8254
8257
|
};
|
|
8255
8258
|
},
|
|
8256
|
-
getOrganization: function getOrganization(
|
|
8257
|
-
var
|
|
8258
|
-
id =
|
|
8259
|
+
getOrganization: function getOrganization(_ref5) {
|
|
8260
|
+
var _ref5$id = _ref5.id,
|
|
8261
|
+
id = _ref5$id === void 0 ? 0 : _ref5$id;
|
|
8259
8262
|
return {
|
|
8260
8263
|
db_name: dbName,
|
|
8261
8264
|
entity: "Organization",
|
|
@@ -8263,9 +8266,9 @@ var queries$b = {
|
|
|
8263
8266
|
return_fields: "{_id:Organization._id,OrgID:Organization.id,name:Organization.name}"
|
|
8264
8267
|
};
|
|
8265
8268
|
},
|
|
8266
|
-
getPractionerRole: function getPractionerRole(
|
|
8267
|
-
var
|
|
8268
|
-
id =
|
|
8269
|
+
getPractionerRole: function getPractionerRole(_ref6) {
|
|
8270
|
+
var _ref6$id = _ref6.id,
|
|
8271
|
+
id = _ref6$id === void 0 ? 0 : _ref6$id;
|
|
8269
8272
|
return {
|
|
8270
8273
|
db_name: dbName,
|
|
8271
8274
|
entity: "PractitionerRole,Organization,Practitioner",
|
|
@@ -8276,9 +8279,9 @@ var queries$b = {
|
|
|
8276
8279
|
return_fields: "DISTINCT MERGE({PractitionerRole:DOCUMENT(PractitionerRole.code)})"
|
|
8277
8280
|
};
|
|
8278
8281
|
},
|
|
8279
|
-
getPractionerName: function getPractionerName(
|
|
8280
|
-
var
|
|
8281
|
-
id =
|
|
8282
|
+
getPractionerName: function getPractionerName(_ref7) {
|
|
8283
|
+
var _ref7$id = _ref7.id,
|
|
8284
|
+
id = _ref7$id === void 0 ? 0 : _ref7$id;
|
|
8282
8285
|
return {
|
|
8283
8286
|
db_name: dbName,
|
|
8284
8287
|
entity: "PractitionerRole,Organization,Practitioner",
|
|
@@ -8289,9 +8292,9 @@ var queries$b = {
|
|
|
8289
8292
|
return_fields: "DISTINCT MERGE({PractitionerName:DOCUMENT(Practitioner.name)})"
|
|
8290
8293
|
};
|
|
8291
8294
|
},
|
|
8292
|
-
getCaDiagnosis: function getCaDiagnosis(
|
|
8293
|
-
var
|
|
8294
|
-
id =
|
|
8295
|
+
getCaDiagnosis: function getCaDiagnosis(_ref8) {
|
|
8296
|
+
var _ref8$id = _ref8.id,
|
|
8297
|
+
id = _ref8$id === void 0 ? 0 : _ref8$id;
|
|
8295
8298
|
return {
|
|
8296
8299
|
db_name: dbName,
|
|
8297
8300
|
entity: "CA_Diagnosis",
|
|
@@ -8299,9 +8302,9 @@ var queries$b = {
|
|
|
8299
8302
|
return_fields: "DOCUMENT(CA_Diagnosis.diagcode)"
|
|
8300
8303
|
};
|
|
8301
8304
|
},
|
|
8302
|
-
upsertCaOrderline: function upsertCaOrderline(
|
|
8303
|
-
var
|
|
8304
|
-
doc =
|
|
8305
|
+
upsertCaOrderline: function upsertCaOrderline(_ref9) {
|
|
8306
|
+
var _ref9$doc = _ref9.doc,
|
|
8307
|
+
doc = _ref9$doc === void 0 ? {} : _ref9$doc;
|
|
8305
8308
|
return [{
|
|
8306
8309
|
db_name: dbName,
|
|
8307
8310
|
entity: "CA_OrderLine",
|
|
@@ -8310,9 +8313,9 @@ var queries$b = {
|
|
|
8310
8313
|
doc: _objectSpread2({}, doc)
|
|
8311
8314
|
}];
|
|
8312
8315
|
},
|
|
8313
|
-
upsertCaOrderApprovalWorkqueue: function upsertCaOrderApprovalWorkqueue(
|
|
8314
|
-
var
|
|
8315
|
-
doc =
|
|
8316
|
+
upsertCaOrderApprovalWorkqueue: function upsertCaOrderApprovalWorkqueue(_ref10) {
|
|
8317
|
+
var _ref10$doc = _ref10.doc,
|
|
8318
|
+
doc = _ref10$doc === void 0 ? {} : _ref10$doc;
|
|
8316
8319
|
return [{
|
|
8317
8320
|
db_name: dbName,
|
|
8318
8321
|
entity: "CA_OrderApprovalWorkqueue",
|
|
@@ -8321,11 +8324,11 @@ var queries$b = {
|
|
|
8321
8324
|
doc: _objectSpread2({}, doc)
|
|
8322
8325
|
}];
|
|
8323
8326
|
},
|
|
8324
|
-
commonUpsertQuery: function commonUpsertQuery(
|
|
8325
|
-
var
|
|
8326
|
-
doc =
|
|
8327
|
-
|
|
8328
|
-
entity =
|
|
8327
|
+
commonUpsertQuery: function commonUpsertQuery(_ref11) {
|
|
8328
|
+
var _ref11$doc = _ref11.doc,
|
|
8329
|
+
doc = _ref11$doc === void 0 ? {} : _ref11$doc,
|
|
8330
|
+
_ref11$entity = _ref11.entity,
|
|
8331
|
+
entity = _ref11$entity === void 0 ? "" : _ref11$entity;
|
|
8329
8332
|
return [{
|
|
8330
8333
|
db_name: dbName,
|
|
8331
8334
|
entity: entity,
|
|
@@ -19296,8 +19299,14 @@ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
|
|
|
19296
19299
|
var payload,
|
|
19297
19300
|
_ref32,
|
|
19298
19301
|
rejectWithValue,
|
|
19302
|
+
_patientName$split,
|
|
19303
|
+
_patientName$split2,
|
|
19304
|
+
_patientName$split3,
|
|
19299
19305
|
_payload$patientName,
|
|
19300
19306
|
patientName,
|
|
19307
|
+
firstName,
|
|
19308
|
+
secondName,
|
|
19309
|
+
thirdName,
|
|
19301
19310
|
body,
|
|
19302
19311
|
data,
|
|
19303
19312
|
returnData,
|
|
@@ -19311,18 +19320,26 @@ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
|
|
|
19311
19320
|
_ref32 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
|
|
19312
19321
|
_context16.prev = 2;
|
|
19313
19322
|
_payload$patientName = payload.patientName, patientName = _payload$patientName === void 0 ? "" : _payload$patientName;
|
|
19323
|
+
firstName = (_patientName$split = patientName === null || patientName === void 0 ? void 0 : patientName.split(" ", 1)) !== null && _patientName$split !== void 0 ? _patientName$split : "";
|
|
19324
|
+
secondName = (_patientName$split2 = patientName === null || patientName === void 0 ? void 0 : patientName.split(" ", 2)) !== null && _patientName$split2 !== void 0 ? _patientName$split2 : "";
|
|
19325
|
+
thirdName = (_patientName$split3 = patientName === null || patientName === void 0 ? void 0 : patientName.split(" ", 3)) !== null && _patientName$split3 !== void 0 ? _patientName$split3 : "";
|
|
19326
|
+
debugger;
|
|
19314
19327
|
body = {
|
|
19315
19328
|
db_name: dbName,
|
|
19316
19329
|
entity: "Person",
|
|
19317
|
-
filter: queries$b["codablemasterGetPatientname"].query(
|
|
19330
|
+
filter: queries$b["codablemasterGetPatientname"].query({
|
|
19331
|
+
firstName: firstName,
|
|
19332
|
+
secondName: secondName,
|
|
19333
|
+
thirdName: thirdName
|
|
19334
|
+
}),
|
|
19318
19335
|
return_fields: queries$b["codablemasterGetPatientname"].returnFields
|
|
19319
19336
|
};
|
|
19320
|
-
_context16.next =
|
|
19337
|
+
_context16.next = 11;
|
|
19321
19338
|
return fetchData$3({
|
|
19322
19339
|
body: JSON.stringify(body)
|
|
19323
19340
|
}, __readDocumentUrl__);
|
|
19324
19341
|
|
|
19325
|
-
case
|
|
19342
|
+
case 11:
|
|
19326
19343
|
data = _context16.sent;
|
|
19327
19344
|
returnData = [];
|
|
19328
19345
|
|
|
@@ -19334,19 +19351,19 @@ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
|
|
|
19334
19351
|
data: returnData
|
|
19335
19352
|
}));
|
|
19336
19353
|
|
|
19337
|
-
case
|
|
19338
|
-
_context16.prev =
|
|
19354
|
+
case 17:
|
|
19355
|
+
_context16.prev = 17;
|
|
19339
19356
|
_context16.t0 = _context16["catch"](2);
|
|
19340
19357
|
return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19341
19358
|
message: _context16.t0.message
|
|
19342
19359
|
})));
|
|
19343
19360
|
|
|
19344
|
-
case
|
|
19361
|
+
case 20:
|
|
19345
19362
|
case "end":
|
|
19346
19363
|
return _context16.stop();
|
|
19347
19364
|
}
|
|
19348
19365
|
}
|
|
19349
|
-
}, _callee16, null, [[2,
|
|
19366
|
+
}, _callee16, null, [[2, 17]]);
|
|
19350
19367
|
})));
|
|
19351
19368
|
var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatienttypeid", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
|
|
19352
19369
|
var payload,
|