@Test public void testAjaxProviderSearch_Checked_Status_Is_OK() throws Exception { when(providerSearchLookupService.isValidatedSearch(anyString(), anyString(), anyString(), anyString(), anyString(), anyString(), anyString(), anyString(), anyString())).thenReturn(true); when(providerSearchLookupService.providerSearch(anyString(), anyString(), anyString(), anyString(), anyString(), anyString(), anyString(), anyString(), anyString(), anyInt())).thenReturn("artifitial JSON"); mockMvc.perform(get("/patients/providerSearch.html").param("pageNumber", "0")) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON)); }
@RequestMapping(value = "connectionProviderAdd.html") public String providerSearch(Model model) { AuthenticatedUser currentUser = userContext.getCurrentUser(); PatientConnectionDto patientConnectionDto = patientService .findPatientConnectionByUsername(currentUser.getUsername()); Set<String> npiList = new HashSet<String>(); for (IndividualProviderDto individualProviderDto : patientConnectionDto .getIndividualProviders()) { npiList.add(individualProviderDto.getNpi()); } for (OrganizationalProviderDto organizationalProviderDto : patientConnectionDto .getOrganizationalProviders()) { npiList.add(organizationalProviderDto.getNpi()); } model.addAttribute("currentUser", currentUser); model.addAttribute("npiList", npiList); populateLookupCodes(model); return "views/patients/connectionProviderAdd"; }
ProviderController extends AbstractController { @RequestMapping(value = "connectionProviderAdd.html") public String providerSearch(Model model) { AuthenticatedUser currentUser = userContext.getCurrentUser(); PatientConnectionDto patientConnectionDto = patientService .findPatientConnectionByUsername(currentUser.getUsername()); Set<String> npiList = new HashSet<String>(); for (IndividualProviderDto individualProviderDto : patientConnectionDto .getIndividualProviders()) { npiList.add(individualProviderDto.getNpi()); } for (OrganizationalProviderDto organizationalProviderDto : patientConnectionDto .getOrganizationalProviders()) { npiList.add(organizationalProviderDto.getNpi()); } model.addAttribute("currentUser", currentUser); model.addAttribute("npiList", npiList); populateLookupCodes(model); return "views/patients/connectionProviderAdd"; } }
ProviderController extends AbstractController { @RequestMapping(value = "connectionProviderAdd.html") public String providerSearch(Model model) { AuthenticatedUser currentUser = userContext.getCurrentUser(); PatientConnectionDto patientConnectionDto = patientService .findPatientConnectionByUsername(currentUser.getUsername()); Set<String> npiList = new HashSet<String>(); for (IndividualProviderDto individualProviderDto : patientConnectionDto .getIndividualProviders()) { npiList.add(individualProviderDto.getNpi()); } for (OrganizationalProviderDto organizationalProviderDto : patientConnectionDto .getOrganizationalProviders()) { npiList.add(organizationalProviderDto.getNpi()); } model.addAttribute("currentUser", currentUser); model.addAttribute("npiList", npiList); populateLookupCodes(model); return "views/patients/connectionProviderAdd"; }  }
ProviderController extends AbstractController { @RequestMapping(value = "connectionProviderAdd.html") public String providerSearch(Model model) { AuthenticatedUser currentUser = userContext.getCurrentUser(); PatientConnectionDto patientConnectionDto = patientService .findPatientConnectionByUsername(currentUser.getUsername()); Set<String> npiList = new HashSet<String>(); for (IndividualProviderDto individualProviderDto : patientConnectionDto .getIndividualProviders()) { npiList.add(individualProviderDto.getNpi()); } for (OrganizationalProviderDto organizationalProviderDto : patientConnectionDto .getOrganizationalProviders()) { npiList.add(organizationalProviderDto.getNpi()); } model.addAttribute("currentUser", currentUser); model.addAttribute("npiList", npiList); populateLookupCodes(model); return "views/patients/connectionProviderAdd"; }  @RequestMapping(value = "connectionMain.html") String connectionMain(Model model, HttpServletRequest request); @RequestMapping(value = "connectionMain/deleteIndividualProvider", method = RequestMethod.POST) String deleteIndividualProvider(
			@RequestParam("individualProviderid") String individualProviderid,
			Model model); @RequestMapping(value = "connectionMain/deleteOrganizationalProvider", method = RequestMethod.POST) String deleteOrganizationalProvider(
			@RequestParam("organizationalProviderid") String organizationalProviderid,
			Model model); @RequestMapping(value = "connectionProviderAdd.html") String providerSearch(Model model); @RequestMapping(value = "providerSearch.html", method = RequestMethod.GET) String ajaxProviderSearch(HttpServletRequest request,
			HttpServletResponse response); @RequestMapping(value = "connectionProviderAdd.html", method = RequestMethod.POST) String providerSearch(@RequestParam("npi") String npi); @RequestMapping(value = "connectionProviderAdd_AJAX.html", method = RequestMethod.POST) @ResponseBody String providerSearch_AJAX(
			@RequestParam("npi") String npi); HashMap<String, String> deserializeResult(String providerDtoJSON); }
ProviderController extends AbstractController { @RequestMapping(value = "connectionProviderAdd.html") public String providerSearch(Model model) { AuthenticatedUser currentUser = userContext.getCurrentUser(); PatientConnectionDto patientConnectionDto = patientService .findPatientConnectionByUsername(currentUser.getUsername()); Set<String> npiList = new HashSet<String>(); for (IndividualProviderDto individualProviderDto : patientConnectionDto .getIndividualProviders()) { npiList.add(individualProviderDto.getNpi()); } for (OrganizationalProviderDto organizationalProviderDto : patientConnectionDto .getOrganizationalProviders()) { npiList.add(organizationalProviderDto.getNpi()); } model.addAttribute("currentUser", currentUser); model.addAttribute("npiList", npiList); populateLookupCodes(model); return "views/patients/connectionProviderAdd"; }  @RequestMapping(value = "connectionMain.html") String connectionMain(Model model, HttpServletRequest request); @RequestMapping(value = "connectionMain/deleteIndividualProvider", method = RequestMethod.POST) String deleteIndividualProvider(
			@RequestParam("individualProviderid") String individualProviderid,
			Model model); @RequestMapping(value = "connectionMain/deleteOrganizationalProvider", method = RequestMethod.POST) String deleteOrganizationalProvider(
			@RequestParam("organizationalProviderid") String organizationalProviderid,
			Model model); @RequestMapping(value = "connectionProviderAdd.html") String providerSearch(Model model); @RequestMapping(value = "providerSearch.html", method = RequestMethod.GET) String ajaxProviderSearch(HttpServletRequest request,
			HttpServletResponse response); @RequestMapping(value = "connectionProviderAdd.html", method = RequestMethod.POST) String providerSearch(@RequestParam("npi") String npi); @RequestMapping(value = "connectionProviderAdd_AJAX.html", method = RequestMethod.POST) @ResponseBody String providerSearch_AJAX(
			@RequestParam("npi") String npi); HashMap<String, String> deserializeResult(String providerDtoJSON); static final int NPI_LENGTH; }