internal static BMS.AppointmentSearchCriteria TranslateSearchCriteria(DataTypes.AppointmentSearchCriteria from)
        {
            BMS.AppointmentSearchCriteria to = new BMS.AppointmentSearchCriteria(from.Ubrn);
            to.PatientId   = from.PatientId;
            to.ProviderId  = from.ProviderId;
            to.ReferrerId  = from.ReferrerId;
            to.StartDate   = from.StartDateTime;
            to.EndDate     = from.EndDateTime;
            to.CreatedDate = from.CreatedDateTime;
            to.Status      = from.Status;
            to.WorkflowId  = from.WorkflowId;

            return(to);
        }
Example #2
0
        public AppointmentCollection Find(DataTypes.AppointmentSearchCriteria criteria)
        {
            if (criteria == null)
            {
                throw new ArgumentNullException("criteria");
            }

            BMS.AppointmentSearchCriteria businessCriteria = AppointmentTranslator.TranslateSearchCriteria(criteria);

            List <BMS.Appointment> businessAppointments = new List <BMS.Appointment>(Helper.GetApplication().Find(businessCriteria));

            return(new AppointmentCollection(businessAppointments.ConvertAll <DataTypes.Appointment>(
                                                 new Converter <BMS.Appointment, DataTypes.Appointment> (AppointmentTranslator.TranslateBusinessToService)
                                                 )));
        }