|
|
|
@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import org.springframework.ui.Model;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
|
|
|
@ -30,9 +31,11 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.io.FileInputStream;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.io.OutputStream;
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
@Controller
|
|
|
|
|
@RequestMapping("/beHosp")
|
|
|
|
@ -48,6 +51,8 @@ public class beHospitaledController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private Sign_ListService signListService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ArchiveOtherExtService archiveOtherExtService;
|
|
|
|
|
|
|
|
|
|
@Autowired(required = false)
|
|
|
|
|
private Archive_Master_FollowingService archive_master_followingService;
|
|
|
|
@ -89,6 +94,7 @@ public class beHospitaledController {
|
|
|
|
|
@RequestMapping(value = "/wzByArchivId")
|
|
|
|
|
public String wzByArchivId(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) {
|
|
|
|
|
String result = "";
|
|
|
|
|
StringBuffer sb = new StringBuffer();
|
|
|
|
|
try {
|
|
|
|
|
String endpoint = HomepageDictionary;
|
|
|
|
|
//String endpoint = "http://localhost:8080/ca3/services/caSynrochnized?wsdl";
|
|
|
|
@ -129,19 +135,78 @@ public class beHospitaledController {
|
|
|
|
|
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
String nowTime = format1.format(new Date());
|
|
|
|
|
String result = "";
|
|
|
|
|
Emr_Fault_Detail entityFault=new Emr_Fault_Detail();
|
|
|
|
|
Emr_Fault_Detail entityFault = new Emr_Fault_Detail();
|
|
|
|
|
entityFault.setArchiveDetailId(emrFaultDetail.getArchiveDetailId());
|
|
|
|
|
List<Emr_Fault_Detail> faultList=emrFaultDetailService.selectByArchiveId(entityFault);
|
|
|
|
|
int flagNum=0;
|
|
|
|
|
if(faultList!=null && faultList.size()>0){
|
|
|
|
|
List<Emr_Fault_Detail> faultList = emrFaultDetailService.selectByArchiveId(entityFault);
|
|
|
|
|
int flagNum = 0;
|
|
|
|
|
if (faultList != null && faultList.size() > 0) {
|
|
|
|
|
//获取未处理缺陷数量
|
|
|
|
|
for (int k = 0; k < faultList.size(); k++) {
|
|
|
|
|
if ("1".equals(faultList.get(k).getBackFlag()) || "5".equals(faultList.get(k).getBackFlag())) {
|
|
|
|
|
flagNum+=1;
|
|
|
|
|
flagNum += 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String zyh = null;
|
|
|
|
|
String did = null;
|
|
|
|
|
Date c1 =null;
|
|
|
|
|
Date c2 =null;
|
|
|
|
|
Date c9 =null;
|
|
|
|
|
Date doctorTime=null;
|
|
|
|
|
Date nurseTime=null;
|
|
|
|
|
Date lastTime=null;
|
|
|
|
|
String MID = entityFault.getArchiveDetailId();
|
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
List<ArchiveOtherExt> archiveOtherExts = archiveOtherExtService.selectExtTime(MID);
|
|
|
|
|
if (!CollectionUtils.isEmpty(archiveOtherExts)) {
|
|
|
|
|
for (ArchiveOtherExt list : archiveOtherExts) {
|
|
|
|
|
zyh = list.getZyh();
|
|
|
|
|
did = list.getDid();
|
|
|
|
|
String date1 = list.getC1();
|
|
|
|
|
String date2 = list.getC2();
|
|
|
|
|
String date9 =list.getC9();
|
|
|
|
|
try {
|
|
|
|
|
c1 = simpleDateFormat.parse(date1);
|
|
|
|
|
c2 = simpleDateFormat.parse(date2);
|
|
|
|
|
c9 = simpleDateFormat.parse(date9);
|
|
|
|
|
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String sql = "SELECT * FROM JHEMR.V_DOCTOR_PDF4 WHERE INP_NO = '" + zyh + "' AND VISIT_ID = '" + did + "'";
|
|
|
|
|
try {
|
|
|
|
|
List<Map> selectList = OracleConnect.selectListConvertMap(sql);
|
|
|
|
|
if (!CollectionUtils.isEmpty(selectList)) {
|
|
|
|
|
|
|
|
|
|
for(Map map : selectList){
|
|
|
|
|
doctorTime = (Date) map.get("FINISHED_DATE_TIME");
|
|
|
|
|
nurseTime = (Date) map.get("MR_COMMIT_NURSE_DATE_TIME");
|
|
|
|
|
lastTime = (Date) map.get("FIRST_PAGE_FINISHED_SAVE_TIME");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
if(flagNum==0) {
|
|
|
|
|
}
|
|
|
|
|
String result1="";
|
|
|
|
|
String result2="";
|
|
|
|
|
String result3="";
|
|
|
|
|
if (c1.compareTo(doctorTime)<0){
|
|
|
|
|
result1="①检查文书有过修改,麻烦医生在电子病历系统重新提交医生文书";
|
|
|
|
|
}
|
|
|
|
|
if (c2.compareTo(nurseTime)<0){
|
|
|
|
|
result2="②检查文书有过修改,麻烦护士在电子病历系统重新提交护士文书";
|
|
|
|
|
}
|
|
|
|
|
if (c9.compareTo(lastTime)<0){
|
|
|
|
|
result3="③检查首页有过修改,麻烦医生在电子病历系统重新提交首页";
|
|
|
|
|
}
|
|
|
|
|
if (result1!="" ||result2!="" ||result3!="" ){
|
|
|
|
|
result=result1+result2+result3;
|
|
|
|
|
}
|
|
|
|
|
if (c1.compareTo(doctorTime)>=0 && c2.compareTo(nurseTime)>=0 && c9.compareTo(lastTime)>=0 ){
|
|
|
|
|
if(flagNum==0) {
|
|
|
|
|
try {
|
|
|
|
|
String endpoint = HomepageDictionary;
|
|
|
|
|
//String endpoint = "http://localhost:8080/ca3/services/caSynrochnized?wsdl";
|
|
|
|
@ -204,6 +269,7 @@ public class beHospitaledController {
|
|
|
|
|
}else{
|
|
|
|
|
result = "提交失败,存在缺陷未处理!";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|