A modern web application for loading and viewing FHIR CapabilityStatement data in a human-readable format.
- URL Input: Load FHIR CapabilityStatement data from any FHIR server endpoint
- Human-Readable Display: Organized presentation of complex FHIR capability data
- Tabbed Interface: Easy navigation through different aspects of the capability statement:
- Resources: Supported FHIR resources with their interactions and search parameters
- Interactions: System and resource-level interactions
- Operations: FHIR operations supported by the server
- Search Parameters: Detailed search capabilities by resource type
- Security: Security configuration and requirements
- Raw Data: Complete JSON data for technical review
- Responsive Design: Works on desktop, tablet, and mobile devices
- Error Handling: Clear error messages for network issues or invalid data
- CORS Proxy Support: Built-in support for server-side proxy to bypass CORS restrictions
Many FHIR servers have CORS restrictions that prevent direct browser access. This application includes:
- Automatic Fallback: Tries direct connection first, then falls back to CORS proxies
- Server-Side Proxy: Python-based proxy (no dependencies!) for production deployments
- Third-Party Proxies: Uses
api.allorigins.winandcorsproxy.ioas fallbacks
If users report "CONNECTION FAILED" errors, deploy the included Python proxy:
# Quick setup (5 minutes)
python3 proxy-server.py 3001See QUICKSTART.md for 5-minute deployment guide.
See PROXY_SETUP.md for detailed configuration.
- A modern web browser (Chrome, Firefox, Safari, Edge)
- Internet connection to fetch FHIR CapabilityStatement data
- Clone or download this repository
- Open
index.htmlin your web browser - Enter a FHIR CapabilityStatement URL and click "Load CapabilityStatement"
https://fhirr4sandbox.webch.art/webchart.cgi/fhir/metadata(WebChart FHIR R4 Sandbox)https://hapi.fhir.org/baseR4/metadata(HAPI FHIR Test Server)https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4/metadata(Epic FHIR)
- Enter URL: Input the FHIR CapabilityStatement endpoint URL
- Load Data: Click "Load CapabilityStatement" or press Enter
- Explore: Use the tabs to navigate through different sections:
- View supported resources and their capabilities
- Check available interactions and operations
- Review search parameters for each resource type
- Examine security requirements
- Access raw JSON data
FHIR_CapStatViewer/
├── index.html # Main HTML file
├── styles.css # CSS styling
├── app.js # JavaScript application logic
├── README.md # This file
└── .github/
└── copilot-instructions.md # Development guidelines
- Frontend: HTML5, CSS3, ES6+ JavaScript
- API Communication: Fetch API with CORS support
- Data Format: FHIR R4 CapabilityStatement JSON
- Browser Compatibility: Modern browsers supporting ES6+
- FHIRCapabilityViewer Class: Main application controller
- Data Fetching: Handles HTTP requests with proper error handling
- Data Parsing: Extracts and organizes FHIR capability data
- UI Rendering: Dynamic content generation for different data views
- Responsive Design: Mobile-first CSS with flexbox and grid layouts
The application can be extended to support:
- Additional FHIR resource types
- Custom data visualization
- Export functionality
- Multiple CapabilityStatement comparison
- Integration with FHIR testing tools
This tool runs entirely in the browser and is subject to web browser security policies:
- CORS Restrictions: Cannot make authenticated requests to FHIR servers that don't allow cross-origin requests
- Authentication Testing: Limited to FHIR servers that either:
- Allow CORS from the hosting domain, or
- Are hosted on the same domain as this tool
- Proxy Limitations: CORS proxies cannot forward authentication headers for security reasons
To test FHIR endpoints with Bearer tokens on CORS-restricted servers, you would need:
- Server-hosted version: Deploy this tool on the same domain as your FHIR server
- Backend proxy: Create a server-side service that forwards authenticated requests
- CORS configuration: Have FHIR server administrators add appropriate CORS headers
- Alternative tools: Use Postman, curl, or other non-browser tools for authenticated testing
- Chrome 60+
- Firefox 55+
- Safari 12+
- Edge 79+
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source and available under the MIT License.
For issues or questions:
- Check the browser console for error messages
- Verify the FHIR endpoint is accessible and returns valid JSON
- Ensure CORS is properly configured on the FHIR server
- Review the FHIR specification for CapabilityStatement format