private void FillFunctionalStatusContent(PatientClinicalInformation patientinfo, III hl7III, Factory hl7factory) { if (patientinfo.ptFunctionalStatus.Count > 0) { managetable = new GenerateTableBodyStructure(); DataArr.Add("Functional Condition"); DataArr.Add("Effective Dates"); DataArr.Add("Condition Status"); tble = hl7factory.CreateStrucDocTable(); thead = tble.Thead; tbody = tble.Tbody.Append(); tr = thead.Tr.Append(); managetable.CreateTableHeader(DataArr, hl7factory, tble, thead, tr); //ArrayList alleries = new ArrayList(patientinfo.ptAllergies.ptAllergies); int i = 0; foreach (var item in patientinfo.ptFunctionalStatus) { DataArr = new ArrayList(); content = hl7factory.CreateStrucDocContent(); content.XmlId = "functional" + (i + 1); content.Items.Add(item.Description); DataArr.Add(content); DataArr.Add(item.StatusDate.ToString()); DataArr.Add("Active"); managetable.CreateTableBody(DataArr, hl7factory, tble, tbody, tr); GenerateFunctionalStatusEntry(item, i, hl7III, hl7factory); i++; } functionalStatus.Section.Text.Items.Add(tble); } else { CreateFunctionalStatusEmptyEntry(hl7III, hl7factory); } }
private void FillSocialHistoryContent(SocialHistoryModel ptSocialHistory, Factory hl7factory) { if (ptSocialHistory != null) { managetable = new GenerateTableBodyStructure(); DataArr = new ArrayList(); DataArr.Add("Social History Element"); DataArr.Add("Description"); DataArr.Add("Effective Dates"); tble = hl7factory.CreateStrucDocTable(); thead = tble.Thead; tbody = tble.Tbody.Append(); tr = thead.Tr.Append(); managetable.CreateTableHeader(DataArr, hl7factory, tble, thead, tr); //isExistTbody = "false"; int i = 1; ///' Smoking Status '''' if (ptSocialHistory != null && !string.IsNullOrEmpty(ptSocialHistory.Smoker)) { SocialHistoryTRFill(ref i, ptSocialHistory.Smoker, "Smoking", Convert.ToDateTime(ptSocialHistory.EntryDate), hl7factory, tble, tbody, tr); //isExistTbody = "true"; } if (ptSocialHistory != null) { if (!string.IsNullOrEmpty(ptSocialHistory.Alcohol)) { SocialHistoryTRFill(ref i, ptSocialHistory.Alcohol, "Alcohol consumption", Convert.ToDateTime(ptSocialHistory.EntryDate), hl7factory, tble, tbody, tr); //isExistTbody = "true"; } if (!string.IsNullOrEmpty(ptSocialHistory.Drugs)) { SocialHistoryTRFill(ref i, ptSocialHistory.Drugs, "Drug consumption", Convert.ToDateTime(ptSocialHistory.EntryDate), hl7factory, tble, tbody, tr); //isExistTbody = "true"; } if (!string.IsNullOrEmpty(ptSocialHistory.Tobacoo)) { SocialHistoryTRFill(ref i, ptSocialHistory.Tobacoo, "Tobacoo consumption", Convert.ToDateTime(ptSocialHistory.EntryDate), hl7factory, tble, tbody, tr); //isExistTbody = "true"; } } functionalStatus.Section.Text.Items.Add(tble); } else { contentItem = hl7factory.CreateStrucDocContent(); contentItem.Items.Add("Social History N/A"); functionalStatus.Section.Text.Items.Add(contentItem); } }
private void FillImmunizationContent(PatientClinicalInformation patientinfo, Factory hl7factory, III hl7III) { if (patientinfo.ptPlanOfCare.Count > 0) { managetable = new GenerateTableBodyStructure(); DataArr.Add("Planned Activity"); DataArr.Add("Planned Date"); tble = hl7factory.CreateStrucDocTable(); thead = tble.Thead; tbody = tble.Tbody.Append(); tr = thead.Tr.Append(); managetable.CreateTableHeader(DataArr, hl7factory, tble, thead, tr); //ArrayList alleries = new ArrayList(patientinfo.ptAllergies.ptAllergies); string isExistTbody = "false"; int i = 0; foreach (var item in patientinfo.ptPlanOfCare) { DataArr = new ArrayList(); DataArr.Add("Goal: " + item.Goal + ", Instructions: " + item.Instructions); DataArr.Add(Convert.ToString(item.PlannedDate)); //CreateTableTd(DataArr); isExistTbody = "true"; managetable.CreateTableBody(DataArr, hl7factory, tble, tbody, tr); var entry = functionalStatus.Section.Entry.Append(); entry.TypeCode = x_ActRelationshipEntry.DRIV; entry.AsAct.ClassCode = 0; entry.AsAct.MoodCode = 0; hl7III = entry.AsAct.TemplateId.Append(); hl7III.Init("2.16.840.1.113883.10.20.22.4.20"); hl7III = entry.AsAct.Id.Append(); hl7III.Init(Guid.NewGuid().ToString()); entry.AsAct.Code.Code = "409073007"; entry.AsAct.Code.DisplayName = "instruction"; entry.AsAct.Code.CodeSystem = "2.16.840.1.113883.6.96"; entry.AsAct.Text.Text = "Goal: " + item.Goal + ", Instructions: " + item.Instructions; entry.AsAct.StatusCode.Code = "completed"; i++; } functionalStatus.Section.Text.Items.Add(tble); //managetable.CreateTableBody(alleries, hl7factory); } else { managetable.CreateTableBody1("2", hl7factory, tble, tbody, tr); //Empty Body Entry } }
private void FillImmunizationContent(PatientClinicalInformation patientinfo, Factory hl7factory) { if (patientinfo.ptAllergies.Count > 0) { managetable = new GenerateTableBodyStructure(); DataArr.Add("Vaccine"); DataArr.Add("Date"); DataArr.Add("Status"); tble = hl7factory.CreateStrucDocTable(); thead = tble.Thead; tbody = tble.Tbody.Append(); tr = thead.Tr.Append(); managetable.CreateTableHeader(DataArr, hl7factory, tble, thead, tr); //ArrayList alleries = new ArrayList(patientinfo.ptAllergies.ptAllergies); int i = 0; foreach (var item in patientinfo.ptImmunization) { DataArr = new ArrayList(); //DataArr.Add(Convert.ToString(item.substance)); content = hl7factory.CreateStrucDocContent(); content.XmlId = "immun" + (i + 1); content.Items.Add(item.Vaccine != null? item.Vaccine:""); DataArr.Add(content); if (!String.IsNullOrEmpty(item.ApproximateDate.ToString())) { DataArr.Add(string.Format("{0:MMM yyyy}", Convert.ToDateTime(item.ApproximateDate).ToString())); } else { DataArr.Add(string.Format("{0:MMM yyyy}", Convert.ToDateTime(DateTime.Now).ToString())); } DataArr.Add("Completed"); managetable.CreateTableBody(DataArr, hl7factory, tble, tbody, tr); i++; } functionalStatus.Section.Text.Items.Add(tble); //managetable.CreateTableBody(alleries, hl7factory); } else { IStrucDocParagraph paragraph = hl7factory.CreateStrucDocParagraph(); paragraph.Items.Add("N/A"); functionalStatus.Section.Text.Items.Add(paragraph); } }
private void FillAppointmentContent(PatientClinicalInformation patientinfo, Factory hl7factory, III hl7III) { if (patientinfo.ptAppointment.Count > 0) { managetable = new GenerateTableBodyStructure(); paragraph = hl7factory.CreateStrucDocParagraph(); paragraph.Items.Add("Future Appointment"); functionalStatus.Section.Text.Items.Add(paragraph); DataArr = new ArrayList(); DataArr.Add("Date"); DataArr.Add("Provider Name"); tble = hl7factory.CreateStrucDocTable(); thead = tble.Thead; tbody = tble.Tbody.Append(); tr = thead.Tr.Append(); managetable.CreateTableHeader(DataArr, hl7factory, tble, thead, tr); //ArrayList alleries = new ArrayList(patientinfo.ptAllergies.ptAllergies); string isExistTbody = "false"; int i = 0; foreach (var item in patientinfo.ptAppointment) { DataArr = new ArrayList(); DataArr.Add(Convert.ToString(item.AppointmentDate)); DataArr.Add(item.DoctorName); managetable.CreateTableBody(DataArr, hl7factory, tble, tbody, tr); isExistTbody = "true"; i++; } if (isExistTbody == "false") { managetable.CreateTableBody1("2", hl7factory, tble, tbody, tr); //Empty Body Entry } functionalStatus.Section.Text.Items.Add(tble); //managetable.CreateTableBody(alleries, hl7factory); } else { paragraph = hl7factory.CreateStrucDocParagraph(); paragraph.Items.Add("N/A"); functionalStatus.Section.Text.Items.Add(paragraph); } }
private void FillAllergiesContent(PatientClinicalInformation patientinfo, Factory hl7factory) { if (patientinfo.ptAllergies.Count > 0) { managetable = new GenerateTableBodyStructure(); ArrayList DataArr = new ArrayList(); DataArr.Add("Substance"); DataArr.Add("Reaction"); DataArr.Add("Status"); DataArr.Add("Date"); tble = hl7factory.CreateStrucDocTable(); thead = tble.Thead; tbody = tble.Tbody.Append(); tr = thead.Tr.Append(); managetable.CreateTableHeader(DataArr, hl7factory, tble, thead, tr); //ArrayList alleries = new ArrayList(patientinfo.ptAllergies.ptAllergies); int i = 0; foreach (var item in patientinfo.ptAllergies) { DataArr = new ArrayList(); DataArr.Add(Convert.ToString(item.substance)); content = hl7factory.CreateStrucDocContent(); content.XmlId = "reaction" + (i + 1); content.Items.Add(item.reaction); DataArr.Add(content); DataArr.Add(item.status); DataArr.Add(item.reaction); managetable.CreateTableBody(DataArr, hl7factory, tble, tbody, tr); i++; } functionalStatus.Section.Text.Items.Add(tble); //managetable.CreateTableBody(alleries, hl7factory); } else { IStrucDocParagraph paragraph = hl7factory.CreateStrucDocParagraph(); paragraph.Items.Add("N/A"); functionalStatus.Section.Text.Items.Add(paragraph); } }
private void FillEncounterContent(PatientClinicalInformation patientinfo, III hl7III, Factory hl7factory) { if (patientinfo.ptEncounters.Count > 0) { managetable = new GenerateTableBodyStructure(); DataArr.Add("Encounter"); DataArr.Add("Performer"); DataArr.Add("Location"); DataArr.Add("Date"); tble = hl7factory.CreateStrucDocTable(); thead = tble.Thead; tbody = tble.Tbody.Append(); tr = thead.Tr.Append(); managetable.CreateTableHeader(DataArr, hl7factory, tble, thead, tr); //ArrayList alleries = new ArrayList(patientinfo.ptAllergies.ptAllergies); int i = 0; foreach (var item in patientinfo.ptEncounters) { DataArr = new ArrayList(); //content = hl7factory.CreateStrucDocContent(); //content.XmlId = "encounter" + (i + 1); //content.Items.Add(item.EncounterDescription); DataArr.Add(item.EncounterDescription); DataArr.Add(item.PerformerName); DataArr.Add(patientinfo.ptClinicInformation.ClinicName); DataArr.Add(string.Format("{0:MM/dd/yyyy}", item.EncounterDate)); managetable.CreateTableBody(DataArr, hl7factory, tble, tbody, tr); GenerateEncounterEntry(item, patientinfo, i, hl7III, hl7factory); i++; } functionalStatus.Section.Text.Items.Add(tble); } else { CreateEncounterEmptyEntry(hl7III, hl7factory); } }
public void SocialHistoryTRFill(ref int Id, string value, string description, DateTime EffectiveDate, Factory hl7factory, IStrucDocTable tble, IStrucDocTbody tbody, IStrucDocTr tr) { content = hl7factory.CreateStrucDocContent(); content.XmlId = "Sec" + Id; content.Items.Add(description); DataArr = new ArrayList(); DataArr.Add(content); DataArr.Add(value); DataArr.Add(Convert.ToString(EffectiveDate)); managetable.CreateTableBody(DataArr, hl7factory, tble, tbody, tr); Id = Id + 1; }
private void FillVitalSignsContent(PatientClinicalInformation patientinfo, Factory hl7Factory) { if (patientinfo.ptVitalSigns.Count > 0) { managetable = new GenerateTableBodyStructure(); DataArr = new ArrayList(); DataArr.Add("Date / Time:"); var arrVitalSign = patientinfo.ptVitalSigns; foreach (var vitalSign in arrVitalSign) { DataArr.Add(Convert.ToString(vitalSign.Entrydate)); } tble = hl7Factory.CreateStrucDocTable(); thead = tble.Thead; tbody = tble.Tbody.Append(); tr = thead.Tr.Append(); managetable.CreateTableHeader(DataArr, hl7Factory, tble, thead, tr); IStrucDocTr tr2 = hl7Factory.CreateStrucDocTr(); IStrucDocTr tr3 = hl7Factory.CreateStrucDocTr(); tr = hl7Factory.CreateStrucDocTr(); th = hl7Factory.CreateStrucDocTh(); th.Items.Add("Height"); tr.Items.Add(th); th = hl7Factory.CreateStrucDocTh(); th.Items.Add("Weight"); tr2.Items.Add(th); th = hl7Factory.CreateStrucDocTh(); th.Items.Add("Blood Pressure"); tr3.Items.Add(th); // Dim content int i = 1; foreach (var vitalSign in arrVitalSign) { td = hl7Factory.CreateStrucDocTd(); content = hl7Factory.CreateStrucDocContent(); content.XmlId = "vit" + (i); content.Items.Add(Convert.ToString(vitalSign.Height) + " inch"); td.Items.Add(content); tr.Items.Add(td); i = i + 1; td = hl7Factory.CreateStrucDocTd(); content = hl7Factory.CreateStrucDocContent(); content.XmlId = "vit" + (i); content.Items.Add(Convert.ToString(vitalSign.WEIGHT) + " Kg"); td.Items.Add(content); tr2.Items.Add(td); i = i + 1; td = hl7Factory.CreateStrucDocTd(); content = hl7Factory.CreateStrucDocContent(); content.XmlId = "vit" + (i); content.Items.Add(Convert.ToString(vitalSign.BloodPressure) + " mmHg"); td.Items.Add(content); tr3.Items.Add(td); i = i + 1; } tbody.Tr.Add(tr); tbody.Tr.Add(tr2); tbody.Tr.Add(tr3); if (arrVitalSign.Count > 0) { functionalStatus.Section.Text.Items.Add(tble); } else { IStrucDocParagraph paragraph = hl7Factory.CreateStrucDocParagraph(); paragraph.Items.Add("N/A"); functionalStatus.Section.Text.Items.Add(paragraph); } } }
public void CreateTableBody1(string colSpan, Factory hl7factory, IStrucDocTable tble, IStrucDocTbody tbody, IStrucDocTr tr) { tr = hl7factory.CreateStrucDocTr(); td = hl7factory.CreateStrucDocTd(); td.Colspan = colSpan; td.Align = StrucDocTdAlign.center; td.Items.Add("N/A"); tr.Items.Add(td); tbody.Tr.Add(tr); }
public void CreateTableBody(ArrayList Data, Factory hl7factory, IStrucDocTable tble, IStrucDocTbody tbody, IStrucDocTr tr) { //tbody = tble.Tbody.Append(); tr = hl7factory.CreateStrucDocTr(); for (int n = 0; n <= Data.Count - 1; n++) { td = hl7factory.CreateStrucDocTd(); td.Items.Add(Data[n]); tr.Items.Add(td); } tbody.Tr.Add(tr); }
public void CreateTableHeader(ArrayList Data, Factory hl7factory, IStrucDocTable tble, IStrucDocThead thead, IStrucDocTr tr) { tble.Border = "1"; tble.Width = "100%"; for (int i = 0; i <= Data.Count - 1; i++) { th = hl7factory.CreateStrucDocTh(); th.Items.Add(Data[i]); tr.Items.Add(th); } }