private void updateMRSADetails() { form.setMode(FormMode.EDIT); setScreenMode(DETAILVIEW); form.dteScreening().setEnabled(true); GenForm.grdAssessmentRow row = form.grdAssessment().getRowByValue(form.grdAssessment().getValue()); form.grdMRSAAssChild().setReadOnly(false); for(int i=0;i<form.grdMRSAAssChild().getRows().size();i++) form.grdMRSAAssChild().getRows().get(i).setSelectable(true); form.getLocalContext().setMRSAAssessment((MRSAAssessmentVo)row.getValue()); form.getLocalContext().setbEditHeaderRecord(Boolean.FALSE); //set all other parent rows non-selecteable for(int i=0;i<form.grdAssessment().getRows().size();i++) { if(!form.grdAssessment().getRows().get(i).getValue().equals(row.getValue())) form.grdAssessment().getRows().get(i).setSelectable(false); } updateMRSAChildMenu(); }
private void displayHeaderRecord(MRSAAssessmentVo voMRSA) { AuthoringInformationVo voAuthoringInformation = new AuthoringInformationVo(); voAuthoringInformation.setAuthoringDateTime(voMRSA.getDateTimeInitiated()); if(voMRSA.getHcpInitiatedIsNotNull()) { HcpLiteVo voHcpLite = new HcpLiteVo(); voHcpLite.setMos(voMRSA.getHcpInitiated().getMos()); voHcpLite.setHcpType(voMRSA.getHcpInitiated().getHcpType()); voHcpLite.setID_Hcp(voMRSA.getHcpInitiated().getID_Hcp()); voAuthoringInformation.setAuthoringHcp(voHcpLite); } form.customControlAuth().setValue(voAuthoringInformation); form.dteScreening().setValue(voMRSA.getDateScreening()); }
private void populateScreeningCombo(MRSAAssessmentVoCollection voCollMRSA) { if (voCollMRSA == null) { form.btnUpdate().setVisible(false); return; } for (int i = 0; i < voCollMRSA.size(); i++) { String strDisplay = voCollMRSA.get(i).getDateScreening().toString(); if (voCollMRSA.get(i).getHcpInitiated() != null) { strDisplay += " - "; strDisplay += voCollMRSA.get(i).getHcpInitiated().toString(); } form.cmbScreeningRecords().newRow(voCollMRSA.get(i), strDisplay); } //set the combo to hold the latest record. if(voCollMRSA.size()>0 && form.cmbScreeningRecords().getValues() != null) { form.cmbScreeningRecords().setValue((MRSAAssessmentVo) form.cmbScreeningRecords().getValues().get(0)); } try { onCmbScreeningRecordsValueChanged(); } catch (PresentationLogicException e) { } }
private void populateScreenWithTreatmentInfo() { MRSAAssessmentVo voMRSA = form.cmbScreeningRecords().getValue(); updateControlStatus(); if (voMRSA == null) return; MRSATreatmentVo voTreatment = voMRSA.getTreatment(); if (voTreatment == null) return; form.dteRescreen().setValue(voTreatment.getRescreenDate()); form.dteStart().setValue(voTreatment.getStartDate()); form.intTreatmentNumber().setValue(voTreatment.getTreatmentNumber()); if (voTreatment.getStartDate() != null) try { onDteStartValueChanged(); } catch (PresentationLogicException e) { } MRSATreatmentDetailsVoCollection voTreatmentDetailColl = new MRSATreatmentDetailsVoCollection(); if (voTreatment != null && voTreatment.getTreatmentDetails() != null) voTreatmentDetailColl = voTreatment.getTreatmentDetails(); for(int z =0; z<voTreatmentDetailColl.size(); z++) { MRSATreatmentDetailsVo voTreatmentDetail = voTreatmentDetailColl.get(z); int i=0; for(i=0; i<form.grdEdit().getRows().size(); i++) { GenForm.grdEditRow row = form.grdEdit().getRows().get(i); if(voTreatmentDetail.getTreatment()!= null && row.getColTreatment() != null) { if(row.getColTreatment().equals(voTreatmentDetail.getTreatment())) { setGridEditRowData(voTreatmentDetail, row); break; } } } if(i == form.grdEdit().getRows().size()) { grdEditRow newRow = form.grdEdit().getRows().newRow(); newRow.setColTreatment(voTreatmentDetail.getTreatment()); setGridEditRowData(voTreatmentDetail, newRow); } } }
private void populateScreeningGrid(MRSAAssessmentVo voMRSA) { form.grdScreening().getRows().clear(); if (voMRSA == null) return; MRSASitesResultsVoCollection voSitesResultColl = null; MRSASitesResultsVo voSitesResult = null; GenForm.grdScreeningRow row = null; row = form.grdScreening().getRows().newRow(); if (voMRSA.getDateScreening() != null) row.setColDateScreening(voMRSA.getDateScreening().toString()); row.setValue(voMRSA); voSitesResultColl = voMRSA.getSitesAndResults(); if (voSitesResultColl != null) { GenForm.grdScreeningRow cRow = null; for (int p = 0; p < voSitesResultColl.size(); p++) { voSitesResult = voSitesResultColl.get(p); cRow = row.getRows().newRow(); if (voSitesResult.getOther() != null) cRow.setColDateScreening(voSitesResult.getOther()); else if (voSitesResult.getSite() != null) cRow.setColDateScreening(voSitesResult.getSite().getText()); if (voSitesResult.getDateResult() != null) cRow.setColDateResult(voSitesResult.getDateResult().toString()); if (voSitesResult.getResult() != null) cRow.setColResult(voSitesResult.getResult().getText()); cRow.setValue(voSitesResult); cRow.setSelectable(false); } } form.grdScreening().expandAll(); }
public MRSAAssessmentVo saveTreatment(MRSAAssessmentVo voMRSA, ClinicalContactShortVo voClinicalContactShort) throws StaleObjectException { MRSAAssessment impl = (MRSAAssessment)getDomainImpl(MRSAAssessmentImpl.class); return impl.saveMRSA(voMRSA, voClinicalContactShort); }
public MRSAAssessmentVo saveMRSA(MRSAAssessmentVo assessmentMRSA, ClinicalContactShortVo voClinicalContactShort) throws StaleObjectException { if(!assessmentMRSA.isValidated()) throw new DomainRuntimeException("This Pain Assessment has not been validated"); DomainFactory factory = getDomainFactory(); MRSAAssessment doAssessMRSA = MRSAAssessmentVoAssembler.extractMRSAAssessment(factory, assessmentMRSA); factory.save(doAssessMRSA); return MRSAAssessmentVoAssembler.create(doAssessMRSA); }