单独处理出院记录

master
leijx 5 years ago
parent cd22cb1ab9
commit ba47b1a818

@ -42,7 +42,7 @@ public class TestController {
Object[] objects = new Object[0];
// invoke("方法名",参数1,参数2,参数3....);
try {
objects = client.invoke("CheckData", "8b033ba1-5ab7-457e-94d3-c5660c1261ab");
objects = client.invoke("CheckData", "00e1d935-e89f-410b-9c29-bf2eae654f19");
} catch (Exception e) {
e.printStackTrace();
}

@ -76,43 +76,33 @@ public class HomepageDictionaryImpl implements HomepageDictionary {
String[] mustCheckDataArray = mustCheckData.split(",");
List<String> types = Arrays.asList(mustCheckDataArray);
String typeIsExits = archiveDetailService.getTypeNotExits(types, masterId);
if (typeIsExits != null) {
//----------------单独处理出院记录
List list = new ArrayList<String>();
list.add("113");
String dischargeType = archiveDetailService.getTypeNotExits(list, masterId);
if(dischargeType != null){
if(Objects.equal( archiveMaster.getDeathFlag(),"1" ) ){
sb.append(typeIsExits +",死亡记录缺失");
if (typeIsExits != null ) {
sb.append("缺失"+typeIsExits);
}
//----------------单独处理出院记录,包含情况 2021-1-14
//----------------如果缺失出院记录那么考虑是不是24小时病历如果是那么提示不缺失如果不是 那么考虑是不是存在die病历如果是那么提示缺失死亡记录否择提示缺失出院记录
List list = new ArrayList<String>();
list.add("113");
list.add("11");
String disResult = archiveDetailService.getTypeNotExits(list, masterId);
if (disResult != null ) {
//再判断是不是24小时入院
String beHospitalized = archiveDetailService.getBeHospitalized(masterId, "9");
if (!Objects.equal(beHospitalized, "24小时内入出院记录")) {
if (Objects.equal(archiveMaster.getDeathFlag(), "1")) {
Integer dieResult = archiveDetailService.countDetail(masterId, "17");
if(dieResult == 0){
sb.append(",死亡记录");
}
}else{
sb.append(typeIsExits + ",出院记录缺失");
sb.append("" + disResult);
}
}
//----------------单独处理出院记录
}
//----------------单独处理出院记录
}
// // 检查申请单
// if (!checkReportType.equals("")) {
// String[] checkReportTypeArray = checkReportType.split(",");
// List<String> types = Arrays.asList(checkReportTypeArray);
// String checkReportNotExits = archiveDetailService.getCheckReportNotExits(types, masterId);
// if (checkReportNotExits != null) {
// if (sb.length() != 0) {
// sb.append(";");
// }
// sb.append(checkReportNotExits);
// }else{
// String typeIsExits1 = archiveDetailService.getCheckReportNotExits1(types, masterId);
// if (typeIsExits1 != null) {
// if (sb.length() != 0) {
// sb.append(";");
// }
// sb.append(typeIsExits1);
// }
//
// }
// }
// 检验申请单
if (!inspectionReportType.equals("")) {
String[] inspectionReportTypeArray = inspectionReportType.split(",");

@ -1,6 +1,7 @@
package com.ann.demo.repository;
import com.ann.demo.entity.filing.ArchiveDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
@ -101,5 +102,12 @@ public interface ArchiveDetailRepository extends JpaRepository<ArchiveDetail, St
" and m.patient_id = e.patient_id " +
" and m.ID = ?2) order by e.report_type,e.name,e.author_report_time ",nativeQuery = true)
List<Map<Object, Object>> getAllInspectionApply(List<String> type, String masterId);
@Query("select o.title from ArchiveDetail o where o.masterID = ?1 and o.assortID = ?2 and o.flag = ?3 ")
public String getResultByMasterIDAndAssortIDAndFlag(String masterId,String assortId,String flag);
@Query("select count(o) from ArchiveDetail o where o.masterID = ?1 and o.assortID = ?2 and o.flag = ?3 ")
public Integer countDetail(String masterId,String assortId,String flag);
}

@ -1,6 +1,8 @@
package com.ann.demo.service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
@ -19,4 +21,8 @@ public interface ArchiveDetailService {
String getCheckReportNotExits1(List<String> types, String masterId);
String getInspectionReportNotExits1(List<String> types, String masterId);
String getBeHospitalized(String masterId,String assortId);
Integer countDetail(String masterId, String s);
}

@ -94,6 +94,16 @@ public class ArchiveDetailServiceImpl implements ArchiveDetailService {
return result;
}
@Override
public String getBeHospitalized(String masterid,String assortId) {
return archiveDetailRepository.getResultByMasterIDAndAssortIDAndFlag(masterid,assortId,"0");
}
@Override
public Integer countDetail(String masterId, String s) {
return archiveDetailRepository.countDetail(masterId,s,"0");
}
// @Override
// public String getInspectionReportNotExits(List<String> type,String masterId) {
// return archiveDetailRepository.getInspectionReportNotExits( type,masterId);

@ -39,7 +39,7 @@ spring:
#完整性核查 必查项填类型id
#9月 增加大类的校验
mustCheckData: 3,9,11,20,122,123,5,7,2
mustCheckData: 3,9,20,122,123,5,7,2
#2020-9-23 1、新增60、110 核医学以及其他报告 2、将检查检验校验合并因超声会有合并报告
inspectionReportType: 54,59,52,57,60,110,10
checkReportType: 54,59,52,57

Loading…
Cancel
Save