门诊挂号
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,12 @@ package com.openhis.administration.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
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业务层处理
|
||||
@@ -23,10 +25,18 @@ public class EncounterServiceImpl extends ServiceImpl<EncounterMapper, Encounter
|
||||
* @return 保存后的信息
|
||||
*/
|
||||
@Override
|
||||
public Long saveEncounter(Encounter encounter) {
|
||||
public Long saveEncounterByRegister(Encounter encounter) {
|
||||
// 生产就诊编码
|
||||
|
||||
// 生产就诊序号
|
||||
|
||||
// 患者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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user