cfdf153fb60d6b9c57e78e050865be14ea6e4ad2.svn-base 715 B

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