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

This is the continuous build for version 1.0.0. This version is based on the current content of https://github.com/WorldHealthOrganization/ddcc and changes regularly.

: ResourcesToCoreDataSet - JSON Representation

Draft as of 2024-04-24

Raw json | Download


{
  "resourceType" : "StructureMap",
  "id" : "ddcc-resources-to-coredataset",
  "meta" : {
    "versionId" : "1",
    "lastUpdated" : "2021-12-14T19:11:43.510+00:00"
  },
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><pre>map &quot;http://smart.who.int/ddcc/StructureMap/ResourcesToCoreDataSet&quot; = &quot;ResourcesToCoreDataSet&quot;\r\n\r\n\r\nuses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; alias Bundle as source\r\nuses &quot;http://hl7.org/fhir/StructureDefinition/HumanName&quot; alias HumanName as produced\r\nuses &quot;http://smart.who.int/ddcc/StructureDefinition/DDCCPatient&quot; alias DDCCPatient as source\r\nuses &quot;http://smart.who.int/ddcc/StructureDefinition/DDCCImmunization&quot; alias DDCCImmunization as source\r\nuses &quot;http://smart.who.int/ddcc/StructureDefinition/DDCCImmunizationRecommendation&quot; alias DDCCImmunizationRecommendation as source\r\nuses &quot;http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetPoV&quot; alias DDCCPoV as target\r\n\r\ngroup ResourcesToCoreDataSet(source bundle : Bundle, target ddcc : DDCCPoV) {\r\n  bundle.entry as entry then {\r\n    entry.resource : Patient as patient then PatientToHeader(patient, ddcc) &quot;set header&quot;;\r\n  } &quot;set header from patient&quot;;\r\n}\r\n\r\ngroup PatientToHeader(source patient : DDCCPatient, target ddcc : DDCCPoV) {\r\n  patient.name as name then {\r\n    name as src -&gt; ddcc as tgt then NameToText(src, tgt) &quot;setting name&quot;;\r\n  } &quot;set name&quot;;\r\n}\r\n\r\ngroup NameToText(source src : HumanName, target tgt) {\r\n  src.given as given -&gt; tgt.name = given &quot;set here&quot;;\r\n}\r\n\r\n</pre></div>"
  },
  "url" : "http://smart.who.int/ddcc/StructureMap/ResourcesToCoreDataSet",
  "version" : "1.0.0",
  "name" : "ResourcesToCoreDataSet",
  "status" : "draft",
  "date" : "2024-04-24T00:11:34+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/Bundle",
      "mode" : "source",
      "alias" : "Bundle"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/HumanName",
      "mode" : "produced",
      "alias" : "HumanName"
    },
    {
      "url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCPatient",
      "mode" : "source",
      "alias" : "DDCCPatient"
    },
    {
      "url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCImmunization",
      "mode" : "source",
      "alias" : "DDCCImmunization"
    },
    {
      "url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCImmunizationRecommendation",
      "mode" : "source",
      "alias" : "DDCCImmunizationRecommendation"
    },
    {
      "url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetPoV",
      "mode" : "target",
      "alias" : "DDCCPoV"
    }
  ],
  "group" : [
    {
      "name" : "ResourcesToCoreDataSet",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "bundle",
          "type" : "Bundle",
          "mode" : "source"
        },
        {
          "name" : "ddcc",
          "type" : "DDCCPoV",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "set header from patient",
          "source" : [
            {
              "context" : "bundle",
              "element" : "entry",
              "variable" : "entry"
            }
          ],
          "rule" : [
            {
              "name" : "set header",
              "source" : [
                {
                  "context" : "entry",
                  "type" : "Patient",
                  "element" : "resource",
                  "variable" : "patient"
                }
              ],
              "dependent" : [
                {
                  "name" : "PatientToHeader",
                  "variable" : [
                    "patient",
                    "ddcc"
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "PatientToHeader",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "patient",
          "type" : "DDCCPatient",
          "mode" : "source"
        },
        {
          "name" : "ddcc",
          "type" : "DDCCPoV",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "set name",
          "source" : [
            {
              "context" : "patient",
              "element" : "name",
              "variable" : "name"
            }
          ],
          "rule" : [
            {
              "name" : "setting name",
              "source" : [
                {
                  "context" : "name",
                  "variable" : "src"
                }
              ],
              "target" : [
                {
                  "contextType" : "variable",
                  "variable" : "tgt",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "ddcc"
                    }
                  ]
                }
              ],
              "dependent" : [
                {
                  "name" : "NameToText",
                  "variable" : [
                    "src",
                    "tgt"
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "NameToText",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "HumanName",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "set here",
          "source" : [
            {
              "context" : "src",
              "element" : "given",
              "variable" : "given"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "name",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "given"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}