PackagesCanonicalsLogsProblems
    Packages
    uk.nhsengland.genomics.r4@0.6.0-pre-release
    https://fhir.nhs.uk/StructureMap/StructureMap-PharmacogeneticTestResult-Genomics
{
  "description": "StructureMap to transform from the OpenEHR Pharmacogenetic Test Result archetype to a set of FHIR Observations, most likely attached as results to a structured DiagnosticReport. Only 1 level of references from the root PGx result archetype are explored for conciseness/readability",
  "_filename": "examples/StructureMap-PharmacogeneticTestResult-Genomics.json",
  "package_name": "uk.nhsengland.genomics.r4",
  "date": "2025-02-14T00:00:00.000Z",
  "group": [ {
    "name": "VariantInformation",
    "rule": [ {
      "name": "Genesymbol",
      "source": [ {
        "max": "1",
        "min": 1,
        "context": "source",
        "element": "Gene symbol",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "48018-6"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueString": "http://www.genenames.org"
        }, {
          "valueId": "a"
        } ],
        "transform": "cc",
        "contextType": "variable"
      } ]
    }, {
      "name": "Bioinformaticanalysisworkflow",
      "source": [ {
        "max": "1",
        "context": "queried",
        "element": "Bioinformatic analysis workflow",
        "variable": "a"
      } ],
      "target": [ {
        "context": "produced",
        "element": "extension",
        "variable": "extension",
        "parameter": [ {
          "valueString": "Extension"
        } ],
        "transform": "create",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "url",
        "parameter": [ {
          "valueString": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/genomic-study-analysis-protocol-performed"
        } ],
        "transform": "copy",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Referencegenome",
      "source": [ {
        "max": "1",
        "min": 1,
        "context": "queried",
        "element": "Reference genome",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "48013-7"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Variantidentification",
      "source": [ {
        "context": "queried",
        "element": "Variant identification",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "81252-9"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Variant",
      "source": [ {
        "max": "1",
        "context": "queried",
        "element": "Variant",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "81290-9"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueString": "http://www.genenames.org"
        }, {
          "valueId": "a"
        } ],
        "transform": "cc",
        "contextType": "variable"
      } ]
    }, {
      "name": "Structuredvariant",
      "source": [ {
        "max": "1",
        "context": "queried",
        "element": "Structured variant",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "48019-4"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueString": "http://www.sequenceontology.org"
        }, {
          "valueId": "a"
        } ],
        "transform": "cc",
        "contextType": "variable"
      } ]
    }, {
      "name": "Transcriptreferencesequence",
      "source": [ {
        "context": "queried",
        "element": "Transcript reference sequence",
        "variable": "a"
      }, {
        "context": "queried",
        "element": "Best transcript candidate",
        "variable": "b"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "51958-7"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueId": "a"
        } ],
        "transform": "copy",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "extension",
        "variable": "extension",
        "parameter": [ {
          "valueString": "Extension"
        } ],
        "transform": "create",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "url",
        "parameter": [ {
          "valueString": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/workflow-relatedArtifactComponent"
        } ],
        "transform": "copy",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "value",
        "parameter": [ {
          "valueId": "b"
        } ],
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "DNAregionname",
      "source": [ {
        "context": "queried",
        "element": "DNA region name",
        "variable": "a"
      }, {
        "context": "queried",
        "element": "Distance from splicing site",
        "variable": "b"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "81254-5"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "variable": "range",
        "parameter": [ {
          "valueString": "Range"
        } ],
        "transform": "create",
        "contextType": "variable"
      }, {
        "context": "range",
        "element": "low",
        "parameter": [ {
          "valueId": "a"
        } ],
        "transform": "copy",
        "contextType": "variable"
      }, {
        "context": "range",
        "element": "high",
        "parameter": [ {
          "valueId": "b"
        } ],
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "DNAchange",
      "source": [ {
        "context": "queried",
        "element": "DNA change",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "48004-6"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueString": "http://www.genenames.org"
        }, {
          "valueId": "a"
        } ],
        "transform": "cc",
        "contextType": "variable"
      } ]
    }, {
      "name": "Aminoacidchange",
      "source": [ {
        "context": "queried",
        "element": "Amino acid change",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "48005-3"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueString": "http://www.genenames.org"
        }, {
          "valueId": "a"
        } ],
        "transform": "cc",
        "contextType": "variable"
      } ]
    }, {
      "name": "Aminoacidchangetype",
      "source": [ {
        "context": "queried",
        "element": "Amino acid change type",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "48006-1"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueId": "a"
        } ],
        "transform": "cc",
        "contextType": "variable"
      } ]
    }, {
      "name": "RNAchange",
      "source": [ {
        "context": "queried",
        "element": "RNA change",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "''"
        }, {
          "valueString": "''"
        }, {
          "valueString": "RNA change"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueString": "http://www.genenames.org"
        }, {
          "valueId": "a"
        } ],
        "transform": "cc",
        "contextType": "variable"
      } ]
    }, {
      "name": "Genename",
      "source": [ {
        "context": "queried",
        "element": "Gene name",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "48018-6"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Copynumberoverlap",
      "source": [ {
        "context": "queried",
        "element": "Copy number overlap",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "82155-3"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueId": "a"
        }, {
          "valueString": "{ratio}"
        }, {
          "valueString": "http://unitsofmeasure.org"
        } ],
        "transform": "qty",
        "contextType": "variable"
      } ]
    }, {
      "name": "Partoffusion",
      "source": [ {
        "context": "queried",
        "element": "Part of fusion",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "''"
        }, {
          "valueString": "''"
        }, {
          "valueString": "Part of fusion"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Fusionexon",
      "source": [ {
        "context": "queried",
        "element": "Fusion exon",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "''"
        }, {
          "valueString": "''"
        }, {
          "valueString": "Fusion exon"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "ConservationScore",
      "source": [ {
        "context": "queried",
        "element": "Score",
        "variable": "a"
      }, {
        "context": "queried",
        "element": "Conservation score knowledge base",
        "variable": "b"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "''"
        }, {
          "valueString": "''"
        }, {
          "valueString": "Conservation Score"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueId": "a"
        } ],
        "transform": "copy",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "extension",
        "variable": "extension",
        "parameter": [ {
          "valueString": "Extension"
        } ],
        "transform": "create",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "url",
        "parameter": [ {
          "valueString": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/workflow-relatedArtifactComponent"
        } ],
        "transform": "copy",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "value",
        "parameter": [ {
          "valueId": "b"
        } ],
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Readdepth",
      "source": [ {
        "max": "1",
        "context": "queried",
        "element": "Read depth",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "''"
        }, {
          "valueString": "''"
        }, {
          "valueString": "Read depth"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Alleledepth",
      "source": [ {
        "max": "1",
        "context": "queried",
        "element": "Allele depth",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "82121-5"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Allelefrequency",
      "source": [ {
        "max": "1",
        "context": "queried",
        "element": "Allele frequency",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "81258-6"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Populationallelefrequencydetails",
      "source": [ {
        "context": "queried",
        "element": "Population allele frequency knowledge base",
        "variable": "a"
      }, {
        "context": "queried",
        "element": "Population allele frequency",
        "variable": "b"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "92821-8"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueId": "b"
        } ],
        "transform": "copy",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "extension",
        "variable": "extension",
        "parameter": [ {
          "valueString": "Extension"
        } ],
        "transform": "create",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "url",
        "parameter": [ {
          "valueString": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/workflow-relatedArtifactComponent"
        } ],
        "transform": "copy",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "value",
        "parameter": [ {
          "valueId": "a"
        } ],
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "VCFqualityfilter",
      "source": [ {
        "context": "queried",
        "element": "Filter name",
        "variable": "a"
      }, {
        "context": "queried",
        "element": "Description",
        "variable": "b"
      }, {
        "context": "queried",
        "element": "Filter passed",
        "variable": "c"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "''"
        }, {
          "valueString": "''"
        }, {
          "valueId": "a"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "code",
        "element": "coding",
        "variable": "coding",
        "contextType": "variable"
      }, {
        "context": "coding",
        "element": "display",
        "parameter": [ {
          "valueId": "b"
        } ],
        "transform": "append",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueId": "c"
        } ],
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Strandbiasratio",
      "source": [ {
        "max": "1",
        "context": "queried",
        "element": "Strand bias ratio",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "''"
        }, {
          "valueString": "''"
        }, {
          "valueString": "Strand bias ratio"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Strandbiaspvalue",
      "source": [ {
        "max": "1",
        "context": "queried",
        "element": "Strand bias p-value",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "''"
        }, {
          "valueString": "''"
        }, {
          "valueString": "Strand bias p-value"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Allelicstate",
      "source": [ {
        "max": "1",
        "context": "queried",
        "element": "Allelic state",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "53034-5"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueId": "a"
        } ],
        "transform": "cc",
        "contextType": "variable"
      } ]
    }, {
      "name": "Additionaldetails",
      "source": [ {
        "context": "queried",
        "element": "Additional details",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "note",
        "transform": "copy",
        "contextType": "variable"
      } ]
    } ],
    "input": [ {
      "mode": "source",
      "name": "source",
      "type": "PharmacogeneticTestResult"
    }, {
      "mode": "source",
      "name": "queried",
      "type": "GenomicVariantResult"
    }, {
      "mode": "target",
      "name": "target",
      "type": "Variant"
    }, {
      "mode": "target",
      "name": "produced",
      "type": "GenomicStudyAnalysis"
    } ],
    "typeMode": "types"
  }, {
    "name": "GenotypeInformation",
    "rule": [ {
      "name": "Diplotype",
      "source": [ {
        "max": "1",
        "context": "source",
        "element": "Diplotype",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Overallactivityscore",
      "source": [ {
        "max": "1",
        "context": "source",
        "element": "Overall activity score",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "''"
        }, {
          "valueString": "''"
        }, {
          "valueString": "Overall activity score"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Genomicregion",
      "source": [ {
        "context": "source",
        "element": "Genomic region",
        "variable": "a"
      }, {
        "context": "source",
        "element": "Allele covered",
        "variable": "b"
      }, {
        "context": "queried",
        "element": "Knowledge base URI",
        "variable": "c"
      }, {
        "context": "queried",
        "element": "Item name",
        "variable": "d"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "48018-6"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueId": "a"
        } ],
        "transform": "copy",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueId": "b"
        } ],
        "transform": "append",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "extension",
        "variable": "extension",
        "parameter": [ {
          "valueString": "Extension"
        } ],
        "transform": "create",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "url",
        "parameter": [ {
          "valueString": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/workflow-relatedArtifactComponent"
        } ],
        "transform": "copy",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "value",
        "parameter": [ {
          "valueId": "c"
        } ],
        "transform": "copy",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "value",
        "parameter": [ {
          "valueId": "d"
        } ],
        "transform": "append",
        "contextType": "variable"
      } ]
    }, {
      "name": "Genotype",
      "source": [ {
        "max": "1",
        "context": "queried",
        "element": "Genotype",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "value",
        "parameter": [ {
          "valueId": "a"
        } ],
        "transform": "append",
        "contextType": "variable"
      } ]
    }, {
      "name": "Genotypequality",
      "source": [ {
        "max": "1",
        "context": "queried",
        "element": "Genotype quality",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "''"
        }, {
          "valueString": "''"
        }, {
          "valueString": "Genotype quality"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Genotypeprobability",
      "source": [ {
        "max": "1",
        "context": "queried",
        "element": "Genotype probability",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "''"
        }, {
          "valueString": "''"
        }, {
          "valueString": "Genotype probability"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Specimenidentifier",
      "source": [ {
        "max": "1",
        "context": "queried",
        "element": "Specimen identifier",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "specimen",
        "parameter": [ {
          "valueId": "a"
        } ],
        "transform": "pointer",
        "contextType": "variable"
      } ]
    } ],
    "input": [ {
      "mode": "source",
      "name": "source",
      "type": "PharmacogeneticTestResult"
    }, {
      "mode": "source",
      "name": "queried",
      "type": "KnowledgeBaseReference"
    }, {
      "mode": "target",
      "name": "target",
      "type": "Genotype"
    } ],
    "typeMode": "types"
  }, {
    "name": "DiagnosticImplicationInformation",
    "rule": [ {
      "name": "Phenotype",
      "source": [ {
        "context": "source",
        "element": "Phenotype",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "81259-4"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "ACMGclassification",
      "source": [ {
        "context": "source",
        "element": "ACMG classification",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueString": "53037-8"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueString": "http://loinc.org"
        }, {
          "valueId": "a"
        } ],
        "transform": "cc",
        "contextType": "variable"
      } ]
    } ],
    "input": [ {
      "mode": "source",
      "name": "source",
      "type": "PharmacogeneticTestResult"
    }, {
      "mode": "source",
      "name": "queried",
      "type": "GenomicVariantResult"
    }, {
      "mode": "target",
      "name": "target",
      "type": "DiagnosticImplication"
    } ],
    "typeMode": "types"
  }, {
    "name": "HaplotypeInformation",
    "rule": [ {
      "name": "Allelehaplotype",
      "source": [ {
        "context": "source",
        "element": "Allele haplotype",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Activityvalue",
      "source": [ {
        "context": "source",
        "element": "Activity value",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "''"
        }, {
          "valueString": "''"
        }, {
          "valueString": "Activity value"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    } ],
    "input": [ {
      "mode": "source",
      "name": "source",
      "type": "PharmacogeneticTestResult"
    }, {
      "mode": "target",
      "name": "target",
      "type": "Haplotype"
    } ],
    "typeMode": "types"
  }, {
    "name": "MolecularConsequenceInformation",
    "rule": [ {
      "name": "Predictedimpactknowledgebase",
      "source": [ {
        "context": "queried",
        "element": "Predicted impact knowledge base",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://hl7.org/fhir/uv/genomics-reporting/CodeSystem/tbd-codes-cs"
        }, {
          "valueString": "feature-consequence"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "extension",
        "variable": "extension",
        "parameter": [ {
          "valueString": "Extension"
        } ],
        "transform": "create",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "url",
        "parameter": [ {
          "valueString": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/workflow-relatedArtifactComponent"
        } ],
        "transform": "copy",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "score",
      "source": [ {
        "context": "queried",
        "element": "score",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "value",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Qualitativeprediction",
      "source": [ {
        "context": "queried",
        "element": "Qualitative prediction",
        "variable": "a"
      } ],
      "target": [ {
        "context": "target",
        "element": "interpretation",
        "transform": "copy",
        "contextType": "variable"
      } ]
    }, {
      "name": "Impact",
      "source": [ {
        "context": "queried",
        "element": "Impact",
        "variable": "a"
      }, {
        "context": "queried",
        "element": "Source",
        "variable": "b"
      } ],
      "target": [ {
        "context": "target",
        "element": "component",
        "variable": "component",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "code",
        "variable": "code",
        "parameter": [ {
          "valueString": "http://hl7.org/fhir/uv/genomics-reporting/CodeSystem/tbd-codes-cs"
        }, {
          "valueString": "functional-effect"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "value",
        "parameter": [ {
          "valueString": "http://www.sequenceontology.org"
        }, {
          "valueId": "a"
        } ],
        "transform": "cc",
        "contextType": "variable"
      }, {
        "context": "component",
        "element": "extension",
        "variable": "extension",
        "parameter": [ {
          "valueString": "Extension"
        } ],
        "transform": "create",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "url",
        "parameter": [ {
          "valueString": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/workflow-relatedArtifactComponent"
        } ],
        "transform": "copy",
        "contextType": "variable"
      }, {
        "context": "extension",
        "element": "value",
        "parameter": [ {
          "valueId": "b"
        } ],
        "transform": "copy",
        "contextType": "variable"
      } ]
    } ],
    "input": [ {
      "mode": "source",
      "name": "queried",
      "type": "GenomicVariantResult"
    }, {
      "mode": "target",
      "name": "target",
      "type": "MolecularConsequence"
    } ],
    "typeMode": "types"
  } ],
  "publisher": "NHS England",
  "name": "StructureMapPharmacogeneticTestResultGenomics",
  "copyright": "Copyright © 2023+ NHS England Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at  https://www.hl7.org/fhir/license.html.",
  "type": null,
  "experimental": null,
  "resourceType": "StructureMap",
  "title": "StructureMap PharmacogeneticTestResult Genomics",
  "package_version": "0.6.0-pre-release",
  "structure": [ {
    "url": "https://ckm.openehr.org/ckm/archetypes/1013.1.7066",
    "mode": "source",
    "alias": "PharmacogeneticTestResult",
    "documentation": "The OpenEHR PGx logical model"
  }, {
    "url": "https://ckm.openehr.org/ckm/archetypes/1013.1.3748",
    "mode": "source",
    "alias": "KnowledgeBaseReference",
    "documentation": "The OpenEHR model for citation of a digital resource"
  }, {
    "url": "https://ckm.openehr.org/ckm/archetypes/1013.1.3759",
    "mode": "source",
    "alias": "GenomicVariantResult",
    "documentation": "The OpenEHR model for a variant"
  }, {
    "url": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/genotype",
    "mode": "target",
    "alias": "Genotype",
    "documentation": "The Genotype information as a FHIR Observation"
  }, {
    "url": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/haplotype",
    "mode": "target",
    "alias": "Haplotype",
    "documentation": "The Haplotype information as a FHIR Observation"
  }, {
    "url": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/variant",
    "mode": "target",
    "alias": "Variant",
    "documentation": "The Variant information as a FHIR Observation"
  }, {
    "url": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/diagnostic-implication",
    "mode": "target",
    "alias": "DiagnosticImplication",
    "documentation": "The phenotypic/implication information as a FHIR Observation"
  }, {
    "url": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/molecular-consequence",
    "mode": "target",
    "alias": "MolecularConsequence",
    "documentation": "The observed effect of variants as a FHIR Observation"
  }, {
    "url": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/genomic-study-analysis",
    "mode": "target",
    "alias": "GenomicStudyAnalysis",
    "documentation": "Analysis metadata recorded through a profile on Procedure"
  } ],
  "status": "draft",
  "id": "5fd54a97-6bd5-4533-ac08-fd07ee5c4b92",
  "kind": null,
  "url": "https://fhir.nhs.uk/StructureMap/StructureMap-PharmacogeneticTestResult-Genomics",
  "version": "0.1.0",
  "contact": [ {
    "name": "NHS England",
    "telecom": [ {
      "value": "interoperabilityteam@nhs.net",
      "system": "email"
    } ]
  } ]
}