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()); }
public ManchesterTriageProtocolConfigForTriageProtocolAssessmentVo getTriageProtocol(ClinicalProblemRefVo problem) { if (problem == null) return null; StringBuilder query = new StringBuilder(); query.append("SELECT manTriage FROM ManchesterTriageProtocolConfiguration AS manTriage LEFT JOIN manTriage.problem AS problem LEFT JOIN FETCH manTriage.discriminators AS disc LEFT JOIN FETCH disc.discriminator LEFT JOIN manTriage.activeStatus AS status "); query.append(" WHERE problem.id = :PROBLEM AND status.id = :ACTIVE ORDER BY UPPER(manTriage.protocolName) ASC"); ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); paramNames.add("PROBLEM"); paramValues.add(problem.getID_ClinicalProblem()); paramNames.add("ACTIVE"); paramValues.add(PreActiveActiveInactiveStatus.ACTIVE.getID()); return ManchesterTriageProtocolConfigForTriageProtocolAssessmentVoAssembler.create((ManchesterTriageProtocolConfiguration) getDomainFactory().findFirst(query.toString(), paramNames, paramValues)); }
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 }