private void selectPatient() { if(form.grdPatients().getValue() == null || form.grdPatients().getValue().getPasEvent() == null) return; PatientForVTERiskAssessmentVo patient = form.grdPatients().getValue().getPasEvent().getPatient(); PatientShort patientShort = new PatientShort(patient.getID_Patient(), patient.getVersion_Patient()); form.getGlobalContext().Core.setPatientShort(patientShort); }
private void selectPatient() { if (form.dyngrdPatients().getValue() == null) return; PatientForVTERiskAssessmentVo patient = null; if (form.dyngrdPatients().getValue() instanceof IVTERiskAssessment && ((IVTERiskAssessment)form.dyngrdPatients().getValue()).getPasEvent() != null) patient = ((IVTERiskAssessment)form.dyngrdPatients().getValue()).getPasEvent().getPatient(); else if (form.dyngrdPatients().getValue() instanceof VTERiskAssessmentTCIVo) patient = ((VTERiskAssessmentTCIVo)form.dyngrdPatients().getValue()).getPatient(); PatientShort patientShort = new PatientShort(patient.getID_Patient(), patient.getVersion_Patient()); form.getGlobalContext().Core.setPatientShort(patientShort); }