fix:
No SOFA trend chart or organ-system timeline No GCS trend chart or component history No qSOFA history view
This commit is contained in:
@@ -16,6 +16,9 @@ import OrdersPanel from '@/components/patient/OrdersPanel.vue'
|
||||
import SepsisBundlePanel from '@/components/patient/SepsisBundlePanel.vue'
|
||||
import TrendsGrid from '@/components/charts/TrendsGrid.vue'
|
||||
import News2History from '@/components/charts/News2History.vue'
|
||||
import GcsHistory from '@/components/charts/GcsHistory.vue'
|
||||
import QsofaHistory from '@/components/charts/QsofaHistory.vue'
|
||||
import SofaHistory from '@/components/charts/SofaHistory.vue'
|
||||
import ReplayControls from '@/components/replay/ReplayControls.vue'
|
||||
import AlertReasoning from '@/components/alerts/AlertReasoning.vue'
|
||||
import Skeleton from '@/components/ui/Skeleton.vue'
|
||||
@@ -47,6 +50,9 @@ const encounter = ref(null)
|
||||
const loading = ref(true)
|
||||
const observations = ref([])
|
||||
const news2History = ref([])
|
||||
const gcsHistory = ref([])
|
||||
const qsofaHistory = ref([])
|
||||
const sofaHistory = ref([])
|
||||
const medications = ref([])
|
||||
const sepsisBundle = ref(null)
|
||||
const orders = ref([])
|
||||
@@ -65,10 +71,25 @@ const replayNews2History = computed(() =>
|
||||
news2History.value.filter(h => isAtOrBefore(h.calculatedAt)),
|
||||
)
|
||||
|
||||
const replayGcsHistory = computed(() =>
|
||||
gcsHistory.value.filter(h => isAtOrBefore(h.calculatedAt)),
|
||||
)
|
||||
|
||||
const replayQsofaHistory = computed(() =>
|
||||
qsofaHistory.value.filter(h => isAtOrBefore(h.evaluatedAt)),
|
||||
)
|
||||
|
||||
const replaySofaHistory = computed(() =>
|
||||
sofaHistory.value.filter(h => isAtOrBefore(h.calculatedAt)),
|
||||
)
|
||||
|
||||
function collectScenarioTimes() {
|
||||
return [
|
||||
...observations.value.map(o => new Date(o.recordedAt).getTime()),
|
||||
...news2History.value.map(h => new Date(h.calculatedAt).getTime()),
|
||||
...gcsHistory.value.map(h => new Date(h.calculatedAt).getTime()),
|
||||
...qsofaHistory.value.map(h => new Date(h.evaluatedAt).getTime()),
|
||||
...sofaHistory.value.map(h => new Date(h.calculatedAt).getTime()),
|
||||
...alerts.value.map(a => new Date(a.triggeredAt).getTime()),
|
||||
].filter(Number.isFinite)
|
||||
}
|
||||
@@ -88,10 +109,13 @@ async function loadAll() {
|
||||
const id = route.params.encounterId
|
||||
loading.value = true
|
||||
try {
|
||||
const [enc, obs, history, meds, bundle, ord] = await Promise.all([
|
||||
const [enc, obs, history, gcsHist, qsofaHist, sofaHist, meds, bundle, ord] = await Promise.all([
|
||||
encountersApi.fetchEncounter(id),
|
||||
encountersApi.fetchObservations(id),
|
||||
clinicalApi.fetchNews2History(id).catch(() => []),
|
||||
clinicalApi.fetchGcsHistory(id).catch(() => []),
|
||||
clinicalApi.fetchQsofaHistory(id).catch(() => []),
|
||||
clinicalApi.fetchSofaHistory(id).catch(() => []),
|
||||
clinicalApi.fetchMedications(id).catch(() => []),
|
||||
clinicalApi.fetchSepsisBundle(id),
|
||||
clinicalApi.fetchOrders(id).catch(() => ({ items: [] })),
|
||||
@@ -100,6 +124,9 @@ async function loadAll() {
|
||||
encounter.value = enc
|
||||
observations.value = obs
|
||||
news2History.value = history
|
||||
gcsHistory.value = gcsHist
|
||||
qsofaHistory.value = qsofaHist
|
||||
sofaHistory.value = sofaHist
|
||||
medications.value = meds
|
||||
sepsisBundle.value = bundle
|
||||
orders.value = ord.items ?? ord
|
||||
@@ -147,7 +174,7 @@ watch(openAlerts, (list) => {
|
||||
}
|
||||
})
|
||||
|
||||
watch([observations, news2History, alerts], syncReplayBounds, { deep: true })
|
||||
watch([observations, news2History, gcsHistory, qsofaHistory, sofaHistory, alerts], syncReplayBounds, { deep: true })
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
stopPlayback()
|
||||
@@ -168,7 +195,10 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
|
||||
<div class="grid min-w-0 gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||
<ScoresPanel />
|
||||
<div class="space-y-4">
|
||||
<ScoresPanel />
|
||||
<GcsHistory v-if="replayGcsHistory.length" :history="replayGcsHistory" />
|
||||
</div>
|
||||
<VitalsPanel :observations="replayObservations" />
|
||||
<AlertsList
|
||||
:encounter-id="route.params.encounterId"
|
||||
@@ -184,7 +214,10 @@ onBeforeUnmount(() => {
|
||||
/>
|
||||
|
||||
<div class="grid min-w-0 gap-4 lg:grid-cols-2">
|
||||
<SofaScorePanel :encounter-id="route.params.encounterId" />
|
||||
<div class="space-y-4">
|
||||
<SofaScorePanel :encounter-id="route.params.encounterId" />
|
||||
<SofaHistory v-if="replaySofaHistory.length" :history="replaySofaHistory" />
|
||||
</div>
|
||||
<OrdersPanel :orders="orders" />
|
||||
</div>
|
||||
|
||||
@@ -197,6 +230,7 @@ onBeforeUnmount(() => {
|
||||
<div id="clinical-review" class="w-full min-w-0 space-y-8">
|
||||
<TrendsGrid :observations="replayObservations" />
|
||||
<News2History v-if="replayNews2History.length" :history="replayNews2History" />
|
||||
<QsofaHistory v-if="replayQsofaHistory.length" :history="replayQsofaHistory" />
|
||||
<ReplayControls
|
||||
:alerts="openAlerts"
|
||||
:is-paused="isPaused"
|
||||
|
||||
Reference in New Issue
Block a user