private void handleShowPatient(Tuple request) { if (StringUtils.isNotEmpty(request.getString("pid"))) { String patientIdentifier = request.getString("pid"); SearchService searchService = ServiceLocator.instance().getSearchService(); PatientSummaryDTO patientSummaryVO = searchService.findPatientByPatientIdentifier(patientIdentifier); this.getModel().setPatientSummaryVO(patientSummaryVO); this.getModel().setHeader("Details for patient " + patientIdentifier); this.setView(new FreemarkerView(this.getModel().getPatientViewer(), getModel())); } }
private void handleShowPhenotypeDetails(Tuple request) throws Exception { if (StringUtils.isNotEmpty(request.getString("pid"))) { String patientIdentifier = request.getString("pid"); PhenoService phenoService = ServiceLocator.instance().getPhenoService(); SearchService searchService = ServiceLocator.instance().getSearchService(); PatientSummaryDTO patientSummaryVO = searchService.findPatientByPatientIdentifier(patientIdentifier); this.getModel() .setIndividualDTO(phenoService.findPhenotypeDetails(patientSummaryVO.getPatientId())); this.getModel().setHeader("Phenotypic details for Patient " + patientIdentifier); this.setView(new FreemarkerView("phenotypedetails.ftl", getModel())); } }