This repository contains a prototype for the LUS4TB app—a React Native application built with Expo in the course of my master thesis. The app offers features to help healthcare workers in low- and middle-income countries (LMICs) assess the Tuberculosis (TB) risk of patients using the Butterfly Network point-of-care ultrasound.
LUS4TB aims to support healthcare workers by providing a tool to mainly:
- Enter Patient Information: Quickly input and manage patient details.
- Record Images (or Upload): Capture ultrasound images for specific anatomical key sites.
- Retrieve Predicted TB Risk: Automatically generate TB risk predictions based on ultrasound imaging.
The prototype was designed following a user-centered approach.
- Node.js: Download here.
- Expo: Install with
npm i expo
-
Clone the repository
-
Install dependencies
npm install
-
Start the app
npx expo start
In the output, you'll find options to open the app in a
- Android emulator
- iOS simulator
- Expo Go, a sandbox for trying out the app directly on your phone
-
Home Screen: The user initiates a new analysis, which creates an empty Examination object stored in global state.
-
New Analysis Screen: Patient data is collected via a form and saved in the global Examination context.
-
Image Acquisition: The user chooses a method: • Capture: Images are captured using a mock ultrasound tool. • Upload: Images are selected from the device’s gallery. The selected images are appended to the Examination object.
-
Analysis: The app simulates a TB risk analysis by generating random predictions, calculates overall risk, and updates the Examination object accordingly. The prototype does not include the AI models (Ultr-AI and Ultr-AI signs) at the time of submitting the thesis.
-
Result & Report Export: A report is generated (and can be exported as a PDF) based on the Examination data. The report includes patient info, symptoms, analysis results, and recommended actions.
-
Saving & Clearing Data: The final Examination data is saved (e.g., in AsyncStorage) and the global context is cleared to prepare for the next analysis.
All Tuberculosis risk thresholds, recommended actions, and the summary template are defined in src/config/tbRiskConfig.ts:
src/
├── app/ # Application screens (Home, NewAnalysis, Scan, etc.)
│ ├── index.tsx # Home screen of the application
│ ├── _layout.tsx # Main entry point for the application (root layout)
│ └── ...
├── assets/ # Static assets: images, fonts, etc.
├── components/ # Components grouped by screen or type
│ ├── ui/ # Reusable Gluestack UI components (Button, AlertDialog, Spinner, ect.)
│ └── ...
├── config/ # Configuration files (tbRiskConfig.ts, ect.)
├── context/ # Global state management (ExaminationContext, SettingsContext, ect.)
├── models/ # Data models and enums (Examination, Enums, ect.)
├── services/ # Data persistence (examinationService, imageService, ect.)
└── ...
![]() Home Screen |
![]() New Analysis |
![]() Image Option |
![]() Image Upload |
![]() Scan Helper |
![]() Scan Protocol |
![]() Result |
![]() Settings |
Due to time constraints, the Ultr-AI models were not integrated into the prototype during the course of the master’s thesis. Instead, a mock implementation was used as a placeholder. Additionally, the Butterfly Network SDK was not incorporated into the research study due to pricing limitations, and a mock version was implemented in the prototype as an alternative.
As part of the research done to develop a user-centered application for TB triage, some key features could be implemented in the future, including:
- Compute a pre-test probability of the TB risk of the patient based on the forms data, to refine the AI-based predicted TB risk
- User management
- Introduction flow to use when training staff on how to use the app
- Built with React Native, Expo and Gluestack.
- Icons provided by Ionicons, Expo, Gluestack.
- Special thanks to the Butterfly Network for inspiring point-of-care ultrasound innovations and to the global healthcare community for their continued work in LMICs!