tb
This commit is contained in:
@@ -79,7 +79,8 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
||||
bizUser.setStatus(userAndPractitionerDto.getStatus()); // 状态
|
||||
bizUser.setRemark(userAndPractitionerDto.getRemark()); // 备注
|
||||
iBizUserService.save(bizUser);
|
||||
Long userId = bizUser.getUserId(); // 用户id
|
||||
Long userId =
|
||||
iBizUserService.getOne(new LambdaQueryWrapper<BizUser>().eq(BizUser::getUserName, userName)).getUserId(); // 用户id
|
||||
// 新增 sys_user_role
|
||||
List<Long> roleIds = userAndPractitionerDto.getRoleIds();
|
||||
BizUserRole bizUserRole;
|
||||
@@ -135,6 +136,7 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
||||
// 构建查询条件
|
||||
QueryWrapper<UserAndPractitionerDto> queryWrapper = HisQueryUtils.buildQueryWrapper(userAndPractitionerDto,
|
||||
searchKey, new HashSet<>(Arrays.asList("user_name", "nick_name", "py_str", "wb_str")), null);
|
||||
queryWrapper.orderByDesc("user_id");
|
||||
IPage<UserAndPractitionerDto> userPractitionerPage =
|
||||
practitionerAppAppMapper.getUserPractitionerPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
List<UserAndPractitionerDto> records = userPractitionerPage.getRecords();
|
||||
|
||||
@@ -19,7 +19,9 @@ import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.AssignSeqUtil;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.openhis.administration.domain.ChargeItem;
|
||||
import com.openhis.administration.domain.OrganizationLocation;
|
||||
import com.openhis.administration.service.IChargeItemService;
|
||||
import com.openhis.administration.service.IOrganizationLocationService;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.*;
|
||||
@@ -59,6 +61,9 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
@Resource
|
||||
IChargeItemService iChargeItemService;
|
||||
|
||||
@Resource
|
||||
IOrganizationLocationService iOrganizationLocationService;
|
||||
|
||||
/**
|
||||
* 查询医嘱信息
|
||||
*
|
||||
@@ -78,7 +83,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
IPage<AdviceBaseDto> adviceBaseInfo =
|
||||
doctorStationAdviceAppMapper.getAdviceBaseInfo(new Page<>(pageNo, pageSize),
|
||||
CommonConstants.TableName.MED_MEDICATION_DEFINITION, CommonConstants.TableName.ADM_DEVICE_DEFINITION,
|
||||
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, queryWrapper);
|
||||
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, DeviceCategory.SINGLE_USE.getInfo(), queryWrapper);
|
||||
List<AdviceBaseDto> adviceBaseDtoList = adviceBaseInfo.getRecords();
|
||||
// 医嘱定义ID集合
|
||||
List<Long> adviceDefinitionIdList =
|
||||
@@ -203,7 +208,14 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
medicationRequest.setPatientId(adviceSaveDto.getPatientId());
|
||||
medicationRequest.setPractitionerId(adviceSaveDto.getPractitionerId());
|
||||
medicationRequest.setOrgId(adviceSaveDto.getOrgId());
|
||||
medicationRequest.setLocationId(adviceSaveDto.getLocationId());
|
||||
// 查询机构位置关系
|
||||
OrganizationLocation orgLocByOrgIdAndCategoryCode = iOrganizationLocationService
|
||||
.getOrgLocByOrgIdAndCategoryCode(adviceSaveDto.getOrgId(), adviceSaveDto.getCategoryCode());
|
||||
if (orgLocByOrgIdAndCategoryCode != null) {
|
||||
// 发放药房
|
||||
medicationRequest.setPerformLocation(orgLocByOrgIdAndCategoryCode.getDefLocationId());
|
||||
}
|
||||
// medicationRequest.setLocationId(adviceSaveDto.getLocationId()); // 请求发起的位置
|
||||
medicationRequest.setEncounterId(adviceSaveDto.getEncounterId());
|
||||
medicationRequest.setConditionId(adviceSaveDto.getConditionId()); // 诊断id
|
||||
medicationRequest.setTherapyEnum(adviceSaveDto.getTherapyEnum());
|
||||
@@ -235,7 +247,14 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
deviceRequest.setPatientId(adviceSaveDto.getPatientId());
|
||||
deviceRequest.setRequesterId(adviceSaveDto.getPractitionerId());
|
||||
deviceRequest.setOrgId(adviceSaveDto.getOrgId());
|
||||
deviceRequest.setLocationId(adviceSaveDto.getLocationId());
|
||||
// 查询机构位置关系
|
||||
OrganizationLocation orgLocByOrgIdAndCategoryCode = iOrganizationLocationService
|
||||
.getOrgLocByOrgIdAndCategoryCode(adviceSaveDto.getOrgId(), adviceSaveDto.getCategoryCode());
|
||||
if (orgLocByOrgIdAndCategoryCode != null) {
|
||||
// 发放耗材房
|
||||
deviceRequest.setPerformLocation(orgLocByOrgIdAndCategoryCode.getDefLocationId());
|
||||
}
|
||||
// deviceRequest.setLocationId(adviceSaveDto.getLocationId()); 请求发起的位置
|
||||
deviceRequest.setEncounterId(adviceSaveDto.getEncounterId());
|
||||
// deviceRequest.setPackageId(adviceSaveDto.getPackageId());
|
||||
// deviceRequest.setActivityId(adviceSaveDto.getActivityId());
|
||||
|
||||
@@ -19,6 +19,11 @@ public class AdviceBaseDto {
|
||||
/** 医嘱类型 */
|
||||
private Integer adviceType; // 1:药品 , 2: 耗材 , 3:项目
|
||||
|
||||
/**
|
||||
* 医嘱详细分类
|
||||
*/
|
||||
private String categoryCode;
|
||||
|
||||
/** 医嘱定义ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long adviceDefinitionId;
|
||||
|
||||
@@ -22,6 +22,11 @@ public class AdviceSaveDto {
|
||||
/** 医嘱类型 */
|
||||
private Integer adviceType; // 1:药品 , 2: 耗材 , 3:项目
|
||||
|
||||
/**
|
||||
* 医嘱详细分类
|
||||
*/
|
||||
private String categoryCode;
|
||||
|
||||
/** 执行次数 */
|
||||
private Integer executeNum; // 当医嘱类型为药品时,选填
|
||||
|
||||
@@ -68,10 +73,14 @@ public class AdviceSaveDto {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long practitionerId;
|
||||
|
||||
/** 所属位置 */
|
||||
/** 请求发起的位置 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
|
||||
/** 发放位置 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long performLocation;
|
||||
|
||||
/** 所属科室 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
@@ -128,6 +137,7 @@ public class AdviceSaveDto {
|
||||
this.categoryEnum = EncounterClass.AMB.getValue();
|
||||
this.therapyEnum = TherapyTimeType.TEMPORARY.getValue();
|
||||
this.practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
this.orgId = SecurityUtils.getLoginUser().getOrgId(); // 开发人科室
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,12 +26,13 @@ public interface DoctorStationAdviceAppMapper {
|
||||
* @param medicationTableName 药品定义表名
|
||||
* @param deviceTableName 耗材定义表名
|
||||
* @param activityTableName 诊疗定义表名
|
||||
* @param singleUse 单次消耗类 (耗材只查这类)
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 医嘱信息
|
||||
*/
|
||||
IPage<AdviceBaseDto> getAdviceBaseInfo(@Param("page") Page<AdviceBaseDto> page,
|
||||
@Param("medicationTableName") String medicationTableName, @Param("deviceTableName") String deviceTableName,
|
||||
@Param("activityTableName") String activityTableName,
|
||||
@Param("activityTableName") String activityTableName, @Param("singleUse") String singleUse,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<AdviceBaseDto> queryWrapper);
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<select id="getAdviceBaseInfo" resultType="com.openhis.web.doctorstation.dto.AdviceBaseDto">
|
||||
SELECT abi.tenant_id,
|
||||
abi.advice_type,
|
||||
abi.category_code,
|
||||
abi.advice_definition_id,
|
||||
abi.advice_name,
|
||||
abi.advice_bus_no,
|
||||
@@ -31,6 +32,7 @@
|
||||
from (
|
||||
SELECT T1.tenant_id,
|
||||
1 AS advice_type,
|
||||
T1.category_code AS category_code,
|
||||
T1.ID AS advice_definition_id,
|
||||
T1.NAME AS advice_name,
|
||||
T1.bus_no AS advice_bus_no,
|
||||
@@ -66,6 +68,7 @@
|
||||
UNION ALL
|
||||
SELECT T1.tenant_id,
|
||||
2 AS advice_type,
|
||||
T1.category_code AS category_code,
|
||||
T1.ID AS advice_definition_id,
|
||||
T1.NAME AS advice_name,
|
||||
T1.bus_no AS advice_bus_no,
|
||||
@@ -96,9 +99,11 @@
|
||||
AND T4.delete_flag = '0'
|
||||
AND T4.instance_table = #{deviceTableName}
|
||||
WHERE T1.delete_flag = '0'
|
||||
AND T1.category_code = #{singleUse}
|
||||
UNION ALL
|
||||
SELECT T1.tenant_id,
|
||||
3 AS advice_type,
|
||||
'' AS category_code,
|
||||
T1.ID AS advice_definition_id,
|
||||
T1.NAME AS advice_name,
|
||||
T1.bus_no AS advice_bus_no,
|
||||
|
||||
Reference in New Issue
Block a user