Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -15,6 +15,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.administration.domain.EncounterDiagnosis;
|
||||
import com.openhis.administration.service.IEncounterDiagnosisService;
|
||||
import com.openhis.clinical.domain.Condition;
|
||||
@@ -219,8 +220,23 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn
|
||||
doctorStationDiagnosisAppMapper.getPatientHistoryList(PublicationStatus.ACTIVE.getValue(), patientId);
|
||||
this.handleConditionDefinitionMetadata(patientHistoryList);
|
||||
conditionDefinitionBusinessClass.setPatientHistoryList(patientHistoryList);
|
||||
//
|
||||
|
||||
// 医生常用诊断
|
||||
Long userId = SecurityUtils.getLoginUser().getUserId(); // 当前登录账号ID
|
||||
List<ConditionDefinitionMetadata> doctorCommonUseList =
|
||||
doctorStationDiagnosisAppMapper.getDoctorCommonUseList(PublicationStatus.ACTIVE.getValue(), userId);
|
||||
this.handleConditionDefinitionMetadata(doctorCommonUseList);
|
||||
conditionDefinitionBusinessClass.setDoctorCommonUseList(doctorCommonUseList);
|
||||
// 用户个人诊断
|
||||
List<ConditionDefinitionMetadata> userPersonalList = doctorStationDiagnosisAppMapper
|
||||
.getUserPersonalList(PublicationStatus.ACTIVE.getValue(), BindingType.PERSONAL.getValue(), userId);
|
||||
this.handleConditionDefinitionMetadata(userPersonalList);
|
||||
conditionDefinitionBusinessClass.setUserPersonalList(userPersonalList);
|
||||
// 科室诊断
|
||||
// TODO: currentUserOrganizationId(当前登录账号所属的科室ID) 待补充
|
||||
List<ConditionDefinitionMetadata> organizationList = doctorStationDiagnosisAppMapper
|
||||
.getOrganizationList(PublicationStatus.ACTIVE.getValue(), BindingType.DEFINITION.getValue(), null);
|
||||
this.handleConditionDefinitionMetadata(organizationList);
|
||||
conditionDefinitionBusinessClass.setOrganizationList(organizationList);
|
||||
return R.ok(conditionDefinitionBusinessClass);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ public class DoctorStationDiagnosisController {
|
||||
status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
diagnosisBelongBindingInitDto.setVerificationStatusOptions(verificationStatusOptions);
|
||||
|
||||
return R.ok(diagnosisBelongBindingInitDto);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,4 +41,36 @@ public interface DoctorStationDiagnosisAppMapper {
|
||||
List<ConditionDefinitionMetadata> getPatientHistoryList(@Param("statusEnum") Integer statusEnum,
|
||||
@Param("patientId") Long patientId);
|
||||
|
||||
/**
|
||||
* 查询医生常用诊断
|
||||
*
|
||||
* @param statusEnum 状态
|
||||
* @param userId 当前登录账号id
|
||||
* @return 医生常用诊断
|
||||
*/
|
||||
List<ConditionDefinitionMetadata> getDoctorCommonUseList(@Param("statusEnum") Integer statusEnum,
|
||||
@Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 查询用户个人诊断
|
||||
*
|
||||
* @param statusEnum 状态
|
||||
* @param bindingEnum 绑定类型
|
||||
* @param userId 当前登录账号id
|
||||
* @return 用户个人诊断
|
||||
*/
|
||||
List<ConditionDefinitionMetadata> getUserPersonalList(@Param("statusEnum") Integer statusEnum,
|
||||
@Param("bindingEnum") Integer bindingEnum, @Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 查询科室诊断
|
||||
*
|
||||
* @param statusEnum 状态
|
||||
* @param bindingEnum 绑定类型
|
||||
* @param currentUserOrganizationId 当前登录账号所属的科室ID
|
||||
* @return 科室诊断
|
||||
*/
|
||||
List<ConditionDefinitionMetadata> getOrganizationList(@Param("statusEnum") Integer statusEnum,
|
||||
@Param("bindingEnum") Integer bindingEnum, @Param("currentUserOrganizationId") Long currentUserOrganizationId);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,16 +2,12 @@ package com.openhis.web.outpatientmanage.appservice;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.outpatientmanage.dto.OutpatientSkinTestRecordDto;
|
||||
import com.openhis.web.outpatientmanage.dto.OutpatientSkinTestRecordSearchParam;
|
||||
import com.openhis.web.patientmanage.dto.PatientListDto;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 门诊管理 应用实现类
|
||||
@@ -31,6 +27,11 @@ public interface IOutpatientSkinTestRecordService {
|
||||
*/
|
||||
List<PatientListDto> getSkinTestResult();
|
||||
|
||||
/**
|
||||
* 获取药品状态列表
|
||||
*/
|
||||
List<PatientListDto> getMedicationStatus();
|
||||
|
||||
/**
|
||||
* 分页查询门诊皮试记录,可选条件
|
||||
*
|
||||
@@ -67,13 +68,13 @@ public interface IOutpatientSkinTestRecordService {
|
||||
*
|
||||
* @param outpatientSkinTestRecordDto 皮试记录信息
|
||||
*/
|
||||
int editSkinTestRecord(OutpatientSkinTestRecordDto outpatientSkinTestRecordDto);
|
||||
boolean editSkinTestRecord(OutpatientSkinTestRecordDto outpatientSkinTestRecordDto);
|
||||
|
||||
/**
|
||||
* 护士核对皮试结果后,确认签名(服务申请管理与过敏与不耐受的相关字段更新)
|
||||
*
|
||||
* @param outpatientSkinTestRecordDto 皮试记录信息
|
||||
*/
|
||||
int nurseSignChkPs(OutpatientSkinTestRecordDto outpatientSkinTestRecordDto);
|
||||
boolean nurseSignChkPs(OutpatientSkinTestRecordDto outpatientSkinTestRecordDto);
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.openhis.clinical.domain.AllergyIntolerance;
|
||||
import com.openhis.clinical.mapper.AllergyIntoleranceMapper;
|
||||
import com.openhis.clinical.service.IAllergyIntoleranceService;
|
||||
import com.openhis.common.enums.ClinicalStatus;
|
||||
import com.openhis.common.enums.EventStatus;
|
||||
import com.openhis.common.enums.VerificationStatus;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.web.outpatientmanage.appservice.IOutpatientSkinTestRecordService;
|
||||
@@ -59,7 +60,7 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
PractitionerRoleMapper practitionerRoleMapper;
|
||||
|
||||
@Autowired
|
||||
IAllergyIntoleranceService AllergyIntoleranceService;
|
||||
IAllergyIntoleranceService allergyIntoleranceService;
|
||||
|
||||
@Autowired
|
||||
IPractitionerRoleService practitionerRoleService;
|
||||
@@ -109,6 +110,24 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
return dtos;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药品状态列表
|
||||
*/
|
||||
@Override
|
||||
public List<PatientListDto> getMedicationStatus() {
|
||||
// 获取药品状态列表
|
||||
List<EventStatus> statusList = Arrays.asList(EventStatus.values());
|
||||
List<PatientListDto> dtos = new ArrayList<>();
|
||||
// 取得更新值
|
||||
for (EventStatus status : statusList) {
|
||||
PatientListDto dto = new PatientListDto();
|
||||
dto.setValue(status.getValue());
|
||||
dto.setInfo(status.getInfo());
|
||||
dtos.add(dto);
|
||||
}
|
||||
return dtos;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询门诊皮试记录,可选条件
|
||||
*
|
||||
@@ -136,6 +155,9 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
// 皮试检查项目状态枚举类回显赋值
|
||||
e.setVerificationStatusEnum_enumText(
|
||||
EnumUtils.getInfoByValue(VerificationStatus.class, e.getVerificationStatusEnum()));
|
||||
// 药品状态状态枚举类回显赋值
|
||||
e.setMedicationStatusEnum_enumText(
|
||||
EnumUtils.getInfoByValue(EventStatus.class, e.getMedicationStatusEnum()));
|
||||
});
|
||||
return outpatientSkinTestRecordPage;
|
||||
}
|
||||
@@ -173,11 +195,12 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
* @param outpatientSkinTestRecordDto 皮试记录信息
|
||||
*/
|
||||
@Override
|
||||
public int editSkinTestRecord(OutpatientSkinTestRecordDto outpatientSkinTestRecordDto) {
|
||||
// 判断核对人是否不为空
|
||||
if (outpatientSkinTestRecordDto.getPerformerCheckId() != null) {
|
||||
// 签名后不能修改
|
||||
return 0;
|
||||
public boolean editSkinTestRecord(OutpatientSkinTestRecordDto outpatientSkinTestRecordDto) {
|
||||
// 判断核对人是否不为空,药品状态不是已发药
|
||||
if (outpatientSkinTestRecordDto.getPerformerCheckId() != null
|
||||
|| outpatientSkinTestRecordDto.getMedicationStatusEnum() != EventStatus.COMPLETED.getValue()) {
|
||||
// 签名后不能修改,未发药不能修改
|
||||
return false;
|
||||
}
|
||||
|
||||
// 更新服务申请管理表
|
||||
@@ -187,7 +210,7 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
|
||||
// 判断开始时间为空,不允许更新表
|
||||
if (StringUtils.isEmpty(outpatientSkinTestRecordDto.getOccurrenceStartTime())) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
Date endTime;
|
||||
// 判断结束时间,为空以开始时间基础加10分钟
|
||||
@@ -208,7 +231,7 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
Practitioner practitioner =
|
||||
practitionerService.getPractitionerByUserId(SecurityUtils.getLoginUser().getUserId());
|
||||
if (practitioner == null) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
// 设置执行人ID
|
||||
serviceRequest.setPerformerId(practitioner.getId());
|
||||
@@ -249,26 +272,20 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
// 设置备注
|
||||
.setNote(outpatientSkinTestRecordDto.getNote());
|
||||
|
||||
// 当皮试结果是为阳性的时候,设置过敏时间
|
||||
if (allergyIntolerance.getClinicalStatusEnum() == 0) {
|
||||
// 设置过敏时间(当下日期)
|
||||
allergyIntolerance.setOnsetDateTime(DateUtils.getNowDate());
|
||||
}
|
||||
|
||||
// 以服务申请ID为主条件更新过敏与不耐受表
|
||||
UpdateWrapper<AllergyIntolerance> updateWrapperAI = new UpdateWrapper<>();
|
||||
updateWrapperAI.eq("request_id", allergyIntolerance.getRequestId());
|
||||
boolean result = AllergyIntoleranceService.saveOrUpdate(allergyIntolerance, updateWrapperAI);
|
||||
boolean result = allergyIntoleranceService.saveOrUpdate(allergyIntolerance, updateWrapperAI);
|
||||
// 更新或插入失败
|
||||
if (!result || countUpdate <= 0) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int nurseSignChkPs(OutpatientSkinTestRecordDto outpatientSkinTestRecordDto) {
|
||||
public boolean nurseSignChkPs(OutpatientSkinTestRecordDto outpatientSkinTestRecordDto) {
|
||||
|
||||
// 过敏与不耐受表更新
|
||||
QueryWrapper<AllergyIntolerance> queryWrapper = new QueryWrapper<>();
|
||||
@@ -276,9 +293,10 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
AllergyIntolerance allergyIntolerance = allergyIntoleranceMapper.selectOne(queryWrapper);
|
||||
|
||||
// 检查的状态是确定和反驳的时候,不更新
|
||||
if (allergyIntolerance == null || (allergyIntolerance.getVerificationStatusEnum() != 2
|
||||
&& allergyIntolerance.getVerificationStatusEnum() != 3)) {
|
||||
return 0;
|
||||
if (allergyIntolerance == null
|
||||
|| (allergyIntolerance.getVerificationStatusEnum() != VerificationStatus.CONFIRMED.getValue()
|
||||
&& allergyIntolerance.getVerificationStatusEnum() != VerificationStatus.REFUTED.getValue())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 更新服务申请管理表的
|
||||
@@ -288,30 +306,42 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
practitionerService.getPractitionerByUserId(SecurityUtils.getLoginUser().getUserId());
|
||||
// 找不到找到practitionerId时,不更新
|
||||
if (practitioner == null) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
// 设置核对人ID
|
||||
serviceRequest.setPerformerCheckId(practitioner.getId());
|
||||
// 把服务请求的状态设置为已完成
|
||||
serviceRequest.setStatusEnum(EventStatus.COMPLETED.getValue());
|
||||
// 以id为主条件更新服务申请管理表
|
||||
UpdateWrapper<ServiceRequest> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("id", outpatientSkinTestRecordDto.getId()).set("performer_check_id",
|
||||
serviceRequest.getPerformerCheckId());
|
||||
updateWrapper.eq("id", outpatientSkinTestRecordDto.getId())
|
||||
.set("performer_check_id", serviceRequest.getPerformerCheckId())
|
||||
.set("status_enum", serviceRequest.getStatusEnum());
|
||||
|
||||
boolean resultUpdateRequestService = serviceRequestService.update(null, updateWrapper);
|
||||
|
||||
// 设置断言人
|
||||
allergyIntolerance.setCheckPractitionerId(practitioner.getId());
|
||||
// 以服务申请ID为主条件更新服务申请管理表
|
||||
UpdateWrapper<AllergyIntolerance> updateWrapperAI = new UpdateWrapper<>();
|
||||
updateWrapperAI.eq("request_id", outpatientSkinTestRecordDto.getId()).set("check_practitioner_id",
|
||||
allergyIntolerance.getCheckPractitionerId());
|
||||
boolean resultUpdateAllergyIntolerance = serviceRequestService.update(updateWrapper);
|
||||
|
||||
if (resultUpdateRequestService && resultUpdateAllergyIntolerance) {
|
||||
return 1;
|
||||
// 当皮试结果是为阳性的时候,设置过敏时间
|
||||
if (allergyIntolerance.getClinicalStatusEnum() == ClinicalStatus.ACTIVE.getValue()) {
|
||||
// 设置过敏时间(皮实结束时间)
|
||||
allergyIntolerance
|
||||
.setOnsetDateTime(DateUtils.parseDate(outpatientSkinTestRecordDto.getOccurrenceEndTime()));
|
||||
}
|
||||
|
||||
return 0;
|
||||
// 以服务申请ID为主条件更新服务申请管理表
|
||||
UpdateWrapper<AllergyIntolerance> updateWrapperAI = new UpdateWrapper<>();
|
||||
updateWrapperAI.eq("request_id", outpatientSkinTestRecordDto.getId())
|
||||
.set("check_practitioner_id", allergyIntolerance.getCheckPractitionerId())
|
||||
.set("onset_date_time", allergyIntolerance.getOnsetDateTime());
|
||||
boolean resultUpdateAllergyIntolerance = allergyIntoleranceService.update(null, updateWrapperAI);
|
||||
|
||||
if (resultUpdateRequestService && resultUpdateAllergyIntolerance) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -47,6 +47,16 @@ public class OutpatientSkinTestRecordController {
|
||||
return R.ok(OutpatientSkinTestRecordService.getSkinTestResult());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取药品状态列表
|
||||
*/
|
||||
@GetMapping("/list-medicationstatus")
|
||||
public R<?> getMedicationStatus() {
|
||||
|
||||
return R.ok(OutpatientSkinTestRecordService.getMedicationStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
* 护士确认执行皮试后,更新皮试记录信息
|
||||
*
|
||||
@@ -55,7 +65,7 @@ public class OutpatientSkinTestRecordController {
|
||||
@PutMapping("/outpatient-record-skintest")
|
||||
public R<?> editSkinTestRecord(@Validated @RequestBody OutpatientSkinTestRecordDto outpatientSkinTestRecordDto) {
|
||||
|
||||
if (OutpatientSkinTestRecordService.editSkinTestRecord(outpatientSkinTestRecordDto) <= 0) {
|
||||
if (!OutpatientSkinTestRecordService.editSkinTestRecord(outpatientSkinTestRecordDto)) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"皮试项目检查"}));
|
||||
@@ -69,7 +79,7 @@ public class OutpatientSkinTestRecordController {
|
||||
@PutMapping("/outpatient-record-signcheck")
|
||||
public R<?> nurseSignChkPs(@Validated @RequestBody OutpatientSkinTestRecordDto outpatientSkinTestRecordDto) {
|
||||
|
||||
if (OutpatientSkinTestRecordService.nurseSignChkPs(outpatientSkinTestRecordDto) <= 0) {
|
||||
if (!OutpatientSkinTestRecordService.nurseSignChkPs(outpatientSkinTestRecordDto)) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00003, null));
|
||||
}
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"皮试记录护士核对签名"}));
|
||||
|
||||
@@ -72,6 +72,7 @@ public class OutpatientSkinTestRecordDto {
|
||||
|
||||
/** 药品状态 */
|
||||
private Integer medicationStatusEnum;
|
||||
private String medicationStatusEnum_enumText;
|
||||
|
||||
/** 皮试结果 */
|
||||
private Integer clinicalStatusEnum;
|
||||
|
||||
@@ -58,4 +58,62 @@
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="getDoctorCommonUseList" resultType="com.openhis.web.doctorstation.dto.ConditionDefinitionMetadata">
|
||||
SELECT T1.ID,
|
||||
T1.source_enum,
|
||||
T1.condition_code,
|
||||
T1.NAME,
|
||||
T1.yb_flag,
|
||||
T1.yb_no,
|
||||
T1.yb_match_flag
|
||||
FROM cli_condition_definition AS T1
|
||||
JOIN (SELECT definition_id
|
||||
FROM cli_condition
|
||||
WHERE delete_flag = '0'
|
||||
AND definition_id IS NOT NULL
|
||||
AND recorder_id = #{userId}
|
||||
GROUP BY definition_id LIMIT 10) AS T2 ON T1.ID = T2.definition_id
|
||||
WHERE T1.delete_flag = '0'
|
||||
AND T1.status_enum = #{statusEnum}
|
||||
</select>
|
||||
|
||||
<select id="getUserPersonalList" resultType="com.openhis.web.doctorstation.dto.ConditionDefinitionMetadata">
|
||||
SELECT T1.ID,
|
||||
T1.source_enum,
|
||||
T1.condition_code,
|
||||
T1.NAME,
|
||||
T1.yb_flag,
|
||||
T1.yb_no,
|
||||
T1.yb_match_flag
|
||||
FROM cli_condition_definition AS T1
|
||||
JOIN (SELECT definition_id
|
||||
FROM cli_diagnosis_belong_binding
|
||||
WHERE delete_flag = '0'
|
||||
AND binding_enum = #{bindingEnum}
|
||||
AND object_id = #{userId}) AS T2 ON T1.ID = T2.definition_id
|
||||
WHERE T1.delete_flag = '0'
|
||||
AND T1.status_enum = #{statusEnum}
|
||||
</select>
|
||||
|
||||
<select id="getOrganizationList" resultType="com.openhis.web.doctorstation.dto.ConditionDefinitionMetadata">
|
||||
SELECT T1.ID,
|
||||
T1.source_enum,
|
||||
T1.condition_code,
|
||||
T1.NAME,
|
||||
T1.yb_flag,
|
||||
T1.yb_no,
|
||||
T1.yb_match_flag
|
||||
FROM cli_condition_definition AS T1
|
||||
JOIN (SELECT definition_id
|
||||
FROM cli_diagnosis_belong_binding
|
||||
WHERE delete_flag = '0'
|
||||
AND binding_enum = #{bindingEnum}
|
||||
<if test="currentUserOrganizationId != null">
|
||||
AND object_id = #{currentUserOrganizationId}
|
||||
</if>
|
||||
) AS T2 ON T1.ID = T2.definition_id
|
||||
WHERE T1.delete_flag = '0'
|
||||
AND T1.status_enum = #{statusEnum}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -16,7 +16,7 @@
|
||||
ad.name AS medicationInformation, --药品信息
|
||||
md.bus_no || ' ' || md.name || ' 规格:' || COALESCE(m.total_volume, '') AS medicationDetail,--药品
|
||||
m.lot_number AS medicationLotNumber, --药品批次号
|
||||
mr.status_enum, --药品状态
|
||||
mr.status_enum AS medicationStatusEnum, --药品状态
|
||||
sr.performer_id, --执行护士
|
||||
sr.performer_check_id,--核对人
|
||||
to_char(sr.occurrence_start_time, 'YYYY-MM-DD HH24:MI:SS') AS occurrenceStartTime, --预计执行时间
|
||||
@@ -39,7 +39,7 @@
|
||||
ad.bus_no = 'ps001' -- 皮试检查的编号,todo:编号未定,后期修改
|
||||
AND mr.skin_test_flag = 1
|
||||
AND md.skin_test_flag = 1
|
||||
AND sr.status_enum = 2 --服务状态有效
|
||||
AND sr.status_enum in (2,3,6) --服务状态有效
|
||||
AND ep.type_code = '1' --参与者身份类型是医生
|
||||
|
||||
<!-- 门诊号 查询条件-->
|
||||
@@ -95,7 +95,7 @@
|
||||
ad.bus_no = 'ps001' -- 皮试检查的编号,todo:编号未定,后期修改
|
||||
AND mr.skin_test_flag = 1
|
||||
AND md.skin_test_flag = 1
|
||||
AND sr.status_enum = 2 --服务状态有效
|
||||
AND sr.status_enum in (2,3,6) --服务状态有效
|
||||
AND ep.type_code = '1' --参与者身份类型是医生
|
||||
|
||||
<!-- 门诊号 查询条件-->
|
||||
|
||||
@@ -11,7 +11,7 @@ import lombok.Getter;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum EventStatus {
|
||||
public enum EventStatus implements HisEnumInterface {
|
||||
|
||||
/**
|
||||
* 草稿
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.openhis.common.utils;
|
||||
|
||||
import com.openhis.common.enums.HisEnumInterface;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.openhis.common.enums.HisEnumInterface;
|
||||
|
||||
public class EnumUtils {
|
||||
|
||||
/**
|
||||
@@ -15,10 +15,7 @@ public class EnumUtils {
|
||||
* @return 对应的 info,如果未找到则返回 null
|
||||
*/
|
||||
public static <E extends Enum<E> & HisEnumInterface> String getInfoByValue(Class<E> enumClass, Integer value) {
|
||||
return Arrays.stream(enumClass.getEnumConstants())
|
||||
.filter(e -> e.getValue().equals(value))
|
||||
.findFirst()
|
||||
.map(HisEnumInterface::getInfo)
|
||||
.orElse(null);
|
||||
return Arrays.stream(enumClass.getEnumConstants()).filter(e -> e.getValue().equals(value)).findFirst()
|
||||
.map(HisEnumInterface::getInfo).orElse(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.openhis.common.utils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class HisPageUtils {
|
||||
|
||||
@@ -22,8 +23,8 @@ public class HisPageUtils {
|
||||
* @param <R> 目标对象类型(DTO 类)
|
||||
* @return 分页结果(目标类型)
|
||||
*/
|
||||
public static <T, R> Page<R> selectPage(BaseMapper<T> mapper, QueryWrapper<T> queryWrapper,
|
||||
int pageNo, int pageSize, Class<R> targetClass) {
|
||||
public static <T, R> Page<R> selectPage(BaseMapper<T> mapper, QueryWrapper<T> queryWrapper, int pageNo,
|
||||
int pageSize, Class<R> targetClass) {
|
||||
// 构建分页对象
|
||||
Page<T> page = new Page<>(pageNo, pageSize);
|
||||
// 执行分页查询
|
||||
@@ -47,9 +48,7 @@ public class HisPageUtils {
|
||||
* @return 目标对象列表
|
||||
*/
|
||||
private static <T, R> List<R> convertToDtoList(List<T> sourceList, Class<R> targetClass) {
|
||||
return sourceList.stream()
|
||||
.map(source -> convertToDto(source, targetClass))
|
||||
.collect(Collectors.toList());
|
||||
return sourceList.stream().map(source -> convertToDto(source, targetClass)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user