Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC-613:restricted reschedule reminder within biweekly period #1356

Merged
merged 6 commits into from
Jan 19, 2024
Merged
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
12 changes: 10 additions & 2 deletions app/reporting-framework/json-reports/clinical-reminder-report.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
"joinCondition": "mwl.person_id = pre_s.person_id "
}
},
{
"table": "(SELECT ps.* FROM etl.pre_appointment_summary ps JOIN ( SELECT MAX(encounter_datetime) AS max_encounter_datetime, person_id FROM etl.pre_appointment_summary GROUP BY person_id ) latest_dates ON ps.encounter_datetime = latest_dates.max_encounter_datetime AND ps.person_id = latest_dates.person_id)",
"alias": "pre_u",
"join": {
"type": "LEFT",
"joinCondition": "pre_s.person_id = pre_u.person_id"
}
},
{
"table": "amrs.relationship",
"alias": "t6",
Expand Down Expand Up @@ -346,12 +354,12 @@
{
"type": "simple_column",
"alias": "reschedule_appointment",
"column": "pre_s.reschedule_appointment"
"column": "pre_u.reschedule_appointment"
},
{
"type": "simple_column",
"alias": "rescheduled_date",
"column": "pre_s.rescheduled_date"
"column": "pre_u.rescheduled_date"
},
{
"type": "simple_column",
Expand Down
1 change: 1 addition & 0 deletions service/patient-reminder.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@ function generateAppointmentNoShowUpRiskReminder(data) {

function generateAppointmentRescheduledReminder(data) {
let reminders = [];

if (data.reschedule_appointment && data.reschedule_appointment === 'YES') {
if (data.last_encounter_date < data.prediction_generated_date) {
reminders.push({
Expand Down
Loading