Open docsteveharris opened 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.
+1 for indexing the obs tables, but I like this solution for the time being
Is this monitoring system going to be called "HyAlert" or is that reserved for something else?
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.