Merge remote-tracking branch 'origin/master'

master
xm 4 years ago
commit ee4bf80b4f

@ -38,6 +38,7 @@ import java.rmi.RemoteException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@Controller
@RequestMapping("lastVerify")
public class lastVerifyController {
@ -45,7 +46,6 @@ public class lastVerifyController {
private String EMRQualityControl;
@Value("${EMRQualityControlParamName}")
private String EMRQualityControlParamName;
@Autowired
private Archive_MasterService archiveMasterService;
@ -120,6 +120,11 @@ public class lastVerifyController {
//修改病案归档状态:复审退回或主任退回
Archive_Master archiveMaster = archiveMasterService.selectById(emrFaultDetail.getArchiveDetailId());
if(archiveMaster!=null) {
//退回给emr
String result = archiveMasterService.returnEmr(emrFaultDetail, archiveMaster, request);
if(StringUtils.isNotBlank(result)){
return result;
}
archiveMaster.setArchivestate(emrFaultDetail.getState());
//查询该病案号缺陷,如果有医生就退回医生如果有护士则退回护士否则不退回提示
Emr_Fault_Detail entityFault=new Emr_Fault_Detail();

@ -0,0 +1,9 @@
package com.emr.dao;
import com.emr.entity.DocusRequestInfo;
public interface DocusRequestInfoMapper {
int insert(DocusRequestInfo record);
int insertSelective(DocusRequestInfo record);
}

@ -0,0 +1,249 @@
package com.emr.entity;
import java.io.Serializable;
import java.util.Date;
public class DocusRequestInfo implements Serializable {
private Long id;
private String code;
private String jzh;
private String masterId;
private String primaryKey;
private String paramPrimaryMsg;
private String paramInfo;
private Integer resultState;
private String resultMsg;
private Date createTime;
private String createUsername;
private String createName;
private String c1;
private String c2;
private String c3;
private Date t1;
private Date t2;
private Date t3;
private Integer i1;
private Integer i2;
private Integer i3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code == null ? null : code.trim();
}
public String getJzh() {
return jzh;
}
public void setJzh(String jzh) {
this.jzh = jzh == null ? null : jzh.trim();
}
public String getMasterId() {
return masterId;
}
public void setMasterId(String masterId) {
this.masterId = masterId == null ? null : masterId.trim();
}
public String getPrimaryKey() {
return primaryKey;
}
public void setPrimaryKey(String primaryKey) {
this.primaryKey = primaryKey == null ? null : primaryKey.trim();
}
public String getParamPrimaryMsg() {
return paramPrimaryMsg;
}
public void setParamPrimaryMsg(String paramPrimaryMsg) {
this.paramPrimaryMsg = paramPrimaryMsg == null ? null : paramPrimaryMsg.trim();
}
public String getParamInfo() {
return paramInfo;
}
public void setParamInfo(String paramInfo) {
this.paramInfo = paramInfo == null ? null : paramInfo.trim();
}
public Integer getResultState() {
return resultState;
}
public void setResultState(Integer resultState) {
this.resultState = resultState;
}
public String getResultMsg() {
return resultMsg;
}
public void setResultMsg(String resultMsg) {
this.resultMsg = resultMsg == null ? null : resultMsg.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUsername() {
return createUsername;
}
public void setCreateUsername(String createUsername) {
this.createUsername = createUsername == null ? null : createUsername.trim();
}
public String getCreateName() {
return createName;
}
public void setCreateName(String createName) {
this.createName = createName == null ? null : createName.trim();
}
public String getC1() {
return c1;
}
public void setC1(String c1) {
this.c1 = c1 == null ? null : c1.trim();
}
public String getC2() {
return c2;
}
public void setC2(String c2) {
this.c2 = c2 == null ? null : c2.trim();
}
public String getC3() {
return c3;
}
public void setC3(String c3) {
this.c3 = c3 == null ? null : c3.trim();
}
public Date getT1() {
return t1;
}
public void setT1(Date t1) {
this.t1 = t1;
}
public Date getT2() {
return t2;
}
public void setT2(Date t2) {
this.t2 = t2;
}
public Date getT3() {
return t3;
}
public void setT3(Date t3) {
this.t3 = t3;
}
public Integer getI1() {
return i1;
}
public void setI1(Integer i1) {
this.i1 = i1;
}
public Integer getI2() {
return i2;
}
public void setI2(Integer i2) {
this.i2 = i2;
}
public Integer getI3() {
return i3;
}
public void setI3(Integer i3) {
this.i3 = i3;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", code=").append(code);
sb.append(", jzh=").append(jzh);
sb.append(", masterId=").append(masterId);
sb.append(", primaryKey=").append(primaryKey);
sb.append(", paramPrimaryMsg=").append(paramPrimaryMsg);
sb.append(", paramInfo=").append(paramInfo);
sb.append(", resultState=").append(resultState);
sb.append(", resultMsg=").append(resultMsg);
sb.append(", createTime=").append(createTime);
sb.append(", createUsername=").append(createUsername);
sb.append(", createName=").append(createName);
sb.append(", c1=").append(c1);
sb.append(", c2=").append(c2);
sb.append(", c3=").append(c3);
sb.append(", t1=").append(t1);
sb.append(", t2=").append(t2);
sb.append(", t3=").append(t3);
sb.append(", i1=").append(i1);
sb.append(", i2=").append(i2);
sb.append(", i3=").append(i3);
sb.append("]");
return sb.toString();
}
}

@ -8,8 +8,10 @@ package com.emr.service;
import com.emr.entity.Archive_Master;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.Emr_Fault_Detail;
import com.emr.entity.OffsetLimitPage;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
public interface Archive_MasterService {
@ -260,6 +262,8 @@ public interface Archive_MasterService {
* @return
*/
List<Archive_Master_Vo> selectStorageByCol(Archive_Master_Vo record);
String returnEmr(Emr_Fault_Detail emrFaultDetail, Archive_Master archiveMaster, HttpServletRequest request);
}

@ -10,8 +10,10 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.emr.dao.ArchivePrintinfoMapper;
import com.emr.dao.Archive_MasterMapper;
import com.emr.dao.DocusRequestInfoMapper;
import com.emr.dao.MedicalRecordHomepageCacheMapper;
import com.emr.util.HttpClientTool;
import com.emr.util.IDHelper;
import com.emr.vo.Power_User_Dto;
import com.emr.entity.*;
import com.emr.service.Archive_MasterService;
@ -27,13 +29,19 @@ import org.springframework.stereotype.Service;
import com.google.common.collect.Maps;
import org.springframework.util.CollectionUtils;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.*;
@Slf4j
@Service
public class Archive_MasterServiceImpl implements Archive_MasterService {
@Value("${returnUrl}")
private String returnUrl;
@Value("${returnParam}")
private String returnParam;
@Value("${POWER_JSP}")
private String POWER_JSP;
@Autowired
private Archive_MasterMapper archiveMasterMapper;
@ -49,6 +57,9 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
@Value("${observationRecordRequestUrl}")
private String observationRecordRequestUrl;
@Autowired
private DocusRequestInfoMapper docusRequestInfoMapper;
@Override
public Archive_Master selectById(String id) {
return archiveMasterMapper.selectById(id);
@ -521,6 +532,77 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
setNameAndPrintFlag(archiveMasterVo, list);
return list;
}
/**
* 退
* @param emrFaultDetail
* @param archiveMaster
* @param request
*/
@Override
public String returnEmr(Emr_Fault_Detail emrFaultDetail, Archive_Master archiveMaster, HttpServletRequest request) {
String returnMsg = null;
//获取退回标识0打回首页1打回医生2打回护士
String returnFlag = emrFaultDetail.getDealFlag();
if(StringUtils.isNotBlank(returnFlag)) {
//获取打回原因
String returnContent = emrFaultDetail.getDealPerson();
//组织打回参数值
/*{
"INP_NO": "1356601",
"VISIT_ID": "31",
"DISCHARGE_DATE_TIME": "2021/3/8 9:54:00",
"FLAG": "0,2",
"HOSPITAL_NO": "12440000455858169P",
"userid": "CSCS",
"username": "CSCS",
"code": "1340100",
"REASON": "第三方打回"
}*/
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
Map<String,Object> map = new HashMap<>();
map.put("INP_NO",archiveMaster.getInpNo());
map.put("VISIT_ID",archiveMaster.getVisitId());
map.put("DISCHARGE_DATE_TIME",archiveMaster.getDischargeDateTime());
map.put("FLAG",returnFlag);
map.put("HOSPITAL_NO","12440000455858169P");
map.put("userid",user.getUserId().toString());
map.put("username",user.getUserName());
map.put("code",archiveMaster.getDeptName());
map.put("REASON",returnContent);
//定义请求信息记录表
DocusRequestInfo docusRequestInfo = new DocusRequestInfo();
docusRequestInfo.setCode("return");
docusRequestInfo.setCreateUsername(user.getUserName());
docusRequestInfo.setCreateTime(new Date());
docusRequestInfo.setJzh(archiveMaster.getPatientId());
docusRequestInfo.setPrimaryKey(archiveMaster.getInpNo());
docusRequestInfo.setMasterId(archiveMaster.getId());
docusRequestInfo.setParamPrimaryMsg(returnFlag);
docusRequestInfo.setResultState(0);
try {
long id = IDHelper.NewID();
docusRequestInfo.setId(id);
//map转json字符串
Map<String,String> paramMap = new HashMap<>();
JSONObject object = new JSONObject(map);
String json = object.toString();
docusRequestInfo.setParamInfo(json);
paramMap.put(returnParam,json);
String returnStr = HttpClientTool.doPost(returnUrl, paramMap);
if(StringUtils.isNotBlank(returnStr) && returnStr.contains("成功")){
//成功
docusRequestInfo.setResultState(1);
}
docusRequestInfo.setResultMsg(returnStr);
} catch (Exception e) {
e.printStackTrace();
returnMsg = "提示错误信息请与V6系统工程师联系无法退回";
}
docusRequestInfoMapper.insert(docusRequestInfo);
}
return returnMsg;
}
}

@ -1,2 +1,6 @@
#留观推送第三方接口地址
observationRecordRequestUrl = http://10.162.0.51:8091/sanshuyun-ems-function/file/away/updateStatus
#模块打回第三方接口地址
returnUrl = http://10.6.1.152:8085/SignWebService.asmx/PartrePair
#模块打回第三方接口参数
returnParam = strJson

@ -0,0 +1,176 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.emr.dao.DocusRequestInfoMapper" >
<resultMap id="BaseResultMap" type="com.emr.entity.DocusRequestInfo" >
<result column="id" property="id" jdbcType="BIGINT" />
<result column="code" property="code" jdbcType="NVARCHAR" />
<result column="jzh" property="jzh" jdbcType="NVARCHAR" />
<result column="master_id" property="masterId" jdbcType="NVARCHAR" />
<result column="primary_key" property="primaryKey" jdbcType="NVARCHAR" />
<result column="param_primary_msg" property="paramPrimaryMsg" jdbcType="NVARCHAR" />
<result column="param_info" property="paramInfo" jdbcType="NVARCHAR" />
<result column="result_state" property="resultState" jdbcType="INTEGER" />
<result column="result_msg" property="resultMsg" jdbcType="NVARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="create_username" property="createUsername" jdbcType="NVARCHAR" />
<result column="create_name" property="createName" jdbcType="NVARCHAR" />
<result column="c1" property="c1" jdbcType="NVARCHAR" />
<result column="c2" property="c2" jdbcType="NVARCHAR" />
<result column="c3" property="c3" jdbcType="NVARCHAR" />
<result column="t1" property="t1" jdbcType="TIMESTAMP" />
<result column="t2" property="t2" jdbcType="TIMESTAMP" />
<result column="t3" property="t3" jdbcType="TIMESTAMP" />
<result column="i1" property="i1" jdbcType="INTEGER" />
<result column="i2" property="i2" jdbcType="INTEGER" />
<result column="i3" property="i3" jdbcType="INTEGER" />
</resultMap>
<insert id="insert" parameterType="com.emr.entity.DocusRequestInfo" >
insert into docus_request_info (id, code, jzh,
master_id, primary_key, param_primary_msg,
param_info, result_state, result_msg,
create_time, create_username, create_name,
c1, c2, c3, t1,
t2, t3, i1, i2,
i3)
values (#{id,jdbcType=BIGINT}, #{code,jdbcType=NVARCHAR}, #{jzh,jdbcType=NVARCHAR},
#{masterId,jdbcType=NVARCHAR}, #{primaryKey,jdbcType=NVARCHAR}, #{paramPrimaryMsg,jdbcType=NVARCHAR},
#{paramInfo,jdbcType=NVARCHAR}, #{resultState,jdbcType=INTEGER}, #{resultMsg,jdbcType=NVARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{createUsername,jdbcType=NVARCHAR}, #{createName,jdbcType=NVARCHAR},
#{c1,jdbcType=NVARCHAR}, #{c2,jdbcType=NVARCHAR}, #{c3,jdbcType=NVARCHAR}, #{t1,jdbcType=TIMESTAMP},
#{t2,jdbcType=TIMESTAMP}, #{t3,jdbcType=TIMESTAMP}, #{i1,jdbcType=INTEGER}, #{i2,jdbcType=INTEGER},
#{i3,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.emr.entity.DocusRequestInfo" >
insert into docus_request_info
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="code != null" >
code,
</if>
<if test="jzh != null" >
jzh,
</if>
<if test="masterId != null" >
master_id,
</if>
<if test="primaryKey != null" >
primary_key,
</if>
<if test="paramPrimaryMsg != null" >
param_primary_msg,
</if>
<if test="paramInfo != null" >
param_info,
</if>
<if test="resultState != null" >
result_state,
</if>
<if test="resultMsg != null" >
result_msg,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="createUsername != null" >
create_username,
</if>
<if test="createName != null" >
create_name,
</if>
<if test="c1 != null" >
c1,
</if>
<if test="c2 != null" >
c2,
</if>
<if test="c3 != null" >
c3,
</if>
<if test="t1 != null" >
t1,
</if>
<if test="t2 != null" >
t2,
</if>
<if test="t3 != null" >
t3,
</if>
<if test="i1 != null" >
i1,
</if>
<if test="i2 != null" >
i2,
</if>
<if test="i3 != null" >
i3,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=BIGINT},
</if>
<if test="code != null" >
#{code,jdbcType=NVARCHAR},
</if>
<if test="jzh != null" >
#{jzh,jdbcType=NVARCHAR},
</if>
<if test="masterId != null" >
#{masterId,jdbcType=NVARCHAR},
</if>
<if test="primaryKey != null" >
#{primaryKey,jdbcType=NVARCHAR},
</if>
<if test="paramPrimaryMsg != null" >
#{paramPrimaryMsg,jdbcType=NVARCHAR},
</if>
<if test="paramInfo != null" >
#{paramInfo,jdbcType=NVARCHAR},
</if>
<if test="resultState != null" >
#{resultState,jdbcType=INTEGER},
</if>
<if test="resultMsg != null" >
#{resultMsg,jdbcType=NVARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createUsername != null" >
#{createUsername,jdbcType=NVARCHAR},
</if>
<if test="createName != null" >
#{createName,jdbcType=NVARCHAR},
</if>
<if test="c1 != null" >
#{c1,jdbcType=NVARCHAR},
</if>
<if test="c2 != null" >
#{c2,jdbcType=NVARCHAR},
</if>
<if test="c3 != null" >
#{c3,jdbcType=NVARCHAR},
</if>
<if test="t1 != null" >
#{t1,jdbcType=TIMESTAMP},
</if>
<if test="t2 != null" >
#{t2,jdbcType=TIMESTAMP},
</if>
<if test="t3 != null" >
#{t3,jdbcType=TIMESTAMP},
</if>
<if test="i1 != null" >
#{i1,jdbcType=INTEGER},
</if>
<if test="i2 != null" >
#{i2,jdbcType=INTEGER},
</if>
<if test="i3 != null" >
#{i3,jdbcType=INTEGER},
</if>
</trim>
</insert>
</mapper>

@ -127,7 +127,15 @@
.multiselect-search{
width:200px; !important;
}
.spanDiv{
float: left;
text-align: right;
width:25%;
}
.contentDiv{
float: left;
width:75%;
}
</style>
</head>
<body>
@ -286,28 +294,32 @@
<span style="vertical-align:center;">病案评分:</span>
<input id="scoreLast" type="number" class="input-sm "/> 分
</div>
<div class="row divCss2">
</div>
<div class="row divCss2">
<span style="vertical-align:top;">内容:</span>
<textarea id="backContentLast" rows="9" style="width:85%;"></textarea>
</div>
<%-- <div class="row divCss2">
<span style="vertical-align:bottom; display:inline-block;">请选择电子病历可修改部分:</span>
<div class="row form-inline" style="vertical-align:top; display:inline-block;">
<div class="checkbox" >
<label >
<input type="checkbox" name="box" style="vertical-align:text-top;" value="1">仅病案首页</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="box" value="2">医生文书</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" value="3">护士文书</label>
</div>
<div class="row divCss2">
<div class="spanDiv">
<span>请选择电子病历可修改部分:</span>
</div>
</div>--%>
<div class="contentDiv" id="returnFlagDiv">
<select class="selectpicker bla bla bli" multiple data-live-search="true" id="returnFlag"
data-actions-box="true" data-deselect-all-text="取消全选" data-select-all-text="全选" title="请选择可修改部分">
<option value="0">打回首页</option>
<option value="1">打回医生</option>
<option value="2">打回护士</option>
</select>
</div>
</div>
<div class="row divCss2">
<div class="spanDiv">
<span>退回电子病历原因:</span>
</div>
<div class="contentDiv">
<textarea id="retrunContent" rows="3" style="width: 88%;" maxlength="128"></textarea>
</div>
</div>
</div>
</form>
</div>
@ -393,13 +405,7 @@
return context == null || context == "" || context == "undefined" ? "" : context;
}
$(function () {
var priceAllArr;
var oMoveBox = $("#arrow"), infoDiv = $("#infoDiv"), maxL =0;
oMoveBox.click(function () {
@ -1143,6 +1149,10 @@
});
$("#backContentLast").val("");
//生成表单token,防止表单重复提交
//多选
$('#returnFlag').val(["0","1","2"]);
$('#returnFlag').selectpicker('render');
$('#returnFlag').selectpicker('refresh');
setFormToken();
$('#lastBackModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
@ -1173,7 +1183,6 @@
});
//病案室退回
$("#lastBackBtn").on('click', function () {
if ($("#backContentLast").val().length > 1000) {
@ -1192,6 +1201,13 @@
data.state = "复审退回";
data.backFlag = 4;
data.formToken = $("#formToken1").val();
if($("#returnFlag").val() == ''){
$("#returnFlagDiv").focus();
toastr.warning("打回电子病历选项不能为空");
return;
}
data.dealFlag = $("#returnFlag").val().toString();
data.dealPerson = $("#retrunContent").val();
// data.checkID = [];//定义一个空数组
// $("input[name='box']:checked").each(function(i){//把所有被选中的复选框的值存入数组
// data.checkID[i] =$(this).val();

Loading…
Cancel
Save