private void updateDiscriminatorSelectionChanged(ProtocolDiscriminatorLiteVo discriminator, boolean checked) { clearDiscriminatorControls(); if (discriminator == null || checked == false) { form.getLocalContext().setSelectedProtocolDiscriminator(null); populateDiscriminatorControls(null); return; } form.getLocalContext().setSelectedProtocolDiscriminator(discriminator); for (int i = 0; i < form.grdPriorities().getRows().size(); i++) { ProtocolDiscriminatorLiteVo rowValue = form.grdPriorities().getRows().get(i).getValue(); if (!rowValue.equals(discriminator)) { form.grdPriorities().getRows().get(i).setColSelect(false); } } populateDiscriminatorControls(discriminator); }
private void populateDiscriminatorControls(ProtocolDiscriminatorLiteVo discriminator) { clearDiscriminatorControls(); if (discriminator == null) { ManchesterTriageProtocolConfigForTriageProtocolAssessmentVo selectedManchesterProtocol = form.getLocalContext().getSelectedManchesterTriageProtocol(); // Revert back to Manchester Protocol default priority if (selectedManchesterProtocol != null) { form.txtPriority().setValue(selectedManchesterProtocol.getDefaultPriority().getText()); form.txtPriority().setTextColor(selectedManchesterProtocol.getDefaultPriority().getColor()); } return; } form.txtPriority().setValue(discriminator.getPriority().getText()); form.txtPriority().setTextColor(discriminator.getPriority().getColor()); form.txtDiscriminator().setValue(discriminator.getDiscriminator().getDiscriminatorName()); form.txtDiscriminatorDescription().setValue(discriminator.getDiscriminator().getDiscriminatorDescription()); }
private void populateDiscriminatorControls(ProtocolDiscriminatorLiteVo discriminator) { clearDiscriminatorControls(); if (discriminator == null) { ManchesterTriageProtocolConfigForTriageProtocolAssessmentVo selectedManchesterProtocol = form.getLocalContext().getSelectedManchesterTriageProtocol(); // Revert back to Manchester Protocol default priority if (selectedManchesterProtocol != null) { setTriagePriority(selectedManchesterProtocol.getDefaultPriority());//WDEV-19475 } return; } setTriagePriority(discriminator.getPriority());//WDEV-19475 form.txtDiscriminator().setValue(discriminator.getDiscriminator().getDiscriminatorName()); form.txtDiscriminatorDescription().setValue(discriminator.getDiscriminator().getDiscriminatorDescription()); }
protected void updateProblemSelection() { // Clear controls depending on problem selection form.txtProtocolName().setValue(null); form.getLocalContext().setSelectedManchesterTriageProtocol(null); form.grdPriorities().getRows().clear(); form.txtPriority().setValue(null); form.txtDiscriminator().setValue(null); form.txtDiscriminatorDescription().setValue(null); // Check selected value for problem if (form.qmbProblem().getValue() == null) return; // Get triage protocol for selected problem ManchesterTriageProtocolConfigForTriageProtocolAssessmentVo triageProtocol = domain.getTriageProtocol(form.qmbProblem().getValue()); if (triageProtocol == null) return; // Display protocol name form.txtProtocolName().setValue(triageProtocol.getProtocolName()); form.getLocalContext().setSelectedManchesterTriageProtocol(triageProtocol); // Display discriminators if (triageProtocol.getDiscriminatorsIsNotNull()) { for (ProtocolDiscriminatorLiteVo discriminator : triageProtocol.getDiscriminators()) { // Create a new discriminator row grdPrioritiesRow discriminatorRow = form.grdPriorities().getRows().newRow(); discriminatorRow.setColPriority("<font color =\""+ discriminator.getPriority().getColor().getName() +"\">" + discriminator.getPriority().getText() + "</font>"); discriminatorRow.setColDiscriminator(discriminator.getDiscriminator().getDiscriminatorName()); discriminatorRow.setColSelect(false); discriminatorRow.setValue(discriminator); discriminatorRow.setSelectable(false); } } // Display default priority form.txtPriority().setValue(triageProtocol.getDefaultPriority().getText()); form.txtPriority().setTextColor(triageProtocol.getDefaultPriority().getColor()); }
protected void updateProblemSelection() { // Clear controls depending on problem selection form.txtProtocolName().setValue(null); form.getLocalContext().setSelectedManchesterTriageProtocol(null); form.grdPriorities().getRows().clear(); setTriagePriority(null);//WDEV-19475 form.txtDiscriminator().setValue(null); form.txtDiscriminatorDescription().setValue(null); // Check selected value for problem if (form.qmbProblem().getValue() == null) return; // Get triage protocol for selected problem ManchesterTriageProtocolConfigForTriageProtocolAssessmentVo triageProtocol = domain.getTriageProtocol(form.qmbProblem().getValue()); if (triageProtocol == null) return; // Display protocol name form.txtProtocolName().setValue(triageProtocol.getProtocolName()); form.getLocalContext().setSelectedManchesterTriageProtocol(triageProtocol); // Display discriminators if (triageProtocol.getDiscriminatorsIsNotNull()) { for (ProtocolDiscriminatorLiteVo discriminator : triageProtocol.getDiscriminators()) { // Create a new discriminator row grdPrioritiesRow discriminatorRow = form.grdPriorities().getRows().newRow(); discriminatorRow.setBackColor(Color.LightGray);//WDEV-18346 discriminatorRow.setColPriority("<font color =\""+ discriminator.getPriority().getColor().getName() +"\">" + discriminator.getPriority().getText() + "</font>"); discriminatorRow.setColDiscriminator(discriminator.getDiscriminator().getDiscriminatorName()); discriminatorRow.setColSelect(false); discriminatorRow.setValue(discriminator); discriminatorRow.setSelectable(false); } } // Display default priority setTriagePriority(triageProtocol.getDefaultPriority()); //WDEV-19475 }