private void populateAreaOfNeedGridFromData(SoapNoteVo voSoapNote) { if(voSoapNote == null) return; AreaOfNeedCollection lkpCollection = voSoapNote.getAreaofNeed(); for (int i = 0; lkpCollection != null && i < lkpCollection.size(); i++) { GenForm.gridNeedsRow row = form.gridNeeds().getRowByValue(lkpCollection.get(i)); if(row != null) { row.setColSelect(true); //TODO - clarify with analysts //row.setColNotes(????) } } voSoapNote.setAreaofNeed(lkpCollection); }
private void prepopulateControls() { GenForm.gridNeedsRow row; AreaOfNeedCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getAreaOfNeed(domain.getLookupService()); for (int i = 0; i < lookupCollection.size(); i++) { row = form.gridNeeds().getRows().newRow(); row.setColAreaofNeed(lookupCollection.get(i).getText()); row.setValue(lookupCollection.get(i)); } }
private void populateAreaOfNeedDataFromScreen(SoapNoteVo voSoapNote) { AreaOfNeedCollection collAreaOfNeed = new AreaOfNeedCollection(); for (int i = 0; i < form.gridNeeds().getRows().size(); i++) { if (form.gridNeeds().getRows().get(i).getColSelect()) collAreaOfNeed.add(form.gridNeeds().getRows().get(i).getValue()); } voSoapNote.setAreaofNeed(collAreaOfNeed); }
private void fillAreaOfNeedCombo() { AreaOfNeedCollection areaOfNeedColl = domain.getAreaOfNeeds(form.getGlobalContext().Core.getCurrentClinicalContact()); if(areaOfNeedColl != null) { for(int i=0; i<areaOfNeedColl.size(); i++) { form.ctnTherapy().lyrTherapy().tabDetails().cmbAreaNeed().newRow(areaOfNeedColl.get(i), areaOfNeedColl.get(i).toString()); } } }
public AreaOfNeedCollection getAreaOfNeeds(ClinicalContactShortVo voClinicalContact) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); String query = "from SoapNote sn where"; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); String andStr = " "; if(voClinicalContact != null) { hql.append(" sn.clinicalContact.id = :cc"); markers.add("cc"); values.add(voClinicalContact.getID_ClinicalContact()); andStr = " and "; } hql.append(andStr + " sn.areaofNeed.size > 0"); query += hql.toString(); List AreaList = factory.find(query, markers, values); //if(AreaList.size() == 1) // return SoapNoteShortVoAssembler.createSoapNoteShortVoCollectionFromSoapNote(AreaList).get(0).getAreaofNeed(); SoapNoteShortVoCollection tempVoCol = SoapNoteShortVoAssembler.createSoapNoteShortVoCollectionFromSoapNote(AreaList); if(tempVoCol.size() == 1) return tempVoCol.get(0).getAreaofNeed(); return null; }