门诊皮试记录up
This commit is contained in:
@@ -7,11 +7,10 @@ import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.core.common.exception.CustomException;
|
||||
import com.openhis.workflow.service.IServiceRequestService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.utils.DateUtils;
|
||||
@@ -36,6 +35,7 @@ import com.openhis.web.outpatientmanage.mapper.OutpatientManageMapper;
|
||||
import com.openhis.web.patientmanage.dto.PatientListDto;
|
||||
import com.openhis.workflow.domain.ServiceRequest;
|
||||
import com.openhis.workflow.mapper.ServiceRequestMapper;
|
||||
import com.openhis.workflow.service.IServiceRequestService;
|
||||
|
||||
/**
|
||||
* 门诊管理 应用实现类
|
||||
@@ -174,6 +174,11 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
*/
|
||||
@Override
|
||||
public int editSkinTestRecord(OutpatientSkinTestRecordDto outpatientSkinTestRecordDto) {
|
||||
// 判断核对人是否不为空
|
||||
if (outpatientSkinTestRecordDto.getPerformerCheckId() != null) {
|
||||
// 签名后不能修改
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 更新服务申请管理表
|
||||
ServiceRequest serviceRequest = new ServiceRequest();
|
||||
@@ -189,7 +194,7 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
if (StringUtils.isEmpty(outpatientSkinTestRecordDto.getOccurrenceEndTime())) {
|
||||
// 结束时间为空,开始时间加10min设置
|
||||
endTime =
|
||||
DateUtils.addDateMinute(DateUtils.parseDate(outpatientSkinTestRecordDto.getOccurrenceEndTime()), 10);
|
||||
DateUtils.addDateMinute(DateUtils.parseDate(outpatientSkinTestRecordDto.getOccurrenceStartTime()), 10);
|
||||
} else {
|
||||
endTime = DateUtils.parseDate(outpatientSkinTestRecordDto.getOccurrenceEndTime());
|
||||
}
|
||||
@@ -226,11 +231,13 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
|
||||
// 过敏与不耐受表更新
|
||||
AllergyIntolerance allergyIntolerance = new AllergyIntolerance();
|
||||
if (outpatientSkinTestRecordDto.getClinicalStatusEnum() != null) {
|
||||
// 设置临床状态(皮试结果)
|
||||
allergyIntolerance.setClinicalStatusEnum(outpatientSkinTestRecordDto.getClinicalStatusEnum());
|
||||
}
|
||||
allergyIntolerance
|
||||
// 设置服务申请ID
|
||||
.setRequestId(outpatientSkinTestRecordDto.getId())
|
||||
// 设置临床状态(皮试结果)
|
||||
.setClinicalStatusEnum(outpatientSkinTestRecordDto.getClinicalStatusEnum())
|
||||
// 设置验证状态(皮试检查的状态)
|
||||
.setVerificationStatusEnum(outpatientSkinTestRecordDto.getVerificationStatusEnum())
|
||||
// 设置患者id
|
||||
@@ -264,13 +271,13 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
public int nurseSignChkPs(OutpatientSkinTestRecordDto outpatientSkinTestRecordDto) {
|
||||
|
||||
// 过敏与不耐受表更新
|
||||
AllergyIntolerance allergyIntolerance =
|
||||
allergyIntoleranceMapper.selectById(outpatientSkinTestRecordDto.getId());
|
||||
|
||||
// 检查的状态不为确定和反驳的时候,不更新
|
||||
if (!(allergyIntolerance.getVerificationStatusEnum() == 2
|
||||
&& allergyIntolerance.getVerificationStatusEnum() == 3)) {
|
||||
QueryWrapper<AllergyIntolerance> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("request_id", outpatientSkinTestRecordDto.getId());
|
||||
AllergyIntolerance allergyIntolerance = allergyIntoleranceMapper.selectOne(queryWrapper);
|
||||
|
||||
// 检查的状态是确定和反驳的时候,不更新
|
||||
if (allergyIntolerance == null || (allergyIntolerance.getVerificationStatusEnum() != 2
|
||||
&& allergyIntolerance.getVerificationStatusEnum() != 3)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -287,16 +294,17 @@ public class OutpatientSkinTestRecordServiceImpl implements IOutpatientSkinTestR
|
||||
serviceRequest.setPerformerCheckId(practitioner.getId());
|
||||
// 以id为主条件更新服务申请管理表
|
||||
UpdateWrapper<ServiceRequest> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("id", serviceRequest.getId()).set("performer_check_id", serviceRequest.getPerformerCheckId());
|
||||
updateWrapper.eq("id", outpatientSkinTestRecordDto.getId()).set("performer_check_id",
|
||||
serviceRequest.getPerformerCheckId());
|
||||
|
||||
boolean resultUpdateRequestService=serviceRequestService.update(updateWrapper);
|
||||
boolean resultUpdateRequestService = serviceRequestService.update(null, updateWrapper);
|
||||
|
||||
// 更新过敏与不耐受表的断言者
|
||||
//设置核对人
|
||||
// 设置断言人
|
||||
allergyIntolerance.setCheckPractitionerId(practitioner.getId());
|
||||
// 以服务申请ID为主条件更新服务申请管理表
|
||||
UpdateWrapper<AllergyIntolerance> updateWrapperAI = new UpdateWrapper<>();
|
||||
updateWrapperAI.eq("request_id", allergyIntolerance.getRequestId()).set("check_practitioner_id", allergyIntolerance.getCheckPractitionerId());
|
||||
updateWrapperAI.eq("request_id", outpatientSkinTestRecordDto.getId()).set("check_practitioner_id",
|
||||
allergyIntolerance.getCheckPractitionerId());
|
||||
boolean resultUpdateAllergyIntolerance = serviceRequestService.update(updateWrapper);
|
||||
|
||||
if (resultUpdateRequestService && resultUpdateAllergyIntolerance) {
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
mr.status_enum, --药品状态
|
||||
sr.performer_id, --执行护士
|
||||
sr.performer_check_id,--核对人
|
||||
sr.occurrence_start_time, --预计执行时间
|
||||
sr.occurrence_end_time,--预计结束时间
|
||||
to_char(sr.occurrence_start_time, 'YYYY-MM-DD HH24:MI:SS') AS occurrenceStartTime, --预计执行时间
|
||||
to_char(sr.occurrence_end_time, 'YYYY-MM-DD HH24:MI:SS') AS occurrenceEndTime, --预计结束时间
|
||||
ai.clinical_status_enum, --皮试结果
|
||||
ai.verification_status_enum, --皮试检查项目状态
|
||||
ep.practitioner_id as doctorId, --开单医生
|
||||
|
||||
@@ -15,7 +15,8 @@ import lombok.Getter;
|
||||
public enum ClinicalStatus implements HisEnumInterface {
|
||||
ACTIVE(1, "active", "阳性"),
|
||||
INACTIVE(2, "inactive", "阴性"),
|
||||
RESOLVED(3, "resolved", "已解决");
|
||||
RESOLVED(3, "resolved", "已解决"),
|
||||
UNKNOWN(4, "unknown", "未知");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
|
||||
Reference in New Issue
Block a user