HL7 FHIR · Capability

HL7 FHIR R4 Healthcare API — Encounter

HL7 FHIR R4 Healthcare API — Encounter. 1 operations. Lead operation: Search encounters. Self-contained Naftiko capability covering one Hl7 Fhir business surface.

Run with Naftiko Hl7 FhirEncounter

What You Can Do

GET
Searchencounter — Search encounters
/v1/encounter

MCP Tools

search-encounters

Search encounters

read-only idempotent

Capability Spec

r4-encounter.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: HL7 FHIR R4 Healthcare API — Encounter
  description: 'HL7 FHIR R4 Healthcare API — Encounter. 1 operations. Lead operation: Search encounters. Self-contained Naftiko
    capability covering one Hl7 Fhir business surface.'
  tags:
  - Hl7 Fhir
  - Encounter
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    HL7_FHIR_API_KEY: HL7_FHIR_API_KEY
capability:
  consumes:
  - type: http
    namespace: r4-encounter
    baseUri: https://fhir-server.example.com/fhir/R4
    description: HL7 FHIR R4 Healthcare API — Encounter business capability. Self-contained, no shared references.
    resources:
    - name: Encounter
      path: /Encounter
      operations:
      - name: searchencounter
        method: GET
        description: Search encounters
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: patient
          in: query
          type: string
        - name: status
          in: query
          type: string
        - name: class
          in: query
          type: string
          description: Encounter class code (AMB, IMP, EMER, etc.)
        - name: date
          in: query
          type: string
        - name: _count
          in: query
          type: integer
    authentication:
      type: bearer
      token: '{{env.HL7_FHIR_API_KEY}}'
  exposes:
  - type: rest
    namespace: r4-encounter-rest
    port: 8080
    description: REST adapter for HL7 FHIR R4 Healthcare API — Encounter. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/encounter
      name: encounter
      description: REST surface for Encounter.
      operations:
      - method: GET
        name: searchencounter
        description: Search encounters
        call: r4-encounter.searchencounter
        with:
          patient: rest.patient
          status: rest.status
          class: rest.class
          date: rest.date
          _count: rest._count
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: r4-encounter-mcp
    port: 9090
    transport: http
    description: MCP adapter for HL7 FHIR R4 Healthcare API — Encounter. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: search-encounters
      description: Search encounters
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: r4-encounter.searchencounter
      with:
        patient: tools.patient
        status: tools.status
        class: tools.class
        date: tools.date
        _count: tools._count
      outputParameters:
      - type: object
        mapping: $.