public void Add(Section section, ReportPatient patient) { var table = AddPatientInfoTable(section); AddLeftInfo(table.Rows[0].Cells[0], patient); AddRightInfo(table.Rows[0].Cells[1], patient); }
private void AddHeader(Section section, ReportPatient patient) { var header = section.Headers.Primary.AddParagraph(); header.Format.AddTabStop(Size.GetWidth(section), TabAlignment.Right); header.AddText($"{patient.LastName}, {patient.FirstName} (ID: {patient.Id})"); header.AddTab(); header.AddText($"Generated {DateTime.Now:g}"); }
private void AddRightInfo(Cell cell, ReportPatient patient) { var p = cell.AddParagraph(); // Add birthdate p.AddText("Birthdate: "); p.AddFormattedText(Format(patient.Birthdate), TextFormat.Bold); p.AddLineBreak(); // Add doctor name p.AddText("Doctor: "); p.AddFormattedText($" {patient.Doctor.Name}", TextFormat.Bold); }
private void AddLeftInfo(Cell cell, ReportPatient patient) { // Add patient name and sex symbol var p1 = cell.AddParagraph(); p1.Style = CustomStyles.PatientName; p1.AddText($"{patient.LastName}, {patient.FirstName}"); p1.AddSpace(2); AddSexSymbol(p1, patient.Sex); // Add patient ID var p2 = cell.AddParagraph(); p2.AddText("ID: "); p2.AddFormattedText(patient.Id, TextFormat.Bold); }
private void AddPatientInfo(Section section, ReportPatient patient) { new PatientInfo().Add(section, patient); }