Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
*/
|
||||
package com.core.common.enums;
|
||||
|
||||
import com.core.common.utils.StringUtils;
|
||||
|
||||
/**
|
||||
* 采番前缀枚举
|
||||
*
|
||||
@@ -17,8 +15,12 @@ public enum AssignSeqEnum {
|
||||
* 例子
|
||||
*/
|
||||
TEST("1", "例子", "TE"),
|
||||
//患者编号
|
||||
PATIENT_NUM("1", "患者编号", "PN");
|
||||
// 患者编号
|
||||
PATIENT_NUM("1", "患者编号", "PN"),
|
||||
/**
|
||||
* 就诊编号
|
||||
*/
|
||||
ENCOUNTER_NUM("1", "就诊编号", "EN");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
@@ -7,6 +7,8 @@ import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.enums.PractitionerRole;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -17,22 +19,13 @@ import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.AgeCalculatorUtil;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.openhis.administration.domain.Encounter;
|
||||
import com.openhis.administration.domain.EncounterLocation;
|
||||
import com.openhis.administration.domain.EncounterParticipant;
|
||||
import com.openhis.administration.domain.Patient;
|
||||
import com.openhis.administration.domain.*;
|
||||
import com.openhis.administration.mapper.PatientMapper;
|
||||
import com.openhis.administration.service.IEncounterLocationService;
|
||||
import com.openhis.administration.service.IEncounterParticipantService;
|
||||
import com.openhis.administration.service.IEncounterService;
|
||||
import com.openhis.administration.service.*;
|
||||
import com.openhis.clinical.domain.ConditionDefinition;
|
||||
import com.openhis.clinical.mapper.ConditionDefinitionMapper;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.AdministrativeGender;
|
||||
import com.openhis.common.enums.PractitionerRole;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.enums.WhetherContainUnknown;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
@@ -74,6 +67,12 @@ public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistr
|
||||
@Resource
|
||||
IEncounterParticipantService iEncounterParticipantService;
|
||||
|
||||
@Resource
|
||||
IAccountService iAccountService;
|
||||
|
||||
@Resource
|
||||
IChargeItemService iChargeItemService;
|
||||
|
||||
/**
|
||||
* 门诊挂号 - 查询患者信息
|
||||
*
|
||||
@@ -92,12 +91,19 @@ public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistr
|
||||
// 患者信息
|
||||
Page<PatientMetadata> patientMetadataPage =
|
||||
HisPageUtils.selectPage(patientMapper, queryWrapper, pageNo, pageSize, PatientMetadata.class);
|
||||
// 现有就诊过的患者id集合
|
||||
List<Long> patientIdList =
|
||||
iEncounterService.list().stream().map(e -> e.getPatientId()).collect(Collectors.toList());
|
||||
|
||||
patientMetadataPage.getRecords().forEach(e -> {
|
||||
// 性别枚举
|
||||
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
// 计算年龄
|
||||
e.setAge(AgeCalculatorUtil.getAge(e.getBirthDate()));
|
||||
// 初复诊
|
||||
e.setFirstEnum_enumText(patientIdList.contains(e.getId()) ? EncounterType.FOLLOW_UP.getInfo()
|
||||
: EncounterType.INITIAL.getInfo());
|
||||
|
||||
});
|
||||
return patientMetadataPage;
|
||||
}
|
||||
@@ -217,6 +223,10 @@ public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistr
|
||||
// 就诊参数者管理-表单数据
|
||||
EncounterParticipantFormData encounterParticipantFormData =
|
||||
outpatientRegistrationAddParam.getEncounterParticipantFormData();
|
||||
// 就诊账户管理-表单数据
|
||||
AccountFormData accountFormData = outpatientRegistrationAddParam.getAccountFormData();
|
||||
// 费用项管理-表单数据
|
||||
ChargeItemFormData chargeItemFormData = outpatientRegistrationAddParam.getChargeItemFormData();
|
||||
|
||||
// 患者ID
|
||||
Long patientId = encounterFormData.getPatientId();
|
||||
@@ -227,22 +237,33 @@ public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistr
|
||||
if (num > 0) {
|
||||
return R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||
}
|
||||
|
||||
// 保存就诊信息
|
||||
Encounter encounter = new Encounter();
|
||||
BeanUtils.copyProperties(encounterFormData, encounter);
|
||||
// 就诊ID
|
||||
Long encounterId = iEncounterService.saveEncounter(encounter);
|
||||
Long encounterId = iEncounterService.saveEncounterByRegister(encounter);
|
||||
// 保存就诊位置信息
|
||||
encounterLocationFormData.setEncounterId(encounterId);
|
||||
EncounterLocation encounterLocation = new EncounterLocation();
|
||||
BeanUtils.copyProperties(encounterLocationFormData, encounterLocation);
|
||||
iEncounterLocationService.saveEncounterLocation(encounterLocation);
|
||||
iEncounterLocationService.saveEncounterLocationByRegister(encounterLocation);
|
||||
// 保存就诊参数者信息
|
||||
encounterParticipantFormData.setEncounterId(encounterId);
|
||||
EncounterParticipant encounterParticipant = new EncounterParticipant();
|
||||
BeanUtils.copyProperties(encounterParticipantFormData, encounterParticipant);
|
||||
iEncounterParticipantService.saveEncounterParticipant(encounterParticipant);
|
||||
iEncounterParticipantService.saveEncounterParticipantByRegister(encounterParticipant);
|
||||
// 保存就诊账户信息
|
||||
accountFormData.setEncounterId(encounterId);
|
||||
Account account = new Account();
|
||||
BeanUtils.copyProperties(accountFormData, account);
|
||||
// 账户ID
|
||||
Long accountId = iAccountService.saveAccountByRegister(account);
|
||||
// 保存就诊费用项
|
||||
chargeItemFormData.setEncounterId(encounterId);
|
||||
chargeItemFormData.setAccountId(accountId);
|
||||
ChargeItem chargeItem = new ChargeItem();
|
||||
BeanUtils.copyProperties(chargeItemFormData, chargeItem);
|
||||
iChargeItemService.saveChargeItemByRegister(chargeItem);
|
||||
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"挂号"}));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.openhis.web.outpatientservice.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.AccountBillingStatus;
|
||||
import com.openhis.common.enums.AccountStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 就诊账号 表单数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AccountFormData {
|
||||
|
||||
/**
|
||||
* 就诊ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/** 患者id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long patientId;
|
||||
|
||||
/** 状态枚举 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 结账状态枚举 */
|
||||
private Integer billingStatusEnum;
|
||||
|
||||
/** 账户类型编码 */
|
||||
private String typeCode; // 1:个人现金账户, 2:医保账户
|
||||
|
||||
/** 名称 */
|
||||
private String name; // 刷医保卡时应该会带出该信息
|
||||
|
||||
/** 账户余额 */
|
||||
private BigDecimal balanceAmount; // 刷医保卡时应该会带出该信息
|
||||
|
||||
/** 医保区域编码 */
|
||||
private String ybAreaNo; // 刷医保卡时应该会带出该信息
|
||||
|
||||
/** 合同编码 */
|
||||
private String contractNo; // 从选择的费用性质里选择合同编码
|
||||
|
||||
/** 欠费限制额度 */
|
||||
private BigDecimal limitAccount; // 刷医保卡时应该会带出该信息
|
||||
|
||||
/**
|
||||
* 设置默认值
|
||||
*/
|
||||
public AccountFormData() {
|
||||
this.statusEnum = AccountStatus.ACTIVE.getValue();
|
||||
this.billingStatusEnum = AccountBillingStatus.OPEN.getValue();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.openhis.web.outpatientservice.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.enums.ChargeItemStatus;
|
||||
import com.openhis.common.enums.EncounterClass;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 费用项管理 表单数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ChargeItemFormData {
|
||||
|
||||
/**
|
||||
* 就诊ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/** 患者id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long patientId;
|
||||
|
||||
/** 层级 */
|
||||
private String busNo;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 类别 */
|
||||
private Integer contextEnum;
|
||||
|
||||
/** 发生时间 */
|
||||
private Date occurrenceTime;
|
||||
|
||||
/** 执行人Id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long performerId;
|
||||
|
||||
/** 费用定价ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long definitionId;
|
||||
|
||||
/** 开立人ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long entererId;
|
||||
|
||||
/** 开立时间 */
|
||||
private Date enteredDate;
|
||||
|
||||
/** 医疗服务类型 */
|
||||
private String serviceTable;
|
||||
|
||||
/** 医疗服务ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long serviceId;
|
||||
|
||||
/** 总价 */
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/** 关联账户ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long accountId;
|
||||
|
||||
/**
|
||||
* 设置默认值
|
||||
*/
|
||||
public ChargeItemFormData() {
|
||||
this.statusEnum = ChargeItemStatus.BILLED.getValue();
|
||||
this.contextEnum = EncounterClass.AMB.getValue();
|
||||
this.occurrenceTime = new Date();
|
||||
this.performerId = SecurityUtils.getLoginUser().getUserId();
|
||||
this.entererId = SecurityUtils.getLoginUser().getUserId();
|
||||
this.enteredDate = new Date();
|
||||
this.serviceTable = CommonConstants.TableName.ADM_HEALTHCARE_SERVICE;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -33,9 +33,10 @@ public class OutpatientRegistrationAddParam {
|
||||
/**
|
||||
* 就诊账户管理-表单数据
|
||||
*/
|
||||
|
||||
private AccountFormData accountFormData;
|
||||
/**
|
||||
* 费用项管理-表单数据
|
||||
*/
|
||||
private ChargeItemFormData chargeItemFormData;
|
||||
|
||||
}
|
||||
|
||||
@@ -51,4 +51,9 @@ public class PatientMetadata {
|
||||
*/
|
||||
private String age;
|
||||
|
||||
/**
|
||||
* 初复诊
|
||||
*/
|
||||
private String firstEnum_enumText;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum AccountBillingStatus {
|
||||
public enum AccountBillingStatus implements HisEnumInterface {
|
||||
|
||||
OPEN (1, "open", "可用"),
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ChargeItemStatus {
|
||||
public enum ChargeItemStatus implements HisEnumInterface {
|
||||
PLANNED (1, "planned", "待收费"),
|
||||
|
||||
BILLABLE(2, "billable", "待结算"),
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.openhis.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 过敏与不耐受中临床状况
|
||||
*
|
||||
* @author liuhr
|
||||
* @date 2025/3/6
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ClinicalStatus implements HisEnumInterface {
|
||||
ACTIVE(1, "active", "阳性"),
|
||||
INACTIVE(2, "inactive", "阴性"),
|
||||
RESOLVED(3, "resolved", "已解决");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum EncounterType {
|
||||
public enum EncounterType implements HisEnumInterface {
|
||||
|
||||
INITIAL(1, "initial", "初诊"),
|
||||
FOLLOW_UP(2, "follow-up", "复诊");
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.openhis.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 过敏与不耐受中验证状态
|
||||
*
|
||||
* @author liuhr
|
||||
* @date 2025/3/6
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum VerificationStatus implements HisEnumInterface {
|
||||
UNCONFIRMED(1, "unconfirmed", "未确认"),
|
||||
CONFIRMED(2, "confirmed", "已确认"),
|
||||
REFUTED(3, "refuted", "已反驳"),
|
||||
ENTERED_IN_ERROR(4, "entered-in-error", "输入错误");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
private final String info;
|
||||
}
|
||||
@@ -30,7 +30,7 @@ public class ChargeItem extends HisBaseEntity {
|
||||
private Long id;
|
||||
|
||||
/** 状态 */
|
||||
private ChargeItemStatus statusEnum;
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 层级 */
|
||||
private String busNo;
|
||||
|
||||
@@ -105,4 +105,9 @@ public class Encounter extends HisBaseEntity {
|
||||
*/
|
||||
private Integer displayOrder;
|
||||
|
||||
/**
|
||||
* 初复诊
|
||||
*/
|
||||
private Integer firstEnum;
|
||||
|
||||
}
|
||||
|
||||
@@ -11,4 +11,11 @@ import com.openhis.administration.domain.Account;
|
||||
*/
|
||||
public interface IAccountService extends IService<Account> {
|
||||
|
||||
/**
|
||||
* 门诊挂号时保存账号信息
|
||||
*
|
||||
* @param account 账号信息
|
||||
*/
|
||||
Long saveAccountByRegister(Account account);
|
||||
|
||||
}
|
||||
@@ -25,4 +25,11 @@ public interface IChargeItemService extends IService<ChargeItem> {
|
||||
* @return 更新结果
|
||||
*/
|
||||
boolean updateChargeItem(ChargeItem chargeItem);
|
||||
|
||||
/**
|
||||
* 门诊挂号时保存 费用项
|
||||
*
|
||||
* @param chargeItem 费用项
|
||||
*/
|
||||
void saveChargeItemByRegister(ChargeItem chargeItem);
|
||||
}
|
||||
@@ -12,10 +12,10 @@ import com.openhis.administration.domain.EncounterLocation;
|
||||
public interface IEncounterLocationService extends IService<EncounterLocation> {
|
||||
|
||||
/**
|
||||
* 保存就诊位置信息
|
||||
* 门诊挂号时保存就诊位置信息
|
||||
*
|
||||
* @param encounterLocation 就诊位置信息
|
||||
*/
|
||||
void saveEncounterLocation(EncounterLocation encounterLocation);
|
||||
void saveEncounterLocationByRegister(EncounterLocation encounterLocation);
|
||||
|
||||
}
|
||||
@@ -12,10 +12,10 @@ import com.openhis.administration.domain.EncounterParticipant;
|
||||
public interface IEncounterParticipantService extends IService<EncounterParticipant> {
|
||||
|
||||
/**
|
||||
* 保存就诊参与者
|
||||
* 门诊挂号时保存就诊参与者
|
||||
*
|
||||
* @param encounterParticipant 就诊参与者信息
|
||||
*/
|
||||
void saveEncounterParticipant(EncounterParticipant encounterParticipant);
|
||||
void saveEncounterParticipantByRegister(EncounterParticipant encounterParticipant);
|
||||
|
||||
}
|
||||
@@ -16,6 +16,6 @@ public interface IEncounterService extends IService<Encounter> {
|
||||
* @param encounter 就诊信息
|
||||
* @return 保存后的信息
|
||||
*/
|
||||
Long saveEncounter(Encounter encounter);
|
||||
Long saveEncounterByRegister(Encounter encounter);
|
||||
|
||||
}
|
||||
@@ -16,4 +16,15 @@ import com.openhis.administration.service.IAccountService;
|
||||
@Service
|
||||
public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> implements IAccountService {
|
||||
|
||||
/**
|
||||
* 门诊挂号时保存账号信息
|
||||
*
|
||||
* @param account 账号信息
|
||||
*/
|
||||
@Override
|
||||
public Long saveAccountByRegister(Account account) {
|
||||
baseMapper.insert(account);
|
||||
return account.getId();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -55,4 +55,14 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 门诊挂号时保存 费用项
|
||||
*
|
||||
* @param chargeItem 费用项
|
||||
*/
|
||||
@Override
|
||||
public void saveChargeItemByRegister(ChargeItem chargeItem) {
|
||||
baseMapper.insert(chargeItem);
|
||||
}
|
||||
}
|
||||
@@ -18,12 +18,12 @@ public class EncounterLocationServiceImpl extends ServiceImpl<EncounterLocationM
|
||||
implements IEncounterLocationService {
|
||||
|
||||
/**
|
||||
* 保存就诊位置信息
|
||||
* 门诊挂号时保存就诊位置信息
|
||||
*
|
||||
* @param encounterLocation 就诊位置信息
|
||||
*/
|
||||
@Override
|
||||
public void saveEncounterLocation(EncounterLocation encounterLocation) {
|
||||
public void saveEncounterLocationByRegister(EncounterLocation encounterLocation) {
|
||||
baseMapper.insert(encounterLocation);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@ public class EncounterParticipantServiceImpl extends ServiceImpl<EncounterPartic
|
||||
implements IEncounterParticipantService {
|
||||
|
||||
/**
|
||||
* 保存就诊参与者
|
||||
* 门诊挂号时保存就诊参与者
|
||||
*
|
||||
* @param encounterParticipant 就诊参与者信息
|
||||
*/
|
||||
@Override
|
||||
public void saveEncounterParticipant(EncounterParticipant encounterParticipant) {
|
||||
public void saveEncounterParticipantByRegister(EncounterParticipant encounterParticipant) {
|
||||
baseMapper.insert(encounterParticipant);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.core.common.enums.AssignSeqEnum;
|
||||
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.AssignSeqUtil;
|
||||
import com.openhis.administration.domain.Encounter;
|
||||
import com.openhis.administration.mapper.EncounterMapper;
|
||||
import com.openhis.administration.service.IEncounterService;
|
||||
import com.openhis.common.enums.EncounterType;
|
||||
|
||||
/**
|
||||
* 就诊管理Service业务层处理
|
||||
@@ -16,6 +22,9 @@ import com.openhis.administration.service.IEncounterService;
|
||||
@Service
|
||||
public class EncounterServiceImpl extends ServiceImpl<EncounterMapper, Encounter> implements IEncounterService {
|
||||
|
||||
@Resource
|
||||
AssignSeqUtil assignSeqUtil;
|
||||
|
||||
/**
|
||||
* 保存就诊信息
|
||||
*
|
||||
@@ -23,10 +32,19 @@ public class EncounterServiceImpl extends ServiceImpl<EncounterMapper, Encounter
|
||||
* @return 保存后的信息
|
||||
*/
|
||||
@Override
|
||||
public Long saveEncounter(Encounter encounter) {
|
||||
// 生产就诊编码
|
||||
|
||||
// 生产就诊序号
|
||||
public Long saveEncounterByRegister(Encounter encounter) {
|
||||
// 生成就诊编码
|
||||
encounter.setBusNo(assignSeqUtil.getSeq(AssignSeqEnum.ENCOUNTER_NUM.getPrefix(), 8));
|
||||
// 生成就诊序号 (患者ID + 科室ID 作为当日就诊号的唯一标识)
|
||||
String preFix = encounter.getPatientId() + String.valueOf(encounter.getOrganizationId());
|
||||
encounter.setDisplayOrder(assignSeqUtil.getSeqNoByDay(preFix));
|
||||
// 患者ID
|
||||
Long patientId = encounter.getPatientId();
|
||||
// 初复诊
|
||||
Long count = baseMapper.selectCount(new LambdaQueryWrapper<Encounter>().eq(Encounter::getPatientId, patientId));
|
||||
if (count > 0L) {
|
||||
encounter.setFirstEnum(EncounterType.FOLLOW_UP.getValue());
|
||||
}
|
||||
baseMapper.insert(encounter);
|
||||
return encounter.getId();
|
||||
}
|
||||
|
||||
@@ -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,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,14 @@
|
||||
package com.openhis.clinical.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.clinical.domain.AllergyIntolerance;
|
||||
|
||||
/**
|
||||
* 过敏与不耐受Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-03-07
|
||||
*/
|
||||
public interface IAllergyIntoleranceService extends IService<AllergyIntolerance> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.openhis.clinical.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 过敏与不耐受Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-03-07
|
||||
*/
|
||||
@Service
|
||||
public class AllergyIntoleranceServiceImpl extends ServiceImpl<AllergyIntoleranceMapper, AllergyIntolerance> implements IAllergyIntoleranceService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.clinical.mapper.AllergyIntoleranceMapper">
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user