就诊-元数据
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
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 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 {
|
||||
|
||||
/**
|
||||
@@ -37,4 +41,36 @@ public interface IOutpatientRegistrationAppService {
|
||||
Page<ConditionDefinitionMetadata> getConditionDefinitionMetadataSearchKey(String searchKey, Integer pageNo,
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
@@ -7,11 +7,16 @@ import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.web.basicservice.dto.HealthcareServiceDto;
|
||||
import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper;
|
||||
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.bean.BeanUtils;
|
||||
import com.openhis.administration.domain.Patient;
|
||||
@@ -19,6 +24,7 @@ import com.openhis.administration.mapper.PatientMapper;
|
||||
import com.openhis.clinical.domain.ConditionDefinition;
|
||||
import com.openhis.clinical.mapper.ConditionDefinitionMapper;
|
||||
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;
|
||||
@@ -27,12 +33,11 @@ import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.financial.domain.Contract;
|
||||
import com.openhis.financial.mapper.ContractMapper;
|
||||
import com.openhis.web.outpatientservice.appservice.IOutpatientRegistrationAppService;
|
||||
import com.openhis.web.outpatientservice.dto.ConditionDefinitionMetadata;
|
||||
import com.openhis.web.outpatientservice.dto.ContractMetadata;
|
||||
import com.openhis.web.outpatientservice.dto.PatientMetadata;
|
||||
import com.openhis.web.outpatientservice.dto.*;
|
||||
import com.openhis.web.outpatientservice.mapper.OutpatientRegistrationAppMapper;
|
||||
|
||||
/**
|
||||
* 门诊挂号 实现类
|
||||
* 门诊挂号 应用实现类
|
||||
*/
|
||||
@Service
|
||||
public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistrationAppService {
|
||||
@@ -46,6 +51,12 @@ public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistr
|
||||
@Resource
|
||||
ConditionDefinitionMapper conditionDefinitionMapper;
|
||||
|
||||
@Resource
|
||||
OutpatientRegistrationAppMapper outpatientRegistrationAppMapper;
|
||||
|
||||
@Resource
|
||||
HealthcareServiceBizMapper healthcareServiceBizMapper;
|
||||
|
||||
/**
|
||||
* 门诊挂号 - 查询患者信息
|
||||
*
|
||||
@@ -127,4 +138,61 @@ public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistr
|
||||
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 null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,15 +7,14 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
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 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.IOrganizationAppService;
|
||||
import com.openhis.web.basedatamanage.appservice.ILocationAppService;
|
||||
import com.openhis.web.outpatientservice.appservice.IOutpatientRegistrationAppService;
|
||||
import com.openhis.web.outpatientservice.dto.OutpatientRegistrationAddParam;
|
||||
import com.openhis.web.outpatientservice.dto.OutpatientRegistrationInitDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -31,7 +30,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
public class OutpatientRegistrationController {
|
||||
|
||||
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筛选医生
|
||||
*/
|
||||
@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(@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;
|
||||
|
||||
/**
|
||||
* 门诊挂号 新增数据
|
||||
* 门诊挂号 新增参数
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
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>
|
||||
Reference in New Issue
Block a user