private void browserRecord() { clearControls(); listAreas(true); //TODO ValueObject value = form.recbrPreviousMotorCharts().getValue(); if( value instanceof PatientMotorChartShortVo && ((PatientMotorChartShortVo)value).getID_PatientMotorChartIsNotNull()) displayMotorChart((PatientMotorChartShortVo) value); if (form.dyngrdMotor().getRows().size() > 0) removeBlankRows(form.dyngrdMotor().getRows()); enableButtons(); updateBrowseInformation(); }
private boolean isCurrentClinicalRecord() { if(form.recbrPreviousMotorCharts().getValue() instanceof PatientMotorChartShortVo) { PatientMotorChartShortVo voMotorChart = (PatientMotorChartShortVo)form.recbrPreviousMotorCharts().getValue(); if (voMotorChart.getClinicalContactIsNotNull() && voMotorChart.getClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact())) return true; } if(form.recbrPreviousMotorCharts().getValue() instanceof ClinicalContactShortVo) { ClinicalContactShortVo voClinContact = (ClinicalContactShortVo)form.recbrPreviousMotorCharts().getValue(); if (voClinContact != null && voClinContact.equals(form.getGlobalContext().Core.getCurrentClinicalContact())) return true; } return false; }
private void updateBrowseInformation() { int nCount = 0 ; int nDisplayedRecord = 0; for (int i = 0 ; i < form.recbrPreviousMotorCharts().size() ; i++) { if( form.recbrPreviousMotorCharts().getValues().get(i) instanceof PatientMotorChartShortVo ) nCount++; if( form.recbrPreviousMotorCharts().getValues().get(i) instanceof PatientMotorChartShortVo && form.recbrPreviousMotorCharts().getValues().get(i).equals(form.recbrPreviousMotorCharts().getValue())) nDisplayedRecord = nCount; } form.lblBrowser().setValue("Assessment " + nDisplayedRecord + " of " + nCount); }
private void displayMotorChart(PatientMotorChartShortVo voPatientMotorChartShort) { if (voPatientMotorChartShort == null) return; populateGridWithChartVo(domain.getPatientMotorChart(voPatientMotorChartShort)); }
private void loadClinicalContactPatientMotorChartRecords(PatientMotorChartShortVoCollection voPatientMotorChartColl) { boolean clinConctactRecordExists = isRecordForCurrentClincontactSaved(voPatientMotorChartColl); if(!clinConctactRecordExists) loadCurrentClinicalContact(); for (int i = 0; voPatientMotorChartColl != null && i < voPatientMotorChartColl.size(); i++) { PatientMotorChartShortVo patientMotorChartShortVo = voPatientMotorChartColl.get(i); loadClinicalContactDetails(patientMotorChartShortVo); } }
private void loadClinicalContactDetails(PatientMotorChartShortVo patientMotorChartShortVo) { boolean isCurrentClinicalContact = false; if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()) isCurrentClinicalContact = patientMotorChartShortVo.getClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact()); form.recbrPreviousMotorCharts().newRow(patientMotorChartShortVo, getClinicalContactText(patientMotorChartShortVo), isCurrentClinicalContact?Color.Green:Color.Default); if(isCurrentClinicalContact) form.recbrPreviousMotorCharts().setValue(patientMotorChartShortVo); }
private void loadCurrentClinicalContact() { if(form.getGlobalContext().Core.getCurrentClinicalContact() != null) { PatientMotorChartShortVo patientMotorChartShortVo = new PatientMotorChartShortVo(); patientMotorChartShortVo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact()); form.recbrPreviousMotorCharts().newRow(form.getGlobalContext().Core.getCurrentClinicalContact(), getClinicalContactText(patientMotorChartShortVo), Color.Green); form.recbrPreviousMotorCharts().setValue(form.getGlobalContext().Core.getCurrentClinicalContact()); } }
private String getClinicalContactText(PatientMotorChartShortVo patientMotorChartShortVo) { if (patientMotorChartShortVo == null) return ""; ClinicalContactShortVo voClinicalContact = patientMotorChartShortVo.getClinicalContact(); if(voClinicalContact != null) { String sb ="\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime().toString() + " - " + voClinicalContact.getSeenBy().toString(); return sb; } return ""; }
private boolean isNewRecord() { if(form.recbrPreviousMotorCharts().getValue() instanceof PatientMotorChartShortVo) { PatientMotorChartShortVo voMotorChart = (PatientMotorChartShortVo) form.recbrPreviousMotorCharts().getValue(); return voMotorChart == null || voMotorChart.getID_PatientMotorChart() == null; } if(form.recbrPreviousMotorCharts().getValue() instanceof ClinicalContactShortVo) return true; return false; }
private boolean isCurrentClinicalRecordSelected() { if(form.recbrPreviousMotorCharts().getValue() instanceof PatientMotorChartShortVo) { PatientMotorChartShortVo voMotorChart = (PatientMotorChartShortVo) form.recbrPreviousMotorCharts().getValue(); return voMotorChart != null && voMotorChart.getClinicalContactIsNotNull() && voMotorChart.getClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact()) && voMotorChart.getID_PatientMotorChartIsNotNull(); } if(form.recbrPreviousMotorCharts().getValue() instanceof ClinicalContactShortVo) { ClinicalContactShortVo voClinContact = (ClinicalContactShortVo)form.recbrPreviousMotorCharts().getValue(); return voClinContact != null && voClinContact.equals(form.getGlobalContext().Core.getCurrentClinicalContact()); } return false; }
private boolean isRecordForCurrentClincontactSaved(PatientMotorChartShortVoCollection collCharts) { ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); if(voClinicalContact != null && collCharts != null) { for (int i = 0; i < collCharts.size(); i++) { PatientMotorChartShortVo voMotorChart = collCharts.get(i); if (voMotorChart.getClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact())) return true; } } return false; }