private EmergencyEpisodeForQuickRegistrationVo populateDataFromScreen() { EmergencyEpisodeForQuickRegistrationVo voEmergencyEpisode = new EmergencyEpisodeForQuickRegistrationVo(); EmergencyAttendanceForQuickRegistrationVo voEmergencyAttendance = new EmergencyAttendanceForQuickRegistrationVo(); EmergencyAttendanceForQuickRegistrationVoCollection voCollEmergencyAttendance = new EmergencyAttendanceForQuickRegistrationVoCollection(); createNewCareSpell(); // Populate EmergencyDetails voEmergencyEpisode.setInjuryDateTime(form.dtimInjury().getValue()); voEmergencyEpisode.setSourceOfReferral(form.cmbSourceOfReferral().getValue()); voEmergencyEpisode.setEpisodeOfCare(form.getLocalContext().getepisodeToSave()); voEmergencyEpisode.setPatient(form.getLocalContext().getpatientToSave()); // Populate EmergencyAttendance voEmergencyAttendance.setArrivalDateTime(form.dtimArrival().getValue()); voEmergencyAttendance.setRegistrationDateTime(form.dtimArrival().getValue()); voEmergencyAttendance.setEmergencyEpisode(voEmergencyEpisode); voEmergencyAttendance.setCareContext(form.getLocalContext().getcareContextToSave()); voEmergencyAttendance.setEpisode(voEmergencyEpisode); voEmergencyAttendance.setPatient(form.getLocalContext().getpatientToSave()); voEmergencyAttendance.setAttendanceType(AttendanceType.FIRST); voEmergencyAttendance.setAgeAtAttendance(calculateAge()); voEmergencyAttendance.setRegistrationLocation(getLocation()); voEmergencyAttendance.setComments(form.txtComments().getValue()); //wdev-17463 //wdev-16070 if( domain.getMosUser() instanceof MemberOfStaffLiteVo ) { MemberOfStaffLiteVo tempVo = (MemberOfStaffLiteVo) domain.getMosUser(); voEmergencyAttendance.setRegisteringMOS(tempVo); } //WDEV-15959 if (QuickRegistrationType.UNC_UNK_PATIENT.equals(form.cmbRegistrationType().getValue()) ) { voEmergencyAttendance.setIsUnknownPatient(true); } else if (QuickRegistrationType.QUICK_REG.equals(form.cmbRegistrationType().getValue())) { voEmergencyAttendance.setIsQuickRegistration(true); } else if (QuickRegistrationType.EXP_ARRIVAL.equals(form.cmbRegistrationType().getValue())) { voEmergencyAttendance.setExpectedArrivalDateTime(form.dtimArrival().getValue()); voEmergencyAttendance.setIsExpectedArrival(true); } else if (QuickRegistrationType.MAJ_INCIDENT.equals(form.cmbRegistrationType().getValue())) { voEmergencyAttendance.setIsMajorIncident(true); } voCollEmergencyAttendance.add(voEmergencyAttendance); voEmergencyEpisode.setEmergencyAttendances(voCollEmergencyAttendance); form.getLocalContext().setemergencyEpisodeToSave(voEmergencyEpisode); form.getLocalContext().setemergencyAttendanceToSave(voEmergencyAttendance); return voEmergencyEpisode; }
private EmergencyEpisodeForQuickRegistrationVo populateDataFromScreen() { EmergencyEpisodeForQuickRegistrationVo voEmergencyEpisode = new EmergencyEpisodeForQuickRegistrationVo(); EmergencyAttendanceForQuickRegistrationVo voEmergencyAttendance = new EmergencyAttendanceForQuickRegistrationVo(); EmergencyAttendanceForQuickRegistrationVoCollection voCollEmergencyAttendance = new EmergencyAttendanceForQuickRegistrationVoCollection(); createNewCareSpell(); // Populate EmergencyDetails voEmergencyEpisode.setInjuryDateTime(form.dtimInjury().getValue()); voEmergencyEpisode.setSourceOfReferral(form.cmbSourceOfReferral().getValue()); voEmergencyEpisode.setEpisodeOfCare(form.getLocalContext().getepisodeToSave()); voEmergencyEpisode.setPatient(form.getLocalContext().getpatientToSave()); // Populate EmergencyAttendance voEmergencyAttendance.setArrivalDateTime(form.dtimArrival().getValue()); voEmergencyAttendance.setRegistrationDateTime(form.dtimArrival().getValue()); voEmergencyAttendance.setEndOfRegistrationDateTime(new DateTime()); //WDEV-19984 voEmergencyAttendance.setEmergencyEpisode(voEmergencyEpisode); voEmergencyAttendance.setCareContext(form.getLocalContext().getcareContextToSave()); voEmergencyAttendance.setEpisode(voEmergencyEpisode); voEmergencyAttendance.setPatient(form.getLocalContext().getpatientToSave()); voEmergencyAttendance.setAttendanceType(AttendanceType.FIRST); voEmergencyAttendance.setAgeAtAttendance(calculateAge()); voEmergencyAttendance.setRegistrationLocation(getLocation()); voEmergencyAttendance.setComments(form.txtComments().getValue()); //wdev-17463 //wdev-16070 if( domain.getMosUser() instanceof MemberOfStaffLiteVo ) { MemberOfStaffLiteVo tempVo = (MemberOfStaffLiteVo) domain.getMosUser(); voEmergencyAttendance.setRegisteringMOS(tempVo); } //WDEV-15959 if (QuickRegistrationType.UNC_UNK_PATIENT.equals(form.cmbRegistrationType().getValue()) ) { voEmergencyAttendance.setIsUnknownPatient(true); } else if (QuickRegistrationType.QUICK_REG.equals(form.cmbRegistrationType().getValue())) { voEmergencyAttendance.setIsQuickRegistration(true); } else if (QuickRegistrationType.EXP_ARRIVAL.equals(form.cmbRegistrationType().getValue())) { voEmergencyAttendance.setExpectedArrivalDateTime(form.dtimArrival().getValue()); voEmergencyAttendance.setIsExpectedArrival(true); } else if (QuickRegistrationType.MAJ_INCIDENT.equals(form.cmbRegistrationType().getValue())) { voEmergencyAttendance.setIsMajorIncident(true); } voCollEmergencyAttendance.add(voEmergencyAttendance); voEmergencyEpisode.setEmergencyAttendances(voCollEmergencyAttendance); form.getLocalContext().setemergencyEpisodeToSave(voEmergencyEpisode); form.getLocalContext().setemergencyAttendanceToSave(voEmergencyAttendance); return voEmergencyEpisode; }