/** * 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 NursingNotesVo populateDataFromScreen(NursingNotesVo record) { if (record == null) { record = new NursingNotesVo(); record.setCatsReferral(form.getGlobalContext().RefMan.getCatsReferral()); } calculateBMI(); record.setAuthoringUser(form.ccAuthUser().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo)form.ccAuthUser().getValue():null); record.setAuthoringDateTime(form.dtimAuthoringDT().getValue()); record.setVitalSigns(getVitalSigns(record.getVitalSigns())); record.setSmokingStatus(form.cmbSmokStatus().getValue()); record.setAdviceGiven(form.chkAdviceGiven().getValue()); record.setReferredToSomkingCessation(form.chkReffered().getValue()); record.setUnitsOfAlcoholConsumedPerWeek(form.intAlcohol().getValue()!=null?form.intAlcohol().getValue().floatValue():null); record.setMRSAResult(form.chkNeg().getValue()?MRSAResult.NEGATIVE:(form.chkPos().getValue()?MRSAResult.POSITIVE:null)); record.setObservationNotes(form.txtObsNotes().getValue()); record.setAllergies(getAllergiesFromGrid()); record.setComorbidities(getComorbidities()); record.setCurrentMedications(getCurrentMedication()); return record; }
private void populateScreenFromData(NursingNotesVo record) { clearScreen(); if (record == null) return; form.ccAuthUser().setValue(record.getAuthoringUser()); form.dtimAuthoringDT().setValue(record.getAuthoringDateTime()); if (record.getVitalSignsIsNotNull()) { if (record.getVitalSigns().getBloodPressureIsNotNull()) { form.intBPDIA().setValue(record.getVitalSigns().getBloodPressure().getBPSittingDiasIsNotNull()?record.getVitalSigns().getBloodPressure().getBPSittingDias().intValue():null); form.intBPSYS().setValue(record.getVitalSigns().getBloodPressure().getBPSittingSysIsNotNull()?record.getVitalSigns().getBloodPressure().getBPSittingSys().intValue():null); } if (record.getVitalSigns().getPulseIsNotNull()) { form.intHeartRate().setValue(record.getVitalSigns().getPulse().getPulseRateRadial()); } if (record.getVitalSigns().getRespiratoryIsNotNull()) { form.intRespRate().setValue(record.getVitalSigns().getRespiratory().getRespRate()); } if (record.getVitalSigns().getTemperatureIsNotNull()) { form.decTemp().setValue(record.getVitalSigns().getTemperature().getTemperature()); } if (record.getVitalSigns().getMetricsIsNotNull()) { form.decHeight().setValue(record.getVitalSigns().getMetrics().getHeightValue()); form.decWeight().setValue(record.getVitalSigns().getMetrics().getWeightValue()); form.decBMI().setValue(record.getVitalSigns().getMetrics().getBMI()); } } form.cmbSmokStatus().setValue(record.getSmokingStatus()); form.chkAdviceGiven().setValue(record.getAdviceGiven()); form.chkReffered().setValue(record.getReferredToSomkingCessation()); form.intAlcohol().setValue(record.getUnitsOfAlcoholConsumedPerWeekIsNotNull()?record.getUnitsOfAlcoholConsumedPerWeek().intValue():null); if (record.getMRSAResultIsNotNull()) { boolean isPositive = MRSAResult.POSITIVE.equals(record.getMRSAResult()); form.chkNeg().setValue(!isPositive); form.chkPos().setValue(isPositive); } form.txtObsNotes().setValue(record.getObservationNotes()); populateAllergiesGrid(record.getAllergies()); populateComorbiditiesGrid(record.getComorbidities()); populateMedicationGrid(record.getCurrentMedications()); }