CDA-FHIR-Maps (R4)
0.3.0 - DSTU 1

This page is part of the CDA-FHIR-Maps (R4) (v0.3.0: DSTU 1) based on FHIR R4. . For a full list of available versions, see the Directory of published versions

: CDA to FHIR types - JSON Representation

Raw json | Download


{
  "resourceType" : "StructureMap",
  "id" : "CdaToFhirTypes",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n         <pre>map &quot;http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaToFhirTypes&quot; = &quot;CdaToFhirTypes&quot;\n\n// Adapted from https://github.com/HL7/ccda-to-fhir/tree/master/mappings\n// CDA:  http://build.fhir.org/ig/ahdis/cda-core-2.0/branches/master/index.html\n// FHIR: http://hl7.org/fhir/r4/\n\nconceptmap &quot;addressUse&quot; {\n  prefix s = &quot;http://terminology.hl7.org/ValueSet/v3-AddressUse&quot;\n  prefix t = &quot;http://hl7.org/fhir/valueset-address-use.html&quot;\n\n  s:H == t:home\n  s:HP == t:home\n  s:HV == t:home\n  s:WP == t:work\n  s:DIR == t:work\n  s:PUB == t:work\n  s:TMP == t:temp\n  s:OLD == t:old\n  s:BAD == t:old\n}\n\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/ED&quot; alias ED as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/II&quot; as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/Identifier&quot; as target\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/TS&quot; as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/instant&quot; as target\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/CS&quot; as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/code&quot; as target\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/CE&quot; as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/CodeableConcept&quot; as target\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/ST&quot; as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/string&quot; as target\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/EN&quot; as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/HumanName&quot; as target\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AD&quot; as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/Address&quot; as target\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/TEL&quot; as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/ContactPoint&quot; as target\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/BL&quot; as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/boolean&quot; as target\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/IVL_TS&quot; as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/Period&quot; as target\n\ngroup Any(source src, target tgt) {\n}\n\ngroup II(source src : II, target tgt : Identifier) extends Any &lt;&lt;types&gt;&gt; {\n  src.root as r where src.extension.exists() -&gt; tgt.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n  src.root as r where src.extension.empty() and src.root.matches('[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}') -&gt;  tgt.system = 'urn:ietf:rfc:3986',  tgt.value = ('urn:uuid:' + r.lower()) &quot;rootuuid&quot;;\n  src.root as r where src.extension.empty() and src.root.contains('.') -&gt;  tgt.system = 'urn:ietf:rfc:3986',  tgt.value = append('urn:oid:', r) &quot;rootoid&quot;;\n  src.extension as e -&gt; tgt.value = e;\n  src.assigningAuthorityName as s -&gt;  tgt.assigner as a,  a.display = s;\n  // there's no equivalent for displayable in FHIR - and it probably will never matter, but if it does, it might map to Identifier.use.\n  src.displayable as displayable -&gt; tgt.extension as ext then {\n    displayable -&gt; ext.url = 'http://hl7.org/fhir/cdaStructureDefinition/extension-displayable' &quot;url&quot;;\n    displayable.value as v -&gt; ext.value = cast(v, 'string');\n  } &quot;extension&quot;;\n}\n\ngroup INT(source src : INT, target tgt : integer) extends Any &lt;&lt;types&gt;&gt; {\n  src.value as v -&gt; tgt.value = v &quot;integer&quot;;\n}\n\ngroup TemplateID(source template : II, target tgt) {\n  template -&gt; tgt.extension as ext then {\n    template -&gt; ext.url = 'http://hl7.org/fhir/cda/StructureDefinition/templateID' &quot;url&quot;;\n    template -&gt; ext.value = create('Identifier') as value then II(template, value) &quot;value&quot;;\n  } &quot;templateId&quot;;\n}\n\ngroup Negation(source negation : BL, target tgt) {\n  negation -&gt; tgt.modifierExtension as ext then {\n    negation -&gt; ext.url = 'http://hl7.org/fhir/cda/StructureDefinition/negationIndicator' &quot;url&quot;;\n    negation as neg -&gt;  ext.value = create('boolean'),  ext.value = neg &quot;value&quot;;\n  } &quot;negation&quot;;\n}\n\ngroup TSInstant(source src : TS, target tgt : instant) extends Any &lt;&lt;types&gt;&gt; {\n  src.value as v -&gt; tgt.value = cast(v, 'string');\n}\n\ngroup TSDateTime(source src : TS, target tgt : dateTime) extends TSInstant &lt;&lt;types&gt;&gt; {\n}\n\ngroup TSDate(source src : TS, target tgt : date) extends TSInstant &lt;&lt;types&gt;&gt; {\n}\n\ngroup IVLTSPeriod(source src : IVL_TS, target tgt : Period) extends Any &lt;&lt;types&gt;&gt; {\n  src.low -&gt; tgt.start;\n  src.high -&gt; tgt.end;\n}\n\ngroup IVLTSDateTime(source src : IVL_TS, target tgt : dateTime) extends Any &lt;&lt;types&gt;&gt; {\n  src.low as s then TSDateTime(s, tgt);\n}\n\ngroup STstring(source src : ST, target tgt : string) extends Any &lt;&lt;types&gt;&gt; {\n  src as v -&gt; tgt.value = cast(v, 'string') &quot;value&quot;;\n}\n\ngroup EDstring(source src : ED, target tgt : string) extends STstring &lt;&lt;types&gt;&gt; {\n}\n\ngroup ONstring(source src : ON, target tgt : string) extends STstring &lt;&lt;types&gt;&gt; {\n}\n\ngroup CSCode(source src : CS, target tgt : code) extends Any &lt;&lt;types&gt;&gt; {\n  src.code as c -&gt; tgt.value = cast(c, 'string');\n}\n\ngroup CECode(source src : CE, target tgt : code) extends CSCode &lt;&lt;types&gt;&gt; {\n}\n\ngroup CDCode(source src : CD, target tgt : code) extends CSCode &lt;&lt;types&gt;&gt; {\n}\n\ngroup CECodeableConcept(source src : CE, target tgt : CodeableConcept) extends Any &lt;&lt;types&gt;&gt; {\n  src.originalText -&gt; tgt.text;\n  src -&gt; tgt.coding as coding then {\n    src.code as code -&gt; coding.code = cast(code, 'string');\n    src.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n    src.displayName as display -&gt; coding.display = cast(display, 'string');\n  } &quot;code&quot;;\n  src.translation as translation -&gt; tgt.coding as coding then {\n    translation.code as code -&gt; coding.code = cast(code, 'string');\n    translation.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n    translation.displayName as display -&gt; coding.display = cast(display, 'string');\n  };\n}\n\ngroup CSCodeableConcept(source src : CS, target tgt : CodeableConcept) extends CECodeableConcept &lt;&lt;types&gt;&gt; {\n}\n\ngroup CDCodeableConcept(source src : CD, target tgt : CodeableConcept) extends CECodeableConcept &lt;&lt;types&gt;&gt; {\n}\n\ngroup ENHumanName(source src : EN, target tgt : HumanName) extends Any &lt;&lt;types&gt;&gt; {\n  src.family as v -&gt; tgt.family = (v.dataString);\n  src.given as v -&gt; tgt.given = (v.dataString);\n  src.prefix as v -&gt; tgt.prefix = (v.dataString);\n  src.suffix as v -&gt; tgt.suffix = (v.dataString);\n  // src.use as c -&gt; tgt.use = translate(c, 'http://hl7.org/fhir/ConceptMap/cm-name-use-v3', 'code');\n  src.validTime -&gt; tgt.period;\n}\n\ngroup ADAddress(source src : AD, target tgt : Address) extends Any &lt;&lt;types&gt;&gt; {\n  src.country as v -&gt; tgt.country = (v.dataString);\n  src.state as v -&gt; tgt.state = (v.dataString);\n  src.county as v -&gt; tgt.district = (v.dataString);\n  src.city as v -&gt; tgt.city = (v.dataString);\n  src.postalCode as v -&gt; tgt.postalCode = (v.dataString);\n  src.streetAddressLine as v -&gt; tgt.line = (v.dataString) &quot;streetAddress&quot;;\n  src.streetName as v -&gt; tgt.line = (v.dataString);\n  src.houseNumber as v -&gt; tgt.line = (v.dataString);\n  src.use as c -&gt; tgt.use = translate(c, '#addressUse', 'code') &quot;addressUse&quot;;\n  src.useablePeriod -&gt; tgt.period;\n}\n\ngroup TELContactPoint(source src : TEL, target tgt : ContactPoint) extends Any &lt;&lt;types&gt;&gt; {\n  src.value as v where (src.value.startsWith('tel:')) -&gt;  tgt.value = (v.substring(4)),  tgt.system = 'phone' &quot;valuetel&quot;;\n  src.value as v where (src.value.startsWith('fax:')) -&gt;  tgt.value = (v.substring(4)),  tgt.system = 'fax' &quot;valuefax&quot;;\n  src.value as v where (src.value.startsWith('mailto:')) -&gt;  tgt.value = (v.substring(7)),  tgt.system = 'email' &quot;valuemail&quot;;\n  src.value as v where (src.value.startsWith('http:')) -&gt;  tgt.value = (v.substring(5)),  tgt.system = 'url' &quot;valuehttp&quot;;\n  src.use where (src.use.startsWith('H')) -&gt; tgt.use = 'home' &quot;usehome&quot;;\n  src.use where ((src.use = 'WP') or (src.use = 'DIR') or (src.use = 'PUB')) -&gt; tgt.use = 'work' &quot;usework&quot;;\n  src.use where (src.use = 'BAD') -&gt; tgt.use = 'old' &quot;usebad&quot;;\n  src.use where (src.use = 'TMP') -&gt; tgt.use = 'temp' &quot;usetmp&quot;;\n  src.use where (src.use = 'MC') -&gt; tgt.use = 'mobile' &quot;usemobile&quot;;\n  src.useablePeriod -&gt; tgt.period;\n}\n\ngroup PQQuantity(source src : PQ, target tgt : Quantity) extends Any &lt;&lt;types&gt;&gt; {\n  // src.unit as unit -&gt; tgt.code = unit;\n  src.unit as unit -&gt; tgt.unit = unit;\n  src.value as value -&gt; tgt.value = value;\n}\n\ngroup RTOPQPQRatio(source src : RTO_PQ_PQ, target tgt : Ratio) extends Any &lt;&lt;types&gt;&gt; {\n  src.numerator as numerator -&gt; tgt.numerator as targetNumerator then PQQuantity(numerator, targetNumerator);\n  src.denominator as denominator -&gt; tgt.denominator as targetDenominator then PQQuantity(denominator, targetDenominator);\n}\n\n</pre>\n      </div>"
  },
  "contained" : [
    {
      "resourceType" : "ConceptMap",
      "id" : "addressUse",
      "status" : "draft",
      "group" : [
        {
          "source" : "http://terminology.hl7.org/ValueSet/v3-AddressUse",
          "target" : "http://hl7.org/fhir/valueset-address-use.html",
          "element" : [
            {
              "code" : "H",
              "target" : [
                {
                  "code" : "home",
                  "equivalence" : "equivalent",
                  "comment" : "home address -> home"
                }
              ]
            },
            {
              "code" : "HP",
              "target" : [
                {
                  "code" : "home",
                  "equivalence" : "equivalent",
                  "comment" : "primary home -> home, http://hl7.org/fhir/v3/AddressUse/cs.html"
                }
              ]
            },
            {
              "code" : "HV",
              "target" : [
                {
                  "code" : "home",
                  "equivalence" : "equivalent",
                  "comment" : "vacation home  -> home, http://hl7.org/fhir/v3/AddressUse/cs.html"
                }
              ]
            },
            {
              "code" : "WP",
              "target" : [
                {
                  "code" : "work",
                  "equivalence" : "equivalent",
                  "comment" : "work place -> work"
                }
              ]
            },
            {
              "code" : "DIR",
              "target" : [
                {
                  "code" : "work",
                  "equivalence" : "equivalent",
                  "comment" : "direct -> work, http://hl7.org/fhir/v3/AddressUse/cs.html"
                }
              ]
            },
            {
              "code" : "PUB",
              "target" : [
                {
                  "code" : "work",
                  "equivalence" : "equivalent",
                  "comment" : "public -> work, http://hl7.org/fhir/v3/AddressUse/cs.html"
                }
              ]
            },
            {
              "code" : "TMP",
              "target" : [
                {
                  "code" : "temp",
                  "equivalence" : "equivalent",
                  "comment" : "temporary address -> Temporary"
                }
              ]
            },
            {
              "code" : "OLD",
              "target" : [
                {
                  "code" : "old",
                  "equivalence" : "equivalent",
                  "comment" : "no longer in use -> Old / Incorrect"
                }
              ]
            },
            {
              "code" : "BAD",
              "target" : [
                {
                  "code" : "old",
                  "equivalence" : "equivalent",
                  "comment" : "bad address -> Old / Incorrect"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "extension" : [
    {
      "url" : "http://fhir.ch/reference",
      "valueReference" : {
        "reference" : "#addressUse"
      }
    }
  ],
  "url" : "http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaToFhirTypes",
  "version" : "0.3.0",
  "name" : "CdaToFhirTypes",
  "status" : "draft",
  "date" : "2022-02-11T11:14:39+01:00",
  "publisher" : "ahdis",
  "contact" : [
    {
      "name" : "ahdis",
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://www.ahdis.ch/"
        }
      ]
    }
  ],
  "description" : "Adapted from https://github.com/HL7/ccda-to-fhir/tree/master/mappings CDA:  http://build.fhir.org/ig/ahdis/cda-core-2.0/branches/master/index.html FHIR: http://hl7.org/fhir/r4/",
  "copyright" : "CC-BY-SA-4.0",
  "structure" : [
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/ED",
      "mode" : "source",
      "alias" : "ED"
    },
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/II",
      "mode" : "source"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/Identifier",
      "mode" : "target"
    },
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/TS",
      "mode" : "source"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/instant",
      "mode" : "target"
    },
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/CS",
      "mode" : "source"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/code",
      "mode" : "target"
    },
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/CE",
      "mode" : "source"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/CodeableConcept",
      "mode" : "target"
    },
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/ST",
      "mode" : "source"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/string",
      "mode" : "target"
    },
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/EN",
      "mode" : "source"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/HumanName",
      "mode" : "target"
    },
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/AD",
      "mode" : "source"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/Address",
      "mode" : "target"
    },
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/TEL",
      "mode" : "source"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/ContactPoint",
      "mode" : "target"
    },
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/BL",
      "mode" : "source"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/boolean",
      "mode" : "target"
    },
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/IVL_TS",
      "mode" : "source"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/Period",
      "mode" : "target"
    }
  ],
  "group" : [
    {
      "name" : "Any",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "mode" : "target"
        }
      ]
    },
    {
      "name" : "II",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "II",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "Identifier",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "root1",
          "source" : [
            {
              "context" : "src",
              "element" : "root",
              "variable" : "r",
              "condition" : "src.extension.exists()"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "translate",
              "parameter" : [
                {
                  "valueId" : "r"
                },
                {
                  "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                },
                {
                  "valueString" : "uri"
                }
              ]
            }
          ]
        },
        {
          "name" : "rootuuid",
          "source" : [
            {
              "context" : "src",
              "element" : "root",
              "variable" : "r",
              "condition" : "src.extension.empty() and src.root.matches('[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}')"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "urn:ietf:rfc:3986"
                }
              ]
            },
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "'urn:uuid:' + r.lower()"
                }
              ]
            }
          ]
        },
        {
          "name" : "rootoid",
          "source" : [
            {
              "context" : "src",
              "element" : "root",
              "variable" : "r",
              "condition" : "src.extension.empty() and src.root.contains('.')"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "urn:ietf:rfc:3986"
                }
              ]
            },
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "append",
              "parameter" : [
                {
                  "valueString" : "urn:oid:"
                },
                {
                  "valueId" : "r"
                }
              ]
            }
          ]
        },
        {
          "name" : "extension",
          "source" : [
            {
              "context" : "src",
              "element" : "extension",
              "variable" : "e"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "e"
                }
              ]
            }
          ]
        },
        {
          "name" : "assigningAuthorityName",
          "source" : [
            {
              "context" : "src",
              "element" : "assigningAuthorityName",
              "variable" : "s"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "assigner",
              "variable" : "a"
            },
            {
              "context" : "a",
              "contextType" : "variable",
              "element" : "display",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "s"
                }
              ]
            }
          ]
        },
        {
          "name" : "extension",
          "source" : [
            {
              "context" : "src",
              "element" : "displayable",
              "variable" : "displayable"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "extension",
              "variable" : "ext"
            }
          ],
          "rule" : [
            {
              "name" : "url",
              "source" : [
                {
                  "context" : "displayable"
                }
              ],
              "target" : [
                {
                  "context" : "ext",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "http://hl7.org/fhir/cdaStructureDefinition/extension-displayable"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "value",
              "source" : [
                {
                  "context" : "displayable",
                  "element" : "value",
                  "variable" : "v"
                }
              ],
              "target" : [
                {
                  "context" : "ext",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "cast",
                  "parameter" : [
                    {
                      "valueId" : "v"
                    },
                    {
                      "valueString" : "string"
                    }
                  ]
                }
              ]
            }
          ],
          "documentation" : "there's no equivalent for displayable in FHIR - and it probably will never matter, but if it does, it might map to Identifier.use."
        }
      ]
    },
    {
      "name" : "INT",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "INT",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "integer",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "integer",
          "source" : [
            {
              "context" : "src",
              "element" : "value",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "v"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "TemplateID",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "template",
          "type" : "II",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "templateId",
          "source" : [
            {
              "context" : "template"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "extension",
              "variable" : "ext"
            }
          ],
          "rule" : [
            {
              "name" : "url",
              "source" : [
                {
                  "context" : "template"
                }
              ],
              "target" : [
                {
                  "context" : "ext",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "http://hl7.org/fhir/cda/StructureDefinition/templateID"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "value",
              "source" : [
                {
                  "context" : "template"
                }
              ],
              "target" : [
                {
                  "context" : "ext",
                  "contextType" : "variable",
                  "element" : "value",
                  "variable" : "value",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Identifier"
                    }
                  ]
                }
              ],
              "dependent" : [
                {
                  "name" : "II",
                  "variable" : [
                    "template",
                    "value"
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "Negation",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "negation",
          "type" : "BL",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "negation",
          "source" : [
            {
              "context" : "negation"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "modifierExtension",
              "variable" : "ext"
            }
          ],
          "rule" : [
            {
              "name" : "url",
              "source" : [
                {
                  "context" : "negation"
                }
              ],
              "target" : [
                {
                  "context" : "ext",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "http://hl7.org/fhir/cda/StructureDefinition/negationIndicator"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "value",
              "source" : [
                {
                  "context" : "negation",
                  "variable" : "neg"
                }
              ],
              "target" : [
                {
                  "context" : "ext",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "boolean"
                    }
                  ]
                },
                {
                  "context" : "ext",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "neg"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "TSInstant",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "TS",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "instant",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "value",
          "source" : [
            {
              "context" : "src",
              "element" : "value",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "cast",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "string"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "TSDateTime",
      "extends" : "TSInstant",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "TS",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "dateTime",
          "mode" : "target"
        }
      ]
    },
    {
      "name" : "TSDate",
      "extends" : "TSInstant",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "TS",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "date",
          "mode" : "target"
        }
      ]
    },
    {
      "name" : "IVLTSPeriod",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "IVL_TS",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "Period",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "low",
          "source" : [
            {
              "context" : "src",
              "element" : "low",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "start",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "high",
          "source" : [
            {
              "context" : "src",
              "element" : "high",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "end",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        }
      ]
    },
    {
      "name" : "IVLTSDateTime",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "IVL_TS",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "dateTime",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "low",
          "source" : [
            {
              "context" : "src",
              "element" : "low",
              "variable" : "s"
            }
          ],
          "dependent" : [
            {
              "name" : "TSDateTime",
              "variable" : [
                "s",
                "tgt"
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "STstring",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "ST",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "string",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "value",
          "source" : [
            {
              "context" : "src",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "cast",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "string"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "EDstring",
      "extends" : "STstring",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "ED",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "string",
          "mode" : "target"
        }
      ]
    },
    {
      "name" : "ONstring",
      "extends" : "STstring",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "ON",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "string",
          "mode" : "target"
        }
      ]
    },
    {
      "name" : "CSCode",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "CS",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "code",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "code",
          "source" : [
            {
              "context" : "src",
              "element" : "code",
              "variable" : "c"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "cast",
              "parameter" : [
                {
                  "valueId" : "c"
                },
                {
                  "valueString" : "string"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "CECode",
      "extends" : "CSCode",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "CE",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "code",
          "mode" : "target"
        }
      ]
    },
    {
      "name" : "CDCode",
      "extends" : "CSCode",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "CD",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "code",
          "mode" : "target"
        }
      ]
    },
    {
      "name" : "CECodeableConcept",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "CE",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "CodeableConcept",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "originalText",
          "source" : [
            {
              "context" : "src",
              "element" : "originalText",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "text",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "code",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "coding",
              "variable" : "coding"
            }
          ],
          "rule" : [
            {
              "name" : "code",
              "source" : [
                {
                  "context" : "src",
                  "element" : "code",
                  "variable" : "code"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "code",
                  "transform" : "cast",
                  "parameter" : [
                    {
                      "valueId" : "code"
                    },
                    {
                      "valueString" : "string"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "codeSystem",
              "source" : [
                {
                  "context" : "src",
                  "element" : "codeSystem",
                  "variable" : "system"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "system",
                  "transform" : "translate",
                  "parameter" : [
                    {
                      "valueId" : "system"
                    },
                    {
                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                    },
                    {
                      "valueString" : "uri"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "displayName",
              "source" : [
                {
                  "context" : "src",
                  "element" : "displayName",
                  "variable" : "display"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "display",
                  "transform" : "cast",
                  "parameter" : [
                    {
                      "valueId" : "display"
                    },
                    {
                      "valueString" : "string"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "translation",
          "source" : [
            {
              "context" : "src",
              "element" : "translation",
              "variable" : "translation"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "coding",
              "variable" : "coding"
            }
          ],
          "rule" : [
            {
              "name" : "code",
              "source" : [
                {
                  "context" : "translation",
                  "element" : "code",
                  "variable" : "code"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "code",
                  "transform" : "cast",
                  "parameter" : [
                    {
                      "valueId" : "code"
                    },
                    {
                      "valueString" : "string"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "codeSystem",
              "source" : [
                {
                  "context" : "translation",
                  "element" : "codeSystem",
                  "variable" : "system"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "system",
                  "transform" : "translate",
                  "parameter" : [
                    {
                      "valueId" : "system"
                    },
                    {
                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                    },
                    {
                      "valueString" : "uri"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "displayName",
              "source" : [
                {
                  "context" : "translation",
                  "element" : "displayName",
                  "variable" : "display"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "display",
                  "transform" : "cast",
                  "parameter" : [
                    {
                      "valueId" : "display"
                    },
                    {
                      "valueString" : "string"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "CSCodeableConcept",
      "extends" : "CECodeableConcept",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "CS",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "CodeableConcept",
          "mode" : "target"
        }
      ]
    },
    {
      "name" : "CDCodeableConcept",
      "extends" : "CECodeableConcept",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "CD",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "CodeableConcept",
          "mode" : "target"
        }
      ]
    },
    {
      "name" : "ENHumanName",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "EN",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "HumanName",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "family",
          "source" : [
            {
              "context" : "src",
              "element" : "family",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "family",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "given",
          "source" : [
            {
              "context" : "src",
              "element" : "given",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "given",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "prefix",
          "source" : [
            {
              "context" : "src",
              "element" : "prefix",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "prefix",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "suffix",
          "source" : [
            {
              "context" : "src",
              "element" : "suffix",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "suffix",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "validTime",
          "source" : [
            {
              "context" : "src",
              "element" : "validTime",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "period",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "documentation" : "src.use as c -> tgt.use = translate(c, 'http://hl7.org/fhir/ConceptMap/cm-name-use-v3', 'code');"
        }
      ]
    },
    {
      "name" : "ADAddress",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "AD",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "Address",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "country",
          "source" : [
            {
              "context" : "src",
              "element" : "country",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "country",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "state",
          "source" : [
            {
              "context" : "src",
              "element" : "state",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "state",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "county",
          "source" : [
            {
              "context" : "src",
              "element" : "county",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "district",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "city",
          "source" : [
            {
              "context" : "src",
              "element" : "city",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "city",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "postalCode",
          "source" : [
            {
              "context" : "src",
              "element" : "postalCode",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "postalCode",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "streetAddress",
          "source" : [
            {
              "context" : "src",
              "element" : "streetAddressLine",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "line",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "streetName",
          "source" : [
            {
              "context" : "src",
              "element" : "streetName",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "line",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "houseNumber",
          "source" : [
            {
              "context" : "src",
              "element" : "houseNumber",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "line",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "addressUse",
          "source" : [
            {
              "context" : "src",
              "element" : "use",
              "variable" : "c"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "use",
              "transform" : "translate",
              "parameter" : [
                {
                  "valueId" : "c"
                },
                {
                  "valueString" : "#addressUse"
                },
                {
                  "valueString" : "code"
                }
              ]
            }
          ]
        },
        {
          "name" : "useablePeriod",
          "source" : [
            {
              "context" : "src",
              "element" : "useablePeriod",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "period",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        }
      ]
    },
    {
      "name" : "TELContactPoint",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "TEL",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "ContactPoint",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "valuetel",
          "source" : [
            {
              "context" : "src",
              "element" : "value",
              "variable" : "v",
              "condition" : "(src.value.startsWith('tel:'))"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.substring(4)"
                }
              ]
            },
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "phone"
                }
              ]
            }
          ]
        },
        {
          "name" : "valuefax",
          "source" : [
            {
              "context" : "src",
              "element" : "value",
              "variable" : "v",
              "condition" : "(src.value.startsWith('fax:'))"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.substring(4)"
                }
              ]
            },
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "fax"
                }
              ]
            }
          ]
        },
        {
          "name" : "valuemail",
          "source" : [
            {
              "context" : "src",
              "element" : "value",
              "variable" : "v",
              "condition" : "(src.value.startsWith('mailto:'))"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.substring(7)"
                }
              ]
            },
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "email"
                }
              ]
            }
          ]
        },
        {
          "name" : "valuehttp",
          "source" : [
            {
              "context" : "src",
              "element" : "value",
              "variable" : "v",
              "condition" : "(src.value.startsWith('http:'))"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.substring(5)"
                }
              ]
            },
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "system",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "url"
                }
              ]
            }
          ]
        },
        {
          "name" : "usehome",
          "source" : [
            {
              "context" : "src",
              "element" : "use",
              "condition" : "(src.use.startsWith('H'))"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "use",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "home"
                }
              ]
            }
          ]
        },
        {
          "name" : "usework",
          "source" : [
            {
              "context" : "src",
              "element" : "use",
              "condition" : "((src.use = 'WP') or (src.use = 'DIR') or (src.use = 'PUB'))"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "use",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "work"
                }
              ]
            }
          ]
        },
        {
          "name" : "usebad",
          "source" : [
            {
              "context" : "src",
              "element" : "use",
              "condition" : "(src.use = 'BAD')"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "use",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "old"
                }
              ]
            }
          ]
        },
        {
          "name" : "usetmp",
          "source" : [
            {
              "context" : "src",
              "element" : "use",
              "condition" : "(src.use = 'TMP')"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "use",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "temp"
                }
              ]
            }
          ]
        },
        {
          "name" : "usemobile",
          "source" : [
            {
              "context" : "src",
              "element" : "use",
              "condition" : "(src.use = 'MC')"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "use",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "mobile"
                }
              ]
            }
          ]
        },
        {
          "name" : "useablePeriod",
          "source" : [
            {
              "context" : "src",
              "element" : "useablePeriod",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "period",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        }
      ]
    },
    {
      "name" : "PQQuantity",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "PQ",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "Quantity",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "unit",
          "source" : [
            {
              "context" : "src",
              "element" : "unit",
              "variable" : "unit"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "unit",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "unit"
                }
              ]
            }
          ],
          "documentation" : "src.unit as unit -> tgt.code = unit;"
        },
        {
          "name" : "value",
          "source" : [
            {
              "context" : "src",
              "element" : "value",
              "variable" : "value"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "value"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "RTOPQPQRatio",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "RTO_PQ_PQ",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "Ratio",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "numerator",
          "source" : [
            {
              "context" : "src",
              "element" : "numerator",
              "variable" : "numerator"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "numerator",
              "variable" : "targetNumerator"
            }
          ],
          "dependent" : [
            {
              "name" : "PQQuantity",
              "variable" : [
                "numerator",
                "targetNumerator"
              ]
            }
          ]
        },
        {
          "name" : "denominator",
          "source" : [
            {
              "context" : "src",
              "element" : "denominator",
              "variable" : "denominator"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "denominator",
              "variable" : "targetDenominator"
            }
          ],
          "dependent" : [
            {
              "name" : "PQQuantity",
              "variable" : [
                "denominator",
                "targetDenominator"
              ]
            }
          ]
        }
      ]
    }
  ]
}