up
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
package com.openhis.web.patientmanage.controller;
|
package com.openhis.web.patientmanage.controller;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
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.core.common.core.domain.R;
|
||||||
import com.openhis.common.enums.AdministrativeGender;
|
import com.openhis.common.enums.AdministrativeGender;
|
||||||
import com.openhis.common.enums.EncounterSubjectStatus;
|
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.OutpatientRecordDto;
|
||||||
import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam;
|
import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam;
|
||||||
import com.openhis.web.patientmanage.dto.PatientListDto;
|
|
||||||
import com.openhis.web.patientmanage.mapper.PatientManageMapper;
|
import com.openhis.web.patientmanage.mapper.PatientManageMapper;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -46,42 +44,6 @@ public class OutpatientRecordController {
|
|||||||
return R.ok(listDoctorNames);
|
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);
|
long total = patientManageMapper.countOutpatientRecords(outpatientRecordSearchParam);
|
||||||
// 创建Page对象并设置属性
|
// 创建Page对象并设置属性
|
||||||
Page<OutpatientRecordDto> OutpatientRecordPage = new Page<>(pageNo, pageSize, total);
|
Page<OutpatientRecordDto> outpatientRecordPage = new Page<>(pageNo, pageSize, total);
|
||||||
OutpatientRecordPage.setRecords(listOutpatientRecords);
|
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 Integer genderEnum;
|
||||||
|
private String genderEnum_enumText;
|
||||||
|
|
||||||
/** 就诊时间 */
|
/** 就诊时间 */
|
||||||
private Date encounterTime;
|
private Date encounterTime;
|
||||||
|
|
||||||
/** 就诊对象状态 */
|
/** 就诊对象状态 */
|
||||||
private Integer subjectStatusEnum;
|
private Integer subjectStatusEnum;
|
||||||
|
private String subjectStatusEnum_enumText;
|
||||||
|
|
||||||
/** 机构名称/接诊医院 */
|
/** 机构名称/接诊医院 */
|
||||||
private String organizationName;
|
private String organizationName;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class OutpatientRecordSearchParam {
|
|||||||
private String doctorName;
|
private String doctorName;
|
||||||
|
|
||||||
/** 筛选开始时间 */
|
/** 筛选开始时间 */
|
||||||
private Date startTime;
|
private Date beginTime;
|
||||||
|
|
||||||
/** 筛选结束时间 */
|
/** 筛选结束时间 */
|
||||||
private Date endTime;
|
private Date endTime;
|
||||||
|
|||||||
@@ -106,13 +106,13 @@
|
|||||||
pt.name,
|
pt.name,
|
||||||
pt.id_card,
|
pt.id_card,
|
||||||
c.description,
|
c.description,
|
||||||
pt.bus_no,
|
pt.bus_no as patientBusNo,
|
||||||
e.bus_no,
|
e.bus_no as encounterBusNo,
|
||||||
pt.gender_enum,
|
pt.gender_enum,
|
||||||
e.start_time,
|
e.start_time as encounterTime,
|
||||||
e.subject_status_enum,
|
e.subject_status_enum,
|
||||||
ogt.name,
|
ogt.name as organizationName,
|
||||||
p.name,
|
p.name as doctorName,
|
||||||
pt.phone
|
pt.phone
|
||||||
FROM
|
FROM
|
||||||
adm_encounter e
|
adm_encounter e
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
|||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum EncounterSubjectStatus {
|
public enum EncounterSubjectStatus implements HisEnumInterface {
|
||||||
PLANNED(1, "arrived", "已到达"),
|
PLANNED(1, "arrived", "已到达"),
|
||||||
|
|
||||||
TRIAGED(2, "triaged", "已分诊"),
|
TRIAGED(2, "triaged", "已分诊"),
|
||||||
|
|||||||
Reference in New Issue
Block a user