98 门诊管理-》门诊划价:选项增加‘西药’和‘中成药’
This commit is contained in:
@@ -119,6 +119,7 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
|
||||
= outpatientChargeAppMapper.selectEncounterPatientPrescription(encounterId,
|
||||
ChargeItemContext.ACTIVITY.getValue(), ChargeItemContext.MEDICATION.getValue(),
|
||||
ChargeItemContext.DEVICE.getValue(), ChargeItemContext.REGISTER.getValue(),
|
||||
ChargeItemContext.WESTERN_MEDICINE.getValue(), ChargeItemContext.CHINESE_PATENT_MEDICINE.getValue(),
|
||||
ChargeItemStatus.PLANNED.getValue(), ChargeItemStatus.BILLABLE.getValue(),
|
||||
ChargeItemStatus.BILLED.getValue(), ChargeItemStatus.REFUNDING.getValue(),
|
||||
ChargeItemStatus.REFUNDED.getValue(), ChargeItemStatus.PART_REFUND.getValue(),
|
||||
|
||||
@@ -75,8 +75,9 @@ public class OutpatientPricingAppServiceImpl implements IOutpatientPricingAppSer
|
||||
}
|
||||
// 门诊划价:不要强制 pricingFlag=1 参与过滤(wor_activity_definition.pricing_flag 可能为 0),
|
||||
// 否则会导致诊疗项目(adviceType=3)查询结果为空 records=[]
|
||||
String categoryCode = adviceBaseDto != null ? adviceBaseDto.getCategoryCode() : null;
|
||||
return iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, searchKey, locationId, null,
|
||||
organizationId, pageNo, pageSize, null, adviceTypes, null);
|
||||
organizationId, pageNo, pageSize, null, adviceTypes, null, categoryCode);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -61,7 +61,12 @@ public class OutpatientPricingController {
|
||||
@RequestParam(value = "locationId", required = false) Long locationId,
|
||||
@RequestParam(value = "organizationId") Long organizationId,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(value = "categoryCode", required = false) String categoryCode) {
|
||||
// 将 categoryCode 设置到 adviceBaseDto 中
|
||||
if (categoryCode != null && !categoryCode.isEmpty()) {
|
||||
adviceBaseDto.setCategoryCode(categoryCode);
|
||||
}
|
||||
return R.ok(iOutpatientPricingAppService.getAdviceBaseInfo(adviceBaseDto, searchKey, locationId, organizationId,
|
||||
pageNo, pageSize));
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ public interface OutpatientChargeAppMapper {
|
||||
* @param medication 药品
|
||||
* @param device 耗材
|
||||
* @param register 挂号费
|
||||
* @param westernMedicine 西药
|
||||
* @param chinesePatentMedicine 中成药
|
||||
* @param planned 收费状态:待收费
|
||||
* @param billable 收费状态:待结算
|
||||
* @param billed 收费状态:已结算
|
||||
@@ -53,7 +55,9 @@ public interface OutpatientChargeAppMapper {
|
||||
*/
|
||||
List<EncounterPatientPrescriptionDto> selectEncounterPatientPrescription(@Param("encounterId") Long encounterId,
|
||||
@Param("activity") Integer activity, @Param("medication") Integer medication, @Param("device") Integer device,
|
||||
@Param("register") Integer register, @Param("planned") Integer planned, @Param("billable") Integer billable,
|
||||
@Param("register") Integer register, @Param("westernMedicine") Integer westernMedicine,
|
||||
@Param("chinesePatentMedicine") Integer chinesePatentMedicine,
|
||||
@Param("planned") Integer planned, @Param("billable") Integer billable,
|
||||
@Param("billed") Integer billed, @Param("refunding") Integer refunding, @Param("refunded") Integer refunded,
|
||||
@Param("partRefund") Integer partRefund, @Param("worDeviceRequest") String worDeviceRequest);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public interface IDoctorStationAdviceAppService {
|
||||
*/
|
||||
IPage<AdviceBaseDto> getAdviceBaseInfo(AdviceBaseDto adviceBaseDto, String searchKey, Long locationId,
|
||||
List<Long> adviceDefinitionIdParamList, Long organizationId, Integer pageNo, Integer pageSize,
|
||||
Integer pricingFlag, List<Integer> adviceTypes, String orderPricing);
|
||||
Integer pricingFlag, List<Integer> adviceTypes, String orderPricing, String categoryCode);
|
||||
|
||||
/**
|
||||
* 查询医嘱绑定信息
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.medication.domain.MedicationDispense;
|
||||
import com.openhis.medication.domain.MedicationRequest;
|
||||
import com.openhis.medication.service.IMedicationDispenseService;
|
||||
import com.openhis.medication.service.IMedicationRequestService;
|
||||
@@ -44,6 +45,8 @@ import com.openhis.workflow.service.IActivityDefinitionService;
|
||||
import com.openhis.workflow.service.IDeviceDispenseService;
|
||||
import com.openhis.workflow.service.IDeviceRequestService;
|
||||
import com.openhis.workflow.service.IServiceRequestService;
|
||||
import com.openhis.workflow.domain.InventoryItem;
|
||||
import com.openhis.workflow.service.IInventoryItemService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -111,6 +114,9 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
@Resource
|
||||
IEncounterService iEncounterService;
|
||||
|
||||
@Resource
|
||||
IInventoryItemService inventoryItemService;
|
||||
|
||||
// 缓存 key 前缀
|
||||
private static final String ADVICE_BASE_INFO_CACHE_PREFIX = "advice:base:info:";
|
||||
// 缓存过期时间(小时)
|
||||
@@ -135,7 +141,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
@Override
|
||||
public IPage<AdviceBaseDto> getAdviceBaseInfo(AdviceBaseDto adviceBaseDto, String searchKey, Long locationId,
|
||||
List<Long> adviceDefinitionIdParamList, Long organizationId, Integer pageNo, Integer pageSize,
|
||||
Integer pricingFlag, List<Integer> adviceTypes, String orderPricing) {
|
||||
Integer pricingFlag, List<Integer> adviceTypes, String orderPricing, String categoryCode) {
|
||||
|
||||
// 生成缓存键,处理可能的null值
|
||||
String safeSearchKey = searchKey != null ? searchKey : "";
|
||||
@@ -203,7 +209,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
new Page<>(pageNo, pageSize), PublicationStatus.ACTIVE.getValue(), organizationId,
|
||||
CommonConstants.TableName.MED_MEDICATION_DEFINITION, CommonConstants.TableName.ADM_DEVICE_DEFINITION,
|
||||
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, pricingFlag, adviceDefinitionIdParamList,
|
||||
adviceTypes, searchKey,
|
||||
adviceTypes, searchKey, categoryCode,
|
||||
queryWrapper);
|
||||
List<AdviceBaseDto> adviceBaseDtoList = adviceBaseInfo.getRecords();
|
||||
|
||||
@@ -929,7 +935,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
deviceAdviceDto.setAdviceTableName(CommonConstants.TableName.ADM_DEVICE_DEFINITION);
|
||||
IPage<AdviceBaseDto> devicePage = getAdviceBaseInfo(deviceAdviceDto, null, null, null,
|
||||
adviceSaveDto.getFounderOrgId(), 1, 1, Whether.NO.getValue(),
|
||||
List.of(ItemType.DEVICE.getValue()), null);
|
||||
List.of(ItemType.DEVICE.getValue()), null, null);
|
||||
|
||||
if (devicePage == null || devicePage.getRecords().isEmpty()) {
|
||||
log.warn("无法找到耗材定价信息: deviceDefId={}", boundDevice.getDevActId());
|
||||
@@ -1425,26 +1431,26 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
|
||||
// 只有在签发时
|
||||
if (is_sign) {
|
||||
// 发送跨系统申请
|
||||
adviceSaveDto.setRequestId(serviceRequest.getId());
|
||||
try {
|
||||
// 查询诊疗定义
|
||||
ActivityDefinition activityDefinition
|
||||
= iActivityDefinitionService.getById(adviceSaveDto.getAdviceDefinitionId());
|
||||
if (activityDefinition != null) {
|
||||
// 检验 或 检查
|
||||
if (ActivityType.PROOF.getValue().equals(activityDefinition.getTypeEnum())
|
||||
|| ActivityType.TEST.getValue().equals(activityDefinition.getTypeEnum())) {
|
||||
doctorStationSendApplyUtil.sendCrossSystemApply(adviceSaveDto, organizationId, curDate);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (!Whether.YES.getCode()
|
||||
.equals(TenantOptionUtil.getOptionContent(TenantOptionDict.LIS_PACS_ERROR_IGNORE))) {
|
||||
throw e;
|
||||
}
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
// 发送跨系统申请 - 已注释,项目未使用LIS/PACS系统
|
||||
// adviceSaveDto.setRequestId(serviceRequest.getId());
|
||||
// try {
|
||||
// // 查询诊疗定义
|
||||
// ActivityDefinition activityDefinition
|
||||
// = iActivityDefinitionService.getById(adviceSaveDto.getAdviceDefinitionId());
|
||||
// if (activityDefinition != null) {
|
||||
// // 检验 或 检查
|
||||
// if (ActivityType.PROOF.getValue().equals(activityDefinition.getTypeEnum())
|
||||
// || ActivityType.TEST.getValue().equals(activityDefinition.getTypeEnum())) {
|
||||
// doctorStationSendApplyUtil.sendCrossSystemApply(adviceSaveDto, organizationId, curDate);
|
||||
// }
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// if (!Whether.YES.getCode()
|
||||
// .equals(TenantOptionUtil.getOptionContent(TenantOptionDict.LIS_PACS_ERROR_IGNORE))) {
|
||||
// throw e;
|
||||
// }
|
||||
// log.error(e.getMessage(), e);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1509,15 +1515,60 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
iChargeItemService.updatePaymentStatus(chargeItemIdList, ChargeItemStatus.DRAFT.getValue());
|
||||
}
|
||||
|
||||
// 🔧 BugFix: 直接对所有requestId进行作废操作
|
||||
log.info("BugFix#219: signOffAdvice - 作废所有请求, requestIdList={}", requestIdList);
|
||||
// 🔧 新增:签退时回滚库存
|
||||
// 查询已发放的药品记录(用于回滚库存)
|
||||
List<MedicationDispense> dispensedList = iMedicationDispenseService.list(
|
||||
new LambdaQueryWrapper<MedicationDispense>()
|
||||
.in(MedicationDispense::getMedReqId, requestIdList)
|
||||
.eq(MedicationDispense::getStatusEnum, DispenseStatus.COMPLETED.getValue())
|
||||
);
|
||||
|
||||
// 尝试作废药品请求(只有存在的才会更新)
|
||||
iMedicationRequestService.updateCancelledStatusBatch(requestIdList, null, null);
|
||||
// 尝试作废耗材请求(只有存在的才会更新)
|
||||
iDeviceRequestService.updateCancelledStatusBatch(requestIdList);
|
||||
// 尝试作废诊疗请求(只有存在的才会更新)
|
||||
iServiceRequestService.updateCancelledStatusBatch(requestIdList);
|
||||
if (dispensedList != null && !dispensedList.isEmpty()) {
|
||||
// 需要回滚的库存列表
|
||||
List<InventoryItem> inventoryUpdateList = new ArrayList<>();
|
||||
|
||||
for (MedicationDispense dispense : dispensedList) {
|
||||
// 查询对应的库存记录(根据批号和药品ID)
|
||||
if (dispense.getMedicationId() != null && dispense.getLotNumber() != null) {
|
||||
InventoryItem inventoryItem = inventoryItemService.getOne(
|
||||
new LambdaQueryWrapper<InventoryItem>()
|
||||
.eq(InventoryItem::getItemId, dispense.getMedicationId())
|
||||
.eq(InventoryItem::getLotNumber, dispense.getLotNumber())
|
||||
);
|
||||
|
||||
if (inventoryItem != null) {
|
||||
// 计算回滚后的数量(加上已发放的数量)
|
||||
BigDecimal currentQuantity = inventoryItem.getQuantity() != null ? inventoryItem.getQuantity() : BigDecimal.ZERO;
|
||||
BigDecimal dispenseQuantity = dispense.getQuantity() != null ? dispense.getQuantity() : BigDecimal.ZERO;
|
||||
inventoryUpdateList.add(new InventoryItem()
|
||||
.setId(inventoryItem.getId())
|
||||
.setQuantity(currentQuantity.add(dispenseQuantity))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// 更新发药记录状态为已退药
|
||||
dispense.setStatusEnum(DispenseStatus.RETURNED.getValue());
|
||||
}
|
||||
|
||||
// 批量更新库存(回滚数量)
|
||||
if (!inventoryUpdateList.isEmpty()) {
|
||||
inventoryItemService.updateBatchById(inventoryUpdateList);
|
||||
}
|
||||
|
||||
// 更新发药记录状态
|
||||
iMedicationDispenseService.updateBatchById(dispensedList);
|
||||
}
|
||||
|
||||
// 🔧 BugFix: 直接对所有requestId进行签退操作,将状态改为待签发
|
||||
log.info("BugFix: signOffAdvice - 签退所有请求,状态改为待签发, requestIdList={}", requestIdList);
|
||||
|
||||
// 尝试签退药品请求(只有存在的才会更新)
|
||||
iMedicationRequestService.updateDraftStatusBatch(requestIdList, null, null);
|
||||
// 尝试签退耗材请求(只有存在的才会更新)
|
||||
iDeviceRequestService.updateDraftStatusBatch(requestIdList);
|
||||
// 尝试签退诊疗请求(只有存在的才会更新)
|
||||
iServiceRequestService.updateDraftStatusBatch(requestIdList);
|
||||
|
||||
log.info("BugFix#219: signOffAdvice - 所有请求作废完成");
|
||||
|
||||
|
||||
@@ -369,7 +369,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
||||
adviceBaseDto.setAdviceType(1); // 医嘱类型为药品
|
||||
adviceBaseDto.setCategoryCode(MedCategoryCode.CHINESE_HERBAL_MEDICINE.getValue());// 中草药
|
||||
return iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, searchKey, locationId,
|
||||
adviceDefinitionIdParamList, organizationId, pageNo, pageSize, pricingFlag, List.of(1, 2, 3), null);
|
||||
adviceDefinitionIdParamList, organizationId, pageNo, pageSize, pricingFlag, List.of(1, 2, 3), null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -613,7 +613,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
||||
|
||||
// 对应的诊疗医嘱信息
|
||||
AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, null,
|
||||
null, null, organizationId, 1, 1, Whether.NO.getValue(), List.of(3), null).getRecords().get(0);
|
||||
null, null, organizationId, 1, 1, Whether.NO.getValue(), List.of(3), null, null).getRecords().get(0);
|
||||
if (activityAdviceBaseDto != null) {
|
||||
// 费用定价
|
||||
AdvicePriceDto advicePriceDto = activityAdviceBaseDto.getPriceList().get(0);
|
||||
|
||||
@@ -52,7 +52,7 @@ public class DoctorStationAdviceController {
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
return R.ok(iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, searchKey, locationId,
|
||||
adviceDefinitionIdParamList, organizationId, pageNo, pageSize, Whether.NO.getValue(), adviceTypes, null));
|
||||
adviceDefinitionIdParamList, organizationId, pageNo, pageSize, Whether.NO.getValue(), adviceTypes, null, null));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,6 +38,7 @@ public interface DoctorStationAdviceAppMapper {
|
||||
@Param("adviceDefinitionIdParamList") List<Long> adviceDefinitionIdParamList,
|
||||
@Param("adviceTypes") List<Integer> adviceTypes,
|
||||
@Param("searchKey") String searchKey,
|
||||
@Param("categoryCode") String categoryCode,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<AdviceBaseDto> queryWrapper);
|
||||
|
||||
/**
|
||||
|
||||
@@ -364,7 +364,7 @@ public class AdviceUtils {
|
||||
// 对应的子项诊疗医嘱信息
|
||||
AdviceBaseDto activityAdviceBaseDto
|
||||
= iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, null, null, null, organizationId, 1,
|
||||
1, Whether.NO.getValue(), List.of(1, 2, 3), null).getRecords().get(0);
|
||||
1, Whether.NO.getValue(), List.of(1, 2, 3), null, null).getRecords().get(0);
|
||||
if (activityAdviceBaseDto != null) {
|
||||
// 费用定价
|
||||
AdvicePriceDto advicePriceDto = activityAdviceBaseDto.getPriceList().get(0);
|
||||
|
||||
@@ -32,9 +32,11 @@ public class PrescriptionUtils {
|
||||
if (medicineList == null || medicineList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
// 1. 按诊断ID分组(不同诊断必须分开)
|
||||
// 1. 按诊断ID分组(不同诊断必须分开,null值归为一组)
|
||||
Map<Long, List<AdviceSaveDto>> diagnosisGroups =
|
||||
medicineList.stream().collect(Collectors.groupingBy(AdviceSaveDto::getConditionDefinitionId));
|
||||
medicineList.stream().collect(Collectors.groupingBy(dto ->
|
||||
dto.getConditionDefinitionId() != null ? dto.getConditionDefinitionId() : 0L
|
||||
));
|
||||
// 2. 处理每个诊断组
|
||||
diagnosisGroups.values().forEach(this::processDiagnosisGroup);
|
||||
}
|
||||
@@ -46,9 +48,11 @@ public class PrescriptionUtils {
|
||||
if (diagnosisGroup.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
// 1. 按药品性质分组
|
||||
// 1. 按药品性质分组(null值归为普通药品)
|
||||
Map<String, List<AdviceSaveDto>> pharmacologyGroups =
|
||||
diagnosisGroup.stream().collect(Collectors.groupingBy(AdviceSaveDto::getPharmacologyCategoryCode));
|
||||
diagnosisGroup.stream().collect(Collectors.groupingBy(dto ->
|
||||
dto.getPharmacologyCategoryCode() != null ? dto.getPharmacologyCategoryCode() : "0"
|
||||
));
|
||||
// 2. 处理每个药品性质组
|
||||
pharmacologyGroups.values().forEach(pharmaGroup -> {
|
||||
// 2.1 先处理有分组ID的药品(确保它们不会被拆分)
|
||||
|
||||
@@ -702,7 +702,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
= medUseExeList.stream().map(MedicationRequestUseExe::getMedicationId).collect(Collectors.toList());
|
||||
// 医嘱详细信息
|
||||
List<AdviceBaseDto> medicationInfos = doctorStationAdviceAppService.getAdviceBaseInfo(null, null, null,
|
||||
medicationDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(1), null).getRecords();
|
||||
medicationDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(1), null, null).getRecords();
|
||||
|
||||
// 当前时间
|
||||
Date curDate = new Date();
|
||||
@@ -979,7 +979,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
= actUseExeList.stream().map(ServiceRequestUseExe::getActivityId).collect(Collectors.toList());
|
||||
// 医嘱详细信息
|
||||
List<AdviceBaseDto> activityInfos = doctorStationAdviceAppService.getAdviceBaseInfo(null, null, null,
|
||||
activityDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(3), null).getRecords();
|
||||
activityDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(3), null, null).getRecords();
|
||||
|
||||
// 当前时间
|
||||
Date curDate = new Date();
|
||||
@@ -1146,7 +1146,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
|
||||
// 耗材医嘱详细信息
|
||||
List<AdviceBaseDto> deviceInfos = doctorStationAdviceAppService
|
||||
.getAdviceBaseInfo(null, null, null, deviceIds, 0L, 1, 500, Whether.NO.getValue(), List.of(2), null)
|
||||
.getAdviceBaseInfo(null, null, null, deviceIds, 0L, 1, 500, Whether.NO.getValue(), List.of(2), null, null)
|
||||
.getRecords();
|
||||
|
||||
DeviceRequest deviceRequest;
|
||||
|
||||
@@ -201,7 +201,7 @@ public class EncounterAutoRollAppServiceImpl implements IEncounterAutoRollAppSer
|
||||
.map(AutoRollNursingDto::getActivityDefinitionId).collect(Collectors.toList());
|
||||
// 诊疗医嘱信息
|
||||
List<AdviceBaseDto> activityInfos = doctorStationAdviceAppService.getAdviceBaseInfo(null, null, null,
|
||||
activityDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(3), orderPricing).getRecords();
|
||||
activityDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(3), orderPricing, null).getRecords();
|
||||
|
||||
// 计费
|
||||
ChargeItem chargeItem;
|
||||
@@ -295,7 +295,7 @@ public class EncounterAutoRollAppServiceImpl implements IEncounterAutoRollAppSer
|
||||
.map(AutoRollBasicServiceDto::getActivityDefinitionId).collect(Collectors.toList());
|
||||
// 诊疗医嘱信息
|
||||
List<AdviceBaseDto> activityInfos = doctorStationAdviceAppService.getAdviceBaseInfo(null, null, null,
|
||||
activityDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(3), orderPricing).getRecords();
|
||||
activityDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(3), orderPricing, null).getRecords();
|
||||
// 计费
|
||||
ChargeItem chargeItem;
|
||||
for (AutoRollBasicServiceDto autoRollBasicServiceDto : autoRollBasicService) {
|
||||
|
||||
@@ -2095,7 +2095,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
adviceBaseDto.setAdviceDefinitionId(activityDeviceDto.getDevActId());
|
||||
// 对应的诊疗医嘱信息
|
||||
AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, null,
|
||||
null, null, organizationId, 1, 1, Whether.NO.getValue(), List.of(1, 2, 3), null).getRecords().get(0);
|
||||
null, null, organizationId, 1, 1, Whether.NO.getValue(), List.of(1, 2, 3), null, null).getRecords().get(0);
|
||||
// 价格信息
|
||||
if (activityAdviceBaseDto != null) {
|
||||
// 费用定价
|
||||
|
||||
@@ -197,7 +197,7 @@ public class OrdersGroupPackageAppServiceImpl implements IOrdersGroupPackageAppS
|
||||
// 医嘱下拉详细信息
|
||||
List<AdviceBaseDto> personalRecords =
|
||||
iDoctorStationAdviceAppService.getAdviceBaseInfo(null, null, null, orderDefinitionIdParamList,
|
||||
organizationId, 1, 100, Whether.NO.getValue(), List.of(1, 2, 3), null).getRecords();
|
||||
organizationId, 1, 100, Whether.NO.getValue(), List.of(1, 2, 3), null, null).getRecords();
|
||||
// 创建AdviceBaseDto的映射,以adviceDefinitionId为key
|
||||
Map<Long, AdviceBaseDto> adviceMap = personalRecords.stream().collect(Collectors
|
||||
.toMap(AdviceBaseDto::getAdviceDefinitionId, advice -> advice, (existing, replacement) -> existing // 如果有重复key,保留第一个
|
||||
@@ -248,7 +248,7 @@ public class OrdersGroupPackageAppServiceImpl implements IOrdersGroupPackageAppS
|
||||
// 医嘱下拉详细信息
|
||||
List<AdviceBaseDto> personalRecords =
|
||||
iDoctorStationAdviceAppService.getAdviceBaseInfo(null, null, null, orderDefinitionIdParamList,
|
||||
organizationId, 1, 100, Whether.NO.getValue(), List.of(1, 2, 3), null).getRecords();
|
||||
organizationId, 1, 100, Whether.NO.getValue(), List.of(1, 2, 3), null, null).getRecords();
|
||||
// 创建AdviceBaseDto的映射,以adviceDefinitionId为key
|
||||
Map<Long, AdviceBaseDto> adviceMap = personalRecords.stream().collect(Collectors
|
||||
.toMap(AdviceBaseDto::getAdviceDefinitionId, advice -> advice, (existing, replacement) -> existing // 如果有重复key,保留第一个
|
||||
@@ -297,7 +297,7 @@ public class OrdersGroupPackageAppServiceImpl implements IOrdersGroupPackageAppS
|
||||
// 医嘱下拉详细信息
|
||||
List<AdviceBaseDto> personalRecords =
|
||||
iDoctorStationAdviceAppService.getAdviceBaseInfo(null, null, null, orderDefinitionIdParamList,
|
||||
organizationId, 1, 100, Whether.NO.getValue(), List.of(1, 2, 3), null).getRecords();
|
||||
organizationId, 1, 100, Whether.NO.getValue(), List.of(1, 2, 3), null, null).getRecords();
|
||||
// 创建AdviceBaseDto的映射,以adviceDefinitionId为key
|
||||
Map<Long, AdviceBaseDto> adviceMap = personalRecords.stream().collect(Collectors
|
||||
.toMap(AdviceBaseDto::getAdviceDefinitionId, advice -> advice, (existing, replacement) -> existing // 如果有重复key,保留第一个
|
||||
|
||||
@@ -161,7 +161,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService {
|
||||
adviceBaseDto.setAdviceDefinitionId(definitionId); // 医嘱定义id
|
||||
// 对应的诊疗医嘱信息
|
||||
activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, null, null,
|
||||
null, null, 1, 1, Whether.NO.getValue(), List.of(3), null).getRecords().get(0);
|
||||
null, null, 1, 1, Whether.NO.getValue(), List.of(3), null, null).getRecords().get(0);
|
||||
// 逻辑1---------------------直接新增
|
||||
longServiceRequest.setStatusEnum(RequestStatus.DRAFT.getValue());// 请求状态
|
||||
longServiceRequest.setOccurrenceStartTime(startTime); // 医嘱开始时间
|
||||
@@ -208,7 +208,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService {
|
||||
adviceBaseDto.setAdviceDefinitionId(definitionId); // 医嘱定义id
|
||||
// 对应的诊疗医嘱信息
|
||||
activityAdviceBaseDto = iDoctorStationAdviceAppService
|
||||
.getAdviceBaseInfo(adviceBaseDto, null, null, null, null, 1, 1, Whether.NO.getValue(), List.of(3), null)
|
||||
.getAdviceBaseInfo(adviceBaseDto, null, null, null, null, 1, 1, Whether.NO.getValue(), List.of(3), null, null)
|
||||
.getRecords().get(0);
|
||||
|
||||
longServiceRequest.setStatusEnum(RequestStatus.DRAFT.getValue());// 请求状态
|
||||
@@ -348,7 +348,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService {
|
||||
adviceBaseDto.setAdviceDefinitionId(transferOrganizationDefinitionId); // 医嘱定义id
|
||||
// 转科的医嘱信息
|
||||
AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService
|
||||
.getAdviceBaseInfo(adviceBaseDto, null, null, null, null, 1, 1, Whether.NO.getValue(), List.of(3), null)
|
||||
.getAdviceBaseInfo(adviceBaseDto, null, null, null, null, 1, 1, Whether.NO.getValue(), List.of(3), null, null)
|
||||
.getRecords().get(0);
|
||||
// 保存转科医嘱请求
|
||||
ServiceRequest serviceRequest = new ServiceRequest();
|
||||
@@ -430,7 +430,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService {
|
||||
|
||||
// 出院的医嘱信息
|
||||
AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(null, null, null,
|
||||
List.of(transferOrganizationDefinitionId), null, 1, 1, Whether.NO.getValue(), List.of(3), null).getRecords()
|
||||
List.of(transferOrganizationDefinitionId), null, 1, 1, Whether.NO.getValue(), List.of(3), null, null).getRecords()
|
||||
.get(0);
|
||||
// 保存出院医嘱请求
|
||||
ServiceRequest serviceRequest = new ServiceRequest();
|
||||
|
||||
@@ -101,6 +101,9 @@
|
||||
<if test="pricingFlag == 1">
|
||||
AND 1 = 2
|
||||
</if>
|
||||
<if test="categoryCode != null and categoryCode != ''">
|
||||
AND t1.category_code = #{categoryCode}
|
||||
</if>
|
||||
<if test="searchKey != null and searchKey != ''">
|
||||
AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%')
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user