@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<https://canonical.fhir.link/servicewell/wof-portal/OperationDefinition/get-offers-context> a fhir:OperationDefinition ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "get-offers-context"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<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]/$getOffersContext</p><p>URL: [base]/ActivityDefinition/$getOffersContext</p><p>URL: [base]/ActivityDefinition/[id]/$getOffersContext</p><p>URL: [base]/HealthcareService/$getOffersContext</p><p>URL: [base]/HealthcareService/[id]/$getOffersContext</p><p>URL: [base]/PractitionerRole/$getOffersContext</p><p>URL: [base]/PractitionerRole/[id]/$getOffersContext</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>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:url [
     fhir:v "https://canonical.fhir.link/servicewell/wof-portal/OperationDefinition/get-offers-context"^^xsd:anyURI ;
     fhir:l <https://canonical.fhir.link/servicewell/wof-portal/OperationDefinition/get-offers-context>
  ] ; # 
  fhir:version [ fhir:v "0.1.0"] ; # 
  fhir:name [ fhir:v "GetOffersContext"] ; # 
  fhir:title [ fhir:v "$getOffersContext — Booking Content Context"] ; # 
  fhir:status [ fhir:v "active"] ; # 
  fhir:kind [ fhir:v "operation"] ; # 
  fhir:date [ fhir:v "2026-03-17T08:51:45+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "Service Well AB"] ; # 
  fhir:contact ( [
     fhir:name [ fhir:v "Service Well AB" ] ;
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "https://servicewell.se" ]
     ] [
       fhir:system [ fhir:v "email" ] ;
       fhir:value [ fhir:v "info@servicewell.se" ]
     ] )
  ] ) ; # 
  fhir:description [ fhir:v "`$getOffersContext` 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"] ; # 
  fhir:code [ fhir:v "getOffersContext"] ; # 
  fhir:resource ( [ fhir:v "ActivityDefinition"] [ fhir:v "HealthcareService"] [ fhir:v "PractitionerRole"] ) ; # 
  fhir:system [ fhir:v true] ; # 
  fhir:type [ fhir:v true] ; # 
  fhir:instance [ fhir:v true] ; # 
  fhir:parameter ( [
     fhir:name [ fhir:v "includeActivityDefinitionPortal" ] ;
     fhir:use [ fhir:v "in" ] ;
     fhir:min [ fhir:v 0 ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:documentation [ fhir:v "If true, the response Bundle SHALL include ActivityDefinitionPortal resources.\nIf omitted or false, ActivityDefinitionPortal resources are not included." ] ;
     fhir:type [ fhir:v "boolean" ]
  ] [
     fhir:name [ fhir:v "includeHealthcareServicePortal" ] ;
     fhir:use [ fhir:v "in" ] ;
     fhir:min [ fhir:v 0 ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:documentation [ fhir:v "If true, the response Bundle SHALL include HealthcareServicePortal resources.\nIf omitted or false, HealthcareServicePortal resources are not included." ] ;
     fhir:type [ fhir:v "boolean" ]
  ] [
     fhir:name [ fhir:v "includePractitionerRolePortal" ] ;
     fhir:use [ fhir:v "in" ] ;
     fhir:min [ fhir:v 0 ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:documentation [ fhir:v "If true, the response Bundle SHALL include PractitionerRolePortal resources.\nIf omitted or false, PractitionerRolePortal resources are not included." ] ;
     fhir:type [ fhir:v "boolean" ]
  ] [
     fhir:name [ fhir:v "return" ] ;
     fhir:use [ fhir:v "out" ] ;
     fhir:min [ fhir:v 1 ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:documentation [ fhir:v "A profiled Bundle containing offers context resources." ] ;
     fhir:type [ fhir:v "Bundle" ] ;
     fhir:targetProfile ( [
       fhir:v "https://canonical.fhir.link/servicewell/wof-portal/StructureDefinition/BundleOffersContextPortal"^^xsd:anyURI ;
       fhir:l <https://canonical.fhir.link/servicewell/wof-portal/StructureDefinition/BundleOffersContextPortal>
     ] )
  ] ) . # 

# -------------------------------------------------------------------------------------

