public AdmissionDetailsVo getNursingAdmission(CareContextLiteVo voCareContextLite) { if(voCareContextLite == null) throw new CodingRuntimeException("Contact not Provided"); DomainFactory factory = getDomainFactory(); //the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated List admisDetails = factory.find(" from AdmissionDetails ad where ad.careContext.id = :idCareContext )", new String[]{"idCareContext" }, new Object[]{ voCareContextLite.getID_CareContext()}); AdmissionDetailsVoCollection voAdmisDetails = AdmissionDetailsVoAssembler.createAdmissionDetailsVoCollectionFromAdmissionDetails(admisDetails); if(voAdmisDetails.size()>0) return voAdmisDetails.get(0); else return null; }