/// <summary> /// Deprecated Method for adding a new object to the payNewPatientContacts EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTopayNewPatientContacts(payNewPatientContacts payNewPatientContacts) { base.AddObject("payNewPatientContacts", payNewPatientContacts); }
public bool PatientContactSave(int patientId, string employee, string whatHappened, string notes, bool isDND, bool isIneligible, bool isCallback, bool isApptMade, DateTime? callBackDateTime, DateTime? apptDateTime) { try { chsi.dat.CHSIEntities db = new chsi.dat.CHSIEntities(); string details = ""; chsi.dat.payNewPatientContacts c = new chsi.dat.payNewPatientContacts(); c.payNewPatientId = patientId; c.ContactDate = DateTime.Now; c.EmployeeName = employee; switch (whatHappened.ToLower().Trim()) { case "phonenoanswer": c.isPhoneNoAnswer = true; break; case "phoneanswer": c.isPhoneAnswered = true; break; case "phoneleftmessage": c.isPhoneLeftMessage = true; break; case "phonebusy": c.isPhoneBusy = true; break; case "phonewrongnumber": c.isPhoneWrongNumber = true; break; case "phonedisconnected": c.isPhoneDisconnected = true; break; case "postcardsent": c.isPostCardSent = true; break; } c.isDoNotDisturbRequested = isDND; c.isIneligible = isIneligible; c.isRequestCallBack = isCallback; c.isApptMade = isApptMade; if (isCallback) { c.CallBack = callBackDateTime; DateTime dt = (DateTime)callBackDateTime; details = string.Format("Callback requested for {0} {1}{2}", dt.ToShortDateString(), (dt.Hour > 0 ? dt.ToShortTimeString() : ""), Environment.NewLine); } if (isApptMade) { c.Appt = apptDateTime; DateTime dt = (DateTime)apptDateTime; details = string.Format("Appointment made for {0} {1}{2}", dt.ToShortDateString(), (dt.Hour > 0 ? dt.ToShortTimeString() : ""), Environment.NewLine); } if (isDND) { details += "Patient requests Do Not Disturb" + Environment.NewLine; } if (isIneligible) { details += "Patient is inelibible" + Environment.NewLine; } details += notes; c.Details = details; db.AddTopayNewPatientContacts(c); db.SaveChanges(); return true; } catch (Exception e) { } return false; }
/// <summary> /// Create a new payNewPatientContacts object. /// </summary> /// <param name="contactID">Initial value of the ContactID property.</param> /// <param name="payNewPatientId">Initial value of the payNewPatientId property.</param> /// <param name="contactDate">Initial value of the ContactDate property.</param> /// <param name="isPhoneNoAnswer">Initial value of the isPhoneNoAnswer property.</param> /// <param name="isPhoneAnswered">Initial value of the isPhoneAnswered property.</param> /// <param name="isPhoneLeftMessage">Initial value of the isPhoneLeftMessage property.</param> /// <param name="isPostCardSent">Initial value of the isPostCardSent property.</param> /// <param name="isDoNotDisturbRequested">Initial value of the isDoNotDisturbRequested property.</param> /// <param name="isPhoneWrongNumber">Initial value of the isPhoneWrongNumber property.</param> /// <param name="isPhoneBusy">Initial value of the isPhoneBusy property.</param> /// <param name="isPhoneDisconnected">Initial value of the isPhoneDisconnected property.</param> /// <param name="isIneligible">Initial value of the isIneligible property.</param> /// <param name="isApptMade">Initial value of the isApptMade property.</param> /// <param name="isRequestCallBack">Initial value of the isRequestCallBack property.</param> public static payNewPatientContacts CreatepayNewPatientContacts(global::System.Int32 contactID, global::System.Int32 payNewPatientId, global::System.DateTime contactDate, global::System.Boolean isPhoneNoAnswer, global::System.Boolean isPhoneAnswered, global::System.Boolean isPhoneLeftMessage, global::System.Boolean isPostCardSent, global::System.Boolean isDoNotDisturbRequested, global::System.Boolean isPhoneWrongNumber, global::System.Boolean isPhoneBusy, global::System.Boolean isPhoneDisconnected, global::System.Boolean isIneligible, global::System.Boolean isApptMade, global::System.Boolean isRequestCallBack) { payNewPatientContacts payNewPatientContacts = new payNewPatientContacts(); payNewPatientContacts.ContactID = contactID; payNewPatientContacts.payNewPatientId = payNewPatientId; payNewPatientContacts.ContactDate = contactDate; payNewPatientContacts.isPhoneNoAnswer = isPhoneNoAnswer; payNewPatientContacts.isPhoneAnswered = isPhoneAnswered; payNewPatientContacts.isPhoneLeftMessage = isPhoneLeftMessage; payNewPatientContacts.isPostCardSent = isPostCardSent; payNewPatientContacts.isDoNotDisturbRequested = isDoNotDisturbRequested; payNewPatientContacts.isPhoneWrongNumber = isPhoneWrongNumber; payNewPatientContacts.isPhoneBusy = isPhoneBusy; payNewPatientContacts.isPhoneDisconnected = isPhoneDisconnected; payNewPatientContacts.isIneligible = isIneligible; payNewPatientContacts.isApptMade = isApptMade; payNewPatientContacts.isRequestCallBack = isRequestCallBack; return payNewPatientContacts; }