WHEN archive_other_ext_submitTime.str2 IS NOT NULL
AND archive_other_ext_submitTime.str2 >= (select top 1 convert(varchar(19),eTime,120) eTime from archive_other_ext where sysFlag = 1 and jzh = temp.jzh order by eTime desc) THEN
- 1
ELSE
statusFlag
END
ELSE
CASE
WHEN archive_other_ext_submitTime.str2 IS NOT NULL
AND archive_other_ext_submitTime.str2 >= etimeStr THEN
- 1
ELSE
statusFlag
END
END
statusFlagSort
from (
select
archive_other_ext.ID idTemp,
SycTime,
@ -445,7 +465,8 @@
statusFlag,
pResult,
C1,
DID
DID,
jzh
from archive_other_ext
<where>
C1 != '一般病程记录' and sysFlag != 5
@ -463,7 +484,8 @@
statusFlag,
pResult,
'手麻系统病历' as C1,
DID
DID,
jzh
from archive_other_ext
<where>
and sysFlag = 5 /*and (C1 = '术前访视' or C1 = '术后访视' or C1 = '麻醉记录' or C1 = '麻醉小结')*/
@ -481,7 +503,8 @@
statusFlag,
pResult,
C1,
DID
DID,
jzh
from archive_other_ext
<where>
C1 = '一般病程记录'
@ -498,7 +521,7 @@
and zd_assort.assort_id = #{assortId,jdbcType=NVARCHAR}