2018-06-22 16:29:27 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Web;
|
|
|
|
|
|
|
|
|
|
namespace EHEC_Server.DataBuilder
|
|
|
|
|
{
|
|
|
|
|
public class GenerateDataBuilder
|
|
|
|
|
{
|
|
|
|
|
private static List<Doctor> Doctors = new List<Doctor>();
|
|
|
|
|
private static List<Patient> Patients = new List<Patient>();
|
|
|
|
|
private static List<Origin> Origins = new List<Origin>();
|
|
|
|
|
private static List<Result> Results = new List<Result>();
|
|
|
|
|
private static List<Exam> Exams = new List<Exam>();
|
|
|
|
|
private static Random Rnd = new Random();
|
|
|
|
|
|
|
|
|
|
private static List<string> FirstNames = new List<string>(new string[]
|
|
|
|
|
{
|
|
|
|
|
"Michael", "Andreas", "Stefan", "Ivan","Adrien"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
private static List<string> LastNames = new List<string>(new string[]
|
|
|
|
|
{
|
|
|
|
|
"Meister", "Schär", "Eberhard", "Zingg", "Howald", "Aebi", "Feldmann"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
private static List<string> DoctorOrigins = new List<string>(new string[]
|
|
|
|
|
{
|
|
|
|
|
"SanktMonika", "DisneyWorld", "Hell", "Heaven"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
private static List<string> Street = new List<string>(new string[]
|
|
|
|
|
{
|
|
|
|
|
"Rosenauweg", "Schessstrasse", "Hardstrasse", "Gehweg", "Bananastreet", "Moosweg", "Feldstrasse"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
private static List<string> BirthDate = new List<string>(new string[]
|
|
|
|
|
{
|
|
|
|
|
"12991212", "20000112",
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
private static List<string> City = new List<string>(new string[]
|
|
|
|
|
{
|
|
|
|
|
"Meister", "Schär", "Eberhard", "Zingg", "Howald", "Aebi", "Feldmann"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-06-24 15:14:46 +02:00
|
|
|
|
// public static List<Patient> CreatePatients()
|
|
|
|
|
// {
|
|
|
|
|
//int Counter = Patients.Count();
|
|
|
|
|
//for (int i = 0; i < Counter; i++)
|
|
|
|
|
// foreach (var c in FirstNames)
|
|
|
|
|
// {
|
|
|
|
|
// for (int j = 0; j < 10; j++)
|
|
|
|
|
// {
|
|
|
|
|
// Patient patient = new Patient(
|
|
|
|
|
// FirstNames[Rnd.Next(1, FirstNames.Count())],
|
|
|
|
|
// LastNames[Rnd.Next(1, LastNames.Count())],
|
|
|
|
|
// BirthDate[Rnd.Next(1, BirthDate.Count())],
|
|
|
|
|
// Street[Rnd.Next(1, Street.Count())],
|
|
|
|
|
// City[Rnd.Next(1, City.Count())]);
|
|
|
|
|
// Patients.Add(patient);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// return Patients;
|
2018-06-22 16:29:27 +02:00
|
|
|
|
}
|
2018-06-24 15:14:46 +02:00
|
|
|
|
|
|
|
|
|
// public static List<Doctor> CreateDoctors()
|
|
|
|
|
//{
|
|
|
|
|
//int Counter = Patients.Count();
|
|
|
|
|
//for (int i = 0; i < Counter; i++)
|
|
|
|
|
// foreach (var c in FirstNames)
|
|
|
|
|
//{
|
|
|
|
|
// for (int j = 0; j < 10; j++)
|
|
|
|
|
//{
|
|
|
|
|
// Doctor doctor = new Doctor(
|
|
|
|
|
// FirstNames[Rnd.Next(1, FirstNames.Count())],
|
|
|
|
|
// LastNames[Rnd.Next(1, LastNames.Count())],
|
|
|
|
|
//DoctorOrigins[Rnd.Next(1, DoctorOrigins.Count())]);
|
|
|
|
|
//Doctors.Add(doctor);
|
|
|
|
|
//}
|
|
|
|
|
//}
|
|
|
|
|
//return Doctors;
|
|
|
|
|
//}
|
|
|
|
|
|
2018-06-22 16:29:27 +02:00
|
|
|
|
}
|