/// <summary> /// Initializes a new instance of the <see cref="ViewLabTestForm" /> class. Use to view tests for a single appointment /// </summary> /// <param name="appt">The appointment.</param> public ViewLabTestForm(Appointment appt) { this.InitializeComponent(); this.appt = appt; this.patientId = 0; this.labTestOrderedController = new LabTestOrderedController(); this.labTestResultController = new LabTestResultController(); this.populateDataView(); }
/// <summary> /// Initializes a new instance of the <see cref="ViewLabTestForm" /> class. Use to view tests for a single patient /// </summary> /// <param name="patientId">The patient identifier.</param> public ViewLabTestForm(int patientId) { this.InitializeComponent(); this.appt = null; this.patientId = patientId; this.labTestOrderedController = new LabTestOrderedController(); this.labTestResultController = new LabTestResultController(); this.populateDataView(); }
/// <summary> /// Initializes a new instance of the <see cref="LabResultForm" /> class. /// </summary> /// <param name="testOrder">The Lab Test Order.</param> public LabResultForm(LabTestOrder testOrder) { this.InitializeComponent(); this.resultController = new LabTestResultController(); try { this.result = this.resultController.GetById(testOrder.TestResultId); } catch { this.result = null; } if (this.result == null) { this.result = new LabTestResult(testOrder.TestOrderedId, ""); } this.textBox.Text = this.result.TestResults; }