|
|
@@ -14,6 +14,7 @@ import thyyxxk.webserver.entity.datamodify.YzTemperature;
|
|
|
import thyyxxk.webserver.entity.dictionary.wxservice.ZdHealthEducation;
|
|
|
import thyyxxk.webserver.entity.inpatient.nursemodule.mobilenursing.*;
|
|
|
import thyyxxk.webserver.entity.inpatient.patient.Patient;
|
|
|
+import thyyxxk.webserver.entity.medicaladvice.medicamanage.patientinfo.ZyBedMi;
|
|
|
import thyyxxk.webserver.entity.zhuyuanyisheng.jianyanjiancha.YshYjReq;
|
|
|
import thyyxxk.webserver.service.hutoolcache.DeptCache;
|
|
|
import thyyxxk.webserver.utils.DateUtil;
|
|
|
@@ -207,21 +208,32 @@ public class MobileNursingService {
|
|
|
}
|
|
|
|
|
|
public WardRoomNo getWardAndBeds(String roomNo) {
|
|
|
- // todo 此处要替换为查询实际关联情况
|
|
|
+ List<ZyBedMi> zyBedMiList = dao.getBedNosByRoomNo(roomNo);
|
|
|
+ if (zyBedMiList == null || zyBedMiList.isEmpty()) {
|
|
|
+ throw new BizException(ExceptionEnum.NO_DATA_EXIST,
|
|
|
+ "未查询到当前房间号【" + roomNo + "】所关联的病房信息!");
|
|
|
+ }
|
|
|
WardRoomNo wardRoomNo = new WardRoomNo();
|
|
|
wardRoomNo.setRoomNo(roomNo);
|
|
|
- wardRoomNo.setWardCode("8000002");
|
|
|
- wardRoomNo.setWardName("二病室");
|
|
|
- List<String> bedNos = new ArrayList<>();
|
|
|
- bedNos.add("01");
|
|
|
- bedNos.add("02");
|
|
|
- wardRoomNo.setBedNos(bedNos);
|
|
|
+ wardRoomNo.setWardCode(zyBedMiList.get(0).getWardCode());
|
|
|
+ wardRoomNo.setWardName(deptCache.getDeptName(wardRoomNo.getWardCode()));
|
|
|
+ List<Patient> roomPatients = new ArrayList<>();
|
|
|
+ for (ZyBedMi zyBedMi : zyBedMiList) {
|
|
|
+ Patient patient = new Patient();
|
|
|
+ patient.setBedNo(zyBedMi.getBedNo());
|
|
|
+ patient.setInpatientNo(zyBedMi.getInpatientNo());
|
|
|
+ patient.setAdmissTimes(zyBedMi.getAdmissTimes());
|
|
|
+ patient.setName(zyBedMi.getName());
|
|
|
+ roomPatients.add(patient);
|
|
|
+ }
|
|
|
+ wardRoomNo.setRoomPatients(roomPatients);
|
|
|
return wardRoomNo;
|
|
|
}
|
|
|
|
|
|
public String saveWardRounds(List<WardRounds> list) {
|
|
|
Date now = new Date();
|
|
|
- list.removeIf(item -> StringUtil.isBlank(item.getRoundContent()));
|
|
|
+ list.removeIf(item -> StringUtil.isBlank(item.getPatNo())
|
|
|
+ || StringUtil.isBlank(item.getRoundContent()));
|
|
|
for (WardRounds wardRounds : list) {
|
|
|
wardRounds.setId(SnowFlakeId.instance().nextId());
|
|
|
wardRounds.setCreateTime(now);
|