static void GenereteObservations(IEnumerable <ResidentDto> residents)
        {
            foreach (var resident in residents)
            {
                for (int i = 0; i < 30; i++)
                {
                    var bloodPressure = CreateObservation(ObservationType.BloodPressure, resident, i);
                    var heartRate     = CreateObservation(ObservationType.HeartRate, resident, i);


                    Console.WriteLine($"Resident #{resident.ResidentId} blood pressure is {bloodPressure.SystolicValue} / {bloodPressure.DiastolicValue} {bloodPressure.Unit}");
                    Console.WriteLine($"Resident #{resident.ResidentId} heart rate is {heartRate.Value} {bloodPressure.Unit}");


                    ObservationService.AddObservation(bloodPressure);
                    ObservationService.AddObservation(heartRate);
                }

                for (int i = 0; i < 7; i++)
                {
                    var temperature = CreateObservation(ObservationType.Temperature, resident, i);

                    Console.WriteLine($"Resident #{resident.ResidentId} temperature is {temperature.Value} {temperature.Unit}");

                    ObservationService.AddObservation(temperature);
                }
            }
        }
 public SMSServerController()
 {
     registerSMSService = new RegisterSMSService();
     sitesService       = new SitesService();
     groupService       = new GroupService();
     userProfileService = new UserProfileService();
     sMSServerService   = new SMSServerService();
     observationService = new ObservationService();
 }
 public HomeController()
 {
     dataObservationMongoService = new DataObservationMongoService();
     dataAlarmMongoService = new DataAlarmMongoService();
     areasService = new AreasService();
     sitesService = new SitesService();
     groupService = new GroupService();
     observationService = new ObservationService();
     userProfileService = new UserProfileService();
 }
        private static ObservationService BuildService(
            StatisticsDbContext context,
            IMatchingObservationsQueryGenerator?queryGenerator = null,
            IRawSqlExecutor?sqlExecutor = null)
        {
            var service = new ObservationService(context, Mock.Of <ILogger <ObservationService> >())
            {
                QueryGenerator = queryGenerator ?? Mock.Of <IMatchingObservationsQueryGenerator>(Strict),
                SqlExecutor    = sqlExecutor ?? Mock.Of <IRawSqlExecutor>(Strict)
            };

            return(service);
        }
 public ReportController()
 {
     dataObservationMongoService = new DataObservationMongoService();
     dataAlarmMongoService       = new DataAlarmMongoService();
     areasService               = new AreasService();
     sitesService               = new SitesService();
     groupService               = new GroupService();
     observationService         = new ObservationService();
     userProfileService         = new UserProfileService();
     reportTypeService          = new ReportTypeService();
     reportDailyNhietDoService  = new ReportDailyNhietDoService();
     reportDailyMucNuocService  = new ReportDailyMucNuocService();
     reportDailyLuongMuaService = new ReportDailyLuongMuaService();
     reportDailyApSuatService   = new ReportDailyApSuatService();
     reportDailyDoAmService     = new ReportDailyDoAmService();
     reportDailyTocDoGioService = new ReportDailyTocDoGioService();
     reportDailyHuongGioService = new ReportDailyHuongGioService();
 }
예제 #6
0
 public ObservationalController()
 {
     observationService = new ObservationService();
     userProfileService = new UserProfileService();
 }
예제 #7
0
 public ObservationController(ObservationService observationService)
 {
     _observationService = observationService;
 }