Personal Health Records
1.0.0-ballot2 - STU 1 ballot International flag

Personal Health Records, published by HL7 International / Patient Empowerment. This guide is not an authorized publication; it is the continuous build for version 1.0.0-ballot2 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/personal-health-record-format-ig/ and changes regularly. See the Directory of published versions

: PHR Export Operation

Page standards status: Informative

Raw json | Download

{
  "resourceType" : "OperationDefinition",
  "id" : "phr-export",
  "language" : "en",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: OperationDefinition phr-export</b></p><a name=\"phr-export\"> </a><a name=\"hcphr-export\"> </a><p>URL: [base]/Bundle/$phr-export</p><p>URL: [base]/Bundle/[id]/$phr-export</p><p>URL: [base]/Patient/$phr-export</p><p>URL: [base]/Patient/[id]/$phr-export</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>outputFormat</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#code\">code</a></td><td/><td><div><p>Requested output format: bundle (default), ndjson, phr, or sphr. Servers implementing PHR export MUST support this parameter.</p>\n</div></td></tr><tr><td>IN</td><td>patient</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/references.html#Reference\">Reference</a></td><td/><td><div><p>The patient whose record is being exported. Required when the operation is invoked at type level on a multi-patient system.</p>\n</div></td></tr><tr><td>IN</td><td>start</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#date\">date</a></td><td/><td><div><p>Earliest clinically-effective date to include (date or partial date).</p>\n</div></td></tr><tr><td>IN</td><td>end</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#date\">date</a></td><td/><td><div><p>Latest clinically-effective date to include (date or partial date).</p>\n</div></td></tr><tr><td>IN</td><td>_since</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#instant\">instant</a></td><td/><td><div><p>Only include resources updated after this instant. Same meaning as in Patient/$everything.</p>\n</div></td></tr><tr><td>IN</td><td>_type</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a></td><td/><td><div><p>Comma-separated list of resource types to include. Same meaning as in Patient/$everything.</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/resource.html\">Resource</a></td><td/><td><div><p>The exported record: a Bundle when outputFormat is bundle, otherwise a Binary wrapping the NDJSON (.phr) or zip (.sphr) content.</p>\n</div></td></tr></table></div>"
  },
  "extension" : [
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode" : "pe"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode" : "informative",
      "_valueCode" : {
        "extension" : [
          {
            "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueCanonical" : "http://hl7.org/fhir/uv/phr/ImplementationGuide/hl7.fhir.uv.phr"
          }
        ]
      }
    }
  ],
  "url" : "http://hl7.org/fhir/uv/phr/OperationDefinition/phr-export",
  "version" : "1.0.0-ballot2",
  "name" : "PHRExport",
  "title" : "PHR Export Operation",
  "status" : "draft",
  "kind" : "operation",
  "experimental" : true,
  "date" : "2026-10-09T01:04:02+00:00",
  "publisher" : "HL7 International / Patient Empowerment",
  "contact" : [
    {
      "name" : "HL7 International / Patient Empowerment",
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://www.hl7.org/Special/committees/patientempowerment"
        }
      ]
    }
  ],
  "description" : "Generates a complete patient health record. The default output is a FHIR Bundle; the outputFormat parameter selects NDJSON, .phr, or .sphr packaging. Parameters are aligned with the R5 Patient/$everything operation (_since, _type), so a server MAY implement this operation as a façade over $everything plus serialization. See the API Endpoints page for conformance requirements and worked examples.",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code" : "001",
          "display" : "World"
        }
      ]
    }
  ],
  "code" : "phr-export",
  "resource" : [
    "Bundle",
    "Patient"
  ],
  "system" : false,
  "type" : true,
  "instance" : true,
  "parameter" : [
    {
      "name" : "outputFormat",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Requested output format: bundle (default), ndjson, phr, or sphr. Servers implementing PHR export MUST support this parameter.",
      "type" : "code"
    },
    {
      "name" : "patient",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "The patient whose record is being exported. Required when the operation is invoked at type level on a multi-patient system.",
      "type" : "Reference"
    },
    {
      "name" : "start",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Earliest clinically-effective date to include (date or partial date).",
      "type" : "date"
    },
    {
      "name" : "end",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Latest clinically-effective date to include (date or partial date).",
      "type" : "date"
    },
    {
      "name" : "_since",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Only include resources updated after this instant. Same meaning as in Patient/$everything.",
      "type" : "instant"
    },
    {
      "name" : "_type",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Comma-separated list of resource types to include. Same meaning as in Patient/$everything.",
      "type" : "string"
    },
    {
      "name" : "return",
      "use" : "out",
      "min" : 1,
      "max" : "1",
      "documentation" : "The exported record: a Bundle when outputFormat is bundle, otherwise a Binary wrapping the NDJSON (.phr) or zip (.sphr) content.",
      "type" : "Resource"
    }
  ]
}