Compare commits

..

25 Commits

Author SHA1 Message Date
宇宙皮皮娃 baef72c0a9 过滤c 3 months ago
wyb c87701c73c fix: 科室添加接口验证住院类型,住院的科室保存修改 6 months ago
wyb bd8e9272ca fix:人员不处理 6 months ago
宇宙皮皮娃 3a658bbf97 新增查报告接口导出 11 months ago
宇宙皮皮娃 ea6f1b60c2 新增查报告接口导出 11 months ago
宇宙皮皮娃 a0b1726b27 新增查报告接口导出 11 months ago
宇宙皮皮娃 603f8f2bbb 新增查报告接口导出 11 months ago
宇宙皮皮娃 0b4e3a8563 新增查报告接口 11 months ago
宇宙皮皮娃 8cabe7d830 新增查报告接口 1 year ago
宇宙皮皮娃 15fd83bd9d 基础数据修改医生 1 year ago
宇宙皮皮娃 e66d5725fd 基础数据修改时间 1 year ago
宇宙皮皮娃 bcbf6f0b33 基础数据修改时间 1 year ago
宇宙皮皮娃 264b4e537b 基础数据修改时间 1 year ago
wyb ed91a4f741 fix:修复签出调整任务优先级 3,1为job补漏,2为重采,4为紧急采集 1 year ago
宇宙皮皮娃 75226bf375 超时重发维护 1 year ago
宇宙皮皮娃 f05e85cba2 超时重发维护 1 year ago
wyb 929eeea5c0 签出调整任务优先级 2 years ago
wyb d01f602b0a 病案签出,如果有宝宝,宝宝也需要生成任务 2 years ago
宇宙皮皮娃 64a4bc8c8f 死亡和母亲流水号维护 2 years ago
宇宙皮皮娃 4da34e1d0b 测试 2 years ago
宇宙皮皮娃 c4f20ed0f7 签出返修维护 2 years ago
宇宙皮皮娃 f255d0f818 增加过滤其他数据的字段 2 years ago
宇宙皮皮娃 540ce8c379 过滤血液净化 2 years ago
宇宙皮皮娃 8936fc1eb6 过滤血液净化 2 years ago
宇宙皮皮娃 4499dda868 入院时间为空则不同步 2 years ago

@ -87,6 +87,11 @@
<version>3.4.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>

@ -3,7 +3,6 @@ package com.docus.server;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
@ -14,7 +13,6 @@ import org.springframework.jms.annotation.EnableJms;
@SpringBootApplication(scanBasePackages ={"com.docus","com.neusoft"})
@EnableJms
@EnableFeignClients
@MapperScan("com.docus.server.**.mapper")
public class AppRunBootstrap {
public static void main(String[] args) {
System.setProperty("javax.xml.parsers.DocumentBuilderFactory","com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");

@ -0,0 +1,68 @@
package com.docus.server.collection.config;
import com.alibaba.druid.pool.DruidDataSource;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.type.JdbcType;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import javax.sql.DataSource;
@Configuration
@MapperScan(basePackages = com.docus.server.collection.config.DbMysqlConfig.PACKAGE, sqlSessionFactoryRef = "dbmysqlSqlSessionFactory")
@EnableConfigurationProperties(MybatisPlusProperties.class)
public class DbMysqlConfig {
// 这里一定要指定精准 否则后果不堪设想
static final String PACKAGE = "com.docus.server.collection.infrastructure.dao.mapper";
static final String MAPPER_LOCATION = "classpath:mapper/*.xml";
@Bean(name = "dbmysqlDataSource")
@ConfigurationProperties(prefix = "spring.datasource.mysql-docus")
public DataSource secondDataSource(){
return new DruidDataSource();
}
/*注入事务*/
@Bean(name = "dbmysqlTransactionManager")
public DataSourceTransactionManager secondTransactionManager() {
return new DataSourceTransactionManager(secondDataSource());
}
@Bean(name = "dbmysqlSqlSessionFactory")
public SqlSessionFactory secondSqlSessionFactory(@Qualifier("dbmysqlDataSource") DataSource dataSource)
throws Exception {
//配置mybatis-plus源
MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
//添加XML目录
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
bean.setMapperLocations(resolver.getResources(MAPPER_LOCATION));
// 实体类别名
bean.setTypeAliasesPackage("com.docus.server.collection.infrastructure.dao.entity.*");
MybatisConfiguration configuration = new MybatisConfiguration();
//开启下划线转驼峰
configuration.setMapUnderscoreToCamelCase(true);
configuration.setJdbcTypeForNull(JdbcType.NULL);
bean.setDataSource(dataSource);
bean.setConfiguration(configuration);
return bean.getObject();
//
// final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
// sessionFactory.setDataSource(secondDataSource);
// sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver()
// .getResources(DbMysqlConfig.MAPPER_LOCATION));
// return sessionFactory.getObject();
}
}

@ -0,0 +1,48 @@
package com.docus.server.collection.config;
import com.alibaba.druid.pool.DruidDataSource;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import javax.sql.DataSource;
@Configuration
@MapperScan(basePackages = com.docus.server.collection.config.DbSqlserverConfig.PACKAGE, sqlSessionFactoryRef = "dbsqlserverSqlSessionFactory")
@EnableConfigurationProperties(MybatisPlusProperties.class)
public class DbSqlserverConfig {
// 这里一定要指定精准 否则后果不堪设想
static final String PACKAGE = "com.docus.server.collection.infrastructure.dao.sqlserver";
static final String MAPPER_LOCATION = "classpath:sqlserver/*.xml";
@Bean(name = "dbsqlserverDataSource")
@ConfigurationProperties(prefix = "spring.datasource.sqlserver-docus")
public DataSource secondDataSource(){
return new DruidDataSource();
}
/*注入事务*/
@Bean(name = "dbsqlserverTransactionManager")
public DataSourceTransactionManager secondTransactionManager() {
return new DataSourceTransactionManager(secondDataSource());
}
@Bean(name = "dbsqlserverSqlSessionFactory")
public SqlSessionFactory secondSqlSessionFactory(@Qualifier("dbsqlserverDataSource") DataSource secondDataSource)
throws Exception {
final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
sessionFactory.setDataSource(secondDataSource);
sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver()
.getResources(com.docus.server.collection.config.DbSqlserverConfig.MAPPER_LOCATION));
return sessionFactory.getObject();
}
}

@ -1,12 +1,21 @@
package com.docus.server.collection.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.write.builder.ExcelWriterBuilder;
import com.docus.core.util.DateUtil;
import com.docus.core.util.Func;
import com.docus.infrastructure.core.exception.BaseException;
import com.docus.infrastructure.util.easyexcel.ExcelUtil;
import com.docus.infrastructure.web.api.CommonResult;
import com.docus.infrastructure.web.api.ResultCode;
import com.docus.server.collection.converter.FirstPageCheckoutConverter;
import com.docus.server.collection.dto.FirstPageCheckoutInDTO;
import com.docus.server.collection.dto.FirstPageCheckoutRequest;
import com.docus.server.collection.dto.VJsjWzh7addnjreportDto;
import com.docus.server.collection.entity.VJsjWzh7addnjreport;
import com.docus.server.collection.entity.VJsjWzh7addnjreportVo;
import com.docus.server.collection.feign.service.MedicalrecordService;
import com.docus.server.collection.infrastructure.dao.sqlserver.VJsjWzh7addnjreportMapper;
import com.docus.server.collection.service.MzZyHisService;
import com.docus.server.collection.util.PersistRequestUtil;
import com.docus.server.collection.validator.RequestValidator;
@ -15,13 +24,14 @@ import com.docus.server.collection.validator.impl.FirstPageCheckoutRequestValida
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
@Api("梅州中西HIS相关接口")
@Slf4j
@ -31,6 +41,12 @@ public class MzZyHisController {
@Resource
private MzZyHisService mzZyHisService;
@Resource
private MedicalrecordService medicalrecordService;
@Resource
private VJsjWzh7addnjreportMapper vmp;
@ApiOperation("首页签出")
@PostMapping("/firstPageCheckout")
public CommonResult<String> firstPageCheckout(@RequestBody FirstPageCheckoutRequest firstPageCheckoutRequest, HttpServletRequest servletRequest) {
@ -58,4 +74,50 @@ public class MzZyHisController {
}
}
@ApiOperation("查询报告")
@PostMapping("/getReport")
public CommonResult<List<VJsjWzh7addnjreport>> getReport(@RequestBody VJsjWzh7addnjreportDto dto) {
List<VJsjWzh7addnjreport> reports = vmp.getReport(dto);
return CommonResult.success(reports);
}
@ApiOperation("内镜超期导出excel---按勾选")
@PostMapping("/export")
public void export(HttpServletResponse resp, @RequestBody List<VJsjWzh7addnjreportVo> vos) {
OutputStream outputStream = ExcelUtil.getOutputStream("内镜超期报告.xls", resp);
ExcelWriterBuilder write = EasyExcel.write(outputStream, VJsjWzh7addnjreportVo.class);
write.sheet("sheet1").doWrite(vos);
}
@ApiOperation("内镜超期导出excel---按条件")
@PostMapping("/exportAll")
public void exportAll(HttpServletResponse resp,
@RequestBody VJsjWzh7addnjreportDto dto) {
List<VJsjWzh7addnjreport> reports = vmp.getReport(dto);
List<VJsjWzh7addnjreportVo> reportsVo=new ArrayList<VJsjWzh7addnjreportVo>();
reports.forEach(report->{
VJsjWzh7addnjreportVo vo=new VJsjWzh7addnjreportVo();
vo.setDept(report.getDept());
vo.setInpatientNo(report.getInpatientNo());
vo.setItem(report.getItem());
vo.setName(report.getName());
vo.setRegistDateTime(DateUtil.format(report.getRegistDateTime(),"yyyy-MM-dd HH:mm:ss"));
vo.setReportDateTime(DateUtil.format(report.getReportDateTime(),"yyyy-MM-dd HH:mm:ss"));
vo.setType(report.getType());
reportsVo.add(vo);
});
export(resp, reportsVo);
}
@ApiOperation("测试")
@GetMapping("/test")
public CommonResult<List> test() {
return CommonResult.success(mzZyHisService.getPid());
}
@ApiOperation("测试sql")
@GetMapping("/vmp")
public CommonResult<List> vmp() {
return CommonResult.success(vmp.getList());
}
}

@ -31,4 +31,5 @@ public class TBasicDto {
private String bedNum;
private String isDead;
private String admissDays;
private String motherInpatientNo;
}

@ -0,0 +1,28 @@
package com.docus.server.collection.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @BelongsProject: docus-mzzy-collector
* @BelongsPackage: com.docus.server.collection.entity
* @Author: chierhao
* @CreateTime: 2024-07-31 15:47
* @Description: TODO
* @Version: 1.0
*/
@Data
public class VJsjWzh7addnjreportDto {
@ApiModelProperty(value = "姓名")
private String name;
@ApiModelProperty(value = "住院号")
private String inpatientNo;
@ApiModelProperty(value = "报告开始时间 格式yyyy-MM-dd")
private String startReportDateTime;
@ApiModelProperty(value = "报告结束时间 格式yyyy-MM-dd")
private String endReportDateTime;
}

@ -0,0 +1,48 @@
package com.docus.server.collection.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @BelongsProject: docus-mzzy-collector
* @BelongsPackage: com.docus.server.collection.entity
* @Author: chierhao
* @CreateTime: 2024-07-31 15:47
* @Description: TODO
* @Version: 1.0
*/
@Data
public class VJsjWzh7addnjreport extends BaseRowModel {
@ApiModelProperty(value = "姓名")
@ExcelProperty(value = {"姓名"}, index =0 )
private String name;
@ApiModelProperty(value = "住院号")
@ExcelProperty(value = {"住院号"}, index =1 )
private String inpatientNo;
@ApiModelProperty(value = "类型")
@ExcelProperty(value = {"类型"}, index =2 )
private String type;
@ApiModelProperty(value = "申请科室")
@ExcelProperty(value = {"申请科室"}, index =3 )
private String dept;
@ApiModelProperty(value = "项目")
@ExcelProperty(value = {"项目"}, index =4 )
private String item;
@ApiModelProperty(value = "登记时间")
@ExcelProperty(value = {"登记时间"}, index =5 )
private Date registDateTime;
@ApiModelProperty(value = "报告时间")
@ExcelProperty(value = {"报告时间"}, index =6 )
private Date reportDateTime;
}

@ -0,0 +1,46 @@
package com.docus.server.collection.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @BelongsProject: docus-mzzy-collector
* @BelongsPackage: com.docus.server.collection.entity
* @Author: chierhao
* @CreateTime: 2024-07-31 15:47
* @Description: TODO
* @Version: 1.0
*/
@Data
public class VJsjWzh7addnjreportVo extends BaseRowModel {
@ApiModelProperty(value = "姓名")
@ExcelProperty(value = {"姓名"}, index =0 )
private String name;
@ApiModelProperty(value = "住院号")
@ExcelProperty(value = {"住院号"}, index =1 )
private String inpatientNo;
@ApiModelProperty(value = "类型")
@ExcelProperty(value = {"类型"}, index =2 )
private String type;
@ApiModelProperty(value = "申请科室")
@ExcelProperty(value = {"申请科室"}, index =3 )
private String dept;
@ApiModelProperty(value = "项目")
@ExcelProperty(value = {"项目"}, index =4 )
private String item;
@ApiModelProperty(value = "登记时间")
@ExcelProperty(value = {"登记时间"}, index =5 )
private String registDateTime;
@ApiModelProperty(value = "报告时间")
@ExcelProperty(value = {"报告时间"}, index =6 )
private String reportDateTime;
}

@ -0,0 +1,23 @@
package com.docus.server.collection.feign.service;
import com.docus.infrastructure.web.api.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* @author ceh
*/
@FeignClient(url = "${docus.url.sign-out-url}",name = "Medicalrecord")
public interface MedicalrecordService {
/*
* @description
* @author chierhao
* @date 2023-10-08 11:00
* @param patientId
* @return: com.docus.infrastructure.web.api.CommonResult
*/
@PostMapping("/basic/tbasic/signOutOrBackRepair")
CommonResult signOutOrBackRepair(@RequestParam(value = "patientId") String patientId);
}

@ -1,10 +1,11 @@
package com.docus.server.collection.httpservices.impl;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil;
import com.docus.core.util.Func;
import com.docus.server.collection.dto.TBasicDto;
import com.docus.server.collection.httpservices.HttpTBasicService;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.http.util.HttpUtil;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@ -28,13 +29,22 @@ public class HttpTBasicServiceImpl implements HttpTBasicService {
try {
//发送get请求获取返货值
log.info("发送请求开始");
String resultStr = HttpUtil.get(url, headers, params);
HttpRequest get = HttpUtil.createGet(url);
for (Map.Entry<String, String> map : headers.entrySet()) {
get.header(map.getKey(),map.getValue());
}
get.form(params);
get.timeout(60*1000);
String resultStr = get.execute().body();
// String resultStr = HttpUtil.get(url, headers, params);
//解析返货值字符串
log.info("解析:"+resultStr);
tBasicDtos=parsing(resultStr);
}catch (Exception e){
log.error(e.getMessage(),e);
log.info("重试");
return getTBasicDto(url,headers,params);
}
return tBasicDtos;
}
@ -79,9 +89,9 @@ public class HttpTBasicServiceImpl implements HttpTBasicService {
//出院科室名称
String disDeptName=map.get("deptName");
//主管医生编号
String attending=map.get("directorDocCode");
String attending=map.get("residencyDocCode");
//主管医生姓名
String attendingName=map.get("directorDocName");
String attendingName=map.get("residencyDocName");
//责任护士编号
String dutyNurse=map.get("dutyNurseName");
//年龄
@ -93,10 +103,12 @@ public class HttpTBasicServiceImpl implements HttpTBasicService {
//住院天数
String admissDays=map.get("inDays");
//是否死亡
String isDead=map.get("");
String isDead=map.get("outType");
//床位号
String bedNum=map.get("bedNo");
String motherInpatientNo=map.get("motherInpatientNo");
TBasicDto tBasicDto=new TBasicDto();
tBasicDto.setAdmissDays(admissDays);
tBasicDto.setIsDead(isDead);
@ -117,6 +129,7 @@ public class HttpTBasicServiceImpl implements HttpTBasicService {
tBasicDto.setName(name);
tBasicDto.setInpatientNo(inpatientNo);
tBasicDto.setDutyNurse(dutyNurse);
tBasicDto.setMotherInpatientNo(motherInpatientNo);
tBasicDtos.add(tBasicDto);
}

@ -91,4 +91,10 @@ public class TBasic implements Serializable {
@ApiModelProperty(value = "责任护士")
private String dutyNurse;
@ApiModelProperty(value = "是否其他数据 0否1是婴儿2医疗保险类别是家庭病床")
private Integer isOther;
@ApiModelProperty(value = "婴儿母亲住院流水号")
private String motherInpatientNo;
}

@ -23,4 +23,8 @@ public interface TBasicMapper{
Integer update(@Param("tBasic") TBasic tBasic);
String getPatientIdByJzh(@Param("jzh") String jzh);
List<String> getPatientIdByMomJzh(@Param("momJzh") String momJzh);
List<String> getPid();
}

@ -0,0 +1,21 @@
package com.docus.server.collection.infrastructure.dao.sqlserver;
import com.docus.server.collection.dto.VJsjWzh7addnjreportDto;
import com.docus.server.collection.entity.VJsjWzh7addnjreport;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @BelongsProject: docus-mzzy-collector
* @BelongsPackage: com.docus.server.collection.infrastructure.dao.mapper.sqlserver
* @Author: chierhao
* @CreateTime: 2024-07-31 14:31
* @Description: TODO
* @Version: 1.0
*/
public interface VJsjWzh7addnjreportMapper {
List<String> getList();
List<VJsjWzh7addnjreport> getReport(@Param("dto") VJsjWzh7addnjreportDto dto);
}

@ -1,7 +1,9 @@
package com.docus.server.collection.receiver;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.docus.server.collection.dto.DeptDto;
import com.docus.server.collection.dto.UserDto;
import com.docus.server.collection.rpc.MzZyyRocCurrWebCommonRpc;
import com.docus.server.collection.service.IPowerDeptService;
import com.docus.server.collection.service.IPowerUserService;
import com.docus.server.collection.xml.parsers.MzZyParser;
@ -22,37 +24,61 @@ public class MzZyMqReceiver {
private IPowerUserService powerUserService;
@Autowired
private IPowerDeptService powerDeptService;
@Autowired
private MzZyyRocCurrWebCommonRpc mzZyyRocCurrWebCommonRpc;
/**
*
*
* @param message
*/
@JmsIbmListener(destination = "TJ_createDepartment")
public void revCreateDepartment(String message){
log.info("注册科室 队列接收信息:{}",message);
public void revCreateDepartment(String message) {
log.info("注册科室 队列接收信息:{}", message);
try {
DeptDto deptDto= MzZyParser.parseCreateDept(message);
powerDeptService.register(deptDto);
}catch (Exception ex){
log.error("处理注册科室 队列接收信息:{},出现异常:{}",message,ex.getMessage());
DeptDto deptDto = MzZyParser.parseCreateDept(message);
// 只保存住院的,如果接口异常也保存
JSONObject jsonObject = mzZyyRocCurrWebCommonRpc.queryDept(deptDto.getDeptCode(), "I");
if (jsonObject == null) {
powerDeptService.register(deptDto);
return;
}
boolean success = "200".equals(jsonObject.getString("code"));
JSONArray data = jsonObject.getJSONArray("data");
if (success && data.size() > 0) {
powerDeptService.register(deptDto);
}
} catch (Exception ex) {
log.error("处理注册科室 队列接收信息:{},出现异常:{}", message, ex.getMessage());
}
}
/**
*
*
* @param message
*/
@JmsIbmListener(destination = "TJ_updateDepartment")
public void revUpdateDepartment(String message){
log.info("变更科室 队列接收信息:{}",message);
public void revUpdateDepartment(String message) {
log.info("变更科室 队列接收信息:{}", message);
try {
DeptDto deptDto=MzZyParser.parseUpdateDept(message);
powerDeptService.register(deptDto);
}catch (Exception ex){
log.error("处理变更科室 队列接收信息:{},出现异常:{}",message,ex.getMessage());
DeptDto deptDto = MzZyParser.parseUpdateDept(message);
// 只保存住院的,如果接口异常也保存
JSONObject jsonObject = mzZyyRocCurrWebCommonRpc.queryDept(deptDto.getDeptCode(), "I");
if (jsonObject == null) {
powerDeptService.register(deptDto);
return;
}
boolean success = "200".equals(jsonObject.getString("code"));
JSONArray data = jsonObject.getJSONArray("data");
if (success && data.size() > 0) {
powerDeptService.register(deptDto);
}
} catch (Exception ex) {
log.error("处理变更科室 队列接收信息:{},出现异常:{}", message, ex.getMessage());
}
}
@ -60,34 +86,40 @@ public class MzZyMqReceiver {
/**
*
*
* @param message
*/
@JmsIbmListener(destination = "TJ_createPractitioner")
public void revCreatePractitioner(String message){
log.info("人员注册 队列接收信息:{}",message);
public void revCreatePractitioner(String message) {
log.info("人员注册 队列接收信息:{}", message);
/*
try {
UserDto userDto=MzZyParser.parseCreateUser(message);
powerUserService.register(userDto);
}catch (Exception ex){
log.error("处理人员注册 队列接收信息:{},出现异常:{}",message,ex.getMessage());
}
*/
}
/**
*
*
* @param message
*/
@JmsIbmListener(destination = "TJ_updatePractitioner")
public void revUpdatePractitioner(String message){
log.info("人员变更 队列接收信息:{}",message);
public void revUpdatePractitioner(String message) {
log.info("人员变更 队列接收信息:{}", message);
/*
try {
UserDto userDto=MzZyParser.parseUpdateUser(message);
powerUserService.register(userDto);
}catch (Exception ex){
log.error("处理人员注册 队列接收信息:{},出现异常:{}",message,ex.getMessage());
}
*/
}
}

@ -0,0 +1,18 @@
package com.docus.server.collection.rpc;
import com.alibaba.fastjson.JSONObject;
/**
* roc curr-web api
* @author YongBin Wen
* @date 2025/2/8 10:04
*/
public interface MzZyyRocCurrWebCommonRpc {
/**
*
* @param deptCode
* @param deptType C I , F L (logistics) PI T O D P N
* @return
*/
JSONObject queryDept(String deptCode, String deptType);
}

@ -0,0 +1,50 @@
package com.docus.server.collection.rpc.impl;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSONObject;
import com.docus.server.collection.rpc.MzZyyRocCurrWebCommonRpc;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
/**
* roc curr-web api
*
* @author YongBin Wen
* @date 2025/2/8 10:04
*/
@Service
@Slf4j
public class MzZyyRocCurrWebCommonRpcImpl implements MzZyyRocCurrWebCommonRpc {
@Value("${mzzyy.url.roc.curr-web: http://199.168.91.110:7800/roc/curr-web}")
private String rocCurrWebUrl;
@Value("${mzzyy.roc-domain: WZHBA}")
private String rocDomain;
@Value("${mzzyy.roc-key: b91b0ac7-665f-4874-a282-2f5511a44263}")
private String rocKey;
@Override
public JSONObject queryDept(String deptCode, String deptType) {
final String path = "/api/v1/common/dept/query";
final String url = rocCurrWebUrl + path;
Map<String, Object> paramMap = new HashMap<>(2);
paramMap.put("deptCode", deptCode);
paramMap.put("deptType", deptType);
try {
String result = HttpUtil.createGet(url)
.header("Content-Type", "application/json")
.header("domain", rocDomain)
.header("key", rocKey)
.form(paramMap)
.timeout(60 * 1000)
.execute().body();
return JSONObject.parseObject(result);
} catch (Exception ex) {
log.error(url + " 请求出错了," + ex.getMessage(), ex);
return null;
}
}
}

@ -2,6 +2,8 @@ package com.docus.server.collection.service;
import com.docus.server.collection.dto.FirstPageCheckoutInDTO;
import java.util.List;
/**
* @author wyb
*/
@ -12,4 +14,7 @@ public interface MzZyHisService {
* @param checkoutInDTO
*/
void firstPageCheckout(FirstPageCheckoutInDTO checkoutInDTO);
List<String> getPid();
}

@ -1,7 +1,6 @@
package com.docus.server.collection.service.impl;
import com.docus.core.util.Func;
import com.docus.infrastructure.core.exception.BaseException;
import com.docus.infrastructure.web.api.CommonResult;
import com.docus.infrastructure.web.api.ResultCode;
import com.docus.server.collection.config.SystemMappingConfig;
@ -11,6 +10,7 @@ import com.docus.server.collection.entity.CollectSysDictionary;
import com.docus.server.collection.enums.FileSyncMethod;
import com.docus.server.collection.feign.dto.CompensateTasRequest;
import com.docus.server.collection.feign.service.CollectTaskService;
import com.docus.server.collection.feign.service.MedicalrecordService;
import com.docus.server.collection.infrastructure.dao.mapper.CollectSysDictionaryMapper;
import com.docus.server.collection.infrastructure.dao.mapper.TBasicMapper;
import com.docus.server.collection.service.MzZyHisService;
@ -37,20 +37,22 @@ public class MzZyHisServiceImpl implements MzZyHisService {
@Resource
private TBasicMapper tBasicMapper;
@Resource
private MedicalrecordService medicalrecordService;
@Override
public void firstPageCheckout(FirstPageCheckoutInDTO dto) {
System.out.println(dto);
PatientInfoDTO patientInfo = dto.getPatientInfo();
//验证基础数据是否存在
String patientId = tBasicMapper.getPatientIdByJzh(patientInfo.getInpatientNo());
if (Func.isBlank(patientId)) {
throw new BaseException("系统未找到患者数据,住院流水号:" + patientInfo.getInpatientNo());
throw new RuntimeException("系统未找到患者数据,住院流水号:" + patientInfo.getInpatientNo());
}
// 取得映射结果后的无纸化系统id
List<String> collectorIds = systemMappingCollectorIds(dto);
// 进行任务补偿
CompensateTasRequest request = new CompensateTasRequest();
request.setPriority(4);
request.setPriority(3);
request.setPatientIds(Collections.singletonList(patientId));
request.setCollectorIds(collectorIds);
CommonResult<String> commonResult = collectTaskService.compensateTask(request);
@ -58,6 +60,37 @@ public class MzZyHisServiceImpl implements MzZyHisService {
if (commonResult.getCode().equals(ResultCode.FAILED.getCode())) {
throw new RuntimeException(commonResult.getMsg());
}
CommonResult result = medicalrecordService.signOutOrBackRepair(patientId);
// 抛出异常,进行参数持久
if (result.getCode().equals(ResultCode.FAILED.getCode())) {
throw new RuntimeException(commonResult.getMsg());
}
babyTaskCompensate(patientInfo.getInpatientNo(),collectorIds);
}
@Override
public List<String> getPid() {
return tBasicMapper.getPid();
}
/**
*
* @param momJzh
* @param collectorIds id
*/
private void babyTaskCompensate(String momJzh, List<String> collectorIds) {
List<String> babyPatientIds=tBasicMapper.getPatientIdByMomJzh(momJzh);
if(Func.isNotEmpty(babyPatientIds)){
// 进行任务补偿
CompensateTasRequest request = new CompensateTasRequest();
request.setPatientIds(babyPatientIds);
request.setPriority(2);
request.setCollectorIds(collectorIds);
collectTaskService.compensateTask(request);
for (String babyPatientId : babyPatientIds) {
medicalrecordService.signOutOrBackRepair(babyPatientId);
}
}
}
private List<String> systemMappingCollectorIds(FirstPageCheckoutInDTO dto) {

@ -3,6 +3,7 @@ package com.docus.server.collection.service.impl;
import cn.hutool.core.util.NumberUtil;
import com.docus.core.util.DateUtil;
import com.docus.core.util.Func;
import com.docus.core.util.ObjectUtil;
import com.docus.infrastructure.redis.service.IdService;
import com.docus.server.collection.dto.TBasicDto;
import com.docus.server.collection.httpservices.HttpTBasicService;
@ -114,12 +115,22 @@ public class TBasicServiceImpl implements ITBasicService {
//判断jzh是否重复
Integer num = tBasicMapper.selectOne(tBasicDto.getJzh());
//判断是否血液净化的,是则跳过
if(ObjectUtil.isNotEmpty(tBasicDto.getInpatientNo())&&(tBasicDto.getInpatientNo().contains("x")||tBasicDto.getInpatientNo().contains("X"))){
continue;
}
//判断是否C的是则跳过
if(ObjectUtil.isNotEmpty(tBasicDto.getInpatientNo())&&(tBasicDto.getInpatientNo().contains("c")||tBasicDto.getInpatientNo().contains("C"))){
continue;
}
Long patientId = idService.getDateSeq();
//数据类型转化,格式处理
Date admissDate = null;
if(Func.isNotEmpty(tBasicDto.getAdmissDate())){
admissDate=Func.parseDate(tBasicDto.getAdmissDate(), DateUtil.PATTERN_DATETIME);
}else {
continue;
}
@ -150,7 +161,7 @@ public class TBasicServiceImpl implements ITBasicService {
String isDeadStr = tBasicDto.getIsDead();
Integer isDead=0;
if("死亡".equals(isDeadStr)){
if("5".equals(isDeadStr)){
isDead=1;
}
@ -190,6 +201,13 @@ public class TBasicServiceImpl implements ITBasicService {
tBasic.setDisDept(tBasicDto.getDisDept());
tBasic.setDisDeptName(tBasicDto.getDisDeptName());
tBasic.setCreateTime(DateUtil.now());
tBasic.setMotherInpatientNo(tBasicDto.getMotherInpatientNo());
//判断是否B开头
if(ObjectUtil.isNotEmpty(tBasicDto.getInpatientNo())&&(tBasicDto.getInpatientNo().contains("B")||tBasicDto.getInpatientNo().contains("b"))){
tBasic.setIsOther(1);
}else {
tBasic.setIsOther(0);
}
if (num>0) {
log.info("更新,jzh为"+tBasic.getJzh());

@ -6,27 +6,19 @@ spring:
application:
name: @artifactId@
datasource:
url: jdbc:log4jdbc:mysql://db.docus.cn:3306/docus_archivefile?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: docus
password: docus702
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
# 初始化配置
initial-size: 3
# 最小连接数
min-idle: 3
# 最大连接数
max-active: 15
# 获取连接超 时时间
max-wait: 5000
# 连接有效性检测时间
time-between-eviction-runs-millis: 90000
# 最大空闲时间
min-evictable-idle-time-millis: 1800000
test-while-idle: true
test-on-borrow: false
test-on-return: false
validation-query: select 1
mysql-docus:
url: jdbc:log4jdbc:mysql://db.docus.cn:3306/docus_archivefile?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: docus
password: docus702
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
sqlserver-docus:
url: jdbc:sqlserver://192.168.16.103\DOCUS;DatabaseName=zj_power
username: sa
password: docus702
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
type: com.alibaba.druid.pool.DruidDataSource
redis:
host: redis.docus.cn
@ -52,6 +44,8 @@ docus:
url:
# 采集任务补偿地址
compensate-task-url: http://localhost:9295/
# 签出调用
sign-out-url: http://localhost:9102/
mybatis-plus:
configuration:
@ -78,7 +72,12 @@ xxl:
TBasic:
url: http://localhost:8989/tbasic
mzzyy:
roc-domain: WZHBA
roc-key: b91b0ac7-665f-4874-a282-2f5511a44263
url:
roc:
curr-web: http://199.168.91.110:7800/roc/curr-web
# com.ibm.mq连接方式集群模式需要配置两个地址 本地测试
#ibm:

@ -25,7 +25,9 @@
`dis_date`,
`dis_dept_name`,
`attending_name`,
`jzh`)
`jzh`,
`is_other`,
`mother_inpatient_no`)
VALUES
<foreach collection="tBasicList" item="tBasic" separator=",">
(#{tBasic.admissDept},
@ -48,7 +50,9 @@
#{tBasic.disDate},
#{tBasic.disDeptName},
#{tBasic.attendingName},
#{tBasic.jzh})
#{tBasic.jzh},
#{tBasic.isOther},
#{tBasic.motherInpatientNo})
</foreach>
</insert>
@ -56,7 +60,7 @@
UPDATE `docus_medicalrecord`.`t_basic` SET
`admiss_dept` = #{tBasic.admissDept},
`attending` = #{tBasic.attending},
`create_time` = #{tBasic.createTime},
`update_time` = #{tBasic.createTime},
`admiss_days` = #{tBasic.admissDays},
`is_dead` = #{tBasic.isDead},
`sex_name` = #{tBasic.sexName},
@ -71,7 +75,9 @@
`admiss_dept_name` = #{tBasic.admissDeptName},
`dis_date` = #{tBasic.disDate},
`dis_dept_name` = #{tBasic.disDeptName},
`attending_name` = #{tBasic.attendingName}
`attending_name` = #{tBasic.attendingName},
`is_other` = #{tBasic.isOther},
`mother_inpatient_no`= #{tBasic.motherInpatientNo}
WHERE
`jzh` = #{tBasic.jzh}
</update>
@ -82,5 +88,10 @@
<select id="getPatientIdByJzh" resultType="java.lang.String">
select patient_id from `docus_medicalrecord`.`t_basic` where jzh=#{jzh}
</select>
<select id="getPatientIdByMomJzh" resultType="java.lang.String">
select patient_id from `docus_medicalrecord`.`t_basic` where mother_inpatient_no=#{momJzh}
</select>
<select id="getPid" resultType="java.lang.String">
select patient_id from `docus_medicalrecord`.`t_basic` limit 10
</select>
</mapper>

@ -0,0 +1,26 @@
<?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.docus.server.collection.infrastructure.dao.sqlserver.VJsjWzh7addnjreportMapper">
<select id="getList" resultType="java.lang.String">
SELECT 姓名
FROM dbo.v_jsj_wzh7addnjreport;
</select>
<select id="getReport" resultType="com.docus.server.collection.entity.VJsjWzh7addnjreport">
SELECT 姓名 name, 住院号 inpatientNo, 类型 type, 申请科室 dept, 项目 item, RegistDateTime registDateTime, ReportDateTime reportDateTime
FROM dbo.v_jsj_wzh7addnjreport
where
1=1
<if test="dto.startReportDateTime!=null and dto.startReportDateTime!='' and dto.endReportDateTime!=null and dto.endReportDateTime!=''">
and convert(varchar(10),ReportDateTime,120)between
#{dto.startReportDateTime} and #{dto.endReportDateTime}
</if>
<if test="dto.name!=null and dto.name!=''">
and 姓名 like CONCAT('%',#{dto.name},'%')
</if>
<if test="dto.inpatientNo!=null and dto.inpatientNo!=''">
and 住院号 like CONCAT('%',#{dto.inpatientNo},'%')
</if>
</select>
</mapper>
Loading…
Cancel
Save