private AdmissionType getAdmissionType() { // TODO Auto-generated method stub return null; }
public Boolean saveAdmissionAndUpdateList(AdmissionDetailVo admissionDetail, WardStayVo wardStay, ConsultantStayVo consultantStay, CareSpellAdmitVo careSpell, CatsReferralEmergencyAdmissionVo referral, Object selectedAdmissionData, PatientCaseNoteTransferVoCollection caseNoteTransfers) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException { // AdmissionDetail domAdmissionDetail = AdmissionDetailShortVoAssembler.extractAdmissionDetail(getDomainFactory(), admissionDetail); // getDomainFactory().save(domAdmissionDetail); // AdmissionDetailVo admissionDetails = AdmissionDetailVoAssembler.create(domAdmissionDetail); // admissionDetails.validate(); PendingElectiveAdmissionAdmitVo pendingBookedElectiveAdmission = selectedAdmissionData instanceof PendingElectiveAdmissionAdmitVo ? (PendingElectiveAdmissionAdmitVo) selectedAdmissionData : null; PendingEmergencyAdmissionAdmitVo pendingEDEmergency = selectedAdmissionData instanceof PendingEmergencyAdmissionAdmitVo ? (PendingEmergencyAdmissionAdmitVo) selectedAdmissionData : null; PendingElectiveAdmissionAdmitVo pendingElectiveAdmission = selectedAdmissionData instanceof PendingElectiveAdmissionAdmitVo ? (PendingElectiveAdmissionAdmitVo) selectedAdmissionData : null; CatsReferralPendingEmergencyNonEDAdmissionListVo pendingEmergencyAdmission = selectedAdmissionData instanceof CatsReferralPendingEmergencyNonEDAdmissionListVo ? (CatsReferralPendingEmergencyNonEDAdmissionListVo) selectedAdmissionData : null; PatientElectiveListBedAdmissionVo patientTCI_ElectiveList = selectedAdmissionData instanceof PatientElectiveListBedAdmissionVo ? (PatientElectiveListBedAdmissionVo) selectedAdmissionData : null; AdmissionType admissionType = AdmissionType.EMERGENCY; BedAdmissionComponent impl = (BedAdmissionComponent) getDomainImpl(BedAdmissionComponentImpl.class); if (Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue()) && selectedAdmissionData instanceof PatientElectiveListBedAdmissionVo) { PatientElectiveListBedAdmissionVo electiveAdmission = impl.saveTCIAdmissionAndUpdateList(patientTCI_ElectiveList, null, wardStay, consultantStay, null, null, null, caseNoteTransfers); impl.createCaseNoteRequests(electiveAdmission); } // else if (Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue()) && selectedAdmissionData instanceof PatientLite_IdentifiersVo) // { // CareSpellVo careSpell = createCareSpell((PatientLite_IdentifiersVo) selectedAdmissionData, admissionDetail.getPasEvent(), admissionDetail.getAdmissionDateTime(), admissionDetail.getConsultant(), admissionDetail.getService()); // CatsReferralEmergencyAdmissionVo catsReferral = createCatsReferral((PatientLite_IdentifiersVo) selectedAdmissionData, admissionDetail, careSpell); // // impl.saveEmergencyAdmissionInElectiveCase(admissionDetail, // Admission Detail // careSpell, // Care Spell // catsReferral, // Cats Referral // null, // Bed Space State - null when Admitting to Ward // wardStay, // Ward Stay // consultantStay, // Consultant Stay // null, // Admission Reason // null, // Ward Mixed Sex Breach // null, // Ward Bay Config // caseNoteTransfers); // Patient Case Note Transfer // } else { impl.saveAdmissionAndUpdateList(admissionDetail, // Admission Detail null, // Bed Space State - null when Admitting to Ward careSpell, referral, wardStay, // Ward Stay consultantStay, // Consultant Stay pendingBookedElectiveAdmission, // Pending Elective Admission - Planned (Booked) pendingEDEmergency, // Pending Emergency Admission - ED pendingElectiveAdmission, // Pending Elective Admission - (TCI) pendingEmergencyAdmission, // Pending Emergency Admission - Non ED admissionType, // Admission Type null, // Admission Reason null, // Ward Mixed Sex Breach null, // Ward Bay Config caseNoteTransfers); // Patient Case Note Transfer } //WDEV-21973 make sure patient has a Case Note Folder impl.createCaseNoteFolderIfNone(admissionDetail.getPasEvent().getPatient()); return true; }