美文网首页
2019-08-13:质控项目的指标计算

2019-08-13:质控项目的指标计算

作者: AI_Finance | 来源:发表于2019-08-13 22:51 被阅读0次
    select concat(t.customer_id, "-", t.record_id), t.* from
    (
    select qpi.customer_id, qpi.record_id, qpi.patient_guid, qpi.rule_id, qpi.item_id, qpi.item, qpi.disease_id, qpi.inpatient_department,
                 qpi.doctor_name, max(qpi.result)
    from qc_patient_item as qpi
    join yd_patient_11_basic_info as detail
    on concat(qpi.customer_id, "-", qpi.record_id)=detail.uuid
    where qpi.item="ESR检测"
    GROUP BY qpi.record_id
    having max(qpi.result)>0
    ) as t
    where t.record_id not in (
                select distinct qpi.record_id
                from qc_patient_item as qpi
                join yd_patient_11_basic_info as detail
                on concat(qpi.customer_id, "-", qpi.record_id)=detail.uuid
                where qpi.item="ESR检测" and qpi.result=0
    )
    

    相关文章

      网友评论

          本文标题:2019-08-13:质控项目的指标计算

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