Example #1
0
        ///<summary>Helper method that replaces the message with all of the Message Replacements available for ProgramLinks.</summary>
        private static string ReplaceHelper(string message, Patient pat)
        {
            string retVal = message;

            retVal = Patients.ReplacePatient(retVal, pat);
            retVal = Patients.ReplaceGuarantor(retVal, pat);
            retVal = Referrals.ReplaceRefProvider(retVal, pat);
            return(retVal);
        }
		///<summary></summary>
		public static string ReplaceTemplateFields(string templateText,Patient pat,Appointment aptNext,Clinic clinic) {
			//patient information
			templateText=Patients.ReplacePatient(templateText,pat);
			//Guarantor Information
			templateText=Patients.ReplaceGuarantor(templateText,pat);
			//Family Information
			templateText=Family.ReplaceFamily(templateText,pat);
			//Next Scheduled Appointment Information
			templateText=Appointments.ReplaceAppointment(templateText,aptNext); //handles null nextApts.
			//Currently Logged in User Information
			templateText=FormMessageReplacements.ReplaceUser(templateText,Security.CurUser);
			//Clinic Information
			templateText=Clinics.ReplaceOffice(templateText,clinic);
			//Misc Information
			templateText=FormMessageReplacements.ReplaceMisc(templateText);
			//Referral Information
			templateText=Referrals.ReplaceRefProvider(templateText,pat);
			//Recall Information
			return Recalls.ReplaceRecall(templateText,pat);
		}