Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ public void execute() {
List<PatientAppointment> dueAppointments = service.getAllAppointments(); // Only those due in 3 days

for (PatientAppointment pa : dueAppointments) {
if (!published(pa.getPatientAppointmentId(), url,username,password)) {
Util.postAppointmentApi(url, username,password,Util.convertObjectToJson(pa), "POST");
if(!"".equals(pa.getPhone())) { //Publish only appointments that have phone number
if (!published(pa.getPatientAppointmentId(), url, username, password)) {
Util.postAppointmentApi(url, username, password, Util.convertObjectToJson(pa), "POST");
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public List<PatientAppointment> getAllAppointments() {
"left join location l1 on l.parent_location = l1.location_id " +
"left join person c on a.patient_id = c.person_id " +
"left join person_attribute pa1 on a.patient_id = pa1.person_id and pa1.person_attribute_type_id = 15 " +
"left join person_attribute pa2 on a.patient_id = pa2.person_id and pa2.person_attribute_type_id = 27 " +
"left join person_attribute pa2 on a.patient_id = pa2.person_id and pa2.person_attribute_type_id = 26 " +
"where pit.patient_identifier_type_id = 3 " +
"and DATEDIFF(start_date_time, now()) = 3 group by a.patient_id;");

Expand Down Expand Up @@ -128,7 +128,7 @@ public List<PatientAppointment> getMissedAppointments() {
"left join location l1 on l.parent_location = l1.location_id " +
"left join person c on a.patient_id = c.person_id " +
"left join person_attribute pa1 on a.patient_id = pa1.person_id and pa1.person_attribute_type_id = 15 " +
"left join person_attribute pa2 on a.patient_id = pa2.person_id and pa2.person_attribute_type_id = 27 " +
"left join person_attribute pa2 on a.patient_id = pa2.person_id and pa2.person_attribute_type_id = 26 " +
"where pit.patient_identifier_type_id = 3 " +
"and DATEDIFF(start_date_time, now()) = 6 " +
"and a.status = 'Missed' group by a.patient_id;");
Expand Down