封存后解封恢复封存前的病历状态

master
linjj 9 months ago
parent 77e1a0c29b
commit a8beac35a3

@ -7,6 +7,7 @@ import com.emr.entity.*;
import com.emr.service.*;
import com.emr.util.Logger;
import com.emr.util.ThreadExcelUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
@ -151,6 +152,7 @@ public class storageController {
archiveMasterFollowing.setHandleName(handleName);
archiveMasterFollowing.setSafekeepingName(emrFaultDetail.getSafekeepingName());
archiveMasterFollowing.setRemark(emrFaultDetail.getRecallReason());
archiveMasterFollowing.setRecallReason(emrFaultDetail.getSealedState());
bol = archiveMasterFollowingService.insertSelective(archiveMasterFollowing);
//向电子病历发送封存消息
pushStorageDto.setPATIENT_STATUS(1);
@ -171,6 +173,17 @@ public class storageController {
archiveMasterFollowing.setHandleId(username);
archiveMasterFollowing.setHandleName(handleName);
archiveMasterFollowing.setRemark(emrFaultDetail.getRecallReason());
//取消封存恢复封存前病历状态
Archive_Master_Following following = new Archive_Master_Following();
following.setFollowingType("11");
following.setMasterId(emrFaultDetail.getArchiveDetailId());
List<Archive_Master_Following> list = archiveMasterFollowingService.selLastByType(following);
if (list.size()>0){
if (StringUtils.isNotBlank(list.get(0).getRecallReason())){
archiveMaster.setArchivestate(list.get(0).getRecallReason());
archiveMasterService.updateByClo(archiveMaster);
}
}
bol = archiveMasterFollowingService.insertSelective(archiveMasterFollowing);
//向电子病历发送取消封存消息
pushStorageDto.setPATIENT_STATUS(0);
@ -227,12 +240,9 @@ public class storageController {
"</REQUEST>";
String endpoint = MedicalRecordUrl;
String method = MedicalRecordSealingName;
logger.log("endpoint:"+endpoint);
logger.log("method:"+method);
logger.log("xmlContent:"+xmlContent);
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient(endpoint);
Object[] res = null;
Client client = dcf.createClient(endpoint);
Object[] res = null;
res = client.invoke(method, xmlContent);
logger.log("封存返回:"+res);

@ -29,6 +29,16 @@ public class Archive_Master_Following {
private String remark;
private String recallReason;
public String getRecallReason() {
return recallReason;
}
public void setRecallReason(String recallReason) {
this.recallReason = recallReason;
}
public String getId() {
return id;
}

@ -23,6 +23,16 @@ public class Emr_Fault_Detail {
private String patientId;
private String StateFlag;
private String sealedState;
public String getSealedState() {
return sealedState;
}
public void setSealedState(String sealedState) {
this.sealedState = sealedState;
}
public String getSafekeepingName() {
return safekeepingName;
}

@ -63,6 +63,9 @@
<if test="safekeepingName != null">
safekeepingName,
</if>
<if test="recallReason != null">
recallReason,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<!--<if test="id != null">-->
@ -92,6 +95,9 @@
<if test="safekeepingName != null">
#{safekeepingName,jdbcType=NVARCHAR},
</if>
<if test="recallReason != null">
#{recallReason,jdbcType=NVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.Archive_Master_Following">

@ -206,6 +206,7 @@
<input id="inpNo1" hidden>
<input id="visitId1" hidden>
<input id="patientId1" hidden>
<input id="archivestate1" hidden>
<input id="name1" hidden>
<input type="hidden" id="id1" name="id" value=""/><label hidden id="danganhao1"></label>
<span style="vertical-align:top;">确认封存概述:</span><textarea rows="6" style="width:100%;"
@ -521,7 +522,7 @@
html = html + '<button class="btn btn-success btn-sm" onclick="recallFun(\'' + row.id + '\',\'' + row.id + '\',\'' + row. inpNo+ '\',\'' + row. visitId+ '\',\'' + row. patientId+ '\',\'' + row. name+ '\')">取消封存 </button>';
html = html + '<button class="btn btn-warning btn-sm" onclick="againRecallFun(\'' + row.id + '\',\'' + row.id + '\',\'' + row. inpNo+ '\',\'' + row. visitId+ '\',\'' + row. patientId+ '\',\'' + row. name+ '\')">再次封存 </button>';
}else {
html = html + '<button class="btn btn-warning btn-sm" onclick="recallFun1(\'' + row.id + '\',\'' + row.id + '\',\'' + row. inpNo+ '\',\'' + row. visitId+ '\',\'' + row. patientId+ '\',\'' + row. name+ '\')">封存 </button>';
html = html + '<button class="btn btn-warning btn-sm" onclick="recallFun1(\'' + row.id + '\',\'' + row.id + '\',\'' + row. inpNo+ '\',\'' + row. visitId+ '\',\'' + row. patientId+ '\',\'' + row. name+ '\',\'' + row. archivestate+ '\')">封存 </button>';
}
return html;
},
@ -590,7 +591,7 @@
}
function recallFun1(id, archiveDetailId,inpNo,visitId,patientId,name) {
function recallFun1(id, archiveDetailId,inpNo,visitId,patientId,name,archivestate) {
//生成表单token,防止表单重复提交
setFormToken();
$('#exampleModal1').modal({
@ -604,6 +605,7 @@
$("#patientId1").val(patientId);
$("#name1").val(name);
$("#danganhao1").html(archiveDetailId);
$("#archivestate1").val(archivestate);
}
@ -699,6 +701,7 @@
var visitId = $("#visitId1").val();
var patientId = $("#patientId1").val();
var name = $("#name1").val();
var sealedState = $("#archivestate1").val();
if (recallReason == "") {
return toastr.error("确认封存概述不能为空");
}
@ -709,6 +712,7 @@
url: "${path}/storage/updateState",
type: "POST",
data: {
"sealedState":sealedState,
"ArchiveState": "已封存",
"archiveDetailId": archiveDetailId,
recallReason: recallReason,

Loading…
Cancel
Save