public void saveOutPatientEpisodes(OutPatientAttendanceVoCollection collOutPatientAttendanceVo, MemberOfStaffShortVo mos) throws DomainInterfaceException, StaleObjectException { for(int i=0; i<collOutPatientAttendanceVo.size(); i++){ if (!collOutPatientAttendanceVo.get(i).isValidated()) { throw new DomainRuntimeException("Episode VO has not been validated!"); } DomainFactory factory = getDomainFactory(); OutpatientAttendance ouDo = OutPatientAttendanceVoAssembler.extractOutpatientAttendance(factory, collOutPatientAttendanceVo.get(i)); factory.save(ouDo); saveDocumentStatus(collOutPatientAttendanceVo.get(i).getPasEvent().getCspDocumentStatus(), collOutPatientAttendanceVo.get(i).getPasEvent(), mos); } }
private void populateOutPatientList(OutPatientAttendanceVoCollection voOutPatColl) { if (voOutPatColl != null) { if (voOutPatColl.size() == 0) { engine.showMessage("No matching patients found."); return; } storeSearchCriteria(); grdOPAttendencesRow row = null; for (int i = 0; i < voOutPatColl.size(); i++) { OutPatientAttendanceVo voOutPatient = voOutPatColl.get(i); if (voOutPatient != null && voOutPatient.getPasEventIsNotNull() && voOutPatient.getPasEvent().getPatientIsNotNull()) { row = form.grdOPAttendences().getRows().newRow(); if (voOutPatient.getPasEvent().getPatient().getNameIsNotNull()) { row.setcolForename(voOutPatient.getPasEvent().getPatient().getName().getForename()); row.setcolSurname(voOutPatient.getPasEvent().getPatient().getName().getSurname()); } ims.core.vo.PatientId voPatId = voOutPatient.getPasEvent().getPatient().getDisplayId(); if (voPatId != null) row.setcolHospnum(voPatId.getValue()); if (voOutPatient.getPasEvent().getPatient().getDobIsNotNull()) row.setcolDob(voOutPatient.getPasEvent().getPatient().getDob().toString()); if (voOutPatient.getPasEvent().getPatient().getAgeIsNotNull()) row.setColAge(voOutPatient.getPasEvent().getPatient().getAge().toString()); else row.setColAge(voOutPatient.getPasEvent().getPatient().calculateAge()!=null ? voOutPatient.getPasEvent().getPatient().calculateAge().toString():null);//WDEV-17541 if (voOutPatient.getPasEvent().getPatient().getSexIsNotNull()) row.setcolSex(voOutPatient.getPasEvent().getPatient().getSex().getText()); if (voOutPatient.getClinicIsNotNull()) row.setcolClinic(voOutPatient.getClinic().getClinicName()); if (voOutPatient.getPasEvent() != null && voOutPatient.getPasEvent().getSpecialty() != null) row.setcolSpecialty(voOutPatient.getPasEvent().getSpecialty().getText()); if (voOutPatient.getAppointmentDateTimeIsNotNull()) row.setcolClinicDate(voOutPatient.getAppointmentDateTime().toString()); if (voOutPatient.getPasEvent().getPatient().getIsDead() != null && voOutPatient.getPasEvent().getPatient().getIsDead().booleanValue()) row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue()); row.setValue(voOutPatient.getPasEvent().getPatient()); } } } }