primarycare-binder 1.1.13 → 1.1.14

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 CHANGED
@@ -8084,7 +8084,7 @@ var queries$a = {
8084
8084
  Encounter: "Encounter.appointmentId == [".concat(appointmentId, "]"),
8085
8085
  Patient: "Patient.id == Encounter.patient_id"
8086
8086
  },
8087
- "return_fields": "merge(Encounter,{patient_id:(for p in Patient.identifier return merge(Patient,{identifier:document(p),name:document(Patient.name),telecom:document(Patient.telecom),photo:document(Patient.photo),martialStatus:document(Patient.maritalstatus)}))})"
8087
+ return_fields: "merge(Encounter,{statusexpand:document(Encounter.status),patient_id:(for p in Patient.identifier return merge(Patient,{identifier:document(p),name:document(Patient.name),telecom:document(Patient.telecom),photo:document(Patient.photo),martialStatus:document(Patient.maritalstatus)}))})"
8088
8088
  };
8089
8089
  },
8090
8090
  visitmodify: {
@@ -18302,7 +18302,7 @@ var dashboardQuery = {
18302
18302
  entity: "Appointment,Encounter",
18303
18303
  filter: {
18304
18304
  Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(start, " && Appointment.end<=").concat(end),
18305
- Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY =='Checked-in'")
18305
+ Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id AND (lower(DOCUMENT(Encounter.status).display)==lower('Checked-in') or lower(DOCUMENT(Encounter.status).display)==lower('Triage In-Progress'))")
18306
18306
  },
18307
18307
  return_fields: "{Appointment:merge(keep(Appointment,'_id','_key','id','alias','start','appno','appointmentReason','consultationMode','SpecialtyID'),{SpecialtyID:(for c in CodeableConceptMaster filter c.id in Appointment.SpecialtyID return merge(c,{coding:document(c.coding)}))}),Encounter:merge(keep(Encounter,'_id','_key','id','encounter_no','visit_type','status','patient_id','participant','encounterdate','participantHistory','practitioner_details','reasonCode','reasonReference'),{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return merge(pat,{name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age,photo:document(pat.photo)})),status:document(Encounter.status)},{practitioner_details:(for pd in Encounter.practitioner_details return merge(pd,{speciality:(for cdd in CodeableConceptMaster filter cdd._id == pd.speciality return merge(cdd,{coding: document(cdd.coding)}))}))},{participant:(for par in Encounter.participant return merge(par,{Practitioner_id:(for prac in Practitioner filter prac.id == par.Practitioner_id return merge(keep(prac,'_id','_key','id','name','practitioner_role','practitioner_type'),{name:(for hnm in HumanNameMaster filter hnm._id in prac.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_type:(for cod in CodeableConceptMaster filter cod._id ==par.practitioner_type return document(cod.coding) )},{practitioner_role:(for prcrole in PractitionerRole filter prcrole._id in prac.practitioner_role return merge(prcrole,{role:(for cd in CodeableConceptMaster filter cd._id==prcrole.role return merge(cd,{coding: document(cd.coding)}))},{SpecialtyID:(for cdd in CodeableConceptMaster filter cdd._id == prcrole.SpecialtyID return merge(cdd, {coding:document(cdd.coding)}))}))}))},{type:document(par.type)},{PractitionerRole_id:(for prid in PractitionerRole filter prid.id==par.PractitionerRole_id return merge(prid,{role:document(prid.role)}))}))},{reasonReference:document(Encounter.reasonReference)},{participantHistory:(for phy in to_array (Encounter.participantHistory) return merge(phy,{specialty:(for spe in Specialty filter spe._id == phy.specialty return merge(spe,{facilities:document(spe.facilities)}))},{practitionerId:keep(document(phy.practitionerId),'_id','_key','id','name')},{practroleId:document(phy.practroleId)},{participantType:document(phy.participantType)}))})}"
18308
18308
  },
@@ -18311,7 +18311,7 @@ var dashboardQuery = {
18311
18311
  entity: "Appointment,Encounter",
18312
18312
  filter: {
18313
18313
  Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(start, " && Appointment.end<=").concat(end),
18314
- Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY =='Checked-in'")
18314
+ Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id AND (lower(DOCUMENT(Encounter.status).display)==lower('Checked-in') or lower(DOCUMENT(Encounter.status).display)==lower('Triage In-Progress'))")
18315
18315
  },
18316
18316
  return_fields: "{Appointment:merge(keep(Appointment,'_id','_key','id','alias','start','appno','appointmentReason','consultationMode','SpecialtyID'),{SpecialtyID:(for c in CodeableConceptMaster filter c.id in Appointment.SpecialtyID return merge(c,{coding:document(c.coding)}))}),Encounter:merge(keep(Encounter,'_id','_key','id','encounter_no','visit_type','status','patient_id','participant','encounterdate','participantHistory','practitioner_details','reasonCode','reasonReference'),{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return merge(pat,{name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age,photo:document(pat.photo)})),status:document(Encounter.status)},{practitioner_details:(for pd in Encounter.practitioner_details return merge(pd,{speciality:(for cdd in CodeableConceptMaster filter cdd._id == pd.speciality return merge(cdd,{coding: document(cdd.coding)}))}))},{participant:(for par in Encounter.participant return merge(par,{Practitioner_id:(for prac in Practitioner filter prac.id == par.Practitioner_id return merge(keep(prac,'_id','_key','id','name','practitioner_role','practitioner_type'),{name:(for hnm in HumanNameMaster filter hnm._id in prac.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_type:(for cod in CodeableConceptMaster filter cod._id ==par.practitioner_type return document(cod.coding) )},{practitioner_role:(for prcrole in PractitionerRole filter prcrole._id in prac.practitioner_role return merge(prcrole,{role:(for cd in CodeableConceptMaster filter cd._id==prcrole.role return merge(cd,{coding: document(cd.coding)}))},{SpecialtyID:(for cdd in CodeableConceptMaster filter cdd._id == prcrole.SpecialtyID return merge(cdd, {coding:document(cdd.coding)}))}))}))},{type:document(par.type)},{PractitionerRole_id:(for prid in PractitionerRole filter prid.id==par.PractitionerRole_id return merge(prid,{role:document(prid.role)}))}))},{reasonReference:document(Encounter.reasonReference)},{participantHistory:(for phy in to_array (Encounter.participantHistory) return merge(phy,{specialty:(for spe in Specialty filter spe._id == phy.specialty return merge(spe,{facilities:document(spe.facilities)}))},{practitionerId:keep(document(phy.practitionerId),'_id','_key','id','name')},{practroleId:document(phy.practroleId)},{participantType:document(phy.participantType)}))})}"
18317
18317
  }
@@ -18561,7 +18561,7 @@ var highPriorityPatientQuery = {
18561
18561
  1: {
18562
18562
  db_name: "primarycare",
18563
18563
  entity: "Encounter",
18564
- filter: "Encounter.participant[*].Practitioner_id ANY ==".concat(practionerId, " AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " AND lower(DOCUMENT(Encounter.priority).display)=='high'"),
18564
+ filter: "Encounter.participant[*].Practitioner_id ANY ==".concat(practionerId, " AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " AND lower(DOCUMENT(Encounter.priority).display)=='high' AND (lower(DOCUMENT(Encounter.status).display)==lower('Triaged') or lower(DOCUMENT(Encounter.status).display)==lower('In-progress'))"),
18565
18565
  return_fields: "MERGE(Encounter,{patient_id:(FOR pat IN Patient FILTER pat.id==Encounter.patient_id RETURN MERGE(pat,{name:(FOR hn IN TO_ARRAY(pat.name) RETURN DOCUMENT(hn)),photo:(FOR ph IN TO_ARRAY(pat.photo) RETURN DOCUMENT(ph))})),priority:DOCUMENT(Encounter.priority),priorityreason:DOCUMENT(Encounter.priorityreason)},{appointmentId:(for app in Appointment filter app.id in Encounter.appointmentId return app)},{reasonReference:document(Encounter.reasonReference)})"
18566
18566
  },
18567
18567
  2: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primarycare-binder",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",