任务详情根据医生、护士优先显示电子病历、护理文书

master
ALW 3 years ago
parent ac9f12fef5
commit 7007ab2405

@ -40,9 +40,13 @@ public class ArchiveOtherExtController {
if(null != offset && null != limit) {
PageHelper.offsetPage(offset, limit);
}
try {
List<ArchiveOtherExtVo> list = archiveOtherExtService.getArchiveExtInfo(request,archiveOtherExtVo);
return new OffsetLimitPage((Page) list);
long offsetLong = offset.longValue();
long limitLong = limit.longValue();
OffsetLimitPage page =new OffsetLimitPage(limitLong,offsetLong,list);
return page;
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();

@ -200,9 +200,10 @@ public class beHospitaledController {
String method = HomepageMethod;
JAXDynamicClientFactory factory = JAXDynamicClientFactory.newInstance();
Client client = null;
String refreshFlag="2";
try {
client = factory.createClient(endpoint);
Object[] res = client.invoke(method, archiveDetailId);
Object[] res = client.invoke(method, archiveDetailId,refreshFlag);
result = (String) res[0];
//更新master表完整性字段
if(StringUtils.isNotBlank(result)){

@ -23,6 +23,10 @@ public interface ArchiveOtherExtMapper {
List<ArchiveOtherExtVo> getArchiveExtInfo(ArchiveOtherExtVo record);
List<ArchiveOtherExtVo> getArchiveExtInfoDoctor(ArchiveOtherExtVo record);
List<ArchiveOtherExtVo> getArchiveExtInfoNurse(ArchiveOtherExtVo record);
List<ArchiveOtherExtVo> selectAllByIds(@Param("ids") String ids);
int updateSubmit(@Param("ids")String ids);

@ -12,8 +12,17 @@ import java.util.List;
public class OffsetLimitPage {
private Long total;
private Long limit;
private List rows;
public Long getLimit() {
return limit;
}
public void setLimit(Long limit) {
this.limit = limit;
}
public Long getTotal() {
return total;
}
@ -39,6 +48,12 @@ public class OffsetLimitPage {
this.total = total;
}
public OffsetLimitPage(Long total, Long limit, List rows) {
this.total = total;
this.limit = limit;
this.rows = rows;
}
public OffsetLimitPage(Page rows) {
this(rows, rows.getTotal());
}

@ -7,6 +7,7 @@ import com.emr.dao.ArchiveOtherMapper;
import com.emr.entity.ArchiveOther;
import com.emr.entity.ArchiveOtherExt;
import com.emr.entity.ArchiveOtherExtSubmittime;
import com.emr.entity.Power_User;
import com.emr.vo.ArchiveOtherExtVo;
import com.emr.vo.KeyValue;
import org.apache.commons.lang3.StringUtils;
@ -47,7 +48,18 @@ public class ArchiveOtherExtService {
//读取系统标识json文件
String fileNamePath = "static/json/dictionary.json";
List<KeyValue> statusAndSysFlagValues = readJsonData(request, fileNamePath);
List<ArchiveOtherExtVo> list = archiveOtherExtMapper.getArchiveExtInfo(archiveOtherExtVo);
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
Integer roleId = user.getRoleId();
List<ArchiveOtherExtVo> list =null;
if (roleId==1){
list = archiveOtherExtMapper.getArchiveExtInfoDoctor(archiveOtherExtVo);
}
if (roleId==2) {
list = archiveOtherExtMapper.getArchiveExtInfoNurse(archiveOtherExtVo);
}
if (roleId!=2 ||roleId!=1){
list = archiveOtherExtMapper.getArchiveExtInfo(archiveOtherExtVo);
}
if(!CollectionUtils.isEmpty(list)) {
//查询护理的最新采集完成时间
String maxETime = archiveOtherExtMapper.selectMaxETimeByNursingAndJzh(archiveOtherExtVo.getJzh());

@ -438,95 +438,6 @@
</if>
</sql>
<select id="getArchiveExtInfo" resultMap="BaseResultMap">
<!--select temp.*,zd_assort.assort_name,zd_assort.assort_id,-->
<!--archive_other_ext_submitTime.create_time,archive_other_ext_submitTime.str2 tempTime,-->
<!--CASE-->
<!--WHEN sysFlag = 1 THEN-->
<!--CASE-->
<!--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,-->
<!--sysFlag,-->
<!--CONVERT(varchar(19),sysUpdateTime,120) sysupdatetimeStr,-->
<!--CONVERT(varchar(19),stime,120) stimeStr,-->
<!--CONVERT(varchar(19),eTime,120) etimeStr,-->
<!--statusFlag,-->
<!--pResult,-->
<!--C1,-->
<!--DID,-->
<!--jzh-->
<!--from archive_other_ext-->
<!--<where>-->
<!--C1 != '一般病程记录' and sysFlag != 5-->
<!--<include refid="selectWhereSql"></include>-->
<!--</where>-->
<!--union all-->
<!--select-->
<!--top 1-->
<!--archive_other_ext.ID idTemp,-->
<!--SycTime,-->
<!--sysFlag,-->
<!--CONVERT(varchar(19),sysUpdateTime,120) sysupdatetimeStr,-->
<!--CONVERT(varchar(19),stime,120) stimeStr,-->
<!--CONVERT(varchar(19),eTime,120) etimeStr,-->
<!--statusFlag,-->
<!--pResult,-->
<!--'手麻系统病历' as C1,-->
<!--DID,-->
<!--jzh-->
<!--from archive_other_ext-->
<!--<where>-->
<!--and sysFlag = 5 /*and (C1 = '术前访视' or C1 = '术后访视' or C1 = '麻醉记录' or C1 = '麻醉小结')*/-->
<!--<include refid="selectWhereSql"></include>-->
<!--</where>-->
<!--union all-->
<!--select-->
<!--top 1-->
<!--archive_other_ext.ID idTemp,-->
<!--SycTime,-->
<!--sysFlag,-->
<!--CONVERT(varchar(19),sysUpdateTime,120) sysupdatetimeStr,-->
<!--CONVERT(varchar(19),stime,120) stimeStr,-->
<!--CONVERT(varchar(19),eTime,120) etimeStr,-->
<!--statusFlag,-->
<!--pResult,-->
<!--C1,-->
<!--DID,-->
<!--jzh-->
<!--from archive_other_ext-->
<!--<where>-->
<!--C1 = '一般病程记录'-->
<!--<include refid="selectWhereSql"></include>-->
<!--</where>-->
<!--order by sysUpdateTime desc-->
<!--) temp-->
<!--LEFT JOIN archive_detail ON temp.DID = archive_detail.id-->
<!--LEFT JOIN zd_assort ON archive_detail.AssortID = zd_assort.assort_id-->
<!--LEFT JOIN archive_other_ext_submitTime-->
<!--ON archive_other_ext_submitTime.other_ext_id = temp.idTemp-->
<!--<where>-->
<!--<if test="assortId != null and assortId != ''">-->
<!--and zd_assort.assort_id = #{assortId,jdbcType=NVARCHAR}-->
<!--</if>-->
<!--</where>-->
<!--order by statusFlagSort-->
select
archive_other_ext.ID idTemp,
archive_other_ext_submitTime.create_time,
@ -586,6 +497,8 @@
</where>
order by statusFlagSort
</select>
<select id="selectAllByIds" resultMap="BaseResultMap">
select *,
CONVERT(varchar(19),eTime,120) etimeStr
@ -822,8 +735,130 @@
<select id="selectDetailByDid" resultType="com.emr.vo.ArchiveOtherExtVo" parameterType="java.lang.String">
select * from archive_detail where id=#{did}
</select>
<select id="getArchiveExtInfoDoctor" resultMap="BaseResultMap">
select
archive_other_ext.ID idTemp,
archive_other_ext_submitTime.create_time,
archive_other_ext_submitTime.str2 tempTime,
SycTime,
sysFlag,
zd_assort.assort_name,
zd_assort.assort_id,
CONVERT(varchar(19),sysUpdateTime,120) sysupdatetimeStr,
CONVERT(varchar(19),stime,120) stimeStr,
CONVERT(varchar(19),eTime,120) etimeStr,
statusFlag,
pResult,
archive_other_ext.C2,
DID,
jzh,
CASE
WHEN sysFlag = 1 THEN
CASE
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 = archive_other_ext.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 >= CONVERT(varchar(19),eTime,120) THEN
- 1
ELSE
statusFlag
END
END
statusFlagSort
from
archive_other_ext
LEFT JOIN archive_other_ext_submitTime ON archive_other_ext_submitTime.other_ext_id=archive_other_ext.id
LEFT JOIN archive_detail ON archive_other_ext.DID = archive_detail.id
LEFT JOIN zd_assort ON archive_detail.AssortID = zd_assort.assort_id
<where>
<if test="assortId != null and assortId != ''">
and zd_assort.assort_id = #{assortId,jdbcType=NVARCHAR}
</if>
<if test="jzh != null and jzh != ''">
and archive_other_ext.jzh = #{jzh,jdbcType=NVARCHAR}
</if>
<if test="c2 != null and c2 != ''">
and archive_other_ext.c2 = #{c2,jdbcType=NVARCHAR}
</if>
<if test="statusflag != null">
and archive_other_ext.statusFlag = #{statusflag,jdbcType=INTEGER}
</if>
<if test="sysflag != null">
and archive_other_ext.sysflag = #{sysflag,jdbcType=INTEGER}
</if>
</where>
order by case when archive_other_ext.sysFlag=15 then 1 else 2 end,statusFlagSort
</select>
<select id="getArchiveExtInfoNurse" resultMap="BaseResultMap">
select
archive_other_ext.ID idTemp,
archive_other_ext_submitTime.create_time,
archive_other_ext_submitTime.str2 tempTime,
SycTime,
sysFlag,
zd_assort.assort_name,
zd_assort.assort_id,
CONVERT(varchar(19),sysUpdateTime,120) sysupdatetimeStr,
CONVERT(varchar(19),stime,120) stimeStr,
CONVERT(varchar(19),eTime,120) etimeStr,
statusFlag,
pResult,
archive_other_ext.C2,
DID,
jzh,
CASE
WHEN sysFlag = 1 THEN
CASE
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 = archive_other_ext.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 >= CONVERT(varchar(19),eTime,120) THEN
- 1
ELSE
statusFlag
END
END
statusFlagSort
from
archive_other_ext
LEFT JOIN archive_other_ext_submitTime ON archive_other_ext_submitTime.other_ext_id=archive_other_ext.id
LEFT JOIN archive_detail ON archive_other_ext.DID = archive_detail.id
LEFT JOIN zd_assort ON archive_detail.AssortID = zd_assort.assort_id
<where>
<if test="assortId != null and assortId != ''">
and zd_assort.assort_id = #{assortId,jdbcType=NVARCHAR}
</if>
<if test="jzh != null and jzh != ''">
and archive_other_ext.jzh = #{jzh,jdbcType=NVARCHAR}
</if>
<if test="c2 != null and c2 != ''">
and archive_other_ext.c2 = #{c2,jdbcType=NVARCHAR}
</if>
<if test="statusflag != null">
and archive_other_ext.statusFlag = #{statusflag,jdbcType=INTEGER}
</if>
<if test="sysflag != null">
and archive_other_ext.sysflag = #{sysflag,jdbcType=INTEGER}
</if>
</where>
order by case when archive_other_ext.sysFlag=1 then 1 else 2 end,statusFlagSort
</select>
<!--出院日期范围的功能查询语句-->
<sql id="disDateRangeWhereSql">
<choose>

Loading…
Cancel
Save