{
  "resourceType" : "OperationDefinition",
  "id" : "get-offers-context",
  "text" : {
    "status" : "generated",
    "div" : "<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.\nIf omitted or false, ActivityDefinitionPortal resources are not included.</p>\n</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.\nIf omitted or false, HealthcareServicePortal resources are not included.</p>\n</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.\nIf omitted or false, PractitionerRolePortal resources are not included.</p>\n</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>\n</div></td></tr></table></div>"
  },
  "url" : "https://canonical.fhir.link/servicewell/wof-portal/OperationDefinition/get-offers-context",
  "version" : "1.0.0",
  "name" : "GetOffersContext",
  "title" : "$getOffersContext — Booking Content Context",
  "status" : "active",
  "kind" : "operation",
  "date" : "2026-04-21T14:21:21+00:00",
  "publisher" : "Service Well AB",
  "contact" : [{
    "name" : "Service Well AB",
    "telecom" : [{
      "system" : "url",
      "value" : "https://servicewell.se"
    },
    {
      "system" : "email",
      "value" : "info@servicewell.se"
    }]
  },
  {
    "name" : "Service well",
    "telecom" : [{
      "system" : "email",
      "value" : "info@servicewell.se",
      "use" : "work"
    }]
  }],
  "description" : "`$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.  \nIt may include ActivityDefinitionPortal, HealthcareServicePortal, PractitionerRolePortal and OfferPortal.  \nIt MUST NOT include Schedule, Slot, or bookable time slots.  \n\nThis operation returns a **profiled Bundle** that may include:\n\n- `ActivityDefinitionPortal` (what is being offered)\n- `HealthcareServicePortal` (where / which clinic service offers it)\n- `PractitionerRolePortal` (who can perform it)\n- **Offer** resources (a lightweight “relation + settings” object)\n\nThe response is intentionally shaped for **fast content rendering**, not for scheduling.\n",
  "code" : "get-offers-context",
  "resource" : ["ActivityDefinition",
  "HealthcareService",
  "PractitionerRole"],
  "system" : true,
  "type" : false,
  "instance" : true,
  "parameter" : [{
    "name" : "includeActivityDefinitionPortal",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "If true, the response Bundle SHALL include ActivityDefinitionPortal resources.\nIf omitted or false, ActivityDefinitionPortal resources are not included.",
    "type" : "boolean"
  },
  {
    "name" : "includeHealthcareServicePortal",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "If true, the response Bundle SHALL include HealthcareServicePortal resources.\nIf omitted or false, HealthcareServicePortal resources are not included.",
    "type" : "boolean"
  },
  {
    "name" : "includePractitionerRolePortal",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "If true, the response Bundle SHALL include PractitionerRolePortal resources.\nIf omitted or false, PractitionerRolePortal resources are not included.",
    "type" : "boolean"
  },
  {
    "name" : "return",
    "use" : "out",
    "min" : 1,
    "max" : "1",
    "documentation" : "A profiled Bundle containing offers context resources.",
    "type" : "Bundle",
    "targetProfile" : ["https://canonical.fhir.link/servicewell/wof-portal/StructureDefinition/BundleOffersContextPortal"]
  }]
}