Exemplo n.º 1
0
 public override void OnNavigatedTo(INavigationParameters parameters)
 {
     metric    = parameters.GetValue <MetricListItem>("metric");
     patientId = parameters.GetValue <string>("patientId");
     FillLabels();
 }
Exemplo n.º 2
0
        private async void FillList()
        {
            Metrics = new ObservableCollection <MetricListItem>();
            metric  = await _metricService.GetMetric(metricId);

            var nurse = await _nurseService.GetNurseAsync(metric.nurse_id);

            var patient = await _patientService.GetPatient(patientId);

            NurseName = $"Ingelogd als: {nurse.firstname} {nurse.lastname}";

            if (metric.bloeddruk != "0")
            {
                var deviceName = await _deviceService.GetDeviceAsyncById(metric.device_bloeddruk);

                var listItem = new MetricListItem
                {
                    MetricType  = "Bloeddruk",
                    MetricValue = $"{metric.bloeddruk} mmHg",
                    Device      = deviceName.name,
                    NurseName   = $"{nurse.firstname} {nurse.lastname}",
                    ID          = metric._id,
                    PatientName = $"{patient.Firstname} {patient.Lastname}"
                };

                Metrics.Add(listItem);
            }
            if (metric.gewicht != "0")
            {
                var deviceName = await _deviceService.GetDeviceAsyncById(metric.device_gewicht);

                var listItem = new MetricListItem
                {
                    MetricType  = "Gewicht",
                    MetricValue = $"{metric.gewicht} kg",
                    Device      = deviceName.name,
                    NurseName   = $"{nurse.firstname} {nurse.lastname}",
                    ID          = metric._id,
                    PatientName = $"{patient.Firstname} {patient.Lastname}"
                };

                Metrics.Add(listItem);
            }
            if (metric.temperatuur != "0")
            {
                var deviceName = await _deviceService.GetDeviceAsyncById(metric.device_temperatuur);

                var listItem = new MetricListItem
                {
                    MetricType  = "Temperatuur",
                    MetricValue = $"{metric.temperatuur} °C",
                    Device      = deviceName.name,
                    NurseName   = $"{nurse.firstname} {nurse.lastname}",
                    ID          = metric._id,
                    PatientName = $"{patient.Firstname} {patient.Lastname}"
                };

                Metrics.Add(listItem);
            }
            if (metric.pijnscore != "0")
            {
                var listItem = new MetricListItem
                {
                    MetricType  = "Pijnscore",
                    MetricValue = $"{metric.pijnscore}",
                    Device      = "",
                    NurseName   = $"{nurse.firstname} {nurse.lastname}",
                    ID          = metric._id,
                    PatientName = $"{patient.Firstname} {patient.Lastname}"
                };

                Metrics.Add(listItem);
            }
        }