Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -149,14 +149,14 @@
|
||||
<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
|
||||
<if test="menuCheckStrictly != null">
|
||||
<choose>
|
||||
<when test="menuCheckStrictly == true">1,</when>
|
||||
<otherwise>0,</otherwise>
|
||||
<when test="menuCheckStrictly == true">menu_check_strictly=1,</when>
|
||||
<otherwise>menu_check_strictly=0,</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="deptCheckStrictly != null">
|
||||
<choose>
|
||||
<when test="deptCheckStrictly == true">1,</when>
|
||||
<otherwise>0,</otherwise>
|
||||
<when test="deptCheckStrictly == true">dept_check_strictly=1,</when>
|
||||
<otherwise>dept_check_strictly=0,</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.openhis.web.basedatamanage.appservice;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.doctorstation.dto.UserAndPractitionerDto;
|
||||
import com.openhis.web.basedatamanage.dto.UserAndPractitionerDto;
|
||||
|
||||
/**
|
||||
* 参与者 应该服务类
|
||||
|
||||
@@ -27,11 +27,13 @@ import com.openhis.administration.service.IPractitionerRoleService;
|
||||
import com.openhis.administration.service.IPractitionerService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.AccountStatus;
|
||||
import com.openhis.common.enums.PractitionerRoles;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.basedatamanage.appservice.IPractitionerAppService;
|
||||
import com.openhis.web.basedatamanage.dto.PractitionerOrgAndLocationDto;
|
||||
import com.openhis.web.basedatamanage.dto.PractitionerRolesDto;
|
||||
import com.openhis.web.basedatamanage.dto.UserAndPractitionerDto;
|
||||
import com.openhis.web.basedatamanage.mapper.PractitionerAppAppMapper;
|
||||
import com.openhis.web.doctorstation.dto.UserAndPractitionerChildDto;
|
||||
import com.openhis.web.doctorstation.dto.UserAndPractitionerDto;
|
||||
|
||||
@Service
|
||||
public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
||||
@@ -82,12 +84,12 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
||||
Long userId =
|
||||
iBizUserService.getOne(new LambdaQueryWrapper<BizUser>().eq(BizUser::getUserName, userName)).getUserId(); // 用户id
|
||||
// 新增 sys_user_role
|
||||
List<Long> roleIds = userAndPractitionerDto.getRoleIds();
|
||||
List<PractitionerRolesDto> practitionerRoleDtoList = userAndPractitionerDto.getPractitionerRolesDtoList();
|
||||
BizUserRole bizUserRole;
|
||||
for (Long roleId : roleIds) {
|
||||
for (PractitionerRolesDto practitionerRolesDto : practitionerRoleDtoList) {
|
||||
bizUserRole = new BizUserRole();
|
||||
bizUserRole.setUserId(userId);
|
||||
bizUserRole.setRoleId(roleId);
|
||||
bizUserRole.setRoleId(practitionerRolesDto.getRoleId());
|
||||
iBizUserRoleService.save(bizUserRole);
|
||||
}
|
||||
// 新增 adm_practitioner
|
||||
@@ -100,21 +102,43 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
||||
practitioner.setAddress(userAndPractitionerDto.getAddress()); // 地址
|
||||
practitioner.setYbNo(userAndPractitionerDto.getYbNo()); // 医保码
|
||||
practitioner.setUserId(userId); // 系统用户id
|
||||
practitioner.setOrgId(userAndPractitionerDto.getOrgId()); // 机构id
|
||||
// 责任科室
|
||||
List<PractitionerOrgAndLocationDto> responsibilityOrgDtoList =
|
||||
userAndPractitionerDto.getResponsibilityOrgDtoList();
|
||||
practitioner.setOrgId(responsibilityOrgDtoList.get(0).getOrgId()); // 机构id
|
||||
practitioner.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(nickName)); // 拼音码
|
||||
practitioner.setWbStr(ChineseConvertUtils.toWBFirstLetter(nickName)); // 五笔码
|
||||
iPractitionerService.save(practitioner);
|
||||
Long practitionerId = practitioner.getId();// 参与者id
|
||||
// 新增 adm_practitioner_role
|
||||
List<UserAndPractitionerChildDto> childList = userAndPractitionerDto.getChildList();
|
||||
PractitionerRole practitionerRole;
|
||||
for (UserAndPractitionerChildDto userAndPractitionerChildDto : childList) {
|
||||
// 1.责任科室
|
||||
for (PractitionerOrgAndLocationDto responsibilityOrgDto : responsibilityOrgDtoList) {
|
||||
practitionerRole = new PractitionerRole();
|
||||
practitionerRole.setName(nickName); // 姓名
|
||||
practitionerRole.setPractitionerId(practitionerId); // 参与者id
|
||||
practitionerRole.setRoleCode(userAndPractitionerChildDto.getRoleCode()); // 角色code
|
||||
practitionerRole.setOrgId(userAndPractitionerChildDto.getOrgId()); // 机构id
|
||||
practitionerRole.setLocationId(userAndPractitionerChildDto.getLocationId()); // 位置id
|
||||
practitionerRole.setOrgId(responsibilityOrgDto.getOrgId()); // 机构id
|
||||
iPractitionerRoleService.save(practitionerRole);
|
||||
}
|
||||
// 2.医生出诊科室
|
||||
List<PractitionerOrgAndLocationDto> doctorVisitOrgDtoList = userAndPractitionerDto.getDoctorVisitOrgDtoList();
|
||||
for (PractitionerOrgAndLocationDto doctorVisitOrgDto : doctorVisitOrgDtoList) {
|
||||
practitionerRole = new PractitionerRole();
|
||||
practitionerRole.setName(nickName); // 姓名
|
||||
practitionerRole.setPractitionerId(practitionerId); // 参与者id
|
||||
practitionerRole.setRoleCode(PractitionerRoles.DOCTOR.getCode());// 角色code
|
||||
practitionerRole.setOrgId(doctorVisitOrgDto.getOrgId()); // 机构id
|
||||
iPractitionerRoleService.save(practitionerRole);
|
||||
}
|
||||
// 3.管理库房
|
||||
List<PractitionerOrgAndLocationDto> manageLocationDtoList = userAndPractitionerDto.getManageLocationDtoList();
|
||||
for (PractitionerOrgAndLocationDto manageLocationDto : manageLocationDtoList) {
|
||||
practitionerRole = new PractitionerRole();
|
||||
practitionerRole.setName(nickName); // 姓名
|
||||
practitionerRole.setPractitionerId(practitionerId); // 参与者id
|
||||
practitionerRole.setRoleCode(PractitionerRoles.LOCATION_ADMIN.getCode()); // 角色code
|
||||
practitionerRole.setLocationId(manageLocationDto.getLocationId()); // 位置id
|
||||
practitionerRole.setOrgId(manageLocationDto.getOrgId()); // 机构id
|
||||
iPractitionerRoleService.save(practitionerRole);
|
||||
}
|
||||
|
||||
@@ -143,13 +167,34 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
||||
// 参与者id集合
|
||||
List<Long> practitionerIdList =
|
||||
records.stream().map(UserAndPractitionerDto::getPractitionerId).collect(Collectors.toList());
|
||||
// 子集合
|
||||
List<UserAndPractitionerChildDto> childList = practitionerAppAppMapper.getChildList(practitionerIdList);
|
||||
// 角色集合
|
||||
List<PractitionerRolesDto> practitionerRolesDtoList =
|
||||
practitionerAppAppMapper.getPractitionerRolesDtoList(practitionerIdList);
|
||||
// 科室和位置
|
||||
List<PractitionerOrgAndLocationDto> orgAndLocationDtoList =
|
||||
practitionerAppAppMapper.getOrgAndLocationDtoList(practitionerIdList);
|
||||
for (UserAndPractitionerDto record : records) {
|
||||
// 匹配子集合
|
||||
List<UserAndPractitionerChildDto> childDtoList = childList.stream()
|
||||
// 匹配角色
|
||||
List<PractitionerRolesDto> list1 = practitionerRolesDtoList.stream()
|
||||
.filter(e -> e.getPractitionerId().equals(record.getPractitionerId())).collect(Collectors.toList());
|
||||
record.setChildList(childDtoList);
|
||||
record.setPractitionerRolesDtoList(list1);
|
||||
// 匹配责任科室
|
||||
List<PractitionerOrgAndLocationDto> list2 = orgAndLocationDtoList.stream()
|
||||
.filter(e -> e.getPractitionerId().equals(record.getPractitionerId()) && "".equals(e.getRoleCode()))
|
||||
.collect(Collectors.toList());
|
||||
record.setResponsibilityOrgDtoList(list2);
|
||||
// 匹配医生出诊科室
|
||||
List<PractitionerOrgAndLocationDto> list3 =
|
||||
orgAndLocationDtoList.stream().filter(e -> e.getPractitionerId().equals(record.getPractitionerId())
|
||||
&& PractitionerRoles.DOCTOR.getCode().equals(e.getRoleCode())).collect(Collectors.toList());
|
||||
record.setDoctorVisitOrgDtoList(list3);
|
||||
// 匹配管理库房
|
||||
List<PractitionerOrgAndLocationDto> list4 =
|
||||
orgAndLocationDtoList.stream()
|
||||
.filter(e -> e.getPractitionerId().equals(record.getPractitionerId())
|
||||
&& PractitionerRoles.LOCATION_ADMIN.getCode().equals(e.getRoleCode()))
|
||||
.collect(Collectors.toList());
|
||||
record.setManageLocationDtoList(list4);
|
||||
}
|
||||
return userPractitionerPage;
|
||||
}
|
||||
@@ -179,12 +224,12 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
||||
iBizUserService.update(bizUser, new LambdaQueryWrapper<BizUser>().eq(BizUser::getUserId, userId));
|
||||
// 先删除,再新增 sys_user_role
|
||||
practitionerAppAppMapper.delUserRole(userId);
|
||||
List<Long> roleIds = userAndPractitionerDto.getRoleIds();
|
||||
List<PractitionerRolesDto> practitionerRoleDtoList = userAndPractitionerDto.getPractitionerRolesDtoList();
|
||||
BizUserRole bizUserRole;
|
||||
for (Long roleId : roleIds) {
|
||||
for (PractitionerRolesDto practitionerRolesDto : practitionerRoleDtoList) {
|
||||
bizUserRole = new BizUserRole();
|
||||
bizUserRole.setUserId(userId);
|
||||
bizUserRole.setRoleId(roleId);
|
||||
bizUserRole.setRoleId(practitionerRolesDto.getRoleId());
|
||||
iBizUserRoleService.save(bizUserRole);
|
||||
}
|
||||
// 编辑 adm_practitioner
|
||||
@@ -197,21 +242,43 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
||||
practitioner.setAddress(userAndPractitionerDto.getAddress()); // 地址
|
||||
practitioner.setYbNo(userAndPractitionerDto.getYbNo()); // 医保码
|
||||
practitioner.setUserId(userId); // 系统用户id
|
||||
practitioner.setOrgId(userAndPractitionerDto.getOrgId()); // 机构id
|
||||
// 责任科室
|
||||
List<PractitionerOrgAndLocationDto> responsibilityOrgDtoList =
|
||||
userAndPractitionerDto.getResponsibilityOrgDtoList();
|
||||
practitioner.setOrgId(responsibilityOrgDtoList.get(0).getOrgId()); // 机构id
|
||||
practitioner.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(nickName)); // 拼音码
|
||||
practitioner.setWbStr(ChineseConvertUtils.toWBFirstLetter(nickName)); // 五笔码
|
||||
iPractitionerService.updateById(practitioner);
|
||||
// 先删除,再新增 adm_practitioner_role
|
||||
practitionerAppAppMapper.delPractitionerRole(practitionerId);
|
||||
List<UserAndPractitionerChildDto> childList = userAndPractitionerDto.getChildList();
|
||||
PractitionerRole practitionerRole;
|
||||
for (UserAndPractitionerChildDto userAndPractitionerChildDto : childList) {
|
||||
// 1.责任科室
|
||||
for (PractitionerOrgAndLocationDto responsibilityOrgDto : responsibilityOrgDtoList) {
|
||||
practitionerRole = new PractitionerRole();
|
||||
practitionerRole.setName(nickName); // 姓名
|
||||
practitionerRole.setPractitionerId(practitionerId); // 参与者id
|
||||
practitionerRole.setRoleCode(userAndPractitionerChildDto.getRoleCode()); // 角色code
|
||||
practitionerRole.setOrgId(userAndPractitionerChildDto.getOrgId()); // 机构id
|
||||
practitionerRole.setLocationId(userAndPractitionerChildDto.getLocationId()); // 位置id
|
||||
practitionerRole.setOrgId(responsibilityOrgDto.getOrgId()); // 机构id
|
||||
iPractitionerRoleService.save(practitionerRole);
|
||||
}
|
||||
// 2.医生出诊科室
|
||||
List<PractitionerOrgAndLocationDto> doctorVisitOrgDtoList = userAndPractitionerDto.getDoctorVisitOrgDtoList();
|
||||
for (PractitionerOrgAndLocationDto doctorVisitOrgDto : doctorVisitOrgDtoList) {
|
||||
practitionerRole = new PractitionerRole();
|
||||
practitionerRole.setName(nickName); // 姓名
|
||||
practitionerRole.setPractitionerId(practitionerId); // 参与者id
|
||||
practitionerRole.setRoleCode(PractitionerRoles.DOCTOR.getCode());// 角色code
|
||||
practitionerRole.setOrgId(doctorVisitOrgDto.getOrgId()); // 机构id
|
||||
iPractitionerRoleService.save(practitionerRole);
|
||||
}
|
||||
// 3.管理库房
|
||||
List<PractitionerOrgAndLocationDto> manageLocationDtoList = userAndPractitionerDto.getManageLocationDtoList();
|
||||
for (PractitionerOrgAndLocationDto manageLocationDto : manageLocationDtoList) {
|
||||
practitionerRole = new PractitionerRole();
|
||||
practitionerRole.setName(nickName); // 姓名
|
||||
practitionerRole.setPractitionerId(practitionerId); // 参与者id
|
||||
practitionerRole.setRoleCode(PractitionerRoles.LOCATION_ADMIN.getCode()); // 角色code
|
||||
practitionerRole.setLocationId(manageLocationDto.getLocationId()); // 位置id
|
||||
practitionerRole.setOrgId(manageLocationDto.getOrgId()); // 机构id
|
||||
iPractitionerRoleService.save(practitionerRole);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.basedatamanage.appservice.IPractitionerAppService;
|
||||
import com.openhis.web.doctorstation.dto.UserAndPractitionerDto;
|
||||
import com.openhis.web.basedatamanage.dto.UserAndPractitionerDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.openhis.web.doctorstation.dto;
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
@@ -8,19 +8,11 @@ import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 用户 及 参与者 子dto
|
||||
* 参与者机构和位置 dto
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class UserAndPractitionerChildDto {
|
||||
|
||||
/**
|
||||
* 机构id
|
||||
*/
|
||||
@Dict(dictTable = "adm_organization", dictCode = "id", dictText = "name")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
private String orgId_dictText;
|
||||
public class PractitionerOrgAndLocationDto {
|
||||
|
||||
/**
|
||||
* 位置id
|
||||
@@ -36,14 +28,12 @@ public class UserAndPractitionerChildDto {
|
||||
private String roleCode;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
* 机构id
|
||||
*/
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 角色name
|
||||
*/
|
||||
private String roleName;
|
||||
@Dict(dictTable = "adm_organization", dictCode = "id", dictText = "name")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
private String orgId_dictText;
|
||||
|
||||
/**
|
||||
* 参与者id
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 参与者角色 dto
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PractitionerRolesDto {
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long roleId;
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
private String roleName;
|
||||
|
||||
/**
|
||||
* 参与者id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long practitionerId;
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.openhis.web.doctorstation.dto;
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -103,13 +103,23 @@ public class UserAndPractitionerDto {
|
||||
private String orgId_dictText;
|
||||
|
||||
/**
|
||||
* 角色id集合
|
||||
* 责任科室
|
||||
*/
|
||||
private List<Long> roleIds;
|
||||
private List<PractitionerOrgAndLocationDto> responsibilityOrgDtoList;
|
||||
|
||||
/**
|
||||
* 子集合
|
||||
* 参与者角色集合
|
||||
*/
|
||||
private List<UserAndPractitionerChildDto> childList;
|
||||
private List<PractitionerRolesDto> practitionerRolesDtoList;
|
||||
|
||||
/**
|
||||
* 医生出诊科室集合
|
||||
*/
|
||||
private List<PractitionerOrgAndLocationDto> doctorVisitOrgDtoList;
|
||||
|
||||
/**
|
||||
* 管理库房集合
|
||||
*/
|
||||
private List<PractitionerOrgAndLocationDto> manageLocationDtoList;
|
||||
|
||||
}
|
||||
@@ -9,8 +9,9 @@ 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.doctorstation.dto.UserAndPractitionerChildDto;
|
||||
import com.openhis.web.doctorstation.dto.UserAndPractitionerDto;
|
||||
import com.openhis.web.basedatamanage.dto.PractitionerOrgAndLocationDto;
|
||||
import com.openhis.web.basedatamanage.dto.PractitionerRolesDto;
|
||||
import com.openhis.web.basedatamanage.dto.UserAndPractitionerDto;
|
||||
|
||||
/**
|
||||
* 参与者 应用Mapper
|
||||
@@ -29,12 +30,21 @@ public interface PractitionerAppAppMapper {
|
||||
@Param(Constants.WRAPPER) QueryWrapper<UserAndPractitionerDto> queryWrapper);
|
||||
|
||||
/**
|
||||
* 查询子集合
|
||||
* 查询参与者的角色信息
|
||||
*
|
||||
* @param practitionerIdList 参与者id集合
|
||||
* @return 子集合
|
||||
* @return 参与者的角色信息
|
||||
*/
|
||||
List<UserAndPractitionerChildDto> getChildList(@Param("practitionerIdList") List<Long> practitionerIdList);
|
||||
List<PractitionerRolesDto> getPractitionerRolesDtoList(@Param("practitionerIdList") List<Long> practitionerIdList);
|
||||
|
||||
/**
|
||||
* 查询科室和位置集合
|
||||
*
|
||||
* @param practitionerIdList 参与者id集合
|
||||
* @return 科室和位置集合
|
||||
*/
|
||||
List<PractitionerOrgAndLocationDto>
|
||||
getOrgAndLocationDtoList(@Param("practitionerIdList") List<Long> practitionerIdList);
|
||||
|
||||
/**
|
||||
* 物理删除系统用户与角色的关系
|
||||
|
||||
@@ -4,22 +4,18 @@
|
||||
package com.openhis.web.chargemanage.appservice.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.openhis.web.chargemanage.dto.RefundItemDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.openhis.administration.domain.ChargeItem;
|
||||
import com.openhis.administration.service.IChargeItemService;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.PaymentStatus;
|
||||
import com.openhis.financial.service.IPaymentReconciliationService;
|
||||
import com.openhis.web.chargemanage.appservice.IOutpatientRefundAppService;
|
||||
import com.openhis.web.chargemanage.dto.EncounterPatientPaymentDto;
|
||||
import com.openhis.web.chargemanage.dto.RefundItemDto;
|
||||
import com.openhis.web.chargemanage.mapper.OutpatientRefundAppMapper;
|
||||
|
||||
/**
|
||||
@@ -61,28 +57,19 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
||||
@Override
|
||||
public R<?> refundPayment(List<Long> paymentIdList) {
|
||||
|
||||
List<RefundItemDto> refundItemList = outpatientRefundAppMapper.selectRefundItem(paymentIdList, CommonConstants.TableName.MED_MEDICATION_REQUEST,
|
||||
CommonConstants.TableName.WOR_SERVICE_REQUEST, CommonConstants.TableName.WOR_DEVICE_REQUEST,
|
||||
CommonConstants.Common.THREE);
|
||||
|
||||
// 医生同意退费
|
||||
// 查询所有的chargeid,对应生成一个负的chargeitem
|
||||
// 根据每个 chargeitem判断对应的服务,药品,耗材是否已发放执行
|
||||
// 若已发放/执行需要对应的发药人/执行人审批(药品耗材需要先退药)
|
||||
for (Long paymentId : paymentIdList) {
|
||||
// 根据支付id获取对应收费项目的id列表
|
||||
List<Long> chargeItemIdList = paymentReconciliationService.getChargeItemIdListByPayment(paymentId);
|
||||
if (chargeItemIdList == null) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null));
|
||||
}
|
||||
|
||||
// 根据收费项目id列表获取收费信息
|
||||
List<ChargeItem> chargeItemList = chargeItemService.getChargeItemInfo(chargeItemIdList);
|
||||
// 根据支付id获取对应收费项目的id列表
|
||||
List<Long> chargeItemIdList = paymentReconciliationService.getChargeItemIdListByPayment(paymentIdList);
|
||||
|
||||
List<String> prescriptionNoList =
|
||||
chargeItemList.stream().map(ChargeItem::getPrescriptionNo).collect(Collectors.toList());
|
||||
//根据收费项目id列表查询退费项
|
||||
List<RefundItemDto> refundItemList = outpatientRefundAppMapper.selectRefundItem(chargeItemIdList,
|
||||
CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_SERVICE_REQUEST,
|
||||
CommonConstants.TableName.WOR_DEVICE_REQUEST, CommonConstants.Common.THREE);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ 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.enums.PractitionerRoles;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
@@ -142,7 +142,7 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
||||
new HashSet<>(Arrays.asList("name", "py_str", "wb_str")), null);
|
||||
IPage<PractitionerMetadata> practitionerMetadataPage =
|
||||
outpatientRegistrationAppMapper.getPractitionerMetadataPage(new Page<>(pageNo, pageSize), locationId,
|
||||
PractitionerRole.DOCTOR.getCode(), queryWrapper);
|
||||
PractitionerRoles.DOCTOR.getCode(), queryWrapper);
|
||||
practitionerMetadataPage.getRecords().forEach(e -> {
|
||||
// 性别
|
||||
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
|
||||
@@ -36,14 +36,14 @@ public interface OutpatientRefundAppMapper {
|
||||
/**
|
||||
* 查询退费项目
|
||||
*
|
||||
* @param paymentIdList 支付编号列表
|
||||
* @param chargeItemIdList 收费项列表
|
||||
* @param medMedicationRequest 药品请求表
|
||||
* @param worServiceRequest 服务请求表
|
||||
* @param worDeviceRequest 耗材请求表
|
||||
* @param three 用于字符截位
|
||||
* @return 退费项目列表
|
||||
*/
|
||||
List<RefundItemDto> selectRefundItem(@Param("paymentIdList") List<Long> paymentIdList,
|
||||
List<RefundItemDto> selectRefundItem(@Param("chargeItemIdList") List<Long> chargeItemIdList,
|
||||
@Param("medMedicationRequest") String medMedicationRequest,
|
||||
@Param("worServiceRequest") String worServiceRequest, @Param("worDeviceRequest") String worDeviceRequest,
|
||||
@Param("three") Integer three);
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageSelParam;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageUpDto;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* 器材目录 service
|
||||
@@ -63,7 +64,7 @@ public interface IDeviceManageAppService {
|
||||
* @param id 查询条件
|
||||
* @return 器材目录查询结果
|
||||
*/
|
||||
R<?> getDeviceOne(@PathVariable("id") Long id);
|
||||
R<?> getDeviceOne(@RequestParam Long id);
|
||||
|
||||
/**
|
||||
* 器材目录停用
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.openhis.web.datadictionary.appservice;
|
||||
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.domain.DeviceDefinition;
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageUpDto;
|
||||
import com.openhis.web.datadictionary.dto.ItemUpFromDirectoryDto;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageUpDto;
|
||||
|
||||
/**
|
||||
@@ -12,11 +16,26 @@ import com.openhis.web.datadictionary.dto.MedicationManageUpDto;
|
||||
public interface IItemDefinitionService {
|
||||
|
||||
/**
|
||||
* 添加药品的项目定价
|
||||
* 添加药品/器材/诊疗的项目定价
|
||||
*
|
||||
* @param medicationManageUpDto 药品目录信息
|
||||
* @param medicationDetail 药品信息
|
||||
* @param itemUpFromDirectoryDto 药品/器材/诊疗目录信息
|
||||
*/
|
||||
boolean addItem(MedicationManageUpDto medicationManageUpDto, MedicationDetail medicationDetail);
|
||||
boolean addItem(ItemUpFromDirectoryDto itemUpFromDirectoryDto);
|
||||
|
||||
|
||||
// /**
|
||||
// * 添加器材的项目定价
|
||||
// *
|
||||
// * @param deviceManageUpDto 器材目录信息
|
||||
// * @param deviceDefinition 器材信息
|
||||
// */
|
||||
// boolean addItem(ItemUpFromDirectoryDto itemUpFromDirectoryDto, DeviceDefinition deviceDefinition);
|
||||
//
|
||||
/**
|
||||
* 修改项目定价表
|
||||
*
|
||||
* @param chargeItemDefinition 项目定价表信息
|
||||
*/
|
||||
boolean updateItem(ChargeItemDefinition chargeItemDefinition);
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.openhis.web.datadictionary.dto.MedicationSearchParam;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
@@ -32,14 +33,11 @@ public interface IMedicationManageAppService {
|
||||
* 药品目录查询
|
||||
*
|
||||
* @param searchKey 查询条件
|
||||
* @param ybMatchFlag 查询条件-是否对码
|
||||
* @param statusEnum 查询条件-状态
|
||||
* @param categoryCode 查询条件-药品分类
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return 药品目录查询结果
|
||||
*/
|
||||
R<?> getMedicationList(String searchKey, Integer ybMatchFlag, Integer statusEnum, String categoryCode,
|
||||
R<?> getMedicationList(MedicationSearchParam medicationSearchParam,String searchKey,
|
||||
Integer pageNo, Integer pageSize, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,10 +13,11 @@ import java.util.stream.Stream;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.openhis.administration.domain.Supplier;
|
||||
import com.openhis.administration.service.ISupplierService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@@ -25,8 +26,11 @@ 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.MessageUtils;
|
||||
import com.core.common.core.domain.entity.SysDictData;
|
||||
import com.core.common.utils.*;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.core.system.service.ISysDictTypeService;
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.domain.DeviceDefinition;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
import com.openhis.administration.mapper.DeviceDefinitionMapper;
|
||||
@@ -34,20 +38,16 @@ import com.openhis.administration.service.IDeviceDefinitionService;
|
||||
import com.openhis.administration.service.IOrganizationService;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.DeviceCategory;
|
||||
import com.openhis.common.enums.AssignSeqEnum;
|
||||
import com.openhis.common.enums.OrganizationType;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.enums.Whether;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.datadictionary.appservice.IDeviceManageAppService;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageDto;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageInitDto;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageSelParam;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageUpDto;
|
||||
import com.openhis.web.datadictionary.appservice.IItemDefinitionService;
|
||||
import com.openhis.web.datadictionary.dto.*;
|
||||
import com.openhis.web.datadictionary.mapper.DeviceManageMapper;
|
||||
import com.openhis.web.doctorstation.dto.AdviceBaseDto;
|
||||
|
||||
/**
|
||||
* 器材目录 impl
|
||||
@@ -70,6 +70,18 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
||||
@Resource
|
||||
DeviceManageMapper deviceManageMapper;
|
||||
|
||||
@Autowired
|
||||
private ISysDictTypeService sysDictTypeService;
|
||||
|
||||
@Autowired
|
||||
private IItemDefinitionService itemDefinitionServic;
|
||||
|
||||
@Autowired
|
||||
private ISupplierService supplierService;
|
||||
|
||||
@Autowired(required = false)
|
||||
AssignSeqUtil assignSeqUtil;
|
||||
|
||||
/**
|
||||
* 器材目录初始化
|
||||
*
|
||||
@@ -77,25 +89,52 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
||||
*/
|
||||
@Override
|
||||
public R<?> getDeviceManageInit() {
|
||||
|
||||
DeviceManageInitDto deviceManageInitDto = new DeviceManageInitDto();
|
||||
|
||||
// 获取状态
|
||||
List<DeviceManageInitDto.statusEnumOption> statusEnumOptions = Stream.of(PublicationStatus.values())
|
||||
.map(status -> new DeviceManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
deviceManageInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
// 获取执行科室
|
||||
LambdaQueryWrapper<Organization> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(Organization::getTypeEnum, OrganizationType.HOSPITAL_DEPARTMENT);
|
||||
List<Organization> organizations = organizationService.list(queryWrapper);
|
||||
List<DeviceManageInitDto.exeOrganization> exeOrganizations = organizations.stream()
|
||||
.map(exeOrg -> new DeviceManageInitDto.exeOrganization(exeOrg.getId(), exeOrg.getName()))
|
||||
.collect(Collectors.toList());
|
||||
deviceManageInitDto.setExeOrganizations(exeOrganizations);
|
||||
// 获取分类
|
||||
List<DeviceManageInitDto.deviceCategory> deviceCategories = Stream.of(DeviceCategory.values())
|
||||
.map(category -> new DeviceManageInitDto.deviceCategory(category.getValue(), category.getInfo()))
|
||||
|
||||
// // 获取执行科室
|
||||
// LambdaQueryWrapper<Organization> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// queryWrapper.eq(Organization::getTypeEnum, OrganizationType.HOSPITAL_DEPARTMENT);
|
||||
// List<Organization> organizations = organizationService.list(queryWrapper);
|
||||
// List<DeviceManageInitDto.exeOrganization> exeOrganizations = organizations.stream()
|
||||
// .map(exeOrg -> new DeviceManageInitDto.exeOrganization(exeOrg.getId(), exeOrg.getName()))
|
||||
// .collect(Collectors.toList());
|
||||
// deviceManageInitDto.setExeOrganizations(exeOrganizations);
|
||||
// // 从枚举中获取器材分类
|
||||
// List<DeviceManageInitDto.deviceCategory> deviceCategories = Stream.of(DeviceCategory.values())
|
||||
// .map(category -> new DeviceManageInitDto.deviceCategory(category.getValue(), category.getInfo()))
|
||||
// .collect(Collectors.toList());
|
||||
// deviceManageInitDto.setDeviceCategories(deviceCategories);
|
||||
|
||||
// 获取器材
|
||||
List<SysDictData> deviceList =
|
||||
sysDictTypeService.selectDictDataByType(CommonConstants.DictName.DEVICE_CATEGORY_CODE);
|
||||
// 从字典中获取器材分类
|
||||
List<DeviceManageInitDto.dictCategoryCode> deviceCategories = deviceList.stream()
|
||||
.map(category -> new DeviceManageInitDto.dictCategoryCode(category.getDictValue(), category.getDictLabel()))
|
||||
.collect(Collectors.toList());
|
||||
deviceManageInitDto.setDeviceCategories(deviceCategories);
|
||||
|
||||
// 获取医保是否对码
|
||||
List<DeviceManageInitDto.statusEnumOption> statusYBWeatherOption = Stream.of(Whether.values())
|
||||
.map(status -> new DeviceManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
deviceManageInitDto.setStatusYBWeatherOptions(statusYBWeatherOption);
|
||||
|
||||
// 查询供应商列表
|
||||
List<Supplier> supplierList = supplierService.getList();
|
||||
// 供应商信息
|
||||
List<DeviceManageInitDto.supplierListOption> supplierListOptions = supplierList.stream()
|
||||
.map(supplier -> new DeviceManageInitDto.supplierListOption(supplier.getId(), supplier.getName()))
|
||||
.collect(Collectors.toList());
|
||||
deviceManageInitDto.setSupplierListOptions(supplierListOptions);
|
||||
|
||||
return R.ok(deviceManageInitDto);
|
||||
}
|
||||
|
||||
@@ -114,22 +153,12 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// // 构建查询条件
|
||||
// QueryWrapper<DeviceDefinition> queryWrapper = HisQueryUtils.buildQueryWrapper(deviceManageSelParam, searchKey,
|
||||
// new HashSet<>(Arrays.asList("bus_no", "name", "py_str", "wb_str")), request);
|
||||
// // 设置排序
|
||||
// queryWrapper.orderByAsc("bus_no");
|
||||
//
|
||||
// // 分页查询
|
||||
// Page<DeviceManageDto> deviceManagePage =
|
||||
// HisPageUtils.selectPage(deviceDefinitionMapper, queryWrapper, pageNo, pageSize, DeviceManageDto.class);
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<DeviceManageDto> queryWrapper = HisQueryUtils.buildQueryWrapper(deviceManageSelParam, searchKey,
|
||||
new HashSet<>(Arrays.asList("bus_no", "name", "py_str", "wb_str")), request);
|
||||
|
||||
// 分页查询
|
||||
IPage<DeviceManageDto> deviceManagePage =
|
||||
IPage<DeviceManageDto> deviceManagePage =
|
||||
deviceManageMapper.getDevicePage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
|
||||
deviceManagePage.getRecords().forEach(e -> {
|
||||
@@ -142,7 +171,8 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
||||
// 过敏标记枚举类回显赋值
|
||||
e.setAllergenFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getAllergenFlag()));
|
||||
// 器材分类
|
||||
e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(DeviceCategory.class, e.getCategoryEnum()));
|
||||
// e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(DeviceCategory.class, e.getCategoryEnum()));
|
||||
|
||||
// 器材状态
|
||||
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(PublicationStatus.class, e.getStatusEnum()));
|
||||
});
|
||||
@@ -161,11 +191,24 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
||||
|
||||
DeviceDefinition deviceDefinition = new DeviceDefinition();
|
||||
BeanUtils.copyProperties(deviceManageDto, deviceDefinition);
|
||||
// 拼音码
|
||||
deviceDefinition.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(deviceDefinition.getName()));
|
||||
// 五笔码
|
||||
deviceDefinition.setWbStr(ChineseConvertUtils.toWBFirstLetter(deviceDefinition.getName()));
|
||||
|
||||
// 更新器材信息
|
||||
return deviceDefinitionService.updateById(deviceDefinition)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
if (deviceDefinitionService.updateById(deviceDefinition)) {
|
||||
ChargeItemDefinition chargeItemDefinition = new ChargeItemDefinition();
|
||||
chargeItemDefinition.setYbType(deviceManageDto.getItemTypeCode()).setTypeCode(deviceManageDto.getTypeCode())
|
||||
.setInstanceTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION)
|
||||
.setInstanceId(deviceDefinition.getId());
|
||||
|
||||
// 更新价格表
|
||||
return itemDefinitionServic.updateItem(chargeItemDefinition)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
return R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -175,10 +218,14 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
||||
* @return 器材目录查询结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> getDeviceOne(@PathVariable("id") Long id) {
|
||||
public R<?> getDeviceOne(@RequestParam Long id) {
|
||||
|
||||
// 获取租户ID
|
||||
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
// 根据ID查询【器材目录】
|
||||
DeviceDefinition byId = deviceDefinitionService.getById(id);
|
||||
return R.ok(byId);
|
||||
DeviceManageDto deviceManageDto = deviceManageMapper.getOne(id, tenantId);
|
||||
|
||||
return R.ok(deviceManageDto);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -196,7 +243,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
||||
for (Long detail : ids) {
|
||||
DeviceDefinition deviceDefinition = new DeviceDefinition();
|
||||
deviceDefinition.setId(detail);
|
||||
deviceDefinition.setStatusEnum(PublicationStatus.RETIRED);
|
||||
deviceDefinition.setStatusEnum(PublicationStatus.RETIRED.getValue());
|
||||
DeviceDefinitionList.add(deviceDefinition);
|
||||
}
|
||||
|
||||
@@ -221,7 +268,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
||||
for (Long detail : ids) {
|
||||
DeviceDefinition DeviceDefinition = new DeviceDefinition();
|
||||
DeviceDefinition.setId(detail);
|
||||
DeviceDefinition.setStatusEnum(PublicationStatus.ACTIVE);
|
||||
DeviceDefinition.setStatusEnum(PublicationStatus.ACTIVE.getValue());
|
||||
DeviceDefinitionList.add(DeviceDefinition);
|
||||
}
|
||||
|
||||
@@ -242,10 +289,32 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
||||
DeviceDefinition deviceDefinition = new DeviceDefinition();
|
||||
BeanUtils.copyProperties(deviceManageUpDto, deviceDefinition);
|
||||
|
||||
// 使用10位数基础采番
|
||||
String code = assignSeqUtil.getSeq(AssignSeqEnum.DEVICE_NUM.getPrefix(), 10);
|
||||
deviceDefinition.setBusNo(code);
|
||||
// 拼音码
|
||||
deviceDefinition.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(deviceDefinition.getName()));
|
||||
// 五笔码
|
||||
deviceDefinition.setWbStr(ChineseConvertUtils.toWBFirstLetter(deviceDefinition.getName()));
|
||||
|
||||
// 新增外来器材目录
|
||||
deviceDefinition.setStatusEnum(PublicationStatus.DRAFT);
|
||||
return deviceDefinitionService.addDevice(deviceDefinition)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||
deviceDefinition.setStatusEnum(PublicationStatus.DRAFT.getValue());
|
||||
|
||||
if (deviceDefinitionService.addDevice(deviceDefinition)) {
|
||||
ItemUpFromDirectoryDto itemUpFromDirectoryDto = new ItemUpFromDirectoryDto();
|
||||
BeanUtils.copyProperties(deviceManageUpDto, itemUpFromDirectoryDto);
|
||||
itemUpFromDirectoryDto.setTypeCode(deviceManageUpDto.getItemTypeCode())
|
||||
.setInstanceTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION)
|
||||
.setEffectiveStart(DateUtils.getNowDate()).setStatusEnum(PublicationStatus.ACTIVE.getValue())
|
||||
.setConditionFlag(Whether.YES.getValue()).setChargeName(deviceManageUpDto.getName())
|
||||
.setInstanceId(deviceDefinition.getId())
|
||||
.setPrice(deviceManageUpDto.getRetailPrice());
|
||||
|
||||
return itemDefinitionServic.addItem(itemUpFromDirectoryDto)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||
}
|
||||
|
||||
return R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,13 @@ package com.openhis.web.datadictionary.appservice.impl;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.openhis.administration.domain.DeviceDefinition;
|
||||
import com.openhis.common.enums.ConditionCode;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageUpDto;
|
||||
import com.openhis.web.datadictionary.dto.ItemUpFromDirectoryDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -34,57 +41,50 @@ public class ItemDefinitionServiceImpl implements IItemDefinitionService {
|
||||
@Autowired
|
||||
IChargeItemDefDetailService chargeItemDefDetailService;
|
||||
|
||||
|
||||
/**
|
||||
* 添加项目定价
|
||||
* 添加药品/器材/诊疗的项目定价
|
||||
*
|
||||
* @param medicationManageUpDto 药品目录信息
|
||||
* @param medicationDetail 药品信息
|
||||
* @param itemUpFromDirectoryDto 药品/器材/诊疗目录信息
|
||||
*/
|
||||
@Override
|
||||
public boolean addItem(MedicationManageUpDto medicationManageUpDto, MedicationDetail medicationDetail) {
|
||||
public boolean addItem(ItemUpFromDirectoryDto itemUpFromDirectoryDto) {
|
||||
|
||||
|
||||
ChargeItemDefinition chargeItemDefinition = new ChargeItemDefinition();
|
||||
chargeItemDefinition.setChargeName(medicationDetail.getName())
|
||||
.setStatusEnum(PublicationStatus.ACTIVE.getValue())
|
||||
.setInstanceTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION)
|
||||
.setInstanceId(medicationDetail.getMedicationDefId()).setEffectiveStart(DateUtils.getNowDate())
|
||||
// 机构ID
|
||||
// .setOrgId(SecurityUtils.getLoginUser().getOrgId())
|
||||
.setOrgId(1l)// todo 没数据先写死
|
||||
// 财务类别
|
||||
.setTypeCode(medicationManageUpDto.getMinimalFee())
|
||||
// 医保类别
|
||||
.setYbType(medicationManageUpDto.getYbType()).setConditionFlag(Whether.YES.getValue())
|
||||
.setPrice(medicationManageUpDto.getRetailPrice());
|
||||
BeanUtils.copyProperties(itemUpFromDirectoryDto, chargeItemDefinition);
|
||||
|
||||
boolean insertCIDSuccess = chargeItemDefinitionService.save(chargeItemDefinition);
|
||||
|
||||
if (insertCIDSuccess) {
|
||||
List<ChargeItemDefDetail> shargeItemDefDetails = new ArrayList<>();
|
||||
//插入购入价
|
||||
ChargeItemDefDetail chargeItemDefDetail1 = new ChargeItemDefDetail();
|
||||
chargeItemDefDetail1.setDefinitionId(chargeItemDefinition.getId())
|
||||
// 单位+批次(unit,pici) 用,符号拼装
|
||||
.setConditionCode(StringUtils.joinStrings(
|
||||
medicationManageUpDto.getDoseUnitCode_dictText() + "," + medicationManageUpDto.getLotNumber()))
|
||||
// 条件:采购
|
||||
.setConditionCode(ConditionCode.PROCUREMENT.getCode())
|
||||
// 购入价
|
||||
.setAmount(medicationManageUpDto.getPurchasePrice());
|
||||
|
||||
.setAmount(itemUpFromDirectoryDto.getPurchasePrice());
|
||||
shargeItemDefDetails.add(chargeItemDefDetail1);
|
||||
//插入零售价
|
||||
ChargeItemDefDetail chargeItemDefDetail2 = new ChargeItemDefDetail();
|
||||
chargeItemDefDetail2.setDefinitionId(chargeItemDefinition.getId())
|
||||
// 单位+批次(unit,pici) 用,符号拼装
|
||||
.setConditionCode(StringUtils.joinStrings(
|
||||
medicationManageUpDto.getDoseUnitCode_dictText() + "," + medicationManageUpDto.getLotNumber()))
|
||||
// 条件:单位
|
||||
.setConditionCode(ConditionCode.UNIT.getCode())
|
||||
//单位枚举
|
||||
.setConditionValue(itemUpFromDirectoryDto.getUnitCode())
|
||||
// 零售价
|
||||
.setAmount(medicationManageUpDto.getRetailPrice());
|
||||
.setAmount(itemUpFromDirectoryDto.getRetailPrice());
|
||||
|
||||
shargeItemDefDetails.add(chargeItemDefDetail2);
|
||||
|
||||
//插入最高零售价
|
||||
ChargeItemDefDetail chargeItemDefDetail3 = new ChargeItemDefDetail();
|
||||
chargeItemDefDetail3.setDefinitionId(chargeItemDefinition.getId())
|
||||
// 单位+批次(unit,pici) 用,符号拼装
|
||||
.setConditionCode(StringUtils.joinStrings(
|
||||
medicationManageUpDto.getDoseUnitCode_dictText() + "," + medicationManageUpDto.getLotNumber()))
|
||||
// 条件:限制
|
||||
.setConditionCode(ConditionCode.LIMIT.getCode())
|
||||
// 最高零售价
|
||||
.setAmount(medicationManageUpDto.getMaximumRetailPrice());
|
||||
.setAmount(itemUpFromDirectoryDto.getMaximumRetailPrice());
|
||||
|
||||
shargeItemDefDetails.add(chargeItemDefDetail3);
|
||||
|
||||
@@ -94,4 +94,23 @@ public class ItemDefinitionServiceImpl implements IItemDefinitionService {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改项目定价表
|
||||
*
|
||||
* @param chargeItemDefinition 项目定价表信息
|
||||
*/
|
||||
@Override
|
||||
public boolean updateItem(ChargeItemDefinition chargeItemDefinition) {
|
||||
|
||||
// 关联项目和代码位为key,更新表
|
||||
LambdaUpdateWrapper<ChargeItemDefinition> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(ChargeItemDefinition::getInstanceId, chargeItemDefinition.getInstanceId());
|
||||
updateWrapper.eq(ChargeItemDefinition::getInstanceTable, chargeItemDefinition.getInstanceTable())
|
||||
.set(ChargeItemDefinition::getYbType, chargeItemDefinition.getYbType())
|
||||
.set(ChargeItemDefinition::getTypeCode, chargeItemDefinition.getTypeCode());
|
||||
|
||||
return chargeItemDefinitionService.update(null, updateWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
package com.openhis.web.datadictionary.appservice.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
@@ -11,31 +13,30 @@ import java.util.stream.Stream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.core.common.utils.*;
|
||||
import com.openhis.web.datadictionary.dto.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
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.core.domain.entity.SysDictData;
|
||||
import com.core.common.utils.ChineseConvertUtils;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.core.common.utils.poi.ExcelUtil;
|
||||
import com.core.system.service.ISysDictTypeService;
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.domain.Supplier;
|
||||
import com.openhis.administration.service.ISupplierService;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.ApplicableScope;
|
||||
import com.openhis.common.enums.PermissionLimit;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.enums.Whether;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.medication.domain.MedicationDefinition;
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
@@ -43,9 +44,6 @@ import com.openhis.medication.service.IMedicationDefinitionService;
|
||||
import com.openhis.medication.service.IMedicationService;
|
||||
import com.openhis.web.datadictionary.appservice.IItemDefinitionService;
|
||||
import com.openhis.web.datadictionary.appservice.IMedicationManageAppService;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageDto;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageInitDto;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageUpDto;
|
||||
import com.openhis.web.datadictionary.mapper.MedicationManageSearchMapper;
|
||||
|
||||
/**
|
||||
@@ -74,6 +72,9 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
@Autowired
|
||||
private IItemDefinitionService itemDefinitionServic;
|
||||
|
||||
@Autowired(required = false)
|
||||
AssignSeqUtil assignSeqUtil;
|
||||
|
||||
/**
|
||||
* 药品目录初始化
|
||||
*
|
||||
@@ -117,12 +118,25 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
.map(status -> new MedicationManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 拆分属性
|
||||
List<MedicationManageInitDto.statusEnumOption> partAttributeEnumOptions = Stream.of(SplitPropertyCode.values())
|
||||
.map(status -> new MedicationManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 住院临时医嘱拆分属性的枚举
|
||||
List<MedicationManageInitDto.statusEnumOption> tempOrderSplitPropertyOptions =
|
||||
Stream.of(TempOrderSplitPropertyCode.values())
|
||||
.map(status -> new MedicationManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
medicationManageInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
medicationManageInitDto.setDomainFlagOptions(domainEnumOptions);
|
||||
medicationManageInitDto.setSupplierListOptions(supplierListOptions);
|
||||
medicationManageInitDto.setMedicationCategoryCodeOptions(medicationCategories);
|
||||
medicationManageInitDto.setStatusWeatherOptions(statusWeatherOption);
|
||||
medicationManageInitDto.setStatusRestrictedOptions(statusRestrictedOptions);
|
||||
medicationManageInitDto.setPartAttributeEnumOptions(partAttributeEnumOptions);
|
||||
medicationManageInitDto.setTempOrderSplitPropertyEnumOptions(tempOrderSplitPropertyOptions);
|
||||
|
||||
return R.ok(medicationManageInitDto);
|
||||
}
|
||||
@@ -137,26 +151,19 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
* @return 药品目录查询结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> getMedicationList(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "ybMatchFlag", defaultValue = "-1") Integer ybMatchFlag,
|
||||
@RequestParam(value = "statusEnum", defaultValue = "-1") Integer statusEnum,
|
||||
@RequestParam(value = "categoryCode", defaultValue = "") String categoryCode,
|
||||
public R<?> getMedicationList(MedicationSearchParam medicationSearchParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 分页设置
|
||||
Integer offset = (pageNo - 1) * pageSize;
|
||||
// 获取租户ID
|
||||
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
// 查询药品目录列表
|
||||
List<MedicationManageDto> medicationDetailList = medicationManageSearchMapper.getPage(searchKey, ybMatchFlag,
|
||||
statusEnum, categoryCode, tenantId, pageSize, offset);
|
||||
// 查询总记录数
|
||||
long total =
|
||||
medicationManageSearchMapper.getPageCount(searchKey, ybMatchFlag, statusEnum, categoryCode, tenantId);
|
||||
// 创建Page对象并设置属性
|
||||
Page<MedicationManageDto> medicationManageDtoPage = new Page<>(pageNo, pageSize, total);
|
||||
medicationManageDtoPage.setRecords(medicationDetailList);
|
||||
// 构建查询条件
|
||||
QueryWrapper<MedicationManageDto> queryWrapper = HisQueryUtils.buildQueryWrapper(medicationSearchParam,
|
||||
searchKey, new HashSet<>(Arrays.asList("name", "name_en", "merchandise_name", "bus_no", "py_str", "wb_str",
|
||||
"merchandise_py_str", "merchandise_wb_str")),
|
||||
null);
|
||||
|
||||
IPage<MedicationManageDto> medicationManageDtoPage =
|
||||
medicationManageSearchMapper.getPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
|
||||
// 枚举类回显赋值
|
||||
medicationManageDtoPage.getRecords().forEach(e -> {
|
||||
@@ -185,7 +192,12 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
e.setAntibioticFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getAntibioticFlag()));
|
||||
// 基药标识
|
||||
e.setBasicFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getBasicFlag()));
|
||||
|
||||
// 拆分分属性
|
||||
e.setPartAttributeEnum_enumText(
|
||||
EnumUtils.getInfoByValue(SplitPropertyCode.class, e.getPartAttributeEnum()));
|
||||
// 住院临时医嘱拆分属性
|
||||
e.setThoPartAttributeEnum_enumText(
|
||||
EnumUtils.getInfoByValue(TempOrderSplitPropertyCode.class, e.getThoPartAttributeEnum()));
|
||||
// // 活动标记
|
||||
// e.setActiveFlag_enumText(EnumUtils.getInfoByValue(AccountStatus.class, e.getActiveFlag()));
|
||||
|
||||
@@ -207,6 +219,7 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
Medication medication = new Medication();
|
||||
BeanUtils.copyProperties(medicationManageUpDto, medication); // 子表信息
|
||||
BeanUtils.copyProperties(medicationManageUpDto, medicationDefinition);// 主表信息
|
||||
medicationDefinition.setId(medicationManageUpDto.getMedicationDefId());
|
||||
// 拼音码
|
||||
medicationDefinition.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(medicationDefinition.getName()));
|
||||
medicationDefinition
|
||||
@@ -216,10 +229,21 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
medicationDefinition
|
||||
.setMerchandiseWbStr(ChineseConvertUtils.toWBFirstLetter(medicationDefinition.getMerchandiseName()));
|
||||
|
||||
ChargeItemDefinition chargeItemDefinition = new ChargeItemDefinition();
|
||||
chargeItemDefinition.setYbType(medicationManageUpDto.getYbType())
|
||||
.setTypeCode(medicationManageUpDto.getTypeCode())
|
||||
.setInstanceTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION)
|
||||
.setInstanceId(medicationManageUpDto.getMedicationDefId());
|
||||
|
||||
// 更新子表药品信息
|
||||
if (medicationService.updateById(medication)) {
|
||||
|
||||
// 更新主表药品信息
|
||||
return medicationDefinitionService.updateById(medicationDefinition)
|
||||
boolean updateMedicationDefinition = medicationDefinitionService.updateById(medicationDefinition);
|
||||
// 更新价格表
|
||||
boolean updateChargeItemDefinition = itemDefinitionServic.updateItem(chargeItemDefinition);
|
||||
|
||||
return (updateMedicationDefinition && updateChargeItemDefinition)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"药品目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
} else {
|
||||
@@ -300,6 +324,9 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
|
||||
MedicationDetail medicationDetail = new MedicationDetail();
|
||||
BeanUtils.copyProperties(medicationManageUpDto, medicationDetail);
|
||||
// 使用10位数基础采番
|
||||
String code = assignSeqUtil.getSeq(AssignSeqEnum.MEDICATION_NUM.getPrefix(),10);
|
||||
medicationDetail.setBusNo(code);
|
||||
// 拼音码
|
||||
medicationDetail.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(medicationDetail.getName()));
|
||||
medicationDetail
|
||||
@@ -314,10 +341,21 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
|
||||
// 新增子表外来药品目录
|
||||
boolean insertMedicationSuccess = medicationService.addMedication(medicationDetail);
|
||||
// 添加药品成功后,添加相应的条件价格表信息
|
||||
boolean insertItemDefinitionSuccess = itemDefinitionServic.addItem(medicationManageUpDto, medicationDetail);
|
||||
ItemUpFromDirectoryDto itemUpFromDirectoryDto = new ItemUpFromDirectoryDto();
|
||||
BeanUtils.copyProperties(medicationManageUpDto, itemUpFromDirectoryDto);
|
||||
itemUpFromDirectoryDto.setInstanceId(medicationDetail.getMedicationDefId())
|
||||
.setStatusEnum(PublicationStatus.ACTIVE.getValue())
|
||||
.setInstanceTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION)
|
||||
.setEffectiveStart(DateUtils.getNowDate())
|
||||
.setOrgId(SecurityUtils.getLoginUser().getOrgId())
|
||||
.setConditionFlag(Whether.YES.getValue())
|
||||
.setChargeName(medicationDetail.getName())
|
||||
.setPrice(medicationManageUpDto.getRetailPrice());
|
||||
|
||||
return (insertMedicationSuccess || insertItemDefinitionSuccess)
|
||||
// 添加药品成功后,添加相应的条件价格表信息
|
||||
boolean insertItemDefinitionSuccess = itemDefinitionServic.addItem(itemUpFromDirectoryDto);
|
||||
|
||||
return (insertMedicationSuccess && insertItemDefinitionSuccess)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"药品目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||
} else {
|
||||
|
||||
@@ -118,12 +118,9 @@ public class DeviceManageController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-one")
|
||||
public R<?> getDeviceOne(@PathVariable("id") Long id) {
|
||||
public R<?> getDeviceOne(@RequestParam Long id) {
|
||||
|
||||
return deviceManageAppService.getDeviceOne(id);
|
||||
// // 根据ID查询【器材目录】
|
||||
// DeviceDefinition byId = iDeviceDefinitionService.getById(id);
|
||||
// return R.ok(byId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -137,13 +134,6 @@ public class DeviceManageController {
|
||||
|
||||
return deviceManageAppService.editDevice(deviceManageDto);
|
||||
|
||||
// DeviceDefinition DeviceDefinition = new DeviceDefinition();
|
||||
// BeanUtils.copyProperties(deviceManageDto, DeviceDefinition);
|
||||
//
|
||||
// // 更新器材信息
|
||||
// return iDeviceDefinitionService.updateById(DeviceDefinition)
|
||||
// ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
// : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -112,7 +112,7 @@ public class DiseaseManageController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-one")
|
||||
public R<?> getDiseaseOne(@PathVariable("id") Long id) {
|
||||
public R<?> getDiseaseOne(@RequestParam Long id) {
|
||||
DiseaseManageDto diseaseManageDto = new DiseaseManageDto();
|
||||
// 根据ID查询【病种目录】
|
||||
ConditionDefinition conditionDefinition = iConditionDefinitionService.getById(id);
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.openhis.web.datadictionary.dto.MedicationSearchParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -44,22 +45,18 @@ public class MedicationManageController {
|
||||
/**
|
||||
* 查询药品目录分页列表
|
||||
*
|
||||
* @param searchKey 查询条件
|
||||
* @param statusEnum 查询条件-状态
|
||||
* @param ybMatchFlag 查询条件-是否对码
|
||||
* @param categoryCode 查询条件-药品分类
|
||||
* @param medicationSearchParam 查询条件
|
||||
* @param searchKey 模糊查询条件
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-page")
|
||||
public R<?> getMedicationList(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "ybMatchFlag", defaultValue = "-1") Integer ybMatchFlag,
|
||||
@RequestParam(value = "statusEnum", defaultValue = "-1") Integer statusEnum,
|
||||
@RequestParam(value = "categoryCode", defaultValue = "") String categoryCode,
|
||||
public R<?> getMedicationList(
|
||||
MedicationSearchParam medicationSearchParam,@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
return medicationManageAppService.getMedicationList(searchKey, ybMatchFlag, statusEnum, categoryCode, pageNo,
|
||||
return medicationManageAppService.getMedicationList(medicationSearchParam,searchKey,pageNo,
|
||||
pageSize, request);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,14 +37,19 @@ public class DeviceManageDto {
|
||||
private String wbStr;
|
||||
|
||||
/** 器材分类 */
|
||||
private Integer categoryEnum;
|
||||
private String categoryEnum_enumText;
|
||||
@Dict(dictCode = "device_category_code")
|
||||
private String categoryCode;
|
||||
private String categoryCode_dictText;
|
||||
|
||||
/** 器材种类 */
|
||||
@Dict(dictCode = "device_type_code")
|
||||
private String typeCode;
|
||||
private String typeCode_dictText;
|
||||
|
||||
/** 包装单位 */
|
||||
@Dict(dictCode = "unit_code")
|
||||
private String unitCode;
|
||||
private String unitCode_dictText;
|
||||
|
||||
/** 包装规格 */
|
||||
private String size;
|
||||
@@ -53,7 +58,21 @@ public class DeviceManageDto {
|
||||
private BigDecimal partPercent;
|
||||
|
||||
/** 最小使用单位 */
|
||||
@Dict(dictCode = "unit_code")
|
||||
private String minUnitCode;
|
||||
private String minUnitCode_dictText;
|
||||
|
||||
/** 所属科室 */
|
||||
@Dict(dictTable = "adm_organization", dictCode = "id", dictText = "name")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
private String orgId_dictText;
|
||||
|
||||
/** 所在位置 */
|
||||
@Dict(dictTable = "adm_location", dictCode = "id", dictText = "name")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
private String locationId_dictText;
|
||||
|
||||
/** 产品型号 */
|
||||
private String modelNumber;
|
||||
@@ -63,7 +82,9 @@ public class DeviceManageDto {
|
||||
private String hvcmFlag_enumText;
|
||||
|
||||
/** 销售单位 */
|
||||
@Dict(dictCode = "unit_code")
|
||||
private String salesUnitCode;
|
||||
private String salesUnitCode_dictText;
|
||||
|
||||
/** 批准文号 */
|
||||
private String approvalNumber;
|
||||
@@ -84,10 +105,11 @@ public class DeviceManageDto {
|
||||
private String statusEnum_enumText;
|
||||
|
||||
/** 生产厂家 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 生产厂商文本 */
|
||||
private Long manufacturerText;
|
||||
private String manufacturerText;
|
||||
|
||||
/** 供应商 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@@ -101,12 +123,6 @@ public class DeviceManageDto {
|
||||
/** 适用范围 */
|
||||
private String jurisdiction;
|
||||
|
||||
/** 执行科室 */
|
||||
@Dict(dictTable = "adm_organization", dictCode = "id", dictText = "name")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long ruleId;
|
||||
private String ruleId_dictText;
|
||||
|
||||
/** 器材版本 */
|
||||
private String version;
|
||||
|
||||
@@ -117,7 +133,23 @@ public class DeviceManageDto {
|
||||
private Integer allergenFlag;
|
||||
private String allergenFlag_enumText;
|
||||
|
||||
/** 售价 */
|
||||
private BigDecimal price;
|
||||
/** 财务类别 */
|
||||
@Dict(dictCode = "fin_type_code")
|
||||
private String itemTypeCode;
|
||||
private String itemTypeCode_dictText;
|
||||
|
||||
/** 医保类别 */
|
||||
@Dict(dictCode = "yb_type")
|
||||
private String ybType;
|
||||
private String ybType_dictText;
|
||||
|
||||
/** 购入价 */
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
/** 零售价 */
|
||||
private BigDecimal retailPrice;
|
||||
|
||||
/** 最高零售价 */
|
||||
private BigDecimal maximumRetailPrice;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.openhis.web.datadictionary.dto;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -16,8 +18,12 @@ import lombok.experimental.Accessors;
|
||||
@Accessors(chain = true)
|
||||
public class DeviceManageInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
private List<deviceCategory> deviceCategories;
|
||||
private List<dictCategoryCode> deviceCategories;
|
||||
private List<exeOrganization> exeOrganizations;
|
||||
// 供应商
|
||||
private List<supplierListOption> supplierListOptions;
|
||||
// 是/否 状态
|
||||
private List<statusEnumOption> statusYBWeatherOptions;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
@@ -48,6 +54,21 @@ public class DeviceManageInitDto {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 器材分类
|
||||
*/
|
||||
@Data
|
||||
public static class dictCategoryCode {
|
||||
private String value;
|
||||
private String info;
|
||||
private List<dictCategoryCode> children = new ArrayList<>();
|
||||
|
||||
public dictCategoryCode(String value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行机构
|
||||
*/
|
||||
@@ -61,4 +82,21 @@ public class DeviceManageInitDto {
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
@Data
|
||||
public static class supplierListOption {
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long value;
|
||||
private String label;
|
||||
|
||||
public supplierListOption(Long value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import lombok.experimental.Accessors;
|
||||
public class DeviceManageSelParam {
|
||||
|
||||
/** 器材分类 */
|
||||
private Integer categoryEnum;
|
||||
private String categoryCode;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
@@ -22,6 +22,4 @@ public class DeviceManageSelParam {
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 执行科室 */
|
||||
private Long ruleId;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import com.openhis.common.enums.DeviceCategory;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -26,7 +27,6 @@ public class DeviceManageUpDto {
|
||||
private Long id;
|
||||
|
||||
/** 编码 */
|
||||
@NotBlank(message = "器材编码不能为空")
|
||||
private String busNo;
|
||||
|
||||
/** 器材名称 */
|
||||
@@ -34,19 +34,14 @@ public class DeviceManageUpDto {
|
||||
private String name;
|
||||
|
||||
/** 器材名称拼音 */
|
||||
@NotBlank(message = "器材名称拼音不能为空")
|
||||
private String pyStr;
|
||||
|
||||
/** 器材五笔拼音 */
|
||||
@NotBlank(message = "器材五笔拼音不能为空")
|
||||
private String wbStr;
|
||||
|
||||
/** 器材分类 */
|
||||
@NotNull(message = "器材分类不能为空")
|
||||
// private DeviceCategory categoryEnum;
|
||||
private Integer categoryEnum;
|
||||
private String categoryEnum_enumText;
|
||||
|
||||
private String categoryCode;
|
||||
|
||||
/** 器材种类 */
|
||||
@NotBlank(message = "器材种类不能为空")
|
||||
@@ -68,12 +63,25 @@ public class DeviceManageUpDto {
|
||||
@NotBlank(message = "最小使用单位不能为空")
|
||||
private String minUnitCode;
|
||||
|
||||
/** 所属科室 */
|
||||
@NotNull(message = "所属科室不能为空")
|
||||
@Dict(dictTable = "adm_organization", dictCode = "id", dictText = "name")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
private String orgId_dictText;
|
||||
|
||||
/** 所在位置 */
|
||||
@NotNull(message = "所在位置不能为空")
|
||||
@Dict(dictTable = "adm_location", dictCode = "id", dictText = "name")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
private String locationId_dictText;
|
||||
|
||||
/** 产品型号 */
|
||||
@NotBlank(message = "产品型号不能为空")
|
||||
private String modelNumber;
|
||||
|
||||
/** 高值器材标志 */
|
||||
// @NotNull(message = "高值器材标志不能为空")
|
||||
private Integer hvcmFlag;
|
||||
|
||||
/** 销售单位 */
|
||||
@@ -85,21 +93,22 @@ public class DeviceManageUpDto {
|
||||
private String approvalNumber;
|
||||
|
||||
/** 医保标记 */
|
||||
// @NotNull(message = "医保标记不能为空")
|
||||
private Integer ybFlag;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 医保对码标记 */
|
||||
// @NotNull(message = "医保对码标记不能为空")
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 生产厂家 */
|
||||
@NotNull(message = "生产厂家不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 生产厂商文本 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private String manufacturerText;
|
||||
|
||||
/** 供应商 */
|
||||
@NotNull(message = "供应商不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@@ -112,21 +121,6 @@ public class DeviceManageUpDto {
|
||||
@NotBlank(message = "适用范围不能为空")
|
||||
private String jurisdiction;
|
||||
|
||||
/** 执行科室 */
|
||||
@NotNull(message = "执行科室不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long ruleId;
|
||||
|
||||
/** 归属科室 */
|
||||
@NotNull(message = "归属科室不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
|
||||
/** 所在位置 */
|
||||
@NotNull(message = "所在位置不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
|
||||
/** 器材版本 */
|
||||
private String version;
|
||||
|
||||
@@ -134,7 +128,6 @@ public class DeviceManageUpDto {
|
||||
private String substanceText;
|
||||
|
||||
/** 过敏标记 */
|
||||
// @NotNull(message = "过敏标记不能为空")
|
||||
private Integer allergenFlag;
|
||||
|
||||
/** 购入价 */
|
||||
@@ -149,10 +142,12 @@ public class DeviceManageUpDto {
|
||||
@NotNull(message = "最高零售价不能为空")
|
||||
private BigDecimal maximumRetailPrice;
|
||||
|
||||
/** 最小费用 */
|
||||
private String minimalFee;
|
||||
/** 财务类别 */
|
||||
@NotNull(message = "财务类别不能为空")
|
||||
private String itemTypeCode;
|
||||
|
||||
/** 医保类别 */
|
||||
@NotNull(message = "医保类别不能为空")
|
||||
private String ybType;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import com.openhis.common.enums.ActivityDefCategory;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
@@ -45,7 +46,9 @@ public class DiagnosisTreatmentDto {
|
||||
private String typeEnum_enumText;
|
||||
|
||||
/** 使用单位 */
|
||||
@Dict(dictCode = "rate_code")
|
||||
private String permittedUnitCode;
|
||||
private String permittedUnitCode_dictText;
|
||||
|
||||
/** 医保标记 */
|
||||
private Integer ybFlag;
|
||||
@@ -74,15 +77,38 @@ public class DiagnosisTreatmentDto {
|
||||
/** 规则id */
|
||||
private Integer ruleId;
|
||||
|
||||
/** 归属科室 */
|
||||
/** 所属科室 */
|
||||
@Dict(dictTable = "adm_organization", dictCode = "id", dictText = "name")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
private String orgId_dictText;
|
||||
|
||||
/** 所在位置 */
|
||||
@Dict(dictTable = "adm_location", dictCode = "id", dictText = "name")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
private String locationId_dictText;
|
||||
|
||||
/** 售价 */
|
||||
private BigDecimal price;
|
||||
|
||||
/** 财务类别 */
|
||||
@Dict(dictCode = "fin_type_code")
|
||||
private String typeCode;
|
||||
private String typeCode_dictText;
|
||||
|
||||
/** 医保类别 */
|
||||
@Dict(dictCode = "med_chrgitm_type")
|
||||
private String ybType;
|
||||
private String ybType_dictText;
|
||||
|
||||
/** 购入价 */
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
/** 零售价 */
|
||||
private BigDecimal retailPrice;
|
||||
|
||||
/** 最高零售价 */
|
||||
private BigDecimal maximumRetailPrice;
|
||||
|
||||
}
|
||||
|
||||
@@ -14,11 +14,12 @@ import lombok.experimental.Accessors;
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiagnosisTreatmentSelParam {
|
||||
|
||||
/** 目录类别 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 类型 */
|
||||
private String typeCode;
|
||||
private Integer typeEnum;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
@@ -5,11 +5,14 @@ import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import com.openhis.common.enums.ActivityDefCategory;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 诊疗目录分页更新
|
||||
*
|
||||
@@ -73,4 +76,24 @@ public class DiagnosisTreatmentUpDto {
|
||||
|
||||
/** 规则id */
|
||||
private Integer ruleId;
|
||||
|
||||
/** 财务类别 */
|
||||
@Dict(dictCode = "fin_type_code")
|
||||
private String itemTypeCode;
|
||||
private String itemTypeCode_dictText;
|
||||
|
||||
/** 医保类别 */
|
||||
@Dict(dictCode = "yb_type")
|
||||
private String ybType;
|
||||
private String ybType_dictText;
|
||||
|
||||
/** 购入价 */
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
/** 零售价 */
|
||||
private BigDecimal retailPrice;
|
||||
|
||||
/** 最高零售价 */
|
||||
private BigDecimal maximumRetailPrice;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 从目录添加定价表信息用的Dto
|
||||
*
|
||||
* @author liuhr
|
||||
* @date 2025/3/28
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ItemUpFromDirectoryDto {
|
||||
|
||||
/** 药品单位 */
|
||||
private String unitCode;
|
||||
|
||||
/** 购入价 */
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
/** 零售价 */
|
||||
private BigDecimal retailPrice;
|
||||
|
||||
/** 最高零售价 */
|
||||
private BigDecimal maximumRetailPrice;
|
||||
|
||||
/** 名称 */
|
||||
private String chargeName;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 机构ID */
|
||||
private Long orgId;
|
||||
|
||||
/** 代码 */
|
||||
private String instanceTable;
|
||||
|
||||
/** 关联项目 */
|
||||
private Long instanceId;
|
||||
|
||||
/** 有效时间开始 */
|
||||
private Date effectiveStart;
|
||||
|
||||
/** 财务类别 */
|
||||
private String typeCode;
|
||||
|
||||
/** 医保类别 */
|
||||
private String ybType;
|
||||
|
||||
/** 是否使用详细价格规则 */
|
||||
private Integer conditionFlag;
|
||||
|
||||
/** 基础价格 */
|
||||
private BigDecimal price;
|
||||
|
||||
/** 费用定价主键ID */
|
||||
private Long definitionId;
|
||||
|
||||
/** 条件 */
|
||||
private String conditionCode;
|
||||
|
||||
/** 命中值 */
|
||||
private String conditionValue;
|
||||
|
||||
/** 价格 */
|
||||
private BigDecimal amount;
|
||||
|
||||
}
|
||||
@@ -10,6 +10,8 @@ import com.openhis.common.annotation.Dict;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 药品目录Dto
|
||||
*
|
||||
@@ -129,7 +131,7 @@ public class MedicationManageDto {
|
||||
|
||||
/** 药品分类 */
|
||||
@Dict(dictCode = "med_category_code")
|
||||
private Integer categoryCode;
|
||||
private String categoryCode;
|
||||
private String categoryCode_dictText;
|
||||
|
||||
/** 商品名称 */
|
||||
@@ -142,7 +144,9 @@ public class MedicationManageDto {
|
||||
private String merchandiseWbStr;
|
||||
|
||||
/** 药品单位 */
|
||||
@Dict(dictCode = "unit_code")
|
||||
private String unitCode;
|
||||
private String unitCode_dictText;
|
||||
|
||||
/** 最小单位 */
|
||||
@Dict(dictCode = "unit_code")
|
||||
@@ -156,8 +160,9 @@ public class MedicationManageDto {
|
||||
private BigDecimal partPercent;
|
||||
|
||||
/** 剂量形式 */
|
||||
@Dict(dictCode = "dose_from_code")
|
||||
private Integer doseFrom;
|
||||
private String doseFrom_enumText;
|
||||
private String doseFrom_dictText;
|
||||
|
||||
/** 批准文号 */
|
||||
private String approvalNumber;
|
||||
@@ -185,8 +190,8 @@ public class MedicationManageDto {
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 供应商 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Dict(dictTable = "adm_supplier", dictCode = "id", dictText = "name")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long supplyId;
|
||||
private String supplyId_dictText;
|
||||
|
||||
@@ -233,13 +238,8 @@ public class MedicationManageDto {
|
||||
private Integer basicFlag;
|
||||
private String basicFlag_enumText;
|
||||
|
||||
/** 生产厂家名称 */
|
||||
private String manufacturerName;
|
||||
|
||||
/** 常规单位 */
|
||||
@Dict(dictCode = "unit_code")
|
||||
private String baseUnitCode;
|
||||
private String baseUnitCode_dictText;
|
||||
/** 生产厂商文本 */
|
||||
private String manufacturerText;
|
||||
|
||||
/** 当前库存数量(常规单位) */
|
||||
private String baseQuantity;
|
||||
@@ -256,5 +256,28 @@ public class MedicationManageDto {
|
||||
/** 单次最大用药频次 */
|
||||
private String maxRateCode;
|
||||
|
||||
/** 医保类别 */
|
||||
private String ybType;
|
||||
|
||||
/** 财务类别 */
|
||||
@Dict(dictCode = "fin_type_code")
|
||||
private String typeCode;
|
||||
private String typeCode_dictText;
|
||||
|
||||
/** 成分 */
|
||||
private String ingredient;
|
||||
|
||||
/** 购入价 */
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
/** 零售价 */
|
||||
private BigDecimal retailPrice;
|
||||
|
||||
/** 最高零售价 */
|
||||
private BigDecimal maximumRetailPrice;
|
||||
|
||||
/** 住院临时医嘱拆分属性 */
|
||||
private Integer thoPartAttributeEnum;
|
||||
private String thoPartAttributeEnum_enumText;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.openhis.web.datadictionary.dto;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -27,6 +29,10 @@ public class MedicationManageInitDto {
|
||||
private List<statusEnumOption> statusWeatherOptions;
|
||||
// 权限限制
|
||||
private List<statusEnumOption> statusRestrictedOptions;
|
||||
// 拆分属性
|
||||
private List<statusEnumOption> partAttributeEnumOptions;
|
||||
//住院临时医嘱拆分属性
|
||||
private List<statusEnumOption> tempOrderSplitPropertyEnumOptions;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
@@ -61,6 +67,8 @@ public class MedicationManageInitDto {
|
||||
*/
|
||||
@Data
|
||||
public static class supplierListOption {
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long value;
|
||||
private String label;
|
||||
|
||||
|
||||
@@ -86,7 +86,6 @@ public class MedicationManageUpDto {
|
||||
private String definition;
|
||||
|
||||
/** 药品编号 */
|
||||
@NotBlank(message = "药品编号不能为空")
|
||||
private String busNo;
|
||||
|
||||
/** 药品名称 */
|
||||
@@ -109,7 +108,7 @@ public class MedicationManageUpDto {
|
||||
private String wbStr;
|
||||
|
||||
/** 药品分类 */
|
||||
private Integer categoryCode;
|
||||
private String categoryCode;
|
||||
|
||||
/** 商品名称 */
|
||||
private String merchandiseName;
|
||||
@@ -121,7 +120,9 @@ public class MedicationManageUpDto {
|
||||
private String merchandiseWbStr;
|
||||
|
||||
/** 药品单位 */
|
||||
@Dict(dictCode = "unit_code")
|
||||
private String unitCode;
|
||||
private String unitCode_dictText;
|
||||
|
||||
/** 最小单位 */
|
||||
private String minUnitCode;
|
||||
@@ -136,7 +137,9 @@ public class MedicationManageUpDto {
|
||||
private BigDecimal partPercent;
|
||||
|
||||
/** 剂量形式 */
|
||||
@Dict(dictCode = "dose_from_code")
|
||||
private Integer doseFrom;
|
||||
private String doseFrom_dictText;
|
||||
|
||||
/** 批准文号 */
|
||||
private String approvalNumber;
|
||||
@@ -194,8 +197,10 @@ public class MedicationManageUpDto {
|
||||
/** 医保类别 */
|
||||
private String ybType;
|
||||
|
||||
/** 最小费用 */
|
||||
private String minimalFee;
|
||||
/** 财务类别 */
|
||||
@Dict(dictCode = "fin_type_code")
|
||||
private String typeCode;
|
||||
private String typeCode_dictText;
|
||||
|
||||
/** 单次最小用药频次 */
|
||||
private String minRateCode;
|
||||
@@ -205,6 +210,7 @@ public class MedicationManageUpDto {
|
||||
|
||||
/** 药品状态 */
|
||||
private Integer statusEnum;
|
||||
private String statusEnum_enumText;
|
||||
|
||||
/** 拆分属性 */
|
||||
private Integer partAttributeEnum;
|
||||
@@ -227,5 +233,17 @@ public class MedicationManageUpDto {
|
||||
/** 用量限定 */
|
||||
private BigDecimal usageLimit;
|
||||
|
||||
/** 系统类别???? */
|
||||
/** 抗生素分类 */
|
||||
@Dict(dictCode = "antibiotic_type_code")
|
||||
private String antibioticCode;
|
||||
private String antibioticCode_dictText;
|
||||
|
||||
/** 权限限制 */
|
||||
private Integer restrictedEnum;
|
||||
|
||||
/** 基药标识 */
|
||||
private Integer basicFlag;
|
||||
|
||||
/** 住院临时医嘱拆分属性 */
|
||||
private Integer thoPartAttributeEnum;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 药品查询信息
|
||||
*
|
||||
* @author liuhr
|
||||
* @date 2025/3/27
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class MedicationSearchParam {
|
||||
|
||||
/** 医保是否对码 */
|
||||
private Integer ybMatchFlag;
|
||||
/** 药品状态 */
|
||||
private Integer statusEnum;
|
||||
/** 药品分类 */
|
||||
private String categoryCode;
|
||||
}
|
||||
@@ -5,8 +5,10 @@ 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.datadictionary.dto.DeviceManageDto;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageDto;
|
||||
import com.openhis.web.outpatientmanage.dto.OutpatientInfusionPatientDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 器材目录
|
||||
@@ -14,6 +16,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
* @author Wuser
|
||||
* @date 2025/3/26
|
||||
*/
|
||||
@Repository
|
||||
public interface DeviceManageMapper {
|
||||
|
||||
/**
|
||||
@@ -27,4 +30,13 @@ public interface DeviceManageMapper {
|
||||
@Param("page") Page<DeviceManageDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<DeviceManageDto> queryWrapper);
|
||||
|
||||
/**
|
||||
* 器材详情
|
||||
*
|
||||
* @param id 器材ID
|
||||
* @param tenantId 租户
|
||||
* @return
|
||||
*/
|
||||
DeviceManageDto getOne(@Param("id") Long id, @Param("tenantId") Integer tenantId);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,11 @@ package com.openhis.web.datadictionary.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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.outpatientmanage.dto.OutpatientInfusionRecordDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -17,35 +22,18 @@ import com.openhis.web.datadictionary.dto.MedicationManageDto;
|
||||
*/
|
||||
@Repository
|
||||
public interface MedicationManageSearchMapper extends BaseMapper<ChargeItemDefinition> {
|
||||
/**
|
||||
* 药品目录分页查询
|
||||
*
|
||||
* @param searchKey 模糊查询条件
|
||||
* @param ybMatchFlag 是否对码
|
||||
* @param statusEnum 状态
|
||||
* @param categoryCode 分类
|
||||
* @param tenantId 租户
|
||||
* @param pageSize
|
||||
* @param offset
|
||||
* @return
|
||||
*/
|
||||
List<MedicationManageDto> getPage(@Param("searchKey") String searchKey, @Param("ybMatchFlag") Integer ybMatchFlag,
|
||||
@Param("statusEnum") Integer statusEnum, @Param("categoryCode") String categoryCode,
|
||||
@Param("tenantId") Integer tenantId, @Param("pageSize") Integer pageSize, @Param("offset") Integer offset);
|
||||
|
||||
/**
|
||||
* 药品目录分页查询
|
||||
*
|
||||
* @param searchKey 模糊查询条件
|
||||
* @param ybMatchFlag 是否对码
|
||||
* @param statusEnum 状态
|
||||
* @param categoryCode 分类
|
||||
* @param tenantId 租户
|
||||
*
|
||||
* @param page 分页
|
||||
* @param queryWrapper 查询条件
|
||||
* @return
|
||||
*/
|
||||
Long getPageCount(@Param("searchKey") String searchKey, @Param("ybMatchFlag") Integer ybMatchFlag,
|
||||
@Param("statusEnum") Integer statusEnum, @Param("categoryCode") String categoryCode,
|
||||
@Param("tenantId") Integer tenantId);
|
||||
IPage<MedicationManageDto> getPage(
|
||||
@Param("page") Page<OutpatientInfusionRecordDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<MedicationManageDto> queryWrapper);
|
||||
|
||||
|
||||
/**
|
||||
* 药品详情
|
||||
|
||||
@@ -98,70 +98,114 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
|
||||
// 费用定价子表信息
|
||||
List<AdvicePriceDto> childCharge = doctorStationAdviceAppMapper
|
||||
.getChildCharge(ConditionCode.UNIT_PRODUCT_BATCH_NUM.getInfo(), chargeItemDefinitionIdList);
|
||||
.getChildCharge(ConditionCode.UNIT_PRODUCT_BATCH_NUM.getCode(), chargeItemDefinitionIdList);
|
||||
// 费用定价主表信息
|
||||
List<AdvicePriceDto> mainCharge = doctorStationAdviceAppMapper.getMainCharge(chargeItemDefinitionIdList);
|
||||
// 药品和耗材
|
||||
List<AdviceBaseDto> medicationAndDeviceList = adviceBaseDtoList.stream()
|
||||
.filter(e -> CommonConstants.TableName.MED_MEDICATION_DEFINITION.equals(e.getAdviceTableName())
|
||||
|| CommonConstants.TableName.ADM_DEVICE_DEFINITION.equals(e.getAdviceTableName()))
|
||||
.collect(Collectors.toList());
|
||||
// 药品和耗材-赋值
|
||||
|
||||
String unitCode = ""; // 包装单位
|
||||
String minUnitCode; // 小单位
|
||||
Long chargeItemDefinitionId; // 费用定价主表ID
|
||||
for (AdviceBaseDto baseDto : medicationAndDeviceList) {
|
||||
// 每一条医嘱的库存集合信息
|
||||
List<AdviceInventoryDto> inventoryList =
|
||||
adviceInventory.stream().filter(e -> baseDto.getAdviceDefinitionId().equals(e.getItemId())
|
||||
&& baseDto.getAdviceTableName().equals(e.getItemTable())).collect(Collectors.toList());
|
||||
// 库存信息
|
||||
baseDto.setInventoryList(inventoryList);
|
||||
|
||||
unitCode = baseDto.getUnitCode();
|
||||
minUnitCode = baseDto.getMinUnitCode();
|
||||
chargeItemDefinitionId = baseDto.getChargeItemDefinitionId();
|
||||
|
||||
List<AdvicePriceDto> priceDtoList = new ArrayList<>();
|
||||
// 库存信息里取 单位,产品批号 去匹配价格
|
||||
for (AdviceInventoryDto adviceInventoryDto : inventoryList) {
|
||||
Long finalChargeItemDefinitionId = chargeItemDefinitionId;
|
||||
String finalUnitCode = unitCode;
|
||||
String finalMinUnitCode = minUnitCode;
|
||||
// 匹配包装单位
|
||||
List<AdvicePriceDto> advicePrice1 = childCharge.stream()
|
||||
.filter(e -> e.getDefinitionId().equals(finalChargeItemDefinitionId) && e.getConditionValue()
|
||||
.equals(String.format(CommonConstants.Common.COMMA_FORMAT, finalUnitCode,
|
||||
adviceInventoryDto.getLotNumber())))
|
||||
.peek(e -> e.setUnitCode(finalUnitCode)) // 设置 unitCode
|
||||
.collect(Collectors.toList());
|
||||
// 匹配最小单位
|
||||
List<AdvicePriceDto> advicePrice2 = childCharge.stream()
|
||||
.filter(e -> e.getDefinitionId().equals(finalChargeItemDefinitionId) && e.getConditionValue()
|
||||
.equals(String.format(CommonConstants.Common.COMMA_FORMAT, finalMinUnitCode,
|
||||
adviceInventoryDto.getLotNumber())))
|
||||
.peek(e -> e.setUnitCode(finalMinUnitCode)) // 设置 unitCode
|
||||
.collect(Collectors.toList());
|
||||
priceDtoList.addAll(advicePrice1);
|
||||
priceDtoList.addAll(advicePrice2);
|
||||
for (AdviceBaseDto baseDto : adviceBaseDtoList) {
|
||||
// 药品和耗材
|
||||
if (CommonConstants.TableName.MED_MEDICATION_DEFINITION.equals(baseDto.getAdviceTableName())
|
||||
|| CommonConstants.TableName.ADM_DEVICE_DEFINITION.equals(baseDto.getAdviceTableName())) {
|
||||
// 每一条医嘱的库存集合信息 , 包装单位库存前端计算
|
||||
List<AdviceInventoryDto> inventoryList =
|
||||
adviceInventory.stream().filter(e -> baseDto.getAdviceDefinitionId().equals(e.getItemId())
|
||||
&& baseDto.getAdviceTableName().equals(e.getItemTable())).collect(Collectors.toList());
|
||||
// 库存信息
|
||||
baseDto.setInventoryList(inventoryList);
|
||||
unitCode = baseDto.getUnitCode();
|
||||
chargeItemDefinitionId = baseDto.getChargeItemDefinitionId();
|
||||
List<AdvicePriceDto> priceDtoList = new ArrayList<>();
|
||||
// 库存信息里取 命中条件 去匹配价格
|
||||
for (AdviceInventoryDto adviceInventoryDto : inventoryList) {
|
||||
Long finalChargeItemDefinitionId = chargeItemDefinitionId;
|
||||
String finalUnitCode = unitCode;
|
||||
// 匹配包装单位
|
||||
List<AdvicePriceDto> advicePrice1 = childCharge.stream()
|
||||
.filter(e -> e.getDefinitionId().equals(finalChargeItemDefinitionId) && e.getConditionValue()
|
||||
.equals(String.format(CommonConstants.Common.COMMA_FORMAT, finalUnitCode,
|
||||
adviceInventoryDto.getLotNumber())))
|
||||
.peek(e -> e.setUnitCode(finalUnitCode)) // 设置 unitCode
|
||||
.collect(Collectors.toList());
|
||||
priceDtoList.addAll(advicePrice1);
|
||||
}
|
||||
}
|
||||
// 诊疗活动
|
||||
else {
|
||||
List<AdvicePriceDto> priceList =
|
||||
mainCharge.stream().filter(e -> baseDto.getChargeItemDefinitionId().equals(e.getDefinitionId()))
|
||||
.collect(Collectors.toList());
|
||||
// 价格信息
|
||||
baseDto.setPriceList(priceList);
|
||||
// 活动类型
|
||||
baseDto
|
||||
.setActivityType_enumText(EnumUtils.getInfoByValue(ActivityType.class, baseDto.getActivityType()));
|
||||
}
|
||||
// 价格信息
|
||||
baseDto.setPriceList(priceDtoList);
|
||||
}
|
||||
// 诊疗
|
||||
List<AdviceBaseDto> activityList = adviceBaseDtoList.stream()
|
||||
.filter(e -> CommonConstants.TableName.WOR_ACTIVITY_DEFINITION.equals(e.getAdviceTableName()))
|
||||
.collect(Collectors.toList());
|
||||
// 诊疗-赋值
|
||||
for (AdviceBaseDto baseDto : activityList) {
|
||||
// 活动类型
|
||||
baseDto.setActivityType_enumText(EnumUtils.getInfoByValue(ActivityType.class, baseDto.getActivityType()));
|
||||
List<AdvicePriceDto> priceList =
|
||||
mainCharge.stream().filter(e -> baseDto.getChargeItemDefinitionId().equals(e.getDefinitionId()))
|
||||
.collect(Collectors.toList());
|
||||
// 价格信息
|
||||
baseDto.setPriceList(priceList);
|
||||
}
|
||||
|
||||
// 下面的注释不要删除 2025.03.27
|
||||
// // 药品和耗材
|
||||
// List<AdviceBaseDto> medicationAndDeviceList = adviceBaseDtoList.stream()
|
||||
// .filter(e -> CommonConstants.TableName.MED_MEDICATION_DEFINITION.equals(e.getAdviceTableName())
|
||||
// || CommonConstants.TableName.ADM_DEVICE_DEFINITION.equals(e.getAdviceTableName()))
|
||||
// .collect(Collectors.toList());
|
||||
// // 药品和耗材-赋值
|
||||
// String unitCode = ""; // 包装单位
|
||||
// String minUnitCode; // 小单位
|
||||
// Long chargeItemDefinitionId; // 费用定价主表ID
|
||||
// for (AdviceBaseDto baseDto : medicationAndDeviceList) {
|
||||
// // 每一条医嘱的库存集合信息
|
||||
// List<AdviceInventoryDto> inventoryList =
|
||||
// adviceInventory.stream().filter(e -> baseDto.getAdviceDefinitionId().equals(e.getItemId())
|
||||
// && baseDto.getAdviceTableName().equals(e.getItemTable())).collect(Collectors.toList());
|
||||
// // 库存信息
|
||||
// baseDto.setInventoryList(inventoryList);
|
||||
//
|
||||
// unitCode = baseDto.getUnitCode();
|
||||
// minUnitCode = baseDto.getMinUnitCode();
|
||||
// chargeItemDefinitionId = baseDto.getChargeItemDefinitionId();
|
||||
//
|
||||
// List<AdvicePriceDto> priceDtoList = new ArrayList<>();
|
||||
// // 库存信息里取 单位,产品批号 去匹配价格
|
||||
// for (AdviceInventoryDto adviceInventoryDto : inventoryList) {
|
||||
// Long finalChargeItemDefinitionId = chargeItemDefinitionId;
|
||||
// String finalUnitCode = unitCode;
|
||||
// String finalMinUnitCode = minUnitCode;
|
||||
// // 匹配包装单位
|
||||
// List<AdvicePriceDto> advicePrice1 = childCharge.stream()
|
||||
// .filter(e -> e.getDefinitionId().equals(finalChargeItemDefinitionId) && e.getConditionValue()
|
||||
// .equals(String.format(CommonConstants.Common.COMMA_FORMAT, finalUnitCode,
|
||||
// adviceInventoryDto.getLotNumber())))
|
||||
// .peek(e -> e.setUnitCode(finalUnitCode)) // 设置 unitCode
|
||||
// .collect(Collectors.toList());
|
||||
// // 匹配最小单位
|
||||
// List<AdvicePriceDto> advicePrice2 = childCharge.stream()
|
||||
// .filter(e -> e.getDefinitionId().equals(finalChargeItemDefinitionId) && e.getConditionValue()
|
||||
// .equals(String.format(CommonConstants.Common.COMMA_FORMAT, finalMinUnitCode,
|
||||
// adviceInventoryDto.getLotNumber())))
|
||||
// .peek(e -> e.setUnitCode(finalMinUnitCode)) // 设置 unitCode
|
||||
// .collect(Collectors.toList());
|
||||
// priceDtoList.addAll(advicePrice1);
|
||||
// priceDtoList.addAll(advicePrice2);
|
||||
// }
|
||||
// // 价格信息
|
||||
// baseDto.setPriceList(priceDtoList);
|
||||
// }
|
||||
// // 诊疗
|
||||
// List<AdviceBaseDto> activityList = adviceBaseDtoList.stream()
|
||||
// .filter(e -> CommonConstants.TableName.WOR_ACTIVITY_DEFINITION.equals(e.getAdviceTableName()))
|
||||
// .collect(Collectors.toList());
|
||||
// // 诊疗-赋值
|
||||
// for (AdviceBaseDto baseDto : activityList) {
|
||||
// // 活动类型
|
||||
// baseDto.setActivityType_enumText(EnumUtils.getInfoByValue(ActivityType.class, baseDto.getActivityType()));
|
||||
// List<AdvicePriceDto> priceList =
|
||||
// mainCharge.stream().filter(e -> baseDto.getChargeItemDefinitionId().equals(e.getDefinitionId()))
|
||||
// .collect(Collectors.toList());
|
||||
// // 价格信息
|
||||
// baseDto.setPriceList(priceList);
|
||||
// }
|
||||
return adviceBaseInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.web.doctorstation.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
@@ -24,6 +25,12 @@ public class AdviceBaseDto {
|
||||
*/
|
||||
private String categoryCode;
|
||||
|
||||
/** 拆零比 */
|
||||
private BigDecimal partPercent;
|
||||
|
||||
/** 拆分属性 */
|
||||
private Integer partAttributeEnum;
|
||||
|
||||
/** 医嘱定义ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long adviceDefinitionId;
|
||||
|
||||
@@ -27,6 +27,12 @@ public class AdviceSaveDto {
|
||||
*/
|
||||
private String categoryCode;
|
||||
|
||||
/** 拆零比 */
|
||||
private BigDecimal partPercent;
|
||||
|
||||
/** 拆分属性 */
|
||||
private Integer partAttributeEnum;
|
||||
|
||||
/** 执行次数 */
|
||||
private Integer executeNum; // 当医嘱类型为药品时,选填
|
||||
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.openhis.web.pharmacymanage.appservice;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.pharmacymanage.dto.EncounterInfoSearchParam;
|
||||
|
||||
/**
|
||||
* 处方管理 应用实现接口
|
||||
*
|
||||
* @author wangyang
|
||||
* @date 2025/3/18
|
||||
*/
|
||||
public interface IWesternMedicineDispenseAppService {
|
||||
|
||||
/**
|
||||
* 页面初始化
|
||||
*
|
||||
* @return 初始化信息
|
||||
*/
|
||||
R<?> init();
|
||||
|
||||
/**
|
||||
* 分页查询就诊病人列表
|
||||
*
|
||||
* @param encounterInfoSearchParam 查询条件
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request 请求数据
|
||||
* @return 就诊病人分页列表
|
||||
*/
|
||||
R<?> getEncounterInfoListPage(EncounterInfoSearchParam encounterInfoSearchParam, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 查询处方单列表
|
||||
*
|
||||
* @param encounterId 就诊号
|
||||
* @return 处方单列表
|
||||
*/
|
||||
R<?> getPrescriptionInfo(Long encounterId);
|
||||
|
||||
/**
|
||||
* 处方单核对发药
|
||||
*
|
||||
* @param prescriptionNo 处方号
|
||||
* @return 处理结果
|
||||
*/
|
||||
R<?> medicineDispense(String prescriptionNo);
|
||||
|
||||
/**
|
||||
* 处方单作废
|
||||
*
|
||||
* @param prescriptionNo 处方号
|
||||
* @param notPerformedReasonEnum 未发药原因
|
||||
* @return 处理结果
|
||||
*/
|
||||
R<?> medicineCancel(String prescriptionNo, Integer notPerformedReasonEnum);
|
||||
}
|
||||
@@ -0,0 +1,269 @@
|
||||
package com.openhis.web.pharmacymanage.appservice.impl;
|
||||
|
||||
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.DateUtils;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
import com.openhis.administration.service.IOrganizationService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.DispenseStatus;
|
||||
import com.openhis.common.enums.NotPerformedReasonEnum;
|
||||
import com.openhis.common.enums.OrganizationClass;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.medication.domain.MedicationDispense;
|
||||
import com.openhis.medication.service.IMedicationDispenseService;
|
||||
import com.openhis.web.pharmacymanage.appservice.IWesternMedicineDispenseAppService;
|
||||
import com.openhis.web.pharmacymanage.dto.*;
|
||||
import com.openhis.web.pharmacymanage.mapper.WesternMedicineDispenseMapper;
|
||||
import com.openhis.workflow.domain.InventoryItem;
|
||||
import com.openhis.workflow.service.IInventoryItemService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 西药发放 应用实现类
|
||||
*
|
||||
* @author wangyang
|
||||
* @date 2025/3/14
|
||||
*/
|
||||
@Service
|
||||
public class IWesternMedicineDispenseAppServiceImpl implements IWesternMedicineDispenseAppService {
|
||||
|
||||
@Autowired
|
||||
private IOrganizationService iOrganizationService;
|
||||
|
||||
@Autowired
|
||||
IMedicationDispenseService iMedicationDispenseService;
|
||||
|
||||
@Autowired
|
||||
IInventoryItemService iInventoryItemService;
|
||||
|
||||
@Autowired
|
||||
WesternMedicineDispenseMapper westernMedicineDispenseMapper;
|
||||
|
||||
/**
|
||||
* 获取页面初始化信息
|
||||
*
|
||||
* @return 初始化信息
|
||||
*/
|
||||
@Override
|
||||
public R<?> init() {
|
||||
|
||||
PageInitDto initDto = new PageInitDto();
|
||||
|
||||
// 获取科室下拉选列表
|
||||
List<Organization> organizationList = iOrganizationService.getList(OrganizationClass.CLINIC.getValue());
|
||||
List<PageInitDto.DepartmentOption> organizationOptions = organizationList.stream()
|
||||
.map(organization -> new PageInitDto.DepartmentOption(organization.getId(),
|
||||
organization.getName())).collect(Collectors.toList());
|
||||
|
||||
// 未发药原因下拉选列表
|
||||
List<PageInitDto.NotPerformedReasonOption> notPerformedReasonOptions =
|
||||
Stream.of(NotPerformedReasonEnum.values()).map(notPerformedReason ->
|
||||
new PageInitDto.NotPerformedReasonOption(notPerformedReason.getValue(),
|
||||
notPerformedReason.getInfo())).collect(Collectors.toList());
|
||||
|
||||
initDto.setDepartmentOptions(organizationOptions).setNotPerformedReasonOptions(notPerformedReasonOptions);
|
||||
return R.ok(initDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询就诊病人列表
|
||||
*
|
||||
* @param encounterInfoSearchParam 查询条件
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request 请求数据
|
||||
* @return 就诊病人列表
|
||||
*/
|
||||
@Override
|
||||
public R<?> getEncounterInfoListPage(EncounterInfoSearchParam encounterInfoSearchParam,
|
||||
Integer pageNo,
|
||||
Integer pageSize,
|
||||
HttpServletRequest request) {
|
||||
|
||||
// 查询条件设定
|
||||
String condition = encounterInfoSearchParam.getCondition();
|
||||
if (!condition.isEmpty()){
|
||||
Pattern pattern = Pattern.compile(".*\\d.*");
|
||||
Matcher matcher = pattern.matcher(encounterInfoSearchParam.getCondition());
|
||||
encounterInfoSearchParam.setIdCard(matcher.find() ? condition:"");
|
||||
encounterInfoSearchParam.setPatientName(!matcher.find() ? condition:"");
|
||||
}
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<EncounterInfoSearchParam> queryWrapper =
|
||||
HisQueryUtils.buildQueryWrapper(encounterInfoSearchParam,null,null, request);
|
||||
|
||||
// 查询就诊病人列表
|
||||
Page<EncounterInfoPageDto> encounterInfoPageDto = westernMedicineDispenseMapper.selectEncounterInfoListPage(
|
||||
new Page<>(pageNo, pageSize), queryWrapper);
|
||||
|
||||
return R.ok(encounterInfoPageDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询处方单列表
|
||||
* @param encounterId 就诊号
|
||||
* @return 处方单列表
|
||||
*/
|
||||
@Override
|
||||
public R<?> getPrescriptionInfo(Long encounterId) {
|
||||
|
||||
// 患者基本信息查询
|
||||
PrescriptionPatientInfoDto prescriptionPatientInfoDto = westernMedicineDispenseMapper.
|
||||
selectPrescriptionPatientInfo(encounterId);
|
||||
|
||||
// 处方单信息查询
|
||||
List<PrescriptionMedicineInfoDto> prescriptionMedicineInfoList = westernMedicineDispenseMapper.
|
||||
selectPrescriptionMedicineInfoList(encounterId);
|
||||
|
||||
// 计算合计金额
|
||||
if(!prescriptionMedicineInfoList.isEmpty()) {
|
||||
BigDecimal totalPrice = new BigDecimal(0);
|
||||
for (PrescriptionMedicineInfoDto item : prescriptionMedicineInfoList) {
|
||||
totalPrice.add(item.getTotal_price());
|
||||
}
|
||||
prescriptionPatientInfoDto.setTotalPrice(totalPrice);
|
||||
}
|
||||
|
||||
PrescriptionInfoDto prescriptionInfoDto = new PrescriptionInfoDto();
|
||||
prescriptionInfoDto.setPrescriptionPatientInfoDto(prescriptionPatientInfoDto);
|
||||
prescriptionInfoDto.setPrescriptionMedicineInfoDtoList(prescriptionMedicineInfoList);
|
||||
|
||||
return R.ok(prescriptionInfoDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处方单核对发药
|
||||
* @param prescriptionNo 处方号
|
||||
* @return 处理结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> medicineDispense(String prescriptionNo) {
|
||||
|
||||
List<MedicationDispense> medicationDispenseList = new ArrayList<>();
|
||||
List<InventoryItem> inventoryItemList = new ArrayList<>();
|
||||
boolean iMedicationDispenseUpdFlg = true;
|
||||
boolean iInventoryItemUpdFlg = true;
|
||||
|
||||
// 获取药品待发放和库存信息
|
||||
List<DispenseInventoryDto> dispenseInventoryList = westernMedicineDispenseMapper.
|
||||
selectDispenseInventoryInfoByPrescriptionNo(prescriptionNo);
|
||||
if(!dispenseInventoryList.isEmpty()){
|
||||
MedicationDispense medicationDispense;
|
||||
InventoryItem inventoryItem;
|
||||
for (DispenseInventoryDto dispenseInventoryDto : dispenseInventoryList) {
|
||||
|
||||
// 药品发放表项目设定
|
||||
medicationDispense = new MedicationDispense();
|
||||
// id
|
||||
medicationDispense.setId(dispenseInventoryDto.getDispenseId());
|
||||
// 药品发放状态
|
||||
medicationDispense.setStatusEnum(DispenseStatus.COMPLETED.getValue());
|
||||
// 状态变更时间
|
||||
medicationDispense.setStatusChangedTime(DateUtils.getNowDate());
|
||||
// 发药人
|
||||
medicationDispense.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
// 已发药数量
|
||||
medicationDispense.setDispenseQuantity(dispenseInventoryDto.getDispenseQuantity());
|
||||
// 配药时间
|
||||
medicationDispense.setPrepareTime(DateUtils.getNowDate());
|
||||
// 发药时间
|
||||
medicationDispense.setDispenseTime(DateUtils.getNowDate());
|
||||
medicationDispenseList.add(medicationDispense);
|
||||
|
||||
// 库存表项目设定
|
||||
inventoryItem = new InventoryItem();
|
||||
// 库存数量
|
||||
if (dispenseInventoryDto.getDispenseUnitCode().equals(dispenseInventoryDto.
|
||||
getInventoryBaseUnitCode())) {
|
||||
// id
|
||||
inventoryItem.setId(dispenseInventoryDto.getInventoryId());
|
||||
// 包装数量
|
||||
inventoryItem.setBaseQuantity(dispenseInventoryDto.getInventoryBaseQuantity().
|
||||
min(new BigDecimal(dispenseInventoryDto.getDispenseQuantity())));
|
||||
// 拆零数量(拆零比×包装数量)
|
||||
inventoryItem.setMinQuantity(dispenseInventoryDto.getInventoryMinQuantity().
|
||||
min(dispenseInventoryDto.getPartPercent().multiply(
|
||||
new BigDecimal(dispenseInventoryDto.getDispenseQuantity()))));
|
||||
} else if (dispenseInventoryDto.getDispenseUnitCode().equals(dispenseInventoryDto.
|
||||
getInventoryMinUnitCode())) {
|
||||
// id
|
||||
inventoryItem.setId(dispenseInventoryDto.getInventoryId());
|
||||
// 拆零数量
|
||||
inventoryItem.setMinQuantity(dispenseInventoryDto.getInventoryMinQuantity().min(
|
||||
new BigDecimal(dispenseInventoryDto.getDispenseQuantity())));
|
||||
// 包装数量(拆零数量÷拆零比)
|
||||
inventoryItem.setBaseQuantity(dispenseInventoryDto.getInventoryBaseQuantity().min(
|
||||
new BigDecimal(dispenseInventoryDto.getDispenseQuantity()).
|
||||
divide(dispenseInventoryDto.getPartPercent(),RoundingMode.HALF_UP)));
|
||||
}
|
||||
inventoryItemList.add(inventoryItem);
|
||||
}
|
||||
// 药品发放更新
|
||||
iMedicationDispenseUpdFlg = iMedicationDispenseService.updateBatchById(medicationDispenseList);
|
||||
|
||||
// 库存更新
|
||||
iInventoryItemUpdFlg = iInventoryItemService.updateBatchById(inventoryItemList);
|
||||
}
|
||||
return iMedicationDispenseUpdFlg && iInventoryItemUpdFlg ?
|
||||
R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null))
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00010, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 作废
|
||||
* @param prescriptionNo 处方号
|
||||
* @param notPerformedReasonEnum 未发药原因
|
||||
* @return 处理结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> medicineCancel(String prescriptionNo,
|
||||
Integer notPerformedReasonEnum) {
|
||||
|
||||
List<MedicationDispense> medicationDispenseList = new ArrayList<>();
|
||||
boolean iMedicationDispenseUpdFlg = true;
|
||||
|
||||
// 获取药品待发放记录
|
||||
List<DispenseInventoryDto> dispenseInventoryList = westernMedicineDispenseMapper.
|
||||
selectDispenseInventoryInfoByPrescriptionNo(prescriptionNo);
|
||||
if(!dispenseInventoryList.isEmpty()){
|
||||
MedicationDispense medicationDispense;
|
||||
for (DispenseInventoryDto dispenseInventoryDto : dispenseInventoryList) {
|
||||
|
||||
// 药品发放表项目设定
|
||||
medicationDispense = new MedicationDispense();
|
||||
// id
|
||||
medicationDispense.setId(dispenseInventoryDto.getDispenseId());
|
||||
// 药品发放状态
|
||||
medicationDispense.setStatusEnum(DispenseStatus.DECLINED.getValue());
|
||||
// 未发药原因
|
||||
medicationDispense.setNotPerformedReasonEnum(notPerformedReasonEnum);
|
||||
// 状态变更时间
|
||||
medicationDispense.setStatusChangedTime(DateUtils.getNowDate());
|
||||
// 发药人
|
||||
medicationDispense.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
medicationDispenseList.add(medicationDispense);
|
||||
}
|
||||
// 药品发放更新
|
||||
iMedicationDispenseUpdFlg = iMedicationDispenseService.updateBatchById(medicationDispenseList);
|
||||
}
|
||||
return iMedicationDispenseUpdFlg?
|
||||
R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null))
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00010, null));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.openhis.web.pharmacymanage.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.pharmacymanage.appservice.IWesternMedicineDispenseAppService;
|
||||
import com.openhis.web.pharmacymanage.dto.EncounterInfoSearchParam;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 西药发药
|
||||
*
|
||||
* @author wangyang
|
||||
* @date 2025/3/14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pharmacy-manage/western-medicine-dispense")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class WesternMedicineDispenseController {
|
||||
|
||||
@Autowired
|
||||
public IWesternMedicineDispenseAppService iWesternMedicineDispenseService;
|
||||
|
||||
/**
|
||||
* 获取页面初始化信息
|
||||
*
|
||||
* @return 初始化信息
|
||||
*/
|
||||
@GetMapping(value = "/init")
|
||||
public R<?> medicineDispenseInit() {
|
||||
return iWesternMedicineDispenseService.init();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询就诊病人列表
|
||||
*
|
||||
* @param encounterInfoSearchParam 查询条件
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request 请求数据
|
||||
* @return 就诊病人列表
|
||||
*/
|
||||
@GetMapping("/encounter-list")
|
||||
public R<?> getEncounterInfoList(EncounterInfoSearchParam encounterInfoSearchParam,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
return iWesternMedicineDispenseService.getEncounterInfoListPage(encounterInfoSearchParam, pageNo, pageSize,
|
||||
request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处方单查询
|
||||
*
|
||||
* @param encounterId 就诊Id
|
||||
*/
|
||||
@GetMapping("/prescription-list")
|
||||
public R<?> getPatientInfoList(@RequestParam(value = "encounterId") Long encounterId) {
|
||||
return iWesternMedicineDispenseService.getPrescriptionInfo(encounterId);
|
||||
}
|
||||
|
||||
// todo:配药逻辑
|
||||
|
||||
/**
|
||||
* 核对发药
|
||||
*
|
||||
* @param prescriptionNo 处方号
|
||||
*/
|
||||
@GetMapping("/medicine-dispense")
|
||||
public R<?> medicineDispense(@RequestParam(value = "prescriptionNo") String prescriptionNo) {
|
||||
return iWesternMedicineDispenseService.medicineDispense(prescriptionNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 作废
|
||||
*
|
||||
* @param prescriptionNo 处方号
|
||||
* @param notPerformedReasonEnum 未发药原因
|
||||
*/
|
||||
@GetMapping("/medicine-cancel")
|
||||
public R<?> medicineCancel(@RequestParam(value = "prescriptionNo") String prescriptionNo,
|
||||
@RequestParam(value = "prescriptionNo") Integer notPerformedReasonEnum) {
|
||||
return iWesternMedicineDispenseService.medicineCancel(prescriptionNo, notPerformedReasonEnum);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.pharmacymanage.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 药品发放和库存表连接信息
|
||||
*
|
||||
* @author wangyang
|
||||
* @date 2025-03-14
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DispenseInventoryDto {
|
||||
|
||||
/** 药品发放表主键ID */
|
||||
private Long dispenseId;
|
||||
|
||||
/** 请求单位编码 */
|
||||
private String dispenseUnitCode;
|
||||
|
||||
/** 请求数量 */
|
||||
private Integer dispenseQuantity;
|
||||
|
||||
/** 库存项目表主键ID */
|
||||
private Long inventoryId;
|
||||
|
||||
/** 常规单位 */
|
||||
private String inventoryBaseUnitCode;
|
||||
|
||||
/** 当前库存数量(常规单位) */
|
||||
private BigDecimal inventoryBaseQuantity;
|
||||
|
||||
/** 最小单位 */
|
||||
private String inventoryMinUnitCode;
|
||||
|
||||
/** 当前库存数量(最小单位数量) */
|
||||
private BigDecimal inventoryMinQuantity;
|
||||
|
||||
/** 拆零比 */
|
||||
private BigDecimal partPercent;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.pharmacymanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 就诊人员列表
|
||||
*
|
||||
* @author WangYang
|
||||
* @date 2025-03-18
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EncounterInfoPageDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 就诊ID */
|
||||
private Long encounterId;
|
||||
|
||||
/** 科室 */
|
||||
private String departmentName;
|
||||
|
||||
/** 患者姓名 */
|
||||
private String patientName;
|
||||
|
||||
/** 性别 */
|
||||
private Integer genderEnum;
|
||||
private String genderEnum_enumText;
|
||||
|
||||
/** 就诊日期 */
|
||||
private String encounterDate;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.pharmacymanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 处方列表查询条件
|
||||
*
|
||||
* @author wangyang
|
||||
* @date 2025-03-14
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EncounterInfoSearchParam implements Serializable {
|
||||
|
||||
/** 科室 */
|
||||
private long departmentId;
|
||||
|
||||
/** 患者姓名或者证件号 */
|
||||
private String condition;
|
||||
|
||||
/** 患者姓名 */
|
||||
private String patientName;
|
||||
|
||||
/** 证件号 */
|
||||
private String idCard;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.pharmacymanage.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author wangyang
|
||||
* @date 2025-03-14
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PageInitDto {
|
||||
|
||||
/** 科室列表 */
|
||||
private List<DepartmentOption> departmentOptions;
|
||||
|
||||
/** 未发药原因 */
|
||||
private List<NotPerformedReasonOption> notPerformedReasonOptions;
|
||||
|
||||
@Data
|
||||
public static class DepartmentOption {
|
||||
|
||||
private Long value;
|
||||
private String label;
|
||||
|
||||
public DepartmentOption(Long value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class NotPerformedReasonOption {
|
||||
|
||||
private Integer value;
|
||||
private String label;
|
||||
|
||||
public NotPerformedReasonOption(Integer value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.pharmacymanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 处方信息
|
||||
*
|
||||
* @author wangyang
|
||||
* @date 2025-03-14
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PrescriptionInfoDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 患者基本信息 */
|
||||
private PrescriptionPatientInfoDto prescriptionPatientInfoDto;
|
||||
|
||||
/** 处方药品信息 */
|
||||
List<PrescriptionMedicineInfoDto> prescriptionMedicineInfoDtoList;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.pharmacymanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 就诊人员列表
|
||||
*
|
||||
* @author wangyang
|
||||
* @date 2025-03-14
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PrescriptionMedicineInfoDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 科室 */
|
||||
private String departmentName;
|
||||
|
||||
/** 项目类型 */
|
||||
private String itemType;
|
||||
|
||||
/** 开单医生 */
|
||||
private String doctorName;
|
||||
|
||||
/** 处方号 */
|
||||
private String prescriptionNo;
|
||||
|
||||
/** 药品名称 */
|
||||
private String medicineName;
|
||||
|
||||
/** 规格 */
|
||||
private String totalVolume;
|
||||
|
||||
/** 单次剂量 */
|
||||
private BigDecimal dose;
|
||||
|
||||
/** 用药频次 */
|
||||
private String rateCode;
|
||||
|
||||
/** 用法 */
|
||||
private String methodCode;
|
||||
|
||||
/** 剂量单位 */
|
||||
private String doseUnitCode;
|
||||
|
||||
/** 单次最大剂量 */
|
||||
private BigDecimal maxDose;
|
||||
|
||||
/** 首次用量 */
|
||||
private BigDecimal firstDose;
|
||||
|
||||
/** 首次持续时间 */
|
||||
private String firstDuration;
|
||||
|
||||
/** 给药间隔 */
|
||||
private String dispenseInterval;
|
||||
|
||||
/** 单次发药数 */
|
||||
private Integer dispensePerQuantity;
|
||||
|
||||
/** 每次发药供应天数 */
|
||||
private Integer dispensePerDuration;
|
||||
|
||||
/** 数量 */
|
||||
private Integer quantity;
|
||||
|
||||
/** 单价 */
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/** 金额 */
|
||||
private BigDecimal total_price;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.pharmacymanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 患者基本信息
|
||||
*
|
||||
* @author wangyang
|
||||
* @date 2025-03-14
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PrescriptionPatientInfoDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 姓名 */
|
||||
private String patientName;
|
||||
|
||||
/** 性别 */
|
||||
private Integer genderEnum;
|
||||
private String genderEnum_enumText;
|
||||
|
||||
/** 生日 */
|
||||
private Date birth_date;
|
||||
|
||||
/** 年龄 */
|
||||
private String age;
|
||||
|
||||
/** 合同类型 */
|
||||
private Integer categoryEnum;
|
||||
private String categoryEnum_enumText;
|
||||
|
||||
/** 证件号 */
|
||||
private String idCard;
|
||||
|
||||
/** 就诊科室 */
|
||||
private String organizationName;
|
||||
|
||||
/** 就诊日期 */
|
||||
private String encounterDate;
|
||||
|
||||
/** 门诊诊断 */
|
||||
private String diagnoseName;
|
||||
|
||||
/** 总金额 */
|
||||
private BigDecimal totalPrice;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.pharmacymanage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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.pharmacymanage.dto.*;
|
||||
|
||||
@Repository
|
||||
public interface WesternMedicineDispenseMapper {
|
||||
|
||||
/**
|
||||
* 就诊病人列表分页查询
|
||||
*
|
||||
* @param page 分页
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 就诊病人列表
|
||||
*/
|
||||
Page<EncounterInfoPageDto> selectEncounterInfoListPage(@Param("page") Page<EncounterInfoPageDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<EncounterInfoSearchParam> queryWrapper);
|
||||
|
||||
/**
|
||||
* 患者基本信息查询
|
||||
*
|
||||
* @param encounterId 就诊号
|
||||
* @return 患者基本信息
|
||||
*/
|
||||
PrescriptionPatientInfoDto selectPrescriptionPatientInfo(@Param("encounterId") Long encounterId);
|
||||
|
||||
/**
|
||||
* 处方单查询
|
||||
*
|
||||
* @param encounterId 就诊号
|
||||
* @return 处方单列表
|
||||
*/
|
||||
List<PrescriptionMedicineInfoDto> selectPrescriptionMedicineInfoList(@Param("encounterId") Long encounterId);
|
||||
|
||||
/**
|
||||
* 待发药和库存信息查询
|
||||
*
|
||||
* @param prescriptionNo 处方号
|
||||
* @return 待发药信息
|
||||
*/
|
||||
List<DispenseInventoryDto>
|
||||
selectDispenseInventoryInfoByPrescriptionNo(@Param("prescriptionNo") String prescriptionNo);
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.web.basedatamanage.mapper.PractitionerAppAppMapper">
|
||||
|
||||
<select id="getUserPractitionerPage" resultType="com.openhis.web.doctorstation.dto.UserAndPractitionerDto">
|
||||
<select id="getUserPractitionerPage" resultType="com.openhis.web.basedatamanage.dto.UserAndPractitionerDto">
|
||||
SELECT T3.tenant_id,
|
||||
T3.user_id,
|
||||
T3.practitioner_id,
|
||||
@@ -45,18 +45,33 @@
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="getChildList" resultType="com.openhis.web.doctorstation.dto.UserAndPractitionerChildDto">
|
||||
<select id="getPractitionerRolesDtoList" resultType="com.openhis.web.basedatamanage.dto.PractitionerRolesDto">
|
||||
SELECT
|
||||
sr.role_id,
|
||||
sr.role_name,
|
||||
ap.ID AS practitioner_id
|
||||
FROM
|
||||
sys_role sr
|
||||
JOIN sys_user_role sur ON sr.role_id = sur.role_id
|
||||
JOIN adm_practitioner ap ON sur.user_id = ap.user_id
|
||||
WHERE
|
||||
ap.delete_flag = '0'
|
||||
<if test="practitionerIdList != null and !practitionerIdList.isEmpty()">
|
||||
AND ap.ID IN
|
||||
<foreach collection="practitionerIdList" item="itemId" open="(" separator="," close=")">
|
||||
#{itemId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getOrgAndLocationDtoList" resultType="com.openhis.web.basedatamanage.dto.PractitionerOrgAndLocationDto">
|
||||
SELECT
|
||||
t1.practitioner_id,
|
||||
t1.org_id,
|
||||
t1.location_id,
|
||||
t1.role_code,
|
||||
t2.role_id,
|
||||
t2.role_name
|
||||
t1.org_id,
|
||||
t1.location_id
|
||||
FROM
|
||||
adm_practitioner_role AS T1
|
||||
LEFT JOIN sys_role AS T2 ON t2.role_key = t1.role_code
|
||||
AND t2.del_flag = '0'
|
||||
WHERE
|
||||
t1.delete_flag = '0'
|
||||
<if test="practitionerIdList != null and !practitionerIdList.isEmpty()">
|
||||
|
||||
@@ -24,47 +24,46 @@
|
||||
AND T1.delete_flag = '0'
|
||||
</select>
|
||||
<select id="selectRefundItem" resultType="com.openhis.web.chargemanage.dto.RefundItemDto">
|
||||
SELECT T1.*,
|
||||
T2.name AS service_name
|
||||
FROM fin_payment_reconciliation AS T1
|
||||
LEFT JOIN adm_charge_item AS T2
|
||||
ON T2.id IN T1.charge_item_ids
|
||||
LEFT JOIN med_medication_request AS T3
|
||||
ON T3.bus_no = SUBSTRING(T2.bus_no, #{three})
|
||||
LEFT JOIN med_medication_dispense AS T4
|
||||
ON T4.med_req_id = T3.id
|
||||
WHERE T2.service_table = #{medMedicationRequest}
|
||||
SELECT (T1.discount_amount + T2.surcharge_amount) AS pay_amount,
|
||||
T2.bus_no,
|
||||
T2.prescription_no,
|
||||
T2.quantity,
|
||||
T2.medication_id AS item_id,
|
||||
T2.unit_code,
|
||||
T3.status_enum
|
||||
FROM adm_charge_item AS T1
|
||||
LEFT JOIN med_medication_request AS T2
|
||||
ON T2.bus_no = SUBSTRING(T1.bus_no, #{three})
|
||||
LEFT JOIN med_medication_dispense AS T3
|
||||
ON T3.med_req_id = T2.id
|
||||
WHERE T1.service_table = #{medMedicationRequest}
|
||||
AND T1.id IN
|
||||
<foreach collection="paymentIdList" item="paymentId" separator="," open="(" close=")">
|
||||
#{paymentId}
|
||||
<foreach collection="chargeItemIdList" item="chargeItemId" separator="," open="(" close=")">
|
||||
#{chargeItemId}
|
||||
</foreach>
|
||||
UNION ALL
|
||||
UNION
|
||||
SELECT T1.*,
|
||||
T2.name AS service_name
|
||||
FROM fin_payment_reconciliation AS T1
|
||||
LEFT JOIN adm_charge_item AS T2
|
||||
ON T2.id IN T1.charge_item_ids
|
||||
LEFT JOIN wor_device_request AS T5
|
||||
ON T6.bus_no = SUBSTRING(T2.bus_no, #{three})
|
||||
LEFT JOIN wor_device_dispense AS T6
|
||||
ON T6.device_req_id = T5.id
|
||||
WHERE T2.service_table = #{worDeviceRequest}
|
||||
FROM adm_charge_item AS T1
|
||||
LEFT JOIN wor_device_request AS T4
|
||||
ON T4.bus_no = SUBSTRING(T1.bus_no, #{three})
|
||||
LEFT JOIN wor_device_dispense AS T5
|
||||
ON T5.device_req_id = T4.id
|
||||
WHERE T1.service_table = #{worDeviceRequest}
|
||||
AND T1.id IN
|
||||
<foreach collection="paymentIdList" item="paymentId" separator="," open="(" close=")">
|
||||
#{paymentId}
|
||||
<foreach collection="chargeItemIdList" item="chargeItemId" separator="," open="(" close=")">
|
||||
#{chargeItemId}
|
||||
</foreach>
|
||||
UNION ALL
|
||||
UNION
|
||||
SELECT T1.*,
|
||||
T2.name AS service_name
|
||||
FROM fin_payment_reconciliation AS T1
|
||||
LEFT JOIN adm_charge_item AS T2
|
||||
ON T2.id IN T1.charge_item_ids
|
||||
LEFT JOIN wor_service_request AS T7
|
||||
ON T7.bus_no = SUBSTRING(T2.bus_no, #{three})
|
||||
WHERE T2.service_table = #{worServiceRequest}
|
||||
FROM adm_charge_item AS T1
|
||||
LEFT JOIN wor_service_request AS T6
|
||||
ON T6.bus_no = SUBSTRING(T1.bus_no, #{three})
|
||||
WHERE T1.service_table = #{worServiceRequest}
|
||||
AND T1.id IN
|
||||
<foreach collection="paymentIdList" item="paymentId" separator="," open="(" close=")">
|
||||
#{paymentId}
|
||||
<foreach collection="chargeItemIdList" item="chargeItemId" separator="," open="(" close=")">
|
||||
#{chargeItemId}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -10,7 +10,7 @@
|
||||
T3.name,
|
||||
T3.py_str,
|
||||
T3.wb_str,
|
||||
T3.category_enum,
|
||||
T3.category_code,
|
||||
T3.type_code,
|
||||
T3.unit_code,
|
||||
T3.size,
|
||||
@@ -35,7 +35,11 @@
|
||||
T3.substance_text,
|
||||
T3.allergen_flag,
|
||||
T3.tenant_id,
|
||||
T3.price
|
||||
T3.item_type_code,
|
||||
T3.yb_type,
|
||||
T3.retail_price,
|
||||
T3.purchase_price,
|
||||
T3.maximum_retail_price
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
@@ -44,7 +48,7 @@
|
||||
T1.name,
|
||||
T1.py_str,
|
||||
T1.wb_str,
|
||||
T1.category_enum,
|
||||
T1.category_code,
|
||||
T1.type_code,
|
||||
T1.unit_code,
|
||||
T1.size,
|
||||
@@ -69,7 +73,23 @@
|
||||
T1.substance_text,
|
||||
T1.allergen_flag,
|
||||
T1.tenant_id,
|
||||
T2.price
|
||||
T2.type_code as item_type_code,
|
||||
T2.yb_type,
|
||||
T2.price as retail_price,--零售价,
|
||||
( SELECT T4.amount
|
||||
FROM adm_charge_item_definition T5
|
||||
LEFT JOIN adm_charge_item_def_detail T4 ON T4.definition_id = T5.id
|
||||
WHERE T4.condition_code = '2'--2:采购价
|
||||
AND T5.instance_id = T1.id
|
||||
AND T5.instance_table = 'adm_device_definition'
|
||||
) as purchase_price,--购入价
|
||||
( SELECT T4.amount
|
||||
FROM adm_charge_item_definition T5
|
||||
LEFT JOIN adm_charge_item_def_detail T4 ON T4.definition_id = T5.id
|
||||
WHERE T4.condition_code = '4'--4:限制
|
||||
AND T5.instance_id = T1.id
|
||||
AND T5.instance_table = 'adm_device_definition'
|
||||
) as maximum_retail_price--最高零售价
|
||||
FROM adm_device_definition T1
|
||||
LEFT JOIN adm_charge_item_definition T2 ON T1.id = T2.instance_id
|
||||
<where>
|
||||
@@ -81,4 +101,69 @@
|
||||
${ew.customSqlSegment}
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getOne" resultType="com.openhis.web.datadictionary.dto.DeviceManageDto">
|
||||
SELECT
|
||||
T1.id,
|
||||
T1.bus_no,
|
||||
T1.name,
|
||||
T1.py_str,
|
||||
T1.wb_str,
|
||||
T1.category_code,
|
||||
T1.type_code,
|
||||
T1.unit_code,
|
||||
T1.size,
|
||||
T1.part_percent,
|
||||
T1.min_unit_code,
|
||||
T1.org_id,
|
||||
T1.location_id,
|
||||
T1.model_number,
|
||||
T1.hvcm_flag,
|
||||
T1.sales_unit_code,
|
||||
T1.approval_number,
|
||||
T1.yb_flag,
|
||||
T1.yb_no,
|
||||
T1.yb_match_flag,
|
||||
T1.status_enum,
|
||||
T1.manufacturer_id,
|
||||
T1.manufacturer_text,
|
||||
T1.supply_id,
|
||||
T1.description,
|
||||
T1.jurisdiction,
|
||||
T1.version,
|
||||
T1.substance_text,
|
||||
T1.allergen_flag,
|
||||
T1.tenant_id,
|
||||
T2.type_code as item_type_code,
|
||||
T2.yb_type,
|
||||
T2.price as retail_price,--零售价,
|
||||
( SELECT T4.amount
|
||||
FROM adm_charge_item_definition T5
|
||||
LEFT JOIN adm_charge_item_def_detail T4 ON T4.definition_id = T5.id
|
||||
WHERE T4.condition_code = '2'--2:采购价
|
||||
AND T5.instance_id = T1.id
|
||||
AND T5.instance_table = 'adm_device_definition'
|
||||
) as purchase_price,--购入价
|
||||
( SELECT T4.amount
|
||||
FROM adm_charge_item_definition T5
|
||||
LEFT JOIN adm_charge_item_def_detail T4 ON T4.definition_id = T5.id
|
||||
WHERE T4.condition_code = '4'--4:限制
|
||||
AND T5.instance_id = T1.id
|
||||
AND T5.instance_table = 'adm_device_definition'
|
||||
) as maximum_retail_price--最高零售价
|
||||
FROM adm_device_definition T1
|
||||
LEFT JOIN adm_charge_item_definition T2 ON T1.id = T2.instance_id
|
||||
<where>
|
||||
T1.delete_flag = '0'
|
||||
AND T2.instance_table = 'adm_device_definition'
|
||||
|
||||
<if test="id!= null">
|
||||
AND T1.id = #{id}
|
||||
</if>
|
||||
<if test="tenantId!= null">
|
||||
AND T1.tenant_id = #{tenantId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,8 +1,84 @@
|
||||
<?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.datadictionary.mapper.MedicationManageSearchMapper">
|
||||
<!-- 药品信息分页查询-->
|
||||
<select id="getPage" parameterType="java.util.Map"
|
||||
resultType="com.openhis.web.datadictionary.dto.MedicationManageDto">
|
||||
SELECT
|
||||
T6.id,
|
||||
T6.medication_def_id,
|
||||
T6.status_enum,
|
||||
T6.org_id,
|
||||
T6.location_id,
|
||||
T6.dose_form_code,
|
||||
T6.total_volume,
|
||||
T6.ingredient_item,
|
||||
T6.active_flag,
|
||||
T6.lot_number,
|
||||
T6.effective_date,
|
||||
T6.expiration_date,
|
||||
T6.method_code,
|
||||
T6.rate_code,
|
||||
T6.dose,
|
||||
T6.dose_unit_code,
|
||||
T6.max_unit,
|
||||
T6.definition,
|
||||
T6.usage_limit,
|
||||
T6.ddd_code,
|
||||
T6.ddd_unit_code,
|
||||
T6.min_rate_code,
|
||||
T6.max_rate_code,
|
||||
T6.bus_no,
|
||||
T6.name,
|
||||
T6.domain_enum,
|
||||
T6.version,
|
||||
T6.name_en,
|
||||
T6.py_str,
|
||||
T6.wb_str,
|
||||
T6.category_code,
|
||||
T6.merchandise_name,
|
||||
T6.merchandise_py_str,
|
||||
T6.merchandise_wb_str,
|
||||
T6.unit_code,
|
||||
T6.comprised_text,
|
||||
T6.ingredient,
|
||||
T6.part_percent,
|
||||
T6.dose_from,
|
||||
T6.approval_number,
|
||||
T6.yb_match_flag,
|
||||
T6.yb_no,
|
||||
T6.pharmacology_category_code,
|
||||
T6.skin_test_flag,
|
||||
T6.inject_flag,
|
||||
T6.manufacturer_id,
|
||||
T6.manufacturer_text,
|
||||
T6.supply_id,
|
||||
T6.restricted_flag,
|
||||
T6.restricted_scope,
|
||||
T6.children_flag,
|
||||
T6.characteristic,
|
||||
T6.national_drug_code,
|
||||
T6.part_attribute_enum,
|
||||
T6.tho_part_attribute_enum,
|
||||
T6.antibiotic_code,
|
||||
T6.restricted_enum,
|
||||
T6.self_flag,
|
||||
T6.antibiotic_flag,
|
||||
T6.basic_flag,
|
||||
T6.remark,
|
||||
T6.manufacturer_name,
|
||||
T6.base_unit_code,
|
||||
T6.base_quantity,
|
||||
T6.min_unit_code,
|
||||
T6.min_quantity,
|
||||
T6.yb_type,
|
||||
T6.type_code,
|
||||
T6.retail_price,
|
||||
T6.purchase_price,
|
||||
T6.retail_price,
|
||||
T6.tenant_id
|
||||
FROM
|
||||
(
|
||||
SELECT T2.id,
|
||||
T2.medication_def_id,
|
||||
T2.status_enum,
|
||||
@@ -24,6 +100,8 @@
|
||||
T2.usage_limit,
|
||||
T2.ddd_code,
|
||||
T2.ddd_unit_code,
|
||||
T2.min_rate_code,
|
||||
T2.max_rate_code,
|
||||
T1.bus_no,
|
||||
T1.name,
|
||||
T1.domain_enum,
|
||||
@@ -47,6 +125,7 @@
|
||||
T1.skin_test_flag,
|
||||
T1.inject_flag,
|
||||
T1.manufacturer_id,
|
||||
T1.manufacturer_text,
|
||||
T1.supply_id,
|
||||
T1.restricted_flag,
|
||||
T1.restricted_scope,
|
||||
@@ -54,6 +133,7 @@
|
||||
T1.characteristic,
|
||||
T1.national_drug_code,
|
||||
T1.part_attribute_enum,
|
||||
T1.tho_part_attribute_enum,
|
||||
T1.antibiotic_code,
|
||||
T1.restricted_enum,
|
||||
T1.self_flag,
|
||||
@@ -65,7 +145,25 @@
|
||||
T4.base_quantity,
|
||||
T4.min_unit_code,
|
||||
T4.min_quantity,
|
||||
T5.price
|
||||
T5.yb_type,
|
||||
T5.type_code,
|
||||
T1.tenant_id,
|
||||
T5.price as retail_price,--零售价
|
||||
(SELECT T7.amount
|
||||
FROM adm_charge_item_definition T5
|
||||
LEFT JOIN adm_charge_item_def_detail T7 ON T7.definition_id = T5.id
|
||||
WHERE T7.condition_code = '2'--2:采购价
|
||||
AND T5.instance_id = T2.medication_def_id
|
||||
AND T5.instance_table = 'med_medication_definition'
|
||||
) as purchase_price,--购入价
|
||||
(
|
||||
SELECT T7.amount
|
||||
FROM adm_charge_item_definition T5
|
||||
LEFT JOIN adm_charge_item_def_detail T7 ON T7.definition_id = T5.id
|
||||
WHERE T7.condition_code = '4'--4:限制
|
||||
AND T5.instance_id = T2.medication_def_id
|
||||
AND T5.instance_table = 'med_medication_definition'
|
||||
) as maximum_retail_price--最高零售价
|
||||
FROM med_medication_definition T1
|
||||
LEFT JOIN med_medication T2 ON T1.id = T2.medication_def_id
|
||||
LEFT JOIN adm_supplier T3 ON T1.manufacturer_id = T3.id
|
||||
@@ -74,31 +172,9 @@
|
||||
<where>
|
||||
T1.delete_flag = '0'
|
||||
AND T5.instance_table = 'med_medication_definition'
|
||||
<if test="searchKey!=null and searchKey!='' ">
|
||||
AND ( T1.name LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.name_en LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.merchandise_name LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.bus_no LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.py_str LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.wb_str LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.merchandise_py_str LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.merchandise_wb_str LIKE CONCAT(CONCAT('%', #{searchKey}),'%'))
|
||||
</if>
|
||||
<if test="ybMatchFlag!= -1">
|
||||
AND T1.yb_match_flag = #{ybMatchFlag}
|
||||
</if>
|
||||
<if test="statusEnum!= -1">
|
||||
AND T2.status_enum = #{statusEnum}
|
||||
</if>
|
||||
<if test="categoryCode!=null and categoryCode!='' ">
|
||||
AND T1.category_code = #{categoryCode}
|
||||
</if>
|
||||
<if test="tenantId!= null">
|
||||
AND T1.tenant_id = #{tenantId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY T1.bus_no
|
||||
LIMIT #{pageSize} OFFSET #{offset}
|
||||
) AS T6
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="getOne" resultType="com.openhis.web.datadictionary.dto.MedicationManageDto">
|
||||
@@ -106,6 +182,7 @@
|
||||
T2.medication_def_id,
|
||||
T2.status_enum,
|
||||
T2.org_id,
|
||||
T2.location_id,
|
||||
T2.dose_form_code,
|
||||
T2.total_volume,
|
||||
T2.ingredient_item,
|
||||
@@ -119,6 +196,11 @@
|
||||
T2.dose_unit_code,
|
||||
T2.max_unit,
|
||||
T2.definition,
|
||||
T2.usage_limit,
|
||||
T2.ddd_code,
|
||||
T2.ddd_unit_code,
|
||||
T2.min_rate_code,
|
||||
T2.max_rate_code,
|
||||
T1.bus_no,
|
||||
T1.name,
|
||||
T1.domain_enum,
|
||||
@@ -143,48 +225,45 @@
|
||||
T1.skin_test_flag,
|
||||
T1.inject_flag,
|
||||
T1.manufacturer_id,
|
||||
T1.manufacturer_text,
|
||||
T1.supply_id,
|
||||
T1.restricted_flag,
|
||||
T1.restricted_scope,
|
||||
T1.children_flag,
|
||||
T1.characteristic
|
||||
T1.characteristic,
|
||||
T1.national_drug_code,
|
||||
T1.part_attribute_enum,
|
||||
T1.tho_part_attribute_enum,
|
||||
T1.antibiotic_code,
|
||||
T1.restricted_enum,
|
||||
T1.self_flag,
|
||||
T1.antibiotic_flag,
|
||||
T1.basic_flag,
|
||||
T3.type_code,
|
||||
T3.yb_type,
|
||||
T3.price as retail_price,--零售价
|
||||
(SELECT T4.amount
|
||||
FROM adm_charge_item_definition T3
|
||||
LEFT JOIN adm_charge_item_def_detail T4 ON T4.definition_id = T3.id
|
||||
WHERE T4.condition_code = '2'--2:采购价
|
||||
AND T3.instance_id = T2.medication_def_id
|
||||
AND T3.instance_table = 'med_medication_definition'
|
||||
) as purchase_price,--购入价
|
||||
(
|
||||
SELECT T4.amount
|
||||
FROM adm_charge_item_definition T3
|
||||
LEFT JOIN adm_charge_item_def_detail T4 ON T4.definition_id = T3.id
|
||||
WHERE T4.condition_code = '4'--4:限制
|
||||
AND T3.instance_id = T2.medication_def_id
|
||||
AND T3.instance_table = 'med_medication_definition'
|
||||
) as maximum_retail_price--最高零售价
|
||||
FROM med_medication_definition T1
|
||||
LEFT JOIN med_medication T2 on T1.id = T2.medication_def_id
|
||||
LEFT JOIN adm_charge_item_definition T3 ON T2.medication_def_id = T3.instance_id
|
||||
<where>
|
||||
T1.delete_flag = '0'
|
||||
<if test="id!= 0">
|
||||
AND T1.id = #{id}
|
||||
</if>
|
||||
<if test="tenantId!= null">
|
||||
AND T1.tenant_id = #{tenantId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getPageCount" resultType="java.lang.Long">
|
||||
SELECT COUNT(*)
|
||||
FROM med_medication_definition T1
|
||||
LEFT JOIN med_medication T2 on T1.id = T2.medication_def_id
|
||||
<where>
|
||||
T1.delete_flag = '0'
|
||||
<if test="searchKey!=null and searchKey!='' ">
|
||||
AND ( T1.name LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.name_en LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.merchandise_name LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.bus_no LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.py_str LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.wb_str LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.merchandise_py_str LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.merchandise_wb_str LIKE CONCAT(CONCAT('%', #{searchKey}),'%'))
|
||||
</if>
|
||||
<if test="ybMatchFlag!= -1">
|
||||
AND T1.yb_match_flag = #{ybMatchFlag}
|
||||
</if>
|
||||
<if test="statusEnum!= -1">
|
||||
AND T2.status_enum = #{statusEnum}
|
||||
</if>
|
||||
<if test="categoryCode!=null and categoryCode!='' ">
|
||||
AND T1.category_code = #{categoryCode}
|
||||
<if test="id!= null">
|
||||
AND T2.id = #{id}
|
||||
</if>
|
||||
<if test="tenantId!= null">
|
||||
AND T1.tenant_id = #{tenantId}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
SELECT abi.tenant_id,
|
||||
abi.advice_type,
|
||||
abi.category_code,
|
||||
abi.part_percent,
|
||||
abi.advice_definition_id,
|
||||
abi.advice_name,
|
||||
abi.advice_bus_no,
|
||||
@@ -33,6 +34,7 @@
|
||||
SELECT T1.tenant_id,
|
||||
1 AS advice_type,
|
||||
T1.category_code AS category_code,
|
||||
T1.part_percent AS part_percent,
|
||||
T1.ID AS advice_definition_id,
|
||||
T1.NAME AS advice_name,
|
||||
T1.bus_no AS advice_bus_no,
|
||||
@@ -69,6 +71,7 @@
|
||||
SELECT T1.tenant_id,
|
||||
2 AS advice_type,
|
||||
T1.category_code AS category_code,
|
||||
T1.part_percent AS part_percent,
|
||||
T1.ID AS advice_definition_id,
|
||||
T1.NAME AS advice_name,
|
||||
T1.bus_no AS advice_bus_no,
|
||||
@@ -104,6 +107,7 @@
|
||||
SELECT T1.tenant_id,
|
||||
3 AS advice_type,
|
||||
'' AS category_code,
|
||||
1 AS part_percent,
|
||||
T1.ID AS advice_definition_id,
|
||||
T1.NAME AS advice_name,
|
||||
T1.bus_no AS advice_bus_no,
|
||||
@@ -137,8 +141,6 @@
|
||||
SELECT
|
||||
T1.item_id,
|
||||
T1.item_table,
|
||||
T1.base_quantity,
|
||||
T1.base_unit_code,
|
||||
T1.min_quantity,
|
||||
T1.min_unit_code,
|
||||
T1.lot_number,
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
<?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.pharmacymanage.mapper.WesternMedicineDispenseMapper">
|
||||
<select id="selectEncounterInfoListPage" resultType="com.openhis.web.pharmacymanage.dto.EncounterInfoPageDto">
|
||||
SELECT
|
||||
encounter_id,
|
||||
organization_id,
|
||||
department_name,
|
||||
id_card,
|
||||
patient_name,
|
||||
gender_enum,
|
||||
encounter_date
|
||||
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
DISTINCT
|
||||
T2.id AS encounter_id,
|
||||
TO_CHAR(T2.start_time,'YYYY-MM-DD') AS encounter_date,
|
||||
T2.organization_id,
|
||||
T3.gender_enum,
|
||||
T3.name AS patient_name,
|
||||
T3.id_card,
|
||||
T6.name AS department_name
|
||||
|
||||
FROM med_medication_dispense AS T1
|
||||
|
||||
INNER JOIN adm_encounter AS T2
|
||||
ON T1.encounter_id = T2.id
|
||||
|
||||
INNER JOIN adm_patient AS T3
|
||||
ON T1.patient_id = T3.id
|
||||
|
||||
INNER JOIN med_medication AS T4
|
||||
ON T1.medication_id = T4.id
|
||||
|
||||
INNER JOIN med_medication_definition AS T5
|
||||
ON T4.medication_def_id = T5.id
|
||||
AND T5.category_code IN ('1','2')
|
||||
|
||||
INNER JOIN adm_organization AS T6
|
||||
ON T2.organization_id = T6.id
|
||||
|
||||
WHERE
|
||||
T1.status_enum = 3
|
||||
|
||||
ORDER BY
|
||||
T2.start_time desc,
|
||||
T2.organization_id
|
||||
)
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
<select id="selectPrescriptionPatientInfo" resultType="com.openhis.web.pharmacymanage.dto.PrescriptionPatientInfoDto">
|
||||
SELECT
|
||||
DISTINCT
|
||||
T1.name AS patient_name,
|
||||
T1.gender_enum,
|
||||
T1.birth_date,
|
||||
T4.category_enum,
|
||||
T1.id_card,
|
||||
T5.name AS organization_name,
|
||||
TO_CHAR(T2.start_time,'YYYY-MM-DD') AS encounter_date
|
||||
|
||||
FROM adm_encounter AS T1
|
||||
|
||||
INNER JOIN adm_patient AS T2
|
||||
ON T1.id = T2.encounter_id
|
||||
|
||||
INNER JOIN med_medication_request AS T3
|
||||
ON T1.id = T3.encounter_id
|
||||
|
||||
INNER JOIN fin_contract AS T4
|
||||
ON T3.contract_no = T4.bus_no
|
||||
|
||||
INNER JOIN adm_organization AS T5
|
||||
ON T1.organization_id = T5.id
|
||||
|
||||
WHERE
|
||||
T1.id = #{encounterId}
|
||||
</select>
|
||||
<select id="selectPrescriptionMedicineInfoList" resultType="com.openhis.web.pharmacymanage.dto.PrescriptionMedicineInfoDto">
|
||||
SELECT
|
||||
T7.name AS department_name,
|
||||
T8.name AS doctor_name,
|
||||
T1.prescription_no,
|
||||
T3.name AS medicine_name,
|
||||
T2.total_volume,
|
||||
T1.dose,
|
||||
T1.rate_code,
|
||||
T1.method_code,
|
||||
T1.dose_unit_code,
|
||||
T1.max_dose,
|
||||
T1.first_dose,
|
||||
T1.first_duration,
|
||||
T1.dispense_interval,
|
||||
T1.dispense_per_quantity,
|
||||
T1.dispense_per_duration,
|
||||
T1.quantity,
|
||||
T4.unit_price,
|
||||
T4.total_price
|
||||
|
||||
FROM med_medication_request AS T1
|
||||
|
||||
INNER JOIN med_medication AS T2
|
||||
ON T1.medication_id = T2.id
|
||||
|
||||
INNER JOIN med_medication_definition AS T3
|
||||
ON T2.medication_def_id = T3.id
|
||||
AND T3.category_code IN ('1','2')
|
||||
|
||||
INNER JOIN adm_charge_item AS T4
|
||||
ON T1.id = T4.service_id
|
||||
|
||||
INNER JOIN med_medication_dispense AS T5
|
||||
ON T1.id = T5.med_req_id
|
||||
|
||||
INNER JOIN adm_encounter AS T6
|
||||
ON T1.encounter_id = T6.id
|
||||
|
||||
INNER JOIN adm_organization AS T7
|
||||
ON T6.organization_id = T7.id
|
||||
|
||||
INNER JOIN adm_practitioner AS T8
|
||||
ON T1.practitioner_id = T8.id
|
||||
|
||||
WHERE
|
||||
T1.encountId = #{encounterId}
|
||||
AND T5.status_enum = 3
|
||||
|
||||
ORDER BY
|
||||
T1.prescription_no,
|
||||
T1.medication_id
|
||||
</select>
|
||||
<select id="selectDispenseInventoryInfoByPrescriptionNo" resultType="com.openhis.web.pharmacymanage.dto.DispenseInventoryDto">
|
||||
SELECT
|
||||
T1.id AS dispense_id,
|
||||
T1.unit_code AS dispense_unit_code,
|
||||
T1.quantity AS dispense_quantity,
|
||||
T3.Id AS inventory_id,
|
||||
T3.base_unit_code AS inventory_base_unit_code,
|
||||
T3.base_quantity AS inventory_base_quantity,
|
||||
T3.min_unit_code AS inventory_min_unit_code,
|
||||
T3.min_quantity AS inventory_min_quantity,
|
||||
T5.part_percent
|
||||
|
||||
FROM med_medication_dispense AS T1
|
||||
|
||||
INNER JOIN med_medication_request AS T2
|
||||
ON T1.med_req_id = T2.id
|
||||
|
||||
INNER JOIN wor_inventory_item AS T3
|
||||
ON T1.medication_id = T3.item_id
|
||||
AND T1.item_table = 'med_medication_definition'
|
||||
|
||||
INNER JOIN med_medication AS T4
|
||||
ON T1.medication_id = T4.id
|
||||
|
||||
INNER JOIN med_medication_definition AS T5
|
||||
ON T4.medication_def_id = T5.id
|
||||
|
||||
WHERE
|
||||
T2.prescription_no = #{prescriptionNo}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -189,9 +189,13 @@ public class CommonConstants {
|
||||
*/
|
||||
public interface DictName {
|
||||
/**
|
||||
* 药品分类
|
||||
* 器材
|
||||
*/
|
||||
String MED_CATEGORY_CODE = "med_category_code";
|
||||
/**
|
||||
* 药品分类
|
||||
*/
|
||||
String DEVICE_CATEGORY_CODE = "device_category_code";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,17 @@ public enum AssignSeqEnum {
|
||||
/**
|
||||
* 费用项目编码
|
||||
*/
|
||||
CHARGE_ITEM_NO("8", "费用项目编码", "CI");
|
||||
CHARGE_ITEM_NO("8", "费用项目编码", "CI"),
|
||||
|
||||
/**
|
||||
* 药品项目编码
|
||||
*/
|
||||
MEDICATION_NUM("9", "药品项目编码", "MD"),
|
||||
|
||||
/**
|
||||
* 器材项目编码
|
||||
*/
|
||||
DEVICE_NUM("10", "项目编码", "DD");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.openhis.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 药品请求状态
|
||||
*
|
||||
* @author wangyang
|
||||
* @date 2025-03-14
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DispenseStatus implements HisEnumInterface {
|
||||
|
||||
/**
|
||||
* 草稿
|
||||
*/
|
||||
DRAFT(1, "DR", "草稿"),
|
||||
|
||||
/**
|
||||
* 待配药
|
||||
*/
|
||||
PREPARATION(2, "PR", "待配药"),
|
||||
|
||||
/**
|
||||
* 待发药
|
||||
*/
|
||||
IN_PROGRESS(3, "IN", "待发药"),
|
||||
|
||||
/**
|
||||
* 已发药
|
||||
*/
|
||||
COMPLETED(4, "CO", "已发药"),
|
||||
|
||||
/**
|
||||
* 暂停
|
||||
*/
|
||||
ON_HOLD(5, "ON", "暂停"),
|
||||
|
||||
/**
|
||||
* 停止
|
||||
*/
|
||||
STOPPED(6, "ST", "停止"),
|
||||
|
||||
/**
|
||||
* 拒绝发药
|
||||
*/
|
||||
DECLINED(7, "DE", "拒绝发药 已退药"),
|
||||
|
||||
/**
|
||||
* 已汇总
|
||||
*/
|
||||
SUMMARIZED(8, "SR", "已汇总"),
|
||||
|
||||
/**
|
||||
* 部分发药
|
||||
*/
|
||||
PART_COMPLETED(9, "PC", "部分发药"),
|
||||
|
||||
/**
|
||||
* 部分退药
|
||||
*/
|
||||
PART_REFUND(10, "PR", "部分退药"),
|
||||
|
||||
/**
|
||||
* 退药中
|
||||
*/
|
||||
IN_REFUND(11, "IR", "退药中"),
|
||||
|
||||
/**
|
||||
* 已退药
|
||||
*/
|
||||
REFUNDED(12, "RE", "已退药"),
|
||||
|
||||
/**
|
||||
* 未知
|
||||
*/
|
||||
UNKNOWN(13, "UN", "未知");
|
||||
|
||||
private Integer value;
|
||||
private String code;
|
||||
private String info;
|
||||
|
||||
public static DispenseStatus getByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
for (DispenseStatus val : values()) {
|
||||
if (val.getValue().equals(value)) {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.openhis.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 药品请求状态
|
||||
*
|
||||
* @author wangyang
|
||||
* @date 2025-03-14
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum NotPerformedReasonEnum implements HisEnumInterface {
|
||||
|
||||
/**
|
||||
* 订单已停止
|
||||
*/
|
||||
ORDER_STOPPED(1,"OS", "订单已停止"),
|
||||
|
||||
/**
|
||||
* 过时订单
|
||||
*/
|
||||
OUTDATED_ORDER(2, "OO", "过时订单"),
|
||||
|
||||
/**
|
||||
* 不完整的数据
|
||||
*/
|
||||
INCOMPLETE_DATA(3, "ID", "不完整的数据"),
|
||||
|
||||
/**
|
||||
* 产品不可用
|
||||
*/
|
||||
PRODUCT_NOT_AVAILABLE(4, "PNA", "产品不可用"),
|
||||
|
||||
/**
|
||||
* 道德/宗教
|
||||
*/
|
||||
MORAL_RELIGIOUS(5, "MR", "道德/宗教"),
|
||||
|
||||
/**
|
||||
* 无法提供护理
|
||||
*/
|
||||
UNABLE_PROVIDE(6, "UP", "无法提供护理"),
|
||||
|
||||
/**
|
||||
* 先尝试其他治疗方法
|
||||
*/
|
||||
OTHER_TREATMENT(7, "OT", "先尝试其他治疗方法"),
|
||||
|
||||
/**
|
||||
* 处方/请求需要澄清
|
||||
*/
|
||||
PRESCRIPTION_REQUEST_CLARIFICATION(8, "PRC", "处方/请求需要澄清"),
|
||||
|
||||
/**
|
||||
* 药物水平过高
|
||||
*/
|
||||
EXCESSIVE_DRUG_LEVELS(9, "EDL", "药物水平过高"),
|
||||
|
||||
/**
|
||||
* 入院
|
||||
*/
|
||||
HOSPITALIZED(10, "HO", "入院"),
|
||||
|
||||
/**
|
||||
* 实验室干扰问题
|
||||
*/
|
||||
LABORATORY_INTERFERENCE_ISSUE(11, "LII", "实验室干扰问题"),
|
||||
|
||||
/**
|
||||
* 患者不可用
|
||||
*/
|
||||
PATIENT_UNAVAILABLE(12, "PU", "患者不可用"),
|
||||
|
||||
/**
|
||||
* 患者怀孕或哺乳
|
||||
*/
|
||||
PATIENT_PREGNANT_BREASTFEEDING(13, "PPB", "患者怀孕或哺乳"),
|
||||
|
||||
/**
|
||||
* 过敏
|
||||
*/
|
||||
ALLERGY(14, "AL", "过敏"),
|
||||
|
||||
/**
|
||||
* 药物与另一种药物相互作用
|
||||
*/
|
||||
ANOTHER_DRUG(15, "AD", "药物与另一种药物相互作用"),
|
||||
|
||||
/**
|
||||
* 重复治疗
|
||||
*/
|
||||
REPEAT_TREATMENT(16, "RT", "重复治疗"),
|
||||
|
||||
/**
|
||||
* 疑似不耐受
|
||||
*/
|
||||
SUSPECTED_INTOLERANCE(17, "SI", "疑似不耐受"),
|
||||
|
||||
/**
|
||||
* 计划手术的患者
|
||||
*/
|
||||
PATIENTS_PLANNING_SURGERY(18, "PPS", "计划手术的患者"),
|
||||
|
||||
/**
|
||||
* 冲洗
|
||||
*/
|
||||
WASH(19, "WA", "冲洗"),
|
||||
|
||||
/**
|
||||
* 药物缺货
|
||||
*/
|
||||
DRUG_SHORTAGE(20, "DS", "药物缺货"),
|
||||
|
||||
/**
|
||||
* 药物不可用
|
||||
*/
|
||||
MEDICATION_NOT_AVAILABLE(21, "MNA", "药物不可用");
|
||||
|
||||
private Integer value;
|
||||
private String code;
|
||||
private String info;
|
||||
|
||||
public static NotPerformedReasonEnum getByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
for (NotPerformedReasonEnum val : values()) {
|
||||
if (val.getValue().equals(value)) {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -10,13 +10,15 @@ import lombok.Getter;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum PractitionerRole implements HisEnumInterface {
|
||||
public enum PractitionerRoles implements HisEnumInterface {
|
||||
|
||||
DOCTOR(1, "doctor", "医生"),
|
||||
|
||||
NURSE(2, "nurse", "护士"),
|
||||
|
||||
PHARMACIST(3, "pharmacist", "药师");
|
||||
PHARMACIST(3, "pharmacist", "药师"),
|
||||
|
||||
LOCATION_ADMIN(4, "locationAdmin", "库房管理员");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
@@ -23,37 +23,42 @@ public enum RequestStatus implements HisEnumInterface {
|
||||
/**
|
||||
* 已发送
|
||||
*/
|
||||
COMPLETED(2, "completed", "已发送"),
|
||||
ACTIVE(2, "active", "已发送"),
|
||||
|
||||
/**
|
||||
* 已完成
|
||||
*/
|
||||
COMPLETED(3, "completed", "已完成"),
|
||||
|
||||
/**
|
||||
* 暂停
|
||||
*/
|
||||
ON_HOLD(3, "on_hold", "暂停"),
|
||||
ON_HOLD(4, "on_hold", "暂停"),
|
||||
|
||||
/**
|
||||
* 撤回
|
||||
*/
|
||||
CANCELLED(4, "cancelled", "撤回"),
|
||||
CANCELLED(5, "cancelled", "撤回"),
|
||||
|
||||
/**
|
||||
* 停止
|
||||
*/
|
||||
STOPPED(5, "stopped", "停止"),
|
||||
STOPPED(6, "stopped", "停止"),
|
||||
|
||||
/**
|
||||
* 不可用
|
||||
*/
|
||||
ENDED(6, "ended", "不可用"),
|
||||
|
||||
/**
|
||||
* 未知
|
||||
*/
|
||||
UNKNOWN(7, "unknown", "未知"),
|
||||
ENDED(7, "ended", "不可用"),
|
||||
|
||||
/**
|
||||
* 已汇总
|
||||
*/
|
||||
SUMMARIZED(8, "summarized", "已汇总");
|
||||
SUMMARIZED(8, "summarized", "已汇总"),
|
||||
|
||||
/**
|
||||
* 未知
|
||||
*/
|
||||
UNKNOWN(9, "unknown", "未知");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
|
||||
@@ -15,10 +15,10 @@ import lombok.Getter;
|
||||
@AllArgsConstructor
|
||||
public enum SplitPropertyCode implements HisEnumInterface {
|
||||
|
||||
OUTPATIENT_NON_SPLITTABLE(1, "outpatient_non_splittable", "门诊不可拆分包装单位"),
|
||||
INPATIENT_SPLITTABLE(2, "inpatient_splittable", "住院可拆分包装单位"),
|
||||
EMERGENCY_SPLITTABLE(3, "emergency_splittable", "急诊可拆分包装单位"),
|
||||
PHARMACY_NON_SPLITTABLE(4, "pharmacy_non_splittable", "药房不可拆分包装单位");
|
||||
OUTPATIENT_MIN_UNIT_CEIL(1, "outpatient_min_unit_ceil", "门诊按最小单位每次量向上取整"),
|
||||
OUTPATIENT_PACKAGE_NON_SPLITTABLE(2, "outpatient_package_non_splittable", "门诊按包装单位不可拆分"),
|
||||
OUTPATIENT_MIN_UNIT_TOTAL_CEIL(3, "outpatient_min_unit_total_ceil", "门诊按最小单位总量向上取整"),
|
||||
OUTPATIENT_PACKAGE_UNIT_CEIL(4, "outpatient_package_unit_ceil", "门诊按包装单位每次量向上取整");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.openhis.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 住院临时医嘱拆分属性的枚举
|
||||
*
|
||||
* @author liuhr
|
||||
*
|
||||
* @date 2025/3/28
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum TempOrderSplitPropertyCode implements HisEnumInterface {
|
||||
|
||||
TEMP_ORDER_MIN_UNIT_CEIL(1, "temp_order_min_unit_ceil", "临时医嘱按最小单位每次量向上取整"),
|
||||
TEMP_ORDER_PACKAGE(2, "temp_order_package", "临时医嘱按包装单位开立"),
|
||||
TEMP_ORDER_MIN_UNIT_TOTAL_CEIL(3, "temp_order_min_unit_total_ceil", "临时医嘱按最小单位总量向上取整"),
|
||||
TEMP_ORDER_PACKAGE_UNIT_CEIL(4, "temp_order_package_unit_ceil", "临时医嘱按包装单位每次量向上取整");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
private final String info;
|
||||
}
|
||||
@@ -87,7 +87,7 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private PublicationStatus statusEnum;
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -26,6 +28,7 @@ public class Supplier extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 编号 */
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.openhis.administration.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机构管理Service接口
|
||||
*
|
||||
@@ -27,4 +29,11 @@ public interface IOrganizationService extends IService<Organization> {
|
||||
*/
|
||||
boolean inactiveOrg(Long orgId);
|
||||
|
||||
/**
|
||||
* 获取机构下拉列表
|
||||
*
|
||||
* @param classEnum 机构分类
|
||||
* @return 机构下拉列表
|
||||
*/
|
||||
List<Organization> getList(Integer classEnum);
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
@@ -45,4 +48,15 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取机构下拉列表
|
||||
*
|
||||
* @param classEnum 机构分类
|
||||
* @return 机构下拉列表
|
||||
*/
|
||||
@Override
|
||||
public List<Organization> getList(Integer classEnum) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<Organization>()
|
||||
.select(Organization::getId, Organization::getName).eq(Organization::getClassEnum, classEnum));
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,8 @@ public interface IPaymentReconciliationService extends IService<PaymentReconcili
|
||||
/**
|
||||
* 根据支付id获取对应收费项目的id列表
|
||||
*
|
||||
* @param paymentId 支付id
|
||||
* @param paymentIdList 支付id列表
|
||||
* @return 收费项目的id列表
|
||||
*/
|
||||
List<Long> getChargeItemIdListByPayment(Long paymentId);
|
||||
List<Long> getChargeItemIdListByPayment(List<Long> paymentIdList);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.financial.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -30,21 +31,28 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
/**
|
||||
* 根据支付id获取对应收费项目的id列表
|
||||
*
|
||||
* @param paymentId 支付id
|
||||
* @param paymentIdList 支付id列表
|
||||
* @return 收费项目的id列表
|
||||
*/
|
||||
@Override
|
||||
public List<Long> getChargeItemIdListByPayment(Long paymentId) {
|
||||
public List<Long> getChargeItemIdListByPayment(List<Long> paymentIdList) {
|
||||
|
||||
// 根据支付id获取支付信息
|
||||
PaymentReconciliation paymentReconciliation =
|
||||
paymentReconciliationMapper.selectOne(new LambdaQueryWrapper<PaymentReconciliation>()
|
||||
.select(PaymentReconciliation::getChargeItemIds).eq(PaymentReconciliation::getId, paymentId));
|
||||
if (paymentReconciliation == null) {
|
||||
List<PaymentReconciliation> paymentReconciliationList =
|
||||
paymentReconciliationMapper.selectList(new LambdaQueryWrapper<PaymentReconciliation>()
|
||||
.select(PaymentReconciliation::getChargeItemIds).in(PaymentReconciliation::getId, paymentIdList));
|
||||
if (paymentReconciliationList.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
// 拆解所有的chargeItemId,拼装成一个集合
|
||||
List<String> chargeItemIdList = paymentReconciliationList.stream().map(PaymentReconciliation::getChargeItemIds)
|
||||
.collect(Collectors.toList());
|
||||
List<Long> chargeItemIds = new ArrayList<>();
|
||||
for (String chargeItemId : chargeItemIdList) {
|
||||
chargeItemIds.addAll(Arrays.stream(chargeItemId.split(CommonConstants.Common.COMMA)).map(Long::parseLong)
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
// 将收费项目集合转换成列表
|
||||
return Arrays.stream(paymentReconciliation.getChargeItemIds().split(CommonConstants.Common.COMMA))
|
||||
.map(Long::parseLong).collect(Collectors.toList());
|
||||
return chargeItemIds;
|
||||
}
|
||||
}
|
||||
@@ -156,4 +156,7 @@ public class MedicationDefinition extends HisBaseEntity {
|
||||
/** 基药标识 */
|
||||
private Integer basicFlag;
|
||||
|
||||
/** 住院临时医嘱拆分属性 */
|
||||
private Integer thoPartAttributeEnum;
|
||||
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public class MedicationDetail extends HisBaseEntity {
|
||||
private String wbStr;
|
||||
|
||||
/** 药品分类 */
|
||||
private Integer categoryCode;
|
||||
private String categoryCode;
|
||||
|
||||
/** 商品名称 */
|
||||
private String merchandiseName;
|
||||
@@ -198,5 +198,6 @@ public class MedicationDetail extends HisBaseEntity {
|
||||
private String manufacturerText;
|
||||
/** 用量限定 */
|
||||
private BigDecimal usageLimit;
|
||||
|
||||
/** 住院临时医嘱拆分属性 */
|
||||
private Integer thoPartAttributeEnum;
|
||||
}
|
||||
|
||||
@@ -20,11 +20,4 @@ public interface IMedicationDefinitionService extends IService<MedicationDefinit
|
||||
*/
|
||||
boolean addMedication(MedicationDetail medicationDetail);
|
||||
|
||||
/**
|
||||
* 新增医保药品目录
|
||||
*
|
||||
* @param medicationDetail
|
||||
* @return
|
||||
*/
|
||||
boolean addYbMedicatione(MedicationDetail medicationDetail);
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.openhis.medication.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.medication.domain.MedicationDispense;
|
||||
import com.openhis.medication.domain.MedicationRequest;
|
||||
|
||||
/**
|
||||
* 药品发放管理Service接口
|
||||
@@ -11,4 +14,10 @@ import com.openhis.medication.domain.MedicationDispense;
|
||||
*/
|
||||
public interface IMedicationDispenseService extends IService<MedicationDispense> {
|
||||
|
||||
/**
|
||||
* 新增草稿状态的药品发放信息
|
||||
*
|
||||
* @param medicationRequestList 药品请求信息
|
||||
*/
|
||||
void addMedicationDispense(List<MedicationRequest> medicationRequestList);
|
||||
}
|
||||
@@ -32,6 +32,4 @@ public interface IMedicationService extends IService<Medication> {
|
||||
// 新增药品目录
|
||||
boolean addMedication(MedicationDetail medicationDetail);
|
||||
|
||||
// 新增医保药品目录
|
||||
boolean addYbMedicatione(MedicationDetail medicationDetail);
|
||||
}
|
||||
@@ -60,8 +60,5 @@ public class MedicationDefinitionServiceImpl extends ServiceImpl<MedicationDefin
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addYbMedicatione(MedicationDetail medicationDetail) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,9 +1,14 @@
|
||||
package com.openhis.medication.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.core.common.utils.DateUtils;
|
||||
import com.openhis.common.enums.DispenseStatus;
|
||||
import com.openhis.medication.domain.MedicationDispense;
|
||||
import com.openhis.medication.domain.MedicationRequest;
|
||||
import com.openhis.medication.mapper.MedicationDispenseMapper;
|
||||
import com.openhis.medication.service.IMedicationDispenseService;
|
||||
|
||||
@@ -14,6 +19,59 @@ import com.openhis.medication.service.IMedicationDispenseService;
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispenseMapper, MedicationDispense> implements IMedicationDispenseService {
|
||||
public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispenseMapper, MedicationDispense>
|
||||
implements IMedicationDispenseService {
|
||||
|
||||
/**
|
||||
* 新增草稿状态的药品发放信息
|
||||
*
|
||||
* @param medicationRequestList 药品请求信息
|
||||
*/
|
||||
@Override
|
||||
public void addMedicationDispense(List<MedicationRequest> medicationRequestList) {
|
||||
for (MedicationRequest medicationRequest : medicationRequestList) {
|
||||
MedicationDispense medicationDispense = new MedicationDispense();
|
||||
// 药品发放id
|
||||
medicationDispense.setBusNo(medicationRequest.getBusNo());
|
||||
// 药品发放状态
|
||||
medicationDispense.setStatusEnum(DispenseStatus.DRAFT.getValue());
|
||||
// 状态变更时间
|
||||
medicationDispense.setStatusChangedTime(DateUtils.getNowDate());
|
||||
// 发药类型
|
||||
medicationDispense.setDispenseEnum(medicationRequest.getCategoryEnum());
|
||||
// 药品编码
|
||||
medicationDispense.setMedicationId(medicationRequest.getMedicationId());
|
||||
// 请求数量
|
||||
medicationDispense.setQuantity(medicationRequest.getQuantity());
|
||||
// 请求单位编码
|
||||
medicationDispense.setUnitCode(medicationRequest.getUnitCode());
|
||||
// 产品批号
|
||||
medicationDispense.setLotNumber(medicationRequest.getLotNumber());
|
||||
// 患者id
|
||||
medicationDispense.setPatientId(medicationRequest.getPatientId());
|
||||
// 就诊id
|
||||
medicationDispense.setEncounterId(medicationRequest.getEncounterId());
|
||||
// 支持用药信息
|
||||
medicationDispense.setSupportInfo(medicationRequest.getSupportInfo());
|
||||
// 发药人
|
||||
medicationDispense.setPractitionerId(medicationRequest.getPractitionerId());
|
||||
// 发放药房
|
||||
medicationDispense.setLocationId(medicationRequest.getPerformOrg());
|
||||
// 药品请求id
|
||||
medicationDispense.setMedReqId(medicationRequest.getId());
|
||||
// 已发药数量
|
||||
medicationDispense.setDispenseQuantity(0);
|
||||
// 用法
|
||||
medicationDispense.setMethodCode(medicationRequest.getMethodCode());
|
||||
// 用药频次
|
||||
medicationDispense.setFrequencyCode(medicationRequest.getRateCode());
|
||||
// 单次剂量
|
||||
medicationDispense.setDose(medicationRequest.getDose());
|
||||
// 剂量单位
|
||||
medicationDispense.setDoseUnitCode(medicationRequest.getDoseUnitCode());
|
||||
// 单次最大剂量
|
||||
medicationDispense.setMaxUnit(medicationRequest.getMaxDose());
|
||||
baseMapper.insert(medicationDispense);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,14 +83,4 @@ public class MedicationServiceImpl extends ServiceImpl<MedicationMapper, Medicat
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品目录
|
||||
*
|
||||
* @param medicationDetail
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean addYbMedicatione(MedicationDetail medicationDetail) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,9 @@
|
||||
"moment": "^2.30.1",
|
||||
"nprogress": "0.2.0",
|
||||
"pinia": "2.1.7",
|
||||
"pinyin": "^4.0.0-alpha.2",
|
||||
"province-city-china": "^8.5.8",
|
||||
"segmentit": "^2.0.3",
|
||||
"v-region": "^3.3.0",
|
||||
"vue": "3.3.9",
|
||||
"vue-area-linkage": "^5.1.0",
|
||||
|
||||
@@ -278,6 +278,7 @@
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
<!-- </el-form-item> -->
|
||||
</el-form-item>
|
||||
@@ -449,14 +450,6 @@ function handleSelectionChange(selection) {
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
proxy.download(
|
||||
"system/user/importTemplate",
|
||||
{},
|
||||
`user_template_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="服务分类" prop="categoryCode">
|
||||
<el-select v-model="form.categoryCode" placeholder="请选择">
|
||||
<el-select v-model="form.categoryCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in category_code"
|
||||
:key="dict.value"
|
||||
@@ -248,7 +248,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="服务类型" prop="fwTypeCode">
|
||||
<el-select v-model="form.fwTypeCode" placeholder="请选择">
|
||||
<el-select v-model="form.fwTypeCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in service_type_code"
|
||||
:key="dict.value"
|
||||
@@ -260,7 +260,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="服务专业" prop="specialtyCode">
|
||||
<el-select v-model="form.specialtyCode" placeholder="请选择">
|
||||
<el-select v-model="form.specialtyCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in specialty_code"
|
||||
:key="dict.value"
|
||||
@@ -281,6 +281,7 @@
|
||||
value-key="id"
|
||||
placeholder="请选择地点"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -293,6 +294,7 @@
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -300,7 +302,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动标记" prop="activeFlag">
|
||||
<el-select v-model="form.activeFlag" placeholder="请选择">
|
||||
<el-select v-model="form.activeFlag" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="item in activeFlagOptions"
|
||||
:key="item.value"
|
||||
@@ -327,6 +329,7 @@
|
||||
<el-select
|
||||
v-model="form.appointmentRequiredFlag"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in appointmentRequiredFlagOptions"
|
||||
@@ -393,7 +396,7 @@
|
||||
<el-row v-if="form.id == undefined">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="财务类型" prop="cwTypeCode">
|
||||
<el-select v-model="form.cwTypeCode" placeholder="请选择">
|
||||
<el-select v-model="form.cwTypeCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in financial_type_code"
|
||||
:key="dict.value"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询器材目录列表
|
||||
export function getDeviceList(query) {
|
||||
@@ -14,8 +13,9 @@ export function getDeviceList(query) {
|
||||
// 查询器材目录详细
|
||||
export function getDeviceOne(id) {
|
||||
return request({
|
||||
url: '/data-dictionary/device/information-one/' + parseStrEmpty(id),
|
||||
method: 'get'
|
||||
url: '/data-dictionary/device/information-one',
|
||||
method: 'get',
|
||||
params: { id } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="medicationRef"
|
||||
ref="deviceDialogRef"
|
||||
label-width="110px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-col :span="8" v-if="form.id != undefined">
|
||||
<el-form-item label="编号" prop="busNo">
|
||||
<el-input
|
||||
v-model="form.busNo"
|
||||
placeholder="请输入编码"
|
||||
:disabled="form.id != undefined"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -24,49 +24,25 @@
|
||||
<el-input v-model="form.name" placeholder="请输入器材名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item
|
||||
label="拼音码(器材名称)"
|
||||
prop="pyStr"
|
||||
class="custom-label-spacing"
|
||||
>
|
||||
<el-input v-model="form.pyStr" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点" prop="locationId">
|
||||
<el-form-item label="器材分类" prop="categoryCode">
|
||||
<el-tree-select
|
||||
v-model="form.locationId"
|
||||
:data="locationOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择地点"
|
||||
check-strictly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="器材五笔拼音" prop="wbStr">
|
||||
<el-input v-model="form.wbStr" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材分类" prop="categoryEnum">
|
||||
<el-tree-select
|
||||
v-model="form.categoryEnum"
|
||||
v-model="form.categoryCode"
|
||||
:data="deviceCategories"
|
||||
:props="{ value: 'value', label: 'info', children: 'children' }"
|
||||
value-key="value"
|
||||
placeholder=""
|
||||
check-strictly
|
||||
disabled
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材种类" prop="typeCode">
|
||||
<el-select v-model="form.typeCode" placeholder="请选择">
|
||||
<el-select v-model="form.typeCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in device_type_code"
|
||||
:key="dict.value"
|
||||
@@ -85,6 +61,20 @@
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点" prop="locationId">
|
||||
<el-tree-select
|
||||
v-model="form.locationId"
|
||||
:data="locationOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择地点"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -92,7 +82,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="包装单位" prop="unitCode">
|
||||
<el-select v-model="form.unitCode" placeholder="请选择">
|
||||
<el-select v-model="form.unitCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
@@ -103,13 +93,20 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="包装规格" prop="size">
|
||||
<el-input v-model="form.size" placeholder="" />
|
||||
<el-form-item label="销售单位" prop="salesUnitCode">
|
||||
<el-select v-model="form.salesUnitCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最小单位" prop="minUnitCode">
|
||||
<el-select v-model="form.minUnitCode" placeholder="请选择">
|
||||
<el-select v-model="form.minUnitCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
@@ -121,6 +118,11 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="包装规格" prop="size">
|
||||
<el-input v-model="form.size" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拆零比" prop="partPercent">
|
||||
<el-input v-model="form.partPercent" placeholder="" />
|
||||
@@ -131,56 +133,38 @@
|
||||
<el-input v-model="form.modelNumber" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="高值器材标志" prop="hvcmFlag">
|
||||
<!-- <el-input
|
||||
v-model="form.hvcmFlag"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/> -->
|
||||
<el-checkbox v-model="form.hvcmFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="销售单位" prop="salesUnitCode">
|
||||
<el-select v-model="form.salesUnitCode" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="批准文号" prop="approvalNumber">
|
||||
<el-input v-model="form.approvalNumber" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保标记" prop="ybFlag">
|
||||
<!-- <el-input v-model="form.ybFlag" placeholder="" /> -->
|
||||
<el-checkbox v-model="form.ybFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保编码" prop="ybNo">
|
||||
<el-input v-model="form.ybNo" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保对码标记" prop="ybMatchFlag">
|
||||
<el-checkbox v-model="form.ybMatchFlag"></el-checkbox>
|
||||
<el-form-item label="器材版本" prop="version">
|
||||
<el-input v-model="form.version" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="主要成分" prop="substanceText">
|
||||
<el-input v-model="form.substanceText" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="适用范围" prop="jurisdiction">
|
||||
<el-input v-model="form.jurisdiction" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态" prop="statusEnum">
|
||||
<el-select v-model="form.statusEnum" placeholder="请选择">
|
||||
<el-select v-model="form.statusEnum" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in statusFlagOptions"
|
||||
:key="dict.value"
|
||||
@@ -199,9 +183,8 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商" prop="supplyId">
|
||||
<!-- <el-input v-model="form.supplyId" placeholder="" /> -->
|
||||
<el-select
|
||||
v-model="form.supplierId"
|
||||
v-model="form.supplyId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@@ -215,36 +198,80 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="适用范围" prop="jurisdiction">
|
||||
<el-input v-model="form.jurisdiction" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="执行科室" prop="ruleId">
|
||||
<el-input v-model="form.ruleId" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材版本" prop="version">
|
||||
<el-input v-model="form.version" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="主要成分" prop="substanceText">
|
||||
<el-input v-model="form.substanceText" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="过敏标记" prop="allergenFlag">
|
||||
<el-checkbox v-model="form.allergenFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保标记" prop="ybFlag">
|
||||
<el-checkbox v-model="form.ybFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保对码标记" prop="ybMatchFlag">
|
||||
<el-checkbox v-model="form.ybMatchFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="高值器材标志" prop="hvcmFlag">
|
||||
<el-checkbox v-model="form.hvcmFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="财务类型" prop="itemTypeCode">
|
||||
<el-select
|
||||
v-model="form.itemTypeCode"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="category in fin_type_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保类别" prop="ybType">
|
||||
<el-select
|
||||
v-model="form.ybType"
|
||||
placeholder="医保类别"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in yb_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="购入价" prop="purchasePrice">
|
||||
<el-input v-model="form.purchasePrice" placeholder="" :disabled="form.id != undefined"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="零售价" prop="retailPrice">
|
||||
<el-input v-model="form.retailPrice" placeholder="" :disabled="form.id != undefined"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最高零售价" prop="maximumRetailPrice">
|
||||
<el-input v-model="form.maximumRetailPrice" placeholder="" :disabled="form.id != undefined"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="说明" prop="description">
|
||||
@@ -270,20 +297,18 @@
|
||||
|
||||
<script setup name="MedicineDialog">
|
||||
import {
|
||||
getDeviceList,
|
||||
editDevice,
|
||||
addDevice,
|
||||
getDiseaseTreatmentInit,
|
||||
getDeviceOne,
|
||||
deptTreeSelect,
|
||||
locationTreeSelect,
|
||||
} from "./device";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { device_type_code, unit_code } = proxy.useDict(
|
||||
const { device_type_code, unit_code,fin_type_code,yb_type } = proxy.useDict(
|
||||
"device_type_code",
|
||||
"unit_code"
|
||||
"unit_code",
|
||||
"fin_type_code",
|
||||
"yb_type"
|
||||
);
|
||||
|
||||
const title = ref("");
|
||||
@@ -302,7 +327,7 @@ const data = reactive({
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
pyStr: [{ required: true, message: "拼音不能为空", trigger: "blur" }],
|
||||
wbStr: [{ required: true, message: "五笔拼音不能为空", trigger: "blur" }],
|
||||
categoryEnum: [
|
||||
categoryCode: [
|
||||
{ required: true, message: "器材分类不能为空", trigger: "blur" },
|
||||
],
|
||||
typeCode: [
|
||||
@@ -352,6 +377,11 @@ const data = reactive({
|
||||
],
|
||||
orgId: [{ required: true, message: "提供部门不能为空", trigger: "blur" }],
|
||||
locationId: [{ required: true, message: "地点不能为空", trigger: "blur" }],
|
||||
purchasePrice:[{ required: true, message: "购入价不能为空", trigger: "blur" }],
|
||||
retailPrice:[{ required: true, message: "零售价不能为空", trigger: "blur" }],
|
||||
maximumRetailPrice:[{ required: true, message: "最高零售价不能为空", trigger: "blur" }],
|
||||
ybType:[{ required: true, message: "医保类型不能为空", trigger: "blur" }],
|
||||
itemTypeCode:[{ required: true, message: "财务类型不能为空", trigger: "blur" }],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -374,17 +404,25 @@ const props = defineProps({
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
currentCategoryEnum: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
supplierListOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
reset();
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
title.value = "";
|
||||
title.value = props.title;
|
||||
deviceCategories.value = props.deviceCategories;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
form.value.categoryCode = props.currentCategoryEnum;
|
||||
supplierListOptions.value = props.supplierListOptions;
|
||||
console.log(props, "22222", title.value, props.deviceCategories);
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
@@ -395,7 +433,6 @@ function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -404,19 +441,17 @@ function getLocationTree() {
|
||||
locationTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
locationOptions.value = response.data.records;
|
||||
console.log(locationOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
reset();
|
||||
title.value = "";
|
||||
title.value = props.title;
|
||||
form.value = props.item;
|
||||
deviceCategories.value = props.deviceCategories;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
supplierListOptions.value = props.supplierListOptions;
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
visible.value = true;
|
||||
@@ -429,7 +464,7 @@ function reset() {
|
||||
name: undefined, // 名称
|
||||
pyStr: undefined, // 拼音码
|
||||
wbStr: undefined, // 五笔码
|
||||
categoryEnum: undefined, // 类别
|
||||
categoryCode: undefined, // 类别
|
||||
typeCode: undefined, // 类型编码
|
||||
unitCode: undefined, // 单位编码
|
||||
size: undefined, // 规格
|
||||
@@ -453,8 +488,13 @@ function reset() {
|
||||
allergenFlag: undefined, // 过敏标记
|
||||
orgId: undefined, // 科室ID
|
||||
locationId: undefined, // 地点ID
|
||||
ybType: undefined, // 医保类型
|
||||
itemTypeCode: undefined, // 最小收费
|
||||
purchasePrice: undefined, // 购入价
|
||||
retailPrice: undefined, // 零售价
|
||||
maximumRetailPrice: undefined, // 最高零售价
|
||||
};
|
||||
proxy.resetForm("medicationRef");
|
||||
proxy.resetForm("deviceDialogRef");
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
label-width="68px"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="5">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="项目名" prop="searchKey" label-width="55">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
@@ -50,33 +50,21 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="5">
|
||||
<el-form-item
|
||||
label="医保是否对码"
|
||||
prop="ybMatchFlag"
|
||||
label-width="100"
|
||||
>
|
||||
<el-select v-model="queryParams.ybMatchFlag" placeholder="">
|
||||
<el-option
|
||||
v-for="item in exeOrganizations"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="执行科室" prop="ruleId" label-width="100">
|
||||
<el-select
|
||||
v-model="queryParams.ruleId"
|
||||
v-model="queryParams.ybMatchFlag"
|
||||
placeholder=""
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in exeOrganizations"
|
||||
v-for="item in statusYBWeatherOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
@@ -96,15 +84,6 @@
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>添加为本机构项目</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
@@ -137,7 +116,7 @@
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@@ -146,7 +125,7 @@
|
||||
v-hasPermi="['system:user:export']"
|
||||
>导出Excel</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
@@ -180,24 +159,24 @@
|
||||
<el-table-column
|
||||
label="器材分类"
|
||||
align="center"
|
||||
key="categoryEnum"
|
||||
prop="categoryEnum"
|
||||
key="categoryCode_dictText"
|
||||
prop="categoryCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="器材种类"
|
||||
align="center"
|
||||
key="typeCode"
|
||||
prop="typeCode"
|
||||
key="typeCode_dictText"
|
||||
prop="typeCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
key="unitCode"
|
||||
prop="unitCode"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -217,8 +196,22 @@
|
||||
<el-table-column
|
||||
label="最小使用单位"
|
||||
align="center"
|
||||
key="minUnitCode"
|
||||
prop="minUnitCode"
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="所属科室"
|
||||
align="center"
|
||||
key="orgId_dictText"
|
||||
prop="orgId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="所在位置"
|
||||
align="center"
|
||||
key="locationId_dictText"
|
||||
prop="locationId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -239,8 +232,8 @@
|
||||
<el-table-column
|
||||
label="销售单位"
|
||||
align="center"
|
||||
key="salesUnitCode"
|
||||
prop="salesUnitCode"
|
||||
key="salesUnitCode_dictText"
|
||||
prop="salesUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
@@ -277,24 +270,32 @@
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
key="statusEnum"
|
||||
prop="statusEnum"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
label="生产厂家"
|
||||
align="center"
|
||||
key="manufacturerId"
|
||||
prop="manufacturerId"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产厂家"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplyId"
|
||||
prop="supplyId"
|
||||
key="supplyId_dictText"
|
||||
prop="supplyId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/>
|
||||
@@ -313,13 +314,6 @@
|
||||
:show-overflow-tooltip="true"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="执行科室"
|
||||
align="center"
|
||||
key="ruleId"
|
||||
prop="ruleId"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="器材版本"
|
||||
align="center"
|
||||
@@ -343,6 +337,30 @@
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价"
|
||||
align="center"
|
||||
key="retailPrice"
|
||||
prop="retailPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="财务类别"
|
||||
align="center"
|
||||
key="itemTypeCode_dictText"
|
||||
prop="itemTypeCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保类别"
|
||||
align="center"
|
||||
key="ybType_dictText"
|
||||
prop="ybType_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
@@ -359,14 +377,14 @@
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="openViewDevice(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>查看</el-button
|
||||
>
|
||||
> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -383,8 +401,10 @@
|
||||
ref="deviceRef"
|
||||
:title="title"
|
||||
:item="currentData"
|
||||
:currentCategoryEnum="currentCategoryEnum"
|
||||
:deviceCategories="deviceCategories"
|
||||
:statusFlagOptions="statusFlagOptions"
|
||||
:supplierListOptions="supplierListOptions"
|
||||
@submit="getList()"
|
||||
/>
|
||||
<!-- <device-view-dialog
|
||||
@@ -407,15 +427,9 @@ import deviceDialog from "./components/deviceDialog";
|
||||
import deviceViewDialog from "./components/deviceViewDialog";
|
||||
import { nextTick } from "vue";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_normal_disable",
|
||||
"sys_user_sex"
|
||||
);
|
||||
|
||||
const deviceList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]); // 存储选择的行数据
|
||||
@@ -425,11 +439,13 @@ const total = ref(0);
|
||||
const title = ref("");
|
||||
const deviceCategories = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const exeOrganizations = ref(undefined);
|
||||
const statusYBWeatherOptions = ref(undefined);
|
||||
const supplierListOptions = ref(undefined);
|
||||
// 使用 ref 定义当前器材数据
|
||||
const currentData = ref({});
|
||||
// 使用 ref 定义当前查看器材数据
|
||||
const viewData = ref({});
|
||||
const currentCategoryEnum = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
@@ -441,14 +457,9 @@ const data = reactive({
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
ybMatchFlag: undefined, // 是否医保匹配(包括 1:是,0:否)
|
||||
ruleId: undefined, // 执行科室
|
||||
categoryEnum: undefined, // 目录分类
|
||||
},
|
||||
rules: {
|
||||
// name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
// conditionCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
categoryCode: undefined, // 目录分类
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
@@ -463,24 +474,28 @@ const filterNode = (value, data) => {
|
||||
function getDiseaseTreatmentList() {
|
||||
getDiseaseTreatmentInit().then((response) => {
|
||||
console.log(response, "response器材目录分类查询下拉树结构");
|
||||
deviceCategories.value = response.data.deviceCategories;
|
||||
deviceCategories.value = response.data.deviceCategories.sort((a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
});
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
exeOrganizations.value = response.data.exeOrganizations;
|
||||
statusYBWeatherOptions.value = response.data.statusYBWeatherOptions;
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
});
|
||||
}
|
||||
/** 查询器材目录列表 */
|
||||
function getList() {
|
||||
console.log(getList, "getList");
|
||||
loading.value = true;
|
||||
getDeviceList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
deviceList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
console.log(deviceList.value, "getList", total.value);
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
queryParams.value.categoryEnum = data.value;
|
||||
queryParams.value.categoryCode = data.value;
|
||||
currentCategoryEnum.value = data.value;
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
@@ -538,17 +553,11 @@ function handleSelectionChange(selection) {
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
proxy.download(
|
||||
"system/user/importTemplate",
|
||||
{},
|
||||
`user_template_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
/** 打开新增弹窗 */
|
||||
function openAddDevice() {
|
||||
if (!currentCategoryEnum.value) {
|
||||
return proxy.$modal.msgError("请选择器材目录分类");
|
||||
}
|
||||
console.log("打开新增弹窗");
|
||||
title.value = "新增";
|
||||
nextTick(() => {
|
||||
@@ -559,27 +568,50 @@ function openAddDevice() {
|
||||
function openEditDevice(row) {
|
||||
currentData.value = {};
|
||||
console.log("打开编辑弹窗");
|
||||
currentData.value = JSON.parse(JSON.stringify(row));
|
||||
console.log(currentData.value, "currentData");
|
||||
currentData.value.hvcmFlag == 1
|
||||
? (currentData.value.hvcmFlag = true)
|
||||
: (currentData.value.hvcmFlag = false);
|
||||
currentData.value.ybFlag == 1
|
||||
? (currentData.value.ybFlag = true)
|
||||
: (currentData.value.ybFlag = false);
|
||||
currentData.value.ybMatchFlag == 1
|
||||
? (currentData.value.ybMatchFlag = true)
|
||||
: (currentData.value.ybMatchFlag = false);
|
||||
currentData.value.allergenFlag == 1
|
||||
? (currentData.value.allergenFlag = true)
|
||||
: (currentData.value.allergenFlag = false);
|
||||
console.log(currentData.value, "currentDataform");
|
||||
|
||||
title.value = "编辑";
|
||||
// 确保子组件已经接收到最新的 props
|
||||
nextTick(() => {
|
||||
proxy.$refs["deviceRef"].edit();
|
||||
getDeviceOne(row.id).then((response) => {
|
||||
console.log(response, "currentDataform");
|
||||
currentData.value = response.data;
|
||||
if (currentData.value) {
|
||||
currentData.value.hvcmFlag == 1
|
||||
? (currentData.value.hvcmFlag = true)
|
||||
: (currentData.value.hvcmFlag = false);
|
||||
currentData.value.ybFlag == 1
|
||||
? (currentData.value.ybFlag = true)
|
||||
: (currentData.value.ybFlag = false);
|
||||
currentData.value.ybMatchFlag == 1
|
||||
? (currentData.value.ybMatchFlag = true)
|
||||
: (currentData.value.ybMatchFlag = false);
|
||||
currentData.value.allergenFlag == 1
|
||||
? (currentData.value.allergenFlag = true)
|
||||
: (currentData.value.allergenFlag = false);
|
||||
}
|
||||
title.value = "编辑";
|
||||
nextTick(() => {
|
||||
proxy.$refs["deviceRef"].edit();
|
||||
});
|
||||
getList();
|
||||
});
|
||||
// currentData.value = JSON.parse(JSON.stringify(row));
|
||||
// console.log(currentData.value, "currentData");
|
||||
// currentData.value.hvcmFlag == 1
|
||||
// ? (currentData.value.hvcmFlag = true)
|
||||
// : (currentData.value.hvcmFlag = false);
|
||||
// currentData.value.ybFlag == 1
|
||||
// ? (currentData.value.ybFlag = true)
|
||||
// : (currentData.value.ybFlag = false);
|
||||
// currentData.value.ybMatchFlag == 1
|
||||
// ? (currentData.value.ybMatchFlag = true)
|
||||
// : (currentData.value.ybMatchFlag = false);
|
||||
// currentData.value.allergenFlag == 1
|
||||
// ? (currentData.value.allergenFlag = true)
|
||||
// : (currentData.value.allergenFlag = false);
|
||||
// console.log(currentData.value, "currentDataform");
|
||||
|
||||
// title.value = "编辑";
|
||||
// // 确保子组件已经接收到最新的 props
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["deviceRef"].edit();
|
||||
// });
|
||||
// proxy.$refs["deviceRef"].edit();
|
||||
}
|
||||
/** 打开查看弹窗 */
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="medicationRef"
|
||||
ref="diagnosisTreatmentRef"
|
||||
label-width="110px"
|
||||
label-position="left"
|
||||
>
|
||||
@@ -21,101 +21,216 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder="请输入器材名称"
|
||||
/>
|
||||
<el-input v-model="form.name" placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label="拼音码(项目名称)"
|
||||
prop="pyStr"
|
||||
class="custom-label-spacing"
|
||||
>
|
||||
<el-input v-model="form.pyStr" placeholder=""/>
|
||||
<el-form-item label="所属科室" prop="orgId">
|
||||
<el-tree-select
|
||||
v-model="form.orgId"
|
||||
:data="deptOptions"
|
||||
:props="{
|
||||
value: 'id',
|
||||
label: 'name',
|
||||
children: 'children',
|
||||
}"
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="五笔拼音" prop="wbStr">
|
||||
<el-input v-model="form.wbStr" placeholder=""/>
|
||||
<el-form-item label="地点" prop="locationId">
|
||||
<el-tree-select
|
||||
v-model="form.locationId"
|
||||
:data="locationOptions"
|
||||
:props="{
|
||||
value: 'id',
|
||||
label: 'name',
|
||||
children: 'children',
|
||||
}"
|
||||
value-key="id"
|
||||
placeholder="请选择地点"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目录分类" prop="categoryEnum">
|
||||
<el-input
|
||||
<el-tree-select
|
||||
v-model="form.categoryEnum"
|
||||
placeholder=""
|
||||
:data="diseaseTreatmentCategoryList"
|
||||
:props="{
|
||||
value: 'id',
|
||||
label: 'info',
|
||||
children: 'children',
|
||||
}"
|
||||
value-key="id"
|
||||
placeholder="请选择地点"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="类型" prop="typeCode">
|
||||
<el-input v-model="form.typeCode" placeholder=""/>
|
||||
<el-select v-model="form.typeCode" placeholder="" clearable>
|
||||
<el-option
|
||||
v-for="item in typeEnumOptions"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态" prop="statusEnum">
|
||||
<el-select v-model="form.statusEnum" clearable>
|
||||
<el-option
|
||||
v-for="status in statusFlagOptions"
|
||||
:key="status.value"
|
||||
:label="status.info"
|
||||
:value="status.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="使用单位" prop="permittedUnitCode">
|
||||
<el-input
|
||||
v-model="form.permittedUnitCode"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保标记" prop="ybFlag">
|
||||
<!-- <el-input v-model="form.ybFlag" placeholder=""/> -->
|
||||
<el-checkbox v-model="form.ybFlag"></el-checkbox>
|
||||
<!-- <el-input v-model="form.ybFlag" placeholder=""/> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保编码" prop="conditionCode">
|
||||
<el-input v-model="form.ybNo" placeholder=""/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保对码标记" prop="ybMatchFlag">
|
||||
<el-checkbox v-model="form.ybMatchFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态" prop="statusEnum">
|
||||
<el-input
|
||||
v-model="form.statusEnum"
|
||||
placeholder=""
|
||||
/>
|
||||
<el-form-item label="医保编码" prop="conditionCode">
|
||||
<el-input v-model="form.ybNo" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保类别" prop="ybType">
|
||||
<el-select
|
||||
v-model="form.ybType"
|
||||
placeholder="医保类别"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in yb_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="身体部位" prop="bodySiteCode">
|
||||
<!-- <el-input v-model="form.ybFlag" placeholder=""/> -->
|
||||
<el-input
|
||||
<el-select
|
||||
v-model="form.bodySiteCode"
|
||||
placeholder=""
|
||||
/>
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in body_site_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所需标本" prop="specimenCode">
|
||||
<el-select
|
||||
v-model="form.specimenCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in specimen_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所需标本" prop="specimenCode">
|
||||
<el-input
|
||||
v-model="form.specimenCode"
|
||||
placeholder=""
|
||||
/>
|
||||
<el-form-item label="执行科室" prop="ruleId">
|
||||
<el-select v-model="form.ruleId" placeholder="" clearable>
|
||||
<el-option
|
||||
v-for="item in exeOrganizations"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规则id" prop="ruleId">
|
||||
<el-checkbox v-model="form.ruleId"></el-checkbox>
|
||||
<el-form-item label="使用单位" prop="permittedUnitCode">
|
||||
<el-select
|
||||
v-model="form.permittedUnitCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="财务类型" prop="minimalFee">
|
||||
<el-select
|
||||
v-model="form.minimalFee"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in fin_type_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="购入价" prop="purchasePrice">
|
||||
<el-input v-model="form.purchasePrice" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="零售价" prop="retailPrice">
|
||||
<el-input v-model="form.retailPrice" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最高零售价" prop="maximumRetailPrice">
|
||||
<el-input v-model="form.maximumRetailPrice" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -142,42 +257,52 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="MedicineDialog">
|
||||
<script setup name="DiagnosisTreatmentDialog">
|
||||
import {
|
||||
getDiagnosisTreatmentList,
|
||||
editDiagnosisTreatment,
|
||||
addDiagnosisTreatment,
|
||||
getDiseaseTreatmentInit,
|
||||
getDiagnosisTreatmentOne,
|
||||
deptTreeSelect,
|
||||
locationTreeSelect,
|
||||
} from "./diagnosistreatment";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_normal_disable",
|
||||
"sys_user_sex"
|
||||
const { unit_code, yb_type, fin_type_code } = proxy.useDict(
|
||||
"unit_code",
|
||||
"yb_type",
|
||||
"fin_type_code"
|
||||
);
|
||||
|
||||
const title = ref("");
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(["submit"]); // 声明自定义事件
|
||||
const categoryEnum = ref("");
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
const locationOptions = ref(undefined); // 地点树选项
|
||||
const diseaseTreatmentCategoryList = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const exeOrganizations = ref(undefined);
|
||||
const typeEnumOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
// busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
||||
// name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
// pyStr: [{ required: true, message: "拼音不能为空", trigger: "blur" }],
|
||||
// wbStr: [{ required: true, message: "五笔拼音不能为空", trigger: "blur" }],
|
||||
// categoryEnum: [{ required: true, message: "器材分类不能为空", trigger: "blur" }],
|
||||
// typeCode: [{ required: true, message: "器材种类不能为空", trigger: "blur" }],
|
||||
// unitCode: [{ required: true, message: "包装单位不能为空", trigger: "blur" }],
|
||||
// size: [{ required: true, message: "包装规格不能为空", trigger: "blur" }],
|
||||
// partPercent: [{ required: true, message: "拆零比不能为空", trigger: "blur" }],
|
||||
// minUnitCode: [{ required: true, message: "最小使用单位不能为空", trigger: "blur" }],
|
||||
// modelNumber: [{ required: true, message: "产品型号不能为空", trigger: "blur" }],
|
||||
// hvcmFlag: [{ required: true, message: "高值器材标志不能为空", trigger: "blur" }],
|
||||
// salesUnitCode: [{ required: true, message: "销售单位不能为空", trigger: "blur" }],
|
||||
busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
statusEnum: [{ required: true, message: "状态不能为空", trigger: "blur" }],
|
||||
categoryEnum: [
|
||||
{ required: true, message: "诊疗目录不能为空", trigger: "blur" },
|
||||
],
|
||||
typeCode: [
|
||||
{ required: true, message: "器材种类不能为空", trigger: "blur" },
|
||||
],
|
||||
permittedUnitCode: [
|
||||
{ required: true, message: "使用单位不能为空", trigger: "blur" },
|
||||
],
|
||||
ybFlag: [{ required: true, message: "医保标记不能为空", trigger: "blur" }],
|
||||
ybMatchFlag: [
|
||||
{ required: true, message: "医保对码标记不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -192,26 +317,56 @@ const props = defineProps({
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
currentCategoryEnum: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
diseaseTreatmentCategoryList: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
statusFlagOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
exeOrganizations: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
typeEnumOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
reset();
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
getLocationTree();
|
||||
getDeptTree();
|
||||
title.value = "";
|
||||
title.value = props.title;
|
||||
diseaseTreatmentCategoryList.value = props.diseaseTreatmentCategoryList;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
exeOrganizations.value = props.exeOrganizations;
|
||||
typeEnumOptions.value = props.typeEnumOptions;
|
||||
form.value.categoryEnum = props.currentCategoryEnum;
|
||||
console.log(props.currentCategoryEnum, "11111");
|
||||
console.log(props, "22222", title.value);
|
||||
visible.value = true;
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
reset();
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
getLocationTree();
|
||||
getDeptTree();
|
||||
title.value = "";
|
||||
title.value = props.title;
|
||||
form.value = props.item;
|
||||
diseaseTreatmentCategoryList.value = props.diseaseTreatmentCategoryList;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
exeOrganizations.value = props.exeOrganizations;
|
||||
typeEnumOptions.value = props.typeEnumOptions;
|
||||
visible.value = true;
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
@@ -220,46 +375,74 @@ function reset() {
|
||||
id: undefined,
|
||||
busNo: undefined, // 编码
|
||||
name: undefined, // 名称
|
||||
locationId: undefined, // 地点
|
||||
orgId: undefined, // 执行科室
|
||||
pyStr: undefined, // 拼音码
|
||||
wbStr: undefined, // 五笔码
|
||||
categoryEnum: undefined, // 类别
|
||||
typeCode: undefined, // 类型编码
|
||||
permittedUnitCode: undefined, // 使用单位
|
||||
ybFlag: undefined, // 医保标记
|
||||
ybNo: undefined, // 医保编码
|
||||
ybMatchFlag: undefined, // 医保对码标记
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
ybFlag: undefined, // 医保标记
|
||||
ybMatchFlag: undefined, // 医保对码标记
|
||||
ybNo: undefined, // 医保编码
|
||||
ybType: undefined, // 医保类型
|
||||
bodySiteCode: undefined, // 身体部位
|
||||
specimenCode: undefined, // 所需标本
|
||||
description: undefined, // 说明
|
||||
ruleId: undefined, // 执行科室
|
||||
permittedUnitCode: undefined, // 使用单位
|
||||
minimalFee: undefined, // 最小收费
|
||||
purchasePrice: undefined, // 购入价
|
||||
retailPrice: undefined, // 零售价
|
||||
maximumRetailPrice: undefined, // 最高零售价
|
||||
description: undefined, // 说明
|
||||
};
|
||||
proxy.resetForm("medicationRef");
|
||||
proxy.resetForm("diagnosisTreatmentRef");
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
form.value.ybFlag ? (form.value.ybFlag = 1) : (form.value.ybFlag = 0);
|
||||
form.value.ybMatchFlag ? (form.value.ybMatchFlag = 1) : (form.value.ybMatchFlag = 0);
|
||||
form.value.ybMatchFlag
|
||||
? (form.value.ybMatchFlag = 1)
|
||||
: (form.value.ybMatchFlag = 0);
|
||||
form.value.ruleId ? (form.value.ruleId = 1) : (form.value.ruleId = 0);
|
||||
if (form.value.id != undefined) {
|
||||
editDiagnosisTreatment(form.value).then((response) => {
|
||||
// 触发自定义事件,并传递数据给父组件
|
||||
emits("submit");
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
visible.value = false;
|
||||
reset(); // 重置表单数据
|
||||
});
|
||||
} else {
|
||||
addDiagnosisTreatment(form.value).then((response) => {
|
||||
// 触发自定义事件,并传递数据给父组件
|
||||
emits("submit");
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
visible.value = false;
|
||||
reset(); // 重置表单数据
|
||||
});
|
||||
}
|
||||
proxy.$refs["diagnosisTreatmentRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
editDiagnosisTreatment(form.value).then((response) => {
|
||||
// 触发自定义事件,并传递数据给父组件
|
||||
emits("submit");
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
visible.value = false;
|
||||
reset(); // 重置表单数据
|
||||
});
|
||||
} else {
|
||||
addDiagnosisTreatment(form.value).then((response) => {
|
||||
// 触发自定义事件,并传递数据给父组件
|
||||
emits("submit");
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
visible.value = false;
|
||||
reset(); // 重置表单数据
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
deptOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
/** 查询地点下拉树结构 */
|
||||
function getLocationTree() {
|
||||
locationTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
locationOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询诊疗目录列表
|
||||
export function getDiagnosisTreatmentList(query) {
|
||||
@@ -13,8 +12,9 @@ export function getDiagnosisTreatmentList(query) {
|
||||
// 查询诊疗目录详细
|
||||
export function getDiagnosisTreatmentOne(id) {
|
||||
return request({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-one/' + parseStrEmpty(id),
|
||||
method: 'get'
|
||||
url: '/data-dictionary/diagnosis-treatment/information-one/',
|
||||
method: 'get',
|
||||
params: { id } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
@@ -36,14 +36,6 @@ export function editDiagnosisTreatment(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// // 删除诊疗目录
|
||||
// export function delUser(userId) {
|
||||
// return request({
|
||||
// url: '/system/user/' + userId,
|
||||
// method: 'delete'
|
||||
// })
|
||||
// }
|
||||
|
||||
// 诊疗目录分类查询
|
||||
export function getDiseaseTreatmentInit() {
|
||||
return request({
|
||||
@@ -71,3 +63,21 @@ export function startDiseaseTreatment(ids) {
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/cabinet-location/cabinet-location',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,4 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询病种目录列表
|
||||
export function getDiseaseList(query) {
|
||||
@@ -13,8 +12,9 @@ export function getDiseaseList(query) {
|
||||
// 查询病种目录详细
|
||||
export function getDiseaseOne(id) {
|
||||
return request({
|
||||
url: '/data-dictionary/disease/information-one/' + parseStrEmpty(id),
|
||||
method: 'get'
|
||||
url: '/data-dictionary/disease/information-one',
|
||||
method: 'get',
|
||||
params: { id } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,15 +3,6 @@
|
||||
<el-row :gutter="20">
|
||||
<!--疾病目录数据-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<!-- <div class="head-container">
|
||||
<el-input
|
||||
v-model="deptName"
|
||||
placeholder="请输入部门名称"
|
||||
clearable
|
||||
prefix-icon="Search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div> -->
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="conditionDefinitionOptions"
|
||||
@@ -59,7 +50,11 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否停用" prop="statusEnum">
|
||||
<el-select v-model="queryParams.statusEnum" style="width: 240px">
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="status in statusFlagOptions"
|
||||
:key="status.value"
|
||||
@@ -68,21 +63,6 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="是否系统预置:" prop="status" label-width="120">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="用户状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
@@ -100,15 +80,6 @@
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>添加为本机构项目</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
@@ -141,7 +112,7 @@
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@@ -150,7 +121,7 @@
|
||||
v-hasPermi="['system:user:export']"
|
||||
>导出Excel</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
@@ -197,13 +168,13 @@
|
||||
label="医保对码标志"
|
||||
align="center"
|
||||
key="ybMatchFlag"
|
||||
prop="ybMatchFlag"
|
||||
prop="ybMatchFlag_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="停用"
|
||||
label="状态"
|
||||
align="center"
|
||||
key="statusEnum"
|
||||
prop="statusEnum"
|
||||
prop="statusEnum_enumText"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -221,14 +192,14 @@
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>查看</el-button
|
||||
>
|
||||
> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -273,7 +244,6 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保标记" prop="ybFlag">
|
||||
<!-- <el-input v-model="form.ybFlag" placeholder="" /> -->
|
||||
<el-checkbox v-model="form.ybFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -281,7 +251,11 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="类型" prop="ybNo">
|
||||
<el-select v-model="form.statusEnum" placeholder="请选择">
|
||||
<el-select
|
||||
v-model="form.statusEnum"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in statusFlagOptions"
|
||||
:key="dict.value"
|
||||
@@ -293,7 +267,11 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保标记" prop="ybFlag">
|
||||
<el-select v-model="form.statusEnum" placeholder="请选择">
|
||||
<el-select
|
||||
v-model="form.statusEnum"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in statusFlagOptions"
|
||||
:key="dict.value"
|
||||
@@ -314,11 +292,6 @@
|
||||
<el-checkbox v-model="form.ybMatchFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="拼音" prop="pyStr">
|
||||
<el-input v-model="form.pyStr" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="停用" prop="status">
|
||||
<el-checkbox v-model="form.status"></el-checkbox>
|
||||
@@ -359,12 +332,7 @@ import {
|
||||
startDisease,
|
||||
} from "./components/disease";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_normal_disable",
|
||||
"sys_user_sex"
|
||||
);
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const open = ref(false);
|
||||
@@ -379,9 +347,6 @@ const conditionDefinitionOptions = ref(undefined);
|
||||
const conditionDefinition = ref(undefined);
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
// const postOptions = ref([]);
|
||||
// const roleOptions = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
@@ -397,15 +362,6 @@ const data = reactive({
|
||||
conditionCode: [
|
||||
{ required: true, message: "编码不能为空", trigger: "blur" },
|
||||
],
|
||||
// typeCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// description: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// conditionCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -416,29 +372,23 @@ const filterNode = (value, data) => {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
};
|
||||
// /** 根据名称筛选部门树 */
|
||||
// watch(deptName, val => {
|
||||
// proxy.$refs["deptTreeRef"].filter(val);
|
||||
// });
|
||||
|
||||
/** 病种目录分类查询下拉树结构 */
|
||||
function getDiseaseCategoryList() {
|
||||
getDiseaseCategory().then((response) => {
|
||||
console.log(response, "response病种目录分类查询下拉树结构");
|
||||
conditionDefinitionOptions.value = response.data.diseaseCategoryList;
|
||||
conditionDefinitionOptions.value = response.data.diseaseCategoryList.sort((a, b) => { return parseInt(a.value) - parseInt(b.value) });
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
});
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||
console.log(queryParams.value, "queryParams.value");
|
||||
getDiseaseList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
console.log(res, "res");
|
||||
diseaseList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
console.log(total.value, "total.value");
|
||||
console.log(total.value, "total.value", res, "res");
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
@@ -452,14 +402,7 @@ function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
// /** 重置按钮操作 */
|
||||
// function resetQuery() {
|
||||
// dateRange.value = [];
|
||||
// proxy.resetForm("queryRef");
|
||||
// queryParams.value.deptId = undefined;
|
||||
// proxy.$refs.deptTreeRef.setCurrentKey(null);
|
||||
// handleQuery();
|
||||
// };
|
||||
|
||||
/** 启用按钮操作 */
|
||||
function handleStart(row) {
|
||||
const stardIds = row.id || ids.value;
|
||||
@@ -498,35 +441,14 @@ function handleExport() {
|
||||
`user_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
// /** 用户状态修改 */
|
||||
// function handleStatusChange(row) {
|
||||
// let text = row.status === "0" ? "启用" : "停用";
|
||||
// proxy.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function () {
|
||||
// return changeUserStatus(row.userId, row.status);
|
||||
// }).then(() => {
|
||||
// proxy.$modal.msgSuccess(text + "成功");
|
||||
// }).catch(function () {
|
||||
// row.status = row.status === "0" ? "1" : "0";
|
||||
// });
|
||||
// };
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, "selection");
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
proxy.download(
|
||||
"system/user/importTemplate",
|
||||
{},
|
||||
`user_template_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
@@ -561,14 +483,19 @@ function handleAdd() {
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
console.log(row, "row");
|
||||
form.value = JSON.parse(JSON.stringify(row));
|
||||
form.value.ybFlag == 1
|
||||
? (form.value.ybFlag = true)
|
||||
: (form.value.ybFlag = false);
|
||||
form.value.ybMatchFlag == 1
|
||||
? (form.value.ybMatchFlag = true)
|
||||
: (form.value.ybMatchFlag = false);
|
||||
getDiseaseOne(row.id).then((response) => {
|
||||
console.log(response, "responsebbbb", row.id);
|
||||
form.value = response.data;
|
||||
form.value.ybFlag == 1
|
||||
? (form.value.ybFlag = true)
|
||||
: (form.value.ybFlag = false);
|
||||
form.value.ybMatchFlag == 1
|
||||
? (form.value.ybMatchFlag = true)
|
||||
: (form.value.ybMatchFlag = false);
|
||||
// getList();
|
||||
});
|
||||
// console.log(row, "row");
|
||||
// form.value = JSON.parse(JSON.stringify(row));
|
||||
open.value = true;
|
||||
title.value = "病种编辑";
|
||||
}
|
||||
@@ -582,9 +509,6 @@ function submitForm() {
|
||||
? (form.value.ybMatchFlag = 1)
|
||||
: (form.value.ybMatchFlag = 0);
|
||||
if (form.value.id != undefined) {
|
||||
// form.value.status
|
||||
// ? (form.value.statusEnum = "3")
|
||||
// : (form.value.statusEnum = "2");
|
||||
console.log(form.value, "editDisease", form.value.statusEnum);
|
||||
editDisease(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询药品目录列表
|
||||
export function getMedicationList(query) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="visible" width="1000px" append-to-body>
|
||||
<el-dialog :title="title" v-model="visible" width="1150px" append-to-body>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="基本信息">
|
||||
<el-form
|
||||
@@ -61,11 +61,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="药品状态" prop="statusEnum">
|
||||
<el-select
|
||||
v-model="form.statusEnum"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-select v-model="form.statusEnum" clearable>
|
||||
<el-option
|
||||
v-for="status in statusFlagOptions"
|
||||
:key="status.value"
|
||||
@@ -77,11 +73,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="药品分类" prop="categoryCode">
|
||||
<el-select
|
||||
v-model="form.categoryCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-select v-model="form.categoryCode" clearable disabled>
|
||||
<el-option
|
||||
v-for="category in med_category_code"
|
||||
:key="category.value"
|
||||
@@ -122,6 +114,7 @@
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -138,16 +131,13 @@
|
||||
value-key="id"
|
||||
placeholder="请选择地点"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="财务统计类型" prop="minimalFee">
|
||||
<el-select
|
||||
v-model="form.minimalFee"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-form-item label="财务类型" prop="typeCode">
|
||||
<el-select v-model="form.typeCode" clearable>
|
||||
<el-option
|
||||
v-for="category in fin_type_code"
|
||||
:key="category.value"
|
||||
@@ -159,11 +149,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="药品性质" prop="pharmacologyCategoryCode">
|
||||
<el-select
|
||||
v-model="form.pharmacologyCategoryCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-select v-model="form.pharmacologyCategoryCode" clearable>
|
||||
<el-option
|
||||
v-for="category in medicine_properties"
|
||||
:key="category.value"
|
||||
@@ -182,11 +168,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="包装单位" prop="unitCode">
|
||||
<el-select
|
||||
v-model="form.unitCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-select v-model="form.unitCode" clearable>
|
||||
<el-option
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
@@ -198,11 +180,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="贯标国家编码" prop="nationalDrugCode">
|
||||
<el-input
|
||||
v-model="form.nationalDrugCode"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
<el-input v-model="form.nationalDrugCode" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -223,11 +201,7 @@
|
||||
</el-col> -->
|
||||
<el-col :span="6">
|
||||
<el-form-item label="剂量单位" prop="doseUnitCode">
|
||||
<el-select
|
||||
v-model="form.doseUnitCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-select v-model="form.doseUnitCode" clearable>
|
||||
<el-option
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
@@ -239,11 +213,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="剂型" prop="doseFormCode">
|
||||
<el-select
|
||||
v-model="form.doseFormCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-select v-model="form.doseFormCode" clearable>
|
||||
<el-option
|
||||
v-for="category in dose_form_code"
|
||||
:key="category.value"
|
||||
@@ -255,11 +225,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="最小单位" prop="minUnitCode">
|
||||
<el-select
|
||||
v-model="form.minUnitCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-select v-model="form.minUnitCode" clearable>
|
||||
<el-option
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
@@ -278,11 +244,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="用法" prop="methodCode">
|
||||
<el-select
|
||||
v-model="form.methodCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-select v-model="form.methodCode" clearable>
|
||||
<el-option
|
||||
v-for="category in method_code"
|
||||
:key="category.value"
|
||||
@@ -294,11 +256,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="用药频次" prop="rateCode">
|
||||
<el-select
|
||||
v-model="form.rateCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-select v-model="form.rateCode" clearable>
|
||||
<el-option
|
||||
v-for="category in rate_code"
|
||||
:key="category.value"
|
||||
@@ -310,7 +268,15 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="剂量形式" prop="doseFrom">
|
||||
<el-input v-model="form.doseFrom" placeholder="" />
|
||||
<!-- <el-input v-model="form.doseFrom" placeholder="" /> -->
|
||||
<el-select v-model="form.doseFrom" clearable>
|
||||
<el-option
|
||||
v-for="category in dose_from_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -325,9 +291,9 @@
|
||||
<el-input v-model="form.version" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="6" v-if="form.id != undefined">
|
||||
<el-form-item label="药品编号" prop="busNo">
|
||||
<el-input v-model="form.busNo" placeholder="" />
|
||||
<el-input v-model="form.busNo" placeholder="" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -366,11 +332,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="适用范围" prop="domainEnum">
|
||||
<el-select
|
||||
v-model="form.domainEnum"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-select v-model="form.domainEnum" clearable>
|
||||
<el-option
|
||||
v-for="domainEnum in domainEnumOptions"
|
||||
:key="domainEnum.value"
|
||||
@@ -398,28 +360,40 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="拆分属性" prop="partAttributeEnum">
|
||||
<el-select
|
||||
v-model="form.partAttributeEnum"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-form-item label="门诊拆分属性" prop="partAttributeEnum">
|
||||
<el-select v-model="form.partAttributeEnum" clearable>
|
||||
<el-option
|
||||
v-for="category in unit_code"
|
||||
v-for="category in partAttributeEnumOptions"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:label="category.info"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="拆零比" prop="partPercent">
|
||||
<el-input v-model="form.partPercent" placeholder="" />
|
||||
<el-form-item
|
||||
label="住院临时医嘱拆分属性"
|
||||
prop="thoPartAttributeEnum"
|
||||
class="custom-label-height"
|
||||
>
|
||||
<el-select v-model="form.thoPartAttributeEnum" clearable>
|
||||
<el-option
|
||||
v-for="category in tempOrderSplitPropertyOptions"
|
||||
:key="category.value"
|
||||
:label="category.info"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="拆零比" prop="partPercent">
|
||||
<el-input v-model="form.partPercent" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="产品特性 " prop="characteristic">
|
||||
<el-input v-model="form.characteristic" placeholder="" />
|
||||
@@ -451,17 +425,29 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="购入价" prop="purchasePrice">
|
||||
<el-input v-model="form.purchasePrice" placeholder="" />
|
||||
<el-input
|
||||
v-model="form.purchasePrice"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="零售价" prop="retailPrice">
|
||||
<el-input v-model="form.retailPrice" placeholder="" />
|
||||
<el-input
|
||||
v-model="form.retailPrice"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="最高零售价" prop="maximumRetailPrice">
|
||||
<el-input v-model="form.maximumRetailPrice" placeholder="" />
|
||||
<el-input
|
||||
v-model="form.maximumRetailPrice"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -515,6 +501,11 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="基药标识" prop="basicFlag">
|
||||
<el-checkbox v-model="form.basicFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="生效日期" prop="effectiveDate">
|
||||
<el-date-picker
|
||||
@@ -585,7 +576,6 @@
|
||||
<el-input
|
||||
v-model="antibioticForm.dose"
|
||||
placeholder="输入剂量"
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -595,7 +585,6 @@
|
||||
<el-input
|
||||
v-model="antibioticForm.maxUnit"
|
||||
placeholder="输入剂量"
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -606,7 +595,6 @@
|
||||
<el-input
|
||||
v-model="antibioticForm.minRateCode"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -616,7 +604,6 @@
|
||||
<el-input
|
||||
v-model="antibioticForm.maxRateCode"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -663,6 +650,7 @@
|
||||
|
||||
<script setup name="MedicineDialog">
|
||||
import { deptTreeSelect, locationTreeSelect } from "./medicine";
|
||||
import moment from "moment";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
@@ -673,15 +661,12 @@ const {
|
||||
unit_code,
|
||||
dose_form_code,
|
||||
yb_type,
|
||||
medicine_default_usage,
|
||||
medicine_default_frequency,
|
||||
medicine_basic_flag,
|
||||
sys_normal_disable,
|
||||
rate_code,
|
||||
method_code,
|
||||
fin_type_code,
|
||||
antibiotic_type_code,
|
||||
ddd_code,
|
||||
dose_from_code,
|
||||
} = proxy.useDict(
|
||||
"med_category_code",
|
||||
"system_categories",
|
||||
@@ -689,15 +674,12 @@ const {
|
||||
"unit_code",
|
||||
"dose_form_code",
|
||||
"yb_type",
|
||||
"medicine_default_usage",
|
||||
"medicine_default_frequency",
|
||||
"medicine_basic_flag",
|
||||
"sys_normal_disable",
|
||||
"rate_code",
|
||||
"method_code",
|
||||
"fin_type_code",
|
||||
"antibiotic_type_code",
|
||||
"ddd_code"
|
||||
"ddd_code",
|
||||
"dose_from_code"
|
||||
);
|
||||
|
||||
const title = ref("");
|
||||
@@ -709,19 +691,62 @@ const deptOptions = ref(undefined); // 部门树选项
|
||||
const locationOptions = ref(undefined); // 地点树选项
|
||||
const supplierListOptions = ref(undefined); // 供应商列表选项
|
||||
const statusRestrictedOptions = ref(undefined); // 权限级别选项
|
||||
const partAttributeEnumOptions = ref(undefined); // 部位属性选项
|
||||
const tempOrderSplitPropertyOptions = ref(undefined); // 临时订单拆分属性选项
|
||||
const data = reactive({
|
||||
form: {},
|
||||
antibioticForm: {},
|
||||
rules: {
|
||||
// busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
||||
// name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
// conditionCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
statusEnum: [{ required: true, message: "药品状态不能为空", trigger: "blur" }],
|
||||
orgId: [{ required: true, message: "所属科室不能为空", trigger: "blur" }],
|
||||
locationId: [ { required: true, message: "所在位置不能为空", trigger: "blur" }],
|
||||
doseFormCode: [{ required: true, message: "剂型不能为空", trigger: "blur" }],
|
||||
totalVolume: [{ required: true, message: "规格不能为空", trigger: "blur" }],
|
||||
ingredientItem: [{ required: true, message: "成分不能为空", trigger: "blur" }],
|
||||
activeFlag: [{ required: true, message: "活性不能为空", trigger: "blur" }],
|
||||
lotNumber: [{ required: true, message: "批次号不能为空", trigger: "blur" }],
|
||||
methodCode:[{ required: true, message: "用法不能为空", trigger: "blur" }],
|
||||
rateCode:[{ required: true, message: "用药频次不能为空", trigger: "blur" }],
|
||||
dose:[{ required: true, message: "单次剂量不能为空", trigger: "blur" }],
|
||||
doseUnitCode:[{ required: true, message: "剂量单位不能为空", trigger: "blur" }],
|
||||
maxUnit:[{ required: true, message: "单次最大剂量不能为空", trigger: "blur" }],
|
||||
definition: [{ required: true, message: "药品定义不能为空", trigger: "blur" }],
|
||||
busNo: [{ required: true, message: "药品编号不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: "药品名称不能为空", trigger: "blur" }],
|
||||
domainEnum: [{ required: true, message: "适用范围不能为空", trigger: "blur" }],
|
||||
nameEn: [{ required: true, message: "英文药名不能为空", trigger: "blur" }],
|
||||
categoryCode:[{ required: true, message: "药品分类不能为空", trigger: "blur" }],
|
||||
merchandiseName:[{ required: true, message: "商品名称不能为空", trigger: "blur" }],
|
||||
unitCode:[{ required: true, message: "药品单位不能为空", trigger: "blur" }],
|
||||
minUnitCode:[{ required: true, message: "最小单位不能为空", trigger: "blur" }],
|
||||
ingredient:[{ required: true, message: "成分不能为空", trigger: "blur" }],
|
||||
partPercent: [{ required: true, message: "拆零比不能为空", trigger: "blur" }],
|
||||
doseFrom: [{ required: true, message: "剂量形式不能为空", trigger: "blur" }],
|
||||
approvalNumber:[{ required: true, message: "批准文号不能为空", trigger: "blur" }],
|
||||
ybMatchFlag:[{ required: true, message: "医保对码不能为空", trigger: "blur" }],
|
||||
ybNo:[{ required: true, message: "医保编码不能为空", trigger: "blur" }],
|
||||
pharmacologyCategoryCode:[{ required: true, message: "药品性质不能为空", trigger: "blur" }],
|
||||
skinTestFlag:[{ required: true, message: "皮试不能为空", trigger: "blur" }],
|
||||
injectFlag: [{ required: true, message: "注射不能为空", trigger: "blur" }],
|
||||
supplyId: [{ required: true, message: "供应商不能为空", trigger: "blur" }],
|
||||
restrictedFlag: [{ required: true, message: "限制使用不能为空", trigger: "blur" }],
|
||||
childrenFlag: [{ required: true, message: "儿童用药不能为空", trigger: "blur" }],
|
||||
restrictedScope: [{ required: true, message: "限制使用范围不能为空", trigger: "blur" }],
|
||||
nationalDrugCode:[{ required: true, message: "贯标国家编码不能为空", trigger: "blur" }],
|
||||
partAttributeEnum:[{ required: true, message: "拆分属性不能为空", trigger: "blur" }],
|
||||
thoPartAttributeEnum:[{ required: true, message: "住院临时医嘱拆分属性不能为空", trigger: "blur" }],
|
||||
basicFlag:[{ required: true, message: "基药标识不能为空", trigger: "blur" }],
|
||||
antibioticFlag:[{ required: true, message: "抗生素不能为空", trigger: "blur" }],
|
||||
selfFlag:[{ required: true, message: "自制不能为空", trigger: "blur" }],
|
||||
purchasePrice:[{ required: true, message: "购入价不能为空", trigger: "blur" }],
|
||||
retailPrice:[{ required: true, message: "零售价不能为空", trigger: "blur" }],
|
||||
maximumRetailPrice:[{ required: true, message: "最高零售价不能为空", trigger: "blur" }],
|
||||
ybType:[{ required: true, message: "医保类型不能为空", trigger: "blur" }],
|
||||
typeCode:[{ required: true, message: "财务类型不能为空", trigger: "blur" }],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, antibioticForm, rules } = toRefs(data);
|
||||
const { form, antibioticForm, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
@@ -744,11 +769,22 @@ const props = defineProps({
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
currentCategoryEnum: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
partAttributeEnumOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
tempOrderSplitPropertyOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
console.log("查询部门下拉树结构");
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
deptOptions.value = response.data.records;
|
||||
@@ -760,7 +796,6 @@ function getLocationTree() {
|
||||
locationTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
locationOptions.value = response.data.records;
|
||||
console.log(locationOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
// 显示弹框
|
||||
@@ -772,25 +807,37 @@ function show() {
|
||||
domainEnumOptions.value = props.domainEnum;
|
||||
supplierListOptions.value = props.supplierListOptions;
|
||||
statusRestrictedOptions.value = props.statusRestrictedOptions;
|
||||
// console.log(currentData.value, "currentData");
|
||||
form.value.categoryCode = props.currentCategoryEnum;
|
||||
partAttributeEnumOptions.value = props.partAttributeEnumOptions;
|
||||
tempOrderSplitPropertyOptions.value = props.tempOrderSplitPropertyOptions;
|
||||
console.log(form.value.categoryCode, "form.value.categoryCode");
|
||||
visible.value = true;
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
console.log(props, "22222");
|
||||
console.log(props.item);
|
||||
console.log("props.item");
|
||||
reset();
|
||||
getLocationTree();
|
||||
getDeptTree();
|
||||
form.value = props.item;
|
||||
setFlag(form.value);
|
||||
if (form.value) {
|
||||
setFlag(form.value);
|
||||
}
|
||||
statusFlagOptions.value = props.status;
|
||||
domainEnumOptions.value = props.domainEnum;
|
||||
supplierListOptions.value = props.supplierListOptions;
|
||||
statusRestrictedOptions.value = props.statusRestrictedOptions;
|
||||
partAttributeEnumOptions.value = props.partAttributeEnumOptions;
|
||||
tempOrderSplitPropertyOptions.value = props.tempOrderSplitPropertyOptions;
|
||||
antibioticForm.value.antibioticCode = form.value.antibioticCode;
|
||||
antibioticForm.value.restrictedEnum = form.value.restrictedEnum;
|
||||
antibioticForm.value.dose = form.value.dose;
|
||||
antibioticForm.value.maxUnit = form.value.maxUnit;
|
||||
antibioticForm.value.minRateCode = form.value.maxRateCode;
|
||||
antibioticForm.value.maxRateCode = form.value.maxRateCode;
|
||||
antibioticForm.value.dddUnitCode = form.value.dddUnitCode;
|
||||
antibioticForm.value.dddCode = form.value.dddCode;
|
||||
visible.value = true;
|
||||
}
|
||||
// checkbox值转换
|
||||
@@ -813,6 +860,7 @@ function setFlag(data) {
|
||||
? (data.antibioticFlag = true)
|
||||
: (data.antibioticFlag = false); //抗生素
|
||||
data.selfFlag == 1 ? (data.selfFlag = true) : (data.selfFlag = false); //自制
|
||||
data.basicFlag == 1 ? (data.basicFlag = true) : (data.basicFlag = false); //自制
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
@@ -867,14 +915,16 @@ function reset() {
|
||||
retailPrice: undefined,
|
||||
maximumRetailPrice: undefined,
|
||||
ybType: undefined,
|
||||
minimalFee: undefined,
|
||||
typeCode: undefined,
|
||||
nationalDrugCode: undefined,
|
||||
antibioticFlag: undefined,
|
||||
selfFlag: undefined,
|
||||
// minRateCode: undefined,
|
||||
// maxRateCode: undefined,
|
||||
partAttributeEnum: undefined,
|
||||
thoPartAttributeEnum: undefined,
|
||||
usageLimit: undefined,
|
||||
basicFlag: undefined,
|
||||
};
|
||||
proxy.resetForm("medicationRef");
|
||||
antibioticForm.value = {
|
||||
@@ -891,6 +941,32 @@ function reset() {
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
form.value.activeFlag == true
|
||||
? (form.value.activeFlag = 1)
|
||||
: (form.value.activeFlag = 0); //是否为活性
|
||||
form.value.ybMatchFlag == true
|
||||
? (form.value.ybMatchFlag = 1)
|
||||
: (form.value.ybMatchFlag = 0); //医保是否对码
|
||||
form.value.skinTestFlag == true
|
||||
? (form.value.skinTestFlag = 1)
|
||||
: (form.value.skinTestFlag = 0); //是否皮试
|
||||
form.value.injectFlag == true
|
||||
? (form.value.injectFlag = 1)
|
||||
: (form.value.injectFlag = 0); //是否为注射药物
|
||||
form.value.restrictedFlag == true
|
||||
? (form.value.restrictedFlag = 1)
|
||||
: (form.value.restrictedFlag = 0); //是否限制使用
|
||||
form.value.childrenFlag == true
|
||||
? (form.value.childrenFlag = 1)
|
||||
: (form.value.childrenFlag = 0); //儿童用药标志
|
||||
form.value.antibioticFlag == true
|
||||
? (form.value.antibioticFlag = 1)
|
||||
: (form.value.antibioticFlag = 0); //抗生素标志v
|
||||
form.value.basicFlag == true
|
||||
? (form.value.basicFlag = 1)
|
||||
: (form.value.basicFlag = 0); //抗生素标志
|
||||
form.value.selfFlag == true ? (form.value.selfFlag = 1) : (form.value.selfFlag = 0); //自制标志
|
||||
form.value.status == true ? (form.value.status = 1) : (form.value.status = 0); //启用状态
|
||||
proxy.$refs["medicationRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.activeFlag == true) {
|
||||
@@ -903,6 +979,15 @@ function submitForm() {
|
||||
form.value.dddUnitCode = antibioticForm.value.dddUnitCode;
|
||||
form.value.dddCode = antibioticForm.value.dddCode;
|
||||
}
|
||||
const effectiveDate = form.value.effectiveDate
|
||||
? moment(form.value.effectiveDate).format("YYYY-MM-DD HH:mm:ss")
|
||||
: "";
|
||||
const expirationDate = form.value.expirationDate
|
||||
? moment(form.value.expirationDate).format("YYYY-MM-DD HH:mm:ss")
|
||||
: "";
|
||||
form.value.effectiveDate = effectiveDate;
|
||||
form.value.expirationDate = expirationDate;
|
||||
console.log(form.value.effectiveDate, form.value.expirationDate, "====================");
|
||||
// 将表单数据发送给父组件
|
||||
emits("submit", form.value);
|
||||
visible.value = false;
|
||||
@@ -933,6 +1018,9 @@ defineExpose({
|
||||
margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */
|
||||
}
|
||||
.el-form-item {
|
||||
margin-bottom: 7px;
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
::v-deep .custom-label-height .el-form-item__label {
|
||||
line-height: 20px; /* 设置 label 的行高为 15px */
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,15 +3,6 @@
|
||||
<el-row :gutter="20">
|
||||
<!--药品目录-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<!-- <div class="head-container">
|
||||
<el-input
|
||||
v-model="deptName"
|
||||
placeholder="请输入部门名称"
|
||||
clearable
|
||||
prefix-icon="Search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div> -->
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="medicationOptions"
|
||||
@@ -97,15 +88,6 @@
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>添加为本机构项目</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
@@ -268,13 +250,6 @@
|
||||
prop="lotNumber"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="拆零价"
|
||||
align="center"
|
||||
key="statusEnum"
|
||||
prop="statusEnum"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生效日期"
|
||||
align="center"
|
||||
@@ -411,17 +386,17 @@
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品单位"
|
||||
label="包装单位"
|
||||
align="center"
|
||||
key="unitCode"
|
||||
prop="unitCode"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="财务统计类型"
|
||||
label="财务类型"
|
||||
align="center"
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
key="typeCode_dictText"
|
||||
prop="typeCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
@@ -433,13 +408,6 @@
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/>
|
||||
<el-table-column
|
||||
label="成分"
|
||||
align="center"
|
||||
key="ingredient"
|
||||
prop="ingredient"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="拆零比"
|
||||
align="center"
|
||||
@@ -451,8 +419,8 @@
|
||||
<el-table-column
|
||||
label="剂量形式"
|
||||
align="center"
|
||||
key="doseFrom"
|
||||
prop="doseFrom"
|
||||
key="doseFrom_dictText"
|
||||
prop="doseFrom_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -501,18 +469,18 @@
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
label="生产厂家"
|
||||
align="center"
|
||||
key="manufacturerId"
|
||||
prop="manufacturerId"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产厂家名称"
|
||||
align="center"
|
||||
key="manufacturerName"
|
||||
prop="manufacturerName"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -570,6 +538,14 @@
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="住院临时医嘱拆分属性"
|
||||
align="center"
|
||||
key="thoPartAttributeEnum_enumText"
|
||||
prop="thoPartAttributeEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="抗生素分类"
|
||||
align="center"
|
||||
@@ -589,8 +565,8 @@
|
||||
<el-table-column
|
||||
label="是否自制"
|
||||
align="center"
|
||||
key=" selfFlag_enumText"
|
||||
prop=" selfFlag_enumText"
|
||||
key="selfFlag_enumText"
|
||||
prop="selfFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
@@ -610,14 +586,6 @@
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="常规单位"
|
||||
align="center"
|
||||
key="baseUnitCode"
|
||||
prop="baseUnitCode"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="当前库存数量(常规单位)"
|
||||
align="center"
|
||||
@@ -637,8 +605,8 @@
|
||||
<el-table-column
|
||||
label="售价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
key="retailPrice"
|
||||
prop="retailPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
@@ -685,13 +653,16 @@
|
||||
:status="statusFlagOptions"
|
||||
:supplierListOptions="supplierListOptions"
|
||||
:statusRestrictedOptions="statusRestrictedOptions"
|
||||
:currentCategoryEnum="currentCategoryEnum"
|
||||
:partAttributeEnumOptions="partAttributeEnumOptions"
|
||||
:tempOrderSplitPropertyOptions="tempOrderSplitPropertyOptions"
|
||||
@submit="submitForm"
|
||||
/>
|
||||
<medicine-view-dialog
|
||||
<!-- <medicine-view-dialog
|
||||
ref="medicineViewRef"
|
||||
:item="viewData"
|
||||
:viewFlg="viewFlg"
|
||||
/>
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -709,12 +680,7 @@ import medicineDialog from "./components/medicineDialog";
|
||||
import medicineViewDialog from "./components/medicineViewDialog";
|
||||
import { nextTick } from "vue";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_normal_disable",
|
||||
"sys_user_sex"
|
||||
);
|
||||
|
||||
const medicationList = ref([]);
|
||||
const open = ref(false);
|
||||
@@ -724,13 +690,15 @@ const ids = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const medicationOptions = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const domainEnumOptions = ref(undefined);
|
||||
const supplierListOptions = ref(undefined);
|
||||
const statusWeatherOption = ref(undefined);
|
||||
const statusRestrictedOptions = ref(undefined);
|
||||
const currentCategoryEnum = ref("");
|
||||
const partAttributeEnumOptions = ref(undefined);
|
||||
const tempOrderSplitPropertyOptions = ref(undefined);
|
||||
// 使用 ref 定义当前药品数据
|
||||
const currentData = ref({});
|
||||
// 使用 ref 定义当前查看药品数据
|
||||
@@ -749,12 +717,7 @@ const data = reactive({
|
||||
ybMatchFlag: undefined, // 是否医保匹配(包括 1:是,0:否)
|
||||
categoryCode: undefined, // 目录
|
||||
},
|
||||
rules: {
|
||||
// name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
// conditionCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
@@ -764,20 +727,20 @@ const filterNode = (value, data) => {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
};
|
||||
// /** 根据名称筛选部门树 */
|
||||
// watch(deptName, val => {
|
||||
// proxy.$refs["deptTreeRef"].filter(val);
|
||||
// });
|
||||
|
||||
/** 病种目录分类查询下拉树结构 */
|
||||
function getMedicationCategoryList() {
|
||||
getMedicationCategory().then((response) => {
|
||||
console.log(response, "response药品目录分类查询下拉树结构");
|
||||
medicationOptions.value = response.data.medicationCategoryCodeOptions;
|
||||
medicationOptions.value = response.data.medicationCategoryCodeOptions.sort((a, b) => { return parseInt(a.value) - parseInt(b.value) });
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
domainEnumOptions.value = response.data.domainFlagOptions;
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
statusWeatherOption.value = response.data.statusWeatherOptions;
|
||||
statusRestrictedOptions.value = response.data.statusRestrictedOptions;
|
||||
partAttributeEnumOptions.value = response.data.partAttributeEnumOptions;
|
||||
tempOrderSplitPropertyOptions.value =
|
||||
response.data.tempOrderSplitPropertyEnumOptions;
|
||||
});
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
@@ -794,6 +757,7 @@ function getList() {
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
queryParams.value.categoryCode = data.value;
|
||||
currentCategoryEnum.value = data.value;
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
@@ -850,32 +814,11 @@ function handleSelectionChange(selection) {
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
proxy.download(
|
||||
"system/user/importTemplate",
|
||||
{},
|
||||
`user_template_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
conditionCode: undefined,
|
||||
pyStr: undefined,
|
||||
status: undefined,
|
||||
statusEnum: undefined,
|
||||
};
|
||||
proxy.resetForm("medicationRef");
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
/** 打开新增弹窗 */
|
||||
function openAddMedicine() {
|
||||
if (!currentCategoryEnum.value) {
|
||||
return proxy.$modal.msgError("请选择药品目录分类");
|
||||
}
|
||||
proxy.$refs["medicineRef"].show();
|
||||
}
|
||||
/** 打开编辑弹窗 */
|
||||
@@ -883,19 +826,13 @@ function openEditMedicine(row) {
|
||||
getMedicationOne(row.id).then((response) => {
|
||||
console.log(response, "responsebbbb", row.id);
|
||||
currentData.value = response.data;
|
||||
// getList();
|
||||
nextTick(() => {
|
||||
proxy.$refs["medicineRef"].edit();
|
||||
});
|
||||
});
|
||||
console.log(currentData.value, "currentData");
|
||||
// 确保子组件已经接收到最新的 props
|
||||
nextTick(() => {
|
||||
proxy.$refs["medicineRef"].edit();
|
||||
});
|
||||
// proxy.$refs["medicineRef"].edit();
|
||||
}
|
||||
/** 打开查看弹窗 */
|
||||
function openViewMedicine(row) {
|
||||
// viewData.value = row;
|
||||
reset();
|
||||
getMedicationOne(row.id).then((response) => {
|
||||
viewData.value = response.data;
|
||||
nextTick(() => {
|
||||
@@ -907,32 +844,7 @@ function openViewMedicine(row) {
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm(formData) {
|
||||
formData.activeFlag == true
|
||||
? (formData.activeFlag = 1)
|
||||
: (formData.activeFlag = 0); //是否为活性
|
||||
formData.ybMatchFlag == true
|
||||
? (formData.ybMatchFlag = 1)
|
||||
: (formData.ybMatchFlag = 0); //医保是否对码
|
||||
formData.skinTestFlag == true
|
||||
? (formData.skinTestFlag = 1)
|
||||
: (formData.skinTestFlag = 0); //是否皮试
|
||||
formData.injectFlag == true
|
||||
? (formData.injectFlag = 1)
|
||||
: (formData.injectFlag = 0); //是否为注射药物
|
||||
formData.restrictedFlag == true
|
||||
? (formData.restrictedFlag = 1)
|
||||
: (formData.restrictedFlag = 0); //是否限制使用
|
||||
formData.childrenFlag == true
|
||||
? (formData.childrenFlag = 1)
|
||||
: (formData.childrenFlag = 0); //儿童用药标志
|
||||
formData.antibioticFlag == true
|
||||
? (formData.antibioticFlag = 1)
|
||||
: (formData.antibioticFlag = 0); //抗生素标志
|
||||
formData.selfFlag == true
|
||||
? (formData.selfFlag = 1)
|
||||
: (formData.selfFlag = 0); //自制标志
|
||||
formData.status == true ? (formData.status = 1) : (formData.status = 0); //启用状态
|
||||
console.log(formData, "submitForm");
|
||||
console.log(formData, "submitForm");
|
||||
if (formData.id != undefined) {
|
||||
editMedication(formData).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
@@ -948,16 +860,6 @@ console.log(formData, "submitForm");
|
||||
}
|
||||
}
|
||||
|
||||
/** 详细按钮操作 */
|
||||
function handleView(row) {
|
||||
reset();
|
||||
open.value = true;
|
||||
getMedicationOne(row.id).then((response) => {
|
||||
console.log(response, "responsebbbb", row.id);
|
||||
form.value = response.data;
|
||||
// getList();
|
||||
});
|
||||
}
|
||||
getMedicationCategoryList();
|
||||
getList();
|
||||
</script>
|
||||
|
||||
@@ -339,6 +339,7 @@
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -222,6 +222,7 @@
|
||||
v-model="scope.row.itemId"
|
||||
placeholder="请选择"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
clearable
|
||||
>
|
||||
<el-option label="项目1" value="1" />
|
||||
<el-option label="项目2" value="2" />
|
||||
@@ -271,6 +272,7 @@
|
||||
v-model="scope.row.unitCode"
|
||||
placeholder="请选择计量单位"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
clearable
|
||||
>
|
||||
<el-option label="单位1" value="1" />
|
||||
<el-option label="单位2" value="2" />
|
||||
@@ -297,6 +299,7 @@
|
||||
v-model="scope.row.purposeLocationId"
|
||||
placeholder="请选择仓库"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
clearable
|
||||
>
|
||||
<el-option label="仓库1" value="1" />
|
||||
<el-option label="仓库2" value="2" />
|
||||
@@ -322,6 +325,7 @@
|
||||
v-model="scope.row.purposeLocationStoreId"
|
||||
placeholder="请选择货位"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
clearable
|
||||
>
|
||||
<el-option label="货位1" value="1" />
|
||||
<el-option label="货位2" value="2" />
|
||||
|
||||
Reference in New Issue
Block a user