public List <PatientPast_Medical_History> getPatientPastMedicalHistory(bool currentOnly)
 {
     if (currentOnly)
     {
         return(database.getPatientPastMedicalHistory(patient).Where(pmh => pmh.End_Date.Equals(DateTime.Parse("12/31/9999"))).ToList());
     }
     else
     {
         return(database.getPatientPastMedicalHistory(patient));
     }
 }
 private void DisplayPastMedicalHistory()
 {
     dgvPatientProperties.Columns.Add("cName", "Name");
     patientPastMedicalHistory = database.getPatientPastMedicalHistory(patient);
     patientPastMedicalHistory.ForEach(ppmh => dgvPatientProperties.Rows.Add(ppmh.Past_Medical_History.Name));
     btnViewDetails.Text = "View Past Medical History Details";
 }
        private void loadPastMedicalHistory(TreeView tvMedicalData)
        {
            tvMedicalData.Nodes.Add("Past Medical History");
            tvMedicalData.Nodes[tvMedicalData.Nodes.Count - 1].ImageIndex         = 1;
            tvMedicalData.Nodes[tvMedicalData.Nodes.Count - 1].SelectedImageIndex = 1;

            List <PatientPast_Medical_History> patientPMH = database.getPatientPastMedicalHistory(patient);

            foreach (PatientPast_Medical_History pmh in patientPMH)
            {
                tvMedicalData.Nodes[tvMedicalData.Nodes.Count - 1].Nodes.Add(
                    pmh.Past_Medical_History.Name);
                tvMedicalData.Nodes[tvMedicalData.Nodes.Count - 1].LastNode.ImageIndex         = 1;
                tvMedicalData.Nodes[tvMedicalData.Nodes.Count - 1].LastNode.SelectedImageIndex = 1;
            }
        }