Healthcare Software
Input Validation Should Not Block Users
The Problem. Many healthcare applications deal with data entry, and the methods through which data is validated are important software development considerations. In short, treatment cannot be withheld because of the requirements of a software application.
For Example. A data entry form, such as a form that records patient demographics, typically has a set of required fields. Normally, the patient identifier, first name, last name, gender, phone number, address line 1, province, city, and postal code are required. It is possible, however, that a patient arrives by ambulance at the emergency department alone and is unable to speak. How can the patient be entered into the system if the software stubbornly requires fields that are not immediately necessary?
In practice, false information is usually entered and corrected once is the true identity of the patient is known. The solution is sloppy, but it gets the job done. In other situations, however, information cannot be corrected at a later date.
Consider worksheets in which questions are dependent on each other with rules such as “if Question 2 is answered, then Question 3 must be answered too.” If the situation arises in which the user answers Question 2, but is unable to answer Question 3, the application and the user can be indefinitely blocked. In the case where Question 3 is a radio button list or a drop down list, any false answer provided will conflict with legitimate answers. Once data like this enters the database, analysis becomes difficult since the two types of answers – the false and the legitimate – will be indistinguishable.
Solution. Good healthcare applications keep the number of required fields to a minimum, ensure that only the most important information is required, or give users the option to skip the input field. When a patient is undergoing a test or is sitting in a consultation room, information may not be known and the delivery of care must be allowed to proceed.
In other cases, a patient may prefer to not provide certain information when they do not feel comfortable proceeding with a test or measurement. Since a patient can conceivably reject any portion of a test, every field should be optional in this case. Even if the patient does not stay for a test, the technician or physician must still record the fact that the patient arrived and refused to do the test.
Since other parts of an application or form may depend on fields that are left blank, software developers must ensure that the application can still function without error or alert the user that the data is missing. There must also be provisions in place to manage the incomplete data so that it can be entered once it is known. In the case of the patient who cannot speak upon emergency room admission, the information can be obtained from the patient’s family or from the patient himself once he can speak. If the patient refuses a portion of a test, any automated statistics or reports generated from the data collected from the visit must either indicate the refusal to participate or be adjusted so that the application can still function properly.
To summarize, effective input validation in a healthcare environment should follow these input validation best practices:
- Input validation should not block users from submitting a form.
- Keep the number of required fields to a minimum. A field should only be required if its absence obviates the form in its entirety.
- Provide defaults or other mechanisms to handle when data cannot be provided instead of requiring the data to be entered.
- Users should be able to skip questions and complete them later, however dependence between questions should be functional in that there is no way for one to be answered without the other being answered first.
- Data quality checks should account for incomplete or ‘fake’ placeholder data and advise users to complete the data entry once the values are known.
- Downstream data consumers must continue to function and raise alerts in case they are fed with incomplete data.
By understanding the range of possible validation errors and the risks associated with them, your team can ensure that medical care is never delayed because of a software requirement.
About the Author
Quintin has an extensive software development background in clinical applications and business intelligence.