/** * @param sitesResultsVoColl */ private MRSASitesResultsVoCollection populateSitesResultsCollectionFromGrid() { GenForm.grdMRSAAssChildRow childRow = null; MRSASitesResultsVoCollection sitesResultsVoColl = new MRSASitesResultsVoCollection(); for(int z=0; z<form.grdMRSAAssChild().getRows().size(); z++) { childRow = form.grdMRSAAssChild().getRows().get(z); MRSASitesResultsVo voMRSASite = childRow.getValue(); voMRSASite.setSite(childRow.getcolSite()); voMRSASite.setResult(childRow.getcolResult()); voMRSASite.setDateResult(childRow.getcolDateResult()); sitesResultsVoColl.add(voMRSASite); } return sitesResultsVoColl; }
/** * WDEV-13677 * Function used to retrieve the latest MRSA positive result record (Non RIE) */ public MRSASitesResultsVo getLastMrsaPosResult(Integer idPatient) { // If the patient ID is null then return null if (idPatient == null) return null; // Parameters array ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); // Query syntax String query = "select siteRes from MRSAAssessment mrsa left join mrsa.sitesAndResults as siteRes where mrsa.careContext.episodeOfCare.careSpell.patient.id = :PATID and mrsa.isRIE is null and siteRes.result.id = :RES order by siteRes.dateResult desc"; //wdev-14307 // Parameters values paramNames.add("PATID"); paramValues.add(idPatient); paramNames.add("RES"); paramValues.add(MRSAResult.POSITIVE.getID()); //wdev-14307 // Execute query and return the results return MRSASitesResultsVoAssembler.create((MRSASitesResults) getDomainFactory().findFirst(query, paramNames, paramValues)); }
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(); }