oop_II-6/EHEC_Server/EHEC_Server/cluster_dependencies/Models/ClusterPatient.cs

40 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace EHEC_Server
{
public class ClusterPatient
{
private int Id { get; set; }
private string Name { get; set; }
private string Nodetype { get; set; }
public ClusterPatient() { }
public List<ClusterPatient> GetClusterPatients()
{
Patient patient = new Patient();
List<Patient> patients = new List<Patient>();
patients = patient.GetAllPatients();
List<ClusterPatient> ClusterPatients = new List<ClusterPatient>();
foreach (Patient element in patients)
{
ClusterPatient clusterPatient = new ClusterPatient
{
Id = element.PatientId,
Nodetype = "patient",
Name = element.FirstName + " " + element.LastName
};
ClusterPatients.Add(clusterPatient);
}
return ClusterPatients;
}
}
}