WHO Digital Documentation of COVID-19 Certificates (DDCC)
1.0.0 - CI Build
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
Draft as of 2024-10-17 |
{
"resourceType" : "StructureMap",
"id" : "QRespToVSCoreDataSet",
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap QRespToVSCoreDataSet</b></p><a name=\"QRespToVSCoreDataSet\"> </a><a name=\"hcQRespToVSCoreDataSet\"> </a><a name=\"QRespToVSCoreDataSet-en-US\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> "</span>http://smart.who.int/ddcc/StructureMap/QRespToVSCoreDataSet<span style=\"color: navy\">" = "</span>QRespToVSCoreDataSet<span style=\"color: navy\">"\r\n\r\n</span><b>uses</b><span style=\"color: navy\"> "</span><a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\" title=\"QuestionnaireResponse\">http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse</a><span style=\"color: navy\">" </span><b>alias </b>QResp <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"StructureDefinition-DDCCCoreDataSetVSCoC.html\" title=\"DDCC Core Data Set Logical Model - Vaccination Status - Continuity of Care\">http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVSCoC</a><span style=\"color: navy\">" </span><b>alias </b>DDCC <b>as </b><b>target</b>\r\n\r\n<b>group </b>QRespToCoreDataSet<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span><span style=\"color: navy\"> : </span>QResp, <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> qr<b> as </b><span style=\"color: maroon\">src</span><b> then </b>QRespToHeader<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">ddcc</span><span style=\"color: navy\">)</span> <i>"set header content"</i><span style=\"color: navy\">;</span>\r\n qr<b> as </b><span style=\"color: maroon\">src</span><span style=\"color: navy\"><b> -> </b></span>ddcc.vaccination<b> as </b><span style=\"color: maroon\">vaccination</span><b> then </b>QRespToVaccination<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vaccination</span><span style=\"color: navy\">)</span> <i>"set vaccination content"</i><span style=\"color: navy\">;</span>\r\n qr<b> as </b><span style=\"color: maroon\">src</span><span style=\"color: navy\"><b> -> </b></span>ddcc.certificate<b> as </b><span style=\"color: maroon\">certificate</span><b> then </b>QRespToCertificate<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">certificate</span><span style=\"color: navy\">)</span> <i>"set certificate content"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>QRespToHeader<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span>, <b>target</b> <span style=\"color: maroon\">ddcc</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> qr.item<b> as </b><span style=\"color: maroon\">item</span><b> then</b><span style=\"color: navy\"> {\r\n</span> item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'name'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>ddcc.name = <span style=\"color: maroon\">content</span> <i>"set name"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answser for name"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'birthDate'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueDate<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>ddcc.birthDate = <span style=\"color: maroon\">content</span> <i>"set birthDate"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for birthDate"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'identifier'<span style=\"color: navy\"><b> -> </b></span>ddcc.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">content</span> <i>"set identifier"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for identifier"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'sex'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span> coding.code<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>ddcc.sex = <span style=\"color: maroon\">content</span> <i>"set sex"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"process coding"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for sex"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"header items"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>QRespToVaccination<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span>, <b>target</b> <span style=\"color: maroon\">vaccination</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> qr.item<b> as </b><span style=\"color: maroon\">item</span><b> then</b><span style=\"color: navy\"> {\r\n</span> item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'vaccine'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.vaccine = <span style=\"color: maroon\">content</span> <i>"set vaccine"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for vaccine"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'brand'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.brand = <span style=\"color: maroon\">content</span> <i>"set brand"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for brand"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'manufacturer'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.manufacturer = <span style=\"color: maroon\">content</span> <i>"set manufacturer"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for manufacturer"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'ma_holder'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.maholder = <span style=\"color: maroon\">content</span> <i>"set maholder"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for maholder"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'lot'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.lot = <span style=\"color: maroon\">content</span> <i>"set lot"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answser for lot"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'date'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueDate<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.date = <span style=\"color: maroon\">content</span> <i>"set date"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for date"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'vaccine_valid'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueDate<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.validFrom = <span style=\"color: maroon\">content</span> <i>"set validFrom"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for validFrom"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'dose'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueInteger<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.dose = <span style=\"color: maroon\">content</span> <i>"set dose"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for dose"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'total_doses'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueInteger<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.totalDoses = <span style=\"color: maroon\">content</span> <i>"set totalDoses"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for totalDoses"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'country'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.country = <span style=\"color: maroon\">content</span> <i>"set country"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for country"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'centre'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.centre = <span style=\"color: maroon\">content</span> <i>"set centre"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answser for centre"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'hw'<span style=\"color: navy\"><b> -> </b></span>vaccination.practitioner<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">content</span> <i>"set practitioner"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answser for practitioner"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'disease'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.disease = <span style=\"color: maroon\">content</span> <i>"set disease"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for disease"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'due_date'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueDate<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.nextDose = <span style=\"color: maroon\">content</span> <i>"set nextDose"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for nextDose"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"vaccination items"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>QRespToPeriod<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span>, <b>target</b> <span style=\"color: maroon\">period</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> qr.item<b> as </b><span style=\"color: maroon\">item</span><b> then</b><span style=\"color: navy\"> {\r\n</span> item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'valid_from'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueDate<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>period.start = <span style=\"color: maroon\">content</span> <i>"set valid_from"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for valid_from"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'valid_until'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueDate<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>period.end = <span style=\"color: maroon\">content</span> <i>"set valid_until"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for valid_until"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"vaccination validity items"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>QRespToCertificate<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span>, <b>target</b> <span style=\"color: maroon\">certificate</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> qr.item<b> as </b><span style=\"color: maroon\">item</span><b> then</b><span style=\"color: navy\"> {\r\n</span> item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'pha'<span style=\"color: navy\"><b> -> </b></span>certificate.issuer<b> as </b><span style=\"color: maroon\">issuer</span><b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>issuer.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<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 issuer identifier"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set issuer"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answser for hcid"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'hcid'<span style=\"color: navy\"><b> -> </b></span>certificate.hcid<b> as </b><span style=\"color: maroon\">hcid</span><b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span> hcid.value = <span style=\"color: maroon\">content</span><span style=\"color: navy\">, </span> certificate.version = <span style=\"color: blue\">'RC2'</span> <i>"set hcid and version"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answser for hcid"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"certificate items"</i><span style=\"color: navy\">;</span>\r\n qr<b> as </b><span style=\"color: maroon\">src</span><span style=\"color: navy\"><b> -> </b></span>certificate.period<b> as </b><span style=\"color: maroon\">period</span><b> then </b>QRespToPeriod<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>"set vaccination period"</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/QRespToVSCoreDataSet",
"version" : "1.0.0",
"name" : "QRespToVSCoreDataSet",
"status" : "draft",
"date" : "2024-10-17T04:40:27+00:00",
"publisher" : "WHO",
"contact" : [
{
"name" : "WHO",
"telecom" : [
{
"system" : "url",
"value" : "http://who.int"
}
]
}
],
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse",
"mode" : "source",
"alias" : "QResp"
},
{
"url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVSCoC",
"mode" : "target",
"alias" : "DDCC"
}
],
"group" : [
{
"name" : "QRespToCoreDataSet",
"typeMode" : "none",
"input" : [
{
"name" : "qr",
"type" : "QResp",
"mode" : "source"
},
{
"name" : "ddcc",
"type" : "DDCC",
"mode" : "target"
}
],
"rule" : [
{
"name" : "set header content",
"source" : [
{
"context" : "qr",
"variable" : "src"
}
],
"dependent" : [
{
"name" : "QRespToHeader",
"variable" : [
"src",
"ddcc"
]
}
]
},
{
"name" : "set vaccination content",
"source" : [
{
"context" : "qr",
"variable" : "src"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "vaccination",
"variable" : "vaccination"
}
],
"dependent" : [
{
"name" : "QRespToVaccination",
"variable" : [
"src",
"vaccination"
]
}
]
},
{
"name" : "set certificate content",
"source" : [
{
"context" : "qr",
"variable" : "src"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "certificate",
"variable" : "certificate"
}
],
"dependent" : [
{
"name" : "QRespToCertificate",
"variable" : [
"src",
"certificate"
]
}
]
}
]
},
{
"name" : "QRespToHeader",
"typeMode" : "none",
"input" : [
{
"name" : "qr",
"mode" : "source"
},
{
"name" : "ddcc",
"mode" : "target"
}
],
"rule" : [
{
"name" : "header items",
"source" : [
{
"context" : "qr",
"element" : "item",
"variable" : "item"
}
],
"rule" : [
{
"name" : "first answser for name",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'name'"
}
],
"rule" : [
{
"name" : "set name",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "name",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for birthDate",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'birthDate'"
}
],
"rule" : [
{
"name" : "set birthDate",
"source" : [
{
"context" : "answer",
"element" : "valueDate",
"variable" : "content"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for identifier",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'identifier'"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier"
}
],
"rule" : [
{
"name" : "set identifier",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for sex",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'sex'"
}
],
"rule" : [
{
"name" : "process coding",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "set sex",
"source" : [
{
"context" : "coding",
"element" : "code",
"variable" : "content"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "sex",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "QRespToVaccination",
"typeMode" : "none",
"input" : [
{
"name" : "qr",
"mode" : "source"
},
{
"name" : "vaccination",
"mode" : "target"
}
],
"rule" : [
{
"name" : "vaccination items",
"source" : [
{
"context" : "qr",
"element" : "item",
"variable" : "item"
}
],
"rule" : [
{
"name" : "first answer for vaccine",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'vaccine'"
}
],
"rule" : [
{
"name" : "set vaccine",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "vaccine",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for brand",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'brand'"
}
],
"rule" : [
{
"name" : "set brand",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "brand",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for manufacturer",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'manufacturer'"
}
],
"rule" : [
{
"name" : "set manufacturer",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "manufacturer",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for maholder",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'ma_holder'"
}
],
"rule" : [
{
"name" : "set maholder",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "maholder",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answser for lot",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'lot'"
}
],
"rule" : [
{
"name" : "set lot",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "lot",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for date",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'date'"
}
],
"rule" : [
{
"name" : "set date",
"source" : [
{
"context" : "answer",
"element" : "valueDate",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "date",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for validFrom",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'vaccine_valid'"
}
],
"rule" : [
{
"name" : "set validFrom",
"source" : [
{
"context" : "answer",
"element" : "valueDate",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "validFrom",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for dose",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'dose'"
}
],
"rule" : [
{
"name" : "set dose",
"source" : [
{
"context" : "answer",
"element" : "valueInteger",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "dose",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for totalDoses",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'total_doses'"
}
],
"rule" : [
{
"name" : "set totalDoses",
"source" : [
{
"context" : "answer",
"element" : "valueInteger",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "totalDoses",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for country",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'country'"
}
],
"rule" : [
{
"name" : "set country",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "country",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answser for centre",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'centre'"
}
],
"rule" : [
{
"name" : "set centre",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "centre",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answser for practitioner",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'hw'"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "identifier"
}
],
"rule" : [
{
"name" : "set practitioner",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for disease",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'disease'"
}
],
"rule" : [
{
"name" : "set disease",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "disease",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for nextDose",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'due_date'"
}
],
"rule" : [
{
"name" : "set nextDose",
"source" : [
{
"context" : "answer",
"element" : "valueDate",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "nextDose",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "QRespToPeriod",
"typeMode" : "none",
"input" : [
{
"name" : "qr",
"mode" : "source"
},
{
"name" : "period",
"mode" : "target"
}
],
"rule" : [
{
"name" : "vaccination validity items",
"source" : [
{
"context" : "qr",
"element" : "item",
"variable" : "item"
}
],
"rule" : [
{
"name" : "first answer for valid_from",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'valid_from'"
}
],
"rule" : [
{
"name" : "set valid_from",
"source" : [
{
"context" : "answer",
"element" : "valueDate",
"variable" : "content"
}
],
"target" : [
{
"context" : "period",
"contextType" : "variable",
"element" : "start",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for valid_until",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'valid_until'"
}
],
"rule" : [
{
"name" : "set valid_until",
"source" : [
{
"context" : "answer",
"element" : "valueDate",
"variable" : "content"
}
],
"target" : [
{
"context" : "period",
"contextType" : "variable",
"element" : "end",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "QRespToCertificate",
"typeMode" : "none",
"input" : [
{
"name" : "qr",
"mode" : "source"
},
{
"name" : "certificate",
"mode" : "target"
}
],
"rule" : [
{
"name" : "certificate items",
"source" : [
{
"context" : "qr",
"element" : "item",
"variable" : "item"
}
],
"rule" : [
{
"name" : "first answser for hcid",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'pha'"
}
],
"target" : [
{
"context" : "certificate",
"contextType" : "variable",
"element" : "issuer",
"variable" : "issuer"
}
],
"rule" : [
{
"name" : "set issuer",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "issuer",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier"
}
],
"rule" : [
{
"name" : "set issuer identifier",
"source" : [
{
"context" : "content",
"variable" : "value"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "value"
}
]
}
]
}
]
}
]
},
{
"name" : "first answser for hcid",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'hcid'"
}
],
"target" : [
{
"context" : "certificate",
"contextType" : "variable",
"element" : "hcid",
"variable" : "hcid"
}
],
"rule" : [
{
"name" : "set hcid and version",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "hcid",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
},
{
"context" : "certificate",
"contextType" : "variable",
"element" : "version",
"transform" : "copy",
"parameter" : [
{
"valueString" : "RC2"
}
]
}
]
}
]
}
]
},
{
"name" : "set vaccination period",
"source" : [
{
"context" : "qr",
"variable" : "src"
}
],
"target" : [
{
"context" : "certificate",
"contextType" : "variable",
"element" : "period",
"variable" : "period"
}
],
"dependent" : [
{
"name" : "QRespToPeriod",
"variable" : [
"src",
"period"
]
}
]
}
]
}
]
}