Skip to content

Commit

Permalink
Added blood pressure to VitalSignView. Fixed swapped diastolic/MAP va…
Browse files Browse the repository at this point in the history
…lues.
  • Loading branch information
Jan Scholtyssek committed Jan 26, 2020
1 parent 6922163 commit 438e11c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CentralMonitorGUI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]
16 changes: 16 additions & 0 deletions CentralMonitorGUI/ViewModels/VitalSignViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ private void UpdateTimer_Elapsed(object sender, ElapsedEventArgs e)
var spO2Value = Monitor.VitalSignValues.FirstOrDefault(
x => x.VitalSignType == VitalSignType.SpO2);
SpO2 = spO2Value?.Value.ToString() ?? "X";

var systolicBloodPressure = Monitor.VitalSignValues.FirstOrDefault(
x => x.VitalSignType == VitalSignType.SystolicBloodPressure);
var diastolicBloodPressure = Monitor.VitalSignValues.FirstOrDefault(
x => x.VitalSignType == VitalSignType.DiastolicBloodPressure);
NiBP = $"{systolicBloodPressure?.Value.ToString() ?? "X"} / {diastolicBloodPressure?.Value.ToString() ?? "X"}";
}

private string heartRate = "X";
Expand Down Expand Up @@ -65,5 +71,15 @@ public string SpO2
OnPropertyChanged();
}
}
private string niBp = "X / X";
public string NiBP
{
get => niBp;
set
{
niBp = value;
OnPropertyChanged();
}
}
}
}
7 changes: 6 additions & 1 deletion CentralMonitorGUI/Views/VitalSignView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="80" d:DesignWidth="140"
d:DesignHeight="100" d:DesignWidth="140"
Name="Self">
<Border BorderThickness="2" BorderBrush="Black" DataContext="{Binding ElementName=Self, Path=ViewModel}">
<Grid>
Expand All @@ -22,6 +22,11 @@
HorizontalAlignment="Right" Margin="0 57 45 0"/>
<TextBlock Text="{Binding SpO2}" FontSize="18" FontWeight="Bold"
HorizontalAlignment="Right" Margin="0 53 10 0"/>

<TextBlock Text="NiBP" FontSize="14" FontWeight="Bold"
HorizontalAlignment="Right" Margin="0 76 80 0"/>
<TextBlock Text="{Binding NiBP}" FontSize="18" FontWeight="Bold"
HorizontalAlignment="Right" Margin="0 72 10 0"/>
</Grid>
</Border>
</UserControl>
4 changes: 2 additions & 2 deletions NetworkCommunication/Informations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ public static IList<VitalSignType> VitalSignTypesForSensor(SensorType sensorType
case SensorType.BloodPressure:
return new List<VitalSignType>
{
VitalSignType.DiastolicBloodPressure,
VitalSignType.MeanArterialPressure,
VitalSignType.SystolicBloodPressure,
VitalSignType.MeanArterialPressure
VitalSignType.DiastolicBloodPressure
};
case SensorType.SpO2:
return new[] {VitalSignType.SpO2, VitalSignType.HeartRate};
Expand Down

0 comments on commit 438e11c

Please sign in to comment.