|
@@ -17,6 +17,7 @@ import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.GetInquiryDetailVO;
|
|
|
+import com.diagbot.vo.GetLastOtherVO;
|
|
|
import com.diagbot.vo.HisInquirysVO;
|
|
|
import com.diagbot.vo.ReadInquiryVO;
|
|
|
import com.diagbot.vo.SaveInquiryDetailVO;
|
|
@@ -126,9 +127,31 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
|
|
|
*/
|
|
|
public ReadInquiryDTO readInquiry(ReadInquiryVO readInquiryVO) {
|
|
|
ReadInquiryDTO readInquiryDTO = new ReadInquiryDTO();
|
|
|
+ QueryWrapper<InquiryInfo> queryWrapper = new QueryWrapper<InquiryInfo>();
|
|
|
+ queryWrapper.eq("is_deleted", "N");
|
|
|
+ queryWrapper.eq("hospital_id", readInquiryVO.getHospitalId());
|
|
|
+ queryWrapper.eq("hospital_dept_id", readInquiryVO.getHospitalDeptId());
|
|
|
+ queryWrapper.eq("doctor_id", readInquiryVO.getDoctorId());
|
|
|
+ queryWrapper.eq("patient_id", readInquiryVO.getPatientId());
|
|
|
+ queryWrapper.eq("inquiry_code", readInquiryVO.getInquiryCode());
|
|
|
+ InquiryInfo inquiryInfo = this.getOne(queryWrapper);
|
|
|
|
|
|
- HospitalInfo hospitalInfo = hospitalInfoFacade.getHospitalByCode(readInquiryVO.getHospitalCode());
|
|
|
- PatientInfo patientInfo = patientInfoFacade.getPatientByCode(readInquiryVO.getHospitalCode(), readInquiryVO.getPatientCode());
|
|
|
+ if (inquiryInfo != null) {
|
|
|
+ readInquiryDTO.setDataJson(inquiryInfo.getDataJson());
|
|
|
+ }
|
|
|
+
|
|
|
+ return readInquiryDTO;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取最近一次其他史信息
|
|
|
+ *
|
|
|
+ * @param readInquiryVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String getLastOther(GetLastOtherVO getLastOtherVO) {
|
|
|
+ HospitalInfo hospitalInfo = hospitalInfoFacade.getHospitalByCode(getLastOtherVO.getHospitalCode());
|
|
|
+ PatientInfo patientInfo = patientInfoFacade.getPatientByCode(getLastOtherVO.getHospitalCode(), getLastOtherVO.getPatientCode());
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("hospitalId", hospitalInfo.getId());
|
|
@@ -136,10 +159,10 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
|
|
|
InquiryInfo inquiryInfo = baseMapper.getPatientLast(map);
|
|
|
|
|
|
if (inquiryInfo != null) {
|
|
|
- readInquiryDTO.setDataJson(inquiryInfo.getDataJson());
|
|
|
+ return inquiryInfo.getDataJson();
|
|
|
+ }else{
|
|
|
+ return null;
|
|
|
}
|
|
|
-
|
|
|
- return readInquiryDTO;
|
|
|
}
|
|
|
|
|
|
/**
|