|
|
@@ -1,6 +1,7 @@
|
|
|
package org.jeecg.modules.medical.controller;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.core.map.MapUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
@@ -14,12 +15,15 @@ import org.apache.commons.lang.StringUtils;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
+import org.jeecg.common.constant.CommonConstant;
|
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
import org.jeecg.config.sign.util.HttpUtils;
|
|
|
import org.jeecg.modules.medical.Constant;
|
|
|
import org.jeecg.modules.medical.entity.AdvanceWarningVO;
|
|
|
+import org.jeecg.modules.medical.entity.AdviceDetailsVO;
|
|
|
import org.jeecg.modules.medical.entity.Audit;
|
|
|
+import org.jeecg.modules.medical.entity.DiagnosesVO;
|
|
|
import org.jeecg.modules.medical.entity.HospMidIncidentWarningVO;
|
|
|
import org.jeecg.modules.medical.entity.MidIncidentWarningVO;
|
|
|
import org.jeecg.modules.medical.entity.MidResult;
|
|
|
@@ -126,6 +130,55 @@ public class HisController extends JeecgController<Audit, IAuditService> {
|
|
|
@PostMapping(value = "/outpatientMidIncidentWarning")
|
|
|
public Result outpatientMidIncidentWarning(@RequestBody @Valid MidIncidentWarningVO midIncidentWarningVO,HttpServletRequest httpServletRequest) {
|
|
|
log.info("事中门诊预警请求报文:{}", JSON.toJSONString(midIncidentWarningVO));
|
|
|
+ if(CollectionUtil.isNotEmpty(midIncidentWarningVO.getDiagnoses())){
|
|
|
+ for(DiagnosesVO diagnosesVO : midIncidentWarningVO.getDiagnoses()){
|
|
|
+ if(StringUtils.isBlank(diagnosesVO.getDiagnose_code())){
|
|
|
+ return Result.error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, "diagnoses.diagnose_code诊断编码不能为空");
|
|
|
+ }
|
|
|
+ if(StringUtils.isBlank(diagnosesVO.getDiagnose_desc())){
|
|
|
+ return Result.error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, "diagnoses.diagnose_desc诊断名称不能为空");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for(AdviceDetailsVO adviceDetailsVO : midIncidentWarningVO.getAdvice_details()){
|
|
|
+ if(StringUtils.isBlank(adviceDetailsVO.getProject_code())){
|
|
|
+ return Result.error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, "advice_details.project_code 医嘱项目明细医院项目编码不能为空");
|
|
|
+ }
|
|
|
+ if(StringUtils.isBlank(adviceDetailsVO.getProject_name())){
|
|
|
+ return Result.error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, "advice_details.project_name 医嘱项目明细医院项目名称不能为空");
|
|
|
+ }
|
|
|
+ if(StringUtils.isBlank(adviceDetailsVO.getMedical_project_code())){
|
|
|
+ return Result.error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, "advice_details.medical_project_code 医嘱项目明细医保项目编码不能为空");
|
|
|
+ }
|
|
|
+ if(StringUtils.isBlank(adviceDetailsVO.getMedical_project_name())){
|
|
|
+ return Result.error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, "advice_details.medical_project_name 医嘱项目明细医保项目名称不能为空");
|
|
|
+ }
|
|
|
+ if(null == adviceDetailsVO.getPrice() || adviceDetailsVO.getPrice()<0){
|
|
|
+ return Result.error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, "advice_details.price 医嘱项目明细单价不能为空或者小于0");
|
|
|
+ }
|
|
|
+ if(null == adviceDetailsVO.getAmount() || adviceDetailsVO.getAmount()<0){
|
|
|
+ return Result.error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, "advice_details.amount 医嘱项目明细金额不能为空或者小于0");
|
|
|
+ }
|
|
|
+ if(null == adviceDetailsVO.getQuantity() || adviceDetailsVO.getQuantity()<0){
|
|
|
+ adviceDetailsVO.setQuantity(1);
|
|
|
+ }
|
|
|
+ if(StringUtils.isBlank(adviceDetailsVO.getRecipe_no())){
|
|
|
+ return Result.error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, "advice_details.recipe_no 医嘱项目明细处方号不能为空");
|
|
|
+ }
|
|
|
+ if(StringUtils.isBlank(adviceDetailsVO.getExpense_category())){
|
|
|
+ return Result.error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, "advice_details.expense_category 医嘱项目明细费用类别不能为空");
|
|
|
+ }
|
|
|
+ if(StringUtils.isBlank(adviceDetailsVO.getChange_class())){
|
|
|
+ return Result.error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, "advice_details.change_class 医嘱项目明细收费项目等级不能为空");
|
|
|
+ }
|
|
|
+ if(StringUtils.isBlank(adviceDetailsVO.getProject_use_time())){
|
|
|
+ return Result.error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, "advice_details.project_use_time 医嘱项目明细项目使用时间不能为空");
|
|
|
+ }
|
|
|
+ if(StringUtils.isBlank(adviceDetailsVO.getMedical_insurance_mark())){
|
|
|
+ return Result.error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, "advice_details.medical_insurance_mark 医嘱项目明细是否医保不能为空");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
String ipStr = HttpUtils.getIPAddress(httpServletRequest);
|
|
|
log.info("事中远端请求的服务ip地址:{}", ipStr);
|
|
|
midIncidentWarningVO.setVisit_type("2");
|