internal static DataTypes.Appointment TranslateBusinessToService(BMS.Appointment from)
        {
            DataTypes.Appointment to = new DataTypes.Appointment();
            to.Ubrn               = from.Ubrn;
            to.StartDateTime      = from.StartDateTime;
            to.EndDateTime        = from.EndDateTime;
            to.CreatedDateTime    = from.CreatedDateTime;
            to.UpdatedDateTime    = from.UpdatedDateTime;
            to.CancelledDateTime  = from.CancelledDateTime;
            to.CancellationReason = from.CancellationReason;
            to.Referrer           = DirectoryTranslator.TranslateBusinessToService(from.Referrer);
            to.Patient            = DirectoryTranslator.TranslateBusinessToService(from.Patient);
            to.Provider           = ProviderTranslator.TranslateBusinessToService(from.Provider);
            to.ClinicType         = DirectoryTranslator.TranslateBusinessToService(from.ClinicType);

            to.Status       = (DataTypes.AppointmentStatus)from.Status;
            to.Comments     = from.Comments;
            to.ReminderDate = from.ReminderDate;
            to.WorkflowId   = from.WorkflowId;
            if (from.CancelledBy != null)
            {
                to.CancelledById = from.CancelledBy.Id;
            }
            if (from.Slot != null)
            {
                to.Slot = SlotTranslator.TranslateBusinessToService(from.Slot);
            }

            return(to);
        }
        internal static BMS.Appointment TranslateServiceToBusiness(DataTypes.Appointment from, BMS.Appointment to)
        {
            to.Comments     = from.Comments;
            to.ReminderDate = from.ReminderDate;
            to.WorkflowId   = from.WorkflowId;

            return(to);
        }