Esempio n. 1
0
        /// <summary>
        /// Returns true if survey was receieved. False otherwise.
        /// ActionItem is of form "NAME x Month Sent", where x is month number and NAME is from SurveyKey
        /// </summary>
        /// <param name="surveyName"></param>
        /// <param name="month"></param>
        /// <param name="patientId"></param>
        /// <returns></returns>
        private bool SurveyAlreadyReceived(string surveyName, int month, int patientId)
        {
            // retrieve action tiem
            string actionItem = FollowUpUtil.GetSurveyActionItem(surveyName, month.ToString());

            if (!String.IsNullOrEmpty(actionItem))
            {
                FollowUpDA da = new FollowUpDA();

                // if nothing returned, survey data has not been entered, therefore survey has not been received
                DataTable dt = da.GetSurveyByActionItem(patientId, actionItem);

                if (dt.Rows.Count > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Returns the date of the last survey sent that matches the ActionItem for this patient.
        /// ActionItem is of form "NAME x Month Sent"
        /// </summary>
        /// <param name="surveyShortType">Either "QOL" or "EPIC"</param>
        /// <param name="month"></param>
        /// <returns></returns>
        private DataTable GetThisLastSurveySentRecord(string surveyName, int month, int patientId)
        {
            string actionName = FollowUpUtil.GetSurveyActionItem(surveyName, month.ToString());

            FollowUpDA da = new FollowUpDA();
            DataTable  dt = da.GetThisLastSurveySent(patientId, actionName);

            return(dt);
        }
Esempio n. 3
0
        /// <summary>
        /// Returns true if survey was already sent. False otherwise.
        /// ActionItem is of form "NAME x Month Survey Sent", where x is month number and NAME is from SurveyKey
        /// </summary>
        /// <param name="surveyName"></param>
        /// <param name="month"></param>
        /// <returns></returns>
        private bool SurveyAlreadySent(string surveyName, int month, int patientId)
        {
            // 1. check Action to see if Action exists for this survey/month
            string actionName = FollowUpUtil.GetSurveyActionItem(surveyName, month.ToString());

            FollowUpDA da = new FollowUpDA();

            return(da.SurveyAlreadySent(patientId, actionName));
        }
Esempio n. 4
0
 /// <summary>
 /// Get action item to log for surveys or letters.
 /// </summary>
 /// <param name="formLongName">Names of surveys/letter</param>
 /// <param name="month">month survey due</param>
 /// <param name="isSurvey">true/false</param>
 /// <returns>the action item</returns>
 public static string GetActionItemToLog(int patientId, string month, string formLongName, bool isSurvey)
 {
     if (isSurvey)
     {
         return(FollowUpUtil.GetSurveyActionItem(formLongName, month));
     }
     else // a follow up letter
     {
         return(GetLetterActionItem(formLongName, month, patientId));
     }
 }