Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        internal static DataTypes.Slot TranslateBusinessToService(BMS.Slot from)
        {
            DataTypes.Slot to = new DataTypes.Slot();

            to.Id            = from.Id;
            to.Provider      = ProviderTranslator.TranslateBusinessToService(from.Provider);
            to.ClinicType    = DirectoryTranslator.TranslateBusinessToService(from.ClinicType);
            to.StartDateTime = from.StartDateTime;
            to.EndDateTime   = from.EndDateTime;
            to.Ubrn          = from.Ubrn;
            to.Status        = (EAppointments.BMS.DataTypes.SlotStatus)from.Status;

            return(to);
        }