1、新增其他大类检验、以及其他报告、核医学报告

2、将检查检验 校验合并
master
leijx 5 years ago
parent 0562f5c169
commit 37dd215553

@ -22,7 +22,6 @@
<datasource-mapping>
<factory-entry name="entityManagerFactory" value="6edb82ac-2a6f-4a02-a12c-6a834b1768ab" />
</datasource-mapping>
<naming-strategy-map />
</configuration>
</facet>
</component>
@ -37,6 +36,22 @@
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.38" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:2.1" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.1.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.1.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.1.RELEASE" level="project" />

@ -1,24 +1,11 @@
package com.ann.demo;
import com.ann.demo.entity.filing.ArchiveDetail;
import com.ann.demo.interfaces.impl.HomepageDictionaryImpl;
import com.ann.demo.repository.ArchiveDetailRepository;
import com.ann.demo.repository.ArchiveMasterRepository;
import com.ann.demo.service.ArchiveDetailService;
import com.ann.demo.service.ArchiveMasterService;
import com.ann.demo.service.impl.ArchiveDetailServiceImpl;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import sun.net.ftp.FtpClient;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @Author: LeiJiaXin
@ -55,7 +42,7 @@ public class TestController {
Object[] objects = new Object[0];
// invoke("方法名",参数1,参数2,参数3....);
try {
objects = client.invoke("CheckData", "010affd1-cba8-4ece-97a2-ef49931151ed");
objects = client.invoke("CheckData", "a3a93afa-6e7e-43fd-99af-18cb7437bc4c");
} catch (Exception e) {
e.printStackTrace();
}
@ -64,12 +51,8 @@ public class TestController {
@RequestMapping("/haha")
public String createJob() {
List<String> list = new ArrayList<String>();
list.add("10");
// archiveDetailService.getInspectionReportNotExits(list,"02e4bec6-633f-49cf-9acd-a3d332376800");
public void createJob() {
return "123";
}
// Integer result = archiveMasterService.countByIdAndIsValid(masterId);

@ -143,4 +143,9 @@ public class ArchiveMaster {
private String emrNurseCmt;
private String emrDoctorCmt;
// 死亡字段
private String deathFlag = "0";
}

@ -9,4 +9,6 @@ public class ExamApplyDto {
private String applyId;
private String name;
private String reportType;
}

@ -5,12 +5,14 @@ import com.ann.demo.entity.filing.ArchiveMaster;
import com.ann.demo.interfaces.HomepageDictionary;
import com.ann.demo.service.ArchiveDetailService;
import com.ann.demo.service.ArchiveMasterService;
import com.google.common.base.Objects;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import javax.jws.WebService;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -75,31 +77,42 @@ public class HomepageDictionaryImpl implements HomepageDictionary {
List<String> types = Arrays.asList(mustCheckDataArray);
String typeIsExits = archiveDetailService.getTypeNotExits(types, masterId);
if (typeIsExits != null) {
sb.append(typeIsExits + "缺失");
}
}
// 检查申请单
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(";");
//----------------单独处理出院记录
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 +",死亡记录缺失");
}else{
sb.append(typeIsExits + ",出院记录缺失");
}
sb.append(typeIsExits1);
}
//----------------单独处理出院记录
}
}
// // 检查申请单
// 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(",");

@ -28,7 +28,7 @@ public interface ArchiveDetailRepository extends JpaRepository<ArchiveDetail, St
@Query(value = " SELECT stuff( " +
" ( select '' +name+'缺失' + cast(COUNT(report_type) as varchar)+'份' from exam_apply e " +
" where not exists (select 1 from archive_detail a where source <> '后台' and a.apply_id = e.apply_id and a.assortid in ?1 ) " +
" where not exists (select 1 from archive_detail a where source <> '后台' and a.apply_id = e.apply_id and a.assortid in ?1 and a.masterId = ?2 ) " +
" and exists (select 1 from archive_master m " +
" where m.inp_no = e.inp_no and m.visit_id = e.visit_id and m.patient_id = e.patient_id and " +
" m.ID = ?2 ) " +
@ -89,17 +89,17 @@ public interface ArchiveDetailRepository extends JpaRepository<ArchiveDetail, St
@Query(value = " select apply_id from archive_detail d where" +
" d.AssortID in ?1" +
" and masterid = ?2 " +
" and d.flag = 0 and source <> '后台' ",nativeQuery = true)
" and d.flag = 0 and source <> '后台' order by assortid ",nativeQuery = true)
List<String> getInspectionApply(List<String> type,String masterId);
@Query(value = " select e.apply_id as applyId,e.name from exam_apply e " +
@Query(value = " select e.apply_id as applyId,e.name,e.report_type as reportType from exam_apply e " +
" where e.report_type in ?1 and e.is_valid = 0 and e.is_open_his = 'E' and e.is_open_other = 'E' " +
" and exists " +
" (select 1 from archive_master m where m.inp_no = e.inp_no and m.visit_id = e.visit_id " +
" and m.patient_id = e.patient_id " +
" and m.ID = ?2) ",nativeQuery = true)
" and m.ID = ?2) order by e.report_type ",nativeQuery = true)
List<Map<Object, Object>> getAllInspectionApply(List<String> type, String masterId);
}

@ -44,8 +44,8 @@ public class ArchiveDetailServiceImpl implements ArchiveDetailService {
//转成对应的集合
List<ExamApplyDto> examAllList = new ArrayList<ExamApplyDto>();
for (Map<Object, Object> map: examAllTempList){
ExamApplyDto messageLogDto = MapObjUtil.map2Object(map,ExamApplyDto.class);
examAllList.add(messageLogDto);
ExamApplyDto examApplyDto = MapObjUtil.map2Object(map,ExamApplyDto.class);
examAllList.add(examApplyDto);
}
// 2、查出所有的detail
List<String> applyIdTempList = archiveDetailRepository.getInspectionApply(type, masterId);
@ -64,7 +64,7 @@ public class ArchiveDetailServiceImpl implements ArchiveDetailService {
Map<String, Integer> map = new HashMap<String, Integer>();
for(ExamApplyDto examApplyDto:
resultList){
String name = examApplyDto.getName() ==null ? "检验报告":examApplyDto.getName();
String name = examApplyDto.getName() ==null ? (Objects.equals(examApplyDto.getReportType(),"10") ? "检验报告" : "检查报告"):examApplyDto.getName();
if(map.containsKey(name)){
map.put(name, map.get(name).intValue() + 1);
}else{

@ -1,17 +1,25 @@
spring:
datasource:
url: jdbc:mysql://localhost:3306/test?serverTimezone=UTC&characterEncoding=utf8&useUnicode=true&useSSL=false
# url: jdbc:mysql://10.6.1.127:3306/test
username: root
password: 123456
driver-class-name: com.mysql.jdbc.Driver
# url: jdbc:mysql://localhost:3306/test?serverTimezone=UTC&characterEncoding=utf8&useUnicode=true&useSSL=false
# # url: jdbc:mysql://10.6.1.127:3306/test
# username: root
# password: 123456
# driver-class-name: com.mysql.jdbc.Driver
# jpa:
# database: mysql
# show-sql: false
# hibernate:
# ddl-auto: update
# database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
url: jdbc:sqlserver://10.6.1.127:1433;DatabaseName=DB_PrivilegeManagement_GYFY
username: sa
password: docus@702
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
jpa:
database: mysql
database: sql_server
show-sql: false
hibernate:
ddl-auto: update
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
dialect: org.hibernate.dialect.SQLServer2008Dialect
hikari:
#是否为只读数据库
read-only: false
@ -29,6 +37,8 @@ spring:
minimum-idle: 10
#完整性核查 必查项填类型id
mustCheckData: 3,9
inspectionReportType: 10
#9月 增加大类的校验
mustCheckData: 3,9,11,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