Commit 29525a0fb2bc89a8b56dfc07eb8db71716773c22

Authored by litao@lymsh.com
1 parent 5a9180cb8c

改以前的bug

Showing 3 changed files with 46 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java View file @ 29525a0
... ... @@ -217,6 +217,20 @@
217 217 LoginContext loginState = (LoginContext) request1.getAttribute("loginContext");
218 218 return patientFacade.findPatient(request, loginState.getId());
219 219 }
  220 +
  221 +
  222 + /**
  223 + * 获取产妇基本信息
  224 + * 上面的有bug
  225 + */
  226 + @RequestMapping(value = "/findp2", method = RequestMethod.GET)
  227 + @ResponseBody
  228 + @TokenRequired
  229 + public BaseResponse getPatent2(@Valid PatientQueryRequest request,HttpServletRequest request1){
  230 + LoginContext loginState = (LoginContext) request1.getAttribute("loginContext");
  231 + return patientFacade.findPatient2(request, loginState.getId());
  232 + }
  233 +
220 234 /**
221 235 * 发送孕妇指导短信
222 236 *
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ 29525a0
... ... @@ -962,5 +962,27 @@
962 962 patientManagerResult.setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION);
963 963 return patientManagerResult;
964 964 }
  965 +
  966 + public BaseResponse findPatient2(PatientQueryRequest patientQueryRequest, Integer userId) {
  967 + PatientsQuery patientsQuery = new PatientsQuery();
  968 + patientsQuery.setPid(patientQueryRequest.getPid());
  969 + patientsQuery.setId(patientQueryRequest.getId());
  970 + patientsQuery.setPhone(patientQueryRequest.getPhone());
  971 + patientsQuery.setCardNo(patientQueryRequest.getCardNo());
  972 + patientsQuery.setVcCardNo(patientQueryRequest.getVcCardNo());
  973 +
  974 + Patients patients = antenatalExaminationFacade.findOnePatient(patientQueryRequest.getCardNo(), patientQueryRequest.getVcCardNo(), patientQueryRequest.getId(), groupsFacade.findGroupHospital(userId, false), -1, false, patientQueryRequest.getPid(), false);
  975 + PatientBaseResult patientBaseResult = new PatientBaseResult();
  976 + if (null != patients) {
  977 + patientBaseResult.convert(patients);
  978 + }
  979 + try {
  980 + HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getPid(), false);
  981 + patientBaseResult.setRiskFactor(highScoreResult.getHighRisk());
  982 + patientBaseResult.setRiskScore(highScoreResult.getScoreStr());
  983 + } catch (Exception e) {
  984 + }
  985 + return new BaseObjectResponse().setData(patientBaseResult).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS);
  986 + }
965 987 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientQueryRequest.java View file @ 29525a0
... ... @@ -8,6 +8,16 @@
8 8 private String phone;
9 9 private String cardNo;
10 10 private String pid;
  11 + private String vcCardNo;
  12 +
  13 + public String getVcCardNo() {
  14 + return vcCardNo;
  15 + }
  16 +
  17 + public void setVcCardNo(String vcCardNo) {
  18 + this.vcCardNo = vcCardNo;
  19 + }
  20 +
11 21 public String getCardNo() {
12 22 return cardNo;
13 23 }