提交HIS召回状态和打印状态

master
zengwh 4 years ago
parent bfdc1ce246
commit de59011365

@ -153,8 +153,8 @@ public class beHospitaledController {
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, HttpServletRequest request,Archive_Master_Vo archiveMasterVo,Integer isSearch){
String tableThNames = "住院号,住院次数,名字,性别,出院科室,出院日期,主管医生,状态";
String fieldCns = "inpNo,visitId,name,sex,deptName,dischargeDateTime,doctorInCharge,status";
String tableThNames = "住院号,住院次数,名字,性别,出院科室,出院日期,主管医生,状态,是否完整,HIS召回状态,打印状态";
String fieldCns = "inpNo,visitId,name,sex,deptName,dischargeDateTime,doctorInCharge,status,lockinfo,callBackStatus,printStatus";
//构造excel的数据
if(isSearch == 0){
archiveMasterVo.setStartDateTo(null);

@ -95,8 +95,8 @@ public class lastVerifyController {
archiveMasterVo.setStartDateTo(null);
archiveMasterVo.setEndDateTo(null);
}
String tableThNames = "住院号,住院次数,名字,性别,出院科室,出院日期,主管医生,状态,纸质状态,纸质扫描";
String fieldCns = "inpNo,visitId,name,sex,deptName,dischargeDateTime,doctorInCharge,status,remark,checkName";
String tableThNames = "住院号,住院次数,名字,性别,出院科室,出院日期,主管医生,状态,纸质状态,纸质扫描,HIS召回状态,打印状态";
String fieldCns = "inpNo,visitId,name,sex,deptName,dischargeDateTime,doctorInCharge,status,remark,checkName,callBackStatus,printStatus";
try {
//构造excel的数据
List<Archive_Master_Vo> list = archiveMasterService.selectLastVerifyList(archiveMasterVo);

@ -15,4 +15,6 @@ public interface TUuPrintMapper {
List<TUuPrintVo> getPrintCount(TUuPrintSearch record);
List<TUuPrintVo> getPrintInfo(TUuPrintSearch record);
List<TUuPrint> selectAllByPatientId(@Param("patientId") String patientId);
}

@ -83,6 +83,10 @@ public class Archive_Master_Vo extends Archive_Master{
private String paperPosition4;
private String lockInfo;//完整性描述
private String callBackStatus;//退回召回状态
private String printStatus;//打印状态
}

@ -56,6 +56,8 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
private Emr_DictionaryMapper dictionaryMapper;
@Autowired
private PaperPostionService paperPostionService;
@Autowired
private TUuPrintMapper tUuPrintMapper;
/**
*
* */
@ -218,6 +220,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
Emr_Dictionary dictionary = new Emr_Dictionary();
dictionary.setTypecode("dept_code");
List<Emr_Dictionary> dictionaries = dictionaryMapper.dicByTypeCode(dictionary);
StringBuilder patientIdStr = new StringBuilder();
for (Archive_Master_Vo masterVo : list) {
//科室名称编码转名称
deptNameCode2Name(dictionaries, masterVo);
@ -228,6 +231,23 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}else if(status.equals(EnumVerify.DocState.CallBacked.getCode())){
masterVo.setStatus(EnumVerify.DocState.CallBacked.getName());
}
if(StringUtils.isNotBlank(patientIdStr)){
patientIdStr.append(",");
}
masterVo.setPrintStatus("否");
patientIdStr.append(masterVo.getPatientId());
}
//设置打印状态
List<TUuPrint> tUuPrints = tUuPrintMapper.selectAllByPatientId(patientIdStr.toString());
if(!CollectionUtils.isEmpty(tUuPrints)){
for (Archive_Master_Vo masterVo : list) {
for (TUuPrint tUuPrint : tUuPrints){
if(tUuPrint.getPatientId().equals(masterVo.getPatientId())){
masterVo.setPrintStatus("是");
break;
}
}
}
}
}
return list;
@ -270,9 +290,10 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
//组织完整性字段并完整的更新archive_master表的完整性字段值为完整LockInfo='完整'
//updateMasterBySuccess(list);
//转换科室与赋值超期天数
selectByColumnChange(list);
String patientIds = selectByColumnChange(list);
//根据状态code转换状态及判断显示按钮
if(null != list && !list.isEmpty()){
List<TUuPrint> tUuPrints = tUuPrintMapper.selectAllByPatientId(patientIds);
//查询流转角色集合
List<ArchiveFlowRole> flowRoles = flowRoleMapper.selectAll();
//计算属于哪种审核角色
@ -297,6 +318,17 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
masterVo.setBtns(btns);
}
}
//定义打印状态
String printStatus = "否";
if(!CollectionUtils.isEmpty(tUuPrints)){
for(TUuPrint tUuPrint : tUuPrints){
if(tUuPrint.getPatientId().equals(masterVo.getPatientId())){
printStatus = "是";
break;
}
}
}
masterVo.setPrintStatus(printStatus);
}
}
}
@ -346,11 +378,12 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
/**
*
* ,
*
* @param list
*/
private void selectByColumnChange(List<Archive_Master_Vo> list) {
private String selectByColumnChange(List<Archive_Master_Vo> list) {
StringBuilder patientIdStr = new StringBuilder();
if(!CollectionUtils.isEmpty(list)){
//查询科室集合
Emr_Dictionary dictionary = new Emr_Dictionary();
@ -363,7 +396,6 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}else{
selectDays = archiveMasterMapper.selectDaysByMasterIds(list);
}
for (Archive_Master_Vo vo:list) {
//科室名称编码转名称
deptNameCode2Name(dictionaries, vo);
@ -376,8 +408,13 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
}
}
if(StringUtils.isNotBlank(patientIdStr)){
patientIdStr.append(",");
}
patientIdStr.append(vo.getPatientId());
}
}
return patientIdStr.toString();
}
/**

@ -607,22 +607,52 @@
where user_name = #{userName}
<include refid="leaveHospitalCommomSearch"></include>
</sql>
<sql id="selectCallBackList">
(select distinct jzh from archive_other_ext where sysFlag = -300)
</sql>
<!---出院-->
<select id="selectByColumn" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
select * from (
select
<include refid="selectColumms"></include>
<include refid="selectColumms"></include>,
CASE
WHEN jzh IS NOT NULL THEN
'是'
ELSE
'否'
END callBackStatus
from archive_master
<where><include refid="beHospitalSearch"></include></where>
LEFT JOIN <include refid="selectCallBackList"></include> archive_other_ext ON archive_master.patient_id = archive_other_ext.jzh
<where><include refid="beHospitalSearch"></include>
<if test="callBackStatus != null">
<choose>
<when test="callBackStatus == 1">
AND jzh is not null
</when>
<otherwise>
AND jzh is null
</otherwise>
</choose>
</if>
</where>
<if test="userName!= null and userName != ''">UNION ALL
SELECT
<include refid="selectColumms"></include>
<include refid="selectColumms"></include>,
CASE
WHEN jzh IS NOT NULL THEN
'是'
ELSE
'否'
END callBackStatus
from
archive_transfer_dept_user
inner join
archive_master
on
archive_master.id = archive_transfer_dept_user.master_id
LEFT JOIN <include refid="selectCallBackList"></include> archive_other_ext ON archive_master.patient_id = archive_other_ext.jzh
where user_name = #{userName}
<include refid="leaveHospitalCommomSearch"></include>
</if>
@ -651,10 +681,29 @@
WHEN T1 IS NOT NULL
AND YEAR ( T1 ) != '1801' THEN
'已签收' ELSE '未签收'
END remark
END remark,
CASE
WHEN jzh IS NOT NULL THEN
'是'
ELSE
'否'
END callBackStatus
from archive_master m
LEFT JOIN
<include refid="selectCallBackList"></include> archive_other_ext
ON m.patient_id = archive_other_ext.jzh
LEFT JOIN ( SELECT MasterID FROM archive_detail WHERE Source = '扫描上传' AND archive_detail.flag = '0' GROUP BY MasterID ) archive_detail ON m.id = archive_detail.MasterID
where 1=1 and ArchiveState in ('64','1024')
<if test="callBackStatus != null">
<choose>
<when test="callBackStatus == 1">
AND jzh is not null
</when>
<otherwise>
AND jzh is null
</otherwise>
</choose>
</if>
<if test="checkName != null and checkName != ''">
AND MasterID IS
<choose>
@ -1419,7 +1468,7 @@
<include refid="disDateRangeWhereSql"></include>
--3.已归档数量
union all
select COUNT(1) count from archive_master where ArchiveState = '128'
select COUNT(1) count from archive_master where (ArchiveState = '128' or (ArchiveState = '64' and T1 is not null and T1 != '' and T1 >= '1801-02-04'))
<include refid="disDateRangeWhereSql"></include>
--4.已签收数量
union all

@ -199,4 +199,17 @@
hzName,
cpyTime
</select>
<!--按病案主键查询打印记录-->
<select id="selectAllByPatientId" resultType="com.emr.entity.TUuPrint">
select distinct patient_id from t_uuprint
<where>
<if test="patientId != null and patientId != ''">
AND patient_id in (
<foreach collection="patientId.split(',')" separator="," item="item">
#{item}
</foreach>
)
</if>
</where>
</select>
</mapper>

@ -233,6 +233,14 @@
<option value="8" <c:if test="${infoId == 8}">selected</c:if>>病案室审核</option>
</select>
</div>
<div class="form-group divCss">
<label>HIS召回状态:</label>
<select class="form-control input-sm" id="callBackStatus">
<option value="">全部</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>
<button type="button" class="btn btn-info btn-sm divCss" id="excelBtn">条件导出</button>
<button type="button" class="btn btn-primary btn-sm divCss" id="approvesBtn">批量审核</button>
@ -839,7 +847,7 @@
</div>
</div>
</body>
<script src="${path}/static/js/beHospList/beHospList.js?time=2021-02-08"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2021-07-30"></script>
<script src="${path}/static/js/beHospList/beHospList.js?time=2021-08-01"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2021-08-01"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>
</html>

@ -193,6 +193,14 @@
<option value="0">否</option>
</select>
</div>
<div class="form-group divCss">
<label>HIS召回状态:</label>
<select class="form-control input-sm" id="callBackStatus">
<option value="">全部</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>
<button type="button" class="btn btn-info btn-sm divCss" id="excelBtn">条件导出</button>
<button type="button" class="btn btn-primary btn-sm divCss" id="approvesBtn">批量审核</button>
@ -671,8 +679,8 @@
</div>
</div>
</body>
<script src="${path}/static/js/lastVerifyList/lastVerifyList.js?time=2021-07-30"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2021-07-30"></script>
<script src="${path}/static/js/lastVerifyList/lastVerifyList.js?time=2021-08-01"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2021-08-01"></script>
<script src="${path}/static/js/statistics/getDeptCommom.js"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>
</html>

@ -71,7 +71,8 @@ function initTable() {
roles:$("#searchOperRole").val(),
isSuccess:$("#isSuccessSearch").val(),
infoId:$("#infoId").val(),
operRole:$("#checker").val()
operRole:$("#checker").val(),
callBackStatus:$("#callBackStatus").val()
};
return temp;
},
@ -148,6 +149,32 @@ function initTable() {
}
}
},
{
title: 'HIS召回状态',
field: 'callBackStatus',
align: 'center',
valign: 'middle',
formatter:function(value, row){
if(value == '是'){
return '<span style="color:green">是</span>';
}else{
return '<span style="color:red">否</span>';
}
}
},
{
title: '打印状态',
field: 'printStatus',
align: 'center',
valign: 'middle',
formatter:function(value, row){
if(value == '是'){
return '<span style="color:green">是</span>';
}else{
return '<span style="color:red">否</span>';
}
}
},
{
title: "操作",
align: 'left',

@ -55,7 +55,7 @@ function loadDoctorInCharge(){
//判断是否需要选中
var flag = $("#flag").val();
var currentRole = $("#roleId").val();
if(flag == 1 && currentRole == 1){
if(currentRole == 1){
if($("#currentName").val() == name){
selected = 'selected';
}

@ -74,7 +74,8 @@ function initTable() {
doctorInCharge:$("#doctorInCharge").val(),
isSign:$("#isSign").val(),
isSearch:$("#isSearch").val(),
checkName:$("#checkName").val()
checkName:$("#checkName").val(),
callBackStatus:$("#callBackStatus").val()
};
return temp;
},
@ -186,6 +187,32 @@ function initTable() {
return str;
}
},
{
title: 'HIS召回状态',
field: 'callBackStatus',
align: 'center',
valign: 'middle',
formatter:function(value, row){
if(value == '是'){
return '<span style="color:green">是</span>';
}else{
return '<span style="color:red">否</span>';
}
}
},
{
title: '打印状态',
field: 'printStatus',
align: 'center',
valign: 'middle',
formatter:function(value, row){
if(value == '是'){
return '<span style="color:green">是</span>';
}else{
return '<span style="color:red">否</span>';
}
}
},
{
title: "操作",
align: 'left',

Loading…
Cancel
Save