|
|
@ -110,6 +110,7 @@ |
|
|
|
) t |
|
|
|
) |
|
|
|
</if> |
|
|
|
order by tpi.update_at desc |
|
|
|
</select> |
|
|
|
<select id="selPatientInformationList" resultType="com.ccsens.tcm.bean.vo.PatientVo$SelPatient"> |
|
|
|
SELECT |
|
|
@ -138,25 +139,17 @@ |
|
|
|
and tpi.input_status= #{inputStatus} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
order by tpi.update_at desc |
|
|
|
</select> |
|
|
|
<select id="countCase" resultType="com.ccsens.tcm.bean.vo.StatisticVo$Shuliang"> |
|
|
|
select DATE_FORMAT(tpi.update_at,'%Y-%d-%m') as shijian,count(*) as nums from t_patient_information tpi |
|
|
|
select DATE_FORMAT(tpi.update_at,'%Y-%m-%d') as shijian,count(*) as nums from t_patient_information tpi |
|
|
|
where tpi.rec_status=0 |
|
|
|
<if test="param.userId!=null and param.userId!=0 "> |
|
|
|
and tpi.user_id=#{param.userId} |
|
|
|
</if> |
|
|
|
<if test="param.hospitalId!=null and param.hospitalId!=0 "> |
|
|
|
and tpi.hospital_id=#{param.hospitalId} |
|
|
|
</if> |
|
|
|
<if test="inputStatus!=null and inputStatus!=0 "> |
|
|
|
and tpi.input_status=#{inputStatus} |
|
|
|
</if> |
|
|
|
<if test="param.startDate!=null"> |
|
|
|
and tpi.update_at > #{param.startDate} |
|
|
|
</if> |
|
|
|
<if test="param.endDate!=null"> |
|
|
|
and tpi.update_at < #{param.endDate} |
|
|
|
</if> |
|
|
|
GROUP BY shijian |
|
|
|
</select> |
|
|
|
<select id="countAnalysis" resultType="com.ccsens.tcm.bean.vo.StatisticVo$SelGroupList"> |
|
|
@ -272,9 +265,6 @@ |
|
|
|
<if test="hospitalId != null and hospitalId != 0"> |
|
|
|
and hospital_id = #{hospitalId} |
|
|
|
</if> |
|
|
|
<if test="userId != null and userId != 0"> |
|
|
|
and user_id = #{userId} |
|
|
|
</if> |
|
|
|
GROUP BY |
|
|
|
input_status |
|
|
|
) t |
|
|
@ -434,4 +424,23 @@ |
|
|
|
where tpr.rec_status=0 |
|
|
|
and tpr.test_questions_id=#{testQuestionsId} |
|
|
|
</select> |
|
|
|
<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 |
|
|
|
tbs.sample_type AS sampleType, |
|
|
|
count( * ) AS nums |
|
|
|
FROM |
|
|
|
t_biological_samples tbs |
|
|
|
, t_patient_information tpi where |
|
|
|
tpi.rec_status = 0 |
|
|
|
AND tbs.patient_information_id = tpi.id |
|
|
|
and tbs.rec_status=0 |
|
|
|
and tpi.hospital_id=#{id} |
|
|
|
GROUP BY tbs.sample_type) t |
|
|
|
</select> |
|
|
|
</mapper> |