借阅审批加所属科室,第三方调阅增加病案号,住院次数参数

master
zengwh 5 years ago
parent f31597f68c
commit 05f24abde1

@ -25,6 +25,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.Subject;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -287,6 +288,29 @@ public class FontShowRecordController {
} }
} }
/**
*
* @param patientId
* @param inpatientNo
* @param admissTimes
* @return
*/
private String getPatientIdByInpatientNoAndAdmissTimes(String patientId,String inpatientNo,Short admissTimes,Model model){
if(StringUtils.isBlank(patientId)){
List<String> patientIdList = commomMapper.selectPatientIdByAdmissTimesAndInpatientNoAndName(admissTimes, inpatientNo, null, null, null);
if(!CollectionUtils.isEmpty(patientIdList)){
if(patientIdList.size() > 1){
return "查询到数据不只一个";
}
patientId = patientIdList.get(0);
}else{
return "查询不到该数据";
}
}
model.addAttribute("patientId", patientId);
return null;
}
/** /**
* @MethodName: showRecordFont * @MethodName: showRecordFont
* @Description: * @Description:
@ -300,8 +324,12 @@ public class FontShowRecordController {
* @Version: 1.0 * @Version: 1.0
*/ */
@RequestMapping("showRecordFont") @RequestMapping("showRecordFont")
public String showRecordFont(String patientId, Model model, HttpServletRequest request) { public String showRecordFont(String patientId,String inpatientNo,Short admissTimes, Model model, HttpServletRequest request) {
model.addAttribute("patientId", patientId); //病案主键为空,通过病案号或与住院次数组合查询对应的病案主键
String msg = getPatientIdByInpatientNoAndAdmissTimes(patientId, inpatientNo, admissTimes,model);
if(StringUtils.isNotBlank(msg)){
return msg;
}
//加载登陆者 //加载登陆者
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER"); Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
if (null != user) { if (null != user) {
@ -328,8 +356,12 @@ public class FontShowRecordController {
* @return * @return
*/ */
@RequestMapping("showRecordFontSouth") @RequestMapping("showRecordFontSouth")
public String showRecordFontSouth(String patientId, Model model, HttpServletRequest request) { public String showRecordFontSouth(String patientId,String inpatientNo,Short admissTimes, Model model, HttpServletRequest request) {
model.addAttribute("patientId", patientId); //病案主键为空,通过病案号或与住院次数组合查询对应的病案主键
String msg = getPatientIdByInpatientNoAndAdmissTimes(patientId, inpatientNo, admissTimes,model);
if(StringUtils.isNotBlank(msg)){
return msg;
}
try { try {
List<EmrPrintOrDownLoadInfoVo> printCount = printOrDownLoadInfoService.getPrintCount(patientId); List<EmrPrintOrDownLoadInfoVo> printCount = printOrDownLoadInfoService.getPrintCount(patientId);
if (null != printCount && !printCount.isEmpty()) { if (null != printCount && !printCount.isEmpty()) {

@ -747,6 +747,7 @@ public class ApproveController {
String name = user1.getName(); String name = user1.getName();
if(StringUtils.isNotBlank(applyer) && user1.getUserName().equals(applyer)){ if(StringUtils.isNotBlank(applyer) && user1.getUserName().equals(applyer)){
obj.setApplyer(name); obj.setApplyer(name);
obj.setDeptName(user1.getDeptName());
} }
if(StringUtils.isNotBlank(approver) && user1.getUserName().equals(approver)){ if(StringUtils.isNotBlank(approver) && user1.getUserName().equals(approver)){
obj.setApprover(name); obj.setApprover(name);
@ -843,8 +844,8 @@ public class ApproveController {
@ResponseBody @ResponseBody
public void exportExcelApproveList(HttpServletResponse response, Emr_Apply_Approve approve, public void exportExcelApproveList(HttpServletResponse response, Emr_Apply_Approve approve,
String startTime1, String endTime1,String startTime2, String endTime2,HttpServletRequest request,String checks) throws Exception{ String startTime1, String endTime1,String startTime2, String endTime2,HttpServletRequest request,String checks) throws Exception{
String tableThNames = "申请人,申请日期,有效日期,有效天数,姓名,病案号,住院次数,出院日期,申请原因,申请类型,审批状态,审批时间,审批人,批注内容"; String tableThNames = "申请人,申请科室,申请日期,有效日期,有效天数,姓名,病案号,住院次数,出院日期,申请原因,申请类型,审批状态,审批时间,审批人,批注内容";
String fieldCns = "applyer,applyTime,effeTime,effeDays,name,inpatientNo,admissTimes,disTime,applyReason,applyType,approveState,approveTime,approver,approveNotes"; String fieldCns = "applyer,deptName,applyTime,effeTime,effeDays,name,inpatientNo,admissTimes,disTime,applyReason,applyType,approveState,approveTime,approver,approveNotes";
List<Emr_Apply_Approve> approves = new ArrayList<>(); List<Emr_Apply_Approve> approves = new ArrayList<>();
//匹配权限 //匹配权限
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER"); Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
@ -875,6 +876,7 @@ public class ApproveController {
String name = user1.getName(); String name = user1.getName();
if(StringUtils.isNotBlank(applyer) && user1.getUserName().equals(applyer)){ if(StringUtils.isNotBlank(applyer) && user1.getUserName().equals(applyer)){
obj.setApplyer(name); obj.setApplyer(name);
obj.setDeptName(user1.getDeptName());
} }
if(StringUtils.isNotBlank(approver) && user1.getUserName().equals(approver)){ if(StringUtils.isNotBlank(approver) && user1.getUserName().equals(approver)){
obj.setApprover(name); obj.setApprover(name);

@ -53,6 +53,16 @@ public class Emr_Apply_Approve {
private String disTime; private String disTime;
private String deptName;
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public String getDisTime() { public String getDisTime() {
return disTime; return disTime;
} }

@ -15,6 +15,16 @@ public class User {
private String deptCode; private String deptCode;
private String deptName;
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public String getDeptCode() { public String getDeptCode() {
return deptCode; return deptCode;
} }

@ -117,13 +117,6 @@
WHERE WHERE
patient_id in (${patientIds}) patient_id in (${patientIds})
</select> </select>
<select id="selectAllInfo" resultType="com.emr.vo.commomSearch.CommomVo">
select
inpatient_no,
name
from commomtable
</select>
<!--根据住院次数和病案号和姓名查询patientId-->
<select id="selectPatientIdByAdmissTimesAndInpatientNoAndName" resultType="java.lang.String" <select id="selectPatientIdByAdmissTimesAndInpatientNoAndName" resultType="java.lang.String"
parameterType="java.lang.String"> parameterType="java.lang.String">
SELECT SELECT
@ -135,11 +128,20 @@
<if test="admissTimes != null"> <if test="admissTimes != null">
AND admiss_times = #{admissTimes} AND admiss_times = #{admissTimes}
</if> </if>
AND name = #{name} <if test="name != null and name != ''">
AND name = #{name}
</if>
<if test="startTime2 != null and startTime2 != '' and endTime2 != null and endTime2 != ''"> <if test="startTime2 != null and startTime2 != '' and endTime2 != null and endTime2 != ''">
AND dis_date between #{startTime2} + ' 00:00:00' and #{endTime2} + ' 23:59:59' AND dis_date between #{startTime2} + ' 00:00:00' and #{endTime2} + ' 23:59:59'
</if> </if>
</select> </select>
<!--根据住院次数和病案号和姓名查询patientId-->
<select id="selectAllInfo" resultType="com.emr.vo.commomSearch.CommomVo">
select
inpatient_no,
name
from commomtable
</select>
<!--根据patientId查询病案分类个数--> <!--根据patientId查询病案分类个数-->
<select id="selectScanCountByPatientId" resultMap="BaseResultMap1" parameterType="java.lang.String"> <select id="selectScanCountByPatientId" resultMap="BaseResultMap1" parameterType="java.lang.String">

@ -548,6 +548,7 @@
CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN approve_state = 1 THEN '审核通过' WHEN approve_state=2 THEN CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN approve_state = 1 THEN '审核通过' WHEN approve_state=2 THEN
'审核不通过' WHEN approve_state is null THEN '待审批' WHEN approve_state = '' THEN '待审批' END approve_state, '审核不通过' WHEN approve_state is null THEN '待审批' WHEN approve_state = '' THEN '待审批' END approve_state,
c.name, c.name,
c.dis_date,
CASE WHEN emr_lock.id is null THEN 0 ELSE 1 END lockStatus CASE WHEN emr_lock.id is null THEN 0 ELSE 1 END lockStatus
FROM FROM
emr_apply_approve a emr_apply_approve a

@ -404,7 +404,7 @@
$(".modal-dialog").draggable();//为模态对话框添加拖拽 $(".modal-dialog").draggable();//为模态对话框添加拖拽
}) })
</script> </script>
<script src="${path}/static/js/approveManage/approveManageList/approveManageList174.js?t=1"></script> <script src="${path}/static/js/approveManage/approveManageList/approveManageList174.js?t=2021-08-20"></script>
<script src="${path}/static/js/commom.js"></script> <script src="${path}/static/js/commom.js"></script>
<script src="${path}/static/js/approveManage/approveList/approveDateCommmomMethod.js"></script> <script src="${path}/static/js/approveManage/approveList/approveDateCommmomMethod.js"></script>
<script src="${path}/static/js/dateUtil.js"></script> <script src="${path}/static/js/dateUtil.js"></script>

@ -181,7 +181,7 @@
<iframe width="100%" height="100%" src="" id="iframe" frameborder="0" scrolling="no"></iframe> <iframe width="100%" height="100%" src="" id="iframe" frameborder="0" scrolling="no"></iframe>
</div> </div>
</div> </div>
<script type="text/javascript" src="${path}/static/js/font/showRecordFont.js"></script> <script type="text/javascript" src="${path}/static/js/font/showRecordFont.js?t=2021-08-20"></script>
<script type="text/javascript" src="${path}/static/js/font/showRecordIframeBloodCommom.js"></script> <script type="text/javascript" src="${path}/static/js/font/showRecordIframeBloodCommom.js"></script>
</body> </body>
</html> </html>

@ -76,6 +76,10 @@ $('#mytab').bootstrapTable({
title:'申请人', title:'申请人',
field:'applyer', field:'applyer',
}, },
{
title:'申请科室',
field:'deptName',
},
{ {
title:'申请日期', title:'申请日期',
field:'applyTime', field:'applyTime',

@ -6,6 +6,7 @@ var isIE = function(ver) {
} }
//初始化函数 //初始化函数
$(function(){ $(function(){
debugger
$('.contentDiv').css('height', '100%').css('height', '-=140px'); $('.contentDiv').css('height', '100%').css('height', '-=140px');
var ie = isIE(8); var ie = isIE(8);
if(ie) { if(ie) {

Loading…
Cancel
Save