Browse Source

自动生成报告单病人年龄

master
zhizhi wu 6 years ago
parent
commit
683e43fd3f
  1. 2
      ht/src/main/java/com/ccsens/ht/service/PatientReportService.java
  2. 4
      ht/src/main/resources/application.yml

2
ht/src/main/java/com/ccsens/ht/service/PatientReportService.java

@ -3,6 +3,7 @@ package com.ccsens.ht.service;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Snowflake; import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdcardUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.ccsens.ht.bean.dto.PatientReportDto; import com.ccsens.ht.bean.dto.PatientReportDto;
import com.ccsens.ht.bean.po.*; import com.ccsens.ht.bean.po.*;
@ -84,6 +85,7 @@ public class PatientReportService implements IPatientReportService {
htPatientReport.setDoctorId(doctors.get(0).getId()); htPatientReport.setDoctorId(doctors.get(0).getId());
htPatientReport.setPatientId(generate.getPatientId()); htPatientReport.setPatientId(generate.getPatientId());
htPatientReport.setPatientIdcard(htPatient.getIdcard()); htPatientReport.setPatientIdcard(htPatient.getIdcard());
htPatientReport.setPatientAge(StrUtil.isEmpty(htPatient.getIdcard()) ? null : (byte)IdcardUtil.getAgeByIdCard(htPatient.getIdcard()));
htPatientReport.setEvaluationCode(Constant.Ht.Report.PARENT_CODE); htPatientReport.setEvaluationCode(Constant.Ht.Report.PARENT_CODE);
htPatientReport.setName(Constant.Ht.Report.PARENT_NAME + DateUtil.today()); htPatientReport.setName(Constant.Ht.Report.PARENT_NAME + DateUtil.today());
htPatientReport.setSerialNumber(htPatient.getId() + "_" + (times + 1)); htPatientReport.setSerialNumber(htPatient.getId() + "_" + (times + 1));

4
ht/src/main/resources/application.yml

@ -1,4 +1,4 @@
spring: spring:
profiles: profiles:
active: dev active: test
include: common, util-dev include: common, util-test
Loading…
Cancel
Save