up
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package com.openhis.web.patientmanage.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -14,9 +12,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.common.enums.AdministrativeGender;
|
||||
import com.openhis.common.enums.EncounterSubjectStatus;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.web.patientmanage.dto.OutpatientRecordDto;
|
||||
import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam;
|
||||
import com.openhis.web.patientmanage.dto.PatientListDto;
|
||||
import com.openhis.web.patientmanage.mapper.PatientManageMapper;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -46,42 +44,6 @@ public class OutpatientRecordController {
|
||||
return R.ok(listDoctorNames);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取性别列表
|
||||
*/
|
||||
@GetMapping("/list-administrativegender")
|
||||
public R<?> getAdministrativeGender() {
|
||||
// 获取性别
|
||||
List<AdministrativeGender> statusList = Arrays.asList(AdministrativeGender.values());
|
||||
List<PatientListDto> dtos = new ArrayList<>();
|
||||
// 取得更新值
|
||||
for (AdministrativeGender status : statusList) {
|
||||
PatientListDto dto = new PatientListDto();
|
||||
dto.setValue(status.getValue());
|
||||
dto.setInfo(status.getInfo());
|
||||
dtos.add(dto);
|
||||
}
|
||||
return R.ok(dtos);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取就诊状态列表
|
||||
*/
|
||||
@GetMapping("/list-encountersubjectstatus")
|
||||
public R<?> getEncounterSubjectStatus() {
|
||||
// 获取就诊状态
|
||||
List<EncounterSubjectStatus> statusList = Arrays.asList(EncounterSubjectStatus.values());
|
||||
List<PatientListDto> dtos = new ArrayList<>();
|
||||
// 取得更新值
|
||||
for (EncounterSubjectStatus status : statusList) {
|
||||
PatientListDto dto = new PatientListDto();
|
||||
dto.setValue(status.getValue());
|
||||
dto.setInfo(status.getInfo());
|
||||
dtos.add(dto);
|
||||
}
|
||||
return R.ok(dtos);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询门诊记录,可选条件
|
||||
*
|
||||
@@ -102,10 +64,17 @@ public class OutpatientRecordController {
|
||||
// 查询总记录数
|
||||
long total = patientManageMapper.countOutpatientRecords(outpatientRecordSearchParam);
|
||||
// 创建Page对象并设置属性
|
||||
Page<OutpatientRecordDto> OutpatientRecordPage = new Page<>(pageNo, pageSize, total);
|
||||
OutpatientRecordPage.setRecords(listOutpatientRecords);
|
||||
Page<OutpatientRecordDto> outpatientRecordPage = new Page<>(pageNo, pageSize, total);
|
||||
outpatientRecordPage.setRecords(listOutpatientRecords);
|
||||
outpatientRecordPage.getRecords().forEach(e -> {
|
||||
// 性别枚举类回显赋值
|
||||
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
// 就诊对象状态枚举类回显赋值
|
||||
e.setSubjectStatusEnum_enumText(
|
||||
EnumUtils.getInfoByValue(EncounterSubjectStatus.class, e.getSubjectStatusEnum()));
|
||||
});
|
||||
|
||||
return R.ok(OutpatientRecordPage);
|
||||
return R.ok(outpatientRecordPage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,12 +30,14 @@ public class OutpatientRecordDto {
|
||||
|
||||
/** 性别编码 */
|
||||
private Integer genderEnum;
|
||||
private String genderEnum_enumText;
|
||||
|
||||
/** 就诊时间 */
|
||||
private Date encounterTime;
|
||||
|
||||
/** 就诊对象状态 */
|
||||
private Integer subjectStatusEnum;
|
||||
private String subjectStatusEnum_enumText;
|
||||
|
||||
/** 机构名称/接诊医院 */
|
||||
private String organizationName;
|
||||
|
||||
@@ -25,7 +25,7 @@ public class OutpatientRecordSearchParam {
|
||||
private String doctorName;
|
||||
|
||||
/** 筛选开始时间 */
|
||||
private Date startTime;
|
||||
private Date beginTime;
|
||||
|
||||
/** 筛选结束时间 */
|
||||
private Date endTime;
|
||||
|
||||
@@ -106,13 +106,13 @@
|
||||
pt.name,
|
||||
pt.id_card,
|
||||
c.description,
|
||||
pt.bus_no,
|
||||
e.bus_no,
|
||||
pt.bus_no as patientBusNo,
|
||||
e.bus_no as encounterBusNo,
|
||||
pt.gender_enum,
|
||||
e.start_time,
|
||||
e.start_time as encounterTime,
|
||||
e.subject_status_enum,
|
||||
ogt.name,
|
||||
p.name,
|
||||
ogt.name as organizationName,
|
||||
p.name as doctorName,
|
||||
pt.phone
|
||||
FROM
|
||||
adm_encounter e
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum EncounterSubjectStatus {
|
||||
public enum EncounterSubjectStatus implements HisEnumInterface {
|
||||
PLANNED(1, "arrived", "已到达"),
|
||||
|
||||
TRIAGED(2, "triaged", "已分诊"),
|
||||
|
||||
Reference in New Issue
Block a user