|
@@ -69,14 +69,17 @@ public class RationalUseServer {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ Map<String, List<String>> map = new HashMap<>();
|
|
|
+ if (ListUtil.isBlank(yaoPinBianMa)) {
|
|
|
+ return map;
|
|
|
+ }
|
|
|
qw.in("rtrim(code) + rtrim(serial)", yaoPinBianMa);
|
|
|
Map<String, YaoPin> yaoPinMap = dao.yaoPingXinXi(qw).stream().collect(
|
|
|
Collectors.toMap(YaoPin::getId, a -> a, (k1, k2) -> k1)
|
|
|
);
|
|
|
String detailsXml = yaoPinXinXi(param.getInpatientNo(), param.getAdmissTimes(), param.getCfType(), yp, doct, yaoPinMap);
|
|
|
String js = String.format("{\"BaseXml\": \"%s\", \"DetailsXml\" : \"%s\"}", baseXml, detailsXml);
|
|
|
- log.info("上传数据:{} ", js);
|
|
|
- Map<String, List<String>> map = new HashMap<>();
|
|
|
+
|
|
|
try {
|
|
|
JSONObject json = http.rationalUse(js);
|
|
|
log.info("返回的数据:{}", json);
|
|
@@ -208,13 +211,15 @@ public class RationalUseServer {
|
|
|
JSONObject medicalRecordDiagnosticData = JSONObject.parseObject(dao.medicalRecordDiagnosticData(patNo, times));
|
|
|
if (medicalRecordDiagnosticData != null) {
|
|
|
JSONArray arr = medicalRecordDiagnosticData.getJSONArray("入院诊断");
|
|
|
- for (int i = 0; i < arr.size(); i++) {
|
|
|
- JSONObject item = arr.getJSONObject(i);
|
|
|
- XunHuanJieDian temp = new XunHuanJieDian();
|
|
|
- temp.setType("0");
|
|
|
- temp.setCode(item.getString("code"));
|
|
|
- temp.setName(item.getString("name"));
|
|
|
- zhenDuanShuJu.add(temp);
|
|
|
+ if (arr != null && arr.size() > 0) {
|
|
|
+ for (int i = 0; i < arr.size(); i++) {
|
|
|
+ JSONObject item = arr.getJSONObject(i);
|
|
|
+ XunHuanJieDian temp = new XunHuanJieDian();
|
|
|
+ temp.setType("0");
|
|
|
+ temp.setCode(item.getString("code"));
|
|
|
+ temp.setName(item.getString("name"));
|
|
|
+ zhenDuanShuJu.add(temp);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|