HYLODE / HyUi

HYLODE User Interface Repository
http://hylode.org/
Apache License 2.0
3 stars 2 forks source link

EMAP monitoring #291

Open docsteveharris opened 1 year ago

docsteveharris commented 1 year ago

We should provide a series of system 'health checks' on the front end that confirm that EMAP/HySys/HyCastle and HyMind etc are all 'green' or otherwise.

jongillham commented 1 year ago

There is now a HySys endpoint in the HyFlow API /admissions/latest.

This returns one date and time for the most recent admission to ED and one for the most recent admission to any ICU within HySys. This gives us an idea of whether the IDS, UDS and hylode infrastructure is running correctly.

We can use this in HyUi to do something like:

if datetime.now() - latest_icu_admission_datetime > timedelta(hours=12):
    # show red light
else:
    # show green light

It would have been nice to use something more frequent like observations, however the table to select those takes several minutes to return a query. The episodes tables here take milliseconds. In the future we could index the observations tables appropriately if we wanted to use them.

harryjmoss commented 1 year ago

+1 for indexing the obs tables, but I like this solution for the time being

hqva commented 1 year ago

Is this monitoring system going to be called "HyAlert" or is that reserved for something else?