FHIR on the Pi
May 1, 2016 6 Comments
This is in the nature of a ‘just for fun’ post.
The Raspberry Pi is a ‘credit card’ sized computer that was originally developed to help children become interested in programming. Costing only around $35, it is a fully fledged computer that runs the Linux Operating system and can be used for a wide variety of purposes – including being a FHIR server!
To test this out, I downloaded the HAPI CLI Server on to my Raspberry Pi 3 and set it up in the same way as on any other Linux server. Somewhat to my surprise it worked!
Here’s a picture of the pi3 (not that particularly exciting I admit)
and here’s a screen dump of ‘top’ – showing the pi struggling (the Java process is the HAPI server) – but succeeding!
Interestingly the cpu usage drops off markedly once the server is up and running, though the memory seems to remain at around 85%
Performance wise, it actually isn’t too bad – once it has fully initialized. Getting a conformance statement for the first time takes ages (sometimes times out) but after that saving and querying for resources is sub-second. It really does consume all the pi’s resources though – even connecting via SSH from a remote computer can be flaky if the HAPI server is running.
But the fact is that it runs. And James reckons that there is a lot of stuff in the server that could be disabled to create a ‘lite’ version that will perform much better on small devices – we’ll talk more at the Montreal Connectathon next week.
So it becomes quite feasible to have a home-based FHIR enabled system that communicates via wifi or bluetooth (the pi3 supports both ‘on the card’) – for $35!
cool eh?
Like any innovation, we need more fire on the back to get the FHIR running at home. One day , very soon, I wish to have one running at home to keep my health check.
That’s certainly where we’re heading! James is keen to make HAPI run better on the Pi (currently it takes over) so I’ll put an update through when that’s done…
If you haven’t already, you may consider adjusting the memory split on the pi. If you are just running headless with no GUI, you can alter your memory spit and devote less to graphics and more to actual usable memory. This makes me want to try it on my pi 3. I had never even considered it.
Hi Josh – thanks for that, I’ll try it when I get back (I’m overseas at the moment). And, even better, James is working to lower the memory footprint as well! I’ll make a comment when that’s available…
Hi David, any thoughts about synchronisation and push/pull mechanisms to replicate data on a more centralised server? Hope Montreal went well. Thanks.
Well, I haven’t actually done that but there are a number of mechanisms within the spec that would support that (eg see http://hl7.org/fhir/http.html#history ) whoch also has a reference to subscription (http://hl7.org/fhir/subscription.html)
cheers…