12345678910111213141516171819 |
- #时间.绝对时间
- date.absoluteTime=
- #医院
- orgCode.oneOrg = and orgCode = $$
- #多家医院
- orgCode.manyOrg = and orgCode in ($$)
- #诊断
- diag.icd10 =
- select t1.pat_diag_id,t1.patient_id,t3.birth_date,t3.sex_code,sycode,t2.diag_code2,t2.diag_name,t1.diag_time
- into test.M11_20180424_temp
- from (select pat_diag_id,patient_id,diag_time,jsonb_array_elements(diag_sycode_set)
- as sycode from diag.patient_diagnose)t1
- join (select diag_code,diag_code2,diag_name from mdm.diagnose a
- where a.code_sys_id=30 and diag_code2 like 'E11%' and strpos(diag_code2, '+')=0 order by diag_code2)t2
- on replace(t1.sycode::varchar(50),'"','') =t2.diag_code
- join patient.patient_master_info t3 on t1.patient_id=t3.patient_id
|