| | |
| | | <result property="tagname" column="tagname"/> |
| | | <result property="visitTime" column="visit_time"/> |
| | | <result property="leavediagname" column="leavediagname"/> |
| | | <result property="outPath" column="out_path"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceSubtaskCount" id="ServiceSubtaskResult2"> |
| | |
| | | <sql id="selectServiceSubtaskVo"> |
| | | select id, |
| | | hosp_type, |
| | | out_path, |
| | | suggest, |
| | | sendstate, |
| | | endtime, |
| | |
| | | inhospid, |
| | | drname, |
| | | excep, |
| | | tagname, |
| | | drcode, |
| | | long_send_time, |
| | | openid, |
| | |
| | | del_flag=0 |
| | | <if test="sendname != null and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if> |
| | | <if test="phone != null and phone != ''">and phone = #{phone}</if> |
| | | <if test="outPath != null and outPath != ''">and out_path = #{outPath}</if> |
| | | <if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''">and |
| | | leavehospitaldistrictcode = #{leavehospitaldistrictcode} |
| | | </if> |
| | |
| | | <if test="sex != null and sex != ''">and sex = #{sex}</if> |
| | | <if test="age != null ">and age = #{age}</if> |
| | | <if test="patguid != null ">and patguid = #{patguid}</if> |
| | | <if test="subId != null ">and id = #{subId}</if> |
| | | <if test="subid != null ">and id = #{subid}</if> |
| | | <if test="inhospid != null ">and inhospid = #{inhospid}</if> |
| | | <if test="submit != null ">and submit = #{submit}</if> |
| | | <if test="upid != null ">and upid = #{upid}</if> |
| | |
| | | <if test="endtime != null ">and endtime = #{endtime}</if> |
| | | <if test="excep != null ">and excep = #{excep}</if> |
| | | <if test="nurseName != null ">and nurse_name = #{nurseName}</if> |
| | | <if test="score != null">and score = #{score}</if> |
| | | <if test="scoreStart != null">and score >= #{scoreStart}</if> |
| | | <if test="scoreEnd != null">and score <= #{scoreEnd}</if> |
| | | <!-- <if test="visitCount != null">and visit_count = #{visitCount}</if>--> |
| | | <if test="visitCount != null and visitCount == 1"> |
| | | AND visit_count = 1 |
| | |
| | | <if test="taskGuid != null">and task_guid = #{taskGuid}</if> |
| | | <if test="isVisitAgain != null">and is_visit_again = #{isVisitAgain}</if> |
| | | <if test="visitTime != null">and visit_time = #{visitTime}</if> |
| | | <!--<if test="visitDeptCode != null">and visit_dept_code = #{visitDeptCode}</if> |
| | | <if test="visitDeptName != null">and visit_dept_name = #{visitDeptName}</if>--> |
| | | <if test="visitCount != null and visitCount > 1 and visitDeptCodes != null and visitDeptCodes.size() > 0"> |
| | | AND visit_dept_code IN |
| | | <foreach collection="visitDeptCodes" item="visitDeptCodes" open="(" |
| | |
| | | <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> |
| | | |
| | | <!-- order by update_time desc,id desc --> |
| | | <if test="pageNum != null and pageSize != null">limit #{pageNum},#{pageSize}</if> |
| | | </select> |
| | | |
| | | |
| | |
| | | <if test="inhospid != null ">inhospid,</if> |
| | | <if test="visitTime != null ">visit_time,</if> |
| | | <if test="leavediagname != null ">leavediagname,</if> |
| | | <if test="outPath != null">out_path,</if> |
| | | |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="sendname != null">#{sendname},</if> |
| | |
| | | <if test="inhospid != null ">#{inhospid},</if> |
| | | <if test="visitTime != null ">#{visitTime},</if> |
| | | <if test="leavediagname != null ">#{leavediagname},</if> |
| | | <if test="outPath != null">#{outPath},</if> |
| | | |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="inhospid != null ">inhospid=#{inhospid},</if> |
| | | <if test="visitTime != null ">visit_time=#{visitTime},</if> |
| | | <if test="leavediagname != null ">leavediagname=#{leavediagname},</if> |
| | | <if test="outPath != null">out_path = #{outPath},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <if test="inhospid != null ">inhospid=#{inhospid},</if> |
| | | <if test="visitTime != null ">visitTime=#{visitTime},</if> |
| | | <if test="delFlag != null ">del_flag=#{delFlag},</if> |
| | | <if test="outPath != null ">out_path = #{outPath},</if> |
| | | </trim> |
| | | <where> |
| | | <if test="patid != null ">patid=#{patid}</if> |
| | | <if test="taskid != null ">and taskid=#{taskid}</if> |
| | | <if test="leavediagname != null ">and leavediagname=#{leavediagname}</if> |
| | | <if test="outPath != null and outPath != ''">and out_path = #{outPath}</if> |
| | | </where> |
| | | </update> |
| | | |
| | |
| | | <if test="inhospid != null ">inhospid=#{inhospid},</if> |
| | | <if test="visitTime != null ">visit_time=#{visitTime},</if> |
| | | <if test="leavediagname != null ">leavediagname=#{leavediagname},</if> |
| | | <if test="outPath != null">out_path = #{outPath},</if> |
| | | </trim> |
| | | where patid = #{patid} and taskid = #{taskid} |
| | | </update> |
| | |
| | | remark, |
| | | visit_time, |
| | | leavediagname, |
| | | out_path, |
| | | diagname |
| | | FROM service_subtask, |
| | | JSON_TABLE(send_time_slot, '$[*]' COLUMNS ( |
| | |
| | | WHERE |
| | | del_flag = '0' |
| | | <if test="startDate != null and endDate != null"> |
| | | AND visit_time >= #{startDate} |
| | | AND visit_time <= #{endDate} |
| | | AND visit_time >= #{startDate} |
| | | AND visit_time <= #{endDate} |
| | | </if> |
| | | |
| | | <if test="orgid != null"> |
| | |
| | | FROM pat_med_inhosp |
| | | WHERE del_flag = '0' |
| | | <if test="startDate != null and endDate != null"> |
| | | AND endtime >= #{startDate} |
| | | AND endtime <= #{endDate} |
| | | AND endtime >= #{startDate} |
| | | AND endtime <= #{endDate} |
| | | </if> |
| | | |
| | | AND inhospstate=1 |
| | |
| | | GROUP BY timePeriod |
| | | ORDER BY timePeriod DESC |
| | | </select> |
| | | |
| | | |
| | | </mapper> |