Huli FHIR Core Implementation Guide (R5)
0.1.0 - Release Latin America and the Caribbean

Huli FHIR Core Implementation Guide (R5) - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

: Upload a DocumentReference binary - JSON Representation

Active as of 2026-09-11

Raw json | Download

{
  "resourceType" : "OperationDefinition",
  "id" : "DocumentReference-upload",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: OperationDefinition DocumentReference-upload</b></p><a name=\"DocumentReference-upload\"> </a><a name=\"hcDocumentReference-upload\"> </a><p>URL: [base]/DocumentReference/$upload</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>document</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R5/documentreference.html\">DocumentReference</a></td><td/><td><div><p>The inline DocumentReference (base64 binary in content[0].attachment.data). For the multipart mode the equivalent fields are supplied as form parts (<code>file</code>, <code>subject</code>, optional <code>encounter</code>/<code>category</code>) instead of this resource.</p>\n</div></td></tr><tr><td>OUT</td><td>return</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R5/documentreference.html\">DocumentReference</a></td><td/><td><div><p>The created DocumentReference.</p>\n</div></td></tr></table></div>"
  },
  "url" : "https://fhir.huli.ai/r5/OperationDefinition/DocumentReference-upload",
  "version" : "0.1.0",
  "name" : "DocumentReferenceUpload",
  "title" : "Upload a DocumentReference binary",
  "status" : "active",
  "kind" : "operation",
  "date" : "2026-09-11T01:19:46+00:00",
  "publisher" : "Huli",
  "contact" : [
    {
      "name" : "Huli",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://huli.ai"
        }
      ]
    }
  ],
  "description" : "Create a DocumentReference together with its binary in one request. Two intake modes are accepted: (1) an inline DocumentReference whose binary rides in content[0].attachment.data (base64); (2) a multipart/form-data body with a `file` part plus `subject` (Patient reference or id) and optional `encounter` and `category` fields. Returns the created DocumentReference; a subsequent read carries a time-limited signed download URL.",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code" : "419",
          "display" : "Latin America and the Caribbean"
        }
      ]
    }
  ],
  "code" : "upload",
  "resource" : [
    "DocumentReference"
  ],
  "system" : false,
  "type" : true,
  "instance" : false,
  "parameter" : [
    {
      "name" : "document",
      "use" : "in",
      "min" : 1,
      "max" : "1",
      "documentation" : "The inline DocumentReference (base64 binary in content[0].attachment.data). For the multipart mode the equivalent fields are supplied as form parts (`file`, `subject`, optional `encounter`/`category`) instead of this resource.",
      "type" : "DocumentReference"
    },
    {
      "name" : "return",
      "use" : "out",
      "min" : 1,
      "max" : "1",
      "documentation" : "The created DocumentReference.",
      "type" : "DocumentReference"
    }
  ]
}