Skip to content

Commit

Permalink
POC-570: remove reminder after patient has made clinical visit (#1350)
Browse files Browse the repository at this point in the history
* remove reminder after patient has made clinical visit

* POC-570: worked on query to select clinical encounters only

---------

Co-authored-by: Drizzentic <[email protected]>
  • Loading branch information
Angie-540 and drizzentic authored Nov 29, 2023
1 parent e035541 commit 73089a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
{
"type": "simple_column",
"alias": "last_encounter_date",
"column": "ls.encounter_datetime"
"column": "t1.encounter_datetime"
},
{
"type": "simple_column",
Expand Down
5 changes: 4 additions & 1 deletion service/patient-reminder.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,10 @@ function getFPExpiryDate(data) {
function generateAppointmentNoShowUpRiskReminder(data) {
let reminders = [];
const predicted_score = (data.predicted_prob_disengage * 100).toFixed(2);
if (data.predicted_risk) {
if (
data.predicted_risk &&
data.last_encounter_date < data.prediction_generated_date
) {
if (data.predicted_risk === 'Medium Risk') {
reminders.push({
message:
Expand Down

0 comments on commit 73089a6

Please sign in to comment.