This Svelte application integrates with FHIR and SMART on FHIR to provide an interface for viewing patient details, medication requests, and lab results. The app handles OAuth2 authorization flow and interacts with the FHIR server to fetch and display data. Credits to Sidharth Ramesh of MedBlocks
Configuration file for the FHIR and SMART on FHIR integration. Contains constants for client ID, FHIR base URL, SMART URLs, and local storage keys.
Main Svelte component that handles the OAuth2 authorization flow and displays patient details. It includes components for patient details, medication details, and lab results.
Fetches and displays medication requests for a patient using FHIR R4. It uses the axios library to make HTTP requests.
Fetches and displays lab results for a patient using FHIR R4. It uses the axios library to make HTTP requests and displays observation details.
Fetches and displays patient details from the FHIR server. It uses the axios library to make HTTP requests.
Clone the repository:
git clone 'current repo'
cd svelte-fhir-app
Install dependencies:
npm install
Create a config.ts
file in the src
directory with your FHIR and OAuth2 credentials. Use the provided config.ts
as a reference.
Start the development server:
npm run dev
To build the app for production, run:
npm run build