Browse Source

fix: 修复审核端诊断分析数据

Scott 1 year ago
parent
commit
8d6d6f5387

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

@@ -9,10 +9,17 @@ import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import java.net.URLDecoder;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
+
+import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.medical.common.bo.DiagnosticInfoResponse;
+import org.jeecg.modules.medical.entity.AfterwardsAuditDetail;
 import org.jeecg.modules.medical.entity.Audit;
 import org.jeecg.modules.medical.entity.Audit;
+import org.jeecg.modules.medical.service.IAfterwardsAuditService;
 import org.jeecg.modules.medical.service.IAuditService;
 import org.jeecg.modules.medical.service.IAuditService;
 
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -50,6 +57,8 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
 public class AuditController extends JeecgController<Audit, IAuditService> {
 public class AuditController extends JeecgController<Audit, IAuditService> {
 	@Autowired
 	@Autowired
 	private IAuditService auditService;
 	private IAuditService auditService;
+	 @Autowired
+	 private IAfterwardsAuditService afterwardsAuditService;
 	
 	
 	/**
 	/**
 	 * 分页列表查询
 	 * 分页列表查询
@@ -169,4 +178,16 @@ public class AuditController extends JeecgController<Audit, IAuditService> {
         return super.importExcel(request, response, Audit.class);
         return super.importExcel(request, response, Audit.class);
     }
     }
 
 
+	 @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.loadDiagnosticInfoByAfterwardsMainId(id);
+		 return Result.OK(result);
+	 }
+
 }
 }

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

@@ -401,7 +401,7 @@ public class ViolationAnalysisController {
         return Result.OK("获取成功", result);
         return Result.OK("获取成功", result);
     }
     }
 
 
-    @ApiOperation(value = "违规分析-诊断信息")
+    @ApiOperation(value = "事后-违规分析-诊断信息")
     @GetMapping(value = "/audit/diagnostic/info")
     @GetMapping(value = "/audit/diagnostic/info")
     public Result<List<DiagnosticInfoResponse>> loadDiagnosticInformation(HttpServletRequest request, @RequestParam("detailId") Integer detailId) {
     public Result<List<DiagnosticInfoResponse>> loadDiagnosticInformation(HttpServletRequest request, @RequestParam("detailId") Integer detailId) {
         AfterwardsAuditDetail byId = afterwardsAuditDetailService.getById(detailId);
         AfterwardsAuditDetail byId = afterwardsAuditDetailService.getById(detailId);

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

@@ -71,6 +71,8 @@ public interface AfterwardsAuditMapper extends BaseMapper<AfterwardsAudit> {
     IPage<AuditInfoListResponse> loadAuditInfoList(Page<AuditInfoListResponse> page, @Param("id") Integer id);
     IPage<AuditInfoListResponse> loadAuditInfoList(Page<AuditInfoListResponse> page, @Param("id") Integer id);
 
 
     List<DiagnosticInfoResponse> loadDiagnosticInfo(@Param("id") Integer id);
     List<DiagnosticInfoResponse> loadDiagnosticInfo(@Param("id") Integer id);
+
+    List<DiagnosticInfoResponse> loadDiagnosticInfoByAfterwardsMainId(@Param("id") Integer id);
 //    prescription_order
 //    prescription_order
     List<PrescriptionOrder> loadMedicalOrderInfo(@Param("id") Integer id);
     List<PrescriptionOrder> loadMedicalOrderInfo(@Param("id") Integer id);
 
 
@@ -91,4 +93,6 @@ public interface AfterwardsAuditMapper extends BaseMapper<AfterwardsAudit> {
     IPage<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(Page<MedicalInsuranceProjectDetailsResponse> page, @Param("id") Integer id);
     IPage<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(Page<MedicalInsuranceProjectDetailsResponse> page, @Param("id") Integer id);
 
 
     BigDecimal statisticsAfterAuditTotal(@Param("ew") AfterDeptDetailRequest afterwardsAuditDetail);
     BigDecimal statisticsAfterAuditTotal(@Param("ew") AfterDeptDetailRequest afterwardsAuditDetail);
+
+
 }
 }

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

@@ -234,6 +234,22 @@
         WHERE ad.id = #{id, jdbcType=INTEGER}
         WHERE ad.id = #{id, jdbcType=INTEGER}
     </select>
     </select>
 
 
+    <select id="loadDiagnosticInfoByAfterwardsMainId"
+            resultType="org.jeecg.modules.medical.common.bo.DiagnosticInfoResponse">
+        SELECT
+            ad.id,
+            h.outpatient_number as outpatientNumber, -- "住院号",
+            h.diagnose_code as mainDiagnosisCode, -- "主要诊断编码",
+            h.diagnose_desc as mainDiagnosisName, -- "主要诊断名称",
+            h.med_diagnose_code as subDiagnosisCode, -- "副诊断编码",
+            h.diagnose_desc as subDiagnosisName, -- "副诊断名称"
+            "" as subDiagnosis2Code -- 这个等后面确认
+        FROM
+            afterwards_audit as ad
+                RIGHT JOIN afterwards_incident_audit_diagnose as h ON ad.id = h.afterwards_audit_id
+        WHERE ad.id = #{id, jdbcType=INTEGER}
+    </select>
+
     <select id="loadMedicalOrderInfo"
     <select id="loadMedicalOrderInfo"
             resultType="org.jeecg.modules.medical.entity.PrescriptionOrder">
             resultType="org.jeecg.modules.medical.entity.PrescriptionOrder">
         SELECT
         SELECT
@@ -346,4 +362,5 @@
 
 
 
 
     </select>
     </select>
+
 </mapper>
 </mapper>

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

@@ -78,6 +78,8 @@ public interface IAfterwardsAuditService extends IService<AfterwardsAudit> {
     List<DiagnosticInfoResponse> loadDiagnosticInfo(Integer detailId);
     List<DiagnosticInfoResponse> loadDiagnosticInfo(Integer detailId);
 
 
 
 
+    List<DiagnosticInfoResponse> loadDiagnosticInfoByAfterwardsMainId(Integer id);
+
     /**
     /**
      * 获取医嘱信息
      * 获取医嘱信息
      * @param id
      * @param id
@@ -117,4 +119,5 @@ public interface IAfterwardsAuditService extends IService<AfterwardsAudit> {
 
 
     BigDecimal statisticsAfterAuditTotal(AfterDeptDetailRequest afterwardsAuditDetail);
     BigDecimal statisticsAfterAuditTotal(AfterDeptDetailRequest afterwardsAuditDetail);
 
 
+
 }
 }

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

@@ -429,6 +429,19 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
         return baseMapper.loadDiagnosticInfo(id);
         return baseMapper.loadDiagnosticInfo(id);
     }
     }
 
 
+    /**
+     * 根据工单号,获取诊断信息
+     *
+     * @param id
+     * @return
+     */
+    @Override
+    public List<DiagnosticInfoResponse> loadDiagnosticInfoByAfterwardsMainId(Integer id) {
+
+        // TODO
+        return baseMapper.loadDiagnosticInfoByAfterwardsMainId(id);
+    }
+
     @Override
     @Override
     public List<PrescriptionOrder> loadMedicalOrderInfo(Integer id) {
     public List<PrescriptionOrder> loadMedicalOrderInfo(Integer id) {
         AfterwardsAudit audit = this.getById(id);
         AfterwardsAudit audit = this.getById(id);