|
|
@@ -1,5 +1,6 @@
|
|
|
package thyyxxk.webserver.service.inpatient;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -44,7 +45,7 @@ public class DismissService {
|
|
|
this.injuryFeeUpld = injuryFeeUpld;
|
|
|
}
|
|
|
|
|
|
- public ResultVo<JSONObject> powersiPreDischarge(String visitId) {
|
|
|
+ public ResultVo<JSONArray> powersiPreDischarge(String visitId) {
|
|
|
String url = "http://172.16.32.126:8080/drg_web/api/json/call.action";
|
|
|
JSONObject params = new JSONObject();
|
|
|
params.put("function_id", "apiHnsService1001");
|
|
|
@@ -53,7 +54,18 @@ public class DismissService {
|
|
|
params.put("visit_id", visitId);
|
|
|
JSONObject response = new RestTemplate().postForObject(url, params, JSONObject.class);
|
|
|
log.info("创智出院预审:【{}】,【{}】", visitId, response);
|
|
|
- return ResultVoUtil.success(response);
|
|
|
+ if (null == response) {
|
|
|
+ return ResultVoUtil.success();
|
|
|
+ }
|
|
|
+ Integer retcode = response.getInteger("return_code");
|
|
|
+ if (null != retcode && retcode == 1) {
|
|
|
+ JSONArray retdata = response.getJSONArray("return_data");
|
|
|
+ if (null == retdata || retdata.size() == 0) {
|
|
|
+ return ResultVoUtil.success();
|
|
|
+ }
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.PRE_DISCHARGE_ERROR, retdata);
|
|
|
+ }
|
|
|
+ return ResultVoUtil.success();
|
|
|
}
|
|
|
|
|
|
public ResultVo<Object> dismiss(Patient param) {
|