{"id":30776275,"url":"https://github.com/vintasoftware/topology-mobile","last_synced_at":"2025-09-05T04:35:00.079Z","repository":{"id":286672301,"uuid":"958575569","full_name":"vintasoftware/topology-mobile","owner":"vintasoftware","description":"This application demonstrates how to build a patient-facing healthcare app that can securely connect to Epic and other EMR systems through the SMARTerFHIR toolkit 🩺🔧","archived":false,"fork":false,"pushed_at":"2025-04-17T17:33:18.000Z","size":6250,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-18T04:21:28.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vintasoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-01T12:25:26.000Z","updated_at":"2025-04-17T17:33:23.000Z","dependencies_parsed_at":"2025-04-07T19:52:59.916Z","dependency_job_id":null,"html_url":"https://github.com/vintasoftware/topology-mobile","commit_stats":null,"previous_names":["vintasoftware/topology-mobile"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vintasoftware/topology-mobile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Ftopology-mobile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Ftopology-mobile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Ftopology-mobile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Ftopology-mobile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vintasoftware","download_url":"https://codeload.github.com/vintasoftware/topology-mobile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Ftopology-mobile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273713468,"owners_count":25154609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-05T04:32:29.878Z","updated_at":"2025-09-05T04:35:00.046Z","avatar_url":"https://github.com/vintasoftware.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Topology Mobile\n\nThis application demonstrates how to build a patient-facing healthcare app that can securely connect to Epic and other EMR systems through the [SMARTerFHIR toolkit](https://github.com/TopologyHealth/SMARTerFHIR).\n\n## Demo video\n\n\u003cdiv align=\"center\"\u003e\n  \u003cvideo src=\"https://github.com/user-attachments/assets/7fc97bb0-c0fe-4fe1-8b7f-4ba55b80a58f\" /\u003e\n\u003c/div\u003e\n\n## Key Features\n\n- OAuth2 Authentication with Epic and other EMR systems\n- Patient data retrieval and display\n- View patient health information including:\n- Conditions and Practitioners\n  - Health goals\n  - Diagnostics\n  - Upcoming appointments\n  - Health metrics\n  - Medications\n- AI-powered chat interface using OpenAI\n\n### Application Content\n\nThe following screenshots showcase the key features of the Topology Mobile application powered by the SMARTerFHIR toolkit.\n\n| ![Initial login screen](images/login.png) | ![Epic login screen](images/epic-login.png) | ![Authorization screen](images/allow-access.png) |\n| :---------------------------------------: | :-----------------------------------------: | :----------------------------------------------: |\n|                Epic Login                 |              Application Login              |               OAuth2 Authorization               |\n\n| ![Patient dashboard](images/home-screen.png) | ![Alternative dashboard view](images/alternative-home.png) | ![Health metrics and medications](images/medications-health-metrics.png) |\n| :------------------------------------------: | :--------------------------------------------------------: | :----------------------------------------------------------------------: |\n|              Patient Dashboard               |                Dashboard (Alternative View)                |                       Health Metrics \u0026 Medications                       |\n\n| ![AI Assistant first message](images/chat1.jpg) | ![AI Assistant answering about epic data](images/chat2.jpg) | ![AI Assistant extrapolation](images/chat3.jpg) |\n| :---------------------------------------------: | :---------------------------------------------------------: | :---------------------------------------------: |\n|                AI Assistant Chat                |           AI Assistant answering about epic data            |           AI Assistant extrapolation            |\n\n### About Topology Health\n\nTopology Health has a set of tools for faster and easier EMR/EHR integration. https://github.com/TopologyHealth\n\n## Get started\n\n### Prerequisites\n\n- [Expo CLI](https://docs.expo.dev/)\n- npm or yarn\n- iOS Simulator (for iOS) or Android Emulator (for Android)\n- OpenAI API access via proxy (This example uses [Backmesh](https://backmesh.com))\n\n### Install\n\n1. Install dependencies\n\n   ```bash\n   npm install\n   ```\n\n2. Start the app\n\n   ```bash\n    npx expo start\n   ```\n\nIn the output, you'll find options to open the app in a\n\n- [development build](https://docs.expo.dev/develop/development-builds/introduction/)\n- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)\n- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)\n- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo\n\nYou can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).\n\n3. Copy the `.env.local.example` file to `.env`\n\n   ```bash\n   cp .env.local.example .env\n   ```\n\n4. Fill in the values in the `.env` file:\n\n   ```bash\n   EXPO_PUBLIC_EMR_CLIENT_ID=your_web_client_id\n   EXPO_PUBLIC_REDIRECT_URL=your_app_redirect_url\n   EXPO_PUBLIC_BACKMESH_URL=your_openai_proxy_url\n   EXPO_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key\n   EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain\n   EXPO_PUBLIC_FIREBASE_PROJECT_ID=your_firebase_project_id\n   ```\n\n### Development Setup\n\nThe project uses ESLint, Prettier, and Husky for code quality and consistency. Install Husky pre-commit hooks:\n\n```bash\nnpm run prepare\n```\n\n### Configuring Epic OAuth2\n\n1. Create a account on https://fhir.epic.com/Developer/\n\n2. Inside your developer view, create a new App\n\n   1. Create two new client applications, one for web and one for native.\n   2. Set the Redirect URI to `http://localhost:8081` for the web client and something like `exp://192.168.???.???:8081` for the native client.\n      - Run `npm start`, run the app on your device with Expo Go, and check the \"Redirect URL: ...\" log message in the terminal to get the IP address to use.\n   3. After creating the two new client applications, copy the client ID from both.\n\n3. Configure environment variables.\n\n### OpenAI Configuration\n\nThe application uses `openai-react-native` for chat functionality. As recommended by [openai-react-native](https://github.com/backmesh/openai-react-native), we use a proxy server to secure the OpenAI API key. Here's how it's configured:\n\n```typescript\nconst client = new OpenAI({\n  baseURL: process.env.EXPO_PUBLIC_BACKMESH_URL!,\n  apiKey: await creds.user.getIdToken(), // Using Firebase auth token\n});\n```\n\n⚠️ **Security Note**: Never expose your OpenAI API key directly in the mobile app. Always use a proxy server.\n\n## Learn more\n\nTo learn more about developing your project with Expo, look at the following resources:\n\n- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).\n- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.\n\n## License\n\nThis project is licensed under the MIT License - see the `LICENSE.txt` file for details.\n\n## Commercial Support\n\n[![alt text](https://avatars2.githubusercontent.com/u/5529080?s=80\u0026v=4 \"Vinta Logo\")](https://www.vintasoftware.com/)\n\nThis is an open-source project maintained by [Vinta Software](https://www.vinta.com.br/). We are always looking for exciting work! If you need any commercial support, feel free to get in touch: contact@vinta.com.br\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvintasoftware%2Ftopology-mobile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvintasoftware%2Ftopology-mobile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvintasoftware%2Ftopology-mobile/lists"}