住院检查报告,宝宝报告发送到母亲

3.2.4.44
wyb 2 years ago
parent a921593922
commit c180f59401

@ -0,0 +1,37 @@
package com.docus.server.report.api.dto;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
*
* @author WYBDEV
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel(value = "患者信息")
public class PatientInfoDTO {
@ApiModelProperty(value = "病案主键")
private String patientId;
@ApiModelProperty(value = "住院号")
private String inpatientNo;
@ApiModelProperty(value = "住院次数")
private Integer admissTimes;
@ApiModelProperty(value = "入院日期 yyyy-MM-dd HH:mm:ss")
private String admissDate;
@ApiModelProperty(value = "入院科室名称")
private String admissDeptName;
@ApiModelProperty(value = "出院日期 yyyy-MM-dd HH:mm:ss")
private String disDate;
@ApiModelProperty(value = "出院科室名称")
private String disDeptName;
@ApiModelProperty(value = "记账号")
private String jzh;
@ApiModelProperty(value = "姓名")
private String name;
@ApiModelProperty(value = "住院id")
private String admissId;
}

@ -24,4 +24,6 @@ public class ReportDownTwoDto {
private List<ReportHospitalTwoDto> hospitals = new ArrayList<>();
@ApiModelProperty(value = "任务信息")
private List<ReportTaskTwoDto> tasks = new ArrayList<>();
@ApiModelProperty(value = "母亲基础信息")
private PatientInfoDTO parent;
}

@ -127,6 +127,16 @@ public class ReportJob {
log.warn("patientId {} 未找到基础数据!", patientId);
}
List<ReportDto> reportDtoList = collectZyInspectReport(basicList.get(0));
// 是否是宝宝的病案,如果是,报告需要给母亲的信息
if(isBabyTask(reportDownTwoDto)){
PatientInfoDTO parent = reportDownTwoDto.getParent();
for (ReportDto reportDto : reportDtoList) {
reportDto.setPatientId(parent.getPatientId());
reportDto.setInpatientNo(parent.getInpatientNo());
reportDto.setAdmisstimes(parent.getAdmissTimes());
reportDto.setJzh(parent.getJzh());
}
}
reportDtoList.forEach(reportDto -> {
reportDto.setSysFlag(reportQueryZyInspectCollectorId);
reportDto.setTaskId(reportDownTwoDto.getTasks().get(0).getTaskId());
@ -135,6 +145,11 @@ public class ReportJob {
}
private boolean isBabyTask(ReportDownTwoDto reportDownTwoDto) {
String inpatientNo = reportDownTwoDto.getPatient().getInpatientNo();
return inpatientNo != null && inpatientNo.toUpperCase().contains("B") && reportDownTwoDto.getParent() != null;
}
/**
*
*/
@ -206,13 +221,13 @@ public class ReportJob {
log.info("住院号:{},住院次数{},护理采集文件: {} 条", inpatientNo, admissTimes, collectFileCount);
}
}
/**
* strtrue
*
*/
private static boolean isCharacterContains(String str, List<String> strList){
private static boolean isCharacterContains(String str, List<String> strList) {
for (String e : strList) {
if(str.contains(e)){
if (str.contains(e)) {
return true;
}
}

Loading…
Cancel
Save