| | |
| | | leavediagname, |
| | | leaveicd10code, |
| | | orgid, |
| | | visit_type |
| | | visit_type, |
| | | management_doctor, |
| | | management_doctor_code |
| | | from service_subtask |
| | | </sql> |
| | | |
| | |
| | | <if test="sort != null and sort==3">order by long_send_time desc</if> |
| | | <if test="sort != null and sort==5">order by admindate asc</if> |
| | | <if test="sort != null and sort==6">order by admindate desc</if> |
| | | <if test="sort != null and sort==7">order by visit_time asc</if> |
| | | <if test="sort != null and sort==8">order by visit_time desc</if> |
| | | |
| | | <!-- order by update_time desc,id desc --> |
| | | </select> |
| | |
| | | 0 AS pmiCount, |
| | | 0 AS pmoCount |
| | | FROM service_subtask |
| | | WHERE visit_time BETWEEN #{startDate} AND #{endDate} |
| | | AND del_flag = '0' |
| | | WHERE |
| | | del_flag = '0' |
| | | <if test="startDate != null and endDate != null"> |
| | | and date_format(visit_time,'%y%m%d') >= date_format(#{startDate},'%y%m%d') |
| | | and date_format(visit_time,'%y%m%d') <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | |
| | | <if test="orgid != null"> |
| | | AND orgid = #{orgid} |
| | |
| | | </choose> |
| | | 0 AS dischargeFollowCount, |
| | | 0 AS outpatientFollowCount, |
| | | COUNT(DISTINCT patid) AS pmiCount, |
| | | COUNT( patid) AS pmiCount, |
| | | 0 AS pmoCount |
| | | FROM pat_med_inhosp |
| | | WHERE endtime BETWEEN #{startDate} AND #{endDate} |
| | | AND del_flag = '0' |
| | | WHERE del_flag = '0' |
| | | <if test="startDate != null and endDate != null"> |
| | | and date_format(endtime,'%y%m%d') >= date_format(#{startDate},'%y%m%d') |
| | | and date_format(endtime,'%y%m%d') <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | |
| | | AND inhospstate=1 |
| | | <if test="orgid != null"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | |
| | | 0 AS dischargeFollowCount, |
| | | 0 AS outpatientFollowCount, |
| | | 0 AS pmiCount, |
| | | COUNT(DISTINCT patid) AS pmoCount |
| | | COUNT( patid) AS pmoCount |
| | | FROM pat_med_outhosp |
| | | WHERE admitdate BETWEEN #{startDate} AND #{endDate} |
| | | AND del_flag = '0' |
| | | |
| | | WHERE del_flag = '0' |
| | | <if test="startDate != null and endDate != null"> |
| | | and date_format(admitdate,'%y%m%d') >= date_format(#{startDate},'%y%m%d') |
| | | and date_format(admitdate,'%y%m%d') <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | <if test="orgid != null"> |
| | | AND orgid = #{orgid} |
| | | </if> |