WHO Digital Documentation of COVID-19 Certificates (DDCC)
1.0.0 - CI Build
This page is part of the WHO Digital Documentation of COVID-19 Certificates (DDCC) (v1.0.0: releases Draft) based on FHIR (HL7® FHIR® Standard) R4. This is the current published version. For a full list of available versions, see the Directory of published versions
Draft as of 2024-10-15 |
<StructureMap xmlns="http://hl7.org/fhir">
<id value="CoreDataSetLibrary"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap CoreDataSetLibrary</b></p><a name="CoreDataSetLibrary"> </a><a name="hcCoreDataSetLibrary"> </a><a name="CoreDataSetLibrary-en-US"> </a><pre class="fml">
<b>map</b><span style="color: navy"> "</span>http://smart.who.int/ddcc/StructureMap/CoreDataSetLibrary<span style="color: navy">" = "</span>CoreDataSetLibrary<span style="color: navy">"
</span><b>uses</b><span style="color: navy"> "</span><a href="StructureDefinition-DDCCCoreDataSetVS.html" title="DDCC Core Data Set Logical Model for Vaccination Status">http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS</a><span style="color: navy">" </span><b>alias </b>DDCCVS <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> "</span><a href="http://hl7.org/fhir/R4/patient.html" title="Patient">http://hl7.org/fhir/StructureDefinition/Patient</a><span style="color: navy">" </span><b>alias </b>Patient <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> "</span><a href="StructureDefinition-DDCCPatient.html" title="DDCC Patient">http://smart.who.int/ddcc/StructureDefinition/DDCCPatient</a><span style="color: navy">" </span><b>alias </b>DDCCPatient <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> "</span><a href="StructureDefinition-DDCCDocumentReferenceQR.html" title="DDCC DocumentReference return for QR">http://smart.who.int/ddcc/StructureDefinition/DDCCDocumentReferenceQR</a><span style="color: navy">" </span><b>alias </b>DDCCDocRefQR <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> "</span><a href="StructureDefinition-DDCCComposition.html" title="DDCC Composition">http://smart.who.int/ddcc/StructureDefinition/DDCCComposition</a><span style="color: navy">" </span><b>alias </b>DDCCComposition <b>as </b><b>target</b>
<b>group </b>DDCCToPatient<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>DDCCVS, <b>target</b> <span style="color: maroon">patient</span><span style="color: navy"> : </span>DDCCPatient, <b>source</b> <span style="color: maroon">pid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> pid<span style="color: navy"><b> -> </b></span>patient.id = <span style="color: maroon">pid</span> <i>"set id"</i><span style="color: navy">;</span>
src.name<b> as </b><span style="color: maroon">name</span><span style="color: navy"><b> -> </b></span>patient.name<b> as </b><span style="color: maroon">tName</span><b> then</b><span style="color: navy"> {
</span> name<span style="color: navy"><b> -> </b></span>tName.text = <span style="color: maroon">name</span> <i>"set name"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set full name"</i><span style="color: navy">;</span>
src.birthDate<b> as </b><span style="color: maroon">birthDate</span><span style="color: navy"><b> -> </b></span>patient.birthDate = <span style="color: maroon">birthDate</span> <i>"set birthDate"</i><span style="color: navy">;</span>
src.identifier<b> as </b><span style="color: maroon">identifier</span><span style="color: navy"><b> -> </b></span>patient.identifier = <span style="color: maroon">identifier</span> <i>"set identifier"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>DDCCToDocumentReference<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>DDCCVS, <b>target</b> <span style="color: maroon">ref</span><span style="color: navy"> : </span>DDCCDocRefQR, <b>source</b> <span style="color: maroon">id</span>, <b>source</b> <span style="color: maroon">pid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> id<span style="color: navy"><b> -> </b></span>ref.id = <span style="color: maroon">id</span> <i>"set id"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span>ref.status = <span style="color: blue">'current'</span> <i>"set status"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span> ref.subject<b> as </b><span style="color: maroon">patient</span><span style="color: navy">, </span> patient.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Patient/'</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set patient"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span>ref.content<b> as </b><span style="color: maroon">content</span><b> then</b><span style="color: navy"> {
</span> src<span style="color: navy"><b> -> </b></span> content.attachment<b> as </b><span style="color: maroon">attachment</span><span style="color: navy">, </span> attachment.contentType = <span style="color: blue">'application/json'</span> <i>"set contentType"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span> content.format<b> as </b><span style="color: maroon">format</span><span style="color: navy">, </span> format.system = <span style="color: blue">'http://smart.who.int/ddcc/CodeSystem/DDCCQRFormatCodeSystem'</span><span style="color: navy">, </span> format.code = <span style="color: blue">'serialized'</span> <i>"set format code"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set serialized content"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span>ref.content<b> as </b><span style="color: maroon">content</span><b> then</b><span style="color: navy"> {
</span> src<span style="color: navy"><b> -> </b></span> content.attachment<b> as </b><span style="color: maroon">attachment</span><span style="color: navy">, </span> attachment.contentType = <span style="color: blue">'image/png'</span> <i>"set contentType"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span> content.format<b> as </b><span style="color: maroon">format</span><span style="color: navy">, </span> format.system = <span style="color: blue">'http://smart.who.int/ddcc/CodeSystem/DDCCQRFormatCodeSystem'</span><span style="color: navy">, </span> format.code = <span style="color: blue">'image'</span> <i>"set format code"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set image content"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span>ref.content<b> as </b><span style="color: maroon">content</span><b> then</b><span style="color: navy"> {
</span> src<span style="color: navy"><b> -> </b></span> content.attachment<b> as </b><span style="color: maroon">attachment</span><span style="color: navy">, </span> attachment.contentType = <span style="color: blue">'application/pdf'</span> <i>"set contentType"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span> content.format<b> as </b><span style="color: maroon">format</span><span style="color: navy">, </span> format.system = <span style="color: blue">'http://smart.who.int/ddcc/CodeSystem/DDCCQRFormatCodeSystem'</span><span style="color: navy">, </span> format.code = <span style="color: blue">'pdf'</span> <i>"set format code"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set pdf content"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>DDCCToComposition<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>DDCCVS, <b>target</b> <span style="color: maroon">comp</span><span style="color: navy"> : </span>DDCCComposition, <b>source</b> <span style="color: maroon">id</span>, <b>source</b> <span style="color: maroon">pid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> id<span style="color: navy"><b> -> </b></span>comp.id = <span style="color: maroon">id</span> <i>"set id"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span> comp.subject<b> as </b><span style="color: maroon">patient</span><span style="color: navy">, </span> patient.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Patient/'</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set patient"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span> comp.type<b> as </b><span style="color: maroon">type</span><span style="color: navy">, </span> type.coding<b> as </b><span style="color: maroon">coding</span><b> then</b><span style="color: navy"> {
</span> src<span style="color: navy"><b> -> </b></span> coding.system = <span style="color: blue">'http://loinc.org'</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'82593-5'</span> <i>"set type coding"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set type"</i><span style="color: navy">;</span>
src.certificate<b> as </b><span style="color: maroon">certificate</span><span style="color: navy"><b> -> </b></span> comp.author<b> as </b><span style="color: maroon">author</span><span style="color: navy">, </span> comp.event<b> as </b><span style="color: maroon">event</span><b> then</b><span style="color: navy"> {
</span> certificate.period<b> as </b><span style="color: maroon">period</span><span style="color: navy"><b> -> </b></span>event.period = <span style="color: maroon">period</span> <i>"set event period"</i><span style="color: navy">;</span>
certificate.issuer<b> as </b><span style="color: maroon">issuer</span><span style="color: navy"><b> -> </b></span>author.type = <span style="color: blue">'Organization'</span><b> then</b><span style="color: navy"> {
</span> issuer.identifier<b> as </b><span style="color: maroon">pha</span><span style="color: navy"><b> -> </b></span>author.identifier<b> as </b><span style="color: maroon">identifier</span><b> then</b><span style="color: navy"> {
</span> pha.value<b> as </b><span style="color: maroon">value</span><span style="color: navy"><b> -> </b></span>identifier.value = <span style="color: maroon">value</span> <i>"set pha"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set author identifier"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set author ref"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set certificate"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span></pre></div>
</text>
<url value="http://smart.who.int/ddcc/StructureMap/CoreDataSetLibrary"/>
<version value="1.0.0"/>
<name value="CoreDataSetLibrary"/>
<status value="draft"/>
<date value="2024-10-15T11:00:36+02:00"/>
<publisher value="WHO"/>
<contact>
<name value="WHO"/>
<telecom>
<system value="url"/>
<value value="http://who.int"/>
</telecom>
</contact>
<jurisdiction>
<coding>
<system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
<code value="001"/>
</coding>
</jurisdiction>
<structure>
<url
value="http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS"/>
<mode value="source"/>
<alias value="DDCCVS"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<mode value="target"/>
<alias value="Patient"/>
</structure>
<structure>
<url value="http://smart.who.int/ddcc/StructureDefinition/DDCCPatient"/>
<mode value="target"/>
<alias value="DDCCPatient"/>
</structure>
<structure>
<url
value="http://smart.who.int/ddcc/StructureDefinition/DDCCDocumentReferenceQR"/>
<mode value="target"/>
<alias value="DDCCDocRefQR"/>
</structure>
<structure>
<url
value="http://smart.who.int/ddcc/StructureDefinition/DDCCComposition"/>
<mode value="target"/>
<alias value="DDCCComposition"/>
</structure>
<group>
<name value="DDCCToPatient"/>
<typeMode value="none"/>
<input>
<name value="src"/>
<type value="DDCCVS"/>
<mode value="source"/>
</input>
<input>
<name value="patient"/>
<type value="DDCCPatient"/>
<mode value="target"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<rule>
<name value="set id"/>
<source>
<context value="pid"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="pid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set full name"/>
<source>
<context value="src"/>
<element value="name"/>
<variable value="name"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="name"/>
<variable value="tName"/>
</target>
<rule>
<name value="set name"/>
<source>
<context value="name"/>
</source>
<target>
<context value="tName"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="name"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set birthDate"/>
<source>
<context value="src"/>
<element value="birthDate"/>
<variable value="birthDate"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="birthDate"/>
<transform value="copy"/>
<parameter>
<valueId value="birthDate"/>
</parameter>
</target>
</rule>
<rule>
<name value="set identifier"/>
<source>
<context value="src"/>
<element value="identifier"/>
<variable value="identifier"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="identifier"/>
<transform value="copy"/>
<parameter>
<valueId value="identifier"/>
</parameter>
</target>
</rule>
</group>
<group>
<name value="DDCCToDocumentReference"/>
<typeMode value="none"/>
<input>
<name value="src"/>
<type value="DDCCVS"/>
<mode value="source"/>
</input>
<input>
<name value="ref"/>
<type value="DDCCDocRefQR"/>
<mode value="target"/>
</input>
<input>
<name value="id"/>
<mode value="source"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<rule>
<name value="set id"/>
<source>
<context value="id"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="id"/>
</parameter>
</target>
</rule>
<rule>
<name value="set status"/>
<source>
<context value="src"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="current"/>
</parameter>
</target>
</rule>
<rule>
<name value="set patient"/>
<source>
<context value="src"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="patient"/>
</target>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Patient/"/>
</parameter>
<parameter>
<valueId value="pid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set serialized content"/>
<source>
<context value="src"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="content"/>
<variable value="content"/>
</target>
<rule>
<name value="set contentType"/>
<source>
<context value="src"/>
</source>
<target>
<context value="content"/>
<contextType value="variable"/>
<element value="attachment"/>
<variable value="attachment"/>
</target>
<target>
<context value="attachment"/>
<contextType value="variable"/>
<element value="contentType"/>
<transform value="copy"/>
<parameter>
<valueString value="application/json"/>
</parameter>
</target>
</rule>
<rule>
<name value="set format code"/>
<source>
<context value="src"/>
</source>
<target>
<context value="content"/>
<contextType value="variable"/>
<element value="format"/>
<variable value="format"/>
</target>
<target>
<context value="format"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://smart.who.int/ddcc/CodeSystem/DDCCQRFormatCodeSystem"/>
</parameter>
</target>
<target>
<context value="format"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="serialized"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set image content"/>
<source>
<context value="src"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="content"/>
<variable value="content"/>
</target>
<rule>
<name value="set contentType"/>
<source>
<context value="src"/>
</source>
<target>
<context value="content"/>
<contextType value="variable"/>
<element value="attachment"/>
<variable value="attachment"/>
</target>
<target>
<context value="attachment"/>
<contextType value="variable"/>
<element value="contentType"/>
<transform value="copy"/>
<parameter>
<valueString value="image/png"/>
</parameter>
</target>
</rule>
<rule>
<name value="set format code"/>
<source>
<context value="src"/>
</source>
<target>
<context value="content"/>
<contextType value="variable"/>
<element value="format"/>
<variable value="format"/>
</target>
<target>
<context value="format"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://smart.who.int/ddcc/CodeSystem/DDCCQRFormatCodeSystem"/>
</parameter>
</target>
<target>
<context value="format"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="image"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set pdf content"/>
<source>
<context value="src"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="content"/>
<variable value="content"/>
</target>
<rule>
<name value="set contentType"/>
<source>
<context value="src"/>
</source>
<target>
<context value="content"/>
<contextType value="variable"/>
<element value="attachment"/>
<variable value="attachment"/>
</target>
<target>
<context value="attachment"/>
<contextType value="variable"/>
<element value="contentType"/>
<transform value="copy"/>
<parameter>
<valueString value="application/pdf"/>
</parameter>
</target>
</rule>
<rule>
<name value="set format code"/>
<source>
<context value="src"/>
</source>
<target>
<context value="content"/>
<contextType value="variable"/>
<element value="format"/>
<variable value="format"/>
</target>
<target>
<context value="format"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://smart.who.int/ddcc/CodeSystem/DDCCQRFormatCodeSystem"/>
</parameter>
</target>
<target>
<context value="format"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="pdf"/>
</parameter>
</target>
</rule>
</rule>
</group>
<group>
<name value="DDCCToComposition"/>
<typeMode value="none"/>
<input>
<name value="src"/>
<type value="DDCCVS"/>
<mode value="source"/>
</input>
<input>
<name value="comp"/>
<type value="DDCCComposition"/>
<mode value="target"/>
</input>
<input>
<name value="id"/>
<mode value="source"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<rule>
<name value="set id"/>
<source>
<context value="id"/>
</source>
<target>
<context value="comp"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="id"/>
</parameter>
</target>
</rule>
<rule>
<name value="set patient"/>
<source>
<context value="src"/>
</source>
<target>
<context value="comp"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="patient"/>
</target>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Patient/"/>
</parameter>
<parameter>
<valueId value="pid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set type"/>
<source>
<context value="src"/>
</source>
<target>
<context value="comp"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="type"/>
</target>
<target>
<context value="type"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="set type coding"/>
<source>
<context value="src"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString value="http://loinc.org"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="82593-5"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set certificate"/>
<source>
<context value="src"/>
<element value="certificate"/>
<variable value="certificate"/>
</source>
<target>
<context value="comp"/>
<contextType value="variable"/>
<element value="author"/>
<variable value="author"/>
</target>
<target>
<context value="comp"/>
<contextType value="variable"/>
<element value="event"/>
<variable value="event"/>
</target>
<rule>
<name value="set event period"/>
<source>
<context value="certificate"/>
<element value="period"/>
<variable value="period"/>
</source>
<target>
<context value="event"/>
<contextType value="variable"/>
<element value="period"/>
<transform value="copy"/>
<parameter>
<valueId value="period"/>
</parameter>
</target>
</rule>
<rule>
<name value="set author ref"/>
<source>
<context value="certificate"/>
<element value="issuer"/>
<variable value="issuer"/>
</source>
<target>
<context value="author"/>
<contextType value="variable"/>
<element value="type"/>
<transform value="copy"/>
<parameter>
<valueString value="Organization"/>
</parameter>
</target>
<rule>
<name value="set author identifier"/>
<source>
<context value="issuer"/>
<element value="identifier"/>
<variable value="pha"/>
</source>
<target>
<context value="author"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="set pha"/>
<source>
<context value="pha"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="value"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</group>
</StructureMap>