目录树变更,新增门诊收费相关,价格定义字段对应代码修改
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.chargemanage.appservice;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.chargemanage.dto.EncounterPatientPageParam;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 门诊收费 service
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-03-12
|
||||
*/
|
||||
public interface IOutpatientChargeAppService {
|
||||
|
||||
/**
|
||||
* 查询就诊患者分页列表
|
||||
*
|
||||
* @param encounterPatientPageParam 查询条件
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @param request 请求
|
||||
* @return 就诊患者分页列表
|
||||
*/
|
||||
R<?> getEncounterPatientPage(EncounterPatientPageParam encounterPatientPageParam, String searchKey, Integer pageNo,
|
||||
Integer pageSize, HttpServletRequest request);
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.openhis.web.chargemanage.appservice;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.basicservice.dto.HealthcareServiceDto;
|
||||
import com.openhis.web.chargemanage.dto.*;
|
||||
|
||||
/**
|
||||
* 门诊挂号 应用Service
|
||||
*/
|
||||
public interface IOutpatientRegistrationAppService {
|
||||
|
||||
/**
|
||||
* 查询患者信息
|
||||
*
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 患者信息
|
||||
*/
|
||||
Page<PatientMetadata> getPatientMetadataBySearchKey(String searchKey, Integer pageNo, Integer pageSize);
|
||||
|
||||
/**
|
||||
* 查询费用性质
|
||||
*
|
||||
* @return 费用性质
|
||||
*/
|
||||
List<ContractMetadata> getContractMetadata();
|
||||
|
||||
/**
|
||||
* 根据位置id筛选医生
|
||||
*
|
||||
* @param locationId 位置ID
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 筛选医生
|
||||
*/
|
||||
IPage<PractitionerMetadata> getPractitionerMetadataByLocationId(Long locationId, String searchKey, Integer pageNo,
|
||||
Integer pageSize);
|
||||
|
||||
/**
|
||||
* 根据机构id筛选服务项目
|
||||
*
|
||||
* @param organizationId 机构id
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 服务项目
|
||||
*/
|
||||
IPage<HealthcareServiceDto> getHealthcareMetadataByOrganizationId(Long organizationId, String searchKey,
|
||||
Integer pageNo, Integer pageSize);
|
||||
|
||||
/**
|
||||
* 保存挂号
|
||||
*
|
||||
* @param outpatientRegistrationAddParam 就诊表单信息
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> saveRegister(OutpatientRegistrationAddParam outpatientRegistrationAddParam);
|
||||
|
||||
/**
|
||||
* 查询当日就诊数据
|
||||
*
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 当日就诊数据
|
||||
*/
|
||||
IPage<CurrentDayEncounterDto> getCurrentDayEncounter(String searchKey, Integer pageNo, Integer pageSize);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.chargemanage.appservice.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.AgeCalculatorUtil;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.enums.AdministrativeGender;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.chargemanage.appservice.IOutpatientChargeAppService;
|
||||
import com.openhis.web.chargemanage.dto.EncounterPatientPageDto;
|
||||
import com.openhis.web.chargemanage.dto.EncounterPatientPageParam;
|
||||
import com.openhis.web.chargemanage.mapper.OutpatientChargeAppMapper;
|
||||
|
||||
/**
|
||||
* 门诊收费 impl
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-03-12
|
||||
*/
|
||||
@Service
|
||||
public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppService {
|
||||
|
||||
@Autowired
|
||||
private OutpatientChargeAppMapper outpatientChargeAppMapper;
|
||||
|
||||
/**
|
||||
* 查询就诊患者分页列表
|
||||
*
|
||||
* @param encounterPatientPageParam 查询条件
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @param request 请求
|
||||
* @return 就诊患者分页列表
|
||||
*/
|
||||
@Override
|
||||
public R<?> getEncounterPatientPage(EncounterPatientPageParam encounterPatientPageParam, String searchKey,
|
||||
Integer pageNo, Integer pageSize, HttpServletRequest request) {
|
||||
// 构建查询条件
|
||||
QueryWrapper<EncounterPatientPageParam> queryWrapper = HisQueryUtils.buildQueryWrapper(
|
||||
encounterPatientPageParam, searchKey,
|
||||
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientWbStr, CommonConstants.FieldName.PatientPyStr,
|
||||
CommonConstants.FieldName.PatientName, CommonConstants.FieldName.PatientBusNo,
|
||||
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.idCard)),
|
||||
request);
|
||||
// 就诊患者分页列表
|
||||
Page<EncounterPatientPageDto> encounterPatientPage =
|
||||
outpatientChargeAppMapper.selectEncounterPatientPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
|
||||
encounterPatientPage.getRecords().forEach(e -> {
|
||||
// 性别枚举
|
||||
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
// 计算年龄
|
||||
e.setAge(AgeCalculatorUtil.getAge(e.getBirthDate()));
|
||||
});
|
||||
return R.ok(encounterPatientPage);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,261 @@
|
||||
package com.openhis.web.chargemanage.appservice.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.*;
|
||||
import com.openhis.administration.mapper.PatientMapper;
|
||||
import com.openhis.administration.service.*;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.enums.PractitionerRole;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.financial.domain.Contract;
|
||||
import com.openhis.financial.mapper.ContractMapper;
|
||||
import com.openhis.web.basicservice.dto.HealthcareServiceDto;
|
||||
import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper;
|
||||
import com.openhis.web.chargemanage.appservice.IOutpatientRegistrationAppService;
|
||||
import com.openhis.web.chargemanage.dto.*;
|
||||
import com.openhis.web.chargemanage.mapper.OutpatientRegistrationAppMapper;
|
||||
|
||||
/**
|
||||
* 门诊挂号 应用实现类
|
||||
*/
|
||||
@Service
|
||||
public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistrationAppService {
|
||||
|
||||
@Resource
|
||||
PatientMapper patientMapper;
|
||||
|
||||
@Resource
|
||||
ContractMapper contractMapper;
|
||||
|
||||
@Resource
|
||||
OutpatientRegistrationAppMapper outpatientRegistrationAppMapper;
|
||||
|
||||
@Resource
|
||||
HealthcareServiceBizMapper healthcareServiceBizMapper;
|
||||
|
||||
@Resource
|
||||
IEncounterService iEncounterService;
|
||||
|
||||
@Resource
|
||||
IEncounterLocationService iEncounterLocationService;
|
||||
|
||||
@Resource
|
||||
IEncounterParticipantService iEncounterParticipantService;
|
||||
|
||||
@Resource
|
||||
IAccountService iAccountService;
|
||||
|
||||
@Resource
|
||||
IChargeItemService iChargeItemService;
|
||||
|
||||
/**
|
||||
* 门诊挂号 - 查询患者信息
|
||||
*
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 患者信息
|
||||
*/
|
||||
@Override
|
||||
public Page<PatientMetadata> getPatientMetadataBySearchKey(String searchKey, Integer pageNo, Integer pageSize) {
|
||||
// 构建查询条件
|
||||
QueryWrapper<Patient> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
|
||||
new HashSet<>(Arrays.asList("id_card", "name", "py_str", "wb_str")), null);
|
||||
// 设置排序
|
||||
queryWrapper.orderByDesc("update_time");
|
||||
// 患者信息
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询费用性质
|
||||
*
|
||||
* @return 费用性质
|
||||
*/
|
||||
@Override
|
||||
public List<ContractMetadata> getContractMetadata() {
|
||||
// TODO: Contract表的基础数据维护还没做,具体不知道状态字段的取值是什么,先查询默认值为0的数据
|
||||
List<Contract> ContractList =
|
||||
contractMapper.selectList(new LambdaQueryWrapper<Contract>().eq(Contract::getStatusEnum, 0));
|
||||
// 复制同名字段并 return
|
||||
return ContractList.stream().map(contract -> {
|
||||
ContractMetadata metadata = new ContractMetadata();
|
||||
try {
|
||||
BeanUtils.copyProperties(contract, metadata);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return metadata;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据位置id筛选医生
|
||||
*
|
||||
* @param locationId 位置ID
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 筛选医生
|
||||
*/
|
||||
@Override
|
||||
public IPage<PractitionerMetadata> getPractitionerMetadataByLocationId(Long locationId, String searchKey,
|
||||
Integer pageNo, Integer pageSize) {
|
||||
// 构建查询条件
|
||||
QueryWrapper<PractitionerMetadata> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
|
||||
new HashSet<>(Arrays.asList("name", "py_str", "wb_str")), null);
|
||||
IPage<PractitionerMetadata> practitionerMetadataPage =
|
||||
outpatientRegistrationAppMapper.getPractitionerMetadataPage(new Page<>(pageNo, pageSize), locationId,
|
||||
PractitionerRole.DOCTOR.getCode(), queryWrapper);
|
||||
practitionerMetadataPage.getRecords().forEach(e -> {
|
||||
// 性别
|
||||
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
});
|
||||
return practitionerMetadataPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据机构id筛选服务项目
|
||||
*
|
||||
* @param organizationId 机构id
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 服务项目
|
||||
*/
|
||||
@Override
|
||||
public IPage<HealthcareServiceDto> getHealthcareMetadataByOrganizationId(Long organizationId, String searchKey,
|
||||
Integer pageNo, Integer pageSize) {
|
||||
// 构建查询条件
|
||||
HealthcareServiceDto healthcareServiceDto = new HealthcareServiceDto();
|
||||
healthcareServiceDto.setOfferedOrgId(organizationId);
|
||||
QueryWrapper<HealthcareServiceDto> queryWrapper = HisQueryUtils.buildQueryWrapper(healthcareServiceDto,
|
||||
searchKey, new HashSet<>(Arrays.asList("name", "charge_name")), null);
|
||||
return healthcareServiceBizMapper.getHealthcareServicePage(new Page<>(pageNo, pageSize),
|
||||
CommonConstants.TableName.ADM_HEALTHCARE_SERVICE, queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存挂号
|
||||
*
|
||||
* @param outpatientRegistrationAddParam 就诊表单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> saveRegister(OutpatientRegistrationAddParam outpatientRegistrationAddParam) {
|
||||
// 就诊管理-表单数据
|
||||
EncounterFormData encounterFormData = outpatientRegistrationAddParam.getEncounterFormData();
|
||||
// 就诊位置管理-表单数据
|
||||
EncounterLocationFormData encounterLocationFormData =
|
||||
outpatientRegistrationAddParam.getEncounterLocationFormData();
|
||||
// 就诊参数者管理-表单数据
|
||||
EncounterParticipantFormData encounterParticipantFormData =
|
||||
outpatientRegistrationAddParam.getEncounterParticipantFormData();
|
||||
// 就诊账户管理-表单数据
|
||||
AccountFormData accountFormData = outpatientRegistrationAddParam.getAccountFormData();
|
||||
// 费用项管理-表单数据
|
||||
ChargeItemFormData chargeItemFormData = outpatientRegistrationAddParam.getChargeItemFormData();
|
||||
|
||||
// 患者ID
|
||||
Long patientId = encounterFormData.getPatientId();
|
||||
// 服务项目ID
|
||||
Long serviceTypeId = encounterFormData.getServiceTypeId();
|
||||
// 校验是否重复挂号
|
||||
Integer num = outpatientRegistrationAppMapper.getNumByPatientIdAndOrganizationId(patientId, serviceTypeId);
|
||||
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.saveEncounterByRegister(encounter);
|
||||
// 保存就诊位置信息
|
||||
encounterLocationFormData.setEncounterId(encounterId);
|
||||
EncounterLocation encounterLocation = new EncounterLocation();
|
||||
BeanUtils.copyProperties(encounterLocationFormData, encounterLocation);
|
||||
iEncounterLocationService.saveEncounterLocationByRegister(encounterLocation);
|
||||
// 保存就诊参数者信息
|
||||
encounterParticipantFormData.setEncounterId(encounterId);
|
||||
EncounterParticipant encounterParticipant = new EncounterParticipant();
|
||||
BeanUtils.copyProperties(encounterParticipantFormData, 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[] {"挂号"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当日就诊数据
|
||||
*
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 当日就诊数据
|
||||
*/
|
||||
@Override
|
||||
public IPage<CurrentDayEncounterDto> getCurrentDayEncounter(String searchKey, Integer pageNo, Integer pageSize) {
|
||||
// 构建查询条件
|
||||
QueryWrapper<CurrentDayEncounterDto> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
|
||||
new HashSet<>(Arrays.asList("patient_name", "organization_name", "practitioner_name", "healthcare_name")),
|
||||
null);
|
||||
|
||||
IPage<CurrentDayEncounterDto> currentDayEncounter = outpatientRegistrationAppMapper
|
||||
.getCurrentDayEncounter(new Page<>(pageNo, pageSize), ParticipantType.ADMITTER.getCode(), queryWrapper);
|
||||
currentDayEncounter.getRecords().forEach(e -> {
|
||||
// 性别
|
||||
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
// 就诊状态
|
||||
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(EncounterStatus.class, e.getStatusEnum()));
|
||||
});
|
||||
return currentDayEncounter;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.chargemanage.controller;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.chargemanage.appservice.IOutpatientChargeAppService;
|
||||
import com.openhis.web.chargemanage.dto.EncounterPatientPageParam;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 门诊收费 controller
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-03-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/charge-manage/charge")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class OutpatientChargeController {
|
||||
|
||||
@Autowired
|
||||
private IOutpatientChargeAppService outpatientChargeAppService;
|
||||
|
||||
/**
|
||||
* 查询就诊患者分页列表
|
||||
*
|
||||
* @param encounterPatientPageParam 查询条件
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @param request 请求
|
||||
* @return 就诊患者分页列表
|
||||
*/
|
||||
@GetMapping(value = "/encounter-patient-page")
|
||||
public R<?> getEncounterPatientPage(EncounterPatientPageParam encounterPatientPageParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
return R.ok(outpatientChargeAppService.getEncounterPatientPage(encounterPatientPageParam, searchKey, pageNo,
|
||||
pageSize, request));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.chargemanage.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.common.enums.LocationForm;
|
||||
import com.openhis.common.enums.PriorityLevel;
|
||||
import com.openhis.web.basedatamanage.appservice.ILocationAppService;
|
||||
import com.openhis.web.chargemanage.appservice.IOutpatientRegistrationAppService;
|
||||
import com.openhis.web.chargemanage.dto.OutpatientRegistrationAddParam;
|
||||
import com.openhis.web.chargemanage.dto.OutpatientRegistrationInitDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 门诊挂号 controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/charge-manage/register")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class OutpatientRegistrationController {
|
||||
|
||||
private final IOutpatientRegistrationAppService iOutpatientRegistrationAppService;
|
||||
private final ILocationAppService iLocationAppService;
|
||||
|
||||
/**
|
||||
* 基础数据初始化
|
||||
*/
|
||||
@GetMapping(value = "/init")
|
||||
public R<?> init() {
|
||||
OutpatientRegistrationInitDto outpatientRegistrationInitDto = new OutpatientRegistrationInitDto();
|
||||
// 优先级
|
||||
List<OutpatientRegistrationInitDto.priorityLevelOption> priorityLevelOptionOptions =
|
||||
Stream.of(PriorityLevel.values())
|
||||
.map(e -> new OutpatientRegistrationInitDto.priorityLevelOption(e.getValue(), e.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
outpatientRegistrationInitDto.setPriorityLevelOptionOptions(priorityLevelOptionOptions);
|
||||
return R.ok(outpatientRegistrationInitDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询患者信息
|
||||
*
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 患者信息
|
||||
*/
|
||||
@GetMapping(value = "/patient-metadata")
|
||||
public R<?> getPatientMetadata(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
return R.ok(iOutpatientRegistrationAppService.getPatientMetadataBySearchKey(searchKey, pageNo, pageSize));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询费用性质
|
||||
*
|
||||
* @return 费用性质
|
||||
*/
|
||||
@GetMapping(value = "/contract-list")
|
||||
public R<?> getContractList() {
|
||||
return R.ok(iOutpatientRegistrationAppService.getContractMetadata());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询就诊位置
|
||||
*
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return 位置分页列表
|
||||
*/
|
||||
@GetMapping(value = "/location-tree")
|
||||
public R<?> getLocationTree(@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
return R.ok(iLocationAppService.getLocationTree(LocationForm.ROOM.getValue(), pageNo, pageSize));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据位置id筛选医生
|
||||
*/
|
||||
@GetMapping(value = "/practitioner-metadata")
|
||||
public R<?> getPractitionerMetadata(@RequestParam(value = "locationId") Long locationId,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
return R.ok(iOutpatientRegistrationAppService.getPractitionerMetadataByLocationId(locationId, searchKey, pageNo,
|
||||
pageSize));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据机构id筛选服务项目
|
||||
*/
|
||||
@GetMapping(value = "/healthcare-metadata")
|
||||
public R<?> getHealthcareMetadata(@RequestParam(value = "organizationId") Long organizationId,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
return R.ok(iOutpatientRegistrationAppService.getHealthcareMetadataByOrganizationId(organizationId, searchKey,
|
||||
pageNo, pageSize));
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存挂号
|
||||
*
|
||||
* @param outpatientRegistrationAddParam 就诊表单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping(value = "/save")
|
||||
public R<?> saveRegister(@Valid @RequestBody OutpatientRegistrationAddParam outpatientRegistrationAddParam) {
|
||||
return iOutpatientRegistrationAppService.saveRegister(outpatientRegistrationAddParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当日就诊数据
|
||||
*
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 当日就诊数据
|
||||
*/
|
||||
@GetMapping(value = "/current-day-encounter")
|
||||
public R<?> getCurrentDayEncounter(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
return R.ok(iOutpatientRegistrationAppService.getCurrentDayEncounter(searchKey, pageNo, pageSize));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.openhis.web.chargemanage.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.chargemanage.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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.openhis.web.chargemanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 费用性质 元数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ContractMetadata {
|
||||
/** 合同名称 */
|
||||
private String contractName;
|
||||
/** 合同编码 */
|
||||
private String busNo;
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.openhis.web.chargemanage.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 当天就诊信息
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class CurrentDayEncounterDto {
|
||||
|
||||
/** 租户ID */
|
||||
private Integer tenantId;
|
||||
|
||||
/**
|
||||
* 就诊ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/**
|
||||
* 科室ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long organizationId;
|
||||
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String organizationName;
|
||||
|
||||
/**
|
||||
* 挂号类型
|
||||
*/
|
||||
private String healthcareName;
|
||||
|
||||
/**
|
||||
* 专家账号id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long practitionerUserId;
|
||||
|
||||
/**
|
||||
* 专家
|
||||
*/
|
||||
private String practitionerName;
|
||||
|
||||
/**
|
||||
* 费用性质
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 患者id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 患者性别
|
||||
*/
|
||||
private Integer genderEnum;
|
||||
private String genderEnum_enumText;
|
||||
|
||||
/**
|
||||
* 证件号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 就诊状态
|
||||
*/
|
||||
private Integer statusEnum;
|
||||
private String statusEnum_enumText;
|
||||
|
||||
/**
|
||||
* 挂号日期/时间
|
||||
*/
|
||||
private Date registerTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.openhis.web.chargemanage.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 就诊诊断 表单数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EncounterDiagnosisFormData {
|
||||
|
||||
/**
|
||||
* 就诊ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/**
|
||||
* 诊断ID
|
||||
*/
|
||||
@NotBlank(message = "诊断ID不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long conditionId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.openhis.web.chargemanage.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.*;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 就诊 表单数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EncounterFormData {
|
||||
|
||||
/**
|
||||
* 患者ID
|
||||
*/
|
||||
@NotBlank(message = "患者ID不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 状态编码
|
||||
*/
|
||||
private Integer statusEnum;
|
||||
|
||||
/**
|
||||
* 类别编码
|
||||
*/
|
||||
private Integer classEnum;
|
||||
|
||||
/**
|
||||
* 类别医保编码
|
||||
*/
|
||||
private Integer ybClassEnum;
|
||||
|
||||
/**
|
||||
* 优先级编码
|
||||
*/
|
||||
@NotBlank(message = "优先级编码不能为空")
|
||||
private Integer priorityEnum;
|
||||
|
||||
/**
|
||||
* 分类编码
|
||||
*/
|
||||
private Integer typeEnum;
|
||||
|
||||
/**
|
||||
* 服务ID
|
||||
*/
|
||||
@NotBlank(message = "服务ID不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long serviceTypeId;
|
||||
|
||||
/**
|
||||
* 就诊对象状态
|
||||
*/
|
||||
private Integer subjectStatusEnum;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
*/
|
||||
@NotBlank(message = "机构ID不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long organizationId;
|
||||
|
||||
/**
|
||||
* 设置默认值
|
||||
*/
|
||||
public EncounterFormData() {
|
||||
this.statusEnum = EncounterStatus.PLANNED.getValue();
|
||||
this.classEnum = EncounterClass.AMB.getValue();
|
||||
this.ybClassEnum = EncounterYbClass.ORDINARY_OUTPATIENT.getValue();
|
||||
this.typeEnum = OutpatientClass.GENERAL_OUTPATIENT_SERVICE.getValue();
|
||||
this.subjectStatusEnum = EncounterSubjectStatus.TRIAGED.getValue();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.openhis.web.chargemanage.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.EncounterLocationStatus;
|
||||
import com.openhis.common.enums.LocationForm;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 就诊位置 表单数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EncounterLocationFormData {
|
||||
|
||||
/**
|
||||
* 就诊ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/**
|
||||
* 位置ID
|
||||
*/
|
||||
@NotBlank(message = "位置ID不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
|
||||
/** 状态枚举 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 物理形式枚举 */
|
||||
private Integer formEnum;
|
||||
|
||||
/**
|
||||
* 设置默认值
|
||||
*/
|
||||
public EncounterLocationFormData() {
|
||||
this.statusEnum = EncounterLocationStatus.PLANNED.getValue();
|
||||
this.formEnum = LocationForm.ROOM.getValue();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.openhis.web.chargemanage.dto;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.ParticipantType;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 就诊参数者 表单数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EncounterParticipantFormData {
|
||||
|
||||
/**
|
||||
* 就诊ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/** 参与者类型 */
|
||||
private String typeCode;
|
||||
|
||||
/** 参与者ID */
|
||||
@NotBlank(message = "参与者ID不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long practitionerId;
|
||||
|
||||
/**
|
||||
* 设置默认值
|
||||
*/
|
||||
public EncounterParticipantFormData() {
|
||||
this.typeCode = ParticipantType.ADMITTER.getCode();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.chargemanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 就诊患者分页dto
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-03-12
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EncounterPatientPageDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 就诊ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 患者院内编码/病历号
|
||||
*/
|
||||
private String patientBusNo;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 拼音码
|
||||
*/
|
||||
private String patientPyStr;
|
||||
|
||||
/**
|
||||
* 五笔码
|
||||
*/
|
||||
private String patientWbStr;
|
||||
|
||||
/**
|
||||
* 就诊编码
|
||||
*/
|
||||
private String encounterBusNo;
|
||||
|
||||
/**
|
||||
* 性别编码
|
||||
*/
|
||||
private Integer genderEnum;
|
||||
private String genderEnum_enumText;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
private Date birthDate;
|
||||
|
||||
/**
|
||||
* 账户类型编码
|
||||
*/
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 账户余额
|
||||
*/
|
||||
private BigDecimal balanceAmount;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private String age;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.chargemanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 就诊患者分页查询条件
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-03-12
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EncounterPatientPageParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 患者院内编码/病历号
|
||||
*/
|
||||
private String patientBusNo;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 拼音码
|
||||
*/
|
||||
private String patientPyStr;
|
||||
|
||||
/**
|
||||
* 五笔码
|
||||
*/
|
||||
private String patientWbStr;
|
||||
|
||||
/**
|
||||
* 就诊编码
|
||||
*/
|
||||
private String encounterBusNo;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.openhis.web.chargemanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 门诊挂号 新增参数
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OutpatientRegistrationAddParam {
|
||||
|
||||
/**
|
||||
* 就诊管理-表单数据
|
||||
*/
|
||||
private EncounterFormData encounterFormData;
|
||||
|
||||
// /**
|
||||
// * 就诊诊断管理-表单数据
|
||||
// */
|
||||
// private EncounterDiagnosisFormData encounterDiagnosisFormData;
|
||||
|
||||
/**
|
||||
* 就诊位置管理-表单数据
|
||||
*/
|
||||
private EncounterLocationFormData encounterLocationFormData;
|
||||
|
||||
/**
|
||||
* 就诊参数者管理-表单数据
|
||||
*/
|
||||
private EncounterParticipantFormData encounterParticipantFormData;
|
||||
|
||||
/**
|
||||
* 就诊账户管理-表单数据
|
||||
*/
|
||||
private AccountFormData accountFormData;
|
||||
/**
|
||||
* 费用项管理-表单数据
|
||||
*/
|
||||
private ChargeItemFormData chargeItemFormData;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.openhis.web.chargemanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 门诊挂号 init基础数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OutpatientRegistrationInitDto {
|
||||
|
||||
private List<priorityLevelOption> priorityLevelOptionOptions;
|
||||
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
@Data
|
||||
public static class priorityLevelOption {
|
||||
private Integer value;
|
||||
private String label;
|
||||
|
||||
public priorityLevelOption(Integer value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.openhis.web.chargemanage.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 患者信息 元数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PatientMetadata {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 性别编码
|
||||
*/
|
||||
private Integer genderEnum;
|
||||
private String genderEnum_enumText;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
|
||||
private Date birthDate;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private String age;
|
||||
|
||||
/**
|
||||
* 初复诊
|
||||
*/
|
||||
private String firstEnum_enumText;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.openhis.web.chargemanage.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 参与者 元数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PractitionerMetadata {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 姓名 */
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 性别编码
|
||||
*/
|
||||
private Integer genderEnum;
|
||||
private String genderEnum_enumText;
|
||||
|
||||
/** 拼音码 */
|
||||
private String pyStr;
|
||||
|
||||
/** 五笔码 */
|
||||
private String wbStr;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.chargemanage.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.chargemanage.dto.EncounterPatientPageDto;
|
||||
import com.openhis.web.chargemanage.dto.EncounterPatientPageParam;
|
||||
|
||||
/**
|
||||
* 门诊收费 appMapper
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
@Repository
|
||||
public interface OutpatientChargeAppMapper {
|
||||
|
||||
/**
|
||||
* 查询就诊患者分页列表
|
||||
*
|
||||
* @param page 分页
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 就诊患者分页列表
|
||||
*/
|
||||
Page<EncounterPatientPageDto> selectEncounterPatientPage(@Param("page") Page<EncounterPatientPageDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<EncounterPatientPageParam> queryWrapper);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.openhis.web.chargemanage.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.chargemanage.dto.CurrentDayEncounterDto;
|
||||
import com.openhis.web.chargemanage.dto.PractitionerMetadata;
|
||||
|
||||
/**
|
||||
* 门诊挂号 应用Mapper
|
||||
*/
|
||||
@Repository
|
||||
public interface OutpatientRegistrationAppMapper {
|
||||
/**
|
||||
* 查询医生
|
||||
*/
|
||||
IPage<PractitionerMetadata> getPractitionerMetadataPage(@Param("page") Page<PractitionerMetadata> page,
|
||||
@Param("locationId") Long locationId, @Param("RoleCode") String RoleCode,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<PractitionerMetadata> queryWrapper);
|
||||
|
||||
/**
|
||||
* 根据病人id和科室id查询当日挂号次数
|
||||
*/
|
||||
Integer getNumByPatientIdAndOrganizationId(@Param("patientId") Long patientId,
|
||||
@Param("serviceTypeId") Long serviceTypeId);
|
||||
|
||||
/**
|
||||
* 查询当日就诊数据
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param participantType 参与者类型
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 当日就诊数据
|
||||
*/
|
||||
IPage<CurrentDayEncounterDto> getCurrentDayEncounter(@Param("page") Page<CurrentDayEncounterDto> page,
|
||||
@Param("participantType") String participantType,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<CurrentDayEncounterDto> queryWrapper);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user