浏览代码

add: 审核页面的患者医嘱,住院结算明细,住院结算主单,诊断信息接口

Scott 1 年之前
父节点
当前提交
58e8424ecb

+ 2 - 0
jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java

@@ -146,6 +146,8 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/medical/homepage/**", "anon"); // 首页数据看板临时放通
         filterChainDefinitionMap.put("/medical/violation/analysis/**", "anon"); // 违规分析看板临时放通
 
+        filterChainDefinitionMap.put("/medical/afterwardsAudit/**", "anon"); // 违规分析看板临时放通
+
 //        filterChainDefinitionMap.put("/medical/**", "anon");//JVxeTable无痕刷新示例
 
         //性能监控——安全隐患泄露TOEKN(durid连接池也有)

+ 2 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/common/bo/MedicalInsuranceProjectDetailsResponse.java

@@ -19,6 +19,8 @@ import java.util.Date;
 public class MedicalInsuranceProjectDetailsResponse implements Serializable {
     private static final long serialVersionUID = 1L;
 
+    private Integer id;
+
     @ApiModelProperty(value = "项目使用时间")
     private Date usageDate;
 

+ 11 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/AfterwardsAuditController.java

@@ -90,8 +90,12 @@ public class AfterwardsAuditController extends JeecgController<AfterwardsAudit,
 
 	@ApiOperation(value = "审核端-医院结算明细")
 	@GetMapping(value = "/audit/settlement/detail")
-	public Result<InpatientSettlementDetailResponse> loadInpatientSettlementDetail( @RequestParam("id") Integer id) {
-		InpatientSettlementDetailResponse inpatientSettlementDetailResponse = afterwardsAuditService.loadInpatientSettlementDetail(id);
+	public Result<InpatientSettlementDetailResponse> loadInpatientSettlementDetail( @RequestParam("id") Integer id,
+																					@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+																					@RequestParam(name="pageSize", defaultValue="10") Integer pageSize
+																					) {
+		Page<MedicalInsuranceProjectDetailsResponse> page = new Page<>(pageNo, pageSize);
+		InpatientSettlementDetailResponse inpatientSettlementDetailResponse = afterwardsAuditService.loadInpatientSettlementDetail(page,id);
 		return Result.OK("获取成功", inpatientSettlementDetailResponse);
 	}
 
@@ -117,14 +121,17 @@ public class AfterwardsAuditController extends JeecgController<AfterwardsAudit,
 
 	@ApiOperation(value = "审核端-获取审核详细信息")
 	@GetMapping(value = "/audit/info")
-	public Result<AuditInfoResponse> loadAuditInfo(HttpServletRequest request, @RequestParam("id") Integer id) {
+	public Result<AuditInfoResponse> loadAuditInfo(HttpServletRequest request, @RequestParam("id") Integer id,
+												   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+												   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
 		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 //		 String loginUserName = JwtUtil.getUserNameByToken(request);
 		if (null == loginUser) {
 			log.error("当前用户未登录");
 			throw new JeecgBootException("用户未登录"); // "登录已过期,请重新登录"
 		}
-		AuditInfoResponse result = afterwardsAuditService.loadAuditInfo(id);
+		Page<AuditInfoListResponse> page = new Page<>(pageNo, pageSize);
+		AuditInfoResponse result = afterwardsAuditService.loadAuditInfo(page ,id);
 		return Result.OK(result);
 	}
 

+ 7 - 3
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/ViolationAnalysisController.java

@@ -378,11 +378,15 @@ public class ViolationAnalysisController {
 
     @ApiOperation(value = "违规分析-医院结算明细")
     @GetMapping(value = "/audit/settlement/detail")
-    public Result<InpatientSettlementDetailResponse> loadInpatientSettlementDetail(HttpServletRequest request, @RequestParam("detailId") Integer detailId) {
+    public Result<InpatientSettlementDetailResponse> loadInpatientSettlementDetail(HttpServletRequest request,
+                                                                                   @RequestParam("detailId") Integer detailId,
+                                                                                    @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+                                                                                   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize
+                                                                                    ) {
         AfterwardsAuditDetail byId = afterwardsAuditDetailService.getById(detailId);
-
+        Page<MedicalInsuranceProjectDetailsResponse> page = new Page<>(pageNo, pageSize);
 //        InpatientSettlementDetailResponse result = afterwardsAuditService.loadInpatientSettlementDetail(byId.getAfterwardsAuditId());
-        InpatientSettlementDetailResponse inpatientSettlementDetailResponse = afterwardsAuditService.loadInpatientSettlementDetail(byId.getAfterwardsAuditId());
+        InpatientSettlementDetailResponse inpatientSettlementDetailResponse = afterwardsAuditService.loadInpatientSettlementDetail(page, byId.getAfterwardsAuditId());
         return Result.OK(inpatientSettlementDetailResponse);
     }
 

+ 71 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/ViolationAuditAfterController.java

@@ -0,0 +1,71 @@
+package org.jeecg.modules.medical.controller;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.medical.common.bo.DiagnosticInfoResponse;
+import org.jeecg.modules.medical.common.bo.InpatientSettlementDetailResponse;
+import org.jeecg.modules.medical.common.bo.InpatientSettlementMasterResponse;
+import org.jeecg.modules.medical.common.bo.MedicalInsuranceProjectDetailsResponse;
+import org.jeecg.modules.medical.entity.AfterwardsAuditDetail;
+import org.jeecg.modules.medical.entity.PrescriptionOrder;
+import org.jeecg.modules.medical.service.IViolationAnalysisService;
+import org.jeecg.modules.medical.service.IViolationAuditAfterService;
+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 javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+/**
+ * @author Scott
+ * @time 2023/10/25 21:17 星期三
+ * @description '事后违规审核,审查明细接口'
+ * @parentProject medical-java
+ */
+@Api(tags="审核列表-患者医嘱,住院结算明细,住院结算主单等")
+@RestController
+@RequestMapping("/medical/violation/after")
+@Slf4j
+public class ViolationAuditAfterController {
+
+    @Autowired
+    private IViolationAuditAfterService violationAuditAfterService;
+
+    @ApiOperation(value = "违规分析-医嘱信息")
+    @GetMapping(value = "/audit/medicalorder/info")
+    public Result<List<PrescriptionOrder>> loadMedicalOrderInfoResponseInfo(HttpServletRequest request, @RequestParam(value = "id", required = false) Integer id) {
+        List<PrescriptionOrder> result = violationAuditAfterService.loadPrescriptionOrderInfo(id);
+        return Result.OK(result);
+    }
+
+    @ApiOperation(value = "违规分析-医院结算明细")
+    @GetMapping(value = "/audit/settlement/detail")
+    public Result<InpatientSettlementDetailResponse> loadInpatientSettlementDetail(HttpServletRequest request,
+                                                                                   @RequestParam("id") Integer id,
+                                                                                   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+                                                                                   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
+        Page<MedicalInsuranceProjectDetailsResponse> page = new Page<>(pageNo, pageSize);
+        InpatientSettlementDetailResponse result = violationAuditAfterService.loadInpatientSettlementDetail(page, id);
+        return Result.OK(result);
+    }
+
+    @ApiOperation(value = "违规分析-患者住院结算主单")
+    @GetMapping(value = "/audit/settlement/master")
+    public Result<List<InpatientSettlementMasterResponse>> loadInpatientSettlementMaster(HttpServletRequest request, @RequestParam("id") Integer id) {
+        List<InpatientSettlementMasterResponse> result = violationAuditAfterService.loadInpatientSettlementMaster(id);
+        return Result.OK("获取成功", result);
+    }
+
+    @ApiOperation(value = "违规分析-诊断信息")
+    @GetMapping(value = "/audit/diagnostic/info")
+    public Result<List<DiagnosticInfoResponse>> loadDiagnosticInformation(HttpServletRequest request, @RequestParam("id") Integer id) {
+        List<DiagnosticInfoResponse> result = violationAuditAfterService.loadDiagnosticInfo(id);
+        return Result.OK(result);
+    }
+}

+ 3 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/AfterwardsAuditMapper.java

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.apache.ibatis.annotations.Param;
 import org.jeecg.modules.medical.common.bo.*;
 import org.jeecg.modules.medical.common.bo.after.response.AfterDeptDetailRequest;
+import org.jeecg.modules.medical.common.bo.mid.AuditMidDetailListResponse;
 import org.jeecg.modules.medical.common.bo.mid.request.AuditMidDetailListRequest;
 import org.jeecg.modules.medical.entity.AfterwardsAudit;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -67,7 +68,7 @@ public interface AfterwardsAuditMapper extends BaseMapper<AfterwardsAudit> {
      * @param id
      * @return
      */
-    List<AuditInfoListResponse> loadAuditInfoList(@Param("id") Integer id);
+    List<AuditInfoListResponse> loadAuditInfoList(Page<AuditInfoListResponse> page, @Param("id") Integer id);
 
     List<DiagnosticInfoResponse> loadDiagnosticInfo(@Param("id") Integer id);
 //    prescription_order
@@ -85,7 +86,7 @@ public interface AfterwardsAuditMapper extends BaseMapper<AfterwardsAudit> {
      * @param id
      * @return
      */
-    List<MedicalInsuranceProjectDetailsResponse> loadMedicalInsuranceProjectDetails(@Param("hisid") String hisid);
+    List<MedicalInsuranceProjectDetailsResponse> loadMedicalInsuranceProjectDetails(Page<MedicalInsuranceProjectDetailsResponse> page, @Param("hisid") String hisid);
 
     List<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(@Param("id") Integer id);
 

+ 3 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/xml/AfterwardsAuditMapper.xml

@@ -209,6 +209,8 @@
              t.medical_project_code as medicalProjectCode, -- "医保项目编码",
              t.medical_project_name as medicalProjectName, -- "医保项目名称",
              t.medical_ins_rule_info_name as medicalInsRuleInfoName, -- "项目类型|违规类型"
+             t.proejct_code,
+             t.proejct_name,
              t.id
             FROM afterwards_audit_detail as t
                   LEFT JOIN medicine as m on t.proejct_code = m.medicine_code AND t.project_type = 'medicine'
@@ -270,6 +272,7 @@
     <select id="loadMedicalInsuranceProjectDetails"
             resultType="org.jeecg.modules.medical.common.bo.MedicalInsuranceProjectDetailsResponse">
         SELECT
+            id,
             usage_date AS usageDate, -- "项目使用时间"
             discharge_dept_name AS dischargeDeptName, -- "科室名称"
             p_category AS pCategory, -- "费用类别"
@@ -283,7 +286,6 @@
         FROM
             hospitalizatio_settle_detail
         WHERE
-
             hisid = #{hisid}
     </select>
 <!--    &#45;&#45;             zyh = (SELECT outpatient_number FROM afterwards_audit AS ad WHERE ad.id = #{id,jdbcType=INTEGER})-->

+ 3 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/IAfterwardsAuditService.java

@@ -8,6 +8,7 @@ import org.jeecg.modules.medical.common.bo.*;
 import org.jeecg.modules.medical.common.bo.after.response.AfterDeptDetailRequest;
 import org.jeecg.modules.medical.common.bo.after.response.AfterwardsAuditDetailResponse;
 import org.jeecg.modules.medical.common.bo.before.AuditAdvanceWarningAuditDetailResponse;
+import org.jeecg.modules.medical.common.bo.mid.AuditMidDetailListResponse;
 import org.jeecg.modules.medical.common.bo.mid.request.AuditMidDetailListRequest;
 import org.jeecg.modules.medical.common.bo.mid.response.MidAuditViolateProjectStatisticsResponse;
 import org.jeecg.modules.medical.entity.AfterwardsAudit;
@@ -66,7 +67,7 @@ public interface IAfterwardsAuditService extends IService<AfterwardsAudit> {
      * @param id
      * @return
      */
-    AuditInfoResponse loadAuditInfo(Integer id);
+    AuditInfoResponse loadAuditInfo(Page<AuditInfoListResponse> page, Integer id);
 
 
     /**
@@ -97,7 +98,7 @@ public interface IAfterwardsAuditService extends IService<AfterwardsAudit> {
      * @param id 事后审核工单id
      * @return
      */
-    InpatientSettlementDetailResponse loadInpatientSettlementDetail(Integer id);
+    InpatientSettlementDetailResponse loadInpatientSettlementDetail(Page<MedicalInsuranceProjectDetailsResponse> page, Integer id);
 
     /**
      * 根据事后审核工单id, 查询审核申诉记录表

+ 26 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/IViolationAuditAfterService.java

@@ -0,0 +1,26 @@
+package org.jeecg.modules.medical.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.jeecg.modules.medical.common.bo.DiagnosticInfoResponse;
+import org.jeecg.modules.medical.common.bo.InpatientSettlementDetailResponse;
+import org.jeecg.modules.medical.common.bo.InpatientSettlementMasterResponse;
+import org.jeecg.modules.medical.common.bo.MedicalInsuranceProjectDetailsResponse;
+import org.jeecg.modules.medical.entity.PrescriptionOrder;
+
+import java.util.List;
+
+/**
+ * @author Scott
+ * @time 2023/10/25 21:18 星期三
+ * @description '事后-违规审核'
+ * @parentProject medical-java
+ */
+public interface IViolationAuditAfterService {
+    List<PrescriptionOrder> loadPrescriptionOrderInfo(Integer id);
+
+    InpatientSettlementDetailResponse loadInpatientSettlementDetail(Page<MedicalInsuranceProjectDetailsResponse> page, Integer id);
+
+    List<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(Integer id);
+
+    List<DiagnosticInfoResponse> loadDiagnosticInfo(Integer id);
+}

+ 5 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/AfterwardsAuditServiceImpl.java

@@ -14,6 +14,7 @@ import org.jeecg.modules.medical.common.bo.*;
 import org.jeecg.modules.medical.common.bo.after.response.AfterDeptDetailRequest;
 import org.jeecg.modules.medical.common.bo.after.response.AfterwardsAuditDetailResponse;
 import org.jeecg.modules.medical.common.bo.before.AuditAdvanceWarningAuditDetailResponse;
+import org.jeecg.modules.medical.common.bo.mid.AuditMidDetailListResponse;
 import org.jeecg.modules.medical.common.bo.mid.request.AuditMidDetailListRequest;
 import org.jeecg.modules.medical.common.bo.mid.response.MidAuditViolateProjectStatisticsResponse;
 import org.jeecg.modules.medical.common.enums.AfterwardsAuditStatusEnum;
@@ -367,7 +368,7 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
     }
 
     @Override
-    public AuditInfoResponse loadAuditInfo(Integer id) {
+    public AuditInfoResponse loadAuditInfo(Page<AuditInfoListResponse> page, Integer id) {
         AuditInfoResponse result = baseMapper.loadAuditInfo(id);
         if (ObjectUtils.nullSafeEquals(result.getCheckState(), AfterwardsAuditStatusEnum.wait.getStatus())) {
             result.setStatus(AfterwardsAuditStatusEnum.wait.getStatus());
@@ -388,7 +389,7 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
         result.setAuditNumber(appealNumber);
 
         //获取违规的detail数据
-        List<AuditInfoListResponse> auditInfoListResponseList = baseMapper.loadAuditInfoList(id);
+        List<AuditInfoListResponse> auditInfoListResponseList = baseMapper.loadAuditInfoList(page, id);
         if (!CollectionUtils.isEmpty(auditInfoListResponseList)) {
             for (AuditInfoListResponse auditInfoListResponse : auditInfoListResponseList) {
                 // 计算异常多收-少收
@@ -487,12 +488,12 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
     }
 
     @Override
-    public InpatientSettlementDetailResponse loadInpatientSettlementDetail(Integer id) {
+    public InpatientSettlementDetailResponse loadInpatientSettlementDetail(Page<MedicalInsuranceProjectDetailsResponse> page, Integer id) {
         // 获取患者信息
         PatientInfoResponse patientInfo = baseMapper.loadInpatientSettlementInfo(id);
         String hisid = patientInfo.getSettlementBillNumber();
         // 获取医保项目明细
-        List<MedicalInsuranceProjectDetailsResponse> medicalInsuranceProjects = baseMapper.loadMedicalInsuranceProjectDetails(hisid);
+        List<MedicalInsuranceProjectDetailsResponse> medicalInsuranceProjects = baseMapper.loadMedicalInsuranceProjectDetails(page, hisid);
         InpatientSettlementDetailResponse r = new InpatientSettlementDetailResponse();
         r.setPatientInfo(patientInfo);
         r.setHospitalizationSettleDetailResponse(medicalInsuranceProjects);

+ 77 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/ViolationAuditAfterServiceImpl.java

@@ -0,0 +1,77 @@
+package org.jeecg.modules.medical.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.exception.JeecgBootException;
+import org.jeecg.modules.medical.common.bo.*;
+import org.jeecg.modules.medical.entity.AfterwardsAudit;
+import org.jeecg.modules.medical.entity.AfterwardsAuditDetail;
+import org.jeecg.modules.medical.entity.PrescriptionOrder;
+import org.jeecg.modules.medical.mapper.AfterwardsAuditMapper;
+import org.jeecg.modules.medical.service.IAfterwardsAuditDetailService;
+import org.jeecg.modules.medical.service.IAfterwardsAuditService;
+import org.jeecg.modules.medical.service.IPrescriptionOrderService;
+import org.jeecg.modules.medical.service.IViolationAuditAfterService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.util.List;
+
+/**
+ * @author yaowei
+ * @time 2023/10/25 21:19 星期三
+ * @description '这里写类描述'
+ * @parentProject medical-java
+ */
+@Slf4j
+@Service
+public class ViolationAuditAfterServiceImpl implements IViolationAuditAfterService {
+
+    @Autowired
+    private IPrescriptionOrderService prescriptionOrderService;
+    @Autowired
+    private IAfterwardsAuditService afterwardsAuditService;
+    @Autowired
+    private AfterwardsAuditMapper afterwardsAuditMapper;
+
+    @Override
+    public List<PrescriptionOrder> loadPrescriptionOrderInfo(Integer id) {
+        String prescriptionNumber = "";
+        AfterwardsAudit byId1 = afterwardsAuditService.getById(id);
+        if (byId1 != null) {
+            prescriptionNumber = byId1.getPrescriptionNumber();
+        }
+        if (!StringUtils.hasText(prescriptionNumber)) {
+            throw new JeecgBootException("找不到主单记录");
+        }
+        LambdaQueryWrapper<PrescriptionOrder> queryWrapper = Wrappers.<PrescriptionOrder>lambdaQuery()
+                .eq(PrescriptionOrder::getOrderNumber, prescriptionNumber);
+        return prescriptionOrderService.list(queryWrapper);
+    }
+
+    @Override
+    public InpatientSettlementDetailResponse loadInpatientSettlementDetail(Page<MedicalInsuranceProjectDetailsResponse> page, Integer id) {
+        // 获取患者信息
+        PatientInfoResponse patientInfo = afterwardsAuditMapper.loadInpatientSettlementInfo(id);
+        String hisid = patientInfo.getSettlementBillNumber();
+        // 获取医保项目明细
+        List<MedicalInsuranceProjectDetailsResponse> medicalInsuranceProjects = afterwardsAuditMapper.loadMedicalInsuranceProjectDetails(page, hisid);
+        InpatientSettlementDetailResponse r = new InpatientSettlementDetailResponse();
+        r.setPatientInfo(patientInfo);
+        r.setHospitalizationSettleDetailResponse(medicalInsuranceProjects);
+        return r;
+    }
+
+    @Override
+    public List<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(Integer id) {
+        return afterwardsAuditMapper.loadInpatientSettlementMaster(id);
+    }
+
+    @Override
+    public List<DiagnosticInfoResponse> loadDiagnosticInfo(Integer id) {
+        return afterwardsAuditMapper.loadDiagnosticInfo(id);
+    }
+}