CDA to FHIR Maps
0.1.0 - ci-build Italy flag

CDA to FHIR Maps, published by HL7 Italy. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/hl7-it/cda2fhir/ and changes regularly. See the Directory of published versions

: CDA to FHIR - Data Types - JSON Representation

Draft as of 2024-09-15

Raw json | Download


{
  "resourceType" : "StructureMap",
  "id" : "cda2fhirDataTypes",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n         <pre>map &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes&quot; = &quot;cda2fhirDataTypes&quot;\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/address-use&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\nconceptmap &quot;OBSstatus&quot; {\n  prefix s = &quot;http://terminology.hl7.org/ValueSet/v3-statusCode&quot;\n  prefix t = &quot;http://hl7.org/fhir/event-status&quot;\n\n  s:completed == t:final\n  s:active == t:registered\n  s:aborted == t:cancelled\n}\n\nconceptmap &quot;EventStatus&quot; {\n  prefix s = &quot;http://terminology.hl7.org/ValueSet/v3-statusCode&quot;\n  prefix t = &quot;http://hl7.org/fhir/ValueSet/fm-status&quot;\n\n  s:completed == t:completed\n  s:active == t:&quot;in-progress&quot;\n  s:aborted == t:stopped\n  s:suspended == t:&quot;on-hold&quot;\n}\n\nconceptmap &quot;FinancialStatus&quot; {\n  prefix s = &quot;http://terminology.hl7.org/ValueSet/v3-statusCode&quot;\n  prefix t = &quot;http://hl7.org/fhir/ValueSet/fm-status&quot;\n\n  s:active == t:active\n  s:aborted == t:cancelled\n  s:suspended == t:draft\n}\n\nconceptmap &quot;MedicationStatusMap&quot; {\n  prefix s = &quot;http://terminology.hl7.org/ValueSet/v3-statusCode&quot;\n  prefix t = &quot;http://hl7.org/fhir/ValueSet/medicationrequest-status&quot;\n\n  s:completed == t:completed\n  s:active == t:active\n  s:aborted == t:cancelled\n  s:suspended == t:&quot;on-hold&quot;\n}\n\nconceptmap &quot;cm-v3-administrative-gender&quot; {\n  prefix s = &quot;http://terminology.hl7.org/ValueSet/v3-AdministrativeGender&quot;\n  prefix t = &quot;http://hl7.org/fhir/ValueSet/administrative-gender&quot;\n\n  s:M == t:male\n  s:F == t:female\n}\n\nconceptmap &quot;AllergyTypeMap&quot; {\n  prefix s = &quot;http://terminology.hl7.org/ValueSet/v3-type&quot;\n  prefix t = &quot;http://hl7.org/fhir/ValueSet/allergyintolerance-clinical&quot;\n\n  s:OINT == t:intolerance\n  s:ALG == t:allergy\n  s:DALG == t:allergy\n  s:EALG == t:allergy\n  s:FALG == t:allergy\n  s:NAINT == t:intolerance\n  s:FNAINT == t:intolerance\n  s:DNAINT == t:intolerance\n  s:ENAINT == t:intolerance\n  s:FINT == t:intolerance\n  s:DINT == t:intolerance\n  s:EINT == t:intolerance\n}\n\nconceptmap &quot;AllergyCategoryMap&quot; {\n  prefix s = &quot;http://terminology.hl7.org/ValueSet/v3-type&quot;\n  prefix t = &quot;http://hl7.org/fhir/ValueSet/allergyintolerance-clinical&quot;\n\n  s:DALG == t:medication\n  s:EALG == t:enviroment\n  s:FALG == t:food\n  s:FNAINT == t:intolerance\n  s:DNAINT == t:medication\n  s:ENAINT == t:enviroment\n  s:FINT == t:food\n  s:DINT == t:medication\n  s:EINT == t:enviroment\n}\n\nconceptmap &quot;CricalityMap&quot; {\n  prefix s = &quot;http://terminology.hl7.org/CodeSystem/v3-ObservationValue&quot;\n  prefix t = &quot;http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality&quot;\n\n  s:M == t:low\n  s:H == t:high\n  s:L == t:low\n}\n\nconceptmap &quot;ClinicalStatusMap&quot; {\n  prefix s = &quot;https://loinc.org/99493-9/&quot;\n  prefix t = &quot;http://hl7.org/fhir/ValueSet/condition-clinical&quot;\n\n  s:&quot;LA16666-2&quot; == t:active\n  s:&quot;LA18632-2&quot; == t:inactive\n  s:&quot;LA9041-0&quot; == t:resolved\n}\n\nconceptmap &quot;priority&quot; {\n  prefix s = &quot;http://terminology.hl7.org/ValueSet/v3-ActPriority&quot;\n  prefix t = &quot;http://hl7.org/fhir/ValueSet/request-priority&quot;\n\n  s:R == t:routine\n  s:P == t:asap\n  s:UR == t:urgent\n  s:EM == t:stat\n  s:S == t:stat\n  s:A == t:asap\n  s:CR == t:routine\n  s:EL == t:routine\n  s:p == t:stat\n  s:PRN == t:routine\n  s:RR == t:asap\n  s:T == t:urgent\n  s:UD == t:routine\n}\n\nconceptmap &quot;AllergyCriticality&quot; {\n  prefix s = &quot;https://art-decor.org/art-decor/decor-valuesets--hl7it-?id=2.16.840.1.113883.2.9.77.22.11.6&quot;\n  prefix t = &quot;http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality&quot;\n\n  s:L == t:low\n  s:H == t:high\n  s:M == t:unable_to_assess\n}\n\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/ED&quot; alias ED as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/INT&quot; alias INT 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  src -&gt; tgt &quot;simple&quot;;\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}\n\ngroup INT(source src : INT, target tgt : integer) extends Any &lt;&lt;types&gt;&gt; {\n  src.value as v -&gt; tgt.value = cast(v, 'string');\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  src where (value.contains('+')) then {\n    src.value as v -&gt; tgt.value = cast(v, 'string');\n  } &quot;eff&quot;;\n  src where (value.contains('-')) then {\n    src.value as v -&gt; tgt.value = cast(v, 'string');\n  } &quot;eff&quot;;\n  src.value where (value.matches('^\\\\d{4}(\\\\-\\\\d{2}){2}T\\\\d{2}(:\\\\d{2}){2}$')) then {\n    src.value as v -&gt; tgt.value = append(v, 'Z') &quot;date&quot;;\n  } &quot;eff&quot;;\n}\n\ngroup TSDate(source src : TS, target tgt : date) extends TSInstant &lt;&lt;types&gt;&gt; {\n  src.value as v -&gt; tgt.value = cast(v, 'string') &quot;date&quot;;\n}\n\ngroup IVLTSPeriod(source src : IVL_TS, target tgt : Period) extends Any &lt;&lt;types&gt;&gt; {\n  src.low as l -&gt; tgt.start = create('dateTime') as start then TSDateTime(l, start);\n  src.high as h -&gt; tgt.end = create('dateTime') as end then TSDateTime(h, 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  src as v -&gt; tgt.value = cast(v, 'string') &quot;value&quot;;\n}\n\ngroup INTstring(source src : INT, target tgt : string) extends STstring &lt;&lt;types&gt;&gt; {\n  src as v -&gt; tgt.value = cast(v, 'string') &quot;value&quot;;\n}\n\ngroup ONstring(source src : ON, target tgt : string) extends STstring &lt;&lt;types&gt;&gt; {\n  src as v -&gt; tgt.value = cast(v, 'string') &quot;value&quot;;\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  src.code as c -&gt; tgt.value = cast(c, 'string');\n}\n\ngroup CDCode(source src : CD, target tgt : code) extends CSCode &lt;&lt;types&gt;&gt; {\n  src.code as c -&gt; tgt.value = cast(c, 'string');\n}\n\ngroup CECodeableConcept(source src : CE, target tgt : CodeableConcept) extends Any &lt;&lt;types&gt;&gt; {\n  src.originalText as originalText then {\n    originalText.reference as reference -&gt; tgt.text = (reference.value);\n  } &quot;originltext&quot;;\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    src.codeSystemVersion as version -&gt; coding.version = cast(version, '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    translation.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n    translation.qualifier as qualifier then {\n      qualifier.name as name -&gt; tgt.coding as coding then {\n        name.code as code -&gt; coding.code = cast(code, 'string');\n        name.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        name.displayName as display -&gt; coding.display = cast(display, 'string');\n        name.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n      };\n      qualifier.value as value -&gt; tgt.coding as coding then {\n        value.code as code -&gt; coding.code = cast(code, 'string');\n        value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        value.displayName as display -&gt; coding.display = cast(display, 'string');\n        value.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n      };\n    };\n  };\n}\n\ngroup CSCodeableConcept(source src : CS, target tgt : CodeableConcept) extends CECodeableConcept &lt;&lt;types&gt;&gt; {\n  src.originalText as originalText then {\n    originalText.reference as reference -&gt; tgt.text = (reference.value);\n  } &quot;originltext&quot;;\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    src.codeSystemVersion as version -&gt; coding.version = cast(version, '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    translation.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n    translation.qualifier as qualifier then {\n      qualifier.name as name -&gt; tgt.coding as coding then {\n        name.code as code -&gt; coding.code = cast(code, 'string');\n        name.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        name.displayName as display -&gt; coding.display = cast(display, 'string');\n        name.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n      };\n      qualifier.value as value -&gt; tgt.coding as coding then {\n        value.code as code -&gt; coding.code = cast(code, 'string');\n        value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        value.displayName as display -&gt; coding.display = cast(display, 'string');\n        value.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n      };\n    };\n  };\n}\n\ngroup CDCodeableConcept(source src : CD, target tgt : CodeableConcept) extends CECodeableConcept &lt;&lt;types&gt;&gt; {\n  src.originalText as originalText then {\n    originalText.reference as reference -&gt; tgt.text = (reference.value);\n  } &quot;originltext&quot;;\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    src.codeSystemVersion as version -&gt; coding.version = cast(version, '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    translation.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n    translation.qualifier as qualifier then {\n      qualifier.name as name -&gt; tgt.coding as coding then {\n        name.code as code -&gt; coding.code = cast(code, 'string');\n        name.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        name.displayName as display -&gt; coding.display = cast(display, 'string');\n        name.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n      };\n      qualifier.value as value -&gt; tgt.coding as coding then {\n        value.code as code -&gt; coding.code = cast(code, 'string');\n        value.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        value.displayName as display -&gt; coding.display = cast(display, 'string');\n        value.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n      };\n    };\n  };\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);\n  src -&gt; tgt.line as line then {\n    src where src.censusTract.exists() then {\n      src.censusTract as v -&gt; line.extension as ext1 then CensusTract(v, ext1) &quot;line&quot;;\n    } &quot;sfgfdsg&quot;;\n  } &quot;CensusTract&quot;;\n  // share firstline &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\ngroup CensusTract(source src : ST, target ext : Extension) {\n  src -&gt; ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-censusTract' &quot;url&quot;;\n  src -&gt;  ext.value = create('string'),  ext.value = (src.dataString) &quot;value&quot;;\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/address-use",
          "element" : [
            {
              "code" : "H",
              "target" : [
                {
                  "code" : "home",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "HP",
              "target" : [
                {
                  "code" : "home",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "HV",
              "target" : [
                {
                  "code" : "home",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "WP",
              "target" : [
                {
                  "code" : "work",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "DIR",
              "target" : [
                {
                  "code" : "work",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "PUB",
              "target" : [
                {
                  "code" : "work",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "TMP",
              "target" : [
                {
                  "code" : "temp",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "OLD",
              "target" : [
                {
                  "code" : "old",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "BAD",
              "target" : [
                {
                  "code" : "old",
                  "equivalence" : "equivalent"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "resourceType" : "ConceptMap",
      "id" : "OBSstatus",
      "status" : "draft",
      "group" : [
        {
          "source" : "http://terminology.hl7.org/ValueSet/v3-statusCode",
          "target" : "http://hl7.org/fhir/event-status",
          "element" : [
            {
              "code" : "completed",
              "target" : [
                {
                  "code" : "final",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "active",
              "target" : [
                {
                  "code" : "registered",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "aborted",
              "target" : [
                {
                  "code" : "cancelled",
                  "equivalence" : "equivalent"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "resourceType" : "ConceptMap",
      "id" : "EventStatus",
      "status" : "draft",
      "group" : [
        {
          "source" : "http://terminology.hl7.org/ValueSet/v3-statusCode",
          "target" : "http://hl7.org/fhir/ValueSet/fm-status",
          "element" : [
            {
              "code" : "completed",
              "target" : [
                {
                  "code" : "completed",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "active",
              "target" : [
                {
                  "code" : "in-progress",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "aborted",
              "target" : [
                {
                  "code" : "stopped",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "suspended",
              "target" : [
                {
                  "code" : "on-hold",
                  "equivalence" : "equivalent"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "resourceType" : "ConceptMap",
      "id" : "FinancialStatus",
      "status" : "draft",
      "group" : [
        {
          "source" : "http://terminology.hl7.org/ValueSet/v3-statusCode",
          "target" : "http://hl7.org/fhir/ValueSet/fm-status",
          "element" : [
            {
              "code" : "active",
              "target" : [
                {
                  "code" : "active",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "aborted",
              "target" : [
                {
                  "code" : "cancelled",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "suspended",
              "target" : [
                {
                  "code" : "draft",
                  "equivalence" : "equivalent"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "resourceType" : "ConceptMap",
      "id" : "MedicationStatusMap",
      "status" : "draft",
      "group" : [
        {
          "source" : "http://terminology.hl7.org/ValueSet/v3-statusCode",
          "target" : "http://hl7.org/fhir/ValueSet/medicationrequest-status",
          "element" : [
            {
              "code" : "completed",
              "target" : [
                {
                  "code" : "completed",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "active",
              "target" : [
                {
                  "code" : "active",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "aborted",
              "target" : [
                {
                  "code" : "cancelled",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "suspended",
              "target" : [
                {
                  "code" : "on-hold",
                  "equivalence" : "equivalent"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "resourceType" : "ConceptMap",
      "id" : "cm-v3-administrative-gender",
      "status" : "draft",
      "group" : [
        {
          "source" : "http://terminology.hl7.org/ValueSet/v3-AdministrativeGender",
          "target" : "http://hl7.org/fhir/ValueSet/administrative-gender",
          "element" : [
            {
              "code" : "M",
              "target" : [
                {
                  "code" : "male",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "F",
              "target" : [
                {
                  "code" : "female",
                  "equivalence" : "equivalent"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "resourceType" : "ConceptMap",
      "id" : "AllergyTypeMap",
      "status" : "draft",
      "group" : [
        {
          "source" : "http://terminology.hl7.org/ValueSet/v3-type",
          "target" : "http://hl7.org/fhir/ValueSet/allergyintolerance-clinical",
          "element" : [
            {
              "code" : "OINT",
              "target" : [
                {
                  "code" : "intolerance",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "ALG",
              "target" : [
                {
                  "code" : "allergy",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "DALG",
              "target" : [
                {
                  "code" : "allergy",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "EALG",
              "target" : [
                {
                  "code" : "allergy",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "FALG",
              "target" : [
                {
                  "code" : "allergy",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "NAINT",
              "target" : [
                {
                  "code" : "intolerance",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "FNAINT",
              "target" : [
                {
                  "code" : "intolerance",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "DNAINT",
              "target" : [
                {
                  "code" : "intolerance",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "ENAINT",
              "target" : [
                {
                  "code" : "intolerance",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "FINT",
              "target" : [
                {
                  "code" : "intolerance",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "DINT",
              "target" : [
                {
                  "code" : "intolerance",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "EINT",
              "target" : [
                {
                  "code" : "intolerance",
                  "equivalence" : "equivalent"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "resourceType" : "ConceptMap",
      "id" : "AllergyCategoryMap",
      "status" : "draft",
      "group" : [
        {
          "source" : "http://terminology.hl7.org/ValueSet/v3-type",
          "target" : "http://hl7.org/fhir/ValueSet/allergyintolerance-clinical",
          "element" : [
            {
              "code" : "DALG",
              "target" : [
                {
                  "code" : "medication",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "EALG",
              "target" : [
                {
                  "code" : "enviroment",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "FALG",
              "target" : [
                {
                  "code" : "food",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "FNAINT",
              "target" : [
                {
                  "code" : "intolerance",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "DNAINT",
              "target" : [
                {
                  "code" : "medication",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "ENAINT",
              "target" : [
                {
                  "code" : "enviroment",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "FINT",
              "target" : [
                {
                  "code" : "food",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "DINT",
              "target" : [
                {
                  "code" : "medication",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "EINT",
              "target" : [
                {
                  "code" : "enviroment",
                  "equivalence" : "equivalent"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "resourceType" : "ConceptMap",
      "id" : "CricalityMap",
      "status" : "draft",
      "group" : [
        {
          "source" : "http://terminology.hl7.org/CodeSystem/v3-ObservationValue",
          "target" : "http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality",
          "element" : [
            {
              "code" : "M",
              "target" : [
                {
                  "code" : "low",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "H",
              "target" : [
                {
                  "code" : "high",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "L",
              "target" : [
                {
                  "code" : "low",
                  "equivalence" : "equivalent"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "resourceType" : "ConceptMap",
      "id" : "ClinicalStatusMap",
      "status" : "draft",
      "group" : [
        {
          "source" : "https://loinc.org/99493-9/",
          "target" : "http://hl7.org/fhir/ValueSet/condition-clinical",
          "element" : [
            {
              "code" : "LA16666-2",
              "target" : [
                {
                  "code" : "active",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "LA18632-2",
              "target" : [
                {
                  "code" : "inactive",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "LA9041-0",
              "target" : [
                {
                  "code" : "resolved",
                  "equivalence" : "equivalent"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "resourceType" : "ConceptMap",
      "id" : "priority",
      "status" : "draft",
      "group" : [
        {
          "source" : "http://terminology.hl7.org/ValueSet/v3-ActPriority",
          "target" : "http://hl7.org/fhir/ValueSet/request-priority",
          "element" : [
            {
              "code" : "R",
              "target" : [
                {
                  "code" : "routine",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "P",
              "target" : [
                {
                  "code" : "asap",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "UR",
              "target" : [
                {
                  "code" : "urgent",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "EM",
              "target" : [
                {
                  "code" : "stat",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "S",
              "target" : [
                {
                  "code" : "stat",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "A",
              "target" : [
                {
                  "code" : "asap",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "CR",
              "target" : [
                {
                  "code" : "routine",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "EL",
              "target" : [
                {
                  "code" : "routine",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "p",
              "target" : [
                {
                  "code" : "stat",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "PRN",
              "target" : [
                {
                  "code" : "routine",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "RR",
              "target" : [
                {
                  "code" : "asap",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "T",
              "target" : [
                {
                  "code" : "urgent",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "UD",
              "target" : [
                {
                  "code" : "routine",
                  "equivalence" : "equivalent"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "resourceType" : "ConceptMap",
      "id" : "AllergyCriticality",
      "status" : "draft",
      "group" : [
        {
          "source" : "https://art-decor.org/art-decor/decor-valuesets--hl7it-?id=2.16.840.1.113883.2.9.77.22.11.6",
          "target" : "http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality",
          "element" : [
            {
              "code" : "L",
              "target" : [
                {
                  "code" : "low",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "H",
              "target" : [
                {
                  "code" : "high",
                  "equivalence" : "equivalent"
                }
              ]
            },
            {
              "code" : "M",
              "target" : [
                {
                  "code" : "unable_to_assess",
                  "equivalence" : "equivalent"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "url" : "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes",
  "version" : "0.1.0",
  "name" : "cda2fhirDataTypes",
  "status" : "draft",
  "date" : "2024-09-15T08:16:12+00:00",
  "publisher" : "HL7 Italy",
  "contact" : [
    {
      "name" : "HL7 Italy",
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://hl7.it"
        }
      ]
    }
  ],
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "urn:iso:std:iso:3166",
          "code" : "IT",
          "display" : "Italy"
        }
      ]
    }
  ],
  "structure" : [
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/ED",
      "mode" : "source",
      "alias" : "ED"
    },
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/INT",
      "mode" : "source",
      "alias" : "INT"
    },
    {
      "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"
        }
      ],
      "rule" : [
        {
          "name" : "simple",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "contextType" : "variable",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueId" : "tgt"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "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" : "INT",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "INT",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "integer",
          "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" : "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"
        }
      ],
      "rule" : [
        {
          "name" : "eff",
          "source" : [
            {
              "context" : "src",
              "condition" : "(value.contains('+'))"
            }
          ],
          "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" : "eff",
          "source" : [
            {
              "context" : "src",
              "condition" : "(value.contains('-'))"
            }
          ],
          "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" : "eff",
          "source" : [
            {
              "context" : "src",
              "element" : "value",
              "condition" : "(value.matches('^\\\\d{4}(\\\\-\\\\d{2}){2}T\\\\d{2}(:\\\\d{2}){2}$'))"
            }
          ],
          "rule" : [
            {
              "name" : "date",
              "source" : [
                {
                  "context" : "src",
                  "element" : "value",
                  "variable" : "v"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueId" : "v"
                    },
                    {
                      "valueString" : "Z"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "TSDate",
      "extends" : "TSInstant",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "TS",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "date",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "date",
          "source" : [
            {
              "context" : "src",
              "element" : "value",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "cast",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "string"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "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" : "l"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "start",
              "variable" : "start",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "dateTime"
                }
              ]
            }
          ],
          "dependent" : [
            {
              "name" : "TSDateTime",
              "variable" : [
                "l",
                "start"
              ]
            }
          ]
        },
        {
          "name" : "high",
          "source" : [
            {
              "context" : "src",
              "element" : "high",
              "variable" : "h"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "end",
              "variable" : "end",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "dateTime"
                }
              ]
            }
          ],
          "dependent" : [
            {
              "name" : "TSDateTime",
              "variable" : [
                "h",
                "end"
              ]
            }
          ]
        }
      ]
    },
    {
      "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"
        }
      ],
      "rule" : [
        {
          "name" : "value",
          "source" : [
            {
              "context" : "src",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "cast",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "string"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "INTstring",
      "extends" : "STstring",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "INT",
          "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" : "ONstring",
      "extends" : "STstring",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "ON",
          "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" : "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"
        }
      ],
      "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" : "CDCode",
      "extends" : "CSCode",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "CD",
          "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" : "CECodeableConcept",
      "extends" : "Any",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "CE",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "CodeableConcept",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "originltext",
          "source" : [
            {
              "context" : "src",
              "element" : "originalText",
              "variable" : "originalText"
            }
          ],
          "rule" : [
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "originalText",
                  "element" : "reference",
                  "variable" : "reference"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "text",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "reference.value"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "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" : "codeSystemVersion",
              "source" : [
                {
                  "context" : "src",
                  "element" : "codeSystemVersion",
                  "variable" : "version"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "version",
                  "transform" : "cast",
                  "parameter" : [
                    {
                      "valueId" : "version"
                    },
                    {
                      "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" : "codeSystemVersion",
              "source" : [
                {
                  "context" : "translation",
                  "element" : "codeSystemVersion",
                  "variable" : "version"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "version",
                  "transform" : "cast",
                  "parameter" : [
                    {
                      "valueId" : "version"
                    },
                    {
                      "valueString" : "string"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "qualifier",
              "source" : [
                {
                  "context" : "translation",
                  "element" : "qualifier",
                  "variable" : "qualifier"
                }
              ],
              "rule" : [
                {
                  "name" : "name",
                  "source" : [
                    {
                      "context" : "qualifier",
                      "element" : "name",
                      "variable" : "name"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "coding",
                      "variable" : "coding"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "name",
                          "element" : "code",
                          "variable" : "code"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "code"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "codeSystem",
                      "source" : [
                        {
                          "context" : "name",
                          "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" : "name",
                          "element" : "displayName",
                          "variable" : "display"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "display",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "display"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "codeSystemVersion",
                      "source" : [
                        {
                          "context" : "name",
                          "element" : "codeSystemVersion",
                          "variable" : "version"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "version",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "version"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "value",
                  "source" : [
                    {
                      "context" : "qualifier",
                      "element" : "value",
                      "variable" : "value"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "coding",
                      "variable" : "coding"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "value",
                          "element" : "code",
                          "variable" : "code"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "code"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "codeSystem",
                      "source" : [
                        {
                          "context" : "value",
                          "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" : "value",
                          "element" : "displayName",
                          "variable" : "display"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "display",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "display"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "codeSystemVersion",
                      "source" : [
                        {
                          "context" : "value",
                          "element" : "codeSystemVersion",
                          "variable" : "version"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "version",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "version"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "CSCodeableConcept",
      "extends" : "CECodeableConcept",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "CS",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "CodeableConcept",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "originltext",
          "source" : [
            {
              "context" : "src",
              "element" : "originalText",
              "variable" : "originalText"
            }
          ],
          "rule" : [
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "originalText",
                  "element" : "reference",
                  "variable" : "reference"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "text",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "reference.value"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "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" : "codeSystemVersion",
              "source" : [
                {
                  "context" : "src",
                  "element" : "codeSystemVersion",
                  "variable" : "version"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "version",
                  "transform" : "cast",
                  "parameter" : [
                    {
                      "valueId" : "version"
                    },
                    {
                      "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" : "codeSystemVersion",
              "source" : [
                {
                  "context" : "translation",
                  "element" : "codeSystemVersion",
                  "variable" : "version"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "version",
                  "transform" : "cast",
                  "parameter" : [
                    {
                      "valueId" : "version"
                    },
                    {
                      "valueString" : "string"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "qualifier",
              "source" : [
                {
                  "context" : "translation",
                  "element" : "qualifier",
                  "variable" : "qualifier"
                }
              ],
              "rule" : [
                {
                  "name" : "name",
                  "source" : [
                    {
                      "context" : "qualifier",
                      "element" : "name",
                      "variable" : "name"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "coding",
                      "variable" : "coding"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "name",
                          "element" : "code",
                          "variable" : "code"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "code"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "codeSystem",
                      "source" : [
                        {
                          "context" : "name",
                          "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" : "name",
                          "element" : "displayName",
                          "variable" : "display"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "display",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "display"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "codeSystemVersion",
                      "source" : [
                        {
                          "context" : "name",
                          "element" : "codeSystemVersion",
                          "variable" : "version"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "version",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "version"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "value",
                  "source" : [
                    {
                      "context" : "qualifier",
                      "element" : "value",
                      "variable" : "value"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "coding",
                      "variable" : "coding"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "value",
                          "element" : "code",
                          "variable" : "code"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "code"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "codeSystem",
                      "source" : [
                        {
                          "context" : "value",
                          "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" : "value",
                          "element" : "displayName",
                          "variable" : "display"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "display",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "display"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "codeSystemVersion",
                      "source" : [
                        {
                          "context" : "value",
                          "element" : "codeSystemVersion",
                          "variable" : "version"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "version",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "version"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "CDCodeableConcept",
      "extends" : "CECodeableConcept",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "CD",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "CodeableConcept",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "originltext",
          "source" : [
            {
              "context" : "src",
              "element" : "originalText",
              "variable" : "originalText"
            }
          ],
          "rule" : [
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "originalText",
                  "element" : "reference",
                  "variable" : "reference"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "text",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "reference.value"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "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" : "codeSystemVersion",
              "source" : [
                {
                  "context" : "src",
                  "element" : "codeSystemVersion",
                  "variable" : "version"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "version",
                  "transform" : "cast",
                  "parameter" : [
                    {
                      "valueId" : "version"
                    },
                    {
                      "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" : "codeSystemVersion",
              "source" : [
                {
                  "context" : "translation",
                  "element" : "codeSystemVersion",
                  "variable" : "version"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "version",
                  "transform" : "cast",
                  "parameter" : [
                    {
                      "valueId" : "version"
                    },
                    {
                      "valueString" : "string"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "qualifier",
              "source" : [
                {
                  "context" : "translation",
                  "element" : "qualifier",
                  "variable" : "qualifier"
                }
              ],
              "rule" : [
                {
                  "name" : "name",
                  "source" : [
                    {
                      "context" : "qualifier",
                      "element" : "name",
                      "variable" : "name"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "coding",
                      "variable" : "coding"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "name",
                          "element" : "code",
                          "variable" : "code"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "code"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "codeSystem",
                      "source" : [
                        {
                          "context" : "name",
                          "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" : "name",
                          "element" : "displayName",
                          "variable" : "display"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "display",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "display"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "codeSystemVersion",
                      "source" : [
                        {
                          "context" : "name",
                          "element" : "codeSystemVersion",
                          "variable" : "version"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "version",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "version"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "value",
                  "source" : [
                    {
                      "context" : "qualifier",
                      "element" : "value",
                      "variable" : "value"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "coding",
                      "variable" : "coding"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "value",
                          "element" : "code",
                          "variable" : "code"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "code"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "codeSystem",
                      "source" : [
                        {
                          "context" : "value",
                          "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" : "value",
                          "element" : "displayName",
                          "variable" : "display"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "display",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "display"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "codeSystemVersion",
                      "source" : [
                        {
                          "context" : "value",
                          "element" : "codeSystemVersion",
                          "variable" : "version"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "coding",
                          "contextType" : "variable",
                          "element" : "version",
                          "transform" : "cast",
                          "parameter" : [
                            {
                              "valueId" : "version"
                            },
                            {
                              "valueString" : "string"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "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" : "streetAddressLine",
          "source" : [
            {
              "context" : "src",
              "element" : "streetAddressLine",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "line",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "CensusTract",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "line",
              "variable" : "line"
            }
          ],
          "rule" : [
            {
              "name" : "sfgfdsg",
              "source" : [
                {
                  "context" : "src",
                  "condition" : "src.censusTract.exists()"
                }
              ],
              "rule" : [
                {
                  "name" : "line",
                  "source" : [
                    {
                      "context" : "src",
                      "element" : "censusTract",
                      "variable" : "v"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "line",
                      "contextType" : "variable",
                      "element" : "extension",
                      "variable" : "ext1"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "CensusTract",
                      "variable" : [
                        "v",
                        "ext1"
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "streetName",
          "source" : [
            {
              "context" : "src",
              "element" : "streetName",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "line",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.dataString"
                }
              ]
            }
          ],
          "documentation" : "share firstline \"streetAddress\";"
        },
        {
          "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"
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "CensusTract",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "ST",
          "mode" : "source"
        },
        {
          "name" : "ext",
          "type" : "Extension",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "url",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "ext",
              "contextType" : "variable",
              "element" : "url",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-censusTract"
                }
              ]
            }
          ]
        },
        {
          "name" : "value",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "ext",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "string"
                }
              ]
            },
            {
              "context" : "ext",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "src.dataString"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}