|
|
@@ -2,16 +2,14 @@ package org.jeecg.modules.medical.controller;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.stream.Collectors;
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.UnsupportedEncodingException;
|
|
|
-import java.net.URLDecoder;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
-import org.jeecg.common.util.oConvertUtils;
|
|
|
+import org.jeecg.modules.medical.common.bo.before.MedicalHistoryRecord;
|
|
|
+import org.jeecg.modules.medical.common.bo.before.PatientDiagnosisInfo;
|
|
|
+import org.jeecg.modules.medical.common.bo.before.PatientInformationResponse;
|
|
|
+import org.jeecg.modules.medical.common.bo.before.PrescriptionDetail;
|
|
|
import org.jeecg.modules.medical.entity.AdvanceWarningAudit;
|
|
|
import org.jeecg.modules.medical.service.IAdvanceWarningAuditService;
|
|
|
|
|
|
@@ -20,37 +18,80 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
-import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
|
-import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
|
-import org.jeecgframework.poi.excel.entity.ImportParams;
|
|
|
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
-import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
|
|
- /**
|
|
|
+/**
|
|
|
* @Description: advance_warning_audit
|
|
|
* @Author: jeecg-boot
|
|
|
* @Date: 2023-05-09 14:37:15
|
|
|
* @Version: V1.0
|
|
|
*/
|
|
|
-@Api(tags="advance_warning_audit")
|
|
|
+@Api(tags="事前模块api")
|
|
|
@RestController
|
|
|
@RequestMapping("/medical/advanceWarningAudit")
|
|
|
@Slf4j
|
|
|
public class AdvanceWarningAuditController extends JeecgController<AdvanceWarningAudit, IAdvanceWarningAuditService> {
|
|
|
@Autowired
|
|
|
private IAdvanceWarningAuditService advanceWarningAuditService;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "事前工单-根据事前工单查询患者信息", notes = "根据事前工单查询患者信息")
|
|
|
+ @GetMapping(value = "/patient/info")
|
|
|
+ public Result<PatientInformationResponse> loadPatientInfoById(@RequestParam(name = "id", required = true) String id) {
|
|
|
+ PatientInformationResponse patientInfoResponse = advanceWarningAuditService
|
|
|
+ .loadPatientInfoById(id);
|
|
|
+ return Result.OK(patientInfoResponse);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "事前工单-查询就诊历史记录", notes = "根据事前工单查询患者的就诊历史记录")
|
|
|
+ @GetMapping(value = "/patient/medicalHistory")
|
|
|
+ public Result<IPage<MedicalHistoryRecord>> queryMedicalHistoryRecords(
|
|
|
+ @RequestParam(name = "id", required = true) String id,
|
|
|
+ @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
+ @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
|
+ if (pageSize > 100) {
|
|
|
+ pageSize = 100;
|
|
|
+ }
|
|
|
+ Page<MedicalHistoryRecord> page = new Page<>(pageNum, pageSize);
|
|
|
+ IPage<MedicalHistoryRecord> medicalHistoryRecords = advanceWarningAuditService
|
|
|
+ .queryMedicalHistoryRecords(page, id);
|
|
|
+ return Result.OK("查询成功", medicalHistoryRecords);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "事前工单-查询诊断信息", notes = "根据就诊历史记录,查询诊断信息")
|
|
|
+ @GetMapping(value = "/patient/diagnosis/info")
|
|
|
+ public Result<List<PatientDiagnosisInfo>> loadPatientDiagnosisInfo(@RequestParam(name = "id", required = true) String id,
|
|
|
+ @RequestParam(name = "treatmentType", required = true) String treatmentType) {
|
|
|
+ List<PatientDiagnosisInfo> result = advanceWarningAuditService.loadPatientDiagnosisInfo(id, treatmentType);
|
|
|
+ return Result.OK(result);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "事前工单-根据病例查询开药信息", notes = "根据病例查询开药信息")
|
|
|
+ @GetMapping(value = "/case/prescriptions")
|
|
|
+ public Result<IPage<PrescriptionDetail>> getPrescriptionsByCase(
|
|
|
+ @RequestParam(name = "id", required = true) Integer id,
|
|
|
+ @RequestParam(name = "treatmentType", required = true) String treatmentType,
|
|
|
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
|
|
+
|
|
|
+ if (pageSize >= 100) {
|
|
|
+ pageSize = 100;
|
|
|
+ }
|
|
|
+ Page<MedicalHistoryRecord> page = new Page<>(pageNo, pageSize);
|
|
|
+ IPage<PrescriptionDetail> prescriptions = advanceWarningAuditService.loadPrescriptionsByCase(page, id, treatmentType);
|
|
|
+ return Result.OK(prescriptions);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
*
|
|
|
@@ -72,7 +113,7 @@ public class AdvanceWarningAuditController extends JeecgController<AdvanceWarnin
|
|
|
IPage<AdvanceWarningAudit> pageList = advanceWarningAuditService.page(page, queryWrapper);
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 添加
|
|
|
*
|
|
|
@@ -87,7 +128,7 @@ public class AdvanceWarningAuditController extends JeecgController<AdvanceWarnin
|
|
|
advanceWarningAuditService.save(advanceWarningAudit);
|
|
|
return Result.OK("添加成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 编辑
|
|
|
*
|
|
|
@@ -102,7 +143,7 @@ public class AdvanceWarningAuditController extends JeecgController<AdvanceWarnin
|
|
|
advanceWarningAuditService.updateById(advanceWarningAudit);
|
|
|
return Result.OK("编辑成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id删除
|
|
|
*
|
|
|
@@ -117,7 +158,7 @@ public class AdvanceWarningAuditController extends JeecgController<AdvanceWarnin
|
|
|
advanceWarningAuditService.removeById(id);
|
|
|
return Result.OK("删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 批量删除
|
|
|
*
|
|
|
@@ -132,7 +173,7 @@ public class AdvanceWarningAuditController extends JeecgController<AdvanceWarnin
|
|
|
this.advanceWarningAuditService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
return Result.OK("批量删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id查询
|
|
|
*
|