Huli FHIR Core Implementation Guide (R4)
0.1.0 - Release

Huli FHIR Core Implementation Guide (R4) - 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 - TTL Representation

Active as of 2026-09-11

Raw ttl | Download


@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 -------------------------------------------------------------------

 a fhir:OperationDefinition ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "DocumentReference-upload"] ; # 
  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 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/R4/documentreference.html\">DocumentReference</a></td><td/><td><div><p>The inline DocumentReference (base64 binary in content[0].attachment.data; optional author[0] names the reviewing practitioner). 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>/<code>reviewer</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/R4/documentreference.html\">DocumentReference</a></td><td/><td><div><p>The created DocumentReference.</p>\n</div></td></tr></table></div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:url [
fhir:v "https://fhir.huli.ai/r4/OperationDefinition/DocumentReference-upload"^^xsd:anyURI ;
fhir:l <https://fhir.huli.ai/r4/OperationDefinition/DocumentReference-upload>
  ] ; # 
  fhir:version [ fhir:v "0.1.0"] ; # 
  fhir:name [ fhir:v "DocumentReferenceUpload"] ; # 
  fhir:title [ fhir:v "Upload a DocumentReference binary"] ; # 
  fhir:status [ fhir:v "active"] ; # 
  fhir:kind [ fhir:v "operation"] ; # 
  fhir:date [ fhir:v "2026-09-11T01:20:01+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "Huli"] ; # 
  fhir:contact ( [
fhir:name [ fhir:v "Huli" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "https://huli.ai" ]     ] )
  ] ) ; # 
  fhir:description [ fhir:v "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`, `category`, and `reviewer` fields. The uploaded document is routed to a practitioner for review: name them with author[0] (inline) or the `reviewer` form field (multipart) — a Practitioner reference in the caller's organization — defaulting to the organization owner when omitted. Returns the created DocumentReference; a subsequent read carries a time-limited signed download URL."] ; # 
  fhir:code [ fhir:v "upload"] ; # 
  fhir:resource ( [ fhir:v "DocumentReference"] ) ; # 
  fhir:system [ fhir:v false] ; # 
  fhir:type [ fhir:v true] ; # 
  fhir:instance [ fhir:v false] ; # 
  fhir:parameter ( [
fhir:name [ fhir:v "document" ] ;
fhir:use [ fhir:v "in" ] ;
fhir:min [ fhir:v 1 ] ;
fhir:max [ fhir:v "1" ] ;
fhir:documentation [ fhir:v "The inline DocumentReference (base64 binary in content[0].attachment.data; optional author[0] names the reviewing practitioner). For the multipart mode the equivalent fields are supplied as form parts (`file`, `subject`, optional `encounter`/`category`/`reviewer`) instead of this resource." ] ;
fhir:type [ fhir:v "DocumentReference" ]
  ] [
fhir:name [ fhir:v "return" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v 1 ] ;
fhir:max [ fhir:v "1" ] ;
fhir:documentation [ fhir:v "The created DocumentReference." ] ;
fhir:type [ fhir:v "DocumentReference" ]
  ] ) . #