版本更新
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
package com.openhis.clinical.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 过敏与不耐受Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-03-07
|
||||
*/
|
||||
@Data
|
||||
@TableName("cli_allergy_intolerance")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class AllergyIntolerance extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 服务申请ID */
|
||||
private Long requestId;
|
||||
|
||||
/** 临床状况 */
|
||||
private Integer clinicalStatusEnum;
|
||||
|
||||
/** 验证状态 */
|
||||
private Integer verificationStatusEnum;
|
||||
|
||||
/** 类型 */
|
||||
private Integer typeEnum;
|
||||
|
||||
/** 过敏原类别 */
|
||||
private String categoryCode;
|
||||
|
||||
/** 危险程度 */
|
||||
private Integer criticalityEnum;
|
||||
|
||||
/** 过敏物质编码 */
|
||||
private String code;
|
||||
|
||||
/** 患者ID */
|
||||
private Long patientId;
|
||||
|
||||
/** 反应描述 */
|
||||
private String description;
|
||||
|
||||
/** 严重程度 */
|
||||
private Integer severityEnum;
|
||||
|
||||
/** 过敏发生开始日期 */
|
||||
private Date onsetDateTime;
|
||||
|
||||
/** 记录者 */
|
||||
private Long practitionerId;
|
||||
|
||||
/** 断言者 */
|
||||
private Long checkPractitionerId;
|
||||
|
||||
/** 记录日期 */
|
||||
private Date recordedDate;
|
||||
|
||||
/** 最后反应发生日期 */
|
||||
private Date lastReactionOccurrence ;
|
||||
|
||||
/** 曝光路线 */
|
||||
private String exposureRoute;
|
||||
|
||||
/** 备注 */
|
||||
private String note;
|
||||
|
||||
/** 删除状态 */
|
||||
private String deleteFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.openhis.clinical.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 疾病与诊断管理Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("cli_condition")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class Condition extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 验证状态 */
|
||||
private Integer verificationStatusEnum;
|
||||
|
||||
/** 临床特征 */
|
||||
private Integer clinicalStatusEnum;
|
||||
|
||||
/** 分类 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 严重程度 */
|
||||
private Integer severityEnum;
|
||||
|
||||
/** 疾病或诊断编码 */
|
||||
private String busNo;
|
||||
|
||||
/** 身体部位 */
|
||||
private String bodySiteJson;
|
||||
|
||||
/** 身体结构 */
|
||||
private Long bodyStructureId;
|
||||
|
||||
/** 病人Id */
|
||||
private Long patientId;
|
||||
|
||||
/** 疾病与诊断描述 */
|
||||
private String description;
|
||||
|
||||
/** 初次发病时间 */
|
||||
private Date onsetDatetime;
|
||||
|
||||
/** 初次发病年龄 */
|
||||
private Integer onsetAge;
|
||||
|
||||
/** 初次发病描述 */
|
||||
private String onsetText;
|
||||
|
||||
/** 症状减轻时间 */
|
||||
private Date abatementDatetime;
|
||||
|
||||
/** 症状减轻年龄 */
|
||||
private Integer abatementAge;
|
||||
|
||||
/** 症状减轻时期 */
|
||||
private String abatementString;
|
||||
|
||||
/** 记录时间 */
|
||||
private Date recordedDatetime;
|
||||
|
||||
/** 记录人 */
|
||||
private Long recorderId;
|
||||
|
||||
/** 阶段总结 */
|
||||
private String stageSummaryText;
|
||||
|
||||
/** 证明 */
|
||||
private String evidence;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 诊断定义Id */
|
||||
private Long definitionId;
|
||||
|
||||
/**
|
||||
* 中医标识
|
||||
*/
|
||||
private Integer tcmFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.openhis.clinical.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 诊断定义管理Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("cli_condition_definition")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ConditionDefinition extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 所属分类 */
|
||||
private Integer sourceEnum;
|
||||
|
||||
/** 编码 */
|
||||
private String conditionCode;
|
||||
|
||||
/** 诊断名称 */
|
||||
private String name;
|
||||
|
||||
/** 诊断名称拼音 */
|
||||
private String pyStr;
|
||||
|
||||
/** 诊断名称五笔拼音 */
|
||||
private String wbStr;
|
||||
|
||||
/** 类型 */
|
||||
private String typeCode;
|
||||
|
||||
/** 描述 */
|
||||
private String description;
|
||||
|
||||
/** 医保标记 */
|
||||
private Integer ybFlag;
|
||||
|
||||
/** 特慢病编码(选填) */
|
||||
private String diseaseCode;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.openhis.clinical.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 诊断归属绑定Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("cli_diagnosis_belong_binding")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class DiagnosisBelongBinding extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 用户ID或科室/机构ID */
|
||||
private Long objectId;
|
||||
|
||||
/** 诊断定义ID */
|
||||
private Long definitionId;
|
||||
|
||||
/** 绑定类型 */
|
||||
private Integer bindingEnum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.openhis.clinical.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 手术与医嘱管理Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("cli_procedure")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class Procedure extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 医嘱id */
|
||||
private Long requestId;
|
||||
|
||||
/** 医嘱所在表 */
|
||||
private String requestTable;
|
||||
|
||||
/** 当前状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 当前状态原因 */
|
||||
private String statusReasonText;
|
||||
|
||||
/** 分类 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 手术编码 */
|
||||
private String procedureCode;
|
||||
|
||||
/** 就诊Id */
|
||||
private Long encounterId;
|
||||
|
||||
/** 患者Id */
|
||||
private Long patientId;
|
||||
|
||||
/** 发生日期和时间 */
|
||||
private Date occurrenceTime;
|
||||
|
||||
/** 发生时期 */
|
||||
private String occurrencePeriod;
|
||||
|
||||
/** 发生年龄 */
|
||||
private String occurrenceAge;
|
||||
|
||||
/** 发生时间描述 */
|
||||
private String occurrenceText;
|
||||
|
||||
/** 记录日期 */
|
||||
private Date recordedTime;
|
||||
|
||||
/** 记录人 */
|
||||
private Long recorderId;
|
||||
|
||||
/** 是否有报告 */
|
||||
private Integer reportFlag;
|
||||
|
||||
/** 报告证据 */
|
||||
private Long reportedPatientId;
|
||||
|
||||
/** 执行科室 */
|
||||
private Long orgId;
|
||||
|
||||
/** 执行位置 */
|
||||
private Long locationId;
|
||||
|
||||
/** 理由 */
|
||||
private String reasonText;
|
||||
|
||||
/** 身体部位 */
|
||||
private String bodySiteJson;
|
||||
|
||||
/** 身体结构 */
|
||||
private Long bodyStructureId;
|
||||
|
||||
/** 结果 */
|
||||
private String resultText;
|
||||
|
||||
/** 报告 */
|
||||
private String reportJson;
|
||||
|
||||
/** 并发症 */
|
||||
private String complicationJson;
|
||||
|
||||
/** 跟进指南 */
|
||||
private String followUpJson;
|
||||
|
||||
/** 组号 */
|
||||
private Long groupId;
|
||||
|
||||
/** 取消执行id */
|
||||
private Long refundId;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.openhis.clinical.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 手术与医嘱执行人管理Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("cli_procedure_performer")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ProcedurePerformer extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 手术id */
|
||||
private Long procedureId;
|
||||
|
||||
/** 参与者类型 */
|
||||
private String functionCode;
|
||||
|
||||
/** 开始时间 */
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
private Date endTime;
|
||||
|
||||
/** 参与者ID */
|
||||
private Long practitionerId;
|
||||
|
||||
/** 飞刀机构 */
|
||||
private String orgFromId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.openhis.clinical.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 门诊预约记录Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Data
|
||||
@TableName("cli_reservation_record")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ReservationRecord extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 患者名称
|
||||
*/
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 患者联系方式
|
||||
*/
|
||||
private String patientTel;
|
||||
|
||||
/**
|
||||
* 主诉
|
||||
*/
|
||||
private String chiefComplaint;
|
||||
|
||||
/**
|
||||
* 就诊预约时间
|
||||
*/
|
||||
private Date reservationTime;
|
||||
|
||||
/**
|
||||
* 预约科室id
|
||||
*/
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 预约医生id
|
||||
*/
|
||||
private Long practitionerId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.openhis.clinical.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.clinical.domain.AllergyIntolerance;
|
||||
|
||||
/**
|
||||
* 过敏与不耐受Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-03-07
|
||||
*/
|
||||
@Repository
|
||||
public interface AllergyIntoleranceMapper extends BaseMapper<AllergyIntolerance> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.openhis.clinical.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.clinical.domain.ConditionDefinition;
|
||||
|
||||
/**
|
||||
* 诊断定义管理Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Repository
|
||||
public interface ConditionDefinitionMapper extends BaseMapper<ConditionDefinition> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.openhis.clinical.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.clinical.domain.Condition;
|
||||
|
||||
/**
|
||||
* 疾病与诊断管理Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Repository
|
||||
public interface ConditionMapper extends BaseMapper<Condition> {
|
||||
|
||||
/**
|
||||
* 删除诊断管理
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
*/
|
||||
void deleteByEncounterId(@Param("encounterId") Long encounterId);
|
||||
|
||||
|
||||
/**
|
||||
* 删除中医诊断管理
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
*/
|
||||
void deleteTcmByEncounterId(@Param("encounterId") Long encounterId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.openhis.clinical.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.clinical.domain.DiagnosisBelongBinding;
|
||||
|
||||
/**
|
||||
* 诊断归属绑定Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Repository
|
||||
public interface DiagnosisBelongBindingMapper extends BaseMapper<DiagnosisBelongBinding> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.openhis.clinical.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.clinical.domain.Procedure;
|
||||
|
||||
/**
|
||||
* 手术与治疗管理Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Repository
|
||||
public interface ProcedureMapper extends BaseMapper<Procedure> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.openhis.clinical.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.clinical.domain.ProcedurePerformer;
|
||||
|
||||
/**
|
||||
* 手术与治疗执行人管理Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Repository
|
||||
public interface ProcedurePerformerMapper extends BaseMapper<ProcedurePerformer> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.openhis.clinical.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.clinical.domain.ReservationRecord;
|
||||
|
||||
/**
|
||||
* 门诊预约记录Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Repository
|
||||
public interface ReservationRecordMapper extends BaseMapper<ReservationRecord> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.openhis.clinical.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.Encounter;
|
||||
import com.openhis.clinical.domain.AllergyIntolerance;
|
||||
|
||||
/**
|
||||
* 过敏与不耐受Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-03-07
|
||||
*/
|
||||
public interface IAllergyIntoleranceService extends IService<AllergyIntolerance> {
|
||||
|
||||
/**
|
||||
* 更新或者保存过敏与不耐受
|
||||
*
|
||||
* @param allergyIntolerance 过敏与不耐受实体
|
||||
*/
|
||||
boolean saveOrUpdateAllergyIntolerance(AllergyIntolerance allergyIntolerance);
|
||||
|
||||
/**
|
||||
* 根据药品请求id,获取皮试结果
|
||||
*
|
||||
* @param serviceRequestId 药品请求id
|
||||
* @return 皮试结果
|
||||
*/
|
||||
Integer getPsResultByRequestId(Long serviceRequestId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.openhis.clinical.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.clinical.domain.ConditionDefinition;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 诊断定义管理Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IConditionDefinitionService extends IService<ConditionDefinition> {
|
||||
|
||||
/**
|
||||
* 新增病种
|
||||
*
|
||||
* @param conditionDefinition 病种目录实体
|
||||
* @return
|
||||
*/
|
||||
boolean addDisease(ConditionDefinition conditionDefinition);
|
||||
|
||||
/**
|
||||
* 新增医保病种
|
||||
*
|
||||
* @param conditionDefinition 病种目录实体
|
||||
* @return
|
||||
*/
|
||||
boolean addYbDisease(ConditionDefinition conditionDefinition);
|
||||
|
||||
/**
|
||||
* 根据id查询诊断定义
|
||||
*
|
||||
* @param collect id集合
|
||||
* @return 诊断定义集合
|
||||
*/
|
||||
List<ConditionDefinition> getConditionDefinitionListByIds(List<Long> collect);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.openhis.clinical.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.clinical.domain.Condition;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 疾病与诊断管理Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IConditionService extends IService<Condition> {
|
||||
|
||||
/**
|
||||
* 医生门诊就诊时保存诊断
|
||||
*
|
||||
* @param condition 诊断信息
|
||||
* @return 主键ID
|
||||
*/
|
||||
Long saveConditionByDoctor(Condition condition);
|
||||
|
||||
/**
|
||||
* 根据id查诊断集合
|
||||
* @param collect id集合
|
||||
* @return 诊断集合
|
||||
*/
|
||||
List<Condition> getConditionListById(List<Long> collect);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.openhis.clinical.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.clinical.domain.DiagnosisBelongBinding;
|
||||
|
||||
/**
|
||||
* 诊断归属绑定Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IDiagnosisBelongBindingService extends IService<DiagnosisBelongBinding> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.openhis.clinical.service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.clinical.domain.ProcedurePerformer;
|
||||
|
||||
/**
|
||||
* 手术与治疗执行人管理Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IProcedurePerformerService extends IService<ProcedurePerformer> {
|
||||
|
||||
/**
|
||||
* 添加执行人记录
|
||||
*
|
||||
* @param procedureId 执行记录id
|
||||
* @param now 执行时间
|
||||
* @return 添加结果
|
||||
*/
|
||||
boolean addPerformRecord(Long procedureId, Date now);
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.openhis.clinical.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.clinical.domain.Procedure;
|
||||
import com.openhis.common.enums.EventStatus;
|
||||
import com.openhis.common.enums.ProcedureCategory;
|
||||
import com.openhis.medication.domain.MedicationRequest;
|
||||
|
||||
/**
|
||||
* 手术与治疗管理Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IProcedureService extends IService<Procedure> {
|
||||
|
||||
/**
|
||||
* 查询执行记录
|
||||
*
|
||||
* @param requestId 医嘱ids
|
||||
* @param requestTable 医嘱所在表
|
||||
* @return 执行记录
|
||||
*/
|
||||
List<Procedure> getProcedureRecords(List<Long> requestId, String requestTable);
|
||||
|
||||
/**
|
||||
* 添加执行记录
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @param patientId 患者id
|
||||
* @param requestId 医嘱id
|
||||
* @param requestTable 医嘱所在表
|
||||
* @param eventStatus 执行状态
|
||||
* @param procedureCategory 执行种类
|
||||
* @param locationId 执行位置
|
||||
* @param groupId 组号
|
||||
* @param refundId 取消执行id
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean addProcedureRecord(Long encounterId, Long patientId, Long requestId, String requestTable,
|
||||
EventStatus eventStatus, ProcedureCategory procedureCategory, Long locationId, Long groupId, Long refundId);
|
||||
|
||||
/**
|
||||
* 添加药品执行记录
|
||||
*
|
||||
* @param medicationRequest 药品医嘱
|
||||
* @param procedureCategory 执行种类
|
||||
* @param locationId 执行位置
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean addMedicationProcedureRecord(MedicationRequest medicationRequest, ProcedureCategory procedureCategory,
|
||||
Long locationId);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.clinical.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.clinical.domain.ReservationRecord;
|
||||
|
||||
/**
|
||||
* 门诊预约记录Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IReservationRecordService extends IService<ReservationRecord> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
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业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-03-07
|
||||
*/
|
||||
@Service
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.openhis.clinical.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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 lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 诊断定义管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class ConditionDefinitionServiceImpl extends ServiceImpl<ConditionDefinitionMapper, ConditionDefinition>
|
||||
implements IConditionDefinitionService {
|
||||
|
||||
private final ConditionDefinitionMapper conditionDefinitionMapper;
|
||||
|
||||
/**
|
||||
* 新增病种
|
||||
*
|
||||
* @param conditionDefinition 病种目录实体
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean addDisease(ConditionDefinition conditionDefinition) {
|
||||
// 根据病种编码判断病种是否存在
|
||||
List<ConditionDefinition> conditionDefinitions =
|
||||
conditionDefinitionMapper.selectList(new LambdaQueryWrapper<ConditionDefinition>()
|
||||
.eq(ConditionDefinition::getConditionCode, conditionDefinition.getConditionCode()));
|
||||
if (conditionDefinitions.size() > 0) {
|
||||
return false;
|
||||
}
|
||||
// 新增病种
|
||||
int insert = conditionDefinitionMapper.insert(conditionDefinition);
|
||||
return insert == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增医保病种
|
||||
*
|
||||
* @param conditionDefinition 病种目录实体
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean addYbDisease(ConditionDefinition conditionDefinition) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询诊断定义
|
||||
*
|
||||
* @param collect id集合
|
||||
* @return 诊断定义集合
|
||||
*/
|
||||
@Override
|
||||
public List<ConditionDefinition> getConditionDefinitionListByIds(List<Long> collect) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<ConditionDefinition>()
|
||||
.in(ConditionDefinition::getId, collect).eq(ConditionDefinition::getDescription, DelFlag.NO.getCode()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.openhis.clinical.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.clinical.domain.Condition;
|
||||
import com.openhis.clinical.mapper.ConditionMapper;
|
||||
import com.openhis.clinical.service.IConditionService;
|
||||
|
||||
/**
|
||||
* 疾病与诊断管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class ConditionServiceImpl extends ServiceImpl<ConditionMapper, Condition> implements IConditionService {
|
||||
|
||||
/**
|
||||
* 医生门诊就诊时保存诊断
|
||||
*
|
||||
* @param condition 诊断信息
|
||||
* @return 主键ID
|
||||
*/
|
||||
@Override
|
||||
public Long saveConditionByDoctor(Condition condition) {
|
||||
condition.setRecordedDatetime(new Date());
|
||||
condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
||||
if (condition.getId() == null) {
|
||||
baseMapper.insert(condition);
|
||||
} else {
|
||||
baseMapper.updateById(condition);
|
||||
}
|
||||
return condition.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查诊断集合
|
||||
*
|
||||
* @param collect id集合
|
||||
* @return 诊断集合
|
||||
*/
|
||||
@Override
|
||||
public List<Condition> getConditionListById(List<Long> collect) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<Condition>().in(Condition::getId, collect)
|
||||
.eq(Condition::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.openhis.clinical.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.clinical.domain.DiagnosisBelongBinding;
|
||||
import com.openhis.clinical.mapper.DiagnosisBelongBindingMapper;
|
||||
import com.openhis.clinical.service.IDiagnosisBelongBindingService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 诊断归属绑定Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class DiagnosisBelongBindingServiceImpl extends ServiceImpl<DiagnosisBelongBindingMapper, DiagnosisBelongBinding>
|
||||
implements IDiagnosisBelongBindingService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.openhis.clinical.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.clinical.domain.ProcedurePerformer;
|
||||
import com.openhis.clinical.mapper.ProcedurePerformerMapper;
|
||||
import com.openhis.clinical.service.IProcedurePerformerService;
|
||||
|
||||
/**
|
||||
* 手术与治疗执行人管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class ProcedurePerformerServiceImpl extends ServiceImpl<ProcedurePerformerMapper, ProcedurePerformer>
|
||||
implements IProcedurePerformerService {
|
||||
|
||||
@Override
|
||||
public boolean addPerformRecord(Long procedureId, Date now) {
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
ProcedurePerformer procedurePerformer = new ProcedurePerformer();
|
||||
procedurePerformer
|
||||
// 执行记录id
|
||||
.setProcedureId(procedureId)
|
||||
// 执行开始时间
|
||||
.setStartTime(now)
|
||||
// 执行人
|
||||
.setPractitionerId(practitionerId);
|
||||
int result = baseMapper.insert(procedurePerformer);
|
||||
return result > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
package com.openhis.clinical.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
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.utils.DateUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.clinical.domain.Procedure;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 手术与治疗管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class ProcedureServiceImpl extends ServiceImpl<ProcedureMapper, Procedure> implements IProcedureService {
|
||||
|
||||
@Resource
|
||||
private IProcedurePerformerService procedurePerformerService;
|
||||
|
||||
/**
|
||||
* 查询执行记录
|
||||
*
|
||||
* @param requestIds 医嘱ids
|
||||
* @param requestTable 医嘱所在表
|
||||
* @return 执行记录
|
||||
*/
|
||||
@Override
|
||||
public List<Procedure> getProcedureRecords(List<Long> requestIds, String requestTable) {
|
||||
LambdaQueryWrapper<Procedure> queryWrapper = new LambdaQueryWrapper<Procedure>()
|
||||
.in(Procedure::getRequestId, requestIds).eq(Procedure::getDeleteFlag, DelFlag.NO.getCode());
|
||||
if (requestTable != null) {
|
||||
queryWrapper.eq(Procedure::getRequestTable, requestTable);
|
||||
}
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加执行记录
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @param patientId 患者id
|
||||
* @param requestId 医嘱id
|
||||
* @param requestTable 医嘱所在表
|
||||
* @param eventStatus 执行状态
|
||||
* @param procedureCategory 执行种类
|
||||
* @param locationId 执行位置
|
||||
* @param groupId 组号
|
||||
* @param refundId 取消执行id
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean addProcedureRecord(Long encounterId, Long patientId, Long requestId, String requestTable,
|
||||
EventStatus eventStatus, ProcedureCategory procedureCategory, Long locationId, Long groupId, Long refundId) {
|
||||
Date now = DateUtils.getNowDate();
|
||||
Long orgId = SecurityUtils.getLoginUser().getOrgId();
|
||||
Procedure procedure = new Procedure();
|
||||
procedure
|
||||
// 医嘱id
|
||||
.setRequestId(requestId)
|
||||
// 医嘱所在表
|
||||
.setRequestTable(requestTable)
|
||||
// 就诊id
|
||||
.setEncounterId(encounterId)
|
||||
// 执行科室
|
||||
.setOrgId(orgId)
|
||||
// 患者id
|
||||
.setPatientId(patientId)
|
||||
// 执行时间
|
||||
.setOccurrenceTime(now)
|
||||
// 执行状态
|
||||
.setStatusEnum(eventStatus.getValue())
|
||||
// 执行种类
|
||||
.setCategoryEnum(procedureCategory.getValue());
|
||||
if (locationId != null) {
|
||||
// 执行位置
|
||||
procedure.setLocationId(locationId);
|
||||
}
|
||||
if (groupId != null) {
|
||||
// 组号
|
||||
procedure.setGroupId(groupId);
|
||||
}
|
||||
if (refundId != null) {
|
||||
procedure.setRefundId(refundId);
|
||||
}
|
||||
int result = baseMapper.insert(procedure);
|
||||
if (result > 0) {
|
||||
// 添加执行人子表
|
||||
return procedurePerformerService.addPerformRecord(procedure.getId(), now);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加药品执行记录
|
||||
*
|
||||
* @param medicationRequest 药品医嘱
|
||||
* @param procedureCategory 执行种类
|
||||
* @param locationId 执行位置
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean addMedicationProcedureRecord(MedicationRequest medicationRequest,
|
||||
ProcedureCategory procedureCategory, Long locationId) {
|
||||
Date now = DateUtils.getNowDate();
|
||||
Long orgId = SecurityUtils.getLoginUser().getOrgId();
|
||||
Procedure procedure = new Procedure();
|
||||
procedure
|
||||
// 药品医嘱id
|
||||
.setRequestId(medicationRequest.getId())
|
||||
// 药品申请表
|
||||
.setRequestTable(CommonConstants.TableName.MED_MEDICATION_REQUEST)
|
||||
// 就诊id
|
||||
.setEncounterId(medicationRequest.getEncounterId())
|
||||
// 执行科室
|
||||
.setOrgId(orgId)
|
||||
// 患者id
|
||||
.setPatientId(medicationRequest.getPatientId())
|
||||
// 执行时间
|
||||
.setOccurrenceTime(now)
|
||||
// 执行种类
|
||||
.setCategoryEnum(procedureCategory.getValue())
|
||||
// 执行位置
|
||||
.setLocationId(locationId);
|
||||
int result = baseMapper.insert(procedure);
|
||||
if (result > 0) {
|
||||
// 添加执行人子表
|
||||
return procedurePerformerService.addPerformRecord(procedure.getId(), now);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.openhis.clinical.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.clinical.domain.ReservationRecord;
|
||||
import com.openhis.clinical.mapper.ReservationRecordMapper;
|
||||
import com.openhis.clinical.service.IReservationRecordService;
|
||||
|
||||
/**
|
||||
* 门诊预约记录Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class ReservationRecordServiceImpl extends ServiceImpl<ReservationRecordMapper, ReservationRecord>
|
||||
implements IReservationRecordService {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user