|
|
|
|
@ -44,7 +44,7 @@
|
|
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from archive_other_ext
|
|
|
|
|
from archive_other_ext with(nolock)
|
|
|
|
|
where ID = #{id,jdbcType=BIGINT}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
|
|
|
|
@ -467,7 +467,7 @@
|
|
|
|
|
C1,
|
|
|
|
|
DID,
|
|
|
|
|
jzh
|
|
|
|
|
from archive_other_ext
|
|
|
|
|
from archive_other_ext with(nolock)
|
|
|
|
|
<where>
|
|
|
|
|
C1 != '一般病程记录' and sysFlag != 5
|
|
|
|
|
<include refid="selectWhereSql"></include>
|
|
|
|
|
@ -486,7 +486,7 @@
|
|
|
|
|
'手麻系统病历' as C1,
|
|
|
|
|
DID,
|
|
|
|
|
jzh
|
|
|
|
|
from archive_other_ext
|
|
|
|
|
from archive_other_ext with(nolock)
|
|
|
|
|
<where>
|
|
|
|
|
and sysFlag = 5 /*and (C1 = '术前访视' or C1 = '术后访视' or C1 = '麻醉记录' or C1 = '麻醉小结')*/
|
|
|
|
|
<include refid="selectWhereSql"></include>
|
|
|
|
|
@ -505,7 +505,7 @@
|
|
|
|
|
C1,
|
|
|
|
|
DID,
|
|
|
|
|
jzh
|
|
|
|
|
from archive_other_ext
|
|
|
|
|
from archive_other_ext with(nolock)
|
|
|
|
|
<where>
|
|
|
|
|
C1 = '一般病程记录'
|
|
|
|
|
<include refid="selectWhereSql"></include>
|
|
|
|
|
@ -526,7 +526,7 @@
|
|
|
|
|
<select id="selectAllByIds" resultMap="BaseResultMap">
|
|
|
|
|
select *,
|
|
|
|
|
CONVERT(varchar(19),eTime,120) etimeStr
|
|
|
|
|
from archive_other_ext where id in (${ids})
|
|
|
|
|
from archive_other_ext with(nolock) where id in (${ids})
|
|
|
|
|
</select>
|
|
|
|
|
<!--批量更新statusFlag = 0-->
|
|
|
|
|
<update id="updateSubmit">
|
|
|
|
|
@ -549,9 +549,9 @@
|
|
|
|
|
sysFlag = 1 THEN
|
|
|
|
|
(
|
|
|
|
|
SELECT
|
|
|
|
|
MAX( eTime ) eTime
|
|
|
|
|
MIN( eTime ) eTime
|
|
|
|
|
FROM
|
|
|
|
|
archive_other_ext
|
|
|
|
|
archive_other_ext with(nolock)
|
|
|
|
|
WHERE
|
|
|
|
|
sysFlag = 1
|
|
|
|
|
AND jzh = #{patientId}
|
|
|
|
|
@ -562,7 +562,7 @@
|
|
|
|
|
END eTime,
|
|
|
|
|
ID,sysFlag
|
|
|
|
|
FROM
|
|
|
|
|
archive_other_ext
|
|
|
|
|
archive_other_ext with(nolock)
|
|
|
|
|
WHERE
|
|
|
|
|
ID IN (${ids}))
|
|
|
|
|
archive_other_ext
|
|
|
|
|
@ -594,7 +594,7 @@
|
|
|
|
|
SELECT
|
|
|
|
|
MAX( eTime ) eTime
|
|
|
|
|
FROM
|
|
|
|
|
archive_other_ext
|
|
|
|
|
archive_other_ext with(nolock)
|
|
|
|
|
WHERE
|
|
|
|
|
sysFlag = 1
|
|
|
|
|
AND archive_other_ext.jzh = #{patientId}
|
|
|
|
|
@ -605,12 +605,13 @@
|
|
|
|
|
END eTime,
|
|
|
|
|
ID,sysFlag,C1
|
|
|
|
|
FROM
|
|
|
|
|
archive_other_ext
|
|
|
|
|
archive_other_ext with(nolock)
|
|
|
|
|
WHERE
|
|
|
|
|
archive_other_ext.jzh = #{patientId})
|
|
|
|
|
archive_other_ext
|
|
|
|
|
INNER JOIN archive_other_ext_submitTime ON archive_other_ext.ID = archive_other_ext_submitTime.other_ext_id
|
|
|
|
|
WHERE
|
|
|
|
|
sysFlag in (1,2,3,4,5,6,7,8,9,10,11) and
|
|
|
|
|
eTime <=
|
|
|
|
|
case when
|
|
|
|
|
sysFlag = 1
|
|
|
|
|
@ -625,7 +626,7 @@
|
|
|
|
|
SELECT
|
|
|
|
|
MID
|
|
|
|
|
FROM
|
|
|
|
|
archive_other_ext
|
|
|
|
|
archive_other_ext with(nolock)
|
|
|
|
|
WHERE
|
|
|
|
|
sysFlag IN ( 3, 4, 6 )
|
|
|
|
|
AND ISNULL( DID, '' )= ''
|
|
|
|
|
@ -635,11 +636,11 @@
|
|
|
|
|
</select>
|
|
|
|
|
<!--根据记账号查询该病例护理记录的最新采集完成时间-->
|
|
|
|
|
<select id="selectMaxETimeByNursingAndJzh" resultType="java.lang.String">
|
|
|
|
|
select top 1 convert(varchar(19),eTime,120) eTime from archive_other_ext where sysFlag = 1 and jzh = #{patientId} order by eTime desc
|
|
|
|
|
select top 1 convert(varchar(19),eTime,120) eTime from archive_other_ext with(nolock) where sysFlag = 1 and jzh = #{patientId} order by eTime desc
|
|
|
|
|
</select>
|
|
|
|
|
<!--根据sysFlag和id集合查询记录-->
|
|
|
|
|
<select id="selectListBySysFlagAndIds" resultMap="BaseResultMap">
|
|
|
|
|
select id from archive_other_ext
|
|
|
|
|
select id from archive_other_ext with(nolock)
|
|
|
|
|
<where>
|
|
|
|
|
<if test="sysFlag != null">
|
|
|
|
|
and sysFlag = #{sysFlag}
|
|
|
|
|
@ -664,7 +665,7 @@
|
|
|
|
|
C8,
|
|
|
|
|
SycObj,
|
|
|
|
|
C1
|
|
|
|
|
from archive_other_ext
|
|
|
|
|
from archive_other_ext with(nolock)
|
|
|
|
|
<where>
|
|
|
|
|
statusFlag != -1
|
|
|
|
|
<if test="sysFlag != null">
|
|
|
|
|
@ -738,7 +739,7 @@
|
|
|
|
|
'未归档' ELSE '已归档'
|
|
|
|
|
END n2Str
|
|
|
|
|
FROM
|
|
|
|
|
archive_other_ext
|
|
|
|
|
archive_other_ext with(nolock)
|
|
|
|
|
INNER JOIN archive_master ON archive_master.patient_id = archive_other_ext.jzh
|
|
|
|
|
LEFT JOIN emr_dictionary ON archive_master.dept_name = emr_dictionary.CODE
|
|
|
|
|
AND emr_dictionary.parent_id = 'dept_code'
|
|
|
|
|
@ -819,7 +820,7 @@
|
|
|
|
|
</sql>
|
|
|
|
|
<!--根据系统标识查询任务详情-->
|
|
|
|
|
<select id="judgeCollectCompleted" resultType="com.emr.entity.ArchiveOtherExt">
|
|
|
|
|
select jzh,C1,C2,convert(varchar(19),sysUpdateTime,120) sysUpdateTime from archive_other_ext
|
|
|
|
|
select jzh,C1,C2,convert(varchar(19),sysUpdateTime,120) sysUpdateTime from archive_other_ext with(nolock)
|
|
|
|
|
<where>
|
|
|
|
|
jzh = #{jzh}
|
|
|
|
|
<if test="sysFlag != null">
|
|
|
|
|
@ -835,7 +836,7 @@
|
|
|
|
|
C10,
|
|
|
|
|
SycObj
|
|
|
|
|
FROM
|
|
|
|
|
archive_other_ext
|
|
|
|
|
archive_other_ext with(nolock)
|
|
|
|
|
WHERE
|
|
|
|
|
sysFlag = - 300
|
|
|
|
|
AND MID = #{masterId}
|
|
|
|
|
|