|
|
@@ -2,6 +2,7 @@ package thyyxxk.webserver.service.view;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import lombok.Data;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
|
import thyyxxk.webserver.dao.his.medicalinsurance.SiMzDao;
|
|
|
@@ -20,18 +21,19 @@ import thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru.YiZhuFeiYongChaXunTiaoJ
|
|
|
import thyyxxk.webserver.service.zhuyuanyisheng.YiZhuLuRuServer;
|
|
|
import thyyxxk.webserver.service.zhuyuanyisheng.emr.EmrServer;
|
|
|
import thyyxxk.webserver.utils.DateUtil;
|
|
|
+import thyyxxk.webserver.utils.ListUtil;
|
|
|
import thyyxxk.webserver.utils.ResultVoUtil;
|
|
|
import thyyxxk.webserver.utils.StringUtil;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Comparator;
|
|
|
-import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
@Service
|
|
|
+@Slf4j
|
|
|
public class Patient360Server {
|
|
|
private final Patient360Dao dao;
|
|
|
|
|
|
@@ -60,13 +62,14 @@ public class Patient360Server {
|
|
|
}
|
|
|
|
|
|
List<MedicalTrack> list = new ArrayList<>();
|
|
|
-
|
|
|
// 住院时间
|
|
|
list.addAll(dao.getHospMedicalTrack(patientInfo360.getInpatientNo()));
|
|
|
// 门诊时间
|
|
|
list.addAll(dao.getMzMedicalTrack(patientInfo360.getMzNo()));
|
|
|
- // list 根据 date 字段字符串排序
|
|
|
- list = list.stream().sorted(Comparator.comparing(MedicalTrack::getDate)).collect(Collectors.toList());
|
|
|
+ if (ListUtil.notBlank(list)) {
|
|
|
+ // list 根据 date 字段字符串排序
|
|
|
+ list = list.stream().sorted(Comparator.comparing(MedicalTrack::getDate)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
patientInfo360.getMedicalTrackList().addAll(list);
|
|
|
return ResultVoUtil.success(patientInfo360);
|
|
|
}
|