public AppointmentHitchayvutModel ConvertEntityToModel(appointment_hitchayvut entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var model = new AppointmentHitchayvutModel()
            {
                Id            = entity.id,
                AppointmentId = entity.appointmentId,
                Hitchayvut    = entity.hitchayvut == null ? null : _hitchayvutService.ConvertEntityToModel(entity.hitchayvut)
            };

            return(model);
        }
        public AppointmentTestModel ConvertEntityToModel(appointment_test entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var model = new AppointmentTestModel()
            {
                Id                    = entity.id,
                AppointmentId         = (int)entity.appointmentId,
                ExternalAppointmentId = entity.externalAppointmentId == null ? -1 : (int)entity.externalAppointmentId,
                MachineId             = entity.machineId == null ? -1 : (int)entity.machineId,
                Kupah                 = entity.kupah == null ? null : new KupahModelConcise {
                    Id = entity.kupah.id, Name = entity.kupah.name.Trim()
                },
                Room = entity.room == null ? null : new RoomModel {
                    Id = entity.room.id, Name = entity.room.name.Trim()
                },
                Hitchayvut = entity.hitchayvut == null ? null : _hitchayvutService.ConvertEntityToModel(entity.hitchayvut),
                Language   = entity.language == null ? null : new LanguageModel {
                    Id = entity.language.id, Name = entity.language.name.Trim()
                },
                Test = entity.test == null ? null : new TestModel {
                    Id = entity.test.id, Name = entity.test.name.Trim()
                },
                Notes    = entity.notes,
                NotesRtf = entity.notesRtf,
            };

            return(model);
        }