Open JaehyeongCho opened 6 years ago
VSCN = 0인 경우의 오류로 생각됨
--- 51252 select count(*) from nhis_nsc.dbo.visit_occurrence where visit_start_date > visit_end_date
-- 9203 inpat + ED : 12953 select count(*) from 20T where form_cd in ('02', '04', '06', '07', '10', '12') and in_pat_cors_type in ('11', '21', '31') and vscn = 0
-- 9201 inpat + inpat : 38298 select count(*) from 20T where form_cd in ('02', '04', '06', '07', '10', '12') and in_pat_cors_type not in ('11', '21', '31') and vscn = 0
-- 9203 outpat + ED : 1 select count(*) from 20T where form_cd in ('03', '05', '08', '09', '11', '13', '20', '21', 'ZZ') and in_pat_cors_type in ('11', '21', '31') and vscn = 0
12,953 + 38,298 + 1 = 51,252
select * from nhis_nsc.dbo.visit_occurrence where visit_start_date > visit_end_date