Esempio n. 1
0
  /**
   * retrieve the physical examination result derail
   *
   * @see phys_report phys_recommendation phys_doctor_id phys_doctor_name phys_date phys_client_name
   * @param model
   * @return
   */
  @RequestMapping(value = "/phys_result_detail")
  public String retrievePhysResultDetail(
      Model modelmap, HttpSession httpSession, @RequestParam String project_uid) {
    // generate phys report f
    String account = (String) httpSession.getAttribute("accountName");
    Integer flag = (Integer) httpSession.getAttribute("flag");
    AccountClient accountClient = accountClientDao.findClientByAccount(account);
    if (accountClient != null && flag != null && flag == Constant.account_client) {
      List<TestResult> testResultList =
          testResultDao.queryByAccountAndProjectUid(
              account, project_uid); // For testing ................................
      if (testResultList != null) {
        List<Map<String, String>> reportList = new ArrayList<Map<String, String>>();
        for (int i = 0; i < testResultList.size(); i++) {
          Map<String, String> result = new HashMap<String, String>();
          result.put("phsy_report_id", project_uid);
          result.put(
              "phsy_report_project",
              getPhysicalItemName(testResultList.get(i).getIdPhysicalItem()));
          result.put("phsy_report_result", testResultList.get(i).getResult());
          result.put("phsy_report_backup", "无");
          reportList.add(result);
        }
        // generate phys doctor's recommendation
        String recommendation = "多喝水,早睡眠";
        // generate phys doctor's name
        String doctorName = "钟丽萍";
        // generate phys doctor's id
        String doctorId = "YG040001";
        // generate date
        // String date = "2014年11月17日";
        // generate phys client name
        String clientName = accountClient.getAccountClient();

        modelmap.addAttribute("phys_client_name", clientName);
        modelmap.addAttribute("phys_doctor_id", doctorId);
        modelmap.addAttribute("phys_doctor_name", doctorName);
        modelmap.addAttribute("phys_date", doctorName);
        modelmap.addAttribute("phys_report", reportList);
        modelmap.addAttribute("phys_recommendation", recommendation);
      }
    } else {
      modelmap.addAttribute("phys_report", null);
    }
    return "/vip/vi_resultDetail";
  }