You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an appointment date or time is changed after it is created, an additional row is created in the patient_tracker table, having the same eid (calendar event ID) as the original row.
If subsequently, the appointment is confirmed via e-mail or SMS, MedEx will update the appointment status by adding rows and updating the seq number in patient_tracker_element.
However, due to the queries in this block of code, MedEx will only add patient_tracker_element rows associated with the first patient_tracker record returned, which is likely to be the old, incorrect appointment.
If, after that occurs, the appointment status is manually updated, it can happen that the maximum lastseq numbers from both patient_tracker records align, resulting in duplicate entries on the Flow Board.
If an appointment date or time is changed after it is created, an additional row is created in the
patient_tracker
table, having the sameeid
(calendar event ID) as the original row.If subsequently, the appointment is confirmed via e-mail or SMS, MedEx will update the appointment status by adding rows and updating the
seq
number inpatient_tracker_element
.However, due to the queries in this block of code, MedEx will only add
patient_tracker_element
rows associated with the firstpatient_tracker
record returned, which is likely to be the old, incorrect appointment.If, after that occurs, the appointment status is manually updated, it can happen that the maximum
lastseq
numbers from bothpatient_tracker
records align, resulting in duplicate entries on the Flow Board.I suggest to modify this SELECT query as so:
SELECT * FROM patient_tracker WHERE eid=? AND (eid, date) IN (SELECT eid, MAX(date) FROM patient_tracker group by eid)
...to only reference the updated appointment and mitigate the problem.
The text was updated successfully, but these errors were encountered: