This post comes to us from Dr. Tristan Jones who is an Emergency Physician working in Victoria, BC, Canada. He completed medical school in Calgary, and EM residency in Victoria through the University of British Columbia Island Program. Prior to medicine, he studied electrical engineering, and has been programming and developing software for over 20 years. Outside of clinical work, he runs several simulation-based education initiatives, and develops software at the intersection of medicine, education, and technology.
Medical simulation has become a fixture for most undergraduate and postgraduate medical training programs. It offers many benefits around team dynamics, manual skills, and medical decision-making. Designing cases for simulation is an involved process performed by expert clinicians and involves generating a variety of complex and clinically-realistic materials. SimLab (https://simlab.resuscitate.io) is an application for generating realistic lab test values and lab reports, representing various diseases, for use in medical simulation cases.
The Drudgery of Creating Lab Reports
Developing long lists of laboratory values for simulation cases is a tedious and error-prone task. Most clinicians do not memorize normal ranges for many laboratory tests, and instead rely on EMRs and lab reports to indicate out-of-range values. Furthermore, many lab tests are non-independent and related to other lab tests, or require correction for other lab results. Educators producing mock lab reports must frequently look up reference normal ranges, or remember to calculate or correct related lab values, processes that can lead to errors and in-simulation distraction from the topic at hand.
Regimented referencing and cataloguing is an area in which computer software excels. It is relatively trivial to generate normally-distributed random results, to maintain a database of normal ranges, and to calculate derived labs in a software program. We therefore set out to create a software package for generating simulated lab reports.
The Answer? SimLab
SimLab was conceived as an open-source, free to use web application for clinical medical educators. It runs inside a web browser using a combination of modern web technologies. Lab results are calculated as either normally-distributed values based on their generally accepted reference ranges [1, 2], or as derived values. Derived values are results that are linked to another lab result. For instance, hemoglobin and hematocrit vary together with a high correlation. Having a lab report with a hemoglobin of 65 g/L, but a hematocrit of 0.5 would be unrealistic. Instead, a hemoglobin is generated for the patient’s context, and the hematocrit is then derived from, or calculated on the basis of, the hemoglobin.
Lab results can also be manually modified by the user in order to override the generated defaults. This will also update any results that depend on the edited result (for instance, if hemoglobin is changed, hematocrit will update). This can be prevented by either locking a test result, or by overriding the derived test as well. The combination of these features allow any set of lab results to be created.
When users sign in, the application allows lab reports to be saved and loaded, so that reports can be created for future use. They can also be shared with other users with a link, allowing collaboration between educators.
Finally, the application produces a formatted lab list that can be printed to paper or to PDF and used in simulation cases. Results have flags such as high, low, critically high, critically low, or abnormal. They display appropriate units and decimal precision, increasing realism for trainees.
But What Does it Look Like?
The current version of SimLab boasts many features. Lab reports can be generated, values edited manually, and the results printed (Figure 1).
Figure 1: A lab report in the process of being created
Users can enter patient name, medical record number, and demographics, and demographic factors will affect lab results in a realistic fashion (e.g. pediatric patients have a different normal range for hemoglobin than adult patients). Tests can be ordered individually or in pre-specified order sets (Figures 2-3).
Figure 2: Tests and order sets settings box
Figure 3: Diseases settings box
Lab reports can be saved, updated, and loaded when a user is signed in, and shared with others with a copy-able link (Figure 4).
Figure 4: List of saved lab reports by user.
The application is currently being used in simulation cases in the Royal College of Physicians of Canada Emergency Medicine program in Victoria, British Columbia.
SimLab is currently in an alpha state, meaning that bugs exist, crashes can occur, and results can be lost. We are very excited to continue developing the application, and look forward to in-use feedback from users. There is a contact page in the application (accessible from the top bar), and we encourage anyone with feedback to use it to get in touch with us so that we can continue to improve the application.
There are a host of new features in development, including:
- Improved ABG calculation – currently values are estimated and can occasionally result in unrealistic results.
- Exporting of lab reports in PDF, Excel, and Word formats
- Changeable units for lab results – for instance, able to switch between U.S. and Canadian units for tests such as glucose.
- More lab tests
- More diseases
The project is open-source, and the source code can be viewed, downloaded, forked, and modified on GitHub (https://github.com/resusio). If you are clinician-developer, we would be excited to have a look at any Pull Requests you care to submit!