A React-based FHIR (Fast Healthcare Interoperability Resources) bundle viewer with support for NHCX (National Health Claims Exchange) workflows. Visualize and explore FHIR resources with an intuitive, user-friendly interface.
✅ Configurable Data Sources - Switch between local files and remote API
✅ NHCX Workflow Support - Coverage Eligibility, Pre-Authorization, Claims, Insurance Plans
✅ Visual Workflow Timelines - Track request/response progress
✅ Resource Explorer - Browse all resources in a bundle with detailed views
✅ Special Renderers - Custom displays for Insurance Plans, Eligibility, Claims
✅ Type-Safe - Full TypeScript support
npm installnpm run devOpen http://localhost:5173 in your browser.
npm run buildPlace FHIR bundle JSON files in the /resources directory. The app will automatically discover and load them.
Supported file patterns:
claimReq.json,claimResp.jsoneligibilityCheckReq.json,eligibilityCheckResp.jsonpreAuthReq.json,preAuthResp.jsoninsurancePlanReq.json,insurancePlanResp.json
Switch to loading bundles from a remote API:
- Create a
.envfile:
cp .env.example .env- Configure your API:
VITE_DATA_SOURCE_TYPE=api
VITE_DATA_SOURCE_API_URL=https://your-api.com/fhir/v1- Restart the dev server
Your API should implement:
GET /bundles- List available bundlesGET /bundles/{id}- Get a specific bundle
See DATA_SOURCE_GUIDE.md for detailed API requirements.
src/
├── components/ # React components
│ ├── FHIRRenderer.tsx # Main bundle viewer
│ ├── NHCXWorkflowComponents.tsx # Workflow UI components
│ ├── FHIRRenderer.css # Styles for renderer
│ └── NHCXWorkflow.css # Styles for workflows
├── config/ # Configuration
│ ├── dataSourceConfig.ts # Data source settings
│ └── nhcxConfig.ts # NHCX API settings
├── services/ # API and data services
│ ├── dataService.ts # Unified data loader
│ └── nhcxApiService.ts # NHCX API client
├── types/ # TypeScript types
│ └── fhir.ts # FHIR resource types
└── utils/ # Helper functions
└── nhcxWorkflow.ts # Workflow utilities
- Bundle - Collection of resources
- Patient - Patient demographics
- Organization - Healthcare providers, payers
- Practitioner - Healthcare professionals
- InsurancePlan - Insurance plan details with benefits
- Coverage - Insurance coverage
- CoverageEligibilityRequest - Eligibility check request
- CoverageEligibilityResponse - Eligibility check response
- Claim - Medical claim submission
- ClaimResponse - Claim processing response
- Condition - Medical conditions/diagnoses
- Procedure - Medical procedures
Verify patient eligibility and coverage benefits before treatment.
Request approval for planned procedures or treatments.
Submit claims for completed services and receive adjudication.
Browse available insurance plans and their benefits.
| Variable | Default | Description |
|---|---|---|
VITE_DATA_SOURCE_TYPE |
local |
Data source: local or api |
VITE_DATA_SOURCE_API_URL |
- | API base URL |
VITE_DATA_SOURCE_API_TIMEOUT |
30000 |
API timeout (ms) |
VITE_LOCAL_RESOURCE_PATH |
/resources |
Local files path |
VITE_NHCX_API_BASE_URL |
- | NHCX API endpoint |
- React 18 - UI framework
- TypeScript - Type safety
- Vite - Build tool
- CSS3 - Styling
- Use TypeScript for all new files
- Follow existing naming conventions
- Add JSDoc comments for public APIs
- Keep components focused and reusable
- Add resource type to
getResourceIcon()inFHIRRenderer.tsx - Add special handling in
renderResourceDetails()if needed - Update
detectBundleMetadata()indataService.tsfor auto-detection
Local source:
- Verify files exist in
/resourcesdirectory - Check JSON files are valid FHIR bundles
- Ensure file names match expected patterns
API source:
- Verify
VITE_DATA_SOURCE_API_URLis set correctly - Check API is accessible
- Verify API returns proper JSON format
- Check browser console for CORS errors
# Clear cache and rebuild
rm -rf dist node_modules
npm install
npm run build- DATA_SOURCE_GUIDE.md - Complete data source configuration guide
- .env.example - Environment variable templates
MIT
Contributions are welcome! Please ensure:
- Code builds without errors (
npm run build) - TypeScript types are properly defined
- New features include documentation
- Code follows existing style
For issues or questions, please create an issue in the repository.