<?xml version="1.0" encoding="UTF-8"?>

<OperationDefinition xmlns="http://hl7.org/fhir">
  <id value="get-offers-context"/>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: OperationDefinition get-offers-context</b></p><a name="get-offers-context"> </a><a name="hcget-offers-context"> </a><p>URL: [base]/$get-offers-context</p><p>URL: [base]/ActivityDefinition/[id]/$get-offers-context</p><p>URL: [base]/HealthcareService/[id]/$get-offers-context</p><p>URL: [base]/PractitionerRole/[id]/$get-offers-context</p><h3>Parameters</h3><table class="grid"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>includeActivityDefinitionPortal</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#boolean">boolean</a></td><td/><td><div><p>If true, the response Bundle SHALL include ActivityDefinitionPortal resources.
If omitted or false, ActivityDefinitionPortal resources are not included.</p>
</div></td></tr><tr><td>IN</td><td>includeHealthcareServicePortal</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#boolean">boolean</a></td><td/><td><div><p>If true, the response Bundle SHALL include HealthcareServicePortal resources.
If omitted or false, HealthcareServicePortal resources are not included.</p>
</div></td></tr><tr><td>IN</td><td>includePractitionerRolePortal</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#boolean">boolean</a></td><td/><td><div><p>If true, the response Bundle SHALL include PractitionerRolePortal resources.
If omitted or false, PractitionerRolePortal resources are not included.</p>
</div></td></tr><tr><td>OUT</td><td>return</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/bundle.html">Bundle</a> (<a href="StructureDefinition-BundleOffersContextPortal.html" title="https://canonical.fhir.link/servicewell/wof-portal/StructureDefinition/BundleOffersContextPortal">Bundle (Offers Context) — WOF Portal</a>)</td><td/><td><div><p>A profiled Bundle containing offers context resources.</p>
</div></td></tr></table></div>
  </text>
  <url value="https://canonical.fhir.link/servicewell/wof-portal/OperationDefinition/get-offers-context"/>
  <version value="1.0.0"/>
  <name value="GetOffersContext"/>
  <title value="$getOffersContext — Booking Content Context"/>
  <status value="active"/>
  <kind value="operation"/>
  <date value="2026-04-21T14:24:10+00:00"/>
  <publisher value="Service Well AB"/>
  <contact>
    <name value="Service Well AB"/>
    <telecom>
      <system value="url"/>
      <value value="https://servicewell.se"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="info@servicewell.se"/>
    </telecom>
  </contact>
  <contact>
    <name value="Service well"/>
    <telecom>
      <system value="email"/>
      <value value="info@servicewell.se"/>
      <use value="work"/>
    </telecom>
  </contact>
  <description value="`$get-offers-context` is a **read-oriented** FHIR operation designed to let a frontend **quickly populate booking content** so a patient can choose *what* to book and *with whom/where* — without needing multiple round-trips.  &#xA;It may include ActivityDefinitionPortal, HealthcareServicePortal, PractitionerRolePortal and OfferPortal.  &#xA;It MUST NOT include Schedule, Slot, or bookable time slots.  &#xA;&#xA;This operation returns a **profiled Bundle** that may include:&#xA;&#xA;- `ActivityDefinitionPortal` (what is being offered)&#xA;- `HealthcareServicePortal` (where / which clinic service offers it)&#xA;- `PractitionerRolePortal` (who can perform it)&#xA;- **Offer** resources (a lightweight “relation + settings” object)&#xA;&#xA;The response is intentionally shaped for **fast content rendering**, not for scheduling.&#xA;"/>
  <code value="get-offers-context"/>
  <resource value="ActivityDefinition"/>
  <resource value="HealthcareService"/>
  <resource value="PractitionerRole"/>
  <system value="true"/>
  <type value="false"/>
  <instance value="true"/>
  <parameter>
    <name value="includeActivityDefinitionPortal"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="If true, the response Bundle SHALL include ActivityDefinitionPortal resources.&#xA;If omitted or false, ActivityDefinitionPortal resources are not included."/>
    <type value="boolean"/>
  </parameter>
  <parameter>
    <name value="includeHealthcareServicePortal"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="If true, the response Bundle SHALL include HealthcareServicePortal resources.&#xA;If omitted or false, HealthcareServicePortal resources are not included."/>
    <type value="boolean"/>
  </parameter>
  <parameter>
    <name value="includePractitionerRolePortal"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="If true, the response Bundle SHALL include PractitionerRolePortal resources.&#xA;If omitted or false, PractitionerRolePortal resources are not included."/>
    <type value="boolean"/>
  </parameter>
  <parameter>
    <name value="return"/>
    <use value="out"/>
    <min value="1"/>
    <max value="1"/>
    <documentation value="A profiled Bundle containing offers context resources."/>
    <type value="Bundle"/>
    <targetProfile value="https://canonical.fhir.link/servicewell/wof-portal/StructureDefinition/BundleOffersContextPortal"/>
  </parameter>
</OperationDefinition>