Verifiable Health Link
0.0.2-current - ci-build

Verifiable Health Link, published by IHE IT Infrastructure Technical Committee. This guide is not an authorized publication; it is the continuous build for version 0.0.2-current built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/IHE/ITI.VHL/ and changes regularly. See the Directory of published versions

## : Generate VHL - TTL Representation

Active as of 2026-03-12

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 "OperationDefinition-generate-vhl"] ; #
      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 OperationDefinition-generate-vhl</b></p><a name=\"OperationDefinition-generate-vhl\"> </a><a name=\"hcOperationDefinition-generate-vhl\"> </a><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>sourceIdentifier</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Identifier\">Identifier</a></td><td/><td><div><p>An identifier for the patient. Required if 'bundle' is not provided.</p>\n</div></td></tr><tr><td>IN</td><td>exp</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#integer\">integer</a></td><td/><td><div><p>Optional. Number representing expiration time in Epoch seconds, as a hint to help the SHL Receiving Application determine if this QR is stale.</p>\n</div></td></tr><tr><td>IN</td><td>flag</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a></td><td/><td><div><p>Optional. String created by concatenating single-character flags in alphabetical order. L (long-term use), P (Passcode required)</p>\n</div></td></tr><tr><td>IN</td><td>label</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a></td><td/><td><div><p>Optional. String no longer than 80 characters that provides a short description of the data behind the SHLink.</p>\n</div></td></tr><tr><td>IN</td><td>passcode</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a></td><td/><td><div><p>Optional. User-supplied passcode for passcode-protected VHLs. If provided, the VHL Sharer SHALL securely hash and store this passcode for validation during manifest retrieval (ITI-YY5). The 'P' flag SHALL be included in the flag parameter when a passcode is set.</p>\n</div></td></tr><tr><td>OUT</td><td>qrcode</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/binary.html\">Binary</a></td><td/><td><div><p>A Binary resource containing the QR code image (PNG or SVG format) that encodes the VHL as an HCERT/CWT structure.</p>\n<p>VHL Payload Construction:</p>\n<ol>\n<li>Generate a unique folder ID with 256-bit entropy to serve as the List resource identifier</li>\n<li>Generate a 32-byte (256-bit) random encryption key, base64url-encode it (resulting in 43 characters) - this is the 'key' parameter</li>\n<li>Construct the manifest URL as a query on the base List resource:\n<ul>\n<li>If VHL Sharer supports Include DocumentReference Option:\n[base]/List?_id=[folder-id]&amp;code=folder&amp;status=current&amp;patient.identifier=[patient-id]&amp;_include=List:item</li>\n<li>If VHL Sharer does NOT support Include DocumentReference Option:\n[base]/List?_id=[folder-id]&amp;code=folder&amp;status=current&amp;patient.identifier=[patient-id]</li>\n</ul>\n</li>\n<li>Create the SHL payload as a JSON object with:\n<ul>\n<li>url: the manifest URL from step 3</li>\n<li>key: the base64url-encoded encryption key from step 2 (43 characters)</li>\n<li>exp: (optional) expiration time in Epoch seconds</li>\n<li>flag: (optional) flags string (e.g., 'P' for passcode, 'L' for long-term, 'U' for direct file access)</li>\n<li>label: (optional) description string (max 80 characters)</li>\n<li>v: version number (defaults to 1)</li>\n<li>extension: (conditional) object containing implementation-defined extensions. Required when the VHL Sharer supports the OAuth with SSRAA Option, in which case it SHALL include fhirBaseUrl (the FHIR base URL of the VHL Sharer, e.g., https://vhl-sharer.example.org)</li>\n</ul>\n</li>\n<li>Minify the JSON payload, Base64url-encode it, and prefix with vhlink:/</li>\n</ol>\n<p>QR Code Generation (HCERT/CWT Encoding):\nThe VHL Sharer SHALL encode the VHL payload within an HCERT structure as per the [WHO SMART TRUST specification] (https://smart.who.int/trust/). The HCERT claim key SHALL be 5 for VHL. The QR code is then generated per the HCERT Specification.</p>\n<p>For complete HCERT specification, see: https://smart.who.int/trust/hcert_spec.html</p>\n<p>For HCERT logical model, see: https://smart.who.int/trust/StructureDefinition-HCert.html</p>\n<p>For SHL payload details, see: https://build.fhir.org/ig/HL7/smart-health-cards-and-links/links-specification.html#construct-a-smart-health-link-payload</p>\n</div></td></tr></table></div>"^^rdf:XMLLiteral ]
      ] ; #
      fhir:url [
    fhir:v "http://example.org/fhir/OperationDefinition/generate-vhl"^^xsd:anyURI ;
    fhir:l <http://example.org/fhir/OperationDefinition/generate-vhl>
      ] ; #
      fhir:version [ fhir:v "0.0.2-current"] ; #
      fhir:name [ fhir:v "GenerateVHL"] ; #
      fhir:title [ fhir:v "Generate VHL"] ; #
      fhir:status [ fhir:v "active"] ; #
      fhir:kind [ fhir:v "operation"] ; #
      fhir:date [ fhir:v "2026-03-12T12:40:14+00:00"^^xsd:dateTime] ; #
      fhir:publisher [ fhir:v "IHE IT Infrastructure Technical Committee"] ; #
      fhir:contact ( [
        ( fhir:telecom [
    fhir:system [ fhir:v "url" ] ;
    fhir:value [ fhir:v "https://www.ihe.net/ihe_domains/it_infrastructure/" ]     ] )
      ] [
        ( fhir:telecom [
    fhir:system [ fhir:v "email" ] ;
    fhir:value [ fhir:v "iti@ihe.net" ]     ] )
      ] [
    fhir:name [ fhir:v "IHE IT Infrastructure Technical Committee" ] ;
        ( fhir:telecom [
    fhir:system [ fhir:v "email" ] ;
    fhir:value [ fhir:v "iti@ihe.net" ]     ] )
      ] ) ; #
      fhir:description [ fhir:v "This operation generates a QR code containing a Verifiable Health Link (VHL) for transmission or display.\n\nInput Parameters:\n- sourceIdentifier: Patient identifier (required)\n- exp: Expiration time in Epoch seconds (optional)\n- flag: Single-character flags in alphabetical order - L (long-term use), P (Passcode required), U (direct file access) (optional)\n- label: Short description up to 80 characters (optional)\n- passcode: User-supplied passcode for passcode-protected VHLs (optional)\n\nOutput Generation:\n- Returns a Binary resource containing the QR code image (PNG or SVG format) that encodes the VHL as an HCERT/CWT structure.\n- The QR code embeds the full SHL payload including the manifest URL and decryption key for secure access to health documents."] ; #
      fhir:jurisdiction ( [
        ( fhir:coding [
    fhir:system [
    fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm"^^xsd:anyURI ;
    fhir:l <http://unstats.un.org/unsd/methods/m49/m49.htm>       ] ;
    fhir:code [ fhir:v "001" ]     ] )
      ] ) ; #
      fhir:code [ fhir:v "generate-vhl"] ; #
      fhir:system [ fhir:v false] ; #
      fhir:type [ fhir:v true] ; #
      fhir:instance [ fhir:v false] ; #
      fhir:parameter ( [
    fhir:name [ fhir:v "sourceIdentifier" ] ;
    fhir:use [ fhir:v "in" ] ;
    fhir:min [ fhir:v 1 ] ;
    fhir:max [ fhir:v "1" ] ;
    fhir:documentation [ fhir:v "An identifier for the patient. Required if 'bundle' is not provided." ] ;
    fhir:type [ fhir:v "Identifier" ]
      ] [
    fhir:name [ fhir:v "exp" ] ;
    fhir:use [ fhir:v "in" ] ;
    fhir:min [ fhir:v 0 ] ;
    fhir:max [ fhir:v "1" ] ;
    fhir:documentation [ fhir:v "Optional. Number representing expiration time in Epoch seconds, as a hint to help the SHL Receiving Application determine if this QR is stale." ] ;
    fhir:type [ fhir:v "integer" ]
      ] [
    fhir:name [ fhir:v "flag" ] ;
    fhir:use [ fhir:v "in" ] ;
    fhir:min [ fhir:v 0 ] ;
    fhir:max [ fhir:v "1" ] ;
    fhir:documentation [ fhir:v "Optional. String created by concatenating single-character flags in alphabetical order. L (long-term use), P (Passcode required)" ] ;
    fhir:type [ fhir:v "string" ]
      ] [
    fhir:name [ fhir:v "label" ] ;
    fhir:use [ fhir:v "in" ] ;
    fhir:min [ fhir:v 0 ] ;
    fhir:max [ fhir:v "1" ] ;
    fhir:documentation [ fhir:v "Optional. String no longer than 80 characters that provides a short description of the data behind the SHLink." ] ;
    fhir:type [ fhir:v "string" ]
      ] [
    fhir:name [ fhir:v "passcode" ] ;
    fhir:use [ fhir:v "in" ] ;
    fhir:min [ fhir:v 0 ] ;
    fhir:max [ fhir:v "1" ] ;
    fhir:documentation [ fhir:v "Optional. User-supplied passcode for passcode-protected VHLs. If provided, the VHL Sharer SHALL securely hash and store this passcode for validation during manifest retrieval (ITI-YY5). The 'P' flag SHALL be included in the flag parameter when a passcode is set." ] ;
    fhir:type [ fhir:v "string" ]
      ] [
    fhir:name [ fhir:v "qrcode" ] ;
    fhir:use [ fhir:v "out" ] ;
    fhir:min [ fhir:v 1 ] ;
    fhir:max [ fhir:v "1" ] ;
    fhir:documentation [ fhir:v "A Binary resource containing the QR code image (PNG or SVG format) that encodes the VHL as an HCERT/CWT structure.\n\nVHL Payload Construction:\n1. Generate a unique folder ID with 256-bit entropy to serve as the List resource identifier\n2. Generate a 32-byte (256-bit) random encryption key, base64url-encode it (resulting in 43 characters) - this is the 'key' parameter\n3. Construct the manifest URL as a query on the base List resource:\n   - If VHL Sharer supports Include DocumentReference Option:\n     [base]/List?_id=[folder-id]&code=folder&status=current&patient.identifier=[patient-id]&_include=List:item\n   - If VHL Sharer does NOT support Include DocumentReference Option:\n     [base]/List?_id=[folder-id]&code=folder&status=current&patient.identifier=[patient-id]\n4. Create the SHL payload as a JSON object with:\n   - url: the manifest URL from step 3\n   - key: the base64url-encoded encryption key from step 2 (43 characters)\n   - exp: (optional) expiration time in Epoch seconds\n   - flag: (optional) flags string (e.g., 'P' for passcode, 'L' for long-term, 'U' for direct file access)\n   - label: (optional) description string (max 80 characters)\n   - v: version number (defaults to 1)\n   - extension: (conditional) object containing implementation-defined extensions. Required when the VHL Sharer supports the OAuth with SSRAA Option, in which case it SHALL include fhirBaseUrl (the FHIR base URL of the VHL Sharer, e.g., https://vhl-sharer.example.org)\n5. Minify the JSON payload, Base64url-encode it, and prefix with vhlink:/\n\nQR Code Generation (HCERT/CWT Encoding):\nThe VHL Sharer SHALL encode the VHL payload within an HCERT structure as per the [WHO SMART TRUST specification] (https://smart.who.int/trust/). The HCERT claim key SHALL be 5 for VHL. The QR code is then generated per the HCERT Specification.\n\nFor complete HCERT specification, see: https://smart.who.int/trust/hcert_spec.html\n\nFor HCERT logical model, see: https://smart.who.int/trust/StructureDefinition-HCert.html\n\nFor SHL payload details, see: https://build.fhir.org/ig/HL7/smart-health-cards-and-links/links-specification.html#construct-a-smart-health-link-payload" ] ;
    fhir:type [ fhir:v "Binary" ]
      ] ) . #