diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/IInHospitalRegisterAppService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/IInHospitalRegisterAppService.java index 5b1e6c55d..71c2f66bd 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/IInHospitalRegisterAppService.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/IInHospitalRegisterAppService.java @@ -39,7 +39,7 @@ public interface IInHospitalRegisterAppService { */ IPage getRegisterInfo(InHospitalRegisterQueryDto inHospitalRegisterQueryDto, String searchKey, String registeredFlag, Integer pageNo, Integer pageSize, - Date startTime, Date endTime, Long organizationId, HttpServletRequest request); + Date startTime, Date endTime, Long organizationId, String idCard, HttpServletRequest request); /** * 查询患者基本信息 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java index c0579990b..7b14e5062 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java @@ -174,16 +174,19 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS @Override public IPage getRegisterInfo(InHospitalRegisterQueryDto inHospitalRegisterQueryDto, String searchKey, String registeredFlag, Integer pageNo, Integer pageSize, - Date startTime, Date endTime, Long organizationId, HttpServletRequest request) { + Date startTime, Date endTime, Long organizationId, String idCard, HttpServletRequest request) { Integer encounterStatus = EncounterZyStatus.TO_BE_REGISTERED.getValue(); // 待登记 + // startTime/endTime 直接传给 Mapper XML 参数,不通过 QueryWrapper + inHospitalRegisterQueryDto.setStartTime(null); + inHospitalRegisterQueryDto.setEndTime(null); // 构建查询条件 QueryWrapper queryWrapper = HisQueryUtils.buildQueryWrapper(inHospitalRegisterQueryDto, searchKey, - new HashSet<>(Arrays.asList("registrar", "source_name", "patient_name", "id_card")), request); + new HashSet<>(Arrays.asList("registrar", "source_name", "patient_name")), request); IPage inHospitalRegisterInfo = inHospitalRegisterAppMapper .getInHospitalRegisterInfo(new Page<>(pageNo, pageSize), EncounterClass.IMP.getValue(), encounterStatus, - registeredFlag, LocationForm.WARD.getValue(), startTime, endTime, organizationId, + registeredFlag, LocationForm.WARD.getValue(), startTime, endTime, organizationId, idCard, queryWrapper); inHospitalRegisterInfo.getRecords().forEach(e -> { // 性别 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/controller/InHospitalRegisterController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/controller/InHospitalRegisterController.java index c01d80520..dadd2d6ed 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/controller/InHospitalRegisterController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/controller/InHospitalRegisterController.java @@ -8,6 +8,7 @@ import com.healthlink.his.web.inhospitalcharge.appservice.IInHospitalRegisterApp import com.healthlink.his.web.inhospitalcharge.dto.*; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.format.annotation.DateTimeFormat; import org.springframework.web.bind.annotation.*; import java.util.Date; @@ -67,12 +68,13 @@ public class InHospitalRegisterController { @RequestParam(value = "registeredFlag") String registeredFlag, @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(value = "startTime", required = false) Date startTime, - @RequestParam(value = "endTime", required = false) Date endTime, + @RequestParam(value = "startTime", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startTime, + @RequestParam(value = "endTime", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endTime, @RequestParam(value = "organizationId", required = false) Long organizationId, + @RequestParam(value = "idCard", required = false) String idCard, HttpServletRequest request) { return R.ok(iInHospitalRegisterAppService.getRegisterInfo(inHospitalRegisterQueryDto, searchKey, registeredFlag, - pageNo, pageSize, startTime, endTime, organizationId, request)); + pageNo, pageSize, startTime, endTime, organizationId, idCard, request)); } /** diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/dto/AdvancePaymentInfoDto.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/dto/AdvancePaymentInfoDto.java index aca7511a4..88b57dab9 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/dto/AdvancePaymentInfoDto.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/dto/AdvancePaymentInfoDto.java @@ -93,4 +93,9 @@ public class AdvancePaymentInfoDto { */ private BigDecimal balanceAmount; + /** + * 费用类型(医保类型,如:职工医保) + */ + private String feeType; + } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/dto/InHospitalRegisterQueryDto.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/dto/InHospitalRegisterQueryDto.java index ba27ad257..aa6952b9d 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/dto/InHospitalRegisterQueryDto.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/dto/InHospitalRegisterQueryDto.java @@ -120,4 +120,14 @@ public class InHospitalRegisterQueryDto { */ @JsonSerialize(using = ToStringSerializer.class) private Long organizationId; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 入院科室名称 + */ + private String organizationName; } \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/mapper/InHospitalRegisterAppMapper.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/mapper/InHospitalRegisterAppMapper.java index 9302e5c64..275de9e25 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/mapper/InHospitalRegisterAppMapper.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/mapper/InHospitalRegisterAppMapper.java @@ -39,6 +39,7 @@ public interface InHospitalRegisterAppMapper { @Param("registeredFlag") String registeredFlag, @Param("formEnum") Integer formEnum, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("organizationId") Long organizationId, + @Param("idCard") String idCard, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); /** diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/inhospitalcharge/AdvancePaymentManageAppMapper.xml b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/inhospitalcharge/AdvancePaymentManageAppMapper.xml index 13eb8ba83..a84a977e9 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/inhospitalcharge/AdvancePaymentManageAppMapper.xml +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/inhospitalcharge/AdvancePaymentManageAppMapper.xml @@ -18,7 +18,8 @@ api.inHospital_org_name, api.account_id, api.total_amount, - api.balance_amount + api.balance_amount, + api.fee_type from (SELECT ae.tenant_id, ae.ID AS encounter_id, ae.bus_no AS bus_no, @@ -34,7 +35,8 @@ aa.id AS account_id, COALESCE(payment.total_amount, 0) AS total_amount, COALESCE(payment.total_amount, 0) - COALESCE(consumption.consumption_amount, 0) + - COALESCE(return_pay.return_amount, 0) AS balance_amount + COALESCE(return_pay.return_amount, 0) AS balance_amount, + fee_info.fee_type AS fee_type FROM adm_encounter AS ae LEFT JOIN adm_patient AS ap ON ap.ID = ae.patient_id AND ap.delete_flag = '0' @@ -83,6 +85,14 @@ AND aci.status_enum IN (#{status3}) AND aci.encounter_id = ae.ID ) AS return_pay ON TRUE + LEFT JOIN LATERAL ( + SELECT fc.contract_name AS fee_type + FROM adm_account AS aa2 + LEFT JOIN fin_contract AS fc ON fc.bus_no = aa2.contract_no AND fc.delete_flag = '0' + WHERE aa2.encounter_id = ae.ID AND aa2.delete_flag = '0' + AND aa2.type_code != #{accountTypeCode} + LIMIT 1 + ) AS fee_info ON TRUE WHERE ae.delete_flag = '0' AND ae.status_enum != #{registeredFlag} AND ae.class_enum = #{classEnum} diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/inhospitalcharge/InHospitalRegisterAppMapper.xml b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/inhospitalcharge/InHospitalRegisterAppMapper.xml index 2cb8459b9..38ed6edf6 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/inhospitalcharge/InHospitalRegisterAppMapper.xml +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/inhospitalcharge/InHospitalRegisterAppMapper.xml @@ -53,6 +53,9 @@ AND ae.organization_id = #{organizationId} + + AND ap.id_card LIKE concat('%', #{idCard}, '%') + AND ae.status_enum = #{encounterStatus} diff --git a/healthlink-his-ui/src/views/inHospitalManagement/charge/advanceDeposit/index.vue b/healthlink-his-ui/src/views/inHospitalManagement/charge/advanceDeposit/index.vue index 7d5bbae2d..241b089d3 100755 --- a/healthlink-his-ui/src/views/inHospitalManagement/charge/advanceDeposit/index.vue +++ b/healthlink-his-ui/src/views/inHospitalManagement/charge/advanceDeposit/index.vue @@ -8,29 +8,28 @@ - - 住院号: - - - 查询 - - - + + 住院号: + + + 查询 + + + + + - + 在院科室/病区: {{ patientInfo.inHospitalOrgName }} / - {{ - patientInfo.wardName + - formatValue(patientInfo.houseName) + - formatValue(patientInfo.bedName) - }} + {{ patientInfo.wardName + formatValue(patientInfo.houseName) }} - + + 床号: + + {{ patientInfo.bedName || '--' }} + + + + 费用类型: + + {{ patientInfo.feeType || '自费' }} + + + + + 重置 @@ -59,9 +77,15 @@ align="center" > + +