|
@@ -268,14 +268,25 @@ public class EmrServer {
|
|
|
if (ListUtil.isBlank(idList)) {
|
|
|
return returnArray;
|
|
|
}
|
|
|
+ Map<String, JSONObject> surgicalSequencing = new TreeMap<>();
|
|
|
+
|
|
|
for (String s : idList) {
|
|
|
JSONObject jsonObject = emr.getEditorJsonDataByDocumentId(s);
|
|
|
if (etType.getCode() == EmrType.DIAGNOSIS.getCode()) {
|
|
|
returnArray.addAll(extractDiagnosis(jsonObject));
|
|
|
} else if (etType.getCode() == EmrType.OPERATION.getCode()) {
|
|
|
- returnArray.add(jsonObject);
|
|
|
+ String key = DateUtil.formatDatetime(jsonObject.getJSONObject("手术日期").getDate("value"));
|
|
|
+ surgicalSequencing.put(key, jsonObject);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (!surgicalSequencing.isEmpty()) {
|
|
|
+ for (Map.Entry<String, JSONObject> item : surgicalSequencing.entrySet()) {
|
|
|
+ returnArray.add(item.getValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
return returnArray;
|
|
|
}
|
|
|
|