public List <PatientTrauma> getPatientTrauma(bool currentOnly)
 {
     if (currentOnly)
     {
         return(database.getPatientTrauma(patient).Where(pt => pt.End_Date.Equals(DateTime.Parse("12/31/9999"))).ToList());
     }
     else
     {
         return(database.getPatientTrauma(patient));
     }
 }
 private void DisplayTrauma()
 {
     dgvPatientProperties.Columns.Add("cName", "Name");
     patientTrauma = database.getPatientTrauma(patient);
     patientTrauma.ForEach(pt => dgvPatientProperties.Rows.Add(pt.Trauma.Name));
     btnViewDetails.Text = "View Trauma Details";
 }
        private void loadTrauma(TreeView tvMedicalData)
        {
            tvMedicalData.Nodes.Add("Trauma");
            tvMedicalData.Nodes[tvMedicalData.Nodes.Count - 1].ImageIndex         = 5;
            tvMedicalData.Nodes[tvMedicalData.Nodes.Count - 1].SelectedImageIndex = 5;

            List <PatientTrauma> patientTrauma = database.getPatientTrauma(patient);

            foreach (PatientTrauma pp in patientTrauma)
            {
                tvMedicalData.Nodes[tvMedicalData.Nodes.Count - 1].Nodes.Add(
                    pp.Trauma.Name);
                tvMedicalData.Nodes[tvMedicalData.Nodes.Count - 1].LastNode.ImageIndex         = 5;
                tvMedicalData.Nodes[tvMedicalData.Nodes.Count - 1].LastNode.SelectedImageIndex = 5;
            }
        }