Skip to content

Commit

Permalink
fixing a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Mumo Ngungu committed Nov 15, 2023
1 parent 53e6373 commit 48c5389
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Scripts/NDWH/C&T FACT TABLES/load_FactNCDs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ select
ncd_source_data."Thyroid disease",
case when latest_diabetes_test.PatientPKHash is not null then 1 else 0 end as ScreenedDiabetes,
case when latest_diabetes_test_controlled.PatientPKHash is not null then 1 else 0 end as IsDiabetesControlledAtLastTest,
case when visit.ScreenedBPLastVisit is not null then 1 else 0 end as ScreenedBPLastVisit,
case when visit.IsBPControlledAtLastVisit is not null then 1 else 0 end as IsBPControlledAtLastVisit
coalesce(visit.ScreenedBPLastVisit,0) as ScreenedBPLastVisit,
coalesce(visit.IsBPControlledAtLastVisit, 0) as IsBPControlledAtLastVisit
into NDWH.dbo.FactNCD
from ncd_source_data
left join latest_diabetes_test on latest_diabetes_test.PatientPKHash = ncd_source_data.PatientPKHash
Expand Down

0 comments on commit 48c5389

Please sign in to comment.