chore: necessary updates given the changes in the alert controller
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { api } from './client'
|
||||
|
||||
export function fetchAlertById(alertId) {
|
||||
return api.get(`/api/v1/alerts/${alertId}`)
|
||||
}
|
||||
|
||||
export function fetchAlerts(encounterId, status) {
|
||||
const params = new URLSearchParams()
|
||||
if (status) params.set('status', status)
|
||||
|
||||
@@ -9,6 +9,7 @@ import { useAlertStore } from '@/stores/alerts'
|
||||
import { useScoringStore } from '@/stores/scoring'
|
||||
import * as encountersApi from '@/api/encounters'
|
||||
import * as clinicalApi from '@/api/clinical'
|
||||
import * as alertsApi from '@/api/alerts'
|
||||
import PatientBanner from '@/components/patient/PatientBanner.vue'
|
||||
import VitalsPanel from '@/components/patient/VitalsPanel.vue'
|
||||
import ScoresPanel from '@/components/patient/ScoresPanel.vue'
|
||||
@@ -157,8 +158,12 @@ async function loadAll() {
|
||||
}
|
||||
}
|
||||
|
||||
function onSelectAlert(alert) {
|
||||
selectedAlert.value = alert
|
||||
async function onSelectAlert(alert) {
|
||||
try {
|
||||
selectedAlert.value = await alertsApi.fetchAlertById(alert.id)
|
||||
} catch {
|
||||
selectedAlert.value = alert
|
||||
}
|
||||
jumpToTimestamp(alert.triggeredAt)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user