Skip to content

Commit

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

* 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
2 people authored and sainingo committed Dec 14, 2023
1 parent d1f0154 commit 97776d1
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 97776d1

Please sign in to comment.