{
  "resourceType": "StructureDefinition",
  "id": "composition-block-data",
  "url": "https://fhir.apps.health/StructureDefinition/composition-block-data",
  "name": "CompositionBlockData",
  "title": "Composition Block Data Extension",
  "status": "draft",
  "description": "One section's structured value, for a render kind whose value is more than the narrative\nbeside it.\n\nAn `Attachment`, whose `contentType` says what the payload is -- typically\n`application/json` -- because the shape belongs to the render kind rather than to this\nspecification and R4 has no element typed for it. This is the section's own structured value, NOT\nits structured clinical content: `Composition.section.entry` is that, and the two are expected to\ncoexist on one section.\n\n**REACH FOR SDC FIRST.** Where a render kind is really a FORM -- a screening instrument, an intake\nquestionnaire -- the modelled answer already exists and is not this extension: a `Questionnaire`\nplus a `QuestionnaireResponse`, which is the problem SDC was written to solve and which gets you\n`section.entry` for free.\n\nThe test is what the block's values ARE, not how the block looks. A block whose values are answers\nto its own questions is a form, and belongs in SDC however plain it renders. A block that writes\neach value to the chart record that owns it as the value is recorded -- an Observation, a vital, a\nProcedure -- is not a form however form-like it renders: those values are clinical facts in the\nrecord already, and what the block stores here is that visit's account of them. Use this extension\nfor a payload that is genuinely a render kind's own state and not a set of answers to questions.\n\n**Why an Attachment and not a bare string.** A JSON string in a `valueString` is self-describing to\nnobody: a reader cannot tell what it holds without recognising the render kind first, and no\npublished international IG carries editor state that way. `Attachment` is what R4 already provides\nfor an opaque payload, and `contentType` makes the envelope readable even where the contents are\nnot. A `text` section needs none of this at all.\n\n**The narrative is authoritative for reading.** A consumer that has never heard of the render kind\nrenders `section.text` and is not missing clinical content, so nothing a reader needs may live only\nin here. A value that cannot be parsed reads as no structured value rather than as an error: one\nmalformed section must not put a whole clinical document out of reach. **Unreadable is not absent**\n-- a writer that cannot parse a stored value must round-trip it untouched rather than drop it.\n\n**FIRST PASS.** The canonical is settled on the same terms as `composition-block-type`. One design\nquestion is not: whether a render kind's structured value belongs in an extension at all, or in\n`Composition.section.entry`, which this guide already nominates as a section's structured\ncounterpart. They hold different things today, for the reasons given above. The evidence that would\nsettle it is a render kind that promotes its own facts to `entry` on save -- a vitals block is the\nobvious first -- because that is the case where the two would genuinely overlap.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    }
  ],
  "kind": "complex-type",
  "abstract": false,
  "context": [
    {
      "type": "element",
      "expression": "Composition.section"
    }
  ],
  "type": "Extension",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation": "constraint",
  "snapshot": {
    "element": [
      {
        "id": "Extension",
        "path": "Extension",
        "short": "Composition Block Data Extension",
        "definition": "One section's structured value, for a render kind whose value is more than the narrative\nbeside it.\n\nAn `Attachment`, whose `contentType` says what the payload is -- typically\n`application/json` -- because the shape belongs to the render kind rather than to this\nspecification and R4 has no element typed for it. This is the section's own structured value, NOT\nits structured clinical content: `Composition.section.entry` is that, and the two are expected to\ncoexist on one section.\n\n**REACH FOR SDC FIRST.** Where a render kind is really a FORM -- a screening instrument, an intake\nquestionnaire -- the modelled answer already exists and is not this extension: a `Questionnaire`\nplus a `QuestionnaireResponse`, which is the problem SDC was written to solve and which gets you\n`section.entry` for free.\n\nThe test is what the block's values ARE, not how the block looks. A block whose values are answers\nto its own questions is a form, and belongs in SDC however plain it renders. A block that writes\neach value to the chart record that owns it as the value is recorded -- an Observation, a vital, a\nProcedure -- is not a form however form-like it renders: those values are clinical facts in the\nrecord already, and what the block stores here is that visit's account of them. Use this extension\nfor a payload that is genuinely a render kind's own state and not a set of answers to questions.\n\n**Why an Attachment and not a bare string.** A JSON string in a `valueString` is self-describing to\nnobody: a reader cannot tell what it holds without recognising the render kind first, and no\npublished international IG carries editor state that way. `Attachment` is what R4 already provides\nfor an opaque payload, and `contentType` makes the envelope readable even where the contents are\nnot. A `text` section needs none of this at all.\n\n**The narrative is authoritative for reading.** A consumer that has never heard of the render kind\nrenders `section.text` and is not missing clinical content, so nothing a reader needs may live only\nin here. A value that cannot be parsed reads as no structured value rather than as an error: one\nmalformed section must not put a whole clinical document out of reach. **Unreadable is not absent**\n-- a writer that cannot parse a stored value must round-trip it untouched rather than drop it.\n\n**FIRST PASS.** The canonical is settled on the same terms as `composition-block-type`. One design\nquestion is not: whether a render kind's structured value belongs in an extension at all, or in\n`Composition.section.entry`, which this guide already nominates as a section's structured\ncounterpart. They hold different things today, for the reasons given above. The evidence that would\nsettle it is a render kind that promotes its own facts to `entry` on save -- a vitals block is the\nobvious first -- because that is the case where the two would genuinely overlap.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Extension",
          "min": 0,
          "max": "*"
        },
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
          }
        ],
        "isModifier": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Extension.id",
        "path": "Extension.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "http://hl7.org/fhirpath/System.String",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ]
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Extension.extension",
        "path": "Extension.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "0",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Extension.url",
        "path": "Extension.url",
        "representation": [
          "xmlAttr"
        ],
        "short": "identifies the meaning of the extension",
        "definition": "Source of the definition for the extension code - a logical name or a URL.",
        "comment": "The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Extension.url",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "http://hl7.org/fhirpath/System.String",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "uri"
              }
            ]
          }
        ],
        "fixedUri": "https://fhir.apps.health/StructureDefinition/composition-block-data",
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Extension.value[x]",
        "path": "Extension.value[x]",
        "short": "The render kind's own structured value, as a typed attachment",
        "definition": "The section's own structured value. `contentType` says what the payload is -- `application/json` for a kind carrying a JSON object -- so the envelope is readable even where the contents are not described here. Readers that do not recognise the render kind ignore this element and render the section narrative instead; a reader that cannot PARSE it must still write it back unchanged, because unreadable and absent are different facts.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Extension.value[x]",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Attachment"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Extension.value[x].id",
        "path": "Extension.value[x].id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "http://hl7.org/fhirpath/System.String",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ]
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Extension.value[x].extension",
        "path": "Extension.value[x].extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Extension.value[x].contentType",
        "path": "Extension.value[x].contentType",
        "short": "What the payload is; `application/json` for a JSON kind",
        "definition": "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.",
        "requirements": "Processors of the data need to be able to know how to interpret the data.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Attachment.contentType",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "example": [
          {
            "label": "General",
            "valueCode": "text/plain; charset=UTF-8, image/png"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MimeType"
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
              "valueBoolean": true
            }
          ],
          "strength": "required",
          "description": "The mime type of an attachment. Any valid mime type is allowed.",
          "valueSet": "http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used"
          },
          {
            "identity": "rim",
            "map": "./mediaType, ./charset"
          }
        ]
      },
      {
        "id": "Extension.value[x].language",
        "path": "Extension.value[x].language",
        "short": "Human language of the content (BCP-47)",
        "definition": "The human language of the content. The value can be any valid value according to BCP 47.",
        "requirements": "Users need to be able to choose between the languages in a set of attachments.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Attachment.language",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "example": [
          {
            "label": "General",
            "valueCode": "en-AU"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
              "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages"
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "Language"
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
              "valueBoolean": true
            }
          ],
          "strength": "preferred",
          "description": "A human language.",
          "valueSet": "http://hl7.org/fhir/ValueSet/languages"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "./language"
          }
        ]
      },
      {
        "id": "Extension.value[x].data",
        "path": "Extension.value[x].data",
        "short": "The payload itself, base64-encoded per R4",
        "definition": "The actual data of the attachment - a sequence of bytes, base64 encoded.",
        "comment": "The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON.",
        "requirements": "The data needs to able to be transmitted inline.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Attachment.data",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "base64Binary"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "v2",
            "map": "ED.5"
          },
          {
            "identity": "rim",
            "map": "./data"
          }
        ]
      },
      {
        "id": "Extension.value[x].url",
        "path": "Extension.value[x].url",
        "short": "Uri where the data can be found",
        "definition": "A location where the data can be accessed.",
        "comment": "If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data.",
        "requirements": "The data needs to be transmitted by reference.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Attachment.url",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "url"
          }
        ],
        "example": [
          {
            "label": "General",
            "valueUrl": "http://www.acme.com/logo-small.png"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "RP.1+RP.2 - if they refer to a URL (see v2.6)"
          },
          {
            "identity": "rim",
            "map": "./reference/literal"
          }
        ]
      },
      {
        "id": "Extension.value[x].size",
        "path": "Extension.value[x].size",
        "short": "Number of bytes of content (if url provided)",
        "definition": "The number of bytes of data that make up this attachment (before base64 encoding, if that is done).",
        "comment": "The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference.",
        "requirements": "Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Attachment.size",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "unsignedInt"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A (needs data type R3 proposal)"
          }
        ]
      },
      {
        "id": "Extension.value[x].hash",
        "path": "Extension.value[x].hash",
        "short": "Hash of the data (sha-1, base64ed)",
        "definition": "The calculated hash of the data using SHA-1. Represented using base64.",
        "comment": "The hash is calculated on the data prior to base64 encoding, if the data is based64 encoded. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see [Provenance.signature](provenance-definitions.html#Provenance.signature) for mechanism to protect a resource with a digital signature.",
        "requirements": "Included so that applications can verify that the contents of a location have not changed due to technical failures (e.g., storage rot, transport glitch, incorrect version).",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Attachment.hash",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "base64Binary"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".integrityCheck[parent::ED/integrityCheckAlgorithm=\"SHA-1\"]"
          }
        ]
      },
      {
        "id": "Extension.value[x].title",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Extension.value[x].title",
        "short": "Label to display in place of the data",
        "definition": "A label or set of text to display in place of the data.",
        "requirements": "Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Attachment.title",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "example": [
          {
            "label": "General",
            "valueString": "Official Corporate Logo"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "./title/data"
          }
        ]
      },
      {
        "id": "Extension.value[x].creation",
        "path": "Extension.value[x].creation",
        "short": "Date attachment was first created",
        "definition": "The date that the attachment was first created.",
        "requirements": "This is often tracked as an integrity issue for use of the attachment.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Attachment.creation",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A (needs data type R3 proposal)"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "Extension",
        "path": "Extension",
        "short": "Composition Block Data Extension",
        "definition": "One section's structured value, for a render kind whose value is more than the narrative\nbeside it.\n\nAn `Attachment`, whose `contentType` says what the payload is -- typically\n`application/json` -- because the shape belongs to the render kind rather than to this\nspecification and R4 has no element typed for it. This is the section's own structured value, NOT\nits structured clinical content: `Composition.section.entry` is that, and the two are expected to\ncoexist on one section.\n\n**REACH FOR SDC FIRST.** Where a render kind is really a FORM -- a screening instrument, an intake\nquestionnaire -- the modelled answer already exists and is not this extension: a `Questionnaire`\nplus a `QuestionnaireResponse`, which is the problem SDC was written to solve and which gets you\n`section.entry` for free.\n\nThe test is what the block's values ARE, not how the block looks. A block whose values are answers\nto its own questions is a form, and belongs in SDC however plain it renders. A block that writes\neach value to the chart record that owns it as the value is recorded -- an Observation, a vital, a\nProcedure -- is not a form however form-like it renders: those values are clinical facts in the\nrecord already, and what the block stores here is that visit's account of them. Use this extension\nfor a payload that is genuinely a render kind's own state and not a set of answers to questions.\n\n**Why an Attachment and not a bare string.** A JSON string in a `valueString` is self-describing to\nnobody: a reader cannot tell what it holds without recognising the render kind first, and no\npublished international IG carries editor state that way. `Attachment` is what R4 already provides\nfor an opaque payload, and `contentType` makes the envelope readable even where the contents are\nnot. A `text` section needs none of this at all.\n\n**The narrative is authoritative for reading.** A consumer that has never heard of the render kind\nrenders `section.text` and is not missing clinical content, so nothing a reader needs may live only\nin here. A value that cannot be parsed reads as no structured value rather than as an error: one\nmalformed section must not put a whole clinical document out of reach. **Unreadable is not absent**\n-- a writer that cannot parse a stored value must round-trip it untouched rather than drop it.\n\n**FIRST PASS.** The canonical is settled on the same terms as `composition-block-type`. One design\nquestion is not: whether a render kind's structured value belongs in an extension at all, or in\n`Composition.section.entry`, which this guide already nominates as a section's structured\ncounterpart. They hold different things today, for the reasons given above. The evidence that would\nsettle it is a render kind that promotes its own facts to `entry` on save -- a vitals block is the\nobvious first -- because that is the case where the two would genuinely overlap."
      },
      {
        "id": "Extension.extension",
        "path": "Extension.extension",
        "max": "0"
      },
      {
        "id": "Extension.url",
        "path": "Extension.url",
        "fixedUri": "https://fhir.apps.health/StructureDefinition/composition-block-data"
      },
      {
        "id": "Extension.value[x]",
        "path": "Extension.value[x]",
        "short": "The render kind's own structured value, as a typed attachment",
        "definition": "The section's own structured value. `contentType` says what the payload is -- `application/json` for a kind carrying a JSON object -- so the envelope is readable even where the contents are not described here. Readers that do not recognise the render kind ignore this element and render the section narrative instead; a reader that cannot PARSE it must still write it back unchanged, because unreadable and absent are different facts.",
        "min": 1,
        "type": [
          {
            "code": "Attachment"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Extension.value[x].contentType",
        "path": "Extension.value[x].contentType",
        "short": "What the payload is; `application/json` for a JSON kind",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Extension.value[x].data",
        "path": "Extension.value[x].data",
        "short": "The payload itself, base64-encoded per R4",
        "mustSupport": true
      }
    ]
  }
}
