Skip to content

Commit

Permalink
#330 frontend: add continuous SpO2 display
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolkenfarmer committed Sep 14, 2024
1 parent 8c45c0a commit 2acedd0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions frontend/src/components/widgets/PatientStatus.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
<script setup lang="ts">
import {usePatientStore} from '@/stores/Patient'
import {strings} from "../../strings"
import {useContinuousVariablesStore} from "@/stores/ContinuousVariables"
import {computed} from "vue"
import {strings} from "@/strings"
const patientStore = usePatientStore()
const continuousStateStore = useContinuousVariablesStore()
const breathing = computed(() => {
const spo2Val = continuousStateStore.getCurrentValueByName('SpO2')?.toFixed(0)
return patientStore.breathing.replace(/(SpO2: )\d+/, `$1${spo2Val}`)
})
</script>

<template>
Expand All @@ -22,7 +31,7 @@
<td>
<p class="key">
{{ strings.patientState.breathing }}
</p>{{ patientStore.breathing }}
</p>{{ breathing }}
</td>
</tr>
<tr>
Expand Down

0 comments on commit 2acedd0

Please sign in to comment.