WHO Digital Documentation of COVID-19 Certificates (DDCC)
1.0.0 - CI Build International flag

WHO Digital Documentation of COVID-19 Certificates (DDCC), published by WHO. This guide is not an authorized publication; it is the continuous build for version 1.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/WorldHealthOrganization/ddcc/tree/main and changes regularly. See the Directory of published versions

: null - JSON Representation

Draft as of 2024-10-17

Raw json | Download

{
  "resourceType" : "StructureMap",
  "id" : "CertDCCtoCoreDataSet",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap CertDCCtoCoreDataSet</b></p><a name=\"CertDCCtoCoreDataSet\"> </a><a name=\"hcCertDCCtoCoreDataSet\"> </a><a name=\"CertDCCtoCoreDataSet-en-US\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>http://smart.who.int/ddcc/StructureMap/CertDCCtoCoreDataSet<span style=\"color: navy\">&quot; = &quot;</span>CertDCCtoCoreDataSet<span style=\"color: navy\">&quot;\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Structure map transforming CertDCC logical model to bundle of Core Data Set logical model</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://smart.who.int/ddcc/StructureDefinition/CertDCC<span style=\"color: navy\">&quot; </span><b>alias </b>CWTPayload <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/bundle.html\" title=\"Bundle\">http://hl7.org/fhir/StructureDefinition/Bundle</a><span style=\"color: navy\">&quot; </span><b>alias </b>DDCCBundle <b>as </b><b>target</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-DDCCCoreDataSet.html\" title=\"DDCC Core Data Set Logical Model\">http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSet</a><span style=\"color: navy\">&quot; </span><b>alias </b>DDCC <b>as </b><b>target</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</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\">&quot; </span><b>alias </b>DDCCVS <b>as </b><b>target</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-DDCCCoreDataSetTR.html\" title=\"DDCC Core Data Set Logical Model for Test Result\">http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetTR</a><span style=\"color: navy\">&quot; </span><b>alias </b>DDCCTR <b>as </b><b>target</b>\r\n\r\n<b>group </b>CertDCCtoCoreDataSet<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>CWTPayload, <b>target</b> <span style=\"color: maroon\">ddccBundle</span><span style=\"color: navy\"> : </span>DDCCBundle<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.-260<b> as </b><span style=\"color: maroon\">hcert</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    hcert.1<b> as </b><span style=\"color: maroon\">dcc</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      dcc.v<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -&gt; </b></span> ddccBundle.entry<b> as </b><span style=\"color: maroon\">outentry</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ddcc</span><b> then</b><span style=\"color: navy\"> {\r\n</span>        v<b> then </b>DCCtoCoreDataSet<span style=\"color: navy\">(</span><span style=\"color: maroon\">dcc</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">ddcc</span><span style=\"color: navy\">)</span> <i>&quot;set DDCC&quot;</i><span style=\"color: navy\">;</span>\r\n        v<span style=\"color: navy\"><b> -&gt; </b></span>ddcc.certificate<b> as </b><span style=\"color: maroon\">certificate</span><b> then </b>CertDCCtoCoreDataSetCertificate<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dcc</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">v</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">certificate</span><span style=\"color: navy\">)</span> <i>&quot;set certificate&quot;</i><span style=\"color: navy\">;</span>\r\n        v<span style=\"color: navy\"><b> -&gt; </b></span>ddcc.vaccination<b> as </b><span style=\"color: maroon\">vaccination</span><b> then </b>VtoCoreDataSetVS<span style=\"color: navy\">(</span><span style=\"color: maroon\">v</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vaccination</span><span style=\"color: navy\">)</span> <i>&quot;set vaccination&quot;</i><span style=\"color: navy\">;</span>\r\n        v<span style=\"color: navy\"><b> -&gt; </b></span>outentry.resource = <span style=\"color: maroon\">ddcc</span> <i>&quot;set outentry&quot;</i><span style=\"color: navy\">;</span>\r\n      <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n      dcc.t<b> as </b><span style=\"color: maroon\">t</span><span style=\"color: navy\"><b> -&gt; </b></span> ddccBundle.entry<b> as </b><span style=\"color: maroon\">outentry</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetTR'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ddcc</span><b> then</b><span style=\"color: navy\"> {\r\n</span>        t<b> then </b>DCCtoCoreDataSet<span style=\"color: navy\">(</span><span style=\"color: maroon\">dcc</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">ddcc</span><span style=\"color: navy\">)</span> <i>&quot;set DDCC&quot;</i><span style=\"color: navy\">;</span>\r\n        t<span style=\"color: navy\"><b> -&gt; </b></span>ddcc.certificate<b> as </b><span style=\"color: maroon\">certificate</span><b> then </b>CertDCCtoCoreDataSetCertificate<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dcc</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">t</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">certificate</span><span style=\"color: navy\">)</span> <i>&quot;set certificate&quot;</i><span style=\"color: navy\">;</span>\r\n        t<span style=\"color: navy\"><b> -&gt; </b></span>ddcc.test<b> as </b><span style=\"color: maroon\">test</span><b> then </b>TtoCoreDataSetTR<span style=\"color: navy\">(</span><span style=\"color: maroon\">t</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">test</span><span style=\"color: navy\">)</span> <i>&quot;set test&quot;</i><span style=\"color: navy\">;</span>\r\n        t<span style=\"color: navy\"><b> -&gt; </b></span>outentry.resource = <span style=\"color: maroon\">ddcc</span> <i>&quot;set outentry&quot;</i><span style=\"color: navy\">;</span>\r\n      <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;eu_DCC_v1&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;hcert&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>DCCtoCoreDataSet<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">dcc</span>, <b>target</b> <span style=\"color: maroon\">ddcc</span><span style=\"color: navy\"> : </span>DDCC<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  dcc.dob<b> as </b><span style=\"color: maroon\">birthDate</span><span style=\"color: navy\"><b> -&gt; </b></span>ddcc.birthDate = <span style=\"color: maroon\">birthDate</span> <i>&quot;set birthDate&quot;</i><span style=\"color: navy\">;</span>\r\n  dcc.nam<b> as </b><span style=\"color: maroon\">nam</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    nam.gn<b> as </b><span style=\"color: maroon\">given</span><span style=\"color: navy\"><b> -&gt; </b></span>ddcc.name = <span style=\"color: navy\">(</span>given.replaceMatches('$', ' ')<span style=\"color: navy\">)</span> <i>&quot;set given name&quot;</i><span style=\"color: navy\">;</span>\r\n    nam.fn<b> as </b><span style=\"color: maroon\">family</span><span style=\"color: navy\"><b> -&gt; </b></span> ddcc.name<b> as </b><span style=\"color: maroon\">tName</span><span style=\"color: navy\">, </span> ddcc.name = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">tName</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">family</span><span style=\"color: navy\">)</span> <i>&quot;add family name&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>CertDCCtoCoreDataSetCertificate<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>CWTPayload, <b>source</b> <span style=\"color: maroon\">dcc</span>, <b>source</b> <span style=\"color: maroon\">g</span>, <b>target</b> <span style=\"color: maroon\">certificate</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src<span style=\"color: navy\"><b> -&gt; </b></span>certificate.period = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Period'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">period</span><b> then </b>CwtToPeriod<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">period</span><span style=\"color: navy\">)</span> <i>&quot;set period&quot;</i><span style=\"color: navy\">;</span>\r\n  dcc.ver<b> as </b><span style=\"color: maroon\">ver</span><span style=\"color: navy\"><b> -&gt; </b></span>certificate.version = <span style=\"color: maroon\">ver</span> <i>&quot;set version&quot;</i><span style=\"color: navy\">;</span>\r\n  g.ci<b> as </b><span style=\"color: maroon\">ci</span><span style=\"color: navy\"><b> -&gt; </b></span> certificate.hcid<b> as </b><span style=\"color: maroon\">hcid</span><span style=\"color: navy\">, </span> hcid.value = <span style=\"color: maroon\">ci</span> <i>&quot;set hcid&quot;</i><span style=\"color: navy\">;</span>\r\n  g.is<b> as </b><span style=\"color: maroon\">is</span><span style=\"color: navy\"><b> -&gt; </b></span> certificate.issuer = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">issuer</span><span style=\"color: navy\">, </span> issuer.display = <span style=\"color: maroon\">is</span> <i>&quot;set issuer&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>CwtToPeriod<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>CWTPayload, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Period<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.6<b> as </b><span style=\"color: maroon\">iat</span><span style=\"color: navy\"><b> -&gt; </b></span> <b>append</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">iat</span><span style=\"color: navy\">, </span><span style=\"color: blue\">' seconds'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">epoch</span><span style=\"color: navy\">, </span> tgt.start = <span style=\"color: navy\">(</span>@1970-01-01T00:00:00.000+00:00 + epoch.toQuantity()<span style=\"color: navy\">)</span> <i>&quot;set period start&quot;</i><span style=\"color: navy\">;</span>\r\n  src.4<b> as </b><span style=\"color: maroon\">exp</span><span style=\"color: navy\"><b> -&gt; </b></span> <b>append</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">exp</span><span style=\"color: navy\">, </span><span style=\"color: blue\">' seconds'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">epoch</span><span style=\"color: navy\">, </span> tgt.end = <span style=\"color: navy\">(</span>@1970-01-01T00:00:00.000+00:00 + epoch.toQuantity()<span style=\"color: navy\">)</span> <i>&quot;set period end&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>VtoCoreDataSetVS<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">v</span>, <b>target</b> <span style=\"color: maroon\">vaccination</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  v.tg<b> as </b><span style=\"color: maroon\">tg</span><span style=\"color: navy\"><b> -&gt; </b></span> vaccination.disease<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">tg</span> <i>&quot;set target disease&quot;</i><span style=\"color: navy\">;</span>\r\n  v.vp<b> as </b><span style=\"color: maroon\">vp</span><span style=\"color: navy\"><b> -&gt; </b></span> vaccination.vaccine<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'https://ec.europa.eu/health/documents/community-register/html/'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">vp</span> <i>&quot;set vaccine&quot;</i><span style=\"color: navy\">;</span>\r\n  v.mp<b> as </b><span style=\"color: maroon\">mp</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    mp<span style=\"color: navy\"><b> -&gt; </b></span> vaccination.brand<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'https://id.uvci.eu/valuesets/vaccine-medicinal-product.json'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">mp</span> <i>&quot;set default brand&quot;</i><span style=\"color: navy\">;</span>\r\n    mp<span style=\"color: navy\"><b> -&gt; </b></span><b>c</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'https://ec.europa.eu/health/documents/community-register/html/'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">mp</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coded</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      mp<b> where </b>coded.memberOf('http://smart.who.int/ddcc/ValueSet/vaccine-covid19-euur')<span style=\"color: navy\"><b> -&gt; </b></span>vaccination.brand = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">coded</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://smart.who.int/ddcc/ConceptMap/vaccine-covid19-euur-to-icd11'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span> <i>&quot;translate COVID19 brand&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;coding&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  v.ma<b> as </b><span style=\"color: maroon\">ma</span><span style=\"color: navy\"><b> -&gt; </b></span> vaccination.maholder<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'https://id.uvci.eu/valuesets/vaccine-mah-manf.json'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">ma</span> <i>&quot;set maholder&quot;</i><span style=\"color: navy\">;</span>\r\n  v.dt<b> as </b><span style=\"color: maroon\">date</span><span style=\"color: navy\"><b> -&gt; </b></span>vaccination.date = <span style=\"color: maroon\">date</span> <i>&quot;set date&quot;</i><span style=\"color: navy\">;</span>\r\n  v.dn<b> as </b><span style=\"color: maroon\">dose</span><span style=\"color: navy\"><b> -&gt; </b></span>vaccination.dose = <span style=\"color: maroon\">dose</span> <i>&quot;set dose&quot;</i><span style=\"color: navy\">;</span>\r\n  v.sd<b> as </b><span style=\"color: maroon\">totalDoses</span><span style=\"color: navy\"><b> -&gt; </b></span>vaccination.totalDoses = <span style=\"color: maroon\">totalDoses</span> <i>&quot;set totalDoses&quot;</i><span style=\"color: navy\">;</span>\r\n  v.co<b> as </b><span style=\"color: maroon\">co</span><span style=\"color: navy\"><b> -&gt; </b></span> vaccination.country<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">co</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'urn:iso:std:iso:3166'</span> <i>&quot;set country&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>TtoCoreDataSetTR<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">t</span>, <b>target</b> <span style=\"color: maroon\">test</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  t.tg<b> as </b><span style=\"color: maroon\">tg</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    tg<span style=\"color: navy\"><b> -&gt; </b></span> test.pathogen<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">tg</span> <i>&quot;set default pathogen&quot;</i><span style=\"color: navy\">;</span>\r\n    tg<span style=\"color: navy\"><b> -&gt; </b></span><b>c</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tg</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coded</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      tg<b> where </b>coded.memberOf('http://smart.who.int/ddcc/ValueSet/lab-test-pathogen-covid19-snomed')<span style=\"color: navy\"><b> -&gt; </b></span>test.pathogen = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">coded</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://smart.who.int/ddcc/ConceptMap/lab-test-pathogen-snomed-to-icd11'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span> <i>&quot;translate COVID19 pathogen&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;coding&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  t.tt<b> as </b><span style=\"color: maroon\">tt</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    tt<span style=\"color: navy\"><b> -&gt; </b></span> test.type<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">tt</span> <i>&quot;set default type&quot;</i><span style=\"color: navy\">;</span>\r\n    tt<span style=\"color: navy\"><b> -&gt; </b></span><b>c</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tt</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coded</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      tt<b> where </b>coded.memberOf('http://smart.who.int/ddcc/ValueSet/lab-test-type-covid19-loinc')<span style=\"color: navy\"><b> -&gt; </b></span>test.type = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">coded</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://smart.who.int/ddcc/ConceptMap/lab-test-type-covid19-loinc-to-icd11'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span> <i>&quot;translate COVID19 type&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;coding&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  t.nm<b> as </b><span style=\"color: maroon\">nm</span><span style=\"color: navy\"><b> -&gt; </b></span> test.brand<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'https://id.uvci.eu/valuesets/test-manf.json'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">nm</span> <i>&quot;set brand&quot;</i><span style=\"color: navy\">;</span>\r\n  t.ma<b> as </b><span style=\"color: maroon\">ma</span><span style=\"color: navy\"><b> -&gt; </b></span> test.manufacturer<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'https://covid-19-diagnostics.jrc.ec.europa.eu/devices'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">ma</span> <i>&quot;set manufacturer&quot;</i><span style=\"color: navy\">;</span>\r\n  t.sc<b> as </b><span style=\"color: maroon\">date</span><span style=\"color: navy\"><b> -&gt; </b></span>test.date = <span style=\"color: maroon\">date</span> <i>&quot;set date&quot;</i><span style=\"color: navy\">;</span>\r\n  t.tr<b> as </b><span style=\"color: maroon\">tr</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    tr<span style=\"color: navy\"><b> -&gt; </b></span> test.result<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">tr</span> <i>&quot;set default result&quot;</i><span style=\"color: navy\">;</span>\r\n    tr<span style=\"color: navy\"><b> -&gt; </b></span><b>c</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tr</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coded</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      tr<b> where </b>coded.memberOf('http://smart.who.int/ddcc/ValueSet/lab-test-qual-result-snomed')<span style=\"color: navy\"><b> -&gt; </b></span>test.result = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">coded</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://smart.who.int/ddcc/ConceptMap/lab-test-qual-result-snomed-to-icd11'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span> <i>&quot;translate COVID19 result&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;coding&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  t.tc<b> as </b><span style=\"color: maroon\">tc</span><span style=\"color: navy\"><b> -&gt; </b></span> test.centre<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">tc</span> <i>&quot;set centre&quot;</i><span style=\"color: navy\">;</span>\r\n  t.co<b> as </b><span style=\"color: maroon\">co</span><span style=\"color: navy\"><b> -&gt; </b></span> test.country<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">co</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'urn:iso:std:iso:3166'</span> <i>&quot;set country&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  },
  "url" : "http://smart.who.int/ddcc/StructureMap/CertDCCtoCoreDataSet",
  "version" : "1.0.0",
  "name" : "CertDCCtoCoreDataSet",
  "status" : "draft",
  "date" : "2024-10-17T04:40:27+00:00",
  "publisher" : "WHO",
  "contact" : [
    {
      "name" : "WHO",
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://who.int"
        }
      ]
    }
  ],
  "description" : "Structure map transforming CertDCC logical model to bundle of Core Data Set logical model",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code" : "001"
        }
      ]
    }
  ],
  "structure" : [
    {
      "url" : "http://smart.who.int/ddcc/StructureDefinition/CertDCC",
      "mode" : "source",
      "alias" : "CWTPayload"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/Bundle",
      "mode" : "target",
      "alias" : "DDCCBundle"
    },
    {
      "url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSet",
      "mode" : "target",
      "alias" : "DDCC"
    },
    {
      "url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS",
      "mode" : "target",
      "alias" : "DDCCVS"
    },
    {
      "url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetTR",
      "mode" : "target",
      "alias" : "DDCCTR"
    }
  ],
  "group" : [
    {
      "name" : "CertDCCtoCoreDataSet",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "CWTPayload",
          "mode" : "source"
        },
        {
          "name" : "ddccBundle",
          "type" : "DDCCBundle",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "hcert",
          "source" : [
            {
              "context" : "src",
              "element" : "-260",
              "variable" : "hcert"
            }
          ],
          "rule" : [
            {
              "name" : "eu_DCC_v1",
              "source" : [
                {
                  "context" : "hcert",
                  "element" : "1",
                  "variable" : "dcc"
                }
              ],
              "rule" : [
                {
                  "name" : "v",
                  "source" : [
                    {
                      "context" : "dcc",
                      "element" : "v",
                      "variable" : "v"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ddccBundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "outentry"
                    },
                    {
                      "contextType" : "variable",
                      "variable" : "ddcc",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "set DDCC",
                      "source" : [
                        {
                          "context" : "v"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "DCCtoCoreDataSet",
                          "variable" : [
                            "dcc",
                            "ddcc"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "set certificate",
                      "source" : [
                        {
                          "context" : "v"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ddcc",
                          "contextType" : "variable",
                          "element" : "certificate",
                          "variable" : "certificate"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "CertDCCtoCoreDataSetCertificate",
                          "variable" : [
                            "src",
                            "dcc",
                            "v",
                            "certificate"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "set vaccination",
                      "source" : [
                        {
                          "context" : "v"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ddcc",
                          "contextType" : "variable",
                          "element" : "vaccination",
                          "variable" : "vaccination"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "VtoCoreDataSetVS",
                          "variable" : [
                            "v",
                            "vaccination"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "set outentry",
                      "source" : [
                        {
                          "context" : "v"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "outentry",
                          "contextType" : "variable",
                          "element" : "resource",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "ddcc"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "t",
                  "source" : [
                    {
                      "context" : "dcc",
                      "element" : "t",
                      "variable" : "t"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ddccBundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "outentry"
                    },
                    {
                      "contextType" : "variable",
                      "variable" : "ddcc",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetTR"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "set DDCC",
                      "source" : [
                        {
                          "context" : "t"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "DCCtoCoreDataSet",
                          "variable" : [
                            "dcc",
                            "ddcc"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "set certificate",
                      "source" : [
                        {
                          "context" : "t"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ddcc",
                          "contextType" : "variable",
                          "element" : "certificate",
                          "variable" : "certificate"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "CertDCCtoCoreDataSetCertificate",
                          "variable" : [
                            "src",
                            "dcc",
                            "t",
                            "certificate"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "set test",
                      "source" : [
                        {
                          "context" : "t"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ddcc",
                          "contextType" : "variable",
                          "element" : "test",
                          "variable" : "test"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "TtoCoreDataSetTR",
                          "variable" : [
                            "t",
                            "test"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "set outentry",
                      "source" : [
                        {
                          "context" : "t"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "outentry",
                          "contextType" : "variable",
                          "element" : "resource",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "ddcc"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "DCCtoCoreDataSet",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "dcc",
          "mode" : "source"
        },
        {
          "name" : "ddcc",
          "type" : "DDCC",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "set birthDate",
          "source" : [
            {
              "context" : "dcc",
              "element" : "dob",
              "variable" : "birthDate"
            }
          ],
          "target" : [
            {
              "context" : "ddcc",
              "contextType" : "variable",
              "element" : "birthDate",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "birthDate"
                }
              ]
            }
          ]
        },
        {
          "name" : "nam",
          "source" : [
            {
              "context" : "dcc",
              "element" : "nam",
              "variable" : "nam"
            }
          ],
          "rule" : [
            {
              "name" : "set given name",
              "source" : [
                {
                  "context" : "nam",
                  "element" : "gn",
                  "variable" : "given"
                }
              ],
              "target" : [
                {
                  "context" : "ddcc",
                  "contextType" : "variable",
                  "element" : "name",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "given.replaceMatches('$', ' ')"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "add family name",
              "source" : [
                {
                  "context" : "nam",
                  "element" : "fn",
                  "variable" : "family"
                }
              ],
              "target" : [
                {
                  "context" : "ddcc",
                  "contextType" : "variable",
                  "element" : "name",
                  "variable" : "tName"
                },
                {
                  "context" : "ddcc",
                  "contextType" : "variable",
                  "element" : "name",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueId" : "tName"
                    },
                    {
                      "valueId" : "family"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "CertDCCtoCoreDataSetCertificate",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "CWTPayload",
          "mode" : "source"
        },
        {
          "name" : "dcc",
          "mode" : "source"
        },
        {
          "name" : "g",
          "mode" : "source"
        },
        {
          "name" : "certificate",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "set period",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "certificate",
              "contextType" : "variable",
              "element" : "period",
              "variable" : "period",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "Period"
                }
              ]
            }
          ],
          "dependent" : [
            {
              "name" : "CwtToPeriod",
              "variable" : [
                "src",
                "period"
              ]
            }
          ]
        },
        {
          "name" : "set version",
          "source" : [
            {
              "context" : "dcc",
              "element" : "ver",
              "variable" : "ver"
            }
          ],
          "target" : [
            {
              "context" : "certificate",
              "contextType" : "variable",
              "element" : "version",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "ver"
                }
              ]
            }
          ]
        },
        {
          "name" : "set hcid",
          "source" : [
            {
              "context" : "g",
              "element" : "ci",
              "variable" : "ci"
            }
          ],
          "target" : [
            {
              "context" : "certificate",
              "contextType" : "variable",
              "element" : "hcid",
              "variable" : "hcid"
            },
            {
              "context" : "hcid",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "ci"
                }
              ]
            }
          ]
        },
        {
          "name" : "set issuer",
          "source" : [
            {
              "context" : "g",
              "element" : "is",
              "variable" : "is"
            }
          ],
          "target" : [
            {
              "context" : "certificate",
              "contextType" : "variable",
              "element" : "issuer",
              "variable" : "issuer",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "Reference"
                }
              ]
            },
            {
              "context" : "issuer",
              "contextType" : "variable",
              "element" : "display",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "is"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "CwtToPeriod",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "CWTPayload",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "Period",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "set period start",
          "source" : [
            {
              "context" : "src",
              "element" : "6",
              "variable" : "iat"
            }
          ],
          "target" : [
            {
              "contextType" : "variable",
              "variable" : "epoch",
              "transform" : "append",
              "parameter" : [
                {
                  "valueId" : "iat"
                },
                {
                  "valueString" : " seconds"
                }
              ]
            },
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "start",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "@1970-01-01T00:00:00.000+00:00 + epoch.toQuantity()"
                }
              ]
            }
          ]
        },
        {
          "name" : "set period end",
          "source" : [
            {
              "context" : "src",
              "element" : "4",
              "variable" : "exp"
            }
          ],
          "target" : [
            {
              "contextType" : "variable",
              "variable" : "epoch",
              "transform" : "append",
              "parameter" : [
                {
                  "valueId" : "exp"
                },
                {
                  "valueString" : " seconds"
                }
              ]
            },
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "end",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "@1970-01-01T00:00:00.000+00:00 + epoch.toQuantity()"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "VtoCoreDataSetVS",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "v",
          "mode" : "source"
        },
        {
          "name" : "vaccination",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "set target disease",
          "source" : [
            {
              "context" : "v",
              "element" : "tg",
              "variable" : "tg"
            }
          ],
          "target" : [
            {
              "context" : "vaccination",
              "contextType" : "variable",
              "element" : "disease",
              "variable" : "coding"
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "http://snomed.info/sct"
                }
              ]
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "code",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "tg"
                }
              ]
            }
          ]
        },
        {
          "name" : "set vaccine",
          "source" : [
            {
              "context" : "v",
              "element" : "vp",
              "variable" : "vp"
            }
          ],
          "target" : [
            {
              "context" : "vaccination",
              "contextType" : "variable",
              "element" : "vaccine",
              "variable" : "coding"
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "https://ec.europa.eu/health/documents/community-register/html/"
                }
              ]
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "code",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "vp"
                }
              ]
            }
          ]
        },
        {
          "name" : "mp",
          "source" : [
            {
              "context" : "v",
              "element" : "mp",
              "variable" : "mp"
            }
          ],
          "rule" : [
            {
              "name" : "set default brand",
              "source" : [
                {
                  "context" : "mp"
                }
              ],
              "target" : [
                {
                  "context" : "vaccination",
                  "contextType" : "variable",
                  "element" : "brand",
                  "variable" : "coding"
                },
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "system",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "https://id.uvci.eu/valuesets/vaccine-medicinal-product.json"
                    }
                  ]
                },
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "code",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "mp"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "mp"
                }
              ],
              "target" : [
                {
                  "contextType" : "variable",
                  "variable" : "coded",
                  "transform" : "c",
                  "parameter" : [
                    {
                      "valueString" : "https://ec.europa.eu/health/documents/community-register/html/"
                    },
                    {
                      "valueId" : "mp"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "translate COVID19 brand",
                  "source" : [
                    {
                      "context" : "mp",
                      "condition" : "coded.memberOf('http://smart.who.int/ddcc/ValueSet/vaccine-covid19-euur')"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "vaccination",
                      "contextType" : "variable",
                      "element" : "brand",
                      "transform" : "translate",
                      "parameter" : [
                        {
                          "valueId" : "coded"
                        },
                        {
                          "valueString" : "http://smart.who.int/ddcc/ConceptMap/vaccine-covid19-euur-to-icd11"
                        },
                        {
                          "valueString" : "Coding"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "set maholder",
          "source" : [
            {
              "context" : "v",
              "element" : "ma",
              "variable" : "ma"
            }
          ],
          "target" : [
            {
              "context" : "vaccination",
              "contextType" : "variable",
              "element" : "maholder",
              "variable" : "coding"
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "https://id.uvci.eu/valuesets/vaccine-mah-manf.json"
                }
              ]
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "code",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "ma"
                }
              ]
            }
          ]
        },
        {
          "name" : "set date",
          "source" : [
            {
              "context" : "v",
              "element" : "dt",
              "variable" : "date"
            }
          ],
          "target" : [
            {
              "context" : "vaccination",
              "contextType" : "variable",
              "element" : "date",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "date"
                }
              ]
            }
          ]
        },
        {
          "name" : "set dose",
          "source" : [
            {
              "context" : "v",
              "element" : "dn",
              "variable" : "dose"
            }
          ],
          "target" : [
            {
              "context" : "vaccination",
              "contextType" : "variable",
              "element" : "dose",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "dose"
                }
              ]
            }
          ]
        },
        {
          "name" : "set totalDoses",
          "source" : [
            {
              "context" : "v",
              "element" : "sd",
              "variable" : "totalDoses"
            }
          ],
          "target" : [
            {
              "context" : "vaccination",
              "contextType" : "variable",
              "element" : "totalDoses",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "totalDoses"
                }
              ]
            }
          ]
        },
        {
          "name" : "set country",
          "source" : [
            {
              "context" : "v",
              "element" : "co",
              "variable" : "co"
            }
          ],
          "target" : [
            {
              "context" : "vaccination",
              "contextType" : "variable",
              "element" : "country",
              "variable" : "coding"
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "code",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "co"
                }
              ]
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "urn:iso:std:iso:3166"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "TtoCoreDataSetTR",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "t",
          "mode" : "source"
        },
        {
          "name" : "test",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "tg",
          "source" : [
            {
              "context" : "t",
              "element" : "tg",
              "variable" : "tg"
            }
          ],
          "rule" : [
            {
              "name" : "set default pathogen",
              "source" : [
                {
                  "context" : "tg"
                }
              ],
              "target" : [
                {
                  "context" : "test",
                  "contextType" : "variable",
                  "element" : "pathogen",
                  "variable" : "coding"
                },
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "system",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "http://snomed.info/sct"
                    }
                  ]
                },
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "code",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "tg"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "tg"
                }
              ],
              "target" : [
                {
                  "contextType" : "variable",
                  "variable" : "coded",
                  "transform" : "c",
                  "parameter" : [
                    {
                      "valueString" : "http://snomed.info/sct"
                    },
                    {
                      "valueId" : "tg"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "translate COVID19 pathogen",
                  "source" : [
                    {
                      "context" : "tg",
                      "condition" : "coded.memberOf('http://smart.who.int/ddcc/ValueSet/lab-test-pathogen-covid19-snomed')"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "test",
                      "contextType" : "variable",
                      "element" : "pathogen",
                      "transform" : "translate",
                      "parameter" : [
                        {
                          "valueId" : "coded"
                        },
                        {
                          "valueString" : "http://smart.who.int/ddcc/ConceptMap/lab-test-pathogen-snomed-to-icd11"
                        },
                        {
                          "valueString" : "Coding"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "tt",
          "source" : [
            {
              "context" : "t",
              "element" : "tt",
              "variable" : "tt"
            }
          ],
          "rule" : [
            {
              "name" : "set default type",
              "source" : [
                {
                  "context" : "tt"
                }
              ],
              "target" : [
                {
                  "context" : "test",
                  "contextType" : "variable",
                  "element" : "type",
                  "variable" : "coding"
                },
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "system",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "http://loinc.org"
                    }
                  ]
                },
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "code",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "tt"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "tt"
                }
              ],
              "target" : [
                {
                  "contextType" : "variable",
                  "variable" : "coded",
                  "transform" : "c",
                  "parameter" : [
                    {
                      "valueString" : "http://loinc.org"
                    },
                    {
                      "valueId" : "tt"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "translate COVID19 type",
                  "source" : [
                    {
                      "context" : "tt",
                      "condition" : "coded.memberOf('http://smart.who.int/ddcc/ValueSet/lab-test-type-covid19-loinc')"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "test",
                      "contextType" : "variable",
                      "element" : "type",
                      "transform" : "translate",
                      "parameter" : [
                        {
                          "valueId" : "coded"
                        },
                        {
                          "valueString" : "http://smart.who.int/ddcc/ConceptMap/lab-test-type-covid19-loinc-to-icd11"
                        },
                        {
                          "valueString" : "Coding"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "set brand",
          "source" : [
            {
              "context" : "t",
              "element" : "nm",
              "variable" : "nm"
            }
          ],
          "target" : [
            {
              "context" : "test",
              "contextType" : "variable",
              "element" : "brand",
              "variable" : "coding"
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "https://id.uvci.eu/valuesets/test-manf.json"
                }
              ]
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "code",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "nm"
                }
              ]
            }
          ]
        },
        {
          "name" : "set manufacturer",
          "source" : [
            {
              "context" : "t",
              "element" : "ma",
              "variable" : "ma"
            }
          ],
          "target" : [
            {
              "context" : "test",
              "contextType" : "variable",
              "element" : "manufacturer",
              "variable" : "coding"
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "https://covid-19-diagnostics.jrc.ec.europa.eu/devices"
                }
              ]
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "code",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "ma"
                }
              ]
            }
          ]
        },
        {
          "name" : "set date",
          "source" : [
            {
              "context" : "t",
              "element" : "sc",
              "variable" : "date"
            }
          ],
          "target" : [
            {
              "context" : "test",
              "contextType" : "variable",
              "element" : "date",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "date"
                }
              ]
            }
          ]
        },
        {
          "name" : "tr",
          "source" : [
            {
              "context" : "t",
              "element" : "tr",
              "variable" : "tr"
            }
          ],
          "rule" : [
            {
              "name" : "set default result",
              "source" : [
                {
                  "context" : "tr"
                }
              ],
              "target" : [
                {
                  "context" : "test",
                  "contextType" : "variable",
                  "element" : "result",
                  "variable" : "coding"
                },
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "system",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "http://snomed.info/sct"
                    }
                  ]
                },
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "code",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "tr"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "coding",
              "source" : [
                {
                  "context" : "tr"
                }
              ],
              "target" : [
                {
                  "contextType" : "variable",
                  "variable" : "coded",
                  "transform" : "c",
                  "parameter" : [
                    {
                      "valueString" : "http://snomed.info/sct"
                    },
                    {
                      "valueId" : "tr"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "translate COVID19 result",
                  "source" : [
                    {
                      "context" : "tr",
                      "condition" : "coded.memberOf('http://smart.who.int/ddcc/ValueSet/lab-test-qual-result-snomed')"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "test",
                      "contextType" : "variable",
                      "element" : "result",
                      "transform" : "translate",
                      "parameter" : [
                        {
                          "valueId" : "coded"
                        },
                        {
                          "valueString" : "http://smart.who.int/ddcc/ConceptMap/lab-test-qual-result-snomed-to-icd11"
                        },
                        {
                          "valueString" : "Coding"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "set centre",
          "source" : [
            {
              "context" : "t",
              "element" : "tc",
              "variable" : "tc"
            }
          ],
          "target" : [
            {
              "context" : "test",
              "contextType" : "variable",
              "element" : "centre",
              "variable" : "coding"
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "code",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "tc"
                }
              ]
            }
          ]
        },
        {
          "name" : "set country",
          "source" : [
            {
              "context" : "t",
              "element" : "co",
              "variable" : "co"
            }
          ],
          "target" : [
            {
              "context" : "test",
              "contextType" : "variable",
              "element" : "country",
              "variable" : "coding"
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "code",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "co"
                }
              ]
            },
            {
              "context" : "coding",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "urn:iso:std:iso:3166"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}