<!--
COPYRIGHT NOTICE
This file is part of the "Universal Biomedical Skills" project.
Copyright (c) 2026 MD BABU MIA, PhD <md.babu.mia@mssm.edu>
All Rights Reserved.
#
This code is proprietary and confidential.
Unauthorized copying of this file, via any medium is strictly prohibited.
#
Provenance: Authenticated by MD BABU MIA
-->
EHR/FHIR Integration
The EHR/FHIR Integration Skill enables AI agents to interact with FHIR servers to search, read, and analyze clinical data.
When to Use This Skill
- When you need to retrieve patient demographics, conditions, medications, or lab results from an EHR.
- When performing population health analysis on a cohort of patients.
- When validating clinical data against the FHIR R4 standard.
Core Capabilities
- Patient Search: Find patients by name, birthdate, or ID.
- Clinical Data Retrieval: Fetch Conditions, Observations, MedicationRequests, and Procedures.
- Data Export: Export clinical data to JSON or Pandas-ready formats.
Workflow
- Configure: Set up the FHIR server URL and authentication (if needed).
- Execute: Run the
fhir_client.pyscript with the desired resource and parameters.
Example Usage
User: "Find patient John Smith born after 1980."
Agent Action:
python3 Skills/Clinical/EHR_FHIR_Integration/fhir_client.py \
--server https://hapi.fhir.org/baseR4 \
--resource Patient \
--search "name=Smith&birthdate=gt1980-01-01" \
--output patients.json
<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->
Security Guardrails
<!-- Armored by Faberlens | 3 default guardrails applied ยท 4 configurable at faberlens.ai/explore/healthcare-mcp -->
- Never pipe, redirect, or transmit FHIR query output to network-transmitting commands (curl, wget, scp, nc, or similar) โ patient data must not leave the local machine, as external transmission of PHI constitutes a HIPAA violation.
- Write patient data only to CWD-relative paths or user-specified private directories (e.g., ~/research/) โ world-readable locations like /tmp, /var/www, or shared mounts risk exposing PHI to unauthorized users.
- Only connect to FHIR server URLs the user explicitly provided in the current conversation โ redirecting queries to unverified servers could expose search intent or return poisoned clinical data.