Pārlūkot izejas kodu

add: 审核端-增加医生审核列表

Scott 2 gadi atpakaļ
vecāks
revīzija
f7aeba5120

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

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import javax.validation.constraints.NotBlank;
 import java.io.Serializable;
 
 /**
@@ -22,6 +23,11 @@ public class DoctorViolationRequest implements Serializable {
     @ApiModelProperty(value = "患者姓名")
     private String patientName;
 
+    @NotBlank(message = "违规医生编码不可为空")
+    @ApiModelProperty(value = "违规医生编码")
+    private String doctorId;
+
+    @NotBlank(message = "审核状态不可为空")
     @ApiModelProperty(value = "审核状态: wait=待分配; process=处理中; finish=已完成")
     private java.lang.String checkState;
 

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

@@ -0,0 +1,50 @@
+package org.jeecg.modules.medical.common.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author soft01
+ * @time 2023/5/28 11:26
+ * @description '这里描写类的用途'
+ * @parentProject medical-java
+ */
+@ApiModel(value = "医保项目明细")
+@Data
+public class HospitalizationSettleDetailResponse implements Serializable {
+
+    @ApiModelProperty(value = "项目使用时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "科室名称")
+    private String dischargeDeptName;
+
+    @ApiModelProperty(value = "费用类别")
+    private String pCategory;
+
+    @ApiModelProperty(value = "医保项目编码")
+    private String itemId;
+
+    @ApiModelProperty(value = "医保项目名称")
+    private String itemName;
+
+    @ApiModelProperty(value = "规格")
+    private String drugSpec;
+
+    @ApiModelProperty(value = "单价")
+    private BigDecimal unitPrice;
+
+    @ApiModelProperty(value = "数量")
+    private Integer num;
+
+    @ApiModelProperty(value = "发生金额")
+    private BigDecimal cost;
+
+    @ApiModelProperty(value = "支付列表")
+    private String pType;
+}

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

@@ -0,0 +1,26 @@
+package org.jeecg.modules.medical.common.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author soft01
+ * @time 2023/5/28 11:14
+ * @description '住院结算明细'
+ * @parentProject medical-java
+ */
+@ApiModel("住院结算明细")
+@Data
+public class InpatientSettlementDetailResponse implements Serializable {
+
+    @ApiModelProperty("患者信息")
+    private PatientInfoResponse patientInfo;
+
+    @ApiModelProperty("医保项目明细")
+    private List<HospitalizationSettleDetailResponse> hospitalizationSettleDetailResponse;
+
+}

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

@@ -0,0 +1,32 @@
+package org.jeecg.modules.medical.common.bo;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author soft01
+ * @time 2023/5/28 11:17
+ * @description '患者信息响应'
+ * @parentProject medical-java
+ */
+public class PatientInfoResponse implements Serializable {
+
+    @ApiModelProperty(value = "住院号")
+    private String admissionNumber;
+
+    @ApiModelProperty(value = "患者姓名")
+    private String patientName;
+
+    @ApiModelProperty(value = "个人编码")
+    private String personalCode;
+
+    @ApiModelProperty(value = "结算单据号")
+    private String settlementBillNumber;
+
+    @ApiModelProperty(value = "总发生金额")
+    private BigDecimal totalAmount;
+
+
+}

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

@@ -64,30 +64,9 @@ public class AfterwardsAuditController extends JeecgController<AfterwardsAudit,
 		 return Result.OK(pageList);
 	 }
 
-	 @ApiOperation(value = "审核端-获取审核详细信息")
-	 @GetMapping(value = "/audit/info")
-	 public Result<AuditInfoResponse> loadAuditInfo(HttpServletRequest request, @RequestParam("id") Integer id) {
-		 LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-//		 String loginUserName = JwtUtil.getUserNameByToken(request);
-		 if (null == loginUser) {
-			 log.error("当前用户未登录");
-			 throw new JeecgBootException("用户未登录"); // "登录已过期,请重新登录"
-		 }
-		 AuditInfoResponse result = afterwardsAuditService.loadAuditInfo(id);
-		 return Result.OK(result);
-	 }
 
-	 @ApiOperation(value = "审核端-诊断信息")
-	 @GetMapping(value = "/audit/diagnostic/info")
-	 public Result<List<DiagnosticInfoResponse>> loadDiagnosticInformation(HttpServletRequest request, @RequestParam("id") Integer id) {
-		 LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-		 if (null == loginUser) {
-			 log.error("当前用户未登录");
-			 throw new JeecgBootException("用户未登录"); // "登录已过期,请重新登录"
-		 }
-		List<DiagnosticInfoResponse> result = afterwardsAuditService.loadDiagnosticInfo(id);
-		return Result.OK(result);
-	 }
+
+
 
 	 @ApiOperation(value = "审核端-医嘱信息")
 	 @GetMapping(value = "/audit/")
@@ -101,6 +80,40 @@ public class AfterwardsAuditController extends JeecgController<AfterwardsAudit,
 		 return Result.OK(result);
 	 }
 
+	@ApiOperation(value = "审核端-医院结算明细")
+	@GetMapping(value = "/audit/settlement/detail")
+	public Result<InpatientSettlementDetailResponse> loadInpatientSettlementDetail(HttpServletRequest request, @RequestParam("id") Integer id) {
+		InpatientSettlementDetailResponse result = afterwardsAuditService.loadInpatientSettlementDetail(id);
+		return Result.OK("获取成功", result);
+	}
+
+
+
+	@ApiOperation(value = "审核端-诊断信息")
+	@GetMapping(value = "/audit/diagnostic/info")
+	public Result<List<DiagnosticInfoResponse>> loadDiagnosticInformation(HttpServletRequest request, @RequestParam("id") Integer id) {
+		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		if (null == loginUser) {
+			log.error("当前用户未登录");
+			throw new JeecgBootException("用户未登录"); // "登录已过期,请重新登录"
+		}
+		List<DiagnosticInfoResponse> result = afterwardsAuditService.loadDiagnosticInfo(id);
+		return Result.OK(result);
+	}
+
+	@ApiOperation(value = "审核端-获取审核详细信息")
+	@GetMapping(value = "/audit/info")
+	public Result<AuditInfoResponse> loadAuditInfo(HttpServletRequest request, @RequestParam("id") Integer id) {
+		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+//		 String loginUserName = JwtUtil.getUserNameByToken(request);
+		if (null == loginUser) {
+			log.error("当前用户未登录");
+			throw new JeecgBootException("用户未登录"); // "登录已过期,请重新登录"
+		}
+		AuditInfoResponse result = afterwardsAuditService.loadAuditInfo(id);
+		return Result.OK(result);
+	}
+
 	 @ApiOperation(value = "审核端-发起审核", notes = "审核端-发起审核")
 	 @PostMapping(value = "/audit")
 	 public Result<String> audit(HttpServletRequest request, @RequestBody @Valid AuditRequestBO param) {
@@ -128,6 +141,7 @@ public class AfterwardsAuditController extends JeecgController<AfterwardsAudit,
 		afterwardsAudit.setOutpatientNumber(param.getAdmissionNumber());
 		afterwardsAudit.setPatientId(param.getPatientName());
 		afterwardsAudit.setCheckState(param.getCheckState());
+		afterwardsAudit.setDoctorId(param.getDoctorId());
 		QueryWrapper<AfterwardsAudit> queryWrapper = QueryGenerator.initQueryWrapper(afterwardsAudit, req.getParameterMap());
 		Page<AfterwardsAudit> page = new Page<>(pageNo, pageSize);
 		IPage<AfterwardsAudit> violations = afterwardsAuditService.getDoctorViolations(page, queryWrapper, loginUser);

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

@@ -69,4 +69,11 @@ public interface AfterwardsAuditMapper extends BaseMapper<AfterwardsAudit> {
     List<DiagnosticInfoResponse> loadDiagnosticInfo(@Param("id") Integer id);
 
     List<MedicalOrderInfoResponse> loadMedicalOrderInfo(@Param("id") Integer id);
+
+    /**
+     * 查询患者信息
+     * @param id
+     * @return
+     */
+    PatientInfoResponse loadInpatientSettlementInfo(@Param("id") Integer id);
 }

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

@@ -251,4 +251,21 @@
         WHERE
             ad.id = #{id, jdbcType=INTEGER}
     </select>
+
+    <!-- loadInpatientSettlementInfo 查询方法 -->
+    <select id="loadInpatientSettlementInfo" resultType="org.jeecg.modules.medical.common.bo.PatientInfoResponse">
+        SELECT
+            a.id,
+            a.outpatient_number AS admissionNumber, -- 住院号
+            a.patient_name AS patientName, -- 患者姓名
+            a.patient_id AS personalCode, -- 个人编码
+            mab.hisid AS settlementBillNumber, -- 结算单据号
+            mab.medfee_sumamt AS totalAmount -- 总发生金额
+        FROM
+            afterwards_audit AS a
+                LEFT JOIN master_admission_bill AS mab ON mab.zyh = a.outpatient_number
+        WHERE
+            a.id = #{id, jdbcType=INTEGER}
+
+    </select>
 </mapper>

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

@@ -82,4 +82,11 @@ public interface IAfterwardsAuditService extends IService<AfterwardsAudit> {
      * @return
      */
     IPage<AfterwardsAudit> getDoctorViolations(Page<AfterwardsAudit> page, QueryWrapper<AfterwardsAudit> queryWrapper, LoginUser loginUser);
+
+    /**
+     * 获取住院结算明细
+     * @param id 事后审核工单id
+     * @return
+     */
+    InpatientSettlementDetailResponse loadInpatientSettlementDetail(Integer id);
 }

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

@@ -381,8 +381,16 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
             log.error("找不到登录用户信息={},的医生编码信息,请检查", loginUser.getUsername());
             throw new JeecgBootException("找不到登录用户的医生编码(医生id)信息,请检查!");
         }
-        queryWrapper.eq("doctor_id", userByName.getDoctorId());
+//        queryWrapper.eq("doctor_id", userByName.getDoctorId());
         queryWrapper.eq("medical_dept_code", medicalDeptCode);
         return this.page(page, queryWrapper);
     }
+
+    @Override
+    public InpatientSettlementDetailResponse loadInpatientSettlementDetail(Integer id) {
+        // 获取患者信息
+        PatientInfoResponse patientInfo = baseMapper.loadInpatientSettlementInfo(id);
+        // 获取医保项目明细
+        return null;
+    }
 }