Electronics for the Sick
This article reviews the embedded software technology that drives much of what goes into today's new medical devices and systems and how this thriving application area is pushing developments in other areas. It will also assess new challenges ahead in medical systems and how embedded developers can leverage existing techniques and devices to deal with them.
We are surrounded by embedded systems in our homes, our workplaces and while traveling between them. Some of the systems are useful and convenient; others are just for fun. But some systems are life-savers and walking into a hospital, that is what surrounds you. Even if you are not involved in the development of medical systems, their development is interesting. Medical is a very fast growing sector and the systems bring together a significant number of key embedded software technologies and techniques. A non-exhaustive list:
- connectivity – including wireless
- security and data integrity
- graphical user interfaces
- power management
- short time to market
- bill of materials optimization to cut costs
Why is medical system development so vibrant?
What are the key driving factors in health care that are influencing the development of medical instrumentation? Quality of care issues, where healthcare consumers have steadily increasing expectations, are good starting point.
Traditionally, initial diagnosis has been based on an assessment of the symptoms presented by the patient. Although this is still a valuable parameter, there are many tests that can clarify the diagnosis. Historically, these have taken time, but modern electronics can make results available immediately.
For example, it used to be common for a dentist to take an X-ray of a tooth and the patient would need to come back another day, when the film had been processed. Nowadays, electronic imaging makes the result available instantly. Better and faster diagnosis is a great way to improve treatment.
Increasingly, medical practitioners are advocating preventative measures. This has always made sense, but instrumentation enables much more informed advice to be dispensed.
All over the world, people are living longer and fewer babies are being born. This results in the mean age of a citizen becoming higher. Older people have increased medical needs and this puts a strain on healthcare delivery systems. Electronics can help by automating monitoring, so that an aging person’s heart, for example, can be checked much more frequently without using up a doctor’s valuable time. Only when an anomalous result is detected is there a need for the patient to be assessed by a doctor.
Appropriate instruments can enable patients to monitor their own health and diagnose conditions. Obvious examples here are blood pressure checking and diabetic blood sugar stabilization.
There is an interesting paradox with healthcare records. Although it is clearly in a patient’s interest that healthcare professionals have access to their records straightforwardly, when they are needed, the privacy of this information is considered to be of paramount importance. In the United States, the Health Insurance Portability and Accountability Act provides the basis for the management of such information and encourages the widespread use of electronic data interchange, as this provides the best mix of availability, usability and security of the data. Similar legislation is enacted in many other countries. Clearly, patients may benefit significantly if the electronic records and medical instrumentation are part of an integrated system.
Of course, in any business, cost is a very significant issue. In healthcare there are pressures from both governments and insurance providers to drive down costs. Electronic instruments can enable lower healthcare costs, but they in turn come under price pressure. The developers have particular challenges that mean cost containment can be tough, while attending to required certification and so forth. It is not just the cost of providing instruments either. Ongoing running costs are just as important. Devices should be cheap to maintain and keep in service. Obviously, power consumption must be minimized.
Another important issue is the location in which healthcare activity takes place. It is natural to think first of a room or ward in a hospital and, indeed, this is a significant site for medical instrumentation to be located. But it is just one of many.
Older patients and those with certain chronic conditions may be cared for in facilities outside of a conventional hospital – a care home for the elderly, for example. This is a place where medical electronics will be widely deployed.
Much equipment is required to be highly portable, as it is transported in ambulances or in the vehicles of paramedics and first responders. Also, it is not uncommon to have mobile units, which are moved around to provide health screening on a neighborhood basis.
Nowadays, whenever possible, overnight hospital stays are avoided for a number of reasons and patients are treated either in outpatient units of the hospital or elsewhere on a day case basis. It is also quite likely that equipment may be sent with the patient or installed in their home to monitor or treat their health condition.
And lastly, there is the place in which nobody wants to find themselves: the Emergency Room. We are all familiar from TV shows with the inside of an ER, where there are inevitably numerous flashing lights and beeping instruments.
Medical system technologies and techniques
Given this understanding of the medical instrumentation landscape, we can review the technologies and techniques that are vital to successful development of devices in this sector.
We have established that connectivity is a key requirement, but the needs go way beyond Ethernet or USB. These are valid options, but there is a fast growing demand for wireless connectivity.
As in the home, wireless networking is very convenient in a medical facility – it might be Wi-Fi or a point-to-point technology like ZigBee or Bluetooth (particularly Low Energy). But the requirement goes beyond convenience. Hygiene is a big issue for obvious reasons and keeping hospitals clean is a constant challenge. Trailing cables are an impediment to efficient cleaning, so wireless wins out.
Obviously, the highest levels of security must be applied to all connectivity, both to protect confidential information and avoid corruption of data and possible system malfunctions.
When a patient is away from medical facilities – at home or out and about – wireless connectivity is still useful for ongoing monitoring. Wi-Fi may be a continuing possibility, but the use of cellular telephony gives much greater reach.
Security and data integrity
A file system is probably required, but just selecting the cheapest DOS-compatible product is unwise. The file system must be thread safe, secure and robust enough to preserve data integrity under adverse conditions. Typically flash memory is used and secure flash support is available from a number of OS vendors.
Graphical user interfaces
From the embedded software perspective, the big trend in medical devices is the need for much more software to facilitate display graphics and a graphical user interface.
The UI on a medical device is much more than a “nice to have”. It can be a life saver. Devices that are easy and intuitive to use contribute significantly to patient safety. Imagine a tired doctor setting up a sophisticated instrument – minimizing user error is paramount. Also, patients are reassured if an instrument displays information that they can readily understand.
The implementation of state of the art graphics is very challenging. Some developers immediately assume that use of Android or Windows CE is essential to achieve good results, but selecting either of these operating systems, simply on this basis, is unwise. Most RTOS vendors offer graphics options and the open source world is also worth investigating, as Qt, for example, is becoming very popular.
For portable devices, power consumption has an obvious effect on battery life and, hence, device availability. But low power is also desirable to avoid excessive heat dissipation and resulting load on air conditioning systems. Historically, power was a purely hardware issue, but that is set to change.
To optimize power consumption, the behavior of the electronics must be adjusted according to the functional needs of the moment. The software “knows” what is required at any time and is, therefore, ideally placed to optimize for power. Key approaches are the use of Dynamic Voltage and Frequency Scaling (DVFS), which adjusts the performance (and, hence, the power consumption) of the CPU, switching off unused logic blocks and peripherals and the deployment of low power (“sleep”) modes offered by many modern processors.
Short time to market
Although by no means unique to medical devices, there is a strong incentive to get new products to market quickly. In the healthcare sector, technology can transition from the lab to the open market very rapidly, so the embedded software market must keep pace. There are two ways to minimize development time: do not reinvent any wheels – use off the shelf software components whenever possible; ensure that you have top notch tools that enable efficient debugging and verification of the code.
Many – possible most – medical devices need to be certified for clinical use by bodies such as the FDA. This is an expensive process, the cost of which is significantly affected by the amount of code that needs to be reviewed. This code includes reusable IP, like an operating system. Clearly, the more compact the OS code is, the smaller the effect that it has on the certification costs.
Bill of materials optimization to cut costs
Price is an issue with almost any kind of product, but, with some medical devices, very large volumes are anticipated so unit production cost needs to be optimized. It is well understood that the development of software is expensive and the selling price of a device must deliver revenue to offset those costs. However, software can also have an effect on the unit cost. There are broadly two factors – one technical the other commercial.
If the code is very efficient, it can be executed on a lower performance (i.e. cheaper) CPU, which saves money. In-house code will be efficient if the developers are well trained and they use optimal development tools. Bought in software should be selected for efficiency – an RTOS is likely to need less resources that a full-featured OS. Code size – of both in-house and bought-in software – is equally important as less memory means less cost.
From a commercial perspective, the licensing of reusable software components needs to be carefully reviewed. Open source may be attractive, but ongoing support costs should be factored in. With a purely commercial product, license terms need to be negotiated – maybe royalty free or some kind of per-project licensing may be best.
Medical devices are of interest to everyone, at some time or another. To the embedded software developer, they encapsulate a great many of the technologies and techniques that characterize modern embedded systems development.
Colin Walls has over thirty years experience in the electronics industry, largely dedicated to embedded software. A frequent presenter at conferences and seminars and author of numerous technical articles and two books on embedded software, Colin is an embedded software technologist with Mentor Embedded [the Mentor Graphics Embedded Software Division], and is based in the UK. His regular blog is at blogs.mentor.com/colinwalls. He may be reached by email at firstname.lastname@example.org.