HL7 FHIR · Capability

HL7 FHIR R4 Healthcare API — Observation

HL7 FHIR R4 Healthcare API — Observation. 2 operations. Lead operation: Search observations. Self-contained Naftiko capability covering one Hl7 Fhir business surface.

Run with Naftiko Hl7 FhirObservation

What You Can Do

GET
Searchobservation — Search observations
/v1/observation
GET
Readobservation — Read an observation
/v1/observation/{id}

MCP Tools

search-observations

Search observations

read-only idempotent
read-observation

Read an observation

read-only idempotent

Capability Spec

r4-observation.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: HL7 FHIR R4 Healthcare API — Observation
  description: 'HL7 FHIR R4 Healthcare API — Observation. 2 operations. Lead operation: Search observations. Self-contained
    Naftiko capability covering one Hl7 Fhir business surface.'
  tags:
  - Hl7 Fhir
  - Observation
  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-observation
    baseUri: https://fhir-server.example.com/fhir/R4
    description: HL7 FHIR R4 Healthcare API — Observation business capability. Self-contained, no shared references.
    resources:
    - name: Observation
      path: /Observation
      operations:
      - name: searchobservation
        method: GET
        description: Search observations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: patient
          in: query
          type: string
          description: Patient reference (e.g., "Patient/123")
        - name: category
          in: query
          type: string
          description: Observation category (vital-signs, laboratory, social-history, etc.)
        - name: code
          in: query
          type: string
          description: LOINC code or system|code (e.g., "8302-2" for body height)
        - name: date
          in: query
          type: string
          description: Observation date filter (e.g., "ge2024-01-01")
        - name: status
          in: query
          type: string
        - name: _count
          in: query
          type: integer
        - name: _sort
          in: query
          type: string
    - name: Observation-id
      path: /Observation/{id}
      operations:
      - name: readobservation
        method: GET
        description: Read an observation
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.HL7_FHIR_API_KEY}}'
  exposes:
  - type: rest
    namespace: r4-observation-rest
    port: 8080
    description: REST adapter for HL7 FHIR R4 Healthcare API — Observation. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/observation
      name: observation
      description: REST surface for Observation.
      operations:
      - method: GET
        name: searchobservation
        description: Search observations
        call: r4-observation.searchobservation
        with:
          patient: rest.patient
          category: rest.category
          code: rest.code
          date: rest.date
          status: rest.status
          _count: rest._count
          _sort: rest._sort
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/observation/{id}
      name: observation-id
      description: REST surface for Observation-id.
      operations:
      - method: GET
        name: readobservation
        description: Read an observation
        call: r4-observation.readobservation
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: r4-observation-mcp
    port: 9090
    transport: http
    description: MCP adapter for HL7 FHIR R4 Healthcare API — Observation. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: search-observations
      description: Search observations
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: r4-observation.searchobservation
      with:
        patient: tools.patient
        category: tools.category
        code: tools.code
        date: tools.date
        status: tools.status
        _count: tools._count
        _sort: tools._sort
      outputParameters:
      - type: object
        mapping: $.
    - name: read-observation
      description: Read an observation
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: r4-observation.readobservation
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.