美文网首页
2019-08-14: 重症肺炎患儿加入标签表

2019-08-14: 重症肺炎患儿加入标签表

作者: AI_Finance | 来源:发表于2019-08-14 21:02 被阅读0次

insert ETL_0730_ZY_WXS.`cap_statistics_qc_common`(
    uuid,
  patient_guid,
  patient_name,
  patient_gender,
  patient_age,
  patient_age_type,
  
    inpatient_department,   
    doctor_name,
    admission_time,
    discharge_time,
    project_id,
    project_name,
    project_status
)
-- 获取满足重症肺炎患儿的信息        
select detail.uuid, detail.patient_guid, detail.patient_name, detail.patient_gender, detail.patient_age, detail.patient_age_type,
       detail.inpatient_department, detail.doctor_name, detail.admission_date, detail.discharge_date, NULL, 
             "重症肺炎患儿" as project_name, 1 as project_status 
from yd_patient_11_basic_info as detail
join 
(
select uuid from mid_patient_info_t 
where (first_diagnosis_list like "%社区获得性肺炎,重症%" or first_diagnosis_list like "%重症肺炎%") and patient_age<18
union
(
select distinct CONCAT(customer_id, "-", record_id) as uuid
                    from pt_patient_assess 
                    where assess_name like "%cap严重程度评估%" and assess_value='重度'
)
) as part1
on detail.uuid=part1.uuid

相关文章

网友评论

      本文标题:2019-08-14: 重症肺炎患儿加入标签表

      本文链接:https://www.haomeiwen.com/subject/texojctx.html