收退费修改
This commit is contained in:
@@ -52,4 +52,11 @@ public interface IOutpatientChargeAppService {
|
|||||||
* @return 操作结果
|
* @return 操作结果
|
||||||
*/
|
*/
|
||||||
R<?> changeToMedicalInsurance(Long encounterId);
|
R<?> changeToMedicalInsurance(Long encounterId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊收费页面初始化
|
||||||
|
*
|
||||||
|
* @return 初始化信息
|
||||||
|
*/
|
||||||
|
R<?> outpatientChargeInit();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,4 +46,11 @@ public interface IOutpatientRefundAppService {
|
|||||||
*/
|
*/
|
||||||
R<?> getBilledEncounterPatientPage(EncounterPatientPageParam encounterPatientPageParam, String searchKey,
|
R<?> getBilledEncounterPatientPage(EncounterPatientPageParam encounterPatientPageParam, String searchKey,
|
||||||
Integer pageNo, Integer pageSize, HttpServletRequest request);
|
Integer pageNo, Integer pageSize, HttpServletRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊退费页面初始化
|
||||||
|
*
|
||||||
|
* @return 初始化信息
|
||||||
|
*/
|
||||||
|
R<?> outpatientRefundInit();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,10 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.chargemanage.appservice.impl;
|
package com.openhis.web.chargemanage.appservice.impl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
@@ -28,6 +30,7 @@ import com.openhis.common.utils.HisQueryUtils;
|
|||||||
import com.openhis.web.chargemanage.appservice.IOutpatientChargeAppService;
|
import com.openhis.web.chargemanage.appservice.IOutpatientChargeAppService;
|
||||||
import com.openhis.web.chargemanage.dto.EncounterPatientPageDto;
|
import com.openhis.web.chargemanage.dto.EncounterPatientPageDto;
|
||||||
import com.openhis.web.chargemanage.dto.EncounterPatientPageParam;
|
import com.openhis.web.chargemanage.dto.EncounterPatientPageParam;
|
||||||
|
import com.openhis.web.chargemanage.dto.OutpatientInitDto;
|
||||||
import com.openhis.web.chargemanage.mapper.OutpatientChargeAppMapper;
|
import com.openhis.web.chargemanage.mapper.OutpatientChargeAppMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,6 +49,25 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IAccountService accountService;
|
private IAccountService accountService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊收费页面初始化
|
||||||
|
*
|
||||||
|
* @return 初始化信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> outpatientChargeInit() {
|
||||||
|
OutpatientInitDto initDto = new OutpatientInitDto();
|
||||||
|
List<OutpatientInitDto.chargeItemStatusOption> chargeItemStatusOptions = new ArrayList<>();
|
||||||
|
chargeItemStatusOptions.add(new OutpatientInitDto.chargeItemStatusOption(ChargeItemStatus.PLANNED.getValue(),
|
||||||
|
ChargeItemStatus.PLANNED.getInfo()));
|
||||||
|
chargeItemStatusOptions.add(new OutpatientInitDto.chargeItemStatusOption(ChargeItemStatus.BILLABLE.getValue(),
|
||||||
|
ChargeItemStatus.BILLABLE.getInfo()));
|
||||||
|
chargeItemStatusOptions.add(new OutpatientInitDto.chargeItemStatusOption(ChargeItemStatus.BILLED.getValue(),
|
||||||
|
ChargeItemStatus.BILLED.getInfo()));
|
||||||
|
initDto.setChargeItemStatusOptions(chargeItemStatusOptions);
|
||||||
|
return R.ok(initDto);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询就诊患者分页列表
|
* 查询就诊患者分页列表
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -27,10 +27,7 @@ import com.openhis.common.utils.HisQueryUtils;
|
|||||||
import com.openhis.financial.service.IPaymentReconciliationService;
|
import com.openhis.financial.service.IPaymentReconciliationService;
|
||||||
import com.openhis.medication.service.IMedicationDispenseService;
|
import com.openhis.medication.service.IMedicationDispenseService;
|
||||||
import com.openhis.web.chargemanage.appservice.IOutpatientRefundAppService;
|
import com.openhis.web.chargemanage.appservice.IOutpatientRefundAppService;
|
||||||
import com.openhis.web.chargemanage.dto.EncounterPatientPageDto;
|
import com.openhis.web.chargemanage.dto.*;
|
||||||
import com.openhis.web.chargemanage.dto.EncounterPatientPageParam;
|
|
||||||
import com.openhis.web.chargemanage.dto.EncounterPatientPaymentDto;
|
|
||||||
import com.openhis.web.chargemanage.dto.RefundItemDto;
|
|
||||||
import com.openhis.web.chargemanage.mapper.OutpatientRefundAppMapper;
|
import com.openhis.web.chargemanage.mapper.OutpatientRefundAppMapper;
|
||||||
import com.openhis.workflow.service.IDeviceDispenseService;
|
import com.openhis.workflow.service.IDeviceDispenseService;
|
||||||
import com.openhis.workflow.service.IServiceRequestService;
|
import com.openhis.workflow.service.IServiceRequestService;
|
||||||
@@ -57,6 +54,27 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IServiceRequestService serviceRequestService;
|
private IServiceRequestService serviceRequestService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊退费页面初始化
|
||||||
|
*
|
||||||
|
* @return 初始化信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> outpatientRefundInit() {
|
||||||
|
OutpatientInitDto initDto = new OutpatientInitDto();
|
||||||
|
List<OutpatientInitDto.chargeItemStatusOption> chargeItemStatusOptions = new ArrayList<>();
|
||||||
|
chargeItemStatusOptions.add(new OutpatientInitDto.chargeItemStatusOption(ChargeItemStatus.BILLED.getValue(),
|
||||||
|
ChargeItemStatus.BILLED.getInfo()));
|
||||||
|
chargeItemStatusOptions.add(new OutpatientInitDto.chargeItemStatusOption(ChargeItemStatus.REFUNDING.getValue(),
|
||||||
|
ChargeItemStatus.REFUNDING.getInfo()));
|
||||||
|
chargeItemStatusOptions.add(new OutpatientInitDto.chargeItemStatusOption(ChargeItemStatus.REFUNDED.getValue(),
|
||||||
|
ChargeItemStatus.REFUNDED.getInfo()));
|
||||||
|
chargeItemStatusOptions.add(new OutpatientInitDto.chargeItemStatusOption(
|
||||||
|
ChargeItemStatus.PART_REFUND.getValue(), ChargeItemStatus.PART_REFUND.getInfo()));
|
||||||
|
initDto.setChargeItemStatusOptions(chargeItemStatusOptions);
|
||||||
|
return R.ok(initDto);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据就诊id查询患者的账单
|
* 根据就诊id查询患者的账单
|
||||||
*
|
*
|
||||||
@@ -156,9 +174,10 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.idCard)),
|
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.idCard)),
|
||||||
request);
|
request);
|
||||||
// 就诊患者分页列表
|
// 就诊患者分页列表
|
||||||
Page<EncounterPatientPageDto> encounterPatientPage =
|
Page<EncounterPatientPageDto> encounterPatientPage = outpatientRefundAppMapper.selectBilledEncounterPatientPage(
|
||||||
outpatientRefundAppMapper.selectBilledEncounterPatientPage(new Page<>(pageNo, pageSize), queryWrapper,
|
new Page<>(pageNo, pageSize), queryWrapper, ChargeItemStatus.BILLED.getValue(),
|
||||||
ChargeItemStatus.BILLED.getValue(), AccountType.MEDICAL_INSURANCE.getValue());
|
ChargeItemStatus.REFUNDING.getValue(), ChargeItemStatus.REFUNDED.getValue(),
|
||||||
|
ChargeItemStatus.PART_REFUND.getValue(), AccountType.MEDICAL_INSURANCE.getValue());
|
||||||
|
|
||||||
encounterPatientPage.getRecords().forEach(e -> {
|
encounterPatientPage.getRecords().forEach(e -> {
|
||||||
// 性别枚举
|
// 性别枚举
|
||||||
|
|||||||
@@ -30,6 +30,16 @@ public class OutpatientChargeController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IOutpatientChargeAppService outpatientChargeAppService;
|
private IOutpatientChargeAppService outpatientChargeAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊收费页面初始化
|
||||||
|
*
|
||||||
|
* @return 初始化信息
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/init")
|
||||||
|
public R<?> outpatientChargeInit() {
|
||||||
|
return outpatientChargeAppService.outpatientChargeInit();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询就诊患者分页列表
|
* 查询就诊患者分页列表
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -32,6 +32,16 @@ public class OutpatientRefundController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IOutpatientRefundAppService outpatientRefundAppService;
|
private IOutpatientRefundAppService outpatientRefundAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊退费页面初始化
|
||||||
|
*
|
||||||
|
* @return 初始化信息
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/init")
|
||||||
|
public R<?> outpatientRefundInit() {
|
||||||
|
return outpatientRefundAppService.outpatientRefundInit();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询结算过的就诊患者分页列表
|
* 查询结算过的就诊患者分页列表
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.chargemanage.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊费用相关初始化
|
||||||
|
*
|
||||||
|
* @author zwh
|
||||||
|
* @date 2025-03-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OutpatientInitDto {
|
||||||
|
|
||||||
|
private List<OutpatientInitDto.chargeItemStatusOption> chargeItemStatusOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收费状态
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class chargeItemStatusOption {
|
||||||
|
private Integer value;
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
public chargeItemStatusOption(Integer value, String label) {
|
||||||
|
this.value = value;
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -59,10 +59,14 @@ public interface OutpatientRefundAppMapper {
|
|||||||
* @param page 分页
|
* @param page 分页
|
||||||
* @param queryWrapper 查询条件
|
* @param queryWrapper 查询条件
|
||||||
* @param billed 收费状态:已结算
|
* @param billed 收费状态:已结算
|
||||||
|
* @param refunding 收费状态:退费中
|
||||||
|
* @param refunded 收费状态:已退费
|
||||||
|
* @param partRefund 收费状态:部分退费
|
||||||
* @param insurance 账户类型:医保
|
* @param insurance 账户类型:医保
|
||||||
* @return 已结算就诊患者分页列表
|
* @return 已结算就诊患者分页列表
|
||||||
*/
|
*/
|
||||||
Page<EncounterPatientPageDto> selectBilledEncounterPatientPage(@Param("page") Page<EncounterPatientPageDto> page,
|
Page<EncounterPatientPageDto> selectBilledEncounterPatientPage(@Param("page") Page<EncounterPatientPageDto> page,
|
||||||
@Param(Constants.WRAPPER) QueryWrapper<EncounterPatientPageParam> queryWrapper, @Param("billed") Integer billed,
|
@Param(Constants.WRAPPER) QueryWrapper<EncounterPatientPageParam> queryWrapper, @Param("billed") Integer billed,
|
||||||
@Param("insurance") Integer insurance);
|
@Param("refunding") Integer refunding, @Param("refunded") Integer refunded,
|
||||||
|
@Param("partRefund") Integer partRefund, @Param("insurance") Integer insurance);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,8 @@
|
|||||||
T2.account_id
|
T2.account_id
|
||||||
FROM fin_payment_reconciliation AS T1
|
FROM fin_payment_reconciliation AS T1
|
||||||
LEFT JOIN adm_charge_item AS T2
|
LEFT JOIN adm_charge_item AS T2
|
||||||
ON T2.id IN (T1.charge_item_ids)
|
-- 因为T2.id是long型,T1.charge_item_ids是例如 "1","2" 的string类型,所以需要先转类型再匹配
|
||||||
|
ON T2.id::TEXT = ANY(string_to_array(T1.charge_item_ids, ','))
|
||||||
WHERE T1.encouter_id =#{encounterId}
|
WHERE T1.encouter_id =#{encounterId}
|
||||||
AND T1.status_enum IN (#{success},#{refundAll},#{refundPart})
|
AND T1.status_enum IN (#{success},#{refundAll},#{refundPart})
|
||||||
AND T1.delete_flag = '0'
|
AND T1.delete_flag = '0'
|
||||||
@@ -98,6 +99,7 @@
|
|||||||
resultType="com.openhis.web.chargemanage.dto.EncounterPatientPageDto">
|
resultType="com.openhis.web.chargemanage.dto.EncounterPatientPageDto">
|
||||||
SELECT T8.encounter_id,
|
SELECT T8.encounter_id,
|
||||||
T8.encounter_bus_no,
|
T8.encounter_bus_no,
|
||||||
|
T8.status_enum,
|
||||||
T8.start_time,
|
T8.start_time,
|
||||||
T8.patient_name,
|
T8.patient_name,
|
||||||
T8.patient_bus_no,
|
T8.patient_bus_no,
|
||||||
@@ -116,6 +118,7 @@
|
|||||||
T1.start_time,
|
T1.start_time,
|
||||||
T1.delete_flag,
|
T1.delete_flag,
|
||||||
T1.tenant_id,
|
T1.tenant_id,
|
||||||
|
T1.status_enum,
|
||||||
T2."name" AS patient_name,
|
T2."name" AS patient_name,
|
||||||
T2.bus_no AS patient_bus_no,
|
T2.bus_no AS patient_bus_no,
|
||||||
T2.gender_enum,
|
T2.gender_enum,
|
||||||
@@ -142,13 +145,14 @@
|
|||||||
ON T6.encouter_id = T1.id
|
ON T6.encouter_id = T1.id
|
||||||
LEFT JOIN fin_payment_rec_detail AS T7
|
LEFT JOIN fin_payment_rec_detail AS T7
|
||||||
ON T7.reconciliation_id = T6.id
|
ON T7.reconciliation_id = T6.id
|
||||||
WHERE T3.status_enum = #{billed}
|
WHERE T3.status_enum IN (#{billed},#{refunding},#{refunded},#{partRefund})
|
||||||
AND T1.delete_flag = '0'
|
AND T1.delete_flag = '0'
|
||||||
GROUP BY T1.id,
|
GROUP BY T1.id,
|
||||||
T1.bus_no,
|
T1.bus_no,
|
||||||
T1.start_time,
|
T1.start_time,
|
||||||
T1.delete_flag,
|
T1.delete_flag,
|
||||||
T1.tenant_id,
|
T1.tenant_id,
|
||||||
|
T1.status_enum,
|
||||||
T2."name",
|
T2."name",
|
||||||
T2.bus_no,
|
T2.bus_no,
|
||||||
T2.gender_enum,
|
T2.gender_enum,
|
||||||
|
|||||||
Reference in New Issue
Block a user