Skip to content

Commit

Permalink
added sms outcome column
Browse files Browse the repository at this point in the history
  • Loading branch information
Angie-540 committed Jan 18, 2024
1 parent 342a720 commit 9d5fa3c
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@
"type": "LEFT",
"joinCondition": "ml.person_id = etc.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": "utd",
"join": {
"type": "LEFT",
"joinCondition": "ml.person_id = utd.person_id"
}
}
],
"columns": [
Expand Down Expand Up @@ -157,6 +165,11 @@
"alias": "was_client_found",
"column": "pre.was_client_found"
},
{
"type": "simple_column",
"alias": "comments",
"column": "utd.comments"
},
{
"type": "simple_column",
"alias": "reason_client_not_found",
Expand Down

0 comments on commit 9d5fa3c

Please sign in to comment.