Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
package com.openhis.web.outpatientservice.appservice;
|
package com.openhis.web.outpatientservice.appservice;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.openhis.web.outpatientservice.dto.ConditionDefinitionMetadata;
|
|
||||||
import com.openhis.web.outpatientservice.dto.ContractMetadata;
|
|
||||||
import com.openhis.web.outpatientservice.dto.PatientMetadata;
|
|
||||||
|
|
||||||
import java.util.List;
|
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.outpatientservice.dto.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊挂号 应用Service
|
||||||
|
*/
|
||||||
public interface IOutpatientRegistrationAppService {
|
public interface IOutpatientRegistrationAppService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,4 +41,36 @@ public interface IOutpatientRegistrationAppService {
|
|||||||
Page<ConditionDefinitionMetadata> getConditionDefinitionMetadataSearchKey(String searchKey, Integer pageNo,
|
Page<ConditionDefinitionMetadata> getConditionDefinitionMetadataSearchKey(String searchKey, Integer pageNo,
|
||||||
Integer pageSize);
|
Integer pageSize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据位置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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,14 +11,20 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
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.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.utils.AgeCalculatorUtil;
|
import com.core.common.utils.AgeCalculatorUtil;
|
||||||
|
import com.core.common.utils.MessageUtils;
|
||||||
import com.core.common.utils.bean.BeanUtils;
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
import com.openhis.administration.domain.Patient;
|
import com.openhis.administration.domain.Patient;
|
||||||
import com.openhis.administration.mapper.PatientMapper;
|
import com.openhis.administration.mapper.PatientMapper;
|
||||||
import com.openhis.clinical.domain.ConditionDefinition;
|
import com.openhis.clinical.domain.ConditionDefinition;
|
||||||
import com.openhis.clinical.mapper.ConditionDefinitionMapper;
|
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.AdministrativeGender;
|
||||||
|
import com.openhis.common.enums.PractitionerRole;
|
||||||
import com.openhis.common.enums.PublicationStatus;
|
import com.openhis.common.enums.PublicationStatus;
|
||||||
import com.openhis.common.enums.WhetherContainUnknown;
|
import com.openhis.common.enums.WhetherContainUnknown;
|
||||||
import com.openhis.common.utils.EnumUtils;
|
import com.openhis.common.utils.EnumUtils;
|
||||||
@@ -26,13 +32,14 @@ import com.openhis.common.utils.HisPageUtils;
|
|||||||
import com.openhis.common.utils.HisQueryUtils;
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
import com.openhis.financial.domain.Contract;
|
import com.openhis.financial.domain.Contract;
|
||||||
import com.openhis.financial.mapper.ContractMapper;
|
import com.openhis.financial.mapper.ContractMapper;
|
||||||
|
import com.openhis.web.basicservice.dto.HealthcareServiceDto;
|
||||||
|
import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper;
|
||||||
import com.openhis.web.outpatientservice.appservice.IOutpatientRegistrationAppService;
|
import com.openhis.web.outpatientservice.appservice.IOutpatientRegistrationAppService;
|
||||||
import com.openhis.web.outpatientservice.dto.ConditionDefinitionMetadata;
|
import com.openhis.web.outpatientservice.dto.*;
|
||||||
import com.openhis.web.outpatientservice.dto.ContractMetadata;
|
import com.openhis.web.outpatientservice.mapper.OutpatientRegistrationAppMapper;
|
||||||
import com.openhis.web.outpatientservice.dto.PatientMetadata;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 门诊挂号 实现类
|
* 门诊挂号 应用实现类
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistrationAppService {
|
public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistrationAppService {
|
||||||
@@ -46,6 +53,12 @@ public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistr
|
|||||||
@Resource
|
@Resource
|
||||||
ConditionDefinitionMapper conditionDefinitionMapper;
|
ConditionDefinitionMapper conditionDefinitionMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
OutpatientRegistrationAppMapper outpatientRegistrationAppMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
HealthcareServiceBizMapper healthcareServiceBizMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 门诊挂号 - 查询患者信息
|
* 门诊挂号 - 查询患者信息
|
||||||
*
|
*
|
||||||
@@ -58,7 +71,7 @@ public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistr
|
|||||||
public Page<PatientMetadata> getPatientMetadataBySearchKey(String searchKey, Integer pageNo, Integer pageSize) {
|
public Page<PatientMetadata> getPatientMetadataBySearchKey(String searchKey, Integer pageNo, Integer pageSize) {
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
QueryWrapper<Patient> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
|
QueryWrapper<Patient> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
|
||||||
new HashSet<>(Arrays.asList("name", "py_str", "wb_str")), null);
|
new HashSet<>(Arrays.asList("id_card","name", "py_str", "wb_str")), null);
|
||||||
// 设置排序
|
// 设置排序
|
||||||
queryWrapper.orderByDesc("update_time");
|
queryWrapper.orderByDesc("update_time");
|
||||||
// 患者信息
|
// 患者信息
|
||||||
@@ -127,4 +140,62 @@ public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistr
|
|||||||
return conditionDefinitionMetadataPage;
|
return conditionDefinitionMetadataPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据位置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) {
|
||||||
|
|
||||||
|
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"挂号"}));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,15 +7,14 @@ import java.util.List;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
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.core.common.core.domain.R;
|
||||||
|
import com.openhis.common.enums.LocationForm;
|
||||||
import com.openhis.common.enums.PriorityLevel;
|
import com.openhis.common.enums.PriorityLevel;
|
||||||
import com.openhis.web.basedatamanage.appservice.IOrganizationAppService;
|
import com.openhis.web.basedatamanage.appservice.ILocationAppService;
|
||||||
import com.openhis.web.outpatientservice.appservice.IOutpatientRegistrationAppService;
|
import com.openhis.web.outpatientservice.appservice.IOutpatientRegistrationAppService;
|
||||||
|
import com.openhis.web.outpatientservice.dto.OutpatientRegistrationAddParam;
|
||||||
import com.openhis.web.outpatientservice.dto.OutpatientRegistrationInitDto;
|
import com.openhis.web.outpatientservice.dto.OutpatientRegistrationInitDto;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@@ -31,7 +30,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
public class OutpatientRegistrationController {
|
public class OutpatientRegistrationController {
|
||||||
|
|
||||||
private final IOutpatientRegistrationAppService iOutpatientRegistrationAppService;
|
private final IOutpatientRegistrationAppService iOutpatientRegistrationAppService;
|
||||||
private final IOrganizationAppService iOrganizationAppService;
|
private final ILocationAppService iLocationAppService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基础数据初始化
|
* 基础数据初始化
|
||||||
@@ -86,14 +85,51 @@ public class OutpatientRegistrationController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询就诊位置
|
* 查询就诊位置
|
||||||
|
*
|
||||||
|
* @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筛选医生
|
* 根据位置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筛选服务项目
|
* 根据机构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(@RequestBody OutpatientRegistrationAddParam outpatientRegistrationAddParam) {
|
||||||
|
return iOutpatientRegistrationAppService.saveRegister(outpatientRegistrationAddParam);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.openhis.web.outpatientservice.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.outpatientservice.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.outpatientservice.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.outpatientservice.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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,19 +4,30 @@ import lombok.Data;
|
|||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 门诊挂号 新增数据
|
* 门诊挂号 新增参数
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class OutpatientRegistrationAddParam {
|
public class OutpatientRegistrationAddParam {
|
||||||
|
|
||||||
// 就诊管理-表单数据
|
/**
|
||||||
|
* 就诊管理-表单数据
|
||||||
|
*/
|
||||||
|
private EncounterFormData encounterFormData;
|
||||||
|
|
||||||
// 就诊诊断管理-表单数据
|
/**
|
||||||
|
* 就诊诊断管理-表单数据
|
||||||
|
*/
|
||||||
|
private EncounterDiagnosisFormData encounterDiagnosisFormData;
|
||||||
|
|
||||||
// 就诊位置管理-表单数据
|
/**
|
||||||
|
* 就诊位置管理-表单数据
|
||||||
// 就诊参数者管理-表单数据
|
*/
|
||||||
|
private EncounterLocationFormData encounterLocationFormData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就诊参数者管理-表单数据
|
||||||
|
*/
|
||||||
|
private EncounterParticipantFormData encounterParticipantFormData;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.openhis.web.outpatientservice.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,22 @@
|
|||||||
|
package com.openhis.web.outpatientservice.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.outpatientservice.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);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?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.web.outpatientservice.mapper.OutpatientRegistrationAppMapper">
|
||||||
|
|
||||||
|
<select id="getPractitionerMetadataPage" resultType="com.openhis.web.outpatientservice.dto.PractitionerMetadata">
|
||||||
|
SELECT T3.tenant_id,
|
||||||
|
T3.ID,
|
||||||
|
T3.NAME,
|
||||||
|
T3.gender_enum,
|
||||||
|
T3.py_str,
|
||||||
|
T3.wb_str
|
||||||
|
FROM (
|
||||||
|
SELECT
|
||||||
|
T1.tenant_id,
|
||||||
|
T1.ID,
|
||||||
|
T1.NAME,
|
||||||
|
T1.gender_enum,
|
||||||
|
T1.py_str,
|
||||||
|
T1.wb_str
|
||||||
|
FROM adm_practitioner AS T1
|
||||||
|
WHERE T1.delete_flag = '0'
|
||||||
|
AND EXISTS(SELECT 1
|
||||||
|
FROM adm_practitioner_role AS T2
|
||||||
|
WHERE T2.practitioner_id = T1.ID
|
||||||
|
AND T2.location_id = #{locationId}
|
||||||
|
AND T2.ROLE_code = #{RoleCode})
|
||||||
|
) AS T3
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
package com.openhis.common.enums;
|
package com.openhis.common.enums;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum EncounterLocationStatus {
|
public enum EncounterLocationStatus implements HisEnumInterface {
|
||||||
PLANNED(1, "planned", "已安排"),
|
PLANNED(1, "planned", "已安排"),
|
||||||
|
|
||||||
ACTIVE(2, "active", "使用中"),
|
ACTIVE(2, "active", "使用中"),
|
||||||
|
|||||||
@@ -5,5 +5,6 @@ package com.openhis.common.enums;
|
|||||||
*/
|
*/
|
||||||
public interface HisEnumInterface {
|
public interface HisEnumInterface {
|
||||||
Integer getValue();
|
Integer getValue();
|
||||||
|
String getCode();
|
||||||
String getInfo();
|
String getInfo();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.openhis.common.enums;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参与者类型
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum ParticipantType implements HisEnumInterface {
|
||||||
|
ADMITTER(1, "1", "首诊医生"),
|
||||||
|
|
||||||
|
ATTENDER(2, "2", "责任护士"),
|
||||||
|
|
||||||
|
CONTACT(3, "3", "联系人"),
|
||||||
|
|
||||||
|
CONSULTANT(4, "4", "顾问"),
|
||||||
|
|
||||||
|
DISCHARGER(5, "5", "出院办理人"),
|
||||||
|
|
||||||
|
ESCORT(6, "6", "护送人"),
|
||||||
|
|
||||||
|
REFERRER(7, "7", "推荐人"),
|
||||||
|
|
||||||
|
EMERGENCY(8, "8", "紧急联系人");
|
||||||
|
|
||||||
|
@EnumValue
|
||||||
|
private final Integer value;
|
||||||
|
private final String code;
|
||||||
|
private final String info;
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.openhis.common.enums;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参与者角色
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum PractitionerRole implements HisEnumInterface {
|
||||||
|
DOCTOR(1, "doctor", "医生"),
|
||||||
|
|
||||||
|
NURSE(2, "nurse", "护士"),
|
||||||
|
|
||||||
|
PHARMACIST(3, "pharmacist", "药师");
|
||||||
|
|
||||||
|
@EnumValue
|
||||||
|
private final Integer value;
|
||||||
|
private final String code;
|
||||||
|
private final String info;
|
||||||
|
}
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
package com.openhis.administration.domain;
|
package com.openhis.administration.domain;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
import com.core.common.core.domain.HisBaseEntity;
|
import com.core.common.core.domain.HisBaseEntity;
|
||||||
import com.openhis.common.enums.EncounterLocationStatus;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -36,7 +34,7 @@ public class EncounterLocation extends HisBaseEntity {
|
|||||||
private Long locationId;
|
private Long locationId;
|
||||||
|
|
||||||
/** 状态枚举 */
|
/** 状态枚举 */
|
||||||
private EncounterLocationStatus statusEnum;
|
private Integer statusEnum;
|
||||||
|
|
||||||
/** 物理形式枚举 */
|
/** 物理形式枚举 */
|
||||||
private Integer formEnum;
|
private Integer formEnum;
|
||||||
@@ -47,5 +45,4 @@ public class EncounterLocation extends HisBaseEntity {
|
|||||||
/** 结束时间 */
|
/** 结束时间 */
|
||||||
private Date endTime;
|
private Date endTime;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class Practitioner extends HisBaseEntity {
|
|||||||
private String nameJson;
|
private String nameJson;
|
||||||
|
|
||||||
/** 性别编码 */
|
/** 性别编码 */
|
||||||
private AdministrativeGender genderEnum;
|
private Integer genderEnum;
|
||||||
|
|
||||||
/** 生日 */
|
/** 生日 */
|
||||||
private Date birthDate;
|
private Date birthDate;
|
||||||
|
|||||||
Reference in New Issue
Block a user