{
  "resourceType": "OperationDefinition",
  "id": "test-digidot-operation-digidot-context",
  "url": "https://novari.no/fhir/digidot/OperationDefinition/digidot-context",
  "version": "0.1.0-test",
  "name": "DigiDOTContext",
  "title": "DigiDOT patient context operation",
  "status": "draft",
  "kind": "operation",
  "date": "2026-07-31",
  "publisher": "Novari AS - DigiDOT",
  "description": "Test operation for patient opening. Returns local DigiDOT dental history combined with selected source-aware external context such as allergy, critical information, SFM medication context, patient summary and imaging metadata.",
  "affectsState": false,
  "code": "digidot-context",
  "resource": [
    "Patient"
  ],
  "system": false,
  "type": false,
  "instance": true,
  "parameter": [
    {
      "name": "include-external",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "Whether the server should include configured external context sources when legally and technically available.",
      "type": "boolean"
    },
    {
      "name": "force-refresh",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "Whether the integration layer should attempt fresh source lookups instead of using cache when allowed.",
      "type": "boolean"
    },
    {
      "name": "since",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "Optional lower time boundary for local DigiDOT history.",
      "type": "dateTime"
    },
    {
      "name": "return",
      "use": "out",
      "min": 1,
      "max": "1",
      "documentation": "Bundle with patient context resources. External resources must be source-aware and carry freshness/provenance metadata when available.",
      "type": "Bundle"
    }
  ]
}