Read or search FHIR resources

GET/fhir-provider/{fhir_provider_id}/fhir/{fhir_path}

Retrieves FHIR resources from the specified provider. Supports both individual resource retrieval (e.g. Patient/123 via the path) and search operations.

FHIR search parameters are passed through to the upstream server verbatim as native query-string parameters; this proxy does not model, validate, or transform them. Append standard FHIR search parameters directly to the request URL. Supported parameters include:

  • Resource-specific search parameters (e.g. name for Patient, status for Observation)
  • Common search parameters (_id, _lastUpdated, _tag, _profile, _security, _text, _content, _filter)
  • Result parameters (_count, _offset, _sort, _include, _revinclude, _summary, _elements)
  • Search prefixes for dates, numbers, and quantities (eq, ne, gt, ge, lt, le, sa, eb, ap)

Examples:

  • Patient?name=John%20Doe&_count=10&_sort=family
  • Observation?patient=Patient/123&date=ge2023-01-01&category=vital-signs&_sort=-date

When using a generated SDK, supply these via the client's request-level query-parameter option (the SDK escape hatch) rather than a typed argument.

The request is proxied to the configured FHIR server with appropriate authentication headers.

RequiresBearerauthentication

Header parameters

X-Phenoml-On-Behalf-Ofstringoptional

Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity. Must be in the format: Patient/{uuid} or Practitioner/{uuid}

X-Phenoml-Fhir-Providerstringoptional

Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}. Multiple FHIR provider integrations can be provided as comma-separated values.

Path parameters

fhir_provider_idstringrequired

The ID of the FHIR provider to use. Can be either:

  • A UUID representing the provider ID
  • A provider name (legacy support - will just use the most recently updated provider with this name)
fhir_pathstringrequired

The FHIR resource path to operate on. This follows FHIR RESTful API conventions. Examples:

  • "Patient" (for resource type operations)
  • "Patient/123" (for specific resource operations)
  • "Patient/123/_history" (for history operations)
Returns  

Successfully retrieved FHIR resource(s)

Response fields

resourceTypestringoptional
totalintegeroptional
entryarray<object>optional
resourceobjectoptional
resourceTypestringoptional
idstringoptional
namearray<object>optional
familystringoptional
givenarray<string>optional
GETRequest
curl 'https://experiment.app.pheno.ml/fhir-provider/%7Bfhir_provider_id%7D/fhir/%7Bfhir_path%7D' \
  -H 'Authorization: Bearer YOUR_API_KEY'
200 OKResponse
{
  "resourceType": "Bundle",
  "total": 2,
  "entry": [
    {
      "resource": {
        "resourceType": "Patient",
        "id": "123",
        "name": [
          {
            "family": "Doe",
            "given": [
              "John"
            ]
          }
        ]
      }
    }
  ]
}