Ejemplo n.º 1
0
        private void butBodyFields_Click(object sender, EventArgs e)
        {
            FormMessageReplacements FormMR = new FormMessageReplacements(
                MessageReplaceType.Appointment | MessageReplaceType.Office | MessageReplaceType.Patient | MessageReplaceType.User | MessageReplaceType.Misc);

            FormMR.IsSelectionMode = true;
            FormMR.ShowDialog();
            if (FormMR.DialogResult == DialogResult.OK)
            {
                textBodyText.SelectedText = FormMR.Replacement;
            }
        }
Ejemplo n.º 2
0
        private void butReplacements_Click(object sender, EventArgs e)
        {
            FormMessageReplacements formMR = new FormMessageReplacements(MessageReplaceType.Patient | MessageReplaceType.Referral);

            formMR.IsSelectionMode = true;
            formMR.ShowDialog();
            if (formMR.DialogResult != DialogResult.OK)
            {
                return;
            }
            textTemplate.Focus();
            int cursorIndex = textTemplate.SelectionStart;

            textTemplate.Text           = textTemplate.Text.Insert(cursorIndex, formMR.Replacement);
            textTemplate.SelectionStart = cursorIndex + formMR.Replacement.Length;
        }
Ejemplo n.º 3
0
        /// <summary>Opens FormMessageReplacements to allow the user to select from replaceable tags to include in the templates.</summary>
        private void WebSchedVerify_ContextMenuReplacementsClick(object sender, EventArgs e)
        {
            ToolStripItem    item    = (ToolStripItem)sender;
            ContextMenuStrip menu    = (ContextMenuStrip)item.Owner;
            TextBox          textBox = ((TextBox)menu.SourceControl);
            //PHI is not supposed to be communicated via text message.
            bool allowPHI = (!textBox.Name.In(textRecallTextTemplate.Name, textNewPatTextTemplate.Name, textASAPTextTemplate.Name));
            FormMessageReplacements FormMR = new FormMessageReplacements(
                MessageReplaceType.Appointment | MessageReplaceType.Office | MessageReplaceType.Patient, allowPHI);

            FormMR.IsSelectionMode = true;
            FormMR.ShowDialog();
            if (FormMR.DialogResult == DialogResult.OK)
            {
                textBox.SelectedText = FormMR.Replacement;
            }
        }
Ejemplo n.º 4
0
        private void butReplacements_Click(object sender, EventArgs e)
        {
            //Copied from FormModuleSetup.
            FormMessageReplacements form = new FormMessageReplacements(MessageReplaceType.Patient);

            form.IsSelectionMode = true;
            form.ShowDialog();
            if (form.DialogResult != DialogResult.OK)
            {
                return;
            }
            textClaimIdentifier.Focus();
            int cursorIndex = textClaimIdentifier.SelectionStart;

            textClaimIdentifier.Text           = textClaimIdentifier.Text.Insert(cursorIndex, form.Replacement);
            textClaimIdentifier.SelectionStart = cursorIndex + form.Replacement.Length;
        }
Ejemplo n.º 5
0
		///<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);
		}
Ejemplo n.º 6
0
        public void LoadTemplate(string subject, string bodyText, List <EmailAttach> attachments)
        {
            List <Appointment> listApts = Appointments.GetFutureSchedApts(PatNum);
            Appointment        aptNext  = null;

            if (listApts.Count > 0)
            {
                aptNext = listApts[0];               //next sched appt. If none, null.
            }
            Clinic clinic = Clinics.GetClinic(ClinicNum);

            Subject = subject;
            //patient information
            Subject = Patients.ReplacePatient(Subject, _patCur);
            //Next Scheduled Appointment Information
            Subject = Appointments.ReplaceAppointment(Subject, aptNext);          //handles null nextApts.
            //Currently Logged in User Information
            Subject = FormMessageReplacements.ReplaceUser(Subject, Security.CurUser);
            //Clinic Information
            Subject = Clinics.ReplaceOffice(Subject, clinic);
            //Misc Information
            Subject  = FormMessageReplacements.ReplaceMisc(Subject);
            BodyText = bodyText;
            //patient information
            BodyText = Patients.ReplacePatient(BodyText, _patCur);
            //Next Scheduled Appointment Information
            BodyText = Appointments.ReplaceAppointment(BodyText, aptNext);          //handles null nextApts.
            //Currently Logged in User Information
            BodyText = FormMessageReplacements.ReplaceUser(BodyText, Security.CurUser);
            //Clinic Information
            BodyText = Clinics.ReplaceOffice(BodyText, clinic);
            //Misc Information
            BodyText = FormMessageReplacements.ReplaceMisc(BodyText);
            _emailMessage.Attachments.AddRange(attachments);
            FillAttachments();
            _hasMessageChanged = false;
        }