13 ms·
Building a patient monitoring system with Go and Vue in 3 days
- shadycuz 6y agoI really like this idea of monitoring people like we monitor servers. I wonder what useful information you could extract from this. Like a very slight downward trend in blood pressure over a day. Could this be used to detect something like a slight internal bleed after a surgery?
- JshWright 6y agoThe body is very good at compensating for stuff like that. A falling blood pressure is a very late signal. The body has several tools at its disposal to maintain pressure (constricting the blood vessels, slowing the output of the kidneys, increasing the heartrate, etc). Two of those (urine output and heartrate) are already trended throughout the day for hospitalized patients.
- LanceH 6y agoYou hear about athletes having their blood monitored to balance recovery, but it seems every instance of this turned out to be about doping.
- rasmus1610 6y agoOur hospital actually records the patient monitor data of ICU patients and analyzes them for scientific purposes. And I agree, there is a tremendous amount of information in it, although bleeding is detected otherwise faster (blood gas analysis e.g.)
- stephenboyd 6y agoPatient vital sign monitoring has been a regular practice much longer than server monitoring.
- fhsm 6y agoNot just a long standing part of medicine as you said but also one of the best trodden topics in informatics: - https://link.springer.com/chapter/10.1007/978-3-319-43742-2_5 https://link.springer.com/chapter/10.1007/978-3-319-43742-2_... - https://www.nature.com/articles/sdata201635 https://www.nature.com/articles/sdata201635
- emilburzo 6y agoAre there any similar monitoring (hardware) devices that you can buy just for yourself? (aka you don't have to be a hospital or talk to a sales representative to be able to buy one) I don't care that much if it has a display, just being able to access the information similarly to what's described in the article would be enough.
- xvf22 6y agoThis one covers pulse and blood oxygen: https://www.gadgetvictims.com/2019/02/contec-cms50dplus.html https://www.gadgetvictims.com/2019/02/contec-cms50dplus.html
- kisamoto 6y agoWithings (was bought by Nokia but now Withings again) have a set of off-the-shelf tools you can buy. Scales, thermometer, blood pressure monitor, sleep tracker.
- didntknowyou 6y agogreat work
- saintfiends 6y agoInteresting idea. I'm not sure how scalable this would be given the fragile nature of the tools. I want to believe with enough indications of the monitoring itself (Is the screen being refreshed? Is network connected ? When was it last checked?) that this is a viable option and that would unlock a lot of possibilities. But I can't shake off the feeling of uneasiness (What if it's not working and we don't know it's not working) PS: I'm not bashing on what was done, just the general idea.
- vijaybritto 6y agoIt's not written with scalability in mind. It simply needs to get the job done. Other programmer requirements can wait!
- min2bro 6y agoI do not understand why can't we make a dashboard on Go with Streamlit or Dask. That will be a faster alternative. Why do you even need to spend 3 days when the job can be done in 3 hours https://streamlit.io/ https://streamlit.io/
- superzamp 6y agoI thinks this article packs several engineering lessons and that this part is one of them: > we worked on a custom layout which is similar to a bedside monitor interface. It's great they went that route and did their best to stick to what doctors know by heart, instead of going creative.
- AzzieElbab 6y agoI do not usually write posts like this, but I would never write an hl7 parser when things like hapi https://hapifhir.github.io/hapi-hl7v2/ https://hapifhir.github.io/hapi-hl7v2/ exist. It is not just a parser, tones of fields in hl7 messages have not obvious meanings and implications
- 3fe9a03ccd14ca5 6y agoThat would have taken care of the message parsing, but the team would still need to do the concurrency work, get it debugged, and working. Also Java is not nearly as easy to deploy on-prem as Go.
- AzzieElbab 6y agoInteresting point about deployment. Though I haven't worked in orgs that would just let you drop an arbitrary binary on servers
- snapetom 6y agoI used https://github.com/deoxxa/hl7 https://github.com/deoxxa/hl7 at my last job to grab HL7 messages out of central processing system. Regardless of the parser, I agree. Writing your own is dangerous. HL7 is deceptively complex. It leaves a lot of room for vendors and your hospital to customize. If you write your own, you can very easily end up with a system that is boxed in to your hospital's own, or even your department's own, implementation.
- HorizonXP 6y agoThis is really fantastic to see. I've been involved in contracts using HL7 protocol, and it's always a big and expensive beast with proprietary connectors. The fact that you figured it out so quickly is awesome.
- joshgel 6y agoAlso see: https://github.com/smarterdx/covid-19 https://github.com/smarterdx/covid-19 Similar concept with different data that we are deploying in US hospitals. Using React and Hasura.
- geeklord 6y agoWhat was the main factor for choosing Go instead of C or Java?
- Kaze404 6y agoWhat makes C or Java such better options that they had to have explicit reasons to use Go?
- KaoruAoiShiho 6y agoIt's probably because they existed when he first started learning programming.
- IshKebab 6y agoThere's a whole section in the article about that. C would be a pretty obviously terrible choice so I'm not sure why you would consider that. Java would be ok but Go is much simpler to get started with and to deploy. In general it is more lightweight and easier to use (unless you need generics, though Java doesn't really do those right either).
- vijaybritto 6y agoinstant feedback is possible in Go as it compiles super fast. Also its much simpler to write cause its a small language and the concurrency primitives are so simple to understand and use. It has its problems but its a great choice here. The most valid reason for using a language is simply because the team is comfortable with it.
- 3fe9a03ccd14ca5 6y agoConsidering they got it working so quickly, I think they made the right choice.
- capableweb 6y ago> instant feedback is possible in Go as it compiles super fast Heh, you should try a language that comes with a repl and allows you to evaluate code directly from your editor in any context and get the results back. Then you'll have experienced "instant feedback". Until then, I can agree that Golang compiles faster than other languages, but it's nowhere near instant. In some other languages, you don't really care how fast it compiles as you only do it for deployments anyways (like Clojure).
- kisanme 6y agoThis is a great implementation and you have done it real quickly. Great stuff!
- deleted 6y ago[deleted]
- deleted 6y ago[deleted]
- steve76 6y agoGreat work! Take a look at hospital run for the administration side of things: https://hospitalrun.io/ https://hospitalrun.io/
- naasking 6y agoIt's unfortunate "real-time" is getting so heavily overloaded. It used to mean "guaranteed bounded latency". "Real-time" is now being used for streaming APIs to mean "small latency on average, but no guarantees".
- egeozcan 6y agoIs there a more correct marketing term for "small latency on average, but no guarantees"?
- deleted 6y ago[deleted]
- junke 6y agosoft real-time https://en.wikipedia.org/wiki/Real-time_computing#Criteria_for_real-time_computing https://en.wikipedia.org/wiki/Real-time_computing#Criteria_f...
- airstrike 6y agoSome might argue that is the default meaning of "real-time" these days Maybe you guys ought to call hard real-time "Guaranteed bounded latency" when needed.
- mrits 6y agoI agree. In my experience it now means anything that could be shown during a sales demo without needing intentional pauses.
- PudgePacket 6y agoI assumed they used the words "real time" in a patient monitoring sense to mean Doctors being able to monitor patient data without having to go between rooms themselves or wait for reports. Kind of how you'd say you have a dashboard for your business to see metrics in real time (as opposed to some kind of daily report). I think that usage of real time is very common outside of a pure engineering sense, so you're being a bit of a stickler by being annoyed at this specific instance ;)
- SergeAx 6y agoGood job! I personally would take Grafana with Prometheus (as it has great Go library) and reduce the whole project to some kind of HL7 wrapper.
- ggregoire 6y agoMy thoughts too, but I'd not be surprised if they didn't know these tools existed. From my experience, Prometheus and Grafana (and monitoring practices and tools in general) are absolutely unknown to most developers.
- mfashby 6y agoThe developer here did a good job putting this together so quickly, and it's hopefully beneficial to the hospital staff and the patients themselves. I hope they keep working to improve it, and consider open sourcing it. The circumstances are pretty exceptional, two things shocked me a bit: 1. The manufacturer already produces remote monitoring software for the device but its _too expensive_ 2. Software like this is usually classed as a medical device, which comes with regulations (e.g. https://www.gov.uk/government/publications/medical-devices-software-applications-apps https://www.gov.uk/government/publications/medical-devices-s... in the UK)
- et2o 6y agoSoftware that merely displays data is not typically a medical device, as long as it doesn’t transform or otherwise alter the data.
- fhsm 6y agoUS only knowledge but in the US... This is (possibly depending on use) a biomedical device. These are regulated such that we pull separate cat5/6 and put up chain link in network closets. The Cisco switch in one side of that fence just vanilla corporate IT with email, EHR, Netflix etc; the same switch on the other side and all the stuff connected to it - from the bedside monitor out through the central alarm station - is a medical device. That isolation is the presumption referenced in the recent GE vulnerability [0] and the challenges of getting bio med chocolate in the corporate (ehr) peanut butter presents significant challenges [1]. [0] https://www.fda.gov/medical-devices/safety-communications/cybersecurity-vulnerabilities-certain-ge-healthcare-clinical-information-central-stations-and https://www.fda.gov/medical-devices/safety-communications/cy... [1] https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfStandards/detail.cfm?standard__identification_no=36409 https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfStandar...
- sergioisidoro 6y agoI just came here to say: Major credit to standards like HL7 (and other projects for ontologies like LOINC and SNOMED) HL7 and FHIR are a major step in interoperability for health, and they should not be taken for granted. I've worked with integration projects with EHR (Electronic health record) Systems, and a lot of hospitals still have proprietary formats for exchanging data with limited documentation. If you ever work on any health related system, consider starting from those standards!
- prostheticvamp 6y agoAs someone who was involved in the evolution of HL7 from the policy/medical side, I can tell you: EMR systems lock us (healthcare systems) into proprietary formats to make migration to new clients difficult; likewise, we don’t (didn’t) push for interoperability because exporting data to other healthcare systems cost us more than it benefited us (we didn’t fight it, we just weren’t gonna spend our money to make it happen). HL7 and other interoperability tech only emerged because CMS reps made their way to -a lot- of conferences and, with varying levels of bluntness, said “find a way to improve interoperability on your own, or you’ll see it show up in federal regs 12 months from now.” This is a change that came from active regulators doing their jobs correctly, in spite of the active efforts of the tech industry and the indifference of the hospital industry. So, I rarely say this but, thank you CMS.
- WrtCdEvrydy 6y ago> only emerged because CMS reps made their way to -a lot- of conferences and, with varying levels of bluntness I mean, to be honest, it makes sense... locked platforms are just death.. especially if you can't get your shit off it when it shuts down.
- fludlight 6y agoWhat's CMS? Centers for Medicare and Medicaid Services? https://www.cms.gov/ https://www.cms.gov/
- spenuke 6y ago
- kalleth 6y agoI apologise for this comment, you've done some great coding, but this scares the shit out of me. There's a reason medical certifications are so hard to get, and medical software is so expensive. You're storing patient information in postgres. What certifications do you have to assert that the patient data is stored securely, in line with your government guidelines on patient/medical data? There's a damn good reason this is the "holy grail" of information security certifications. You've got critical alerting built into the browser window using JavaScript. This "alerting" is the kind of critical thing that sometimes needs *immediate" intervention, or someone could die. What happens if your browser experiences a JavaScript error blocking processing? And your alerts don't fire? What happens if they fire too often and you get "alert fatigue" because they're not tuned correctly or in line with the other alerts available at the bedside/nursing station? How much testing have you done to correctly assert that you're interpreting the HL7 or other specs correctly? And aren't misinterpreting data for some conditions or types of individual? The "throw things together quickly" startup mentality might (I stress might!) Be okay where it's the difference between nothing at all and something that can save lives, in a country like Sri Lanka, during a global pandemic, fine. But afterwards, this is so much junk without serious thought and time put into certifying it. Medical, Aerospace -- really, any safety critical industry where your code working or not could mean someone is seriously injured or dies as a result -- is an industry that needs disruption, but that disruption should happen slowly, carefully, and safely.
- harikb 6y ago> We created this software on a request from healthcare staff If this is some small town hospital in Srilanka, the choice is between an unaffordable certified solution and not having any monitoring. If Medical software didn’t bleed them dry, they wouldn’t go this route. > disruption should happen slowly, carefully, and safely Disruption always happens this way - same way Uber broke existing laws. Yes, few people will die. But this isn’t surprising when the alternative is even worse.
- kalleth 6y ago> the choice is between an unaffordable certified solution and not having any monitoring. No, this isn't _necessarily_ the choice. Without a "false sense of security" that an imperfect monitoring system might instil, you have nurses and doctors actually doing rounds and checking their patients. > Disruption always happens this way - same way Uber broke existing laws. Yes, few people will die. But this isn’t new when the alternative is even worse. This is an absolutely horrible viewpoint to have. People dying because of "disruption" so a few companies can make a few more dollars is _never_ acceptable.
- parhamn 6y agoAnyone have any recs for a pulse oximeter you can hack on? I’ve been looking for one that wouldn’t be too difficult to connect to. I could barely find any of the old ones let a lone something that looks like it can be borderline portable.
- 2StepsOutOfLine 6y ago> Channels allow mutex free communication between goroutines without a pain. Channels are not lock free: https://github.com/golang/go/issues/8899 https://github.com/golang/go/issues/8899
- vchak1 6y agoIMHO, this would be a perfect application to build using Elixir and Phoenix LiveView. I think it would provide really robust realtime capabilities, and fits well with things like binary pattern matching that Elixir and Erlang handle well.
- innocentoldguy 6y agoI personally wouldn't use web technologies to write critical medical software, but if I did it would be in Elixir or Erlang for the optimized garbage collection and supervision trees. I agree with you on LiveView as well. I believe it would prove to be more reliable than client-side JavaScript.
- golemiprague 6y agoEvery technology is web technology if you use it for web stuff. Elixir is used also for other technologies, the underlying VM was written to manage real time communication base stations. If anything it might be one of the most suitable technologies for such a task since it was built exactly for handling recovery from failures and concurrency, regardless of how you want to display the data, in a browser or some other client.
- mister_hn 6y agoAlso something like a C++ core connected to sensors and InfluxDB+Grafana to display the data would be good.
- stephenboyd 6y agoWould a close-up cctv display of the bedside monitor have worked for this kind of remote monitoring? I write enterprise medical software for a living and if a hospital had told me they were desperate for a solution in 3 days, I would exhaust other options before writing new critical software.
- exdsq 6y agoThat's not a bad idea either! Webcam pointing at a bedside monitor and a clock (to check it's working correctly, not frozen, etc).
- OJFord 6y agoThat'd be a lot more data to push, and not be able to record specific data or alert on anything. I don't write enterprise medical software for a living, I just think hundreds (? thousands?) of video streams isn't necessarily more reliable or elegant in its simplicity than rushed out new software. There's always a (many) trade-off.
- johannes_ne 6y agoIf anyone need to view or record data from multiple medical devices, e.g. for research purposes, Vital Recorder is a quite well documented solution. It is free of cost, but unfortunately it is not open source. They also have a solution for an ICU like monitoring system with several beds, but I have not used this functionality. https://vitaldb.net/vital-recorder/ https://vitaldb.net/vital-recorder/
- alexbanks 6y agoIt's as though no one commenting negatively actually read this article. > We created this software on a request from healthcare staffs. It is not a commercial application. Even with this system, we strongly suggest doctors to visit their patients, take real measurements. As this software was developed fast due to prevailing pandemic situation, we released it with the most urgent feature monitoring. We tested this for long run, with multiple devices as well. So far it worked out well. It does not indicate this is perfect, we are working on improvements and fixing bugs until its very stable. Thus we have adviced doctors to use this with CAUTION It's almost as if the options were either "Do nothing" or "Do something", and they chose to "Do something." This does not sound at all like someone just decided to build their own version of a software they already had access to. It sounds very much like they could either make this software or try to get along without it.
- kalleth 6y agoI did read the article. I understand the desire to "do something", but the certification and testing process for something like this is how you find out if this actually improves patient outcomes or not. Sometimes "doing nothing" in a certain area gives a better outcome. I'm glad they're advising doctors to use caution. I have some architectural concerns about how it's built (a browser's javascript engine is not reliable enough to be used as a safety-critical alerting engine!), but I can see how it's attractive.
- deleted 6y ago[deleted]
- alexbanks 6y agoIt feels like you've lost the forest for the trees.
- im_down_w_otp 6y agoI expect there are a lot of viable and useful shades of grey in between official standards certified commercial products and from-scratch one-off Go/JavaScript. Even if they're going to roll their own rapid uncertified solution, they could have still done so with more reliable and proven technology than what they appear to have chosen to assemble this system. Many components for making safety-critical systems are commonly available in non-certified variants. These could be used to assemble a viable system, but would of course lack the process, practice, and evidence for certification that would normally be required. But, at least the technology choices would have, at a minimum, "proven in use" benefits if one is going to otherwise punt on the procedure & practice rigor that is typically applied. Given that most of the components to build a safety-critical system are commonly available, or their non-qualified kin are, it doesn't make much sense to me why if you were tasked with putting this together quickly and cheaply, but were still taking serious the safety-critical nature of it, why you would cobble it together with the stack chosen here. Even if the choice is "Do something" or "Do nothing", there's more than one way to "Do something", and this seems like a particularly odd way to have gone about it all things considered.
- BCATV 6y agoAs others have stated this kind of solution would not be accepted in europe or north america, but as the blog post stated this work was requested by local health authorities. If a place can not afford a solution developed by companies in the field I think this can be better than nothing. At least it is something that can be improved. It's a shame that solutions exist but there is not enough money to buy them.
- stonewhite 6y agoI think there are some redacted out parts of the blog. The difficulty with the "Realtime Result Interface" not using HL7 remained unaddressed. I'd like to read about those challenges as well.
- scared2 6y agoVery nice. But one question, what other languages do you know at a level of competence comparable to go?
- zoom6628 6y agoHats off to these students. Great job under time pressures and in realities of an environment in which one can't just spend your way to a solution. If only more people spent time building useful things like this instead of yet another cat monitor, new ways to waste more money without leaving the house, and other non-life-enhancing trivia. The collective skills out there are almost unlimited.....especially the incredible people who post and comment on HN. Please everyone reconsider the uses to which you put your amazing abilities. Code could change the world if we built more useful things, less blogs, less shopping carts. Closing point.... Once a project is dealing with hardware it's 20x harder. But the outcome is better. In code as in life, when faced with easy choice or hard, always take the hard one. It's how we grow as people and extend our skills.
- rud 6y agoJust one word: Bravo.
- kasvith 6y agothanks for sharing the article