{
  "resourceType": "OperationDefinition",
  "id": "Composition-document",
  "text": {
    "status": "generated",
    "div": "\u003cdiv xmlns\u003d\"http://www.w3.org/1999/xhtml\"\u003e\u003cp class\u003d\"res-header-id\"\u003e\u003cb\u003eGenerated Narrative: OperationDefinition Composition-document\u003c/b\u003e\u003c/p\u003e\u003ca name\u003d\"Composition-document\"\u003e \u003c/a\u003e\u003ca name\u003d\"hcComposition-document\"\u003e \u003c/a\u003e\u003cp\u003eURL: [base]/Composition/[id]/$document\u003c/p\u003e\u003ch3\u003eParameters\u003c/h3\u003e\u003ctable class\u003d\"grid\"\u003e\u003ctr\u003e\u003ctd\u003e\u003cb\u003eUse\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eName\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eScope\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eCardinality\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eType\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eBinding\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eDocumentation\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eIN\u003c/td\u003e\u003ctd\u003epersist\u003c/td\u003e\u003ctd/\u003e\u003ctd\u003e0..1\u003c/td\u003e\u003ctd\u003e\u003ca href\u003d\"datatypes.html#boolean\"\u003eboolean\u003c/a\u003e\u003c/td\u003e\u003ctd/\u003e\u003ctd\u003e\u003cdiv\u003e\u003cp\u003eWhether to store the document at the bundle end-point (/Bundle) or not once it is generated. Value \u003d true or false (default is for the server to decide). If the document is stored, its location can be inferred from the Bundle.id, but it SHOULD be provided explicitly in the HTTP Location header in the response\u003c/p\u003e\n\u003c/div\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eIN\u003c/td\u003e\u003ctd\u003egraph\u003c/td\u003e\u003ctd/\u003e\u003ctd\u003e0..1\u003c/td\u003e\u003ctd\u003e\u003ca href\u003d\"datatypes.html#uri\"\u003euri\u003c/a\u003e\u003c/td\u003e\u003ctd/\u003e\u003ctd\u003e\u003cdiv\u003e\u003cp\u003eCanonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a \u003ca href\u003d\"http://build.fhir.org/HL7/api-incubator/StructureDefinition-GraphDefinition\"\u003eGraphDefinition\u003c/a\u003e that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources\u003c/p\u003e\n\u003c/div\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eOUT\u003c/td\u003e\u003ctd\u003ereturn\u003c/td\u003e\u003ctd/\u003e\u003ctd\u003e1..1\u003c/td\u003e\u003ctd\u003e\u003ca href\u003d\"bundle.html\"\u003eBundle\u003c/a\u003e\u003c/td\u003e\u003ctd/\u003e\u003ctd\u003e\u003cdiv\u003e\u003cp\u003eThe bundle containing the composition and resources associated with it. See \u003ca href\u003d\"documents.html\"\u003eFHIR Documents\u003c/a\u003e for information on resources that may be included in the bundle.\u003c/p\u003e\n\u003c/div\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\u003cdiv\u003e\u003cp\u003eNotes:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eThe server implementing the operation SHOULD determine a \u0027high-level water-mark\u0027 for the document security tags (\u003ca href\u003d\"resource.html#Meta\"\u003eBundle.meta.security\u003c/a\u003e)) as a whole, based on an analysis of the resources contained within the document\u003c/li\u003e\n\u003cli\u003ethis operation definition does not resolve the question how document signatures are created. This is an open issue during the period of trial use, and feedback is requested regarding this question\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/div\u003e\u003c/div\u003e"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 2
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "normative"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "sd"
    }
  ],
  "url": "http://hl7.org/fhir/OperationDefinition/Composition-document",
  "version": "6.0.0-ballot4",
  "name": "Document",
  "title": "Generate a Document",
  "status": "active",
  "kind": "operation",
  "experimental": false,
  "date": "2026-05-20T15:02:53+00:00",
  "publisher": "HL7 International / Structured Documents",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org/fhir"
        },
        {
          "system": "email",
          "value": "fhir@lists.hl7.org"
        }
      ]
    },
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/structure"
        }
      ]
    }
  ],
  "description": "A client can ask a server to generate a fully bundled document from a composition resource. The server takes the composition resource, locates all the referenced resources and other additional resources as configured or requested and either returns a full document bundle, or returns an error. If some of the resources are located on other servers, it is at the discretion of the  server whether to retrieve them or return an error. If the correct version of the document  that would be generated already exists, then the server can return the existing one.",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code": "001",
          "display": "World"
        }
      ]
    }
  ],
  "affectsState": false,
  "code": "document",
  "comment": "Notes:\n\n* The server implementing the operation SHOULD determine a \u0027high-level water-mark\u0027 for the document security tags ([Bundle.meta.security](resource.html#Meta))) as a whole, based on an analysis of the resources contained within the document\n* this operation definition does not resolve the question how document signatures are created. This is an open issue during the period of trial use, and feedback is requested regarding this question",
  "resource": [
    "Composition"
  ],
  "system": false,
  "type": false,
  "instance": true,
  "parameter": [
    {
      "name": "persist",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "Whether to store the document at the bundle end-point (/Bundle) or not once it is generated. Value \u003d true or false (default is for the server to decide). If the document is stored, its location can be inferred from the Bundle.id, but it SHOULD be provided explicitly in the HTTP Location header in the response",
      "type": "boolean"
    },
    {
      "name": "graph",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [GraphDefinition](http://build.fhir.org/HL7/api-incubator/StructureDefinition-GraphDefinition) that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources",
      "type": "uri"
    },
    {
      "name": "return",
      "use": "out",
      "min": 1,
      "max": "1",
      "documentation": "The bundle containing the composition and resources associated with it. See [FHIR Documents](documents.html) for information on resources that may be included in the bundle.",
      "type": "Bundle"
    }
  ]
}