update readme
do Ward table missing critical clinical columns
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
import Badge from '@/components/ui/Badge.vue'
|
||||
import {
|
||||
formatGcsClassification,
|
||||
formatLastObservation,
|
||||
formatLengthOfStay,
|
||||
observationStaleness,
|
||||
patientRoom,
|
||||
stalenessClass,
|
||||
} from '@/composables/wardFormat'
|
||||
|
||||
const props = defineProps({ patient: { type: Object, required: true } })
|
||||
|
||||
@@ -10,12 +18,31 @@ const riskVariant = computed(() => {
|
||||
if (score >= 5) return 'warning'
|
||||
return 'success'
|
||||
})
|
||||
|
||||
const sofaVariant = computed(() => {
|
||||
const delta = props.patient.sofaDelta
|
||||
if (delta != null && delta >= 2) return 'critical'
|
||||
if (delta != null && delta === 1) return 'warning'
|
||||
return 'info'
|
||||
})
|
||||
|
||||
const gcsVariant = computed(() => {
|
||||
const score = props.patient.gcsScore
|
||||
if (score == null) return 'info'
|
||||
if (score <= 8) return 'critical'
|
||||
if (score <= 12) return 'warning'
|
||||
return 'success'
|
||||
})
|
||||
|
||||
const vitalsStaleness = computed(() =>
|
||||
observationStaleness(props.patient.lastObservationAt, props.patient.status),
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<tr>
|
||||
<td class="whitespace-nowrap px-4 py-4 text-sm text-gray-700 dark:text-gray-300">
|
||||
{{ patient.room ?? '—' }}
|
||||
{{ patientRoom(patient) }}
|
||||
</td>
|
||||
<td class="px-4 py-4">
|
||||
<div class="text-sm font-medium text-gray-900 dark:text-white">
|
||||
@@ -26,9 +53,34 @@ const riskVariant = computed(() => {
|
||||
<td class="whitespace-nowrap px-4 py-4 text-right">
|
||||
<Badge :variant="riskVariant">{{ patient.news2Score ?? '—' }}</Badge>
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-4 text-right text-sm">
|
||||
<div class="flex flex-col items-end gap-1">
|
||||
<span class="font-medium text-gray-900 dark:text-white">{{ patient.sofaScore ?? '—' }}</span>
|
||||
<Badge v-if="patient.sofaDelta != null && patient.sofaDelta > 0" :variant="sofaVariant" size="xs">
|
||||
Δ+{{ patient.sofaDelta }}
|
||||
</Badge>
|
||||
</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-4 text-right text-sm">
|
||||
<div class="flex flex-col items-end gap-1">
|
||||
<Badge :variant="gcsVariant">{{ patient.gcsScore ?? '—' }}</Badge>
|
||||
<span v-if="patient.gcsClassification" class="text-xs text-gray-500 dark:text-gray-400">
|
||||
{{ formatGcsClassification(patient.gcsClassification) }}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-4 text-right text-sm text-gray-700 dark:text-gray-300">
|
||||
{{ patient.qsofaScore ?? '—' }}
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-4 text-sm text-gray-700 dark:text-gray-300">
|
||||
{{ patient.attendingPhysician ?? '—' }}
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-4 text-sm text-gray-700 dark:text-gray-300">
|
||||
{{ formatLengthOfStay(patient.admittedAt) }}
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-4 text-sm" :class="stalenessClass(vitalsStaleness)">
|
||||
{{ formatLastObservation(patient.lastObservationAt) }}
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-4">
|
||||
<Badge v-if="patient.sepsisActive" variant="critical">Active</Badge>
|
||||
<span v-else class="text-sm text-gray-400">No</span>
|
||||
@@ -40,4 +92,4 @@ const riskVariant = computed(() => {
|
||||
<span v-else class="text-sm text-gray-400">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user