//assessment template dropdown protected void cboATemplates_SelectedIndexChanged(object sender, EventArgs e) { //add the template text to the note... if (cboATemplates.SelectedValue != "") { CTemplate template = new CTemplate(); string strParsedTemplate = template.GetParsedTemplateText2(BaseMstr, BaseMstr.SelectedPatientID, BaseMstr.SelectedEncounterID, Convert.ToInt32(cboATemplates.SelectedValue)); txtAssessment.Text = txtAssessment.Text + strParsedTemplate; cboATemplates.ClearSelection(); } }
/// <summary> /// encounter template change /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void cboEncounterTemplates_OnSelectedIndexChanged(object sender, EventArgs e) { CTemplate template = new CTemplate(); if (cboEncounterTemplates.SelectedIndex > 0) { long lGroupID = Convert.ToInt32(cboEncounterTemplates.SelectedValue); DataSet dsTemplates = template.GetGroupTemplatesDS(BaseMstr, lGroupID); foreach (DataTable dt in dsTemplates.Tables) { foreach (DataRow dr in dt.Rows) { if (!dr.IsNull("TEMPLATE_ID")) { string strTemplateID = dr["TEMPLATE_ID"].ToString(); //set SUBJECTIVE templates dropdown foreach (ListItem li in cboSTemplates.Items) { if (li.Value == strTemplateID) { string strParsedTemplate = template.GetParsedTemplateText2(BaseMstr, BaseMstr.SelectedPatientID, BaseMstr.SelectedEncounterID, Convert.ToInt32(strTemplateID)); txtSubjective.Text = strParsedTemplate; } } //set OBJECTIVE templates dropdown foreach (ListItem li in cboOTemplates.Items) { if (li.Value == strTemplateID) { string strParsedTemplate = template.GetParsedTemplateText2(BaseMstr, BaseMstr.SelectedPatientID, BaseMstr.SelectedEncounterID, Convert.ToInt32(strTemplateID)); txtObjective.Text = strParsedTemplate; } } //set ASSESSMENT / PLAN templates dropdown foreach (ListItem li in cboATemplates.Items) { if (li.Value == strTemplateID) { string strParsedTemplate = template.GetParsedTemplateText2(BaseMstr, BaseMstr.SelectedPatientID, BaseMstr.SelectedEncounterID, Convert.ToInt32(strTemplateID)); txtAssessment.Text = strParsedTemplate; } } } } } } }