|
@@ -4,9 +4,12 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import lombok.Data;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
|
+import thyyxxk.webserver.dao.his.medicalinsurance.SiMzDao;
|
|
|
import thyyxxk.webserver.dao.his.view.Patient360Dao;
|
|
|
import thyyxxk.webserver.dao.his.zhuyuanyisheng.YiZhuLuRuDao;
|
|
|
import thyyxxk.webserver.entity.ResultVo;
|
|
|
+import thyyxxk.webserver.entity.markmtfees.MzDepositFile;
|
|
|
+import thyyxxk.webserver.entity.outpatient.medicalinfo.MzBlRecord;
|
|
|
import thyyxxk.webserver.entity.view.patient360.MedicalTrack;
|
|
|
import thyyxxk.webserver.entity.view.patient360.PatientInfo360;
|
|
|
import thyyxxk.webserver.entity.view.patient360.ZyFeeDetail;
|
|
@@ -16,12 +19,16 @@ import thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru.XinZhenYzActOrder;
|
|
|
import thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru.YiZhuFeiYongChaXunTiaoJian;
|
|
|
import thyyxxk.webserver.service.zhuyuanyisheng.YiZhuLuRuServer;
|
|
|
import thyyxxk.webserver.service.zhuyuanyisheng.emr.EmrServer;
|
|
|
+import thyyxxk.webserver.utils.DateUtil;
|
|
|
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
|
|
@@ -33,10 +40,16 @@ public class Patient360Server {
|
|
|
|
|
|
private final YiZhuLuRuDao yiZhuLuRuDao;
|
|
|
|
|
|
- public Patient360Server(Patient360Dao dao, EmrServer emrServer, YiZhuLuRuDao yiZhuLuRuDao) {
|
|
|
+ private final SiMzDao siMzDao;
|
|
|
+
|
|
|
+ public Patient360Server(Patient360Dao dao,
|
|
|
+ EmrServer emrServer,
|
|
|
+ YiZhuLuRuDao yiZhuLuRuDao,
|
|
|
+ SiMzDao siMzDao) {
|
|
|
this.dao = dao;
|
|
|
this.emrServer = emrServer;
|
|
|
this.yiZhuLuRuDao = yiZhuLuRuDao;
|
|
|
+ this.siMzDao = siMzDao;
|
|
|
}
|
|
|
|
|
|
public ResultVo<PatientInfo360> getMedicalTrack(String patientId, Integer outOrHosp) {
|
|
@@ -45,8 +58,16 @@ public class Patient360Server {
|
|
|
if (patientInfo360 == null) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "未找到患者信息");
|
|
|
}
|
|
|
- patientInfo360.getMedicalTrackList().addAll(dao.getHospMedicalTrack(patientInfo360.getInpatientNo()));
|
|
|
- // todo 门诊时间
|
|
|
+
|
|
|
+ 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());
|
|
|
+ patientInfo360.getMedicalTrackList().addAll(list);
|
|
|
return ResultVoUtil.success(patientInfo360);
|
|
|
}
|
|
|
|
|
@@ -101,4 +122,14 @@ public class Patient360Server {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public ResultVo<List<MzDepositFile>> getMzReceipts(String mzNo, String date) {
|
|
|
+ return ResultVoUtil.success(siMzDao.selectMzDepositFiles(mzNo, date + " 00:00:00", date + " 23:59:59"));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public ResultVo<MzBlRecord> selectMzBlRecord(String patNo, Integer times) {
|
|
|
+ return ResultVoUtil.success(siMzDao.selectMzBlRecord(patNo, times));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|