Skip to content

PROMs CSN Join Change

Hubbell, Harrison Taylor requested to merge hh_proms_csn_enhance into master

Reviewers Requested

This is an open call for reviewers. Please provide any feedback by 2/21/2020.

Details

According the following query, it is not possible to have a questionnaire submission (AnswerID) without an associated contact (PatientEncounterID). Therefore, we can change the join type to QuestionnaireFormAnswer from left to inner

select *
from Epic.Patient.QuestionnaireSubmission_Enterprise qs
    left join Epic.Clinical.QuestionnaireFormAnswer_Enterprise qfa on qs.AnswerID = qfa.AnswerID
where qfa.PatientEncounterID is null

Merge request reports