Пример #1
0
        private static List <Patient> GetPatients(HealthContext db)
        {
            var patients = new List <Patient>()
            {
                new Patient
                {
                    Name        = "Jim jones",
                    Ailments    = new List <Ailment>(db.Ailments.Take(2)),
                    Medications = new List <Medication>(db.Medications.Take(2)),
                },
                new Patient
                {
                    Name        = "Ann smith",
                    Ailments    = new List <Ailment>(db.Ailments.Take(1)),
                    Medications = new List <Medication>(db.Medications.OrderBy(m => m.Name).Skip(1).Take(3)),
                },
                new Patient
                {
                    Name        = "Tim C**k",
                    Ailments    = new List <Ailment>(db.Ailments.Take(3)),
                    Medications = new List <Medication>(db.Medications.OrderBy(m => m.Name).Skip(2).Take(4)),
                },
            };

            return(patients);
        }
Пример #2
0
        public static List <user> Getusers(HealthContext db)
        {
            List <user> users = new List <user>()
            {
                new user {
                    username = "******",
                    items    = new List <item>(db.items.Take(2))
                },
            };

            return(users);
        }
Пример #3
0
        public static List <Medication> GetMedications(HealthContext db)
        {
            Random            rnd         = new Random();
            List <Medication> medications = new List <Medication>()
            {
                new Medication
                {
                    MedicationId = "M0001",
                    Medicines    = new List <Medicine>(db.Medicines.Take(4)),
                }
            };

            return(medications);
        }
Пример #4
0
        public static List <Report> GetReports(HealthContext db)
        {
            Random        rnd     = new Random();
            List <Report> reports = new List <Report>()
            {
                new Report
                {
                    ReportId    = "R0001",
                    Datetime    = "2020-08-01 13:22:05",
                    PatientId   = "8f789d0b-3145-4cf2-8504-13159edaa747",
                    Images      = new List <Image>(db.Images.Take(8)),
                    Diagnoses   = new List <Diagnose>(db.Diagnoses.Take(1)),
                    Medications = new List <Medication>(db.Medications.Take(1)),
                },
            };

            return(reports);
        }
Пример #5
0
        public static List <Patient> GetPatients(HealthContext db)
        {
            List <Patient> patients = new List <Patient>()
            {
                new Patient {
                    Name        = "Jim Jones",
                    Ailments    = new List <Ailment>(db.Ailments.Take(2)),
                    Medications = new List <Medication>(db.Medications.Take(2))
                },
                new Patient {
                    Name        = "Ann Smith",
                    Ailments    = new List <Ailment>(db.Ailments.Take(1)),
                    Medications = new List <Medication>(db.Medications.OrderBy(m => m.Name).Skip(1).Take(1))
                },
                new Patient {
                    Name        = "Tom Myers",
                    Ailments    = new List <Ailment>(db.Ailments.OrderBy(m => m.Name).Skip(2).Take(2)),
                    Medications = new List <Medication>(db.Medications.OrderBy(m => m.Name).Skip(2).Take(2))
                }
            };

            return(patients);
        }
        public static List <Patient> GetPatients(HealthContext dbContext)
        {
            List <Patient> patients = new List <Patient>()
            {
                new Patient {
                    Name          = "Allan Border"
                    , Ailments    = new List <Ailment>(dbContext.Ailments.Take(2))
                    , Medications = new List <Medication>(dbContext.Medications.Take(2))
                },
                new Patient {
                    Name          = "Tom Cruse"
                    , Ailments    = new List <Ailment>(dbContext.Ailments.Take(1))
                    , Medications = new List <Medication>(dbContext.Medications.Take(2))
                },
                new Patient {
                    Name          = "Steve Smith"
                    , Ailments    = new List <Ailment>(dbContext.Ailments.Skip(2).Take(1))
                    , Medications = new List <Medication>(dbContext.Medications.Take(2))
                }
            };

            return(patients);
        }
Пример #7
0
        public static List <ObservedItem> GetObservedItems(HealthContext db)
        {
            Random rnd = new Random();
            List <ObservedItem> observedItems = new List <ObservedItem>()
            {
                new ObservedItem
                {
                    ObservedItemId   = "OI0001",
                    bloodPressures   = new List <BloodPressure>(db.BloodPressures.Take(1)),
                    bodyHeats        = new List <BodyHeat>(db.BodyHeats.Take(1)),
                    respiratoryRates = new List <RespiratoryRate>(db.RespiratoryRates.Take(1)),
                    sinusRhythms     = new List <SinusRhythm>(db.SinusRhythms.Take(1)),
                },
                new ObservedItem
                {
                    ObservedItemId   = "OI0002",
                    bloodPressures   = new List <BloodPressure>(db.BloodPressures.Skip(1).Take(1)),
                    bodyHeats        = new List <BodyHeat>(db.BodyHeats.Skip(1).Take(1)),
                    respiratoryRates = new List <RespiratoryRate>(db.RespiratoryRates.Skip(1).Take(1)),
                    sinusRhythms     = new List <SinusRhythm>(db.SinusRhythms.Skip(1).Take(1)),
                },
                new ObservedItem
                {
                    ObservedItemId   = "OI0003",
                    bloodPressures   = new List <BloodPressure>(db.BloodPressures.Skip(2).Take(1)),
                    bodyHeats        = new List <BodyHeat>(db.BodyHeats.Skip(2).Take(1)),
                    respiratoryRates = new List <RespiratoryRate>(db.RespiratoryRates.Skip(2).Take(1)),
                    sinusRhythms     = new List <SinusRhythm>(db.SinusRhythms.Skip(2).Take(1)),
                },
                new ObservedItem
                {
                    ObservedItemId   = "OI0004",
                    bloodPressures   = new List <BloodPressure>(db.BloodPressures.Skip(3).Take(1)),
                    bodyHeats        = new List <BodyHeat>(db.BodyHeats.Skip(3).Take(1)),
                    respiratoryRates = new List <RespiratoryRate>(db.RespiratoryRates.Skip(3).Take(1)),
                    sinusRhythms     = new List <SinusRhythm>(db.SinusRhythms.Skip(3).Take(1)),
                },
                new ObservedItem
                {
                    ObservedItemId   = "OI0005",
                    bloodPressures   = new List <BloodPressure>(db.BloodPressures.Skip(4).Take(1)),
                    bodyHeats        = new List <BodyHeat>(db.BodyHeats.Skip(4).Take(1)),
                    respiratoryRates = new List <RespiratoryRate>(db.RespiratoryRates.Skip(4).Take(1)),
                    sinusRhythms     = new List <SinusRhythm>(db.SinusRhythms.Skip(4).Take(1)),
                },
                new ObservedItem
                {
                    ObservedItemId   = "OI0006",
                    bloodPressures   = new List <BloodPressure>(db.BloodPressures.Skip(5).Take(1)),
                    bodyHeats        = new List <BodyHeat>(db.BodyHeats.Skip(5).Take(1)),
                    respiratoryRates = new List <RespiratoryRate>(db.RespiratoryRates.Skip(5).Take(1)),
                    sinusRhythms     = new List <SinusRhythm>(db.SinusRhythms.Skip(5).Take(1)),
                },
                new ObservedItem
                {
                    ObservedItemId   = "OI0007",
                    bloodPressures   = new List <BloodPressure>(db.BloodPressures.Skip(6).Take(1)),
                    bodyHeats        = new List <BodyHeat>(db.BodyHeats.Skip(6).Take(1)),
                    respiratoryRates = new List <RespiratoryRate>(db.RespiratoryRates.Skip(6).Take(1)),
                    sinusRhythms     = new List <SinusRhythm>(db.SinusRhythms.Skip(6).Take(1)),
                },
                new ObservedItem
                {
                    ObservedItemId   = "OI0008",
                    bloodPressures   = new List <BloodPressure>(db.BloodPressures.Skip(7).Take(1)),
                    bodyHeats        = new List <BodyHeat>(db.BodyHeats.Skip(7).Take(1)),
                    respiratoryRates = new List <RespiratoryRate>(db.RespiratoryRates.Skip(7).Take(1)),
                    sinusRhythms     = new List <SinusRhythm>(db.SinusRhythms.Skip(7).Take(1)),
                },
                new ObservedItem
                {
                    ObservedItemId   = "OI0009",
                    bloodPressures   = new List <BloodPressure>(db.BloodPressures.Skip(8).Take(1)),
                    bodyHeats        = new List <BodyHeat>(db.BodyHeats.Skip(8).Take(1)),
                    respiratoryRates = new List <RespiratoryRate>(db.RespiratoryRates.Skip(8).Take(1)),
                    sinusRhythms     = new List <SinusRhythm>(db.SinusRhythms.Skip(8).Take(1)),
                },
                new ObservedItem
                {
                    ObservedItemId   = "OI0010",
                    bloodPressures   = new List <BloodPressure>(db.BloodPressures.Skip(9).Take(1)),
                    bodyHeats        = new List <BodyHeat>(db.BodyHeats.Skip(9).Take(1)),
                    respiratoryRates = new List <RespiratoryRate>(db.RespiratoryRates.Skip(9).Take(1)),
                    sinusRhythms     = new List <SinusRhythm>(db.SinusRhythms.Skip(9).Take(1)),
                },
            };

            return(observedItems);
        }
Пример #8
0
        public static List <Observation> GetObservations(HealthContext db)
        {
            Random             rnd          = new Random();
            List <Observation> observations = new List <Observation>()
            {
                new Observation
                {
                    ObservationId = "O0001",
                    Date          = "2020-08-12",
                    Time          = "08:30:00",
                    PatientId     = "8f789d0b-3145-4cf2-8504-13159edaa747",
                    observedItems = new List <ObservedItem>(db.ObservedItems.Take(1)),
                },
                new Observation
                {
                    ObservationId = "O0002",
                    Date          = "2020-08-11",
                    Time          = "10:30:00",
                    PatientId     = "8f789d0b-3145-4cf2-8504-13159edaa747",
                    observedItems = new List <ObservedItem>(db.ObservedItems.Skip(1).Take(1)),
                },
                new Observation
                {
                    ObservationId = "O0003",
                    Date          = "2020-08-11",
                    Time          = "16:30:00",
                    PatientId     = "8f789d0b-3145-4cf2-8504-13159edaa747",
                    observedItems = new List <ObservedItem>(db.ObservedItems.Skip(2).Take(1)),
                },
                new Observation
                {
                    ObservationId = "O0004",
                    Date          = "2020-08-05",
                    Time          = "10:00:00",
                    PatientId     = "8f789d0b-3145-4cf2-8504-13159edaa747",
                    observedItems = new List <ObservedItem>(db.ObservedItems.Skip(3).Take(1)),
                },
                new Observation
                {
                    ObservationId = "O0005",
                    Date          = "2020-08-05",
                    Time          = "08:30:00",
                    PatientId     = "8f789d0b-3145-4cf2-8504-13159edaa747",
                    observedItems = new List <ObservedItem>(db.ObservedItems.Skip(4).Take(1)),
                },
                new Observation
                {
                    ObservationId = "O0006",
                    Date          = "2020-08-02",
                    Time          = "14:30:00",
                    PatientId     = "8f789d0b-3145-4cf2-8504-13159edaa747",
                    observedItems = new List <ObservedItem>(db.ObservedItems.Skip(5).Take(1)),
                },
                new Observation
                {
                    ObservationId = "O0007",
                    Date          = "2020-03-12",
                    Time          = "17:30:00",
                    PatientId     = "8f789d0b-3145-4cf2-8504-13159edaa747",
                    observedItems = new List <ObservedItem>(db.ObservedItems.Skip(6).Take(1)),
                },
                new Observation
                {
                    ObservationId = "O0008",
                    Date          = "2020-01-09",
                    Time          = "13:30:00",
                    PatientId     = "8f789d0b-3145-4cf2-8504-13159edaa747",
                    observedItems = new List <ObservedItem>(db.ObservedItems.Skip(7).Take(1)),
                },
                new Observation
                {
                    ObservationId = "O0009",
                    Date          = "2019-08-24",
                    Time          = "11:30:00",
                    PatientId     = "8f789d0b-3145-4cf2-8504-13159edaa747",
                    observedItems = new List <ObservedItem>(db.ObservedItems.Skip(8).Take(1)),
                },
                new Observation
                {
                    ObservationId = "O0010",
                    Date          = "2018-11-02",
                    Time          = "16:30:00",
                    PatientId     = "8f789d0b-3145-4cf2-8504-13159edaa747",
                    observedItems = new List <ObservedItem>(db.ObservedItems.Skip(9).Take(1)),
                },
            };

            return(observations);
        }