<OperationDefinition xmlns="http://hl7.org/fhir">
  <id value="digidot-operation-digidot-context" />
  <url value="https://novari.no/fhir/digidot/OperationDefinition/digidot-context" />
  <version value="0.1.0" />
  <name value="DigiDOTContext" />
  <title value="DigiDOT patient context operation" />
  <status value="draft" />
  <kind value="operation" />
  <date value="2026-07-31" />
  <publisher value="Novari AS - DigiDOT" />
  <description value="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 value="false" />
  <code value="digidot-context" />
  <resource value="Patient" />
  <system value="false" />
  <type value="false" />
  <instance value="true" />
  <parameter>
    <name value="include-external" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <documentation value="Whether the server should include configured external context sources when legally and technically available." />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="force-refresh" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <documentation value="Whether the integration layer should attempt fresh source lookups instead of using cache when allowed." />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="since" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <documentation value="Optional lower time boundary for local DigiDOT history." />
    <type value="dateTime" />
  </parameter>
  <parameter>
    <name value="return" />
    <use value="out" />
    <min value="1" />
    <max value="1" />
    <documentation value="Bundle with patient context resources. External resources must be source-aware and carry freshness/provenance metadata when available." />
    <type value="Bundle" />
  </parameter>
</OperationDefinition>