Browse Source

报告单

sd
zhizhi wu 5 years ago
parent
commit
8ed667d2a5
  1. 44
      ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java
  2. 7
      ht/src/main/java/com/ccsens/ht/service/PatientReportService.java
  3. 11
      ht/src/main/java/com/ccsens/ht/service/PatientService.java

44
ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java

@ -127,10 +127,12 @@ public class PatientReportVo {
private String hospital;
public List<PdfUtil.Row> toPdfRow(){
Map<Byte, String> careerMap = new HashMap<>();
Map<Byte, String> careerMap = new HashMap<>(16);
String careerMsg = "1:农林牧渔水利生产人员 2:教师 3:医务工作者 4:专业技术人员 5:生产、运输设备操作人员及有关人员 6:商业、服务业人员 7:国家机关、事业单位、企业负责人 8:国家机关、事业单位、企业办事人员和有关人员 9:军人 10:媒体、文体类工作人员 11:在校学生 12:未就业 13:家务 14:其他";
for (String careerOne: careerMsg.split(" ")) {
careerMap.put(Byte.parseByte(careerOne.split(":")[0]), careerOne.split(":")[1]);
String splitStr = " ";
for (String careerOne: careerMsg.split(splitStr)) {
String splitStr2 = ":";
careerMap.put(Byte.parseByte(careerOne.split(splitStr2)[0]), careerOne.split(splitStr2)[1]);
}
@ -283,7 +285,7 @@ public class PatientReportVo {
});
// 总分
if (mmse.equalsIgnoreCase(this.code)) {
fillRow(row1,row2, "总分", this.score == null ? "" : this.score + (this.totalScore > 0 ? "/" + this.totalScore : ""), mmse.equalsIgnoreCase(this.code), true);
fillRow(row1,row2, "总分", (this.score == null ? "" : this.score) + (this.totalScore > 0 ? "/" + this.totalScore : ""), mmse.equalsIgnoreCase(this.code), true);
}
rows.add(row1);
rows.add(row2);
@ -378,16 +380,16 @@ public class PatientReportVo {
}
}
/**
* 添加一个空格
* @param rows
*/
private void fillBlankCell(PdfUtil.Row... rows) {
for (PdfUtil.Row row: rows) {
PdfUtil.Cell cell = new PdfUtil.Cell();
row.addCell(cell);
}
}
// /**
// * 添加一个空格
// * @param rows 行
// */
// private void fillBlankCell(PdfUtil.Row... rows) {
// for (PdfUtil.Row row: rows) {
// PdfUtil.Cell cell = new PdfUtil.Cell();
// row.addCell(cell);
// }
// }
private void fillRow(PdfUtil.Row row1, PdfUtil.Row row2, String name, String score, boolean isTop, boolean isRight, int... colspan){
//名称
@ -414,7 +416,7 @@ public class PatientReportVo {
@ApiModelProperty("对报告单的操作权限 0:仅查看 1: 可修改 2:可审查")
private int authority;
public static final int OLAY_READ = 0;
public static final int ONLY_READ = 0;
public static final int READ_WRITE = 1;
public static final int CHECK = 2;
}
@ -444,12 +446,12 @@ public class PatientReportVo {
private Byte sex;
@ApiModelProperty("对应人数")
private Integer count;
public AgeAndSex(){}
public AgeAndSex(Byte ageLevel, Byte sex, Integer count) {
this.ageLevel = ageLevel;
this.sex = sex;
this.count = count;
}
// public AgeAndSex(){}
// public AgeAndSex(Byte ageLevel, Byte sex, Integer count) {
// this.ageLevel = ageLevel;
// this.sex = sex;
// this.count = count;
// }
}
@ApiModel("年龄+性别统计")

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

@ -11,7 +11,6 @@ import com.ccsens.ht.bean.vo.PatientReportVo;
import com.ccsens.ht.persist.dao.HtDoctorDao;
import com.ccsens.ht.persist.dao.HtPatientReportDao;
import com.ccsens.ht.persist.dao.HtPositionDao;
import com.ccsens.ht.persist.mapper.HtDoctorMapper;
import com.ccsens.ht.persist.mapper.HtPatientFollowUpMapper;
import com.ccsens.ht.persist.mapper.HtPatientMapper;
import com.ccsens.ht.persist.mapper.HtPatientReportRecordMapper;
@ -286,7 +285,7 @@ public class PatientReportService implements IPatientReportService {
doctorExample.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS).andIsDelEqualTo(Constant.Ht.NUMBER_DEFAULT);
List<HtDoctor> doctors = htDoctorDao.selectByExample(doctorExample);
if (CollectionUtils.isEmpty(doctors)) {
authorityVo.setAuthority(PatientReportVo.Authority.OLAY_READ);
authorityVo.setAuthority(PatientReportVo.Authority.ONLY_READ);
return authorityVo;
}
HtDoctor doctor = doctors.get(0);
@ -298,7 +297,7 @@ public class PatientReportService implements IPatientReportService {
//查询下属职务
List<Long> lowerPositionIds = htPositionDao.queryAllLowerPosition(doctor.getPositionId());
if (CollectionUtils.isEmpty(lowerPositionIds)) {
authorityVo.setAuthority(PatientReportVo.Authority.OLAY_READ);
authorityVo.setAuthority(PatientReportVo.Authority.ONLY_READ);
return authorityVo;
}
//查询报告单关联医生职位
@ -306,7 +305,7 @@ public class PatientReportService implements IPatientReportService {
if (lowerPositionIds.contains(doctor1.getPositionId())) {
authorityVo.setAuthority(PatientReportVo.Authority.CHECK);
} else {
authorityVo.setAuthority(PatientReportVo.Authority.OLAY_READ);
authorityVo.setAuthority(PatientReportVo.Authority.ONLY_READ);
}
return authorityVo;

11
ht/src/main/java/com/ccsens/ht/service/PatientService.java

@ -19,7 +19,6 @@ import com.ccsens.util.exception.BaseException;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@ -31,25 +30,23 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @program: ptpro
* @description:
* @author: wu huijuan
* @description: 病人信息
* @author: whj
* @create: 2019/10/29 11:16
*/
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class PatientService implements IPatientService {
@Autowired
@Resource
private Snowflake snowflake;
@Resource
private HtPatientReportMapper htPatientReportMapper;
@Resource
private HtPatientMapper htPatientMapper;
@Autowired
@Resource
private TallFeignClient tallFeignClient;
@Override

Loading…
Cancel
Save