|
@@ -309,29 +309,26 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
|
sentEntryRecordDTO.setModeName(qcMode.getName());
|
|
|
}
|
|
|
}
|
|
|
- //获取患者的科室id和病人的主治医师
|
|
|
+ //获取患者的科室id
|
|
|
BehospitalInfo behospitalInfo = behospitalInfoFacade.getOne(new QueryWrapper<BehospitalInfo>()
|
|
|
.eq("behospital_code", sentEntryRecordDTO.getBehospitalCode())
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()));
|
|
|
if (null != behospitalInfo) {
|
|
|
sentEntryRecordDTO.setDeptId(behospitalInfo.getBehDeptId());
|
|
|
- if (StringUtil.isNotEmpty(behospitalInfo.getDoctorName()) && !behospitalInfo.getDoctorName().equals("-")) {
|
|
|
- sentEntryRecordDTO.setDoctorName(behospitalInfo.getDoctorName());
|
|
|
- } else {
|
|
|
- HomePage homePage = aHomePageFacade.getOne(new QueryWrapper<HomePage>()
|
|
|
- .eq("behospital_code", sentEntryRecordDTO.getBehospitalCode())
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey()));
|
|
|
- sentEntryRecordDTO.setDoctorName(homePage.getAttendingDoctor());
|
|
|
- }
|
|
|
}
|
|
|
//根据his新增相应的数据
|
|
|
try {
|
|
|
+ //根据behospitalCode截取patientId和visitId
|
|
|
+ String patientId=sentEntryRecordDTO.getBehospitalCode().split("_")[0];
|
|
|
+ String visitId=sentEntryRecordDTO.getBehospitalCode().split("_")[1];
|
|
|
+ //获取on_line表中的医生姓名
|
|
|
+ String sql ="select * from doctor_hos where user_id = (select request_doctor_id from mr_on_line where patient ='" +
|
|
|
+ patientId+"' and visit_id= '"+visitId+"' and status='0') and dept_code= '"+sentEntryRecordDTO.getDeptId()+"'" ;
|
|
|
+ List<String> doctorNames=tzDBConnForHis.getdoctorName(sql);
|
|
|
+ if (doctorNames!=null && doctorNames.size() > 0){
|
|
|
+ sentEntryRecordDTO.setDoctorName(doctorNames.get(0));
|
|
|
+ }
|
|
|
Integer i = tzDBConnForHis.setQcMessAge(sentEntryRecordDTO);
|
|
|
-// if (i == 0) {
|
|
|
-// aMedAbnormalInfoFacade.saveAbnormalInfo("发送质控人员新增人工缺陷到his系统失败", "", "", JSON.toJSONString(sentEntryRecordDTO), "");
|
|
|
-// }
|
|
|
- //插入方法
|
|
|
-// qcClientFacade.sentEntryRecord(sentEntryRecordDTO);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
aMedAbnormalInfoFacade.saveAbnormalInfo("发送质控人员新增人工缺陷到his系统失败", "", "", JSON.toJSONString(sentEntryRecordDTO), e.getMessage());
|