|
@ -141,7 +141,6 @@ |
|
|
) t |
|
|
) t |
|
|
) |
|
|
) |
|
|
</if> |
|
|
</if> |
|
|
order by tpi.update_at desc |
|
|
|
|
|
</select> |
|
|
</select> |
|
|
<select id="selPatientInformationList" resultType="com.ccsens.tcm.bean.vo.PatientVo$SelPatient"> |
|
|
<select id="selPatientInformationList" resultType="com.ccsens.tcm.bean.vo.PatientVo$SelPatient"> |
|
|
SELECT |
|
|
SELECT |
|
@ -487,22 +486,24 @@ |
|
|
and tpr.test_questions_id=#{testQuestionsId} |
|
|
and tpr.test_questions_id=#{testQuestionsId} |
|
|
</select> |
|
|
</select> |
|
|
<select id="selByHosAllYBS" resultType="com.ccsens.tcm.bean.vo.BiologicalSamplesVo$selByHosAllYBS" parameterType="java.lang.Long"> |
|
|
<select id="selByHosAllYBS" resultType="com.ccsens.tcm.bean.vo.BiologicalSamplesVo$selByHosAllYBS" parameterType="java.lang.Long"> |
|
|
select |
|
|
|
|
|
MAX(CASE t.sampleType WHEN 0 THEN nums ELSE 0 END ) kxn, |
|
|
|
|
|
MAX(CASE t.sampleType WHEN 1 THEN nums ELSE 0 END ) cxn, |
|
|
|
|
|
MAX(CASE t.sampleType WHEN 2 THEN nums ELSE 0 END ) cn, |
|
|
|
|
|
MAX(CASE t.sampleType WHEN 3 THEN nums ELSE 0 END ) xsn |
|
|
|
|
|
from( |
|
|
|
|
|
SELECT |
|
|
SELECT |
|
|
tbs.sample_type AS sampleType, |
|
|
tbs.sample_type AS sampleType, |
|
|
|
|
|
(CASE tbs.sample_type |
|
|
|
|
|
WHEN 0 THEN |
|
|
|
|
|
'抗血凝10ml' |
|
|
|
|
|
WHEN 1 THEN '促凝血5ml' |
|
|
|
|
|
WHEN 2 THEN '晨尿10ml' |
|
|
|
|
|
WHEN 3 THEN '24小时尿10ml' |
|
|
|
|
|
end) name, |
|
|
count( * ) AS nums |
|
|
count( * ) AS nums |
|
|
FROM |
|
|
FROM |
|
|
t_biological_samples tbs |
|
|
t_biological_samples tbs |
|
|
, t_patient_information tpi where |
|
|
, t_patient_information tpi where tpi.rec_status = 0 |
|
|
tpi.rec_status = 0 |
|
|
|
|
|
AND tbs.patient_information_id = tpi.id |
|
|
AND tbs.patient_information_id = tpi.id |
|
|
and tbs.rec_status=0 |
|
|
AND tpi.hospital_id =#{id} |
|
|
and tpi.hospital_id=#{id} |
|
|
and |
|
|
GROUP BY tbs.sample_type) t |
|
|
tbs.rec_status = 0 |
|
|
|
|
|
GROUP BY |
|
|
|
|
|
tbs.sample_type |
|
|
</select> |
|
|
</select> |
|
|
</mapper> |
|
|
</mapper> |