Example #1
0
        public int AppointmentAbsent(AppointmentModel appointmentModel)
        {
            int result = 0;

            try
            {
                //Change Appointment Status to absent
                PractitionerData dataLayer = new PractitionerData();
                AppointmentModel model     = new AppointmentModel();
                model = dataLayer.AppointmentAbsent(appointmentModel);

                if (!model.PatientId.Equals(Guid.Empty))
                {
                    //Get PatientId to retrieve email
                    PatientData patientDataLayer    = new PatientData();
                    string      patientEmailAddress = patientDataLayer.GetPatientEmail(model.PatientId);
                    result = SentAppointmentAbsentNotificationEmail(patientEmailAddress, model.AppointmentDateString, model.AppointmentTimeString);
                }
            }
            catch (Exception err)
            {
                new LogHelper().LogMessage("PractitionerBusiness.AppointmentAbsent : " + err);
            }

            return(result);
        }