Death Data Discrepancy
Summary
We received an inquiry today that the PatientDemographic
view's DeceasedFLG
is not matching Integration
's, which is slightly troubling due to Integration
being a data source for this information for that view. Upon further inspection, it was found that we rely only on DeathDTS
from Integation
, and not DeathFLG
. This was an oversight. According to Atlas, the death date column may not be set if it occurred in the last 3 years.
Due to regulatory requirements, EDW no longer receives dates of death added to Social Security Administration Master File after Feb 1, 2014. Dates of death from SS will not be available for 3 years. Dates of death received from this source were removed. New flag added to indicate deceased individuals, including after Feb 1, 2014. Flag contains values ‘Y’, ‘N’ and null. There may be flags with Y values and no dates of death.
Steps to reproduce
select count(*)
from UserWork.EAViewLibrary.PatientDemographic pd
inner join Integration.MasterReference.Patient p on pd.EDWPatientID = p.EDWPatientID
and pd.DeceasedFLG <> p.DeathFLG
What is the current bug behavior?
DeceasedFLG
is not set appropriated based on the data.
What is the expected behavior?
DeceasedFLG
matches DeathFLG
in most cases, except where Epic
is more up-to-date.
Possible fixes
The following update to the case
statement should be appropriate:
case
when mrp.DeathFLG = 'Y' then 'Y'
when mrp.DeathDTS is null
and ptn.DeathDTS is null
then 'N'
else 'Y'
end as DeceasedFLG