病案封存页面

master
linjj 2 years ago
parent 2ae957e36c
commit c1ea417afc

@ -65,7 +65,6 @@ public class beHospitaledController {
@RequestMapping(value = "/beHosps")
public String inHospitals(Model model) {
//return "beHospitaledDir/beHospListNow";
return "beHospitaledDir/beHospList";
}

@ -72,5 +72,8 @@ public interface Archive_Master_FollowingMapper {
List<Archive_Master_Following> selectFollowingByFollowingType(@Param("followingType")String followingType,@Param("masterIds")String masterIds);
List<Archive_Master_Following> selectFollowingByFollowingTypeNew(@Param("followingType")String followingType,@Param("masterIds")String masterIds);
List<Archive_Master_Following> getHandleName(@Param(value = "roleName") String roleName,@Param(value = "userName") String userName);
}

@ -188,6 +188,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
List<Archive_Master_Vo> list = archiveMasterMapper.selectByLast(archiveMasterVo);
if(list!=null && list.size()>0) {
//科室列表
Emr_Dictionary dic = new Emr_Dictionary();
dic.setEffective(1);
dic.setTypecode("dept_code");
@ -202,11 +203,38 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
p.setDeptName(deptName);
}
});
//masterIds集合
List<String> masterIds = ListUtils.distinctSelect(list, Archive_Master_Vo::getId);
//转成逗号拼接
String ids = String.join(",", masterIds);
//获取医生缺陷数量
List<Archive_Master_Vo> doctorDefectNum = archiveMasterMapper.getDoctorDefectNum(ids);
//医生是否有缺陷
Map<String, Archive_Master_Vo> doctorMap = ListUtils.toMap(doctorDefectNum, Archive_Master_Vo::getArchiveDetailId);
Setters.<Archive_Master_Vo>instance().list(list).cycleSetProperties(p -> {
String doctorId = p.getId();
if (doctorMap.containsKey(doctorId)){
String faultDoctorNum = doctorMap.get(doctorId).getFaultDoctorNum();
p.setFaultDoctorNum(faultDoctorNum);
p.setNumb(1);
}
});
//获取护士缺陷数量
List<Archive_Master_Vo> nurseDefectNum = archiveMasterMapper.getNurseDefectNum(ids);
//护士是否有缺陷
Map<String, Archive_Master_Vo> nurseMap = ListUtils.toMap(nurseDefectNum, Archive_Master_Vo::getArchiveDetailId);
//判断是否有缺陷就填入
Setters.<Archive_Master_Vo>instance().list(list).cycleSetProperties(p -> {
String nurseId = p.getId();
if (nurseMap.containsKey(nurseId)){
String faultNurseNum = nurseMap.get(nurseId).getFaultNurseNum();
p.setFaultNurseNum(faultNurseNum);
p.setNumb(1);
}
});
//是否有退回
setFollowingTypeNew(ids,list);
}
//科室列表
//设置医生、护士名称和打印标识
return list;
}
@ -396,6 +424,21 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
}
}
private void setFollowingTypeNew(String masterIds, List<Archive_Master_Vo> list) {
List<Archive_Master_Following> archiveMasterFollowings = archiveMasterFollowingMapper.selectFollowingByFollowingTypeNew("9", masterIds);
if(!CollectionUtils.isEmpty(archiveMasterFollowings)){
for(Archive_Master_Vo archiveMasterVo : list) {
for (Archive_Master_Following following : archiveMasterFollowings) {
if (following.getMasterId().equals(archiveMasterVo.getId())){
archiveMasterVo.setFollowingType("9");
break;
}
}
}
}
}
/**
* 退退,followType=9
* @param archiveMasterVo

@ -537,19 +537,12 @@
select m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,m.dept_name,CONVERT(varchar(10),m.discharge_date_time, 120) discharge_date_time,m.ArchiveState,CONVERT(varchar(10),m.admission_date_time, 120) admission_date_time,
m.dept_admission_to,m.check_doctor,m.checked_datetime,m.checked_doctor,m.LockInfo,m.DOCTOR_IN_CHARGE,m.ID_NO,m.DISCHARGE_DISPOSITION,m.dept_code_lend,m.isscaned,
m.cmt_doctor,m.cmt_nurse,m.doctor_name,m.nurse_name,m.cmt_doctor_date,m.cmt_nurse_date,m.emr_doctor_cmt,m.emr_nure_cmt,m.death_flag,m.first_instance,
m.is_scanning,m.bed_number,ISNULL(s.numb, 0) numb,ao.C5 is_sign,ISNULL(sNurse.numb, 0) faultNurseNum,ISNULL(sDoctor.numb, 0) faultDoctorNum
,case when emr_fault_detail.archive_detail_id is not null then '是' else '否' end isFault,m.print_flag as printNum
m.is_scanning,m.bed_number,ao.C5 is_sign,case when emr_fault_detail.archive_detail_id is not null then '是' else '否' end isFault,m.print_flag as printNum
from archive_master m
left join (select distinct archive_detail_id from emr_fault_detail where back_flag in ('6','5')) emr_fault_detail
on emr_fault_detail.archive_detail_id = m.ID
LEFT JOIN(select archive_detail_id,count(*) numb from emr_fault_detail where 1=1 and back_flag is not null GROUP BY archive_detail_id) s
on m.id=s.archive_detail_id
LEFT JOIN (select distinct masterID,C5 FROM archive_other where sysFlag = '1') ao
on m.id=ao.masterID
LEFT JOIN(select archive_detail_id,count(*) numb from emr_fault_detail where 1=1 and back_flag in ('2','6') GROUP BY archive_detail_id) sNurse
on m.id=sNurse.archive_detail_id
LEFT JOIN(select archive_detail_id,count(*) numb from emr_fault_detail where 1=1 and back_flag in ('1','5') GROUP BY archive_detail_id) sDoctor
on m.id=sDoctor.archive_detail_id
where 1=1 and ArchiveState in('初审') and m.Is_Valid!=1
and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%'
<if test="isFault != null and isFault != ''">
@ -563,14 +556,6 @@
<if test="printNum !=null and printNum !=''">
AND m.print_flag=#{printNum}
</if>
<!-- <if test="printNum != null and printNum != ''">-->
<!-- <choose>-->
<!-- <when test="printNum == 1">-->
<!-- and printTable.MasterID is not null-->
<!-- </when>-->
<!-- <otherwise>and printTable.MasterID is null</otherwise>-->
<!-- </choose>-->
<!-- </if>-->
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
</if>
@ -628,7 +613,6 @@
and m.admission_date_time &lt;= #{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
<if test="checkDoctor != null">
and m.check_doctor = #{checkDoctor,jdbcType=NVARCHAR}
</if>

@ -209,6 +209,16 @@
</select>
<select id="selectFollowingByFollowingTypeNew" resultMap="BaseResultMap">
select distinct master_id,following_type from Archive_Master_Following
where following_type= #{followingType} and master_id in
<foreach item="item" collection="masterIds.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="getHandleName" resultMap="BaseResultMap">

@ -3395,20 +3395,6 @@
title: '出院日期',
field: 'dischargeDateTime',
align: 'center',
/*formatter: function (value, row, index) {
var redFlag = row.numb;
var a = "";
if (value != null && value != "") {
value = value.substring(0, 10);
}
if (redFlag == 0) {
a = value;
} else {
//缺陷
a = '<span style="color:red;">' + value + '</span>';
}
return a;
}*/
},
{
title: '主管医生',

Loading…
Cancel
Save