internal static BMS.Appointment TranslateServiceToBusiness(DataTypes.Appointment from) { Application application = Helper.GetApplication(); BMS.Patient patient = (BMS.Patient)application.FindPatientById(from.Patient.Id); BMS.Referrer referrer = null; if (from.Referrer == null) { referrer = patient.ReferringClinician; } else { referrer = (BMS.Referrer)application.FindReferrerById(from.Referrer.Id); } BMS.Provider provider = (BMS.Provider)application.FindProviderById(from.Provider.Id); BMS.ClinicType clinicType = (BMS.ClinicType)application.FindClinicTypeById(from.ClinicType.Id); EAppointments.BMS.Appointment to = application.NewAppointment( patient, referrer, provider, clinicType ); return(to); }
internal static DataTypes.ClinicType TranslateBusinessToService(BMS.ClinicType from) { DataTypes.ClinicType to = new EAppointments.BMS.DataTypes.ClinicType(); to.Id = from.Id; to.Name = from.Name; to.Specialty = TranslateBusinessToService(from.Parent); return(to); }