Compare commits
3 Commits
HEAD
...
f4aa45be89
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4aa45be89 | ||
|
|
80a32e23bf | ||
|
|
2be66eff5d |
@@ -178,6 +178,8 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
inpatientAdviceParam.setEncounterIds(null);
|
inpatientAdviceParam.setEncounterIds(null);
|
||||||
Integer exeStatus = inpatientAdviceParam.getExeStatus();
|
Integer exeStatus = inpatientAdviceParam.getExeStatus();
|
||||||
inpatientAdviceParam.setExeStatus(null);
|
inpatientAdviceParam.setExeStatus(null);
|
||||||
|
// requestStatus由前端tab控制,后端SQL已通过CASE条件处理校对状态过滤,无需再作为SQL条件
|
||||||
|
inpatientAdviceParam.setRequestStatus(null);
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
QueryWrapper<InpatientAdviceParam> queryWrapper
|
QueryWrapper<InpatientAdviceParam> queryWrapper
|
||||||
= HisQueryUtils.buildQueryWrapper(inpatientAdviceParam, null, null, null);
|
= HisQueryUtils.buildQueryWrapper(inpatientAdviceParam, null, null, null);
|
||||||
|
|||||||
@@ -13,15 +13,14 @@
|
|||||||
drf.requester_id,
|
drf.requester_id,
|
||||||
drf.create_time,
|
drf.create_time,
|
||||||
ap.NAME AS patient_name,
|
ap.NAME AS patient_name,
|
||||||
CASE MIN(wsr.status_enum)
|
CASE
|
||||||
WHEN 1 THEN 0
|
WHEN MIN(wsr.status_enum) = 1 THEN 0
|
||||||
WHEN 2 THEN 1
|
WHEN MIN(wsr.status_enum) = 2 THEN 1
|
||||||
WHEN 3 THEN 4
|
WHEN MIN(wsr.status_enum) = 3 AND MAX(CASE WHEN wsr.performer_check_id IS NOT NULL THEN 1 ELSE 0 END) = 1 THEN 2
|
||||||
WHEN 4 THEN 4
|
WHEN MIN(wsr.status_enum) = 3 THEN 4
|
||||||
WHEN 5 THEN 5
|
WHEN MIN(wsr.status_enum) = 4 THEN 3
|
||||||
WHEN 6 THEN 5
|
WHEN MIN(wsr.status_enum) = 5 OR MIN(wsr.status_enum) = 6 OR MIN(wsr.status_enum) = 7 THEN 7
|
||||||
WHEN 7 THEN 5
|
WHEN MIN(wsr.status_enum) = 8 THEN 6
|
||||||
WHEN 8 THEN 6
|
|
||||||
ELSE NULL
|
ELSE NULL
|
||||||
END AS status
|
END AS status
|
||||||
FROM doc_request_form AS drf
|
FROM doc_request_form AS drf
|
||||||
@@ -41,15 +40,14 @@
|
|||||||
AND drf.create_time <= (#{endDate}::date + INTERVAL '1 day' - INTERVAL '1 second')
|
AND drf.create_time <= (#{endDate}::date + INTERVAL '1 day' - INTERVAL '1 second')
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
AND CASE MIN(wsr.status_enum)
|
AND CASE
|
||||||
WHEN 1 THEN 0
|
WHEN MIN(wsr.status_enum) = 1 THEN 0
|
||||||
WHEN 2 THEN 1
|
WHEN MIN(wsr.status_enum) = 2 THEN 1
|
||||||
WHEN 3 THEN 4
|
WHEN MIN(wsr.status_enum) = 3 AND MAX(CASE WHEN wsr.performer_check_id IS NOT NULL THEN 1 ELSE 0 END) = 1 THEN 2
|
||||||
WHEN 4 THEN 4
|
WHEN MIN(wsr.status_enum) = 3 THEN 4
|
||||||
WHEN 5 THEN 5
|
WHEN MIN(wsr.status_enum) = 4 THEN 3
|
||||||
WHEN 6 THEN 5
|
WHEN MIN(wsr.status_enum) = 5 OR MIN(wsr.status_enum) = 6 OR MIN(wsr.status_enum) = 7 THEN 7
|
||||||
WHEN 7 THEN 5
|
WHEN MIN(wsr.status_enum) = 8 THEN 6
|
||||||
WHEN 8 THEN 6
|
|
||||||
ELSE NULL
|
ELSE NULL
|
||||||
END = #{status}::integer
|
END = #{status}::integer
|
||||||
</if>
|
</if>
|
||||||
@@ -164,7 +162,7 @@
|
|||||||
AND drf.prescription_no LIKE CONCAT('%', #{requestFormDto.surgeryNo}, '%')
|
AND drf.prescription_no LIKE CONCAT('%', #{requestFormDto.surgeryNo}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="requestFormDto.typeCode != null and requestFormDto.typeCode != ''">
|
<if test="requestFormDto.typeCode != null and requestFormDto.typeCode != ''">
|
||||||
AND drf.type_code = #{requestFormDto.typeCode}
|
AND drf.type_code IN (#{requestFormDto.typeCode}, 'SURGERY')
|
||||||
</if>
|
</if>
|
||||||
<if test="requestFormDto.applyTimeStart != null">
|
<if test="requestFormDto.applyTimeStart != null">
|
||||||
AND drf.create_time >= #{requestFormDto.applyTimeStart}
|
AND drf.create_time >= #{requestFormDto.applyTimeStart}
|
||||||
|
|||||||
@@ -49,6 +49,11 @@ public enum RequestStatus implements HisEnumInterface {
|
|||||||
*/
|
*/
|
||||||
ENDED(7, "ended", "不执行"),
|
ENDED(7, "ended", "不执行"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已出报告
|
||||||
|
*/
|
||||||
|
COMPLETED_REPORT(8, "completed_report", "已出报告"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 未知
|
* 未知
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user