private void populateInstanceControls(PatientMeetingVo voPatientMeeting) { if (voPatientMeeting == null) return; form.ctnDetails().cmbStatus().setValue(voPatientMeeting.getStatus()); form.ctnDetails().customControlAuthoringHcp().setValue(voPatientMeeting.getAuthoringInformation()); form.ctnDetails().dteNextMeeting().setValue(voPatientMeeting.getNextMeetingDate().getDate()); form.ctnDetails().dtimMeeting().setValue(voPatientMeeting.getMeetingDateTime()); form.ctnDetails().txtNotes().setValue(voPatientMeeting.getMeetingNotes()); displayInvitees(voPatientMeeting.getAttendees()); }
private void populateInstanceData(PatientMeetingVo voPatientMeeting) { voPatientMeeting.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); voPatientMeeting.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact() != null ? form.getGlobalContext().Core.getCurrentClinicalContact() : null); voPatientMeeting.setStatus(form.ctnDetails().cmbStatus().getValue()); voPatientMeeting.setAuthoringInformation(form.ctnDetails().customControlAuthoringHcp().getValue()); voPatientMeeting.setNextMeetingDate(new DateTime(form.ctnDetails().dteNextMeeting().getValue())); voPatientMeeting.setMeetingDateTime(form.ctnDetails().dtimMeeting().getValue()); voPatientMeeting.setMeetingNotes(form.ctnDetails().txtNotes().getValue()); voPatientMeeting.setAttendees(populateInviteeInstanceData()); }
public String[] validateUIRules(PatientMeetingVo voPatientMeeting) { ArrayList errors = new ArrayList(); if (form.ctnDetails().customControlAuthoringHcp().getValue() != null) { if (form.ctnDetails().customControlAuthoringHcp().getValue().getAuthoringHcp() == null) { errors.add("An Authoring Hcp must be supplied"); } } if (voPatientMeeting.getAttendeesIsNotNull()) { PatientMeetingInviteeVoCollection collPatientMeetingInviteeVo = voPatientMeeting.getAttendees(); for (int i = 0; i < collPatientMeetingInviteeVo.size(); i++) { if (collPatientMeetingInviteeVo.get(i).getFamilyMember() == null && collPatientMeetingInviteeVo.get(i).getHcp() == null) errors.add("Please select an Invitee."); } } //-------------------------------------------------- if(voPatientMeeting.getMeetingDateTime() == null) { errors.add("Meeting Date/Time is mandatory."); } //--------------------------------------------------- String[] arrErrors = null; if (errors.size() > 0) { arrErrors = new String[errors.size()]; for (int i = 0; i < errors.size(); i++) arrErrors[i] = (String) errors.get(i); } return arrErrors; }
/** * savePatientMeetingVo */ public PatientMeetingVo savePatientMeetingVo(PatientMeetingVo voPatientMeeting) throws StaleObjectException { if (!voPatientMeeting.isValidated()) throw new DomainRuntimeException("This Patient Meeting has not been validated"); DomainFactory factory = getDomainFactory(); PatientMeeting domPatientMeeting = PatientMeetingVoAssembler.extractPatientMeeting(factory, voPatientMeeting); factory.save(domPatientMeeting); return PatientMeetingVoAssembler.create(domPatientMeeting); }
public ims.clinical.vo.PatientMeetingVo getPatientMeeting(ims.clinical.vo.PatientMeetingLiteVo voLitePatientMeeting) { DomainFactory factory = getDomainFactory(); PatientMeeting doPatientMeeting = (PatientMeeting) factory.getDomainObject(PatientMeeting.class, voLitePatientMeeting.getID_PatientMeeting()); return PatientMeetingVoAssembler.create(doPatientMeeting); }