提交 8980883d authored 作者: luzhangjian's avatar luzhangjian

feat:医生患者信息

上级 4c88c682
package com.ebaiyihui.family.doctor.common.vo;
import lombok.Data;
import java.util.Date;
@Data
public class BaseInfoByAdmIdVO {
/**
* 问诊id
*/
private String admId;
/**
* 患者id
*/
private String patientId;
/**
* 患者userId
*/
private String patientUserId;
/**
* 患者名称
*/
private String patientName;
/**
* 患者no
*/
private String patientNo;
/**
* 患者性别
*/
private String patientGender;
/**
* 患者手机号
*/
private String patientPhone;
/**
* 医生id
*/
private String doctorId;
/**
* 医生用户id
*/
private String doctorUserId;
/**
* 医生名字
*/
private String doctorName;
/**
* 科室id
*/
private String deptId;
/**
* 科室名称
*/
private String deptName;
}
package com.ebaiyihui.family.doctor.common.vo;
import lombok.Data;
import java.util.Date;
@Data
public class PatientMedicalRecordVO {
/**
* 主键
*/
private String id;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 问诊id
*/
private String admId;
/**
* 患者id
*/
private String patientId;
/**
* 主述
*/
private String mainSuit;
/**
* 诊断
*/
private String diagnosis;
/**
* 现病史
*/
private String currentHistory;
/**
* 既往史
*/
private String pastHistory;
/**
* 过敏史
*/
private String allergyHistory;
/**
* 其他病史
*/
private String othersHistory;
/**
* 其他
*/
private String remark;
/**
* 病例状态 1生效/0失效
*/
private Integer recordStatus;
/**
* 患者医生科室信息
*/
private InfoVo infoVo;
@Data
public static class InfoVo{
private String doctorId;
private String doctorName;
private String deptId;
private String deptName;
private String patientUserId;
private String patientName;
private String patientNo;
private String patientGender;
private String patientPhone;
private String patientCredNo;
};
}
...@@ -83,4 +83,14 @@ public class PatientMedicalRecordController { ...@@ -83,4 +83,14 @@ public class PatientMedicalRecordController {
} }
return patientMedicalRecordService.treatmentCard(param.getAdmId()); return patientMedicalRecordService.treatmentCard(param.getAdmId());
} }
@ApiOperation(value = "获取患者医生信息", notes = "获取患者医生信息-医药云调用")
@RequestMapping(value = "/getBaseInfoByAdmId", method = RequestMethod.POST)
public BaseResponse<Object> getBaseInfoByAdmId(@RequestBody @Validated InvalidMedicalRecordDTO param,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return BaseResponse.error(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
return patientMedicalRecordService.getBaseInfoByAdmId(param.getAdmId());
}
} }
...@@ -6,7 +6,6 @@ import com.ebaiyihui.family.doctor.common.dto.InvalidMedicalRecordDTO; ...@@ -6,7 +6,6 @@ import com.ebaiyihui.family.doctor.common.dto.InvalidMedicalRecordDTO;
import com.ebaiyihui.family.doctor.common.dto.UpdatePatientMedicalRecordDTO; import com.ebaiyihui.family.doctor.common.dto.UpdatePatientMedicalRecordDTO;
import com.ebaiyihui.family.doctor.common.vo.InsertPatientMedicalRecordVO; import com.ebaiyihui.family.doctor.common.vo.InsertPatientMedicalRecordVO;
import com.ebaiyihui.family.doctor.common.vo.PatientCaseDetail; import com.ebaiyihui.family.doctor.common.vo.PatientCaseDetail;
import com.ebaiyihui.family.doctor.common.vo.PatientMedicalRecordVO;
import com.ebaiyihui.framework.response.BaseResponse; import com.ebaiyihui.framework.response.BaseResponse;
import java.util.Objects; import java.util.Objects;
...@@ -27,4 +26,6 @@ public interface PatientMedicalRecordService { ...@@ -27,4 +26,6 @@ public interface PatientMedicalRecordService {
PatientCaseDetail getMedicalInfoByAdmId(String admId); PatientCaseDetail getMedicalInfoByAdmId(String admId);
BaseResponse<Object> treatmentCard(String admId); BaseResponse<Object> treatmentCard(String admId);
BaseResponse<Object> getBaseInfoByAdmId(String admId);
} }
...@@ -14,10 +14,13 @@ import com.ebaiyihui.family.doctor.common.bo.PersonImInformReq; ...@@ -14,10 +14,13 @@ import com.ebaiyihui.family.doctor.common.bo.PersonImInformReq;
import com.ebaiyihui.family.doctor.common.vo.*; import com.ebaiyihui.family.doctor.common.vo.*;
import com.ebaiyihui.family.doctor.server.common.constants.IMInformConstants; import com.ebaiyihui.family.doctor.server.common.constants.IMInformConstants;
import com.ebaiyihui.family.doctor.server.common.constants.ProjProperties; import com.ebaiyihui.family.doctor.server.common.constants.ProjProperties;
import com.ebaiyihui.family.doctor.server.entity.PatientEntity;
import com.ebaiyihui.family.doctor.server.entity.PatientSignEntity; import com.ebaiyihui.family.doctor.server.entity.PatientSignEntity;
import com.ebaiyihui.family.doctor.server.exception.BusinessException;
import com.ebaiyihui.family.doctor.server.feign.DoctorInfofeignClient; import com.ebaiyihui.family.doctor.server.feign.DoctorInfofeignClient;
import com.ebaiyihui.family.doctor.server.feign.IMPushMsgFeignClient; import com.ebaiyihui.family.doctor.server.feign.IMPushMsgFeignClient;
import com.ebaiyihui.family.doctor.server.feign.UserApiFeignClient; import com.ebaiyihui.family.doctor.server.feign.UserApiFeignClient;
import com.ebaiyihui.family.doctor.server.mapper.PatientMapper;
import com.ebaiyihui.family.doctor.server.mapper.PatientSignMapper; import com.ebaiyihui.family.doctor.server.mapper.PatientSignMapper;
import com.ebaiyihui.family.doctor.server.service.PatientMedicalRecordService; import com.ebaiyihui.family.doctor.server.service.PatientMedicalRecordService;
import com.ebaiyihui.family.doctor.server.util.JsonUtil; import com.ebaiyihui.family.doctor.server.util.JsonUtil;
...@@ -48,6 +51,9 @@ public class PatientMedicalRecordServiceImpl implements PatientMedicalRecordServ ...@@ -48,6 +51,9 @@ public class PatientMedicalRecordServiceImpl implements PatientMedicalRecordServ
@Autowired @Autowired
private PatientSignMapper patientSignMapper; private PatientSignMapper patientSignMapper;
@Autowired
private PatientMapper patientMapper;
@Autowired @Autowired
private DoctorInfofeignClient doctorInfofeignClient; private DoctorInfofeignClient doctorInfofeignClient;
...@@ -109,6 +115,33 @@ public class PatientMedicalRecordServiceImpl implements PatientMedicalRecordServ ...@@ -109,6 +115,33 @@ public class PatientMedicalRecordServiceImpl implements PatientMedicalRecordServ
return BaseResponse.success(); return BaseResponse.success();
} }
@Override
public BaseResponse<Object> getBaseInfoByAdmId(String admId) {
log.info("根据就诊id查询患者医生基础信息入参admId:{}", admId);
if (StringUtils.isEmpty(admId)) {
throw new BusinessException("amdId不能未空");
}
BaseInfoByAdmIdVO baseInfoByAdmIdVO = new BaseInfoByAdmIdVO();
PatientSignEntity patientSignEntity = patientSignMapper.queryByAdmId(admId);
log.info("patientSignMapper.queryByAdmId返回值:{} ", JSON.toJSONString(patientSignEntity));
PatientSignInfo patientSignInfo = getPatientSignInfo(admId);
log.info("getPatientSignInfo返回值:{} ", JSON.toJSONString(patientSignInfo));
BeanUtils.copyProperties(patientSignInfo, baseInfoByAdmIdVO);
if (patientSignEntity != null) {
BeanUtils.copyProperties(patientSignEntity, baseInfoByAdmIdVO);
baseInfoByAdmIdVO.setDoctorId(String.valueOf(patientSignEntity.getDoctorId()));
baseInfoByAdmIdVO.setDeptId(String.valueOf(patientSignEntity.getDeptId()));
PatientEntity patientEntity = patientMapper.selectById(patientSignEntity.getPatientId());
if(patientEntity != null){
BeanUtils.copyProperties(patientEntity, baseInfoByAdmIdVO);
baseInfoByAdmIdVO.setPatientGender(String.valueOf(patientEntity.getGender()));
}
}
log.info("根据就诊id查询患者医生基础信息返回值:{} ", JSON.toJSONString(baseInfoByAdmIdVO));
return BaseResponse.success(baseInfoByAdmIdVO);
}
/** /**
* 获取消息参数-自定义消息推给医生(个人) * 获取消息参数-自定义消息推给医生(个人)
* *
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论