|
@@ -1,5 +1,7 @@
|
|
|
package thyyxxk.webserver.service.casefrontsheet;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -12,6 +14,7 @@ import thyyxxk.webserver.dao.his.casefrontsheet.SheetCreatedDao;
|
|
|
import thyyxxk.webserver.entity.ResultVo;
|
|
|
import thyyxxk.webserver.entity.casefrontsheet.*;
|
|
|
import thyyxxk.webserver.entity.dictionary.PureCodeName;
|
|
|
+import thyyxxk.webserver.service.externalhttp.PowersiSrvc;
|
|
|
import thyyxxk.webserver.utils.*;
|
|
|
|
|
|
import java.lang.reflect.Field;
|
|
@@ -30,12 +33,14 @@ public class CaseFrontSheetService {
|
|
|
private final SheetCreatedDao createdDao;
|
|
|
private final BasSelectOverviewDao basDao;
|
|
|
private final LoginDao userDao;
|
|
|
+ private final PowersiSrvc srvc;
|
|
|
|
|
|
- public CaseFrontSheetService(SheetCreatedDao createdDao, CaseFrontSheetDao dao, BasSelectOverviewDao basDao, LoginDao userDao) {
|
|
|
+ public CaseFrontSheetService(SheetCreatedDao createdDao, CaseFrontSheetDao dao, BasSelectOverviewDao basDao, LoginDao userDao, PowersiSrvc srvc) {
|
|
|
this.dao = dao;
|
|
|
this.createdDao = createdDao;
|
|
|
this.basDao = basDao;
|
|
|
this.userDao = userDao;
|
|
|
+ this.srvc = srvc;
|
|
|
if (allDictionary == null) {
|
|
|
allDictionary = new ConcurrentHashMap<>();
|
|
|
}
|
|
@@ -524,6 +529,54 @@ public class CaseFrontSheetService {
|
|
|
return ResultVoUtil.success(new ArrayList<>());
|
|
|
}
|
|
|
|
|
|
+ public ResultVo<JSONObject> qualityControl(CaseFrontsheetMain sheet) {
|
|
|
+ JSONObject obj = new JSONObject();
|
|
|
+ obj.put("functionId", "100138");
|
|
|
+ JSONObject baseinfo = new JSONObject();
|
|
|
+ baseinfo.put("name", sheet.getName());
|
|
|
+ baseinfo.put("age", sheet.getAge());
|
|
|
+ baseinfo.put("sex_id", sheet.getSex());
|
|
|
+ String agedays = sheet.getAgeDays();
|
|
|
+ if (null != agedays && agedays.equals("-")) {
|
|
|
+ agedays = "";
|
|
|
+ }
|
|
|
+ baseinfo.put("nwb_age", agedays);
|
|
|
+ baseinfo.put("out_hosp_id", FilterUtil.filterDismissWay(sheet.getZyDismissWay()));
|
|
|
+ baseinfo.put("is_autopsy_id", sheet.getAutopsy());
|
|
|
+ JSONObject inputParam = new JSONObject();
|
|
|
+ inputParam.put("baseInfo", baseinfo);
|
|
|
+ JSONArray hsptzdDagnsInfo = new JSONArray();
|
|
|
+ for (CaseFrontsheetDisdiag diag : sheet.getDisdiagList()) {
|
|
|
+ if (null == diag.getNo()) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ JSONObject itm = new JSONObject();
|
|
|
+ itm.put("icd_code", diag.getCode());
|
|
|
+ itm.put("dagns_type", diag.getNo() == 1 ? 1 : 2);
|
|
|
+ itm.put("disease_name", diag.getName());
|
|
|
+ itm.put("order", diag.getNo());
|
|
|
+ hsptzdDagnsInfo.add(itm);
|
|
|
+ }
|
|
|
+ inputParam.put("hsptzdDagnsInfo", hsptzdDagnsInfo);
|
|
|
+ JSONArray hsptzdOprtInfo = new JSONArray();
|
|
|
+ for (CaseFrontsheetSurgery surgery : sheet.getSurgeryList()) {
|
|
|
+ if (null == surgery.getNo()) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ JSONObject itm = new JSONObject();
|
|
|
+ itm.put("oprt_code", surgery.getCode());
|
|
|
+ itm.put("oprt_name", surgery.getName());
|
|
|
+ itm.put("oprt_type", surgery.getNo() == 1 ? 1 : 2);
|
|
|
+ itm.put("order", surgery.getNo());
|
|
|
+ hsptzdOprtInfo.add(itm);
|
|
|
+ }
|
|
|
+ inputParam.put("hsptzdOprtInfo", hsptzdOprtInfo);
|
|
|
+ obj.put("inputParam", inputParam);
|
|
|
+ JSONObject result = srvc.setlQualityControl(obj);
|
|
|
+ log.info("病案质控接口:\n参数:{}\n结果:{}", obj, result);
|
|
|
+ return ResultVoUtil.success(result);
|
|
|
+ }
|
|
|
+
|
|
|
public ResultVo<PureCodeName> fetchSsfz(String code) {
|
|
|
PureCodeName ret = new PureCodeName();
|
|
|
Connection conn = null;
|