扫描同步-未完成-临时
parent
c7b0562826
commit
2f040453ee
@ -0,0 +1,39 @@
|
|||||||
|
package com.docus.server.collect.controller;
|
||||||
|
|
||||||
|
import com.docus.core.util.Func;
|
||||||
|
import com.docus.infrastructure.web.api.CommonResult;
|
||||||
|
import com.docus.server.collect.dto.PatientScanConditionDTO;
|
||||||
|
import com.docus.server.collect.service.PatientScanService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
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 javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者扫描控制层
|
||||||
|
*
|
||||||
|
* @author wyb
|
||||||
|
*/
|
||||||
|
@Api("患者扫描控制")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/gdszy/patscan")
|
||||||
|
public class PatientScanController {
|
||||||
|
@Resource
|
||||||
|
private PatientScanService patientScanService;
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/collect/byInpatientNoAndTimes")
|
||||||
|
@ApiOperation("根据住院号和住院次数,进行患者电子病历扫描数据采集!")
|
||||||
|
public CommonResult<String> collectByInpatientNoAndTimes(@RequestBody List<PatientScanConditionDTO> patientScanConditionDTOList) {
|
||||||
|
if (Func.isEmpty(patientScanConditionDTOList)) {
|
||||||
|
return CommonResult.failed("请输入正确的请求参数!");
|
||||||
|
}
|
||||||
|
patientScanService.collectByInpatientNoAndTimes(patientScanConditionDTOList);
|
||||||
|
return CommonResult.success("采集成功!");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.docus.server.collect.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者扫描条件
|
||||||
|
* @author wyb
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("患者扫描条件传输对象")
|
||||||
|
public class PatientScanConditionDTO {
|
||||||
|
@ApiModelProperty("住院号")
|
||||||
|
@NotBlank(message = "住院号不能为空!")
|
||||||
|
private String inpatientNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("住院次数")
|
||||||
|
@NotBlank(message = "住院次数不能为空!")
|
||||||
|
private String admissTimes;
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.docus.server.collect.entity;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者扫描数据 - pat_sm 视图
|
||||||
|
* @author wyb
|
||||||
|
*/
|
||||||
|
@ApiModel(value = "患者扫描数据", description = "患者扫描数据")
|
||||||
|
@Data
|
||||||
|
public class PatientScan implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "患者主键")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "住院号")
|
||||||
|
private String inpatientNo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "住院次数")
|
||||||
|
private String admissTimes;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "病人姓名")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "出院日期")
|
||||||
|
private String disDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图像路径")
|
||||||
|
private String imagePath;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "文件名")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分段名称")
|
||||||
|
private String zdAssortName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分类id")
|
||||||
|
private String zdAssortId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "扫描日期")
|
||||||
|
private String scanDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "扫描盘号")
|
||||||
|
private String ph;
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.docus.server.collect.infrastructure.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wyb
|
||||||
|
*/
|
||||||
|
@DS("archive-mysql")
|
||||||
|
@Mapper
|
||||||
|
public interface CollectTaskMapper {
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.docus.server.collect.infrastructure.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wyb
|
||||||
|
*/
|
||||||
|
@DS("archive-mysql")
|
||||||
|
@Mapper
|
||||||
|
public interface PatientBasicMapper {
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.docus.server.collect.service;
|
||||||
|
|
||||||
|
import com.docus.server.collect.dto.PatientScanConditionDTO;
|
||||||
|
import com.docus.server.collect.entity.PatientScan;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wyb
|
||||||
|
*/
|
||||||
|
public interface PatientScanService {
|
||||||
|
/**
|
||||||
|
* 根据患者住院号和住院次数采集-批量
|
||||||
|
* @param patientScanConditionDTOList 患者扫描条件传输对象集合
|
||||||
|
*/
|
||||||
|
void collectByInpatientNoAndTimes(List<PatientScanConditionDTO> patientScanConditionDTOList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据患者住院号和住院次数采集-单个
|
||||||
|
* @param patientScanConditionDto 患者扫描条件传输对象
|
||||||
|
*/
|
||||||
|
List<PatientScan> collectByInpatientNoAndTimes(PatientScanConditionDTO patientScanConditionDto);
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
<?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.collect.infrastructure.mapper.PatientScanMapper">
|
||||||
|
|
||||||
|
<select id="getScanData" resultType="com.docus.server.collect.entity.PatientScan">
|
||||||
|
select
|
||||||
|
主键 as id,
|
||||||
|
住院号 as inpatientNo,
|
||||||
|
次数 as admissTimes,
|
||||||
|
病人姓名 as name,
|
||||||
|
出院日期 as disDate,
|
||||||
|
图像路径 as imagePath,
|
||||||
|
文件名 as fileName,
|
||||||
|
分段名称 as zdAssortName,
|
||||||
|
分类id as zdAssortId,
|
||||||
|
扫描日期 as scanDate,
|
||||||
|
扫描盘号 as ph
|
||||||
|
from pat_sm
|
||||||
|
where
|
||||||
|
住院号=#{dto.inpatientNo}
|
||||||
|
and 次数=#{dto.admissTimes}
|
||||||
|
and 扫描盘号 like 'G%'
|
||||||
|
</select>
|
||||||
|
<select id="getScanPatientCondition" resultType="com.docus.server.collect.dto.PatientScanConditionDTO">
|
||||||
|
select 住院号 as inpatientNo,
|
||||||
|
次数 as admissTimes
|
||||||
|
from pat_sm
|
||||||
|
where 扫描日期 between #{start} and #{end}
|
||||||
|
and 扫描盘号 like 'G%'
|
||||||
|
group by 住院号, 次数
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue