Revert "```"

This reverts commit abc0674531.
This commit is contained in:
2025-12-26 22:21:21 +08:00
parent ae6c486114
commit 3115e38cc4
920 changed files with 14452 additions and 107025 deletions

View File

@@ -71,7 +71,7 @@ public class AllergyIntolerance extends HisBaseEntity {
private Date recordedDate;
/** 最后反应发生日期 */
private Date lastReactionOccurrence;
private Date lastReactionOccurrence ;
/** 曝光路线 */
private String exposureRoute;
@@ -82,19 +82,4 @@ public class AllergyIntolerance extends HisBaseEntity {
/** 删除状态 */
private String deleteFlag;
/**
* 药品定义id
*/
private Long medicationId;
/**
* 批次号
*/
private String lotNumber;
/**
* 就诊id
*/
private Long encounterId;
}

View File

@@ -1,6 +1,7 @@
package com.openhis.clinical.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.administration.domain.Encounter;
import com.openhis.clinical.domain.AllergyIntolerance;
/**
@@ -11,4 +12,19 @@ import com.openhis.clinical.domain.AllergyIntolerance;
*/
public interface IAllergyIntoleranceService extends IService<AllergyIntolerance> {
/**
* 更新或者保存过敏与不耐受
*
* @param allergyIntolerance 过敏与不耐受实体
*/
boolean saveOrUpdateAllergyIntolerance(AllergyIntolerance allergyIntolerance);
/**
* 根据药品请求id,获取皮试结果
*
* @param serviceRequestId 药品请求id
* @return 皮试结果
*/
Integer getPsResultByRequestId(Long serviceRequestId);
}

View File

@@ -36,15 +36,14 @@ public interface IProcedureService extends IService<Procedure> {
* @param eventStatus 执行状态
* @param procedureCategory 执行种类
* @param locationId 执行位置
* @param expectedDate 预计执行时间
* @param exeDate 执行时间
* @param groupId 组号
* @param refundId 取消执行id
* @return 执行id
*/
Long addProcedureRecord(Long encounterId, Long patientId, Long requestId, String requestTable,
EventStatus eventStatus, ProcedureCategory procedureCategory, Long locationId, Date expectedDate, Date exeDate,
Long groupId, Long refundId);
EventStatus eventStatus, ProcedureCategory procedureCategory, Long locationId, Date exeDate, Long groupId,
Long refundId);
/**
* 添加药品执行记录

View File

@@ -1,11 +1,16 @@
package com.openhis.clinical.service.impl;
import com.openhis.common.enums.ClinicalStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.clinical.domain.AllergyIntolerance;
import com.openhis.clinical.mapper.AllergyIntoleranceMapper;
import com.openhis.clinical.service.IAllergyIntoleranceService;
import com.openhis.common.enums.VerificationStatus;
import com.openhis.workflow.mapper.ServiceRequestMapper;
/**
* 过敏与不耐受Service业务层处理
@@ -17,4 +22,55 @@ import com.openhis.clinical.service.IAllergyIntoleranceService;
public class AllergyIntoleranceServiceImpl extends ServiceImpl<AllergyIntoleranceMapper, AllergyIntolerance>
implements IAllergyIntoleranceService {
@Autowired
ServiceRequestMapper serviceRequestMapper;
/**
* 更新或者保存过敏与不耐受
*
* @param allergyIntolerance 过敏与不耐受实体
*/
@Override
public boolean saveOrUpdateAllergyIntolerance(AllergyIntolerance allergyIntolerance) {
// 创建 LambdaQueryWrapper
LambdaQueryWrapper<AllergyIntolerance> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(AllergyIntolerance::getId, allergyIntolerance.getId()).eq(AllergyIntolerance::getPatientId,
allergyIntolerance.getPatientId());
// 查询是否存在记录
AllergyIntolerance existingEncounter = baseMapper.selectOne(queryWrapper);
if (existingEncounter != null) {
// 如果记录存在,更新记录
allergyIntolerance.setId(existingEncounter.getId()); // 设置主键
return baseMapper.updateById(allergyIntolerance) > 0;
} else {
// 如果记录不存在,插入新记录
return baseMapper.insert(allergyIntolerance) > 0;
}
}
/**
* 根据药品请求id,获取皮试结果
*
* @param serviceRequestId 服务请求id
* @return 皮试结果
*/
@Override
public Integer getPsResultByRequestId(Long serviceRequestId) {
// 创建 LambdaQueryWrapper
LambdaQueryWrapper<AllergyIntolerance> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(AllergyIntolerance::getRequestId, serviceRequestId)
// 皮试结果是已确认的
.eq(AllergyIntolerance::getVerificationStatusEnum, VerificationStatus.CONFIRMED)
.eq(AllergyIntolerance::getDeleteFlag, '0');
// 根据服务请求id,获取皮试结果
AllergyIntolerance allergyIntolerance = baseMapper.selectOne(queryWrapper);
if (allergyIntolerance == null) {
//没查到默认返回 未知
return ClinicalStatus.UNKNOWN.getValue();
}
return allergyIntolerance.getVerificationStatusEnum();
}
}

View File

@@ -15,7 +15,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.clinical.domain.ConditionDefinition;
import com.openhis.clinical.mapper.ConditionDefinitionMapper;
import com.openhis.clinical.service.IConditionDefinitionService;
import com.core.common.enums.DelFlag;
import com.openhis.common.enums.DelFlag;
import com.openhis.common.utils.HisQueryUtils;
import lombok.AllArgsConstructor;

View File

@@ -4,7 +4,7 @@ import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.core.common.enums.DelFlag;
import com.openhis.common.enums.DelFlag;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

View File

@@ -9,7 +9,6 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.core.common.enums.DelFlag;
import com.core.common.utils.DateUtils;
import com.core.common.utils.SecurityUtils;
import com.openhis.clinical.domain.Procedure;
@@ -17,6 +16,7 @@ import com.openhis.clinical.mapper.ProcedureMapper;
import com.openhis.clinical.service.IProcedurePerformerService;
import com.openhis.clinical.service.IProcedureService;
import com.openhis.common.constant.CommonConstants;
import com.openhis.common.enums.DelFlag;
import com.openhis.common.enums.EventStatus;
import com.openhis.common.enums.ProcedureCategory;
import com.openhis.medication.domain.MedicationRequest;
@@ -60,16 +60,15 @@ public class ProcedureServiceImpl extends ServiceImpl<ProcedureMapper, Procedure
* @param eventStatus 执行状态
* @param procedureCategory 执行种类
* @param locationId 执行位置
* @param expectedDate 预计执行时间
* @param exeDate 执行时间
* @param groupId 组号
* @param refundId 取消执行id
* @return 执行id
* @return 是否成功
*/
@Override
public Long addProcedureRecord(Long encounterId, Long patientId, Long requestId, String requestTable,
EventStatus eventStatus, ProcedureCategory procedureCategory, Long locationId, Date expectedDate, Date exeDate,
Long groupId, Long refundId) {
EventStatus eventStatus, ProcedureCategory procedureCategory, Long locationId, Date exeDate, Long groupId,
Long refundId) {
Long orgId = SecurityUtils.getLoginUser().getOrgId();
Procedure procedure = new Procedure();
procedure
@@ -83,10 +82,8 @@ public class ProcedureServiceImpl extends ServiceImpl<ProcedureMapper, Procedure
.setOrgId(orgId)
// 患者id
.setPatientId(patientId)
// 预计执行时间
.setOccurrenceTime(expectedDate)
// 执行时间
.setRecordedTime(exeDate)
.setOccurrenceTime(exeDate)
// 执行状态
.setStatusEnum(eventStatus.getValue())
// 执行种类