add frontend
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { api } from './client'
|
||||
|
||||
export function fetchAlerts(encounterId, status) {
|
||||
const params = new URLSearchParams()
|
||||
if (status) params.set('status', status)
|
||||
return api.get(`/api/v1/encounters/${encounterId}/alerts?${params}`)
|
||||
}
|
||||
|
||||
export function fetchAllAlerts(status) {
|
||||
const params = new URLSearchParams()
|
||||
if (status) params.set('status', status)
|
||||
return api.get(`/api/v1/alerts?${params}`)
|
||||
}
|
||||
|
||||
export function acknowledgeAlert(alertId, clinicianId, note) {
|
||||
return api.post(`/api/v1/alerts/${alertId}/acknowledge`, { clinicianId, note })
|
||||
}
|
||||
|
||||
export function resolveAlert(alertId) {
|
||||
return api.post(`/api/v1/alerts/${alertId}/resolve`)
|
||||
}
|
||||
Reference in New Issue
Block a user