CDA to FHIR Maps
0.1.0 - ci-build

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 - LAB - JSON Representation

Draft as of 2025-10-01

Raw json | Download

    {
      "resourceType" : "StructureMap",
      "id" : "cda2fhirLabReport",
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n         <pre>map &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirLabReport&quot; = &quot;cda2fhirLabReport&quot;\n\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument&quot; alias ClinicalDocument as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor&quot; alias AssignedAuthor as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity&quot; alias AssignedEntity as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity&quot; alias AssociatedEntity as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization&quot; alias CustodianOrganization as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf&quot; alias OrganizationPartOf as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Organization&quot; alias rapresentedOrganization as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Section&quot; alias Section as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/PatientRole&quot; alias PatientRole as queried\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/AD&quot; alias AD as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; alias Bundle as target\nuses &quot;http://hl7.org/fhir/StructureDefinition/Composition&quot; alias Composition as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Patient&quot; alias Patient as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Encounter&quot; alias Encounter as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Person&quot; alias Patient as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Practitioner&quot; alias Practitioner as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Specimen&quot; alias Specimen as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Procedure&quot; alias Procedure as produced\nuses &quot;http://hl7.org/fhir/StructureDefinition/Organization&quot; alias Organization as produced\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Act&quot; alias Act as produced\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ&quot; alias IVL_PQ as source\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/PQ&quot; alias PQ as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/SimpleQuantity&quot; alias SimpleQuantity as target\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/Organizer&quot; alias Organizer as source\n\nimports &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes&quot;\nimports &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader&quot;\n\ngroup CdaToBundle(source cda : ClinicalDocument, target bundle : Bundle) {\n  cda -&gt;  bundle.entry as e,  e.request = create('BackboneElement') as request,  request.method = 'POST',  e.resource = create('Composition') as composition,  composition.id = uuid() as uuid1,  e.fullUrl = append('https://example/Composition/', uuid1),  request.url = 'Composition',  bundle.entry as e2,  e2.request = create('BackboneElement') as requestPAT,  requestPAT.method = 'PUT',  e2.resource = create('Patient') as patient,  patient.id = uuid() as uuid2,  e2.fullUrl = append('https://example/Patient/', uuid2),  bundle.entry as e3,  e3.request = create('BackboneElement') as request,  request.method = 'POST',  e3.resource = create('Encounter') as encounter,  encounter.id = uuid() as uuid3,  e3.fullUrl = append('https://example/Encounter/', uuid3),  request.url = 'Encounter',  bundle.entry as e6,  e6.request = create('BackboneElement') as request,  request.method = 'POST',  e6.resource = create('DocumentReference') as DocumentReference,  DocumentReference.id = uuid() as uuid6,  e6.fullUrl = append('https://example/DocumentReference/', uuid6),  request.url = 'DocumentReference' then {\n    cda then ClinicalDocumentToBundle(cda, patient, composition, encounter, bundle, DocumentReference) &quot;cdatobundle&quot;;\n    cda.recordTarget as recordTarget then {\n      recordTarget.patientRole as patient then {\n        patient.id as id -&gt; patient.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext1 -&gt; identifier.value = ext1 &quot;value&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n        } &quot;idfr&quot;;\n        patient.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') or (root = '2.16.840.1.113883.2.9.4.3.7') or (root = '2.16.840.1.113883.2.9.4.3.3') or (root = '2.16.840.1.113883.2.9.4.3.17') or (root = '2.16.840.1.113883.2.9.4.3.18') or (root = '2.16.840.1.113883.2.9.2.10.4.1.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1.1') or (root = '2.16.840.1.113883.2.9.2.10.4.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1') or (root = '2.16.840.1.113883.2.9.4.3.15') then {\n          id.extension as ext -&gt; requestPAT.url = append('Patient?identifier=', ext) &quot;UUID&quot;;\n        } &quot;ext&quot;;\n      } &quot;record&quot;;\n    } &quot;patient&quot;;\n  } &quot;ClinicalDocumentToBody&quot;;\n}\n\ngroup ClinicalDocumentToBundle(source cda : ClinicalDocument, target patient : Patient, target composition : Composition, target encounter : Encounter, target bundle : Bundle, target documentreference : DocumentReference) {\n  cda -&gt; bundle.id = uuid() &quot;id&quot;;\n  cda.id -&gt; bundle.identifier &quot;identifier&quot;;\n  cda -&gt; bundle.type = 'transaction' &quot;type&quot;;\n  cda -&gt; bundle.timestamp = (timestamp.now()) &quot;date&quot;;\n  cda then ClinicalDocumentComposition(cda, composition, patient, encounter, bundle, documentreference) &quot;composition&quot;;\n  cda.component as component then {\n    component.structuredBody as body then {\n      body.component as component then {\n        component.section as srcSection then {\n          srcSection.code -&gt; composition.section as tgtSection then ClinicalDocumentSection(cda, srcSection, patient, tgtSection, bundle, encounter, documentreference);\n        };\n      };\n    } &quot;body&quot;;\n  };\n}\n\ngroup ClinicalDocumentSection(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter, target documentreference : DocumentReference) {\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src.code -&gt; tgt.code;\n  src.text as cdaText -&gt; tgt.text as fhirText then {\n    cdaText -&gt; fhirText.status = 'generated' &quot;narrativeStatus&quot;;\n    cdaText as t -&gt; fhirText.div = t &quot;narrativeText&quot;;\n  } &quot;cdaText&quot;;\n  src.entry as entry1 -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('DiagnosticReport') as DiagnosticReport,  DiagnosticReport.id = uuid() as uuid1,  e1.fullUrl = append('https://example/DiagnosticReport/', uuid1),  request.url = 'DiagnosticReport',  tgt.entry = create('Reference') as reference,  reference.reference = ('https://example/DiagnosticReport/' + %DiagnosticReport.id) then {\n    entry1.act as act1 then Act(act1, patient, DiagnosticReport, enc, bundle);\n  };\n  src.component as component then {\n    component.section as sec -&gt; tgt.section as tgtSection then ClinicalDocumentSection(cda, sec, patient, tgtSection, bundle, enc, documentreference);\n  };\n}\n\ngroup Observation(source obs : Observation, target patient : Patient, target encounter : Encounter, target ob : Observation, target bundle : Bundle) {\n  obs -&gt;  ob.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n  obs -&gt;  ob.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;\n  obs.code -&gt; ob.code;\n  obs.statusCode as statusc where (code = 'completed') -&gt; ob.status = 'final';\n  obs.statusCode as statusc where (code = 'active') -&gt; ob.status = 'registered';\n  obs.statusCode as statusc where (code = 'aborted') -&gt; ob.status = 'cancelled';\n  obs.statusCode as statusc where (code = 'suspended') -&gt; ob.status = 'partial';\n  obs.effectiveTime as effectiveTime -&gt; ob.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;value2&quot;;\n  obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n    obs.effectiveTime as eff -&gt; ob.effective = create('Period') as period then IVLTSPeriod(eff, period);\n  } &quot;where&quot;;\n  obs.interpretationCode -&gt; ob.interpretation;\n  obs.methodCode -&gt; ob.method;\n  obs.value : INT as int -&gt; ob.value = (int.value);\n  obs.value : BL as boolean -&gt; ob.value = (boolean.value) &quot;boolean&quot;;\n  obs.value : CE as val then {\n    val -&gt; ob.value = create('CodeableConcept') as ce then {\n      val.originalText as originalText then {\n        originalText.reference as reference -&gt; ce.text = reference;\n      } &quot;originltext&quot;;\n      val -&gt; ce.coding as coding then {\n        val.code as code -&gt; coding.code = cast(code, 'string');\n        val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        val.displayName as display -&gt; coding.display = cast(display, 'string');\n        val.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n      } &quot;code&quot;;\n      val.translation as translation -&gt; ce.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.value as value -&gt; ce.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    } &quot;coding&quot;;\n  } &quot;val&quot;;\n  obs.value : CD as val then {\n    val -&gt; ob.value = create('CodeableConcept') as ce then {\n      val.originalText as originalText then {\n        originalText.reference as reference -&gt; ce.text = reference;\n      } &quot;originltext&quot;;\n      val -&gt; ce.coding as coding then {\n        val.code as code -&gt; coding.code = cast(code, 'string');\n        val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        val.displayName as display -&gt; coding.display = cast(display, 'string');\n        val.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n      } &quot;code&quot;;\n      val.translation as translation -&gt; ce.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.value as value -&gt; ce.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    } &quot;coding&quot;;\n  } &quot;val&quot;;\n  obs.value : PQ as val then {\n    val -&gt; ob.value = create('Quantity') as quantity then {\n      val.value as value -&gt; quantity.value = value;\n      val.unit as unit -&gt; quantity.unit = unit;\n    } &quot;quantity&quot;;\n  } &quot;valueQuantity&quot;;\n  obs.value : ST as value -&gt;  ob.value = create('string'),  ob.value = (value.dataString);\n  // Note e commenti\n  obs.entryRelationship as entryRelationship then {\n    entryRelationship.act as act then {\n      act.text as text then {\n        text.reference as reference -&gt; ob.note as note then {\n          reference -&gt; note.text = (reference.value) &quot;reference&quot;;\n        };\n      };\n    } &quot;Act&quot;;\n  };\n  // subject\n  obs.subject as sbj then {\n    sbj.relatedSubject as relatedSubj -&gt; patient.extension as extension2 then ExtSubjectAnimal(relatedSubj, extension2);\n  };\n  // performer\n  obs.performer as performer -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e1.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole' then {\n    performer -&gt;  ob.performer = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n      performer.assignedEntity as entity then {\n        entity.code -&gt; practitionerRole.code;\n        entity -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'PUT',  e2.resource = create('Practitioner') as practitioner then {\n          entity -&gt; practitioner.meta as meta then {\n            entity -&gt; meta.tag = create('Coding') as coding then {\n              entity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              entity -&gt; coding.code = 'ClinicalDocument/body/observation/performer' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          entity.id as id -&gt; practitioner.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext then {\n              entity -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n            } &quot;ext&quot;;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e2.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;performer&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;diverso&quot;;\n          entity.addr -&gt; practitioner.address;\n          entity.telecom -&gt; practitioner.telecom;\n          entity.assignedPerson as person then {\n            person.name -&gt; practitioner.name;\n            person.birthTime as birthTime then {\n              birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n            } &quot;birth&quot;;\n          } &quot;name&quot;;\n          // organization\n          entity.representedOrganization as representedOrganization -&gt;  bundle.entry as e3,  e3.request = create('BackboneElement') as request,  request.method = 'PUT',  e3.resource = create('Organization') as organization then {\n            representedOrganization -&gt; organization.meta as meta then {\n              representedOrganization -&gt; meta.tag = create('Coding') as coding then {\n                representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                representedOrganization -&gt; coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            representedOrganization.id as id -&gt; organization.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext then {\n                representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n              } &quot;ext&quot;;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  organization.id = (r + '-' + ext) as uuid3,  e3.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as referenceOrg,  referenceOrg.reference = append('https://example/Organization/', uuid3) &quot;aut&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            representedOrganization.name as v -&gt; organization.name = (v.other);\n            representedOrganization.telecom -&gt; organization.telecom;\n            representedOrganization.addr -&gt; organization.address;\n            representedOrganization.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e4,  e4.request = create('BackboneElement') as request,  e4.resource = create('Organization') as organization1,  request.method = 'PUT' then {\n              OrgPartOf -&gt; organization1.meta as meta then {\n                OrgPartOf -&gt; meta.tag = create('Coding') as coding then {\n                  OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  OrgPartOf -&gt; coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              OrgPartOf.id as id -&gt; organization1.identifier as identifier then {\n                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                id.extension as ext -&gt; identifier.value = ext then {\n                  OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n                } &quot;ext&quot;;\n                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                id.root as r then {\n                  id.extension as ext -&gt;  organization1.id = (r + '-' + ext) as uuid4,  e4.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id) &quot;org&quot;;\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              OrgPartOf.code -&gt; organization1.type;\n              OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';\n              OrgPartOf.wholeOrganization as wholeOrgan -&gt;  bundle.entry as e5,  e5.request = create('BackboneElement') as request,  request.method = 'PUT',  e5.resource = create('Organization') as organization2 then {\n                wholeOrgan -&gt; organization2.meta as meta then {\n                  wholeOrgan -&gt; meta.tag = create('Coding') as coding then {\n                    wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                    wholeOrgan -&gt; coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization' &quot;code&quot;;\n                  } &quot;coding&quot;;\n                } &quot;meta&quot;;\n                wholeOrgan.id as id -&gt; organization2.identifier as identifier then {\n                  id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                  id.extension as ext -&gt; identifier.value = ext then {\n                    wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n                  } &quot;ext&quot;;\n                  id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                  id.root as r then {\n                    id.extension as ext -&gt;  organization2.id = (r + '-' + ext) as uuid5,  e5.fullUrl = append('https://example/Organization/', uuid5),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id) &quot;org&quot;;\n                  } &quot;r&quot;;\n                } &quot;identifier&quot;;\n                wholeOrgan.name as v -&gt; organization2.name = (v.other);\n                wholeOrgan.telecom -&gt; organization2.telecom;\n                wholeOrgan.addr -&gt; organization2.address;\n              };\n            } &quot;OrgPartOf&quot;;\n          };\n        } &quot;practitioner&quot;;\n      } &quot;entity&quot;;\n    } &quot;practitionerRole&quot;;\n  };\n  // author\n  obs.author as srcAuthor -&gt;  bundle.entry as e6,  e6.request = create('BackboneElement') as request,  request.method = 'POST',  e6.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid6,  e6.fullUrl = append('https://example/PractitionerRole/', uuid6),  request.url = 'PractitionerRole',  ob.performer = create('Reference') as referenceaut,  referenceaut.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n    srcAuthor.assignedAuthor as assignedAuthor then {\n      assignedAuthor.code as codice -&gt; practitionerRole.code as code2 then CECodeableConcept(codice, code2);\n      assignedAuthor -&gt;  bundle.entry as e7,  e7.request = create('BackboneElement') as request,  request.method = 'PUT',  e7.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid7 then {\n        srcAuthor.functionCode -&gt; practitionerRole.code;\n        assignedAuthor -&gt; practitioner.meta as meta then {\n          assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n            assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/observation/author' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            assignedAuthor -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e7.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n          } &quot;r&quot;;\n          assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;diverso&quot;;\n        } &quot;identifier&quot;;\n        assignedAuthor.addr -&gt; practitioner.address;\n        assignedAuthor.telecom -&gt; practitioner.telecom;\n        // person\n        assignedAuthor.assignedPerson as person then {\n          person.name -&gt; practitioner.name;\n          person.birthTime as birthTime then {\n            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n      } &quot;ASSAUth&quot;;\n      // organization\n      assignedAuthor.representedOrganization as representedOrganization -&gt;  bundle.entry as e8,  e8.request = create('BackboneElement') as request,  request.method = 'PUT',  e8.resource = create('Organization') as organization then {\n        representedOrganization -&gt; organization.meta as meta then {\n          representedOrganization -&gt; meta.tag = create('Coding') as coding then {\n            representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            representedOrganization -&gt; coding.code = 'ClinicalDocument/body/observation/author/representedOrganization' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        representedOrganization.id as id -&gt; organization.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  organization.id = (r + '-' + ext) as uuid3,  e8.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as referenceOrg,  referenceOrg.reference = append('https://example/Organization/', uuid3) &quot;org&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        representedOrganization.name as v -&gt; organization.name = (v.other);\n        representedOrganization.telecom -&gt; organization.telecom;\n        representedOrganization.addr -&gt; organization.address;\n        representedOrganization.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e9,  e9.request = create('BackboneElement') as request,  request.method = 'PUT',  e9.resource = create('Organization') as organization1 then {\n          OrgPartOf -&gt; organization1.meta as meta then {\n            OrgPartOf -&gt; meta.tag = create('Coding') as coding then {\n              OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              OrgPartOf -&gt; coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          OrgPartOf.id as id -&gt; organization1.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext then {\n              OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n            } &quot;ext&quot;;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  organization1.id = (r + '-' + ext) as uuid4,  e9.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id) &quot;org&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          OrgPartOf.code -&gt; organization1.type;\n          OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';\n          OrgPartOf.wholeOrganization as wholeOrgan -&gt;  bundle.entry as e10,  e10.request = create('BackboneElement') as request,  request.method = 'PUT',  e10.resource = create('Organization') as organization2 then {\n            wholeOrgan -&gt; organization2.meta as meta then {\n              wholeOrgan -&gt; meta.tag = create('Coding') as coding then {\n                wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                wholeOrgan -&gt; coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            wholeOrgan.id as id -&gt; organization2.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext then {\n                wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n              } &quot;ext&quot;;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  organization2.id = (r + '-' + ext) as uuid4,  e10.fullUrl = append('https://example/Organization/', uuid4),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id) &quot;org&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            wholeOrgan.name as v -&gt; organization2.name = (v.other);\n            wholeOrgan.telecom -&gt; organization2.telecom;\n            wholeOrgan.addr -&gt; organization2.address;\n          };\n        } &quot;OrgPartOf&quot;;\n      };\n      // device\n      assignedAuthor.assignedAuthoringDevice as assignedAuthoringDevice -&gt;  bundle.entry as e11,  e11.request = create('BackboneElement') as request,  request.method = 'POST',  e11.resource = create('Device') as device,  device.id = uuid() as uuid11,  e11.fullUrl = append('https://example/Device/', uuid11),  request.url = 'Device',  tgt.author = create('Reference') as reference,  reference.reference = ('https://example/Device/' + %device.id) then {\n        assignedAuthoringDevice.templateId -&gt; device.identifier;\n        assignedAuthoringDevice.code -&gt; device.type;\n        assignedAuthoringDevice.manufacturerModelName as manufacturerModelName then {\n          manufacturerModelName as m -&gt; device.manufacturer = (m.displayName) &quot;displayRule&quot;;\n        } &quot;manufacturer&quot;;\n        assignedAuthoringDevice.softwareName as softwareName -&gt; device.deviceName as deviceName then {\n          softwareName -&gt; deviceName.type = 'other' &quot;typeName&quot;;\n          softwareName as s -&gt; deviceName.name = (s.displayName) &quot;name&quot;;\n        } &quot;deviceName&quot;;\n      } &quot;Device&quot;;\n    };\n  };\n  // participant person\n  obs.participant as participant where (typeCode != 'DEV') -&gt;  ob.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) then {\n    participant -&gt; encounter.participant as FhirParticipant then {\n      participant as p -&gt; FhirParticipant.type as type then {\n        p -&gt; type.coding as coding then {\n          p -&gt; coding.code = (p.typeCode) &quot;codice&quot;;\n          p -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' &quot;system&quot;;\n        } &quot;codeType&quot;;\n      } &quot;type&quot;;\n    } &quot;fhirParticipant&quot;;\n    participant.participantRole as participantRole -&gt;  bundle.entry as e12,  e12.request = create('BackboneElement') as request,  request.method = 'POST',  e12.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid12,  e12.fullUrl = append('https://example/PractitionerRole/', uuid12),  request.url = 'PractitionerRole',  encounter.participant = create('BackboneElement') as participant1,  participant1.individual = create('Reference') as referencepart,  referencepart.reference = ('https://example/Practitioner/' + %practitionerRole.id) then {\n      // participant.time -&gt; participant1.period;\n      participant.time as time1 -&gt; participant1.period = create('Period') as period then {\n        time1 -&gt; period.start = create('dateTime') as start then TSDateTime(time1, start) &quot;val&quot;;\n      };\n      participant.time as time1 -&gt; participant1.period = create('Period') as period then IVLTSPeriod(time1, period);\n      participant.functionCode -&gt; practitionerRole.code;\n      // non mappa i 2 precedenti\n      participantRole -&gt;  bundle.entry as e13,  e13.request = create('BackboneElement') as request,  request.method = 'PUT',  e13.resource = create('Practitioner') as practitioner then {\n        participantRole -&gt; practitioner.meta as meta then {\n          participantRole -&gt; meta.tag = create('Coding') as coding then {\n            participantRole -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            participantRole -&gt; coding.code = 'ClinicalDocument/body/observation/participant' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        participantRole.id as id -&gt; practitioner.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            participantRole -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid4,  e13.fullUrl = append('https://example/Practitioner/', uuid4),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;org&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        participantRole.code -&gt; practitionerRole.code;\n        participantRole.addr -&gt; practitioner.address;\n        participantRole.telecom -&gt; practitioner.telecom;\n        participantRole.playingEntity as playingEntity then {\n          playingEntity.name -&gt; practitioner.name;\n          playingEntity.birthTime as birthTime then {\n            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n      } &quot;practitioner&quot;;\n    } &quot;partRole&quot;;\n  } &quot;participantEncounter&quot;;\n  // participant device\n  obs.participant as devParticipant where (typeCode = 'DEV') -&gt;  bundle.entry as e14,  e14.request = create('BackboneElement') as request,  request.method = 'POST',  e14.resource = create('Device') as device,  device.id = uuid() as uuid14,  e14.fullUrl = append('https://example/Device/', uuid14),  request.url = 'Device',  ob.device = create('Reference') as reference,  reference.reference = ('https://example/Device/' + %device.id) then {\n    devParticipant.participantRole as participantRoleDev then {\n      participantRoleDev.playingDevice as playingDevice then {\n        playingDevice.code -&gt; device.type;\n        playingDevice.manufacturerModelName as manufacturerModelName then {\n          manufacturerModelName as m -&gt; device.manufacturer = (m.displayName) &quot;displayRule&quot;;\n        } &quot;manufacturer&quot;;\n        playingDevice.softwareName as softwareName -&gt; device.deviceName as deviceName then {\n          softwareName -&gt; deviceName.type = 'other' &quot;typeName&quot;;\n          softwareName as s -&gt; deviceName.name = (s.displayName) &quot;name&quot;;\n        } &quot;deviceName&quot;;\n      };\n    } &quot;participantRoleDev&quot;;\n  } &quot;devParticipant&quot;;\n  // observationMedia\n  obs.entryRelationship as er then {\n    er.observationMedia as obsMedia -&gt;  bundle.entry as e15,  e15.request = create('BackboneElement') as request,  request.method = 'POST',  e15.resource = create('Media') as media1,  media1.id = uuid() as uuid15,  e15.fullUrl = append('https://example/Media/', uuid15),  request.url = 'Media',  ob.derivedFrom = create('Reference') as reference,  reference.reference = ('https://example/Media/' + %media1.id) then {\n      obsMedia -&gt; media1.content = create('Attachment') as Attachment then {\n        obsMedia -&gt; media1.status = 'unknown' &quot;status&quot;;\n        obsMedia.value as valueMedia then {\n          valueMedia.mediaType as type -&gt; Attachment.contentType = type &quot;type&quot;;\n          valueMedia -&gt; Attachment.data = (valueMedia.dataBase64Binary) &quot;data&quot;;\n        } &quot;valuemedia&quot;;\n      } &quot;Attachment&quot;;\n    } &quot;media&quot;;\n  } &quot;observationMedia&quot;;\n  // referenceRange\n  obs.referenceRange as refRange -&gt; ob.referenceRange = create('BackboneElement') as ref then {\n    refRange.observationRange as obsRange then {\n      obsRange.value : ST as value -&gt;  ref.text = create('string'),  ref.text = (value.dataString);\n      obsRange -&gt; ref.low = create('Quantity') as Low then {\n        obsRange.value : IVL_PQ as v then {\n          v.low as l1 then {\n            l1.value as decValue -&gt; Low.value = decValue;\n            l1.unit as Unit -&gt; Low.unit = Unit;\n          } &quot;decValue&quot;;\n          v -&gt; ref.high = create('Quantity') as high then {\n            v.high as h1 then {\n              h1.value as decValue1 -&gt; high.value = decValue1;\n              h1.unit as Unit1 -&gt; high.unit = Unit1;\n            } &quot;decValue&quot;;\n          } &quot;high&quot;;\n        } &quot;IVL-PQ&quot;;\n        obsRange.interpretationCode -&gt; ref.type;\n        obsRange.precondition as precondition then {\n          precondition.criterion as criterion then {\n            criterion.code -&gt; ref.appliesTo &quot;appliesTo&quot;;\n            criterion.value : IVL_PQ as v then {\n              v.high as l1 then {\n                l1 -&gt; ref.age = create('Quantity') as age then {\n                  l1 -&gt; age.high as high then {\n                    l1.value as decValue -&gt; high.value = decValue;\n                    l1.unit as Unit1 -&gt; high.unit = Unit1;\n                  } &quot;high&quot;;\n                } &quot;age&quot;;\n              } &quot;low&quot;;\n            } &quot;v&quot;;\n          };\n        };\n      } &quot;obsRange&quot;;\n    } &quot;refRange&quot;;\n  } &quot;ref&quot;;\n}\n\ngroup Observation2(source obs : Observation, target patient : Patient, target encounter : Encounter, target ob : Observation, target bundle : Bundle, source cda : Act, target specimenp : Specimen) {\n  obs -&gt;  ob.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n  obs -&gt;  ob.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;\n  obs.code -&gt; ob.code;\n  obs.statusCode as statusc where (code = 'completed') -&gt; ob.status = 'final';\n  obs.statusCode as statusc where (code = 'active') -&gt; ob.status = 'registered';\n  obs.statusCode as statusc where (code = 'aborted') -&gt; ob.status = 'cancelled';\n  obs.statusCode as statusc where (code = 'suspended') -&gt; ob.status = 'partial';\n  obs.effectiveTime as effectiveTime -&gt; ob.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;value2&quot;;\n  obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n    obs.effectiveTime as eff -&gt; ob.effective = create('Period') as period then IVLTSPeriod(eff, period);\n  } &quot;where&quot;;\n  obs.interpretationCode -&gt; ob.interpretation;\n  obs.methodCode -&gt; ob.method;\n  obs.value : INT as int -&gt; ob.value = (int.value);\n  obs.value : BL as boolean -&gt; ob.value = (boolean.value) &quot;boolean&quot;;\n  obs.value : CE as val then {\n    val -&gt; ob.value = create('CodeableConcept') as ce then {\n      val.originalText as originalText then {\n        originalText.reference as reference -&gt; ce.text = reference;\n      } &quot;originltext&quot;;\n      val -&gt; ce.coding as coding then {\n        val.code as code -&gt; coding.code = cast(code, 'string');\n        val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        val.displayName as display -&gt; coding.display = cast(display, 'string');\n        val.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n      } &quot;code&quot;;\n      val.translation as translation -&gt; ce.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.value as value -&gt; ce.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    } &quot;coding&quot;;\n  } &quot;val&quot;;\n  obs.value : PQ as val then {\n    val -&gt; ob.value = create('Quantity') as quantity then {\n      val.value as value -&gt; quantity.value = value;\n      val.unit as unit -&gt; quantity.unit = unit;\n    } &quot;quantity&quot;;\n  } &quot;valueQuantity&quot;;\n  obs.value : ST as value -&gt;  ob.value = create('string'),  ob.value = (value.dataString);\n  // Note e commenti\n  obs.entryRelationship as entryRelationship then {\n    entryRelationship.act as act then {\n      act.text as text then {\n        text.reference as reference -&gt; ob.note as note then {\n          reference -&gt; note.text = (reference.value) &quot;reference&quot;;\n        };\n      };\n    } &quot;Act&quot;;\n  };\n  // subject\n  obs.subject as sbj then {\n    sbj.relatedSubject as relatedSubj -&gt; patient.extension as extension2 then ExtSubjectAnimal(relatedSubj, extension2);\n  };\n  cda where cda.entryRelationship.act.exists() then {\n    // specimen\n    obs.specimen as spmn then {\n      spmn.specimenRole as specimenRole then {\n        specimenRole.id as id then {\n          id.extension as extobs then {\n            cda.entryRelationship as entryRelationship then {\n              entryRelationship.act as a then {\n                a.specimen as sp then {\n                  sp.specimenRole as spr then {\n                    spr.id where (extension = extobs) -&gt;  bundle.entry as e4o,  e4o.request = create('BackboneElement') as request,  request.method = 'POST',  e4o.resource = create('Specimen') as specimen,  specimen.id = uuid() as uuid4o,  e4o.fullUrl = append('https://example/Specimen/', uuid4o),  request.url = 'Specimen',  ob.specimen = create('Reference') as reference,  reference.reference = ('https://example/Specimen/' + %specimen.id) then {\n                      spr -&gt;  specimen.parent = create('Reference') as reference,  reference.reference = ('https://example/Specimen/' + %specimenp.id) &quot;reference&quot;;\n                      spr.id -&gt; specimen.identifier;\n                      specimenRole.specimenPlayingEntity as spent then {\n                        spent.code -&gt; specimen.type;\n                      } &quot;ent&quot;;\n                      spr.specimenPlayingEntity as specimenPlayingEntity then {\n                        specimenPlayingEntity.code -&gt; specimen.type;\n                      };\n                      a -&gt; specimen.collection = create('BackboneElement') as collection then {\n                        a.effectiveTime as effectivetime -&gt; collection.collected = create('dateTime') as value then TSDateTime(effectivetime, value) &quot;value&quot;;\n                        a where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n                          a.effectiveTime as eff -&gt; collection.collected = create('Period') as period then IVLTSPeriod(eff, period);\n                        } &quot;where&quot;;\n                        a.participant as participant -&gt;  bundle.entry as e10,  e10.request = create('BackboneElement') as request,  request.method = 'PUT',  e10.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid11,  e10.fullUrl = append('https://example/Practitioner/', uuid11),  collection.collector = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) then {\n                          participant.participantRole as participantRole then {\n                            participantRole -&gt; practitioner.meta as meta then {\n                              participantRole -&gt; meta.tag = create('Coding') as coding then {\n                                participantRole -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                                participantRole -&gt; coding.code = 'ClinicalDocument/body/act/participant' &quot;code&quot;;\n                              } &quot;coding&quot;;\n                            } &quot;meta&quot;;\n                            participantRole.id as id -&gt; practitioner.identifier as identifier then {\n                              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                              id.extension as ext -&gt; identifier.value = ext then {\n                                participantRole -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n                              } &quot;ext&quot;;\n                              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                            } &quot;identifier&quot;;\n                            participantRole.addr -&gt; practitioner.address;\n                            participantRole.playingEntity as playingEntity then {\n                              playingEntity.name -&gt; practitioner.name;\n                            };\n                          };\n                        };\n                      } &quot;collection&quot;;\n                    } &quot;cont&quot;;\n                  } &quot;spr&quot;;\n                } &quot;sp&quot;;\n              } &quot;a&quot;;\n            } &quot;en&quot;;\n          } &quot;extobs&quot;;\n        };\n      };\n    };\n  } &quot;conditionactexists&quot;;\n  cda where cda.entryRelationship.act.exists().not() and (obs.specimen.specimenRole.specimenPlayingEntity.code.code != specimenp.type.coding.code) then {\n    obs.specimen as spmn -&gt;  bundle.entry as e4o,  e4o.request = create('BackboneElement') as request,  request.method = 'POST',  e4o.resource = create('Specimen') as specimen,  specimen.id = uuid() as uuid4o,  e4o.fullUrl = append('https://example/Specimen/', uuid4o),  request.url = 'Specimen',  ob.specimen = create('Reference') as reference,  reference.reference = ('https://example/Specimen/' + %specimen.id) then {\n      spmn.specimenRole as specimenRole then {\n        specimenRole.id -&gt; specimen.identifier;\n        specimenRole.specimenPlayingEntity as specimenPlayingEntity then {\n          specimenPlayingEntity.code -&gt; specimen.type;\n        };\n      };\n    };\n  } &quot;wherenotexists&quot;;\n  // performer\n  obs.performer as performer -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e1.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole' then {\n    performer -&gt;  ob.performer = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n      performer.assignedEntity as entity then {\n        entity.code -&gt; practitionerRole.code;\n        entity -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'PUT',  e2.resource = create('Practitioner') as practitioner then {\n          entity -&gt; practitioner.meta as meta then {\n            entity -&gt; meta.tag = create('Coding') as coding then {\n              entity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              entity -&gt; coding.code = 'ClinicalDocument/body/observation/performer' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          entity.id as id -&gt; practitioner.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext then {\n              entity -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n            } &quot;ext&quot;;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e2.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;performer&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;diverso&quot;;\n          entity.addr -&gt; practitioner.address;\n          entity.telecom -&gt; practitioner.telecom;\n          entity.assignedPerson as person then {\n            person.name -&gt; practitioner.name;\n            person.birthTime as birthTime then {\n              birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n            } &quot;birth&quot;;\n          } &quot;name&quot;;\n          // organization\n          entity.representedOrganization as representedOrganization -&gt;  bundle.entry as e3,  e3.request = create('BackboneElement') as request,  request.method = 'PUT',  e3.resource = create('Organization') as organization then {\n            representedOrganization -&gt; organization.meta as meta then {\n              representedOrganization -&gt; meta.tag = create('Coding') as coding then {\n                representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                representedOrganization -&gt; coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            representedOrganization.id as id -&gt; organization.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext then {\n                representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n              } &quot;ext&quot;;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  organization.id = (r + '-' + ext) as uuid3,  e3.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as referenceOrg,  referenceOrg.reference = append('https://example/Organization/', uuid3) &quot;aut&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            representedOrganization.name as v -&gt; organization.name = (v.other);\n            representedOrganization.telecom -&gt; organization.telecom;\n            representedOrganization.addr -&gt; organization.address;\n            representedOrganization.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e4,  e4.request = create('BackboneElement') as request,  e4.resource = create('Organization') as organization1,  request.method = 'PUT' then {\n              OrgPartOf -&gt; organization1.meta as meta then {\n                OrgPartOf -&gt; meta.tag = create('Coding') as coding then {\n                  OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  OrgPartOf -&gt; coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              OrgPartOf.id as id -&gt; organization1.identifier as identifier then {\n                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                id.extension as ext -&gt; identifier.value = ext then {\n                  OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n                } &quot;ext&quot;;\n                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                id.root as r then {\n                  id.extension as ext -&gt;  organization1.id = (r + '-' + ext) as uuid4,  e4.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id) &quot;org&quot;;\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              OrgPartOf.code -&gt; organization1.type;\n              OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';\n              OrgPartOf.wholeOrganization as wholeOrgan -&gt;  bundle.entry as e5,  e5.request = create('BackboneElement') as request,  request.method = 'PUT',  e5.resource = create('Organization') as organization2 then {\n                wholeOrgan -&gt; organization2.meta as meta then {\n                  wholeOrgan -&gt; meta.tag = create('Coding') as coding then {\n                    wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                    wholeOrgan -&gt; coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization' &quot;code&quot;;\n                  } &quot;coding&quot;;\n                } &quot;meta&quot;;\n                wholeOrgan.id as id -&gt; organization2.identifier as identifier then {\n                  id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                  id.extension as ext -&gt; identifier.value = ext then {\n                    wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n                  } &quot;ext&quot;;\n                  id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                  id.root as r then {\n                    id.extension as ext -&gt;  organization2.id = (r + '-' + ext) as uuid5,  e5.fullUrl = append('https://example/Organization/', uuid5),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id) &quot;org&quot;;\n                  } &quot;r&quot;;\n                } &quot;identifier&quot;;\n                wholeOrgan.name as v -&gt; organization2.name = (v.other);\n                wholeOrgan.telecom -&gt; organization2.telecom;\n                wholeOrgan.addr -&gt; organization2.address;\n              };\n            } &quot;OrgPartOf&quot;;\n          };\n        } &quot;practitioner&quot;;\n      } &quot;entity&quot;;\n    } &quot;practitionerRole&quot;;\n  };\n  // author\n  obs.author as srcAuthor -&gt;  bundle.entry as e6,  e6.request = create('BackboneElement') as request,  request.method = 'POST',  e6.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid6,  e6.fullUrl = append('https://example/PractitionerRole/', uuid6),  request.url = 'PractitionerRole',  ob.performer = create('Reference') as referenceaut,  referenceaut.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n    srcAuthor.assignedAuthor as assignedAuthor then {\n      assignedAuthor.code as codice -&gt; practitionerRole.code as code2 then CECodeableConcept(codice, code2);\n      assignedAuthor -&gt;  bundle.entry as e7,  e7.request = create('BackboneElement') as request,  request.method = 'PUT',  e7.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid7 then {\n        srcAuthor.functionCode -&gt; practitionerRole.code;\n        assignedAuthor -&gt; practitioner.meta as meta then {\n          assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n            assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/observation/author' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            assignedAuthor -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e7.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n          } &quot;r&quot;;\n          assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;diverso&quot;;\n        } &quot;identifier&quot;;\n        assignedAuthor.addr -&gt; practitioner.address;\n        assignedAuthor.telecom -&gt; practitioner.telecom;\n        // person\n        assignedAuthor.assignedPerson as person then {\n          person.name -&gt; practitioner.name;\n          person.birthTime as birthTime then {\n            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n      } &quot;ASSAUth&quot;;\n      // organization\n      assignedAuthor.representedOrganization as representedOrganization -&gt;  bundle.entry as e8,  e8.request = create('BackboneElement') as request,  request.method = 'PUT',  e8.resource = create('Organization') as organization then {\n        representedOrganization -&gt; organization.meta as meta then {\n          representedOrganization -&gt; meta.tag = create('Coding') as coding then {\n            representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            representedOrganization -&gt; coding.code = 'ClinicalDocument/body/observation/author/representedOrganization' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        representedOrganization.id as id -&gt; organization.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  organization.id = (r + '-' + ext) as uuid3,  e8.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as referenceOrg,  referenceOrg.reference = append('https://example/Organization/', uuid3) &quot;org&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        representedOrganization.name as v -&gt; organization.name = (v.other);\n        representedOrganization.telecom -&gt; organization.telecom;\n        representedOrganization.addr -&gt; organization.address;\n        representedOrganization.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e9,  e9.request = create('BackboneElement') as request,  request.method = 'PUT',  e9.resource = create('Organization') as organization1 then {\n          OrgPartOf -&gt; organization1.meta as meta then {\n            OrgPartOf -&gt; meta.tag = create('Coding') as coding then {\n              OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              OrgPartOf -&gt; coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          OrgPartOf.id as id -&gt; organization1.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext then {\n              OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n            } &quot;ext&quot;;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  organization1.id = (r + '-' + ext) as uuid4,  e9.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id) &quot;org&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          OrgPartOf.code -&gt; organization1.type;\n          OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';\n          OrgPartOf.wholeOrganization as wholeOrgan -&gt;  bundle.entry as e10,  e10.request = create('BackboneElement') as request,  request.method = 'PUT',  e10.resource = create('Organization') as organization2 then {\n            wholeOrgan -&gt; organization2.meta as meta then {\n              wholeOrgan -&gt; meta.tag = create('Coding') as coding then {\n                wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                wholeOrgan -&gt; coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            wholeOrgan.id as id -&gt; organization2.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext then {\n                wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n              } &quot;ext&quot;;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  organization2.id = (r + '-' + ext) as uuid4,  e10.fullUrl = append('https://example/Organization/', uuid4),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id) &quot;org&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            wholeOrgan.name as v -&gt; organization2.name = (v.other);\n            wholeOrgan.telecom -&gt; organization2.telecom;\n            wholeOrgan.addr -&gt; organization2.address;\n          };\n        } &quot;OrgPartOf&quot;;\n      };\n      // device\n      assignedAuthor.assignedAuthoringDevice as assignedAuthoringDevice -&gt;  bundle.entry as e11,  e11.request = create('BackboneElement') as request,  request.method = 'POST',  e11.resource = create('Device') as device,  device.id = uuid() as uuid11,  e11.fullUrl = append('https://example/Device/', uuid11),  request.url = 'Device',  tgt.author = create('Reference') as reference,  reference.reference = ('https://example/Device/' + %device.id) then {\n        assignedAuthoringDevice.templateId -&gt; device.identifier;\n        assignedAuthoringDevice.code -&gt; device.type;\n        assignedAuthoringDevice.manufacturerModelName as manufacturerModelName then {\n          manufacturerModelName as m -&gt; device.manufacturer = (m.displayName) &quot;displayRule&quot;;\n        } &quot;manufacturer&quot;;\n        assignedAuthoringDevice.softwareName as softwareName -&gt; device.deviceName as deviceName then {\n          softwareName -&gt; deviceName.type = 'other' &quot;typeName&quot;;\n          softwareName as s -&gt; deviceName.name = (s.displayName) &quot;name&quot;;\n        } &quot;deviceName&quot;;\n      } &quot;Device&quot;;\n    };\n  };\n  // participant person\n  obs.participant as participant where (typeCode != 'DEV') -&gt;  ob.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) then {\n    participant -&gt; encounter.participant as FhirParticipant then {\n      participant as p -&gt; FhirParticipant.type as type then {\n        p -&gt; type.coding as coding then {\n          p -&gt; coding.code = (p.typeCode) &quot;codice&quot;;\n          p -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' &quot;system&quot;;\n        } &quot;codeType&quot;;\n      } &quot;type&quot;;\n    } &quot;fhirParticipant&quot;;\n    participant.participantRole as participantRole -&gt;  bundle.entry as e12,  e12.request = create('BackboneElement') as request,  request.method = 'POST',  e12.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid12,  e12.fullUrl = append('https://example/PractitionerRole/', uuid12),  request.url = 'PractitionerRole',  encounter.participant = create('BackboneElement') as participant1,  participant1.individual = create('Reference') as referencepart,  referencepart.reference = ('https://example/Practitioner/' + %practitionerRole.id) then {\n      // participant.time -&gt; participant1.period;\n      participant.time as time1 -&gt; participant1.period = create('Period') as period then {\n        time1 -&gt; period.start = create('dateTime') as start then TSDateTime(time1, start) &quot;val&quot;;\n      };\n      participant.time as time1 -&gt; participant1.period = create('Period') as period then IVLTSPeriod(time1, period);\n      participant.functionCode -&gt; practitionerRole.code;\n      // non mappa i 2 precedenti\n      participantRole -&gt;  bundle.entry as e13,  e13.request = create('BackboneElement') as request,  request.method = 'PUT',  e13.resource = create('Practitioner') as practitioner then {\n        participantRole -&gt; practitioner.meta as meta then {\n          participantRole -&gt; meta.tag = create('Coding') as coding then {\n            participantRole -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            participantRole -&gt; coding.code = 'ClinicalDocument/body/observation/participant' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        participantRole.id as id -&gt; practitioner.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            participantRole -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid4,  e13.fullUrl = append('https://example/Practitioner/', uuid4),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;org&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        participantRole.code -&gt; practitionerRole.code;\n        participantRole.addr -&gt; practitioner.address;\n        participantRole.telecom -&gt; practitioner.telecom;\n        participantRole.playingEntity as playingEntity then {\n          playingEntity.name -&gt; practitioner.name;\n          playingEntity.birthTime as birthTime then {\n            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n      } &quot;practitioner&quot;;\n    } &quot;partRole&quot;;\n  } &quot;participantEncounter&quot;;\n  // participant device\n  obs.participant as devParticipant where (typeCode = 'DEV') -&gt;  bundle.entry as e14,  e14.request = create('BackboneElement') as request,  request.method = 'POST',  e14.resource = create('Device') as device,  device.id = uuid() as uuid14,  e14.fullUrl = append('https://example/Device/', uuid14),  request.url = 'Device',  ob.device = create('Reference') as reference,  reference.reference = ('https://example/Device/' + %device.id) then {\n    devParticipant.participantRole as participantRoleDev then {\n      participantRoleDev.playingDevice as playingDevice then {\n        playingDevice.code -&gt; device.type;\n        playingDevice.manufacturerModelName as manufacturerModelName then {\n          manufacturerModelName as m -&gt; device.manufacturer = (m.displayName) &quot;displayRule&quot;;\n        } &quot;manufacturer&quot;;\n        playingDevice.softwareName as softwareName -&gt; device.deviceName as deviceName then {\n          softwareName -&gt; deviceName.type = 'other' &quot;typeName&quot;;\n          softwareName as s -&gt; deviceName.name = (s.displayName) &quot;name&quot;;\n        } &quot;deviceName&quot;;\n      };\n    } &quot;participantRoleDev&quot;;\n  } &quot;devParticipant&quot;;\n  // observationMedia\n  obs.entryRelationship as er then {\n    er.observationMedia as obsMedia -&gt;  bundle.entry as e15,  e15.request = create('BackboneElement') as request,  request.method = 'POST',  e15.resource = create('Media') as media1,  media1.id = uuid() as uuid15,  e15.fullUrl = append('https://example/Media/', uuid15),  request.url = 'Media',  ob.derivedFrom = create('Reference') as reference,  reference.reference = ('https://example/Media/' + %media1.id) then {\n      obsMedia -&gt; media1.content = create('Attachment') as Attachment then {\n        obsMedia -&gt; media1.status = 'unknown' &quot;status&quot;;\n        obsMedia.value as valueMedia then {\n          valueMedia.mediaType as type -&gt; Attachment.contentType = type &quot;type&quot;;\n          valueMedia -&gt; Attachment.data = (valueMedia.dataBase64Binary) &quot;data&quot;;\n        } &quot;valuemedia&quot;;\n      } &quot;Attachment&quot;;\n    } &quot;media&quot;;\n  } &quot;observationMedia&quot;;\n  // referenceRange\n  obs.referenceRange as refRange -&gt; ob.referenceRange = create('BackboneElement') as ref then {\n    refRange.observationRange as obsRange then {\n      obsRange.value : ST as value -&gt;  ref.text = create('string'),  ref.text = (value.dataString);\n      obsRange -&gt; ref.low = create('Quantity') as Low then {\n        obsRange.value : IVL_PQ as v then {\n          v.low as l1 then {\n            l1.value as decValue -&gt; Low.value = decValue;\n            l1.unit as Unit -&gt; Low.unit = Unit;\n          } &quot;decValue&quot;;\n          v -&gt; ref.high = create('Quantity') as high then {\n            v.high as h1 then {\n              h1.value as decValue1 -&gt; high.value = decValue1;\n              h1.unit as Unit1 -&gt; high.unit = Unit1;\n            } &quot;decValue&quot;;\n          } &quot;high&quot;;\n        } &quot;IVL-PQ&quot;;\n        obsRange.interpretationCode -&gt; ref.type;\n        obsRange.precondition as precondition then {\n          precondition.criterion as criterion then {\n            criterion.code -&gt; ref.appliesTo &quot;appliesTo&quot;;\n            criterion.value : IVL_PQ as v then {\n              v.high as l1 then {\n                l1 -&gt; ref.age = create('Quantity') as age then {\n                  l1 -&gt; age.high as high then {\n                    l1.value as decValue -&gt; high.value = decValue;\n                    l1.unit as Unit1 -&gt; high.unit = Unit1;\n                  } &quot;high&quot;;\n                } &quot;age&quot;;\n              } &quot;low&quot;;\n            } &quot;v&quot;;\n          };\n        };\n      } &quot;obsRange&quot;;\n    } &quot;refRange&quot;;\n  } &quot;ref&quot;;\n}\n\ngroup Observation3(source obs : Observation, target patient : Patient, target encounter : Encounter, target ob : Observation, target bundle : Bundle, source cda : Act) {\n  obs -&gt;  ob.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n  obs -&gt;  ob.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;\n  obs.code -&gt; ob.code;\n  obs.statusCode as statusc where (code = 'completed') -&gt; ob.status = 'final';\n  obs.statusCode as statusc where (code = 'active') -&gt; ob.status = 'registered';\n  obs.statusCode as statusc where (code = 'aborted') -&gt; ob.status = 'cancelled';\n  obs.statusCode as statusc where (code = 'suspended') -&gt; ob.status = 'partial';\n  obs.effectiveTime as effectiveTime -&gt; ob.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;value2&quot;;\n  obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n    obs.effectiveTime as eff -&gt; ob.effective = create('Period') as period then IVLTSPeriod(eff, period);\n  } &quot;where&quot;;\n  obs.interpretationCode -&gt; ob.interpretation;\n  obs.methodCode -&gt; ob.method;\n  obs.value : INT as int -&gt; ob.value = (int.value);\n  obs.value : BL as boolean -&gt; ob.value = (boolean.value) &quot;boolean&quot;;\n  obs.value : CE as val then {\n    val -&gt; ob.value = create('CodeableConcept') as ce then {\n      val.originalText as originalText then {\n        originalText.reference as reference -&gt; ce.text = reference;\n      } &quot;originltext&quot;;\n      val -&gt; ce.coding as coding then {\n        val.code as code -&gt; coding.code = cast(code, 'string');\n        val.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n        val.displayName as display -&gt; coding.display = cast(display, 'string');\n        val.codeSystemVersion as version -&gt; coding.version = cast(version, 'string');\n      } &quot;code&quot;;\n      val.translation as translation -&gt; ce.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.value as value -&gt; ce.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    } &quot;coding&quot;;\n  } &quot;val&quot;;\n  obs.value : PQ as val then {\n    val -&gt; ob.value = create('Quantity') as quantity then {\n      val.value as value -&gt; quantity.value = value;\n      val.unit as unit -&gt; quantity.unit = unit;\n    } &quot;quantity&quot;;\n  } &quot;valueQuantity&quot;;\n  obs.value : ST as value -&gt;  ob.value = create('string'),  ob.value = (value.dataString);\n  // Note e commenti\n  obs.entryRelationship as entryRelationship then {\n    entryRelationship.act as act then {\n      act.text as text then {\n        text.reference as reference -&gt; ob.note as note then {\n          reference -&gt; note.text = (reference.value) &quot;reference&quot;;\n        };\n      };\n    } &quot;Act&quot;;\n  };\n  // subject\n  obs.subject as sbj then {\n    sbj.relatedSubject as relatedSubj -&gt; patient.extension as extension2 then ExtSubjectAnimal(relatedSubj, extension2);\n  };\n  // specimen\n  obs.specimen as spmn -&gt;  bundle.entry as e4o,  e4o.request = create('BackboneElement') as request,  request.method = 'POST',  e4o.resource = create('Specimen') as specimen,  specimen.id = uuid() as uuid4o,  e4o.fullUrl = append('https://example/Specimen/', uuid4o),  request.url = 'Specimen',  ob.specimen = create('Reference') as reference,  reference.reference = ('https://example/Specimen/' + %specimen.id) then {\n    spmn.specimenRole as specimenRole then {\n      specimenRole.id as id -&gt; specimen.identifier;\n      specimenRole.specimenPlayingEntity as specimenPlayingEntity then {\n        specimenPlayingEntity.code -&gt; specimen.type;\n      };\n    };\n  };\n  // performer\n  obs.performer as performer -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e1.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole' then {\n    performer -&gt;  ob.performer = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n      performer.assignedEntity as entity then {\n        entity.code -&gt; practitionerRole.code;\n        entity -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'PUT',  e2.resource = create('Practitioner') as practitioner then {\n          entity -&gt; practitioner.meta as meta then {\n            entity -&gt; meta.tag = create('Coding') as coding then {\n              entity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              entity -&gt; coding.code = 'ClinicalDocument/body/observation/performer' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          entity.id as id -&gt; practitioner.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext then {\n              entity -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n            } &quot;ext&quot;;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e2.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;performer&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;diverso&quot;;\n          entity.addr -&gt; practitioner.address;\n          entity.telecom -&gt; practitioner.telecom;\n          entity.assignedPerson as person then {\n            person.name -&gt; practitioner.name;\n            person.birthTime as birthTime then {\n              birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n            } &quot;birth&quot;;\n          } &quot;name&quot;;\n          // organization\n          entity.representedOrganization as representedOrganization -&gt;  bundle.entry as e3,  e3.request = create('BackboneElement') as request,  request.method = 'PUT',  e3.resource = create('Organization') as organization then {\n            representedOrganization -&gt; organization.meta as meta then {\n              representedOrganization -&gt; meta.tag = create('Coding') as coding then {\n                representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                representedOrganization -&gt; coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            representedOrganization.id as id -&gt; organization.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext then {\n                representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n              } &quot;ext&quot;;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  organization.id = (r + '-' + ext) as uuid3,  e3.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as referenceOrg,  referenceOrg.reference = append('https://example/Organization/', uuid3) &quot;aut&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            representedOrganization.name as v -&gt; organization.name = (v.other);\n            representedOrganization.telecom -&gt; organization.telecom;\n            representedOrganization.addr -&gt; organization.address;\n            representedOrganization.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e4,  e4.request = create('BackboneElement') as request,  e4.resource = create('Organization') as organization1,  request.method = 'PUT' then {\n              OrgPartOf -&gt; organization1.meta as meta then {\n                OrgPartOf -&gt; meta.tag = create('Coding') as coding then {\n                  OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  OrgPartOf -&gt; coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              OrgPartOf.id as id -&gt; organization1.identifier as identifier then {\n                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                id.extension as ext -&gt; identifier.value = ext then {\n                  OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n                } &quot;ext&quot;;\n                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                id.root as r then {\n                  id.extension as ext -&gt;  organization1.id = (r + '-' + ext) as uuid4,  e4.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id) &quot;org&quot;;\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              OrgPartOf.code -&gt; organization1.type;\n              OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';\n              OrgPartOf.wholeOrganization as wholeOrgan -&gt;  bundle.entry as e5,  e5.request = create('BackboneElement') as request,  request.method = 'PUT',  e5.resource = create('Organization') as organization2 then {\n                wholeOrgan -&gt; organization2.meta as meta then {\n                  wholeOrgan -&gt; meta.tag = create('Coding') as coding then {\n                    wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                    wholeOrgan -&gt; coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization' &quot;code&quot;;\n                  } &quot;coding&quot;;\n                } &quot;meta&quot;;\n                wholeOrgan.id as id -&gt; organization2.identifier as identifier then {\n                  id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                  id.extension as ext -&gt; identifier.value = ext then {\n                    wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n                  } &quot;ext&quot;;\n                  id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                  id.root as r then {\n                    id.extension as ext -&gt;  organization2.id = (r + '-' + ext) as uuid5,  e5.fullUrl = append('https://example/Organization/', uuid5),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id) &quot;org&quot;;\n                  } &quot;r&quot;;\n                } &quot;identifier&quot;;\n                wholeOrgan.name as v -&gt; organization2.name = (v.other);\n                wholeOrgan.telecom -&gt; organization2.telecom;\n                wholeOrgan.addr -&gt; organization2.address;\n              };\n            } &quot;OrgPartOf&quot;;\n          };\n        } &quot;practitioner&quot;;\n      } &quot;entity&quot;;\n    } &quot;practitionerRole&quot;;\n  };\n  // author\n  obs.author as srcAuthor -&gt;  bundle.entry as e6,  e6.request = create('BackboneElement') as request,  request.method = 'POST',  e6.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid6,  e6.fullUrl = append('https://example/PractitionerRole/', uuid6),  request.url = 'PractitionerRole',  ob.performer = create('Reference') as referenceaut,  referenceaut.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n    srcAuthor.assignedAuthor as assignedAuthor then {\n      assignedAuthor.code as codice -&gt; practitionerRole.code as code2 then CECodeableConcept(codice, code2);\n      assignedAuthor -&gt;  bundle.entry as e7,  e7.request = create('BackboneElement') as request,  request.method = 'PUT',  e7.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid7 then {\n        srcAuthor.functionCode -&gt; practitionerRole.code;\n        assignedAuthor -&gt; practitioner.meta as meta then {\n          assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n            assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/observation/author' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            assignedAuthor -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e7.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n          } &quot;r&quot;;\n          assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;diverso&quot;;\n        } &quot;identifier&quot;;\n        assignedAuthor.addr -&gt; practitioner.address;\n        assignedAuthor.telecom -&gt; practitioner.telecom;\n        // person\n        assignedAuthor.assignedPerson as person then {\n          person.name -&gt; practitioner.name;\n          person.birthTime as birthTime then {\n            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n      } &quot;ASSAUth&quot;;\n      // organization\n      assignedAuthor.representedOrganization as representedOrganization -&gt;  bundle.entry as e8,  e8.request = create('BackboneElement') as request,  request.method = 'PUT',  e8.resource = create('Organization') as organization then {\n        representedOrganization -&gt; organization.meta as meta then {\n          representedOrganization -&gt; meta.tag = create('Coding') as coding then {\n            representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            representedOrganization -&gt; coding.code = 'ClinicalDocument/body/observation/author/representedOrganization' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        representedOrganization.id as id -&gt; organization.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  organization.id = (r + '-' + ext) as uuid3,  e8.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as referenceOrg,  referenceOrg.reference = append('https://example/Organization/', uuid3) &quot;org&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        representedOrganization.name as v -&gt; organization.name = (v.other);\n        representedOrganization.telecom -&gt; organization.telecom;\n        representedOrganization.addr -&gt; organization.address;\n        representedOrganization.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e9,  e9.request = create('BackboneElement') as request,  request.method = 'PUT',  e9.resource = create('Organization') as organization1 then {\n          OrgPartOf -&gt; organization1.meta as meta then {\n            OrgPartOf -&gt; meta.tag = create('Coding') as coding then {\n              OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              OrgPartOf -&gt; coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          OrgPartOf.id as id -&gt; organization1.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext then {\n              OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n            } &quot;ext&quot;;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  organization1.id = (r + '-' + ext) as uuid4,  e9.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id) &quot;org&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          OrgPartOf.code -&gt; organization1.type;\n          OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';\n          OrgPartOf.wholeOrganization as wholeOrgan -&gt;  bundle.entry as e10,  e10.request = create('BackboneElement') as request,  request.method = 'PUT',  e10.resource = create('Organization') as organization2 then {\n            wholeOrgan -&gt; organization2.meta as meta then {\n              wholeOrgan -&gt; meta.tag = create('Coding') as coding then {\n                wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                wholeOrgan -&gt; coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            wholeOrgan.id as id -&gt; organization2.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext then {\n                wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n              } &quot;ext&quot;;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  organization2.id = (r + '-' + ext) as uuid4,  e10.fullUrl = append('https://example/Organization/', uuid4),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id) &quot;org&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            wholeOrgan.name as v -&gt; organization2.name = (v.other);\n            wholeOrgan.telecom -&gt; organization2.telecom;\n            wholeOrgan.addr -&gt; organization2.address;\n          };\n        } &quot;OrgPartOf&quot;;\n      };\n      // device\n      assignedAuthor.assignedAuthoringDevice as assignedAuthoringDevice -&gt;  bundle.entry as e11,  e11.request = create('BackboneElement') as request,  request.method = 'POST',  e11.resource = create('Device') as device,  device.id = uuid() as uuid11,  e11.fullUrl = append('https://example/Device/', uuid11),  request.url = 'Device',  tgt.author = create('Reference') as reference,  reference.reference = ('https://example/Device/' + %device.id) then {\n        assignedAuthoringDevice.templateId -&gt; device.identifier;\n        assignedAuthoringDevice.code -&gt; device.type;\n        assignedAuthoringDevice.manufacturerModelName as manufacturerModelName then {\n          manufacturerModelName as m -&gt; device.manufacturer = (m.displayName) &quot;displayRule&quot;;\n        } &quot;manufacturer&quot;;\n        assignedAuthoringDevice.softwareName as softwareName -&gt; device.deviceName as deviceName then {\n          softwareName -&gt; deviceName.type = 'other' &quot;typeName&quot;;\n          softwareName as s -&gt; deviceName.name = (s.displayName) &quot;name&quot;;\n        } &quot;deviceName&quot;;\n      } &quot;Device&quot;;\n    };\n  };\n  // participant person\n  obs.participant as participant where (typeCode != 'DEV') -&gt;  ob.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) then {\n    participant -&gt; encounter.participant as FhirParticipant then {\n      participant as p -&gt; FhirParticipant.type as type then {\n        p -&gt; type.coding as coding then {\n          p -&gt; coding.code = (p.typeCode) &quot;codice&quot;;\n          p -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' &quot;system&quot;;\n        } &quot;codeType&quot;;\n      } &quot;type&quot;;\n    } &quot;fhirParticipant&quot;;\n    participant.participantRole as participantRole -&gt;  bundle.entry as e12,  e12.request = create('BackboneElement') as request,  request.method = 'POST',  e12.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid12,  e12.fullUrl = append('https://example/PractitionerRole/', uuid12),  request.url = 'PractitionerRole',  encounter.participant = create('BackboneElement') as participant1,  participant1.individual = create('Reference') as referencepart,  referencepart.reference = ('https://example/Practitioner/' + %practitionerRole.id) then {\n      // participant.time -&gt; participant1.period;\n      participant.time as time1 -&gt; participant1.period = create('Period') as period then {\n        time1 -&gt; period.start = create('dateTime') as start then TSDateTime(time1, start) &quot;val&quot;;\n      };\n      participant.time as time1 -&gt; participant1.period = create('Period') as period then IVLTSPeriod(time1, period);\n      participant.functionCode -&gt; practitionerRole.code;\n      // non mappa i 2 precedenti\n      participantRole -&gt;  bundle.entry as e13,  e13.request = create('BackboneElement') as request,  request.method = 'PUT',  e13.resource = create('Practitioner') as practitioner then {\n        participantRole -&gt; practitioner.meta as meta then {\n          participantRole -&gt; meta.tag = create('Coding') as coding then {\n            participantRole -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            participantRole -&gt; coding.code = 'ClinicalDocument/body/observation/participant' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        participantRole.id as id -&gt; practitioner.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            participantRole -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid4,  e13.fullUrl = append('https://example/Practitioner/', uuid4),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;org&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        participantRole.code -&gt; practitionerRole.code;\n        participantRole.addr -&gt; practitioner.address;\n        participantRole.telecom -&gt; practitioner.telecom;\n        participantRole.playingEntity as playingEntity then {\n          playingEntity.name -&gt; practitioner.name;\n          playingEntity.birthTime as birthTime then {\n            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n      } &quot;practitioner&quot;;\n    } &quot;partRole&quot;;\n  } &quot;participantEncounter&quot;;\n  // participant device\n  obs.participant as devParticipant where (typeCode = 'DEV') -&gt;  bundle.entry as e14,  e14.request = create('BackboneElement') as request,  request.method = 'POST',  e14.resource = create('Device') as device,  device.id = uuid() as uuid14,  e14.fullUrl = append('https://example/Device/', uuid14),  request.url = 'Device',  ob.device = create('Reference') as reference,  reference.reference = ('https://example/Device/' + %device.id) then {\n    devParticipant.participantRole as participantRoleDev then {\n      participantRoleDev.playingDevice as playingDevice then {\n        playingDevice.code -&gt; device.type;\n        playingDevice.manufacturerModelName as manufacturerModelName then {\n          manufacturerModelName as m -&gt; device.manufacturer = (m.displayName) &quot;displayRule&quot;;\n        } &quot;manufacturer&quot;;\n        playingDevice.softwareName as softwareName -&gt; device.deviceName as deviceName then {\n          softwareName -&gt; deviceName.type = 'other' &quot;typeName&quot;;\n          softwareName as s -&gt; deviceName.name = (s.displayName) &quot;name&quot;;\n        } &quot;deviceName&quot;;\n      };\n    } &quot;participantRoleDev&quot;;\n  } &quot;devParticipant&quot;;\n  // observationMedia\n  obs.entryRelationship as er then {\n    er.observationMedia as obsMedia -&gt;  bundle.entry as e15,  e15.request = create('BackboneElement') as request,  request.method = 'POST',  e15.resource = create('Media') as media1,  media1.id = uuid() as uuid15,  e15.fullUrl = append('https://example/Media/', uuid15),  request.url = 'Media',  ob.derivedFrom = create('Reference') as reference,  reference.reference = ('https://example/Media/' + %media1.id) then {\n      obsMedia -&gt; media1.content = create('Attachment') as Attachment then {\n        obsMedia -&gt; media1.status = 'unknown' &quot;status&quot;;\n        obsMedia.value as valueMedia then {\n          valueMedia.mediaType as type -&gt; Attachment.contentType = type &quot;type&quot;;\n          valueMedia -&gt; Attachment.data = (valueMedia.dataBase64Binary) &quot;data&quot;;\n        } &quot;valuemedia&quot;;\n      } &quot;Attachment&quot;;\n    } &quot;media&quot;;\n  } &quot;observationMedia&quot;;\n  // referenceRange\n  obs.referenceRange as refRange -&gt; ob.referenceRange = create('BackboneElement') as ref then {\n    refRange.observationRange as obsRange then {\n      obsRange.value : ST as value -&gt;  ref.text = create('string'),  ref.text = (value.dataString);\n      obsRange -&gt; ref.low = create('Quantity') as Low then {\n        obsRange.value : IVL_PQ as v then {\n          v.low as l1 then {\n            l1.value as decValue -&gt; Low.value = decValue;\n            l1.unit as Unit -&gt; Low.unit = Unit;\n          } &quot;decValue&quot;;\n          v -&gt; ref.high = create('Quantity') as high then {\n            v.high as h1 then {\n              h1.value as decValue1 -&gt; high.value = decValue1;\n              h1.unit as Unit1 -&gt; high.unit = Unit1;\n            } &quot;decValue&quot;;\n          } &quot;high&quot;;\n        } &quot;IVLPQ&quot;;\n        obsRange.interpretationCode -&gt; ref.type;\n        obsRange.precondition as precondition then {\n          precondition.criterion as criterion then {\n            criterion.code -&gt; ref.appliesTo &quot;appliesTo&quot;;\n            criterion.value : IVL_PQ as v then {\n              v.high as l1 then {\n                l1 -&gt; ref.age = create('Quantity') as age then {\n                  l1 -&gt; age.high as high then {\n                    l1.value as decValue -&gt; high.value = decValue;\n                    l1.unit as Unit1 -&gt; high.unit = Unit1;\n                  } &quot;high&quot;;\n                } &quot;age&quot;;\n              } &quot;low&quot;;\n            } &quot;v&quot;;\n          };\n        };\n      } &quot;obsRange&quot;;\n    } &quot;refRange&quot;;\n  } &quot;ref&quot;;\n}\n\ngroup Act(source cda : Act, target pat : Patient, target ac : DiagnosticReport, target enc : Encounter, target bundle : Bundle) {\n  cda.code -&gt; ac.code;\n  cda where cda.statusCode.exists().not() then {\n    cda -&gt; ac.status = 'final' &quot;statuscode&quot;;\n  } &quot;status&quot;;\n  cda.statusCode as statusc where (code = 'completed') -&gt; ac.status = 'final';\n  cda.statusCode as statusc where (code = 'active') -&gt; ac.status = 'registered';\n  cda.statusCode as statusc where (code = 'aborted') -&gt; ac.status = 'cancelled';\n  cda.statusCode as statusc where (code = 'suspended') -&gt; ac.status = 'partial';\n  cda.effectiveTime as effectiveTime -&gt; ac.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;value3&quot;;\n  cda where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n    cda.effectiveTime as eff -&gt; ac.effective = create('Period') as period then IVLTSPeriod(eff, period);\n  } &quot;where&quot;;\n  cda -&gt;  ac.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %pat.id) &quot;reference&quot;;\n  cda -&gt;  ac.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %enc.id) &quot;reference&quot;;\n  // specimen\n  cda where cda.specimen.exists() then {\n    cda.specimen as src -&gt;  bundle.entry as e4,  e4.request = create('BackboneElement') as request,  request.method = 'POST',  e4.resource = create('Specimen') as specimen,  specimen.id = uuid() as uuid4,  e4.fullUrl = append('https://example/Specimen/', uuid4),  request.url = 'Specimen',  ac.specimen = create('Reference') as reference,  reference.reference = ('https://example/Specimen/' + %specimen.id) then {\n      src.specimenRole as specimenRole then {\n        specimenRole.id -&gt; specimen.identifier;\n        specimenRole.specimenPlayingEntity as specimenPlayingEntity then {\n          specimenPlayingEntity.code -&gt; specimen.type;\n        };\n      } &quot;SpecimenRole&quot;;\n      src -&gt;  specimen.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n      cda.entryRelationship as entryRelationship then {\n        entryRelationship.observation as observation then {\n          observation -&gt;  bundle.entry as e12,  e12.request = create('BackboneElement') as request,  request.method = 'POST',  e12.resource = create('Observation') as obs,  obs.id = uuid() as uuid13,  e12.fullUrl = append('https://example/Observation/', uuid13),  request.url = 'Observation',  ac.result = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %obs.id) then {\n            observation then Observation2(observation, pat, enc, obs, bundle, cda, specimen) &quot;ORG&quot;;\n            // procedure\n            cda.entryRelationship as entryRelationship1 then {\n              entryRelationship1.procedure as proc -&gt;  bundle.entry as e5,  e5.request = create('BackboneElement') as request,  request.method = 'POST',  e5.resource = create('Procedure') as procedure,  procedure.id = uuid() as uuid5,  e5.fullUrl = append('https://example/Procedure/', uuid5),  request.url = 'Procedure',  obs.partOf = create('Reference') as reference,  reference.reference = ('https://example/Procedure/' + %procedure.id) then {\n                proc -&gt;  procedure.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n                proc -&gt;  procedure.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;\n                proc where proc.statusCode.exists().not() then {\n                  proc -&gt; procedure.status = 'unknown' &quot;statuscode&quot;;\n                } &quot;status&quot;;\n                proc.statusCode as statusc where (code = 'completed') -&gt; procedure.status = 'completed';\n                proc.statusCode as statusc where (code = 'active') -&gt; procedure.status = 'in-progress';\n                proc.statusCode as statusc where (code = 'aborted') -&gt; procedure.status = 'stopped';\n                proc.statusCode as statusc where (code = 'suspended') -&gt; procedure.status = 'on-hold';\n                proc.statusCode as statusc where (code = 'cancelled') -&gt; procedure.status = 'not-done';\n                proc.statusCode as statusc where (code = 'held') -&gt; procedure.status = 'on-hold';\n                proc.statusCode as statusc where (code = 'new') -&gt; procedure.status = 'preparation';\n                proc.statusCode as statusc where (code = 'obsolete') -&gt; procedure.status = 'entered-in-error';\n                proc.statusCode as statusc where (code = 'nullified') -&gt; procedure.status = 'unknown';\n                proc.effectiveTime as effectiveTime -&gt; procedure.performed = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;datetime&quot;;\n                proc where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n                  proc.effectiveTime as eff -&gt; procedure.performed = create('Period') as period then IVLTSPeriod(eff, period);\n                } &quot;where&quot;;\n                proc.targetSiteCode -&gt; procedure.bodySite;\n              };\n            } &quot;entryRelationshipprocedure&quot;;\n          } &quot;obs&quot;;\n        };\n        entryRelationship.organizer as organizer then {\n          organizer -&gt;  bundle.entry as e12,  e12.request = create('BackboneElement') as request,  request.method = 'POST',  e12.resource = create('Observation') as obs,  obs.id = uuid() as uuid13,  e12.fullUrl = append('https://example/Observation/', uuid13),  request.url = 'Observation',  ac.result = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %obs.id) then {\n            organizer then Organizer(cda, organizer, pat, enc, obs, bundle) &quot;ORG&quot;;\n            // procedure\n            cda.entryRelationship as entryRelationship1 then {\n              entryRelationship1.procedure as proc -&gt;  bundle.entry as e5,  e5.request = create('BackboneElement') as request,  request.method = 'POST',  e5.resource = create('Procedure') as procedure,  procedure.id = uuid() as uuid5,  e5.fullUrl = append('https://example/Procedure/', uuid5),  request.url = 'Procedure',  obs.partOf = create('Reference') as reference,  reference.reference = ('https://example/Procedure/' + %procedure.id) then {\n                proc -&gt;  procedure.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n                proc -&gt;  procedure.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;\n                proc where proc.statusCode.exists().not() then {\n                  proc -&gt; procedure.status = 'unknown' &quot;statuscode&quot;;\n                } &quot;status&quot;;\n                proc.statusCode as statusc where (code = 'completed') -&gt; procedure.status = 'completed';\n                proc.statusCode as statusc where (code = 'active') -&gt; procedure.status = 'in-progress';\n                proc.statusCode as statusc where (code = 'aborted') -&gt; procedure.status = 'stopped';\n                proc.statusCode as statusc where (code = 'suspended') -&gt; procedure.status = 'on-hold';\n                proc.statusCode as statusc where (code = 'cancelled') -&gt; procedure.status = 'not-done';\n                proc.statusCode as statusc where (code = 'held') -&gt; procedure.status = 'on-hold';\n                proc.statusCode as statusc where (code = 'new') -&gt; procedure.status = 'preparation';\n                proc.statusCode as statusc where (code = 'obsolete') -&gt; procedure.status = 'entered-in-error';\n                proc.statusCode as statusc where (code = 'nullified') -&gt; procedure.status = 'unknown';\n                proc.effectiveTime as effectiveTime -&gt; procedure.performed = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;datetime&quot;;\n                proc where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n                  proc.effectiveTime as eff -&gt; procedure.performed = create('Period') as period then IVLTSPeriod(eff, period);\n                } &quot;where&quot;;\n                proc.targetSiteCode -&gt; procedure.bodySite;\n              } &quot;pbservation&quot;;\n            } &quot;entryRelationshiprocedure&quot;;\n          } &quot;Organizer&quot;;\n        };\n      } &quot;entryRelationshipobservation&quot;;\n    };\n  } &quot;exist&quot;;\n  cda where cda.specimen.exists().not() then {\n    // cda -&gt; bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'POST', e4.resource = create('Specimen') as specimen,  specimen.id = uuid() as uuid4,  e4.fullUrl = append('https://example/Specimen/', uuid4), request.url = 'Specimen' then {\n    cda.entryRelationship as entryRelationship then {\n      entryRelationship.observation as observation then {\n        observation -&gt;  bundle.entry as e12,  e12.request = create('BackboneElement') as request,  request.method = 'POST',  e12.resource = create('Observation') as obs,  obs.id = uuid() as uuid13,  e12.fullUrl = append('https://example/Observation/', uuid13),  request.url = 'Observation',  ac.result = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %obs.id) then {\n          observation then Observation3(observation, pat, enc, obs, bundle, cda) &quot;ORG&quot;;\n          // procedure\n          cda.entryRelationship as entryRelationship1 then {\n            entryRelationship1.procedure as proc -&gt;  bundle.entry as e5,  e5.request = create('BackboneElement') as request,  request.method = 'POST',  e5.resource = create('Procedure') as procedure,  procedure.id = uuid() as uuid5,  e5.fullUrl = append('https://example/Procedure/', uuid5),  request.url = 'Procedure',  obs.partOf = create('Reference') as reference,  reference.reference = ('https://example/Procedure/' + %procedure.id) then {\n              proc -&gt;  procedure.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n              proc -&gt;  procedure.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;\n              proc where proc.statusCode.exists().not() then {\n                proc -&gt; procedure.status = 'unknown' &quot;statuscode&quot;;\n              } &quot;status&quot;;\n              proc.statusCode as statusc where (code = 'completed') -&gt; procedure.status = 'completed';\n              proc.statusCode as statusc where (code = 'active') -&gt; procedure.status = 'in-progress';\n              proc.statusCode as statusc where (code = 'aborted') -&gt; procedure.status = 'stopped';\n              proc.statusCode as statusc where (code = 'suspended') -&gt; procedure.status = 'on-hold';\n              proc.statusCode as statusc where (code = 'cancelled') -&gt; procedure.status = 'not-done';\n              proc.statusCode as statusc where (code = 'held') -&gt; procedure.status = 'on-hold';\n              proc.statusCode as statusc where (code = 'new') -&gt; procedure.status = 'preparation';\n              proc.statusCode as statusc where (code = 'obsolete') -&gt; procedure.status = 'entered-in-error';\n              proc.statusCode as statusc where (code = 'nullified') -&gt; procedure.status = 'unknown';\n              proc.effectiveTime as effectiveTime -&gt; procedure.performed = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;datetime&quot;;\n              proc where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n                proc.effectiveTime as eff -&gt; procedure.performed = create('Period') as period then IVLTSPeriod(eff, period);\n              } &quot;where&quot;;\n              proc.targetSiteCode -&gt; procedure.bodySite;\n            };\n          } &quot;entryRelationshipprocedure&quot;;\n        } &quot;obs&quot;;\n      };\n      entryRelationship.organizer as organizer then {\n        organizer -&gt;  bundle.entry as e12,  e12.request = create('BackboneElement') as request,  request.method = 'POST',  e12.resource = create('Observation') as obs,  obs.id = uuid() as uuid13,  e12.fullUrl = append('https://example/Observation/', uuid13),  request.url = 'Observation',  ac.result = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %obs.id) then {\n          organizer then Organizer(cda, organizer, pat, enc, obs, bundle) &quot;ORG&quot;;\n          // procedure\n          cda.entryRelationship as entryRelationship1 then {\n            entryRelationship1.procedure as proc -&gt;  bundle.entry as e5,  e5.request = create('BackboneElement') as request,  request.method = 'POST',  e5.resource = create('Procedure') as procedure,  procedure.id = uuid() as uuid5,  e5.fullUrl = append('https://example/Procedure/', uuid5),  request.url = 'Procedure',  obs.partOf = create('Reference') as reference,  reference.reference = ('https://example/Procedure/' + %procedure.id) then {\n              proc -&gt;  procedure.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n              proc -&gt;  procedure.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;\n              proc where proc.statusCode.exists().not() then {\n                proc -&gt; procedure.status = 'unknown' &quot;statuscode&quot;;\n              } &quot;status&quot;;\n              proc.statusCode as statusc where (code = 'completed') -&gt; procedure.status = 'completed';\n              proc.statusCode as statusc where (code = 'active') -&gt; procedure.status = 'in-progress';\n              proc.statusCode as statusc where (code = 'aborted') -&gt; procedure.status = 'stopped';\n              proc.statusCode as statusc where (code = 'suspended') -&gt; procedure.status = 'on-hold';\n              proc.statusCode as statusc where (code = 'cancelled') -&gt; procedure.status = 'not-done';\n              proc.statusCode as statusc where (code = 'held') -&gt; procedure.status = 'on-hold';\n              proc.statusCode as statusc where (code = 'new') -&gt; procedure.status = 'preparation';\n              proc.statusCode as statusc where (code = 'obsolete') -&gt; procedure.status = 'entered-in-error';\n              proc.statusCode as statusc where (code = 'nullified') -&gt; procedure.status = 'unknown';\n              proc.effectiveTime as effectiveTime -&gt; procedure.performed = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;datetime&quot;;\n              proc where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n                proc.effectiveTime as eff -&gt; procedure.performed = create('Period') as period then IVLTSPeriod(eff, period);\n              } &quot;where&quot;;\n              proc.targetSiteCode -&gt; procedure.bodySite;\n            } &quot;pbservation&quot;;\n          } &quot;entryRelationshiprocedure&quot;;\n        } &quot;Organizer&quot;;\n      };\n    } &quot;entryRelationshipobservation&quot;;\n  } &quot;existnot&quot;;\n  // PARTICIPANT\n  cda.participant as part where (typeCode != 'DEV') -&gt; enc.participant as participant then {\n    part -&gt; participant.type as type then {\n      part -&gt; type.coding as coding then {\n        part -&gt; coding.code = (part.typeCode) &quot;codice&quot;;\n        part -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' &quot;system&quot;;\n      } &quot;codeType&quot;;\n    } &quot;type&quot;;\n    part.participantRole as participantRole -&gt; participant.individual = create('Reference') as reference then {\n      participantRole -&gt;  bundle.entry as e,  e.request = create('BackboneElement') as request,  request.method = 'PUT',  e.resource = create('Practitioner') as practitioner then {\n        part.time as time1 -&gt; participant.period = create('Period') as period then {\n          time1 -&gt; period.start = create('dateTime') as start then TSDateTime(time1, start) &quot;val&quot;;\n        };\n        part.time as time1 -&gt; participant.period = create('Period') as period then IVLTSPeriod(time1, period);\n        participantRole -&gt; practitioner.meta as meta then {\n          participantRole -&gt; meta.tag = create('Coding') as coding then {\n            participantRole -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            participantRole -&gt; coding.code = 'ClinicalDocument/body/act/participant' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        participantRole.id as id -&gt; practitioner.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            participantRole -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid4,  e.fullUrl = append('https://example/Practitioner/', uuid4),  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;org&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        participantRole.addr -&gt; practitioner.address;\n        participantRole.playingEntity as playingEntity then {\n          playingEntity.name -&gt; practitioner.name;\n        };\n      } &quot;participanRoleBund&quot;;\n    };\n  };\n  // PERFORMER\n  cda.performer as performer -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e1.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole',  ac.performer = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n    performer.assignedEntity as assignedEntity then {\n      assignedEntity.code as codice -&gt; practitionerRole.code;\n      assignedEntity -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'PUT',  e2.resource = create('Practitioner') as practitioner then {\n        assignedEntity.code -&gt; practitionerRole.code;\n        assignedEntity -&gt; practitioner.meta as meta then {\n          assignedEntity -&gt; meta.tag = create('Coding') as coding then {\n            assignedEntity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            assignedEntity -&gt; coding.code = 'ClinicalDocument/body/act/performer' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        assignedEntity.id as id -&gt; practitioner.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            assignedEntity -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid4,  e2.fullUrl = append('https://example/Practitioner/', uuid4),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;pra&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        assignedEntity.addr -&gt; practitioner.address;\n        assignedEntity.telecom -&gt; practitioner.telecom;\n        assignedEntity.assignedPerson as person then {\n          person.name -&gt; practitioner.name;\n          person.birthTime as birthTime then {\n            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n      } &quot;ASSAUth&quot;;\n      assignedEntity.representedOrganization as representedOrganization -&gt;  bundle.entry as e3,  e3.request = create('BackboneElement') as request,  request.method = 'PUT',  e3.resource = create('Organization') as organization then {\n        representedOrganization -&gt; organization.meta as meta then {\n          representedOrganization -&gt; meta.tag = create('Coding') as coding then {\n            representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            representedOrganization -&gt; coding.code = 'ClinicalDocument/body/act/representedOrganization' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        representedOrganization.id as id -&gt; organization.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  organization.id = (r + '-' + ext) as uuid2,  e3.fullUrl = append('https://example/Organization/', uuid2),  practitionerRole.organization = create('Reference') as referenceOrg,  referenceOrg.reference = append('https://example/Organization/', uuid2) &quot;org&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        representedOrganization.name as v -&gt; organization.name = (v.other);\n        representedOrganization.telecom -&gt; organization.telecom;\n        representedOrganization.addr -&gt; organization.address;\n        representedOrganization.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e4,  e4.request = create('BackboneElement') as request,  request.method = 'PUT',  e4.resource = create('Organization') as organization1 then {\n          OrgPartOf -&gt; organization1.meta as meta then {\n            OrgPartOf -&gt; meta.tag = create('Coding') as coding then {\n              OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              OrgPartOf -&gt; coding.code = 'ClinicalDocument/body/act/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          OrgPartOf.id as id -&gt; organization1.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext then {\n              OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n            } &quot;ext&quot;;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  organization1.id = (r + '-' + ext) as uuid3,  organization1.id = uuid() as uuid3,  e4.fullUrl = append('https://example/Organization/', uuid3),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id) &quot;org&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          OrgPartOf.code -&gt; organization1.type;\n          OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';\n          OrgPartOf.wholeOrganization as wholeOrgan -&gt;  bundle.entry as e10bis,  e10bis.request = create('BackboneElement') as request,  request.method = 'PUT',  e10bis.resource = create('Organization') as organization2 then {\n            OrgPartOf -&gt; organization2.meta as meta then {\n              OrgPartOf -&gt; meta.tag = create('Coding') as coding then {\n                OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                OrgPartOf -&gt; coding.code = 'ClinicalDocument/body/act/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            wholeOrgan.id as id -&gt; organization2.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext then {\n                wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n              } &quot;ext&quot;;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  organization2.id = (r + '-' + ext) as uuid5,  e10bis.fullUrl = append('https://example/Organization/', uuid5),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id) &quot;org&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            wholeOrgan.name as v -&gt; organization2.name = (v.other);\n            wholeOrgan.telecom -&gt; organization2.telecom;\n            wholeOrgan.addr -&gt; organization2.address;\n          };\n        } &quot;OrgPartOf&quot;;\n      };\n    } &quot;performer&quot;;\n  };\n  // AUTHOR\n  cda.author as srcAuthor -&gt;  bundle.entry as e5,  e5.request = create('BackboneElement') as request,  request.method = 'POST',  e5.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid6,  e5.fullUrl = append('https://example/PractitionerRole/', uuid6),  request.url = 'PractitionerRole',  ac.performer = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n    srcAuthor.assignedAuthor as assignedAuthor then {\n      assignedAuthor.code as codice -&gt; practitionerRole.code;\n      assignedAuthor -&gt;  bundle.entry as e7,  e7.request = create('BackboneElement') as request,  request.method = 'PUT',  e7.resource = create('Practitioner') as practitioner then {\n        srcAuthor.functionCode -&gt; practitionerRole.code;\n        assignedAuthor.code -&gt; practitionerRole.code;\n        assignedAuthor -&gt; practitioner.meta as meta then {\n          assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n            assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/act/author' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            assignedAuthor -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e7.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n        } &quot;2&quot;;\n        assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n        } &quot;diverso&quot;;\n        assignedAuthor.addr -&gt; practitioner.address;\n        assignedAuthor.telecom -&gt; practitioner.telecom;\n        // person\n        assignedAuthor.assignedPerson as person then {\n          person.name -&gt; practitioner.name;\n          person.birthTime as birthTime then {\n            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n      } &quot;ASSAUth&quot;;\n      // organization\n      assignedAuthor.representedOrganization as representedOrganization -&gt;  bundle.entry as e8,  e8.request = create('BackboneElement') as request,  request.method = 'PUT',  e8.resource = create('Organization') as organization then {\n        representedOrganization -&gt; organization.meta as meta then {\n          representedOrganization -&gt; meta.tag = create('Coding') as coding then {\n            representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            representedOrganization -&gt; coding.code = 'ClinicalDocument/body/act/author/representedOrganization' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        representedOrganization.id as id -&gt; organization.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  organization.id = (r + '-' + ext) as uuid8,  e8.fullUrl = append('https://example/Organization/', uuid8),  practitionerRole.organization = create('Reference') as referenceOrg,  referenceOrg.reference = append('https://example/Organization/', uuid8) &quot;org&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        representedOrganization.name as v -&gt; organization.name = (v.other);\n        representedOrganization.telecom -&gt; organization.telecom;\n        representedOrganization.addr -&gt; organization.address;\n        representedOrganization.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e9,  e9.request = create('BackboneElement') as request,  request.method = 'PUT',  e9.resource = create('Organization') as organization1 then {\n          OrgPartOf -&gt; organization1.meta as meta then {\n            OrgPartOf -&gt; meta.tag = create('Coding') as coding then {\n              OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              OrgPartOf -&gt; coding.code = 'ClinicalDocument/body/act/author/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          OrgPartOf.id as id -&gt; organization1.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext then {\n              OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n            } &quot;ext&quot;;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  organization1.id = (r + '-' + ext) as uuid9,  e9.fullUrl = append('https://example/Organization/', uuid9),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id) &quot;org&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          OrgPartOf.code -&gt; organization1.type;\n          OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';\n          OrgPartOf.wholeOrganization as wholeOrgan -&gt;  bundle.entry as e10,  e10.request = create('BackboneElement') as request,  request.method = 'PUT',  e10.resource = create('Organization') as organization2 then {\n            wholeOrgan -&gt; organization2.meta as meta then {\n              wholeOrgan -&gt; meta.tag = create('Coding') as coding then {\n                wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                wholeOrgan -&gt; coding.code = 'ClinicalDocument/body/act/author/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            wholeOrgan.id as id -&gt; organization2.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext then {\n                wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n              } &quot;ext&quot;;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  organization2.id = (r + '-' + ext) as uuid10,  e10.fullUrl = append('https://example/Organization/', uuid10),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id) &quot;org&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            wholeOrgan.name as v -&gt; organization2.name = (v.other);\n            wholeOrgan.telecom -&gt; organization2.telecom;\n            wholeOrgan.addr -&gt; organization2.address;\n          };\n        } &quot;OrgPartOf&quot;;\n      };\n    } &quot;author&quot;;\n  };\n  // &lt;!--entryRelationship per la gestione delle note e commenti--&gt;\n  cda.entryRelationship as entryRelationship then {\n    entryRelationship.act as act then {\n      act.text as text then {\n        text.reference as reference -&gt; ac.conclusion = (reference.value);\n      };\n    } &quot;Act&quot;;\n  };\n}\n\ngroup Organizer(source cda : Act, source org : Organizer, target patient : Patient, target encounter : Encounter, target observation : Observation, target bundle : Bundle) {\n  org -&gt;  observation.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n  org -&gt;  observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;\n  org.code -&gt; observation.code;\n  org where org.code.exists().not() then {\n    cda.code -&gt; observation.code;\n  } &quot;act&quot;;\n  org.statusCode as statusc where (code = 'completed') -&gt; observation.status = 'final';\n  org.statusCode as statusc where (code = 'active') -&gt; observation.status = 'registered';\n  org.statusCode as statusc where (code = 'aborted') -&gt; observation.status = 'cancelled';\n  org.statusCode as statusc where (code = 'suspended') -&gt; observation.status = 'partial';\n  org.effectiveTime as effectiveTime -&gt; observation.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) &quot;value2&quot;;\n  org where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n    org.effectiveTime as eff -&gt; observation.effective = create('Period') as period then IVLTSPeriod(eff, period);\n  } &quot;where&quot;;\n  // specimen\n  org.specimen as spmn -&gt;  bundle.entry as e4o,  e4o.request = create('BackboneElement') as request,  request.method = 'POST',  e4o.resource = create('Specimen') as specimen,  specimen.id = uuid() as uuid4o,  e4o.fullUrl = append('https://example/Specimen/', uuid4o),  request.url = 'Specimen',  observation.specimen = create('Reference') as reference,  reference.reference = ('https://example/Specimen/' + %specimen.id) then {\n    spmn.specimenRole as specimenRole then {\n      specimenRole.id as id -&gt; specimen.identifier;\n      specimenRole.specimenPlayingEntity as specimenPlayingEntity then {\n        specimenPlayingEntity.code -&gt; specimen.type;\n      };\n    };\n  };\n  // subject\n  org.subject as sbj then {\n    sbj.relatedSubject as relatedSubj -&gt; patient.extension as extension2 then ExtSubjectAnimal(relatedSubj, extension2);\n  };\n  // performer\n  org.performer as performer -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e1.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole' then {\n    performer -&gt;  observation.performer = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n      performer.assignedEntity as entity then {\n        entity.code -&gt; practitionerRole.code;\n        entity -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'PUT',  e2.resource = create('Practitioner') as practitioner then {\n          entity -&gt; practitioner.meta as meta then {\n            entity -&gt; meta.tag = create('Coding') as coding then {\n              entity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              entity -&gt; coding.code = 'ClinicalDocument/body/organizer/performer' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          entity.id as id -&gt; practitioner.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext then {\n              entity -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n            } &quot;ext&quot;;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e2.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;2&quot;;\n          entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;diverso&quot;;\n          entity.addr -&gt; practitioner.address;\n          entity.telecom -&gt; practitioner.telecom;\n          entity.assignedPerson as person then {\n            person.name -&gt; practitioner.name;\n            person.birthTime as birthTime then {\n              birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n            } &quot;birth&quot;;\n          } &quot;name&quot;;\n          entity.representedOrganization as representedOrganization -&gt;  bundle.entry as e3,  e3.request = create('BackboneElement') as request,  request.method = 'PUT',  e3.resource = create('Organization') as organization then {\n            representedOrganization -&gt; organization.meta as meta then {\n              representedOrganization -&gt; meta.tag = create('Coding') as coding then {\n                representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                representedOrganization -&gt; coding.code = 'ClinicalDocument/body/organizer/performer/representedOrganization' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            representedOrganization.id as id -&gt; organization.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext then {\n                representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n              } &quot;ext&quot;;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  organization.id = (r + '-' + ext) as uuid3,  e3.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as referenceOrg,  referenceOrg.reference = append('https://example/Organization/', uuid3) &quot;aut&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            representedOrganization.name as v -&gt; organization.name = (v.other);\n            representedOrganization.telecom -&gt; organization.telecom;\n            representedOrganization.addr -&gt; organization.address;\n            representedOrganization.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e4,  e4.request = create('BackboneElement') as request,  request.method = 'PUT',  e4.resource = create('Organization') as organization1 then {\n              OrgPartOf -&gt; organization1.meta as meta then {\n                OrgPartOf -&gt; meta.tag = create('Coding') as coding then {\n                  OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  OrgPartOf -&gt; coding.code = 'ClinicalDocument/body/organizer/performer/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              OrgPartOf.id as id -&gt; organization1.identifier as identifier then {\n                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                id.extension as ext -&gt; identifier.value = ext then {\n                  OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n                } &quot;ext&quot;;\n                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                id.root as r then {\n                  id.extension as ext -&gt;  organization1.id = (r + '-' + ext) as uuid4,  e4.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id) &quot;org&quot;;\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              OrgPartOf.code -&gt; organization1.type;\n              OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';\n              OrgPartOf.wholeOrganization as wholeOrgan -&gt;  bundle.entry as e5,  e5.request = create('BackboneElement') as request,  request.method = 'PUT',  e5.resource = create('Organization') as organization2 then {\n                wholeOrgan -&gt; organization2.meta as meta then {\n                  wholeOrgan -&gt; meta.tag = create('Coding') as coding then {\n                    wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                    wholeOrgan -&gt; coding.code = 'ClinicalDocument/body/organizer/performer/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n                  } &quot;coding&quot;;\n                } &quot;meta&quot;;\n                wholeOrgan.id as id -&gt; organization2.identifier as identifier then {\n                  id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n                  id.extension as ext -&gt; identifier.value = ext then {\n                    wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n                  } &quot;ext&quot;;\n                  id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n                  id.root as r then {\n                    id.extension as ext -&gt;  organization2.id = (r + '-' + ext) as uuid4,  e5.fullUrl = append('https://example/Organization/', uuid4),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id) &quot;org&quot;;\n                  } &quot;r&quot;;\n                } &quot;identifier&quot;;\n                wholeOrgan.name as v -&gt; organization2.name = (v.other);\n                wholeOrgan.telecom -&gt; organization2.telecom;\n                wholeOrgan.addr -&gt; organization2.address;\n              };\n            } &quot;OrgPartOf&quot;;\n          };\n        } &quot;practitioner&quot;;\n      } &quot;entity&quot;;\n    } &quot;practitionerRole&quot;;\n  };\n  // author\n  org.author as srcAuthor -&gt;  bundle.entry as e6,  e6.request = create('BackboneElement') as request,  request.method = 'POST',  e6.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid6,  e6.fullUrl = append('https://example/PractitionerRole/', uuid6),  request.url = 'PractitionerRole',  observation.performer = create('Reference') as referenceaut,  referenceaut.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n    // srcAuthor.time as time -&gt; tgt.date;\n    srcAuthor.assignedAuthor as assignedAuthor then {\n      assignedAuthor.code as codice -&gt; practitionerRole.code as code2 then CECodeableConcept(codice, code2);\n      assignedAuthor -&gt;  bundle.entry as e7,  e7.request = create('BackboneElement') as request,  request.method = 'PUT',  e7.resource = create('Practitioner') as practitioner then {\n        srcAuthor.functionCode -&gt; practitionerRole.code;\n        // assignedAuthor.code -&gt; practitionerRole.code;\n        assignedAuthor -&gt; practitioner.meta as meta then {\n          assignedAuthor -&gt; meta.tag = create('Coding') as coding then {\n            assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            assignedAuthor -&gt; coding.code = 'ClinicalDocument/body/organizer/author' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            assignedAuthor -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid7,  e7.fullUrl = append('https://example/Practitioner/', uuid7),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;aut&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n        } &quot;2&quot;;\n        assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n        } &quot;diverso&quot;;\n        assignedAuthor.addr -&gt; practitioner.address;\n        assignedAuthor.telecom -&gt; practitioner.telecom;\n        // person\n        assignedAuthor.assignedPerson as person then {\n          person.name -&gt; practitioner.name;\n          person.birthTime as birthTime then {\n            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n      } &quot;ASSAUth&quot;;\n      // organization\n      assignedAuthor.representedOrganization as representedOrganization -&gt;  bundle.entry as e8,  e8.request = create('BackboneElement') as request,  request.method = 'PUT',  e8.resource = create('Organization') as organization then {\n        representedOrganization -&gt; organization.meta as meta then {\n          representedOrganization -&gt; meta.tag = create('Coding') as coding then {\n            representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            representedOrganization -&gt; coding.code = 'ClinicalDocument/body/organizer/author/representedOrganization' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        representedOrganization.id as id -&gt; organization.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  organization.id = (r + '-' + ext) as uuid8,  e8.fullUrl = append('https://example/Organization/', uuid8),  practitionerRole.organization = create('Reference') as referenceOrg,  referenceOrg.reference = append('https://example/Organization/', uuid8) &quot;aut&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        representedOrganization.name as v -&gt; organization.name = (v.other);\n        representedOrganization.telecom -&gt; organization.telecom;\n        representedOrganization.addr -&gt; organization.address;\n        representedOrganization.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e9,  e9.request = create('BackboneElement') as request,  request.method = 'PUT',  e9.resource = create('Organization') as organization1 then {\n          OrgPartOf -&gt; organization1.meta as meta then {\n            OrgPartOf -&gt; meta.tag = create('Coding') as coding then {\n              OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              OrgPartOf -&gt; coding.code = 'ClinicalDocument/body/organizer/author/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          OrgPartOf.id as id -&gt; organization1.identifier as identifier then {\n            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n            id.extension as ext -&gt; identifier.value = ext then {\n              OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n            } &quot;ext&quot;;\n            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n            id.root as r then {\n              id.extension as ext -&gt;  organization1.id = (r + '-' + ext) as uuid9,  e9.fullUrl = append('https://example/Organization/', uuid9),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id) &quot;aut&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          OrgPartOf.code -&gt; organization1.type;\n          OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';\n          OrgPartOf.wholeOrganization as wholeOrgan -&gt;  bundle.entry as e10,  e10.request = create('BackboneElement') as request,  request.method = 'PUT',  e10.resource = create('Organization') as organization2 then {\n            OrgPartOf -&gt; organization2.meta as meta then {\n              OrgPartOf -&gt; meta.tag = create('Coding') as coding then {\n                OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                OrgPartOf -&gt; coding.code = 'ClinicalDocument/body/organizer/author/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            wholeOrgan.id as id -&gt; organization2.identifier as identifier then {\n              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n              id.extension as ext -&gt; identifier.value = ext then {\n                wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;\n              } &quot;ext&quot;;\n              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n              id.root as r then {\n                id.extension as ext -&gt;  organization2.id = (r + '-' + ext) as uuid10,  e10.fullUrl = append('https://example/Organization/', uuid10),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id) &quot;aut&quot;;\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            wholeOrgan.name as v -&gt; organization2.name = (v.other);\n            wholeOrgan.telecom -&gt; organization2.telecom;\n            wholeOrgan.addr -&gt; organization2.address;\n          };\n        } &quot;OrgPartOf&quot;;\n      };\n      // device\n      assignedAuthor.assignedAuthoringDevice as assignedAuthoringDevice -&gt;  bundle.entry as e11,  e11.request = create('BackboneElement') as request,  request.method = 'POST',  e11.resource = create('Device') as device,  device.id = uuid() as uuid11,  e11.fullUrl = append('https://example/Device/', uuid11),  request.url = 'Device',  tgt.author = create('Reference') as reference,  reference.reference = ('https://example/Device/' + %device.id) then {\n        assignedAuthoringDevice.templateId -&gt; device.identifier;\n        assignedAuthoringDevice.code -&gt; device.type;\n        assignedAuthoringDevice.manufacturerModelName as manufacturerModelName then {\n          manufacturerModelName as m -&gt; device.manufacturer = (m.displayName) &quot;displayRule&quot;;\n        } &quot;manufacturer&quot;;\n        assignedAuthoringDevice.softwareName as softwareName -&gt; device.deviceName as deviceName then {\n          softwareName -&gt; deviceName.type = 'other' &quot;typeName&quot;;\n          softwareName as s -&gt; deviceName.name = (s.displayName) &quot;name&quot;;\n        } &quot;deviceName&quot;;\n      } &quot;Device&quot;;\n    };\n  };\n  // participant person\n  org.participant as participant where (typeCode != 'DEV') -&gt;  observation.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) then {\n    participant -&gt; encounter.participant as FhirParticipant then {\n      participant as p -&gt; FhirParticipant.type as type then {\n        p -&gt; type.coding as coding then {\n          p -&gt; coding.code = (p.typeCode) &quot;codice&quot;;\n          p -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' &quot;system&quot;;\n        } &quot;codeType&quot;;\n      } &quot;type&quot;;\n    } &quot;fhirParticipant&quot;;\n    participant.participantRole as participantRole -&gt;  bundle.entry as e12,  e12.request = create('BackboneElement') as request,  request.method = 'POST',  e12.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid12,  e12.fullUrl = append('https://example/PractitionerRole/', uuid12),  request.url = 'PractitionerRole',  encounter.participant = create('BackboneElement') as participant1 then {\n      // participant.time -&gt; participant1.period;\n      participant.time as time1 -&gt; participant1.period = create('Period') as period then {\n        time1 -&gt; period.start = create('dateTime') as start then TSDateTime(time1, start) &quot;val&quot;;\n      };\n      participant.time as time1 -&gt; participant1.period = create('Period') as period then IVLTSPeriod(time1, period);\n      participant.functionCode -&gt; practitionerRole.code;\n      // non mappa i 2 precedenti\n      participantRole -&gt;  bundle.entry as e13,  e13.request = create('BackboneElement') as request,  request.method = 'PUT',  e13.resource = create('Practitioner') as practitioner then {\n        participantRole -&gt;  participant1.individual = create('Reference') as referencepart,  referencepart.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) &quot;par&quot;;\n        participantRole -&gt; practitioner.meta as meta then {\n          participantRole -&gt; meta.tag = create('Coding') as coding then {\n            participantRole -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            participantRole -&gt; coding.code = 'ClinicalDocument/body/organizer/participant' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        participantRole.id as id -&gt; practitioner.identifier as identifier then {\n          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;\n          id.extension as ext -&gt; identifier.value = ext then {\n            participantRole -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n          } &quot;ext&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n          id.root as r then {\n            id.extension as ext -&gt;  practitioner.id = (r + '-' + ext) as uuid2,  e13.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;part&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        participantRole.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {\n          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n        } &quot;2&quot;;\n        participantRole.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {\n          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;\n        } &quot;diverso&quot;;\n        participantRole.code -&gt; practitionerRole.code;\n        participantRole.addr -&gt; practitioner.address;\n        participantRole.telecom -&gt; practitioner.telecom;\n        participantRole.playingEntity as playingEntity then {\n          playingEntity.name -&gt; practitioner.name;\n          playingEntity.birthTime as birthTime then {\n            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n      } &quot;practitioner&quot;;\n    } &quot;partRole&quot;;\n  } &quot;participantEncounter&quot;;\n  // participant device\n  org.participant as devParticipant where (typeCode = 'DEV') -&gt;  bundle.entry as e14,  e14.request = create('BackboneElement') as request,  request.method = 'POST',  e14.resource = create('Device') as device,  device.id = uuid() as uuid14,  e14.fullUrl = append('https://example/Device/', uuid14),  request.url = 'Device',  observation.device = create('Reference') as reference,  reference.reference = ('https://example/Device/' + %device.id) then {\n    devParticipant.participantRole as participantRoleDev then {\n      participantRoleDev.playingDevice as playingDevice then {\n        playingDevice.code -&gt; device.type;\n        playingDevice.manufacturerModelName as manufacturerModelName then {\n          manufacturerModelName as m -&gt; device.manufacturer = (m.displayName) &quot;displayRule&quot;;\n        } &quot;manufacturer&quot;;\n        playingDevice.softwareName as softwareName -&gt; device.deviceName as deviceName then {\n          softwareName -&gt; deviceName.type = 'other' &quot;typeName&quot;;\n          softwareName as s -&gt; deviceName.name = (s.displayName) &quot;name&quot;;\n        } &quot;deviceName&quot;;\n      };\n    } &quot;participantRoleDev&quot;;\n  } &quot;devParticipant&quot;;\n  org.component as component then {\n    component.observation as observation -&gt;  bundle.entry as e,  e.request = create('BackboneElement') as request,  request.method = 'POST',  e.resource = create('Observation') as observationhasmember,  observationhasmember.id = uuid() as uuid2,  e.fullUrl = append('https://example/Observation/', uuid2),  request.url = 'Observation',  observation.hasMember = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observationhasmember.id) then Observation(observation, patient, encounter, observationhasmember, bundle) &quot;OBS&quot;;\n  } &quot;componentobservation&quot;;\n  org.component as component then {\n    component.organizer as organizer -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'POST',  e1.resource = create('Observation') as observationorganizer,  observationorganizer.id = uuid() as uuid3,  e1.fullUrl = append('https://example/Observation/', uuid3),  request.url = 'Observation',  observation.hasMember = create('Reference') as reference,  reference.reference = ('https://example/Observation/' + %observationorganizer.id) then {\n      organizer then Organizer(cda, organizer, patient, encounter, observationorganizer, bundle) &quot;ORG&quot;;\n    };\n  } &quot;componentorganizer&quot;;\n  // observationMedia\n  org.component as component then {\n    component.observationMedia as obsMedia -&gt;  bundle.entry as e15,  e15.request = create('BackboneElement') as request,  request.method = 'POST',  e15.resource = create('Media') as media1,  media1.id = uuid() as uuid15,  e15.fullUrl = append('https://example/Media/', uuid15),  request.url = 'Media',  observation.derivedFrom = create('Reference') as reference,  reference.reference = ('https://example/Media/' + %media1.id) then {\n      obsMedia -&gt; media1.content = create('Attachment') as Attachment then {\n        obsMedia -&gt; media1.status = 'unknown' &quot;status&quot;;\n        obsMedia.value as valueMedia then {\n          valueMedia.mediaType as type -&gt; Attachment.contentType = type &quot;type&quot;;\n          valueMedia -&gt; Attachment.data = (valueMedia.dataBase64Binary) &quot;data&quot;;\n        } &quot;valuemedia&quot;;\n      } &quot;Attachment&quot;;\n    } &quot;obsmedia&quot;;\n  };\n  // note\n  org.component as component then {\n    component.act as act then {\n      act.text as text then {\n        text.reference as reference -&gt; observation.note as note then {\n          reference -&gt; note.text = (reference.value) &quot;reference&quot;;\n        } &quot;note&quot;;\n      };\n    } &quot;componentact&quot;;\n  };\n}\n\ngroup ExtSubjectAnimal(source src : relatedSubject, target ext : Extension) {\n  src -&gt; ext.url = 'http://hl7.org/fhir/StructureDefinition/patient-animal' &quot;url&quot;;\n  src.code as code -&gt;  ext.extension as ext,  ext.url = 'species',  ext.value = create('CodeableConcept') as code1 then CECodeableConcept(code, code1);\n}\n\n</pre>\n      </div>"
      },
      "url" : "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirLabReport",
      "version" : "0.1.0",
      "name" : "cda2fhirLabReport",
      "status" : "draft",
      "date" : "2025-10-01T07:14:02+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/ClinicalDocument",
          "mode" : "source",
          "alias" : "ClinicalDocument"
        },
        {
          "url" : "http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor",
          "mode" : "queried",
          "alias" : "AssignedAuthor"
        },
        {
          "url" : "http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity",
          "mode" : "queried",
          "alias" : "AssignedEntity"
        },
        {
          "url" : "http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity",
          "mode" : "queried",
          "alias" : "AssociatedEntity"
        },
        {
          "url" : "http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization",
          "mode" : "queried",
          "alias" : "CustodianOrganization"
        },
        {
          "url" : "http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf",
          "mode" : "queried",
          "alias" : "OrganizationPartOf"
        },
        {
          "url" : "http://hl7.org/fhir/cda/StructureDefinition/Organization",
          "mode" : "queried",
          "alias" : "rapresentedOrganization"
        },
        {
          "url" : "http://hl7.org/fhir/cda/StructureDefinition/Section",
          "mode" : "queried",
          "alias" : "Section"
        },
        {
          "url" : "http://hl7.org/fhir/cda/StructureDefinition/PatientRole",
          "mode" : "queried",
          "alias" : "PatientRole"
        },
        {
          "url" : "http://hl7.org/fhir/cda/StructureDefinition/AD",
          "mode" : "source",
          "alias" : "AD"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Bundle",
          "mode" : "target",
          "alias" : "Bundle"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Composition",
          "mode" : "produced",
          "alias" : "Composition"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Patient",
          "mode" : "produced",
          "alias" : "Patient"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Encounter",
          "mode" : "produced",
          "alias" : "Encounter"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Person",
          "mode" : "produced",
          "alias" : "Patient"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Practitioner",
          "mode" : "produced",
          "alias" : "Practitioner"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Specimen",
          "mode" : "produced",
          "alias" : "Specimen"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Procedure",
          "mode" : "produced",
          "alias" : "Procedure"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Organization",
          "mode" : "produced",
          "alias" : "Organization"
        },
        {
          "url" : "http://hl7.org/fhir/cda/StructureDefinition/Act",
          "mode" : "produced",
          "alias" : "Act"
        },
        {
          "url" : "http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ",
          "mode" : "source",
          "alias" : "IVL_PQ"
        },
        {
          "url" : "http://hl7.org/fhir/cda/StructureDefinition/PQ",
          "mode" : "source",
          "alias" : "PQ"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/SimpleQuantity",
          "mode" : "target",
          "alias" : "SimpleQuantity"
        },
        {
          "url" : "http://hl7.org/fhir/cda/StructureDefinition/Organizer",
          "mode" : "source",
          "alias" : "Organizer"
        }
      ],
      "import" : [
        🔗 "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes"🔗 ,
        "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader"
      ],
      "group" : [
        {
          "name" : "CdaToBundle",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "cda",
              "type" : "ClinicalDocument",
              "mode" : "source"
            },
            {
              "name" : "bundle",
              "type" : "Bundle",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "ClinicalDocumentToBody",
              "source" : [
                {
                  "context" : "cda"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e"
                },
                {
                  "context" : "e",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "composition",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Composition"
                    }
                  ]
                },
                {
                  "context" : "composition",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/Composition/"
                    },
                    {
                      "valueId" : "uuid1"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "Composition"
                    }
                  ]
                },
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e2"
                },
                {
                  "context" : "e2",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "requestPAT",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "requestPAT",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "PUT"
                    }
                  ]
                },
                {
                  "context" : "e2",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "patient",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Patient"
                    }
                  ]
                },
                {
                  "context" : "patient",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid2",
                  "transform" : "uuid"
                },
                {
                  "context" : "e2",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/Patient/"
                    },
                    {
                      "valueId" : "uuid2"
                    }
                  ]
                },
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e3"
                },
                {
                  "context" : "e3",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e3",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "encounter",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Encounter"
                    }
                  ]
                },
                {
                  "context" : "encounter",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid3",
                  "transform" : "uuid"
                },
                {
                  "context" : "e3",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/Encounter/"
                    },
                    {
                      "valueId" : "uuid3"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "Encounter"
                    }
                  ]
                },
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e6"
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "DocumentReference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "DocumentReference"
                    }
                  ]
                },
                {
                  "context" : "DocumentReference",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid6",
                  "transform" : "uuid"
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/DocumentReference/"
                    },
                    {
                      "valueId" : "uuid6"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "DocumentReference"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "cdatobundle",
                  "source" : [
                    {
                      "context" : "cda"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "ClinicalDocumentToBundle",
                      "variable" : [
                        "cda",
                        "patient",
                        "composition",
                        "encounter",
                        "bundle",
                        "DocumentReference"
                      ]
                    }
                  ]
                },
                {
                  "name" : "patient",
                  "source" : [
                    {
                      "context" : "cda",
                      "element" : "recordTarget",
                      "variable" : "recordTarget"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "record",
                      "source" : [
                        {
                          "context" : "recordTarget",
                          "element" : "patientRole",
                          "variable" : "patient"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "idfr",
                          "source" : [
                            {
                              "context" : "patient",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "patient",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "value",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext1"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext1"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "ext",
                          "source" : [
                            {
                              "context" : "patient",
                              "element" : "id",
                              "variable" : "id",
                              "condition" : "(root = '2.16.840.1.113883.2.9.4.3.2') or (root = '2.16.840.1.113883.2.9.4.3.7') or (root = '2.16.840.1.113883.2.9.4.3.3') or (root = '2.16.840.1.113883.2.9.4.3.17') or (root = '2.16.840.1.113883.2.9.4.3.18') or (root = '2.16.840.1.113883.2.9.2.10.4.1.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1.1') or (root = '2.16.840.1.113883.2.9.2.10.4.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1') or (root = '2.16.840.1.113883.2.9.4.3.15')"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "UUID",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "requestPAT",
                                  "contextType" : "variable",
                                  "element" : "url",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "Patient?identifier="
                                    },
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "ClinicalDocumentToBundle",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "cda",
              "type" : "ClinicalDocument",
              "mode" : "source"
            },
            {
              "name" : "patient",
              "type" : "Patient",
              "mode" : "target"
            },
            {
              "name" : "composition",
              "type" : "Composition",
              "mode" : "target"
            },
            {
              "name" : "encounter",
              "type" : "Encounter",
              "mode" : "target"
            },
            {
              "name" : "bundle",
              "type" : "Bundle",
              "mode" : "target"
            },
            {
              "name" : "documentreference",
              "type" : "DocumentReference",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "id",
              "source" : [
                {
                  "context" : "cda"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "id",
                  "transform" : "uuid"
                }
              ]
            },
            {
              "name" : "identifier",
              "source" : [
                {
                  "context" : "cda",
                  "element" : "id",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "identifier",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "type",
              "source" : [
                {
                  "context" : "cda"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "type",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "transaction"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "date",
              "source" : [
                {
                  "context" : "cda"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "timestamp",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "timestamp.now()"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "composition",
              "source" : [
                {
                  "context" : "cda"
                }
              ],
              "dependent" : [
                {
                  "name" : "ClinicalDocumentComposition",
                  "variable" : [
                    "cda",
                    "composition",
                    "patient",
                    "encounter",
                    "bundle",
                    "documentreference"
                  ]
                }
              ]
            },
            {
              "name" : "component",
              "source" : [
                {
                  "context" : "cda",
                  "element" : "component",
                  "variable" : "component"
                }
              ],
              "rule" : [
                {
                  "name" : "body",
                  "source" : [
                    {
                      "context" : "component",
                      "element" : "structuredBody",
                      "variable" : "body"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "component",
                      "source" : [
                        {
                          "context" : "body",
                          "element" : "component",
                          "variable" : "component"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "section",
                          "source" : [
                            {
                              "context" : "component",
                              "element" : "section",
                              "variable" : "srcSection"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "srcSection",
                                  "element" : "code"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "composition",
                                  "contextType" : "variable",
                                  "element" : "section",
                                  "variable" : "tgtSection"
                                }
                              ],
                              "dependent" : [
                                {
                                  "name" : "ClinicalDocumentSection",
                                  "variable" : [
                                    "cda",
                                    "srcSection",
                                    "patient",
                                    "tgtSection",
                                    "bundle",
                                    "encounter",
                                    "documentreference"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "ClinicalDocumentSection",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "cda",
              "type" : "ClinicalDocument",
              "mode" : "source"
            },
            {
              "name" : "src",
              "type" : "Section",
              "mode" : "source"
            },
            {
              "name" : "patient",
              "type" : "Patient",
              "mode" : "target"
            },
            {
              "name" : "tgt",
              "mode" : "target"
            },
            {
              "name" : "bundle",
              "type" : "Bundle",
              "mode" : "target"
            },
            {
              "name" : "enc",
              "type" : "Encounter",
              "mode" : "target"
            },
            {
              "name" : "documentreference",
              "type" : "DocumentReference",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "title",
              "source" : [
                {
                  "context" : "src",
                  "element" : "title",
                  "variable" : "t"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "title",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "t.dataString"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "code",
              "source" : [
                {
                  "context" : "src",
                  "element" : "code",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "code",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "cdaText",
              "source" : [
                {
                  "context" : "src",
                  "element" : "text",
                  "variable" : "cdaText"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "text",
                  "variable" : "fhirText"
                }
              ],
              "rule" : [
                {
                  "name" : "narrativeStatus",
                  "source" : [
                    {
                      "context" : "cdaText"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "fhirText",
                      "contextType" : "variable",
                      "element" : "status",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "generated"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "narrativeText",
                  "source" : [
                    {
                      "context" : "cdaText",
                      "variable" : "t"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "fhirText",
                      "contextType" : "variable",
                      "element" : "div",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "t"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "entry",
              "source" : [
                {
                  "context" : "src",
                  "element" : "entry",
                  "variable" : "entry1"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e1"
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "DiagnosticReport",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "DiagnosticReport"
                    }
                  ]
                },
                {
                  "context" : "DiagnosticReport",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/DiagnosticReport/"
                    },
                    {
                      "valueId" : "uuid1"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "DiagnosticReport"
                    }
                  ]
                },
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/DiagnosticReport/' + %DiagnosticReport.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "act",
                  "source" : [
                    {
                      "context" : "entry1",
                      "element" : "act",
                      "variable" : "act1"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "Act",
                      "variable" : [
                        "act1",
                        "patient",
                        "DiagnosticReport",
                        "enc",
                        "bundle"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "component",
              "source" : [
                {
                  "context" : "src",
                  "element" : "component",
                  "variable" : "component"
                }
              ],
              "rule" : [
                {
                  "name" : "section",
                  "source" : [
                    {
                      "context" : "component",
                      "element" : "section",
                      "variable" : "sec"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "section",
                      "variable" : "tgtSection"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "ClinicalDocumentSection",
                      "variable" : [
                        "cda",
                        "sec",
                        "patient",
                        "tgtSection",
                        "bundle",
                        "enc",
                        "documentreference"
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "Observation",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "obs",
              "type" : "Observation",
              "mode" : "source"
            },
            {
              "name" : "patient",
              "type" : "Patient",
              "mode" : "target"
            },
            {
              "name" : "encounter",
              "type" : "Encounter",
              "mode" : "target"
            },
            {
              "name" : "ob",
              "type" : "Observation",
              "mode" : "target"
            },
            {
              "name" : "bundle",
              "type" : "Bundle",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "obs"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "subject",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Patient/' + %patient.id"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "obs"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "encounter",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Encounter/' + %encounter.id"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "code",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "code",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "code",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'completed')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "final"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'active')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "registered"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'aborted')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "cancelled"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'suspended')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "partial"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "value2",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "effectiveTime",
                  "variable" : "effectiveTime"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "effective",
                  "variable" : "value",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "dateTime"
                    }
                  ]
                }
              ],
              "dependent" : [
                {
                  "name" : "TSDateTime",
                  "variable" : [
                    "effectiveTime",
                    "value"
                  ]
                }
              ]
            },
            {
              "name" : "where",
              "source" : [
                {
                  "context" : "obs",
                  "condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
                }
              ],
              "rule" : [
                {
                  "name" : "effectiveTime",
                  "source" : [
                    {
                      "context" : "obs",
                      "element" : "effectiveTime",
                      "variable" : "eff"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "effective",
                      "variable" : "period",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Period"
                        }
                      ]
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "IVLTSPeriod",
                      "variable" : [
                        "eff",
                        "period"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "interpretationCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "interpretationCode",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "interpretation",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "methodCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "methodCode",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "method",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "value",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "INT",
                  "element" : "value",
                  "variable" : "int"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "int.value"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "boolean",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "BL",
                  "element" : "value",
                  "variable" : "boolean"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "boolean.value"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "val",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "CE",
                  "element" : "value",
                  "variable" : "val"
                }
              ],
              "rule" : [
                {
                  "name" : "coding",
                  "source" : [
                    {
                      "context" : "val"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "value",
                      "variable" : "ce",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "CodeableConcept"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "originltext",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "originalText",
                          "variable" : "originalText"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "reference",
                          "source" : [
                            {
                              "context" : "originalText",
                              "element" : "reference",
                              "variable" : "reference"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "ce",
                              "contextType" : "variable",
                              "element" : "text",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueId" : "reference"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "val"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ce",
                          "contextType" : "variable",
                          "element" : "coding",
                          "variable" : "coding"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "val",
                              "element" : "code",
                              "variable" : "code"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "code",
                              "transform" : "cast",
                              "parameter" : [
                                {
                                  "valueId" : "code"
                                },
                                {
                                  "valueString" : "string"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "codeSystem",
                          "source" : [
                            {
                              "context" : "val",
                              "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" : "val",
                              "element" : "displayName",
                              "variable" : "display"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "display",
                              "transform" : "cast",
                              "parameter" : [
                                {
                                  "valueId" : "display"
                                },
                                {
                                  "valueString" : "string"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "codeSystemVersion",
                          "source" : [
                            {
                              "context" : "val",
                              "element" : "codeSystemVersion",
                              "variable" : "version"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "version",
                              "transform" : "cast",
                              "parameter" : [
                                {
                                  "valueId" : "version"
                                },
                                {
                                  "valueString" : "string"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "translation",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "translation",
                          "variable" : "translation"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ce",
                          "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" : "value",
                              "source" : [
                                {
                                  "context" : "qualifier",
                                  "element" : "value",
                                  "variable" : "value"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "ce",
                                  "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" : "val",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "CD",
                  "element" : "value",
                  "variable" : "val"
                }
              ],
              "rule" : [
                {
                  "name" : "coding",
                  "source" : [
                    {
                      "context" : "val"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "value",
                      "variable" : "ce",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "CodeableConcept"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "originltext",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "originalText",
                          "variable" : "originalText"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "reference",
                          "source" : [
                            {
                              "context" : "originalText",
                              "element" : "reference",
                              "variable" : "reference"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "ce",
                              "contextType" : "variable",
                              "element" : "text",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueId" : "reference"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "val"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ce",
                          "contextType" : "variable",
                          "element" : "coding",
                          "variable" : "coding"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "val",
                              "element" : "code",
                              "variable" : "code"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "code",
                              "transform" : "cast",
                              "parameter" : [
                                {
                                  "valueId" : "code"
                                },
                                {
                                  "valueString" : "string"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "codeSystem",
                          "source" : [
                            {
                              "context" : "val",
                              "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" : "val",
                              "element" : "displayName",
                              "variable" : "display"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "display",
                              "transform" : "cast",
                              "parameter" : [
                                {
                                  "valueId" : "display"
                                },
                                {
                                  "valueString" : "string"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "codeSystemVersion",
                          "source" : [
                            {
                              "context" : "val",
                              "element" : "codeSystemVersion",
                              "variable" : "version"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "version",
                              "transform" : "cast",
                              "parameter" : [
                                {
                                  "valueId" : "version"
                                },
                                {
                                  "valueString" : "string"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "translation",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "translation",
                          "variable" : "translation"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ce",
                          "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" : "value",
                              "source" : [
                                {
                                  "context" : "qualifier",
                                  "element" : "value",
                                  "variable" : "value"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "ce",
                                  "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" : "valueQuantity",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "PQ",
                  "element" : "value",
                  "variable" : "val"
                }
              ],
              "rule" : [
                {
                  "name" : "quantity",
                  "source" : [
                    {
                      "context" : "val"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "value",
                      "variable" : "quantity",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Quantity"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "value",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "value",
                          "variable" : "value"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "quantity",
                          "contextType" : "variable",
                          "element" : "value",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "value"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "unit",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "unit",
                          "variable" : "unit"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "quantity",
                          "contextType" : "variable",
                          "element" : "unit",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "unit"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "value",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "ST",
                  "element" : "value",
                  "variable" : "value"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "string"
                    }
                  ]
                },
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "value.dataString"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "entryRelationship",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "entryRelationship",
                  "variable" : "entryRelationship"
                }
              ],
              "rule" : [
                {
                  "name" : "Act",
                  "source" : [
                    {
                      "context" : "entryRelationship",
                      "element" : "act",
                      "variable" : "act"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "text",
                      "source" : [
                        {
                          "context" : "act",
                          "element" : "text",
                          "variable" : "text"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "reference",
                          "source" : [
                            {
                              "context" : "text",
                              "element" : "reference",
                              "variable" : "reference"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "ob",
                              "contextType" : "variable",
                              "element" : "note",
                              "variable" : "note"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "reference",
                              "source" : [
                                {
                                  "context" : "reference"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "note",
                                  "contextType" : "variable",
                                  "element" : "text",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "reference.value"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "Note e commenti"
            },
            {
              "name" : "subject",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "subject",
                  "variable" : "sbj"
                }
              ],
              "rule" : [
                {
                  "name" : "relatedSubject",
                  "source" : [
                    {
                      "context" : "sbj",
                      "element" : "relatedSubject",
                      "variable" : "relatedSubj"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "patient",
                      "contextType" : "variable",
                      "element" : "extension",
                      "variable" : "extension2"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "ExtSubjectAnimal",
                      "variable" : [
                        "relatedSubj",
                        "extension2"
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "subject"
            },
            {
              "name" : "performer",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "performer",
                  "variable" : "performer"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e1"
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/PractitionerRole/"
                    },
                    {
                      "valueId" : "uuid1"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "practitionerRole",
                  "source" : [
                    {
                      "context" : "performer"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "performer",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "entity",
                      "source" : [
                        {
                          "context" : "performer",
                          "element" : "assignedEntity",
                          "variable" : "entity"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "entity",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "practitioner",
                          "source" : [
                            {
                              "context" : "entity"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e2"
                            },
                            {
                              "context" : "e2",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e2",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "practitioner",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Practitioner"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "entity"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "meta",
                                  "variable" : "meta"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "coding",
                                  "source" : [
                                    {
                                      "context" : "entity"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "meta",
                                      "contextType" : "variable",
                                      "element" : "tag",
                                      "variable" : "coding",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Coding"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "system",
                                      "source" : [
                                        {
                                          "context" : "entity"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "http://algoritmodiscoring"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "entity"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "code",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "ClinicalDocument/body/observation/performer"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "identifier",
                                  "variable" : "identifier"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "root1",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "translate",
                                      "parameter" : [
                                        {
                                          "valueId" : "r"
                                        },
                                        {
                                          "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                        },
                                        {
                                          "valueString" : "uri"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "ext",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "UUID",
                                      "source" : [
                                        {
                                          "context" : "entity"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "url",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "Practitioner?identifier="
                                            },
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "assigningAuthorityName",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "assigningAuthorityName",
                                      "variable" : "s"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "assigner",
                                      "variable" : "a"
                                    },
                                    {
                                      "context" : "a",
                                      "contextType" : "variable",
                                      "element" : "display",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "s"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "r",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "performer",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "practitioner",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid2",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e2",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Practitioner/"
                                            },
                                            {
                                              "valueId" : "uuid2"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "practitionerRole",
                                          "contextType" : "variable",
                                          "element" : "practitioner",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "2.16.840.1.113883.2.9.4.3.2",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "diverso",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "addr",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "addr",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "address",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "telecom",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "telecom",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "telecom",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "assignedPerson",
                                  "variable" : "person"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "person",
                                      "element" : "name",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "birth",
                                  "source" : [
                                    {
                                      "context" : "person",
                                      "element" : "birthTime",
                                      "variable" : "birthTime"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "value",
                                      "source" : [
                                        {
                                          "context" : "birthTime",
                                          "element" : "value",
                                          "variable" : "date"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "practitioner",
                                          "contextType" : "variable",
                                          "element" : "birthDate",
                                          "transform" : "truncate",
                                          "parameter" : [
                                            {
                                              "valueId" : "date"
                                            },
                                            {
                                              "valueInteger" : 10
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "representedOrganization",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "representedOrganization",
                                  "variable" : "representedOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e3"
                                },
                                {
                                  "context" : "e3",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e3",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "organization",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "representedOrganization"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "representedOrganization"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "representedOrganization"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/body/observation/performer/representedOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "identifier",
                                      "variable" : "identifier"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "root1",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "translate",
                                          "parameter" : [
                                            {
                                              "valueId" : "r"
                                            },
                                            {
                                              "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                            },
                                            {
                                              "valueString" : "uri"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "ext",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "UUID",
                                          "source" : [
                                            {
                                              "context" : "representedOrganization"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "request",
                                              "contextType" : "variable",
                                              "element" : "url",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Organization?identifier="
                                                },
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "assigningAuthorityName",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "assigningAuthorityName",
                                          "variable" : "s"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "assigner",
                                          "variable" : "a"
                                        },
                                        {
                                          "context" : "a",
                                          "contextType" : "variable",
                                          "element" : "display",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "s"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "r",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "aut",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid3",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e3",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid3"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "practitionerRole",
                                              "contextType" : "variable",
                                              "element" : "organization",
                                              "variable" : "referenceOrg",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "referenceOrg",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid3"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "OrgPartOf",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "asOrganizationPartOf",
                                      "variable" : "OrgPartOf"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "bundle",
                                      "contextType" : "variable",
                                      "element" : "entry",
                                      "variable" : "e4"
                                    },
                                    {
                                      "context" : "e4",
                                      "contextType" : "variable",
                                      "element" : "request",
                                      "variable" : "request",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "BackboneElement"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e4",
                                      "contextType" : "variable",
                                      "element" : "resource",
                                      "variable" : "organization1",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Organization"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "method",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "PUT"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "meta",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "meta",
                                          "variable" : "meta"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "coding",
                                          "source" : [
                                            {
                                              "context" : "OrgPartOf"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "meta",
                                              "contextType" : "variable",
                                              "element" : "tag",
                                              "variable" : "coding",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Coding"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "system",
                                              "source" : [
                                                {
                                                  "context" : "OrgPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "coding",
                                                  "contextType" : "variable",
                                                  "element" : "system",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "http://algoritmodiscoring"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "code",
                                              "source" : [
                                                {
                                                  "context" : "OrgPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "coding",
                                                  "contextType" : "variable",
                                                  "element" : "code",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "identifier",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "id",
                                          "variable" : "id"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "identifier",
                                          "variable" : "identifier"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "root1",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "root",
                                              "variable" : "r"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "identifier",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "translate",
                                              "parameter" : [
                                                {
                                                  "valueId" : "r"
                                                },
                                                {
                                                  "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                                },
                                                {
                                                  "valueString" : "uri"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "ext",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "identifier",
                                              "contextType" : "variable",
                                              "element" : "value",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "UUID",
                                              "source" : [
                                                {
                                                  "context" : "OrgPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "request",
                                                  "contextType" : "variable",
                                                  "element" : "url",
                                                  "transform" : "append",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Organization?identifier="
                                                    },
                                                    {
                                                      "valueId" : "ext"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "assigningAuthorityName",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "assigningAuthorityName",
                                              "variable" : "s"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "identifier",
                                              "contextType" : "variable",
                                              "element" : "assigner",
                                              "variable" : "a"
                                            },
                                            {
                                              "context" : "a",
                                              "contextType" : "variable",
                                              "element" : "display",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueId" : "s"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "r",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "root",
                                              "variable" : "r"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "org",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "extension",
                                                  "variable" : "ext"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "organization1",
                                                  "contextType" : "variable",
                                                  "element" : "id",
                                                  "variable" : "uuid4",
                                                  "transform" : "evaluate",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "r + '-' + ext"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "e4",
                                                  "contextType" : "variable",
                                                  "element" : "fullUrl",
                                                  "transform" : "append",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "https://example/Organization/"
                                                    },
                                                    {
                                                      "valueId" : "uuid4"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "organization",
                                                  "contextType" : "variable",
                                                  "element" : "partOf",
                                                  "variable" : "reference",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Reference"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "reference",
                                                  "contextType" : "variable",
                                                  "element" : "reference",
                                                  "transform" : "evaluate",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "'https://example/Organization/' + %organization1.id"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "code",
                                          "variable" : "vvv"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "type",
                                          "variable" : "vvv",
                                          "transform" : "create"
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "statusCode",
                                          "variable" : "status",
                                          "condition" : "(value = 'active')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "active",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "boolean"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "active",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "true"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "wholeOrganization",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "wholeOrganization",
                                          "variable" : "wholeOrgan"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "bundle",
                                          "contextType" : "variable",
                                          "element" : "entry",
                                          "variable" : "e5"
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "request",
                                          "variable" : "request",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "BackboneElement"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "method",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "PUT"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "resource",
                                          "variable" : "organization2",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Organization"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "meta",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "meta",
                                              "variable" : "meta"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "coding",
                                              "source" : [
                                                {
                                                  "context" : "wholeOrgan"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "meta",
                                                  "contextType" : "variable",
                                                  "element" : "tag",
                                                  "variable" : "coding",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Coding"
                                                    }
                                                  ]
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "system",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrgan"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "coding",
                                                      "contextType" : "variable",
                                                      "element" : "system",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "http://algoritmodiscoring"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "name" : "code",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrgan"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "coding",
                                                      "contextType" : "variable",
                                                      "element" : "code",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "identifier",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "id",
                                              "variable" : "id"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "identifier",
                                              "variable" : "identifier"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "root1",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "root",
                                                  "variable" : "r"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "identifier",
                                                  "contextType" : "variable",
                                                  "element" : "system",
                                                  "transform" : "translate",
                                                  "parameter" : [
                                                    {
                                                      "valueId" : "r"
                                                    },
                                                    {
                                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                                    },
                                                    {
                                                      "valueString" : "uri"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "ext",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "extension",
                                                  "variable" : "ext"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "identifier",
                                                  "contextType" : "variable",
                                                  "element" : "value",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueId" : "ext"
                                                    }
                                                  ]
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "UUID",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrgan"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "request",
                                                      "contextType" : "variable",
                                                      "element" : "url",
                                                      "transform" : "append",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "Organization?identifier="
                                                        },
                                                        {
                                                          "valueId" : "ext"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "assigningAuthorityName",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "assigningAuthorityName",
                                                  "variable" : "s"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "identifier",
                                                  "contextType" : "variable",
                                                  "element" : "assigner",
                                                  "variable" : "a"
                                                },
                                                {
                                                  "context" : "a",
                                                  "contextType" : "variable",
                                                  "element" : "display",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueId" : "s"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "r",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "root",
                                                  "variable" : "r"
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "org",
                                                  "source" : [
                                                    {
                                                      "context" : "id",
                                                      "element" : "extension",
                                                      "variable" : "ext"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "organization2",
                                                      "contextType" : "variable",
                                                      "element" : "id",
                                                      "variable" : "uuid5",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "r + '-' + ext"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "e5",
                                                      "contextType" : "variable",
                                                      "element" : "fullUrl",
                                                      "transform" : "append",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "https://example/Organization/"
                                                        },
                                                        {
                                                          "valueId" : "uuid5"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "organization1",
                                                      "contextType" : "variable",
                                                      "element" : "partOf",
                                                      "variable" : "reference",
                                                      "transform" : "create",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "Reference"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "reference",
                                                      "contextType" : "variable",
                                                      "element" : "reference",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "'https://example/Organization/' + %organization2.id"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "name",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "name",
                                              "variable" : "v"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "name",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "v.other"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "telecom",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "telecom",
                                              "variable" : "vvv"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "telecom",
                                              "variable" : "vvv",
                                              "transform" : "create"
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "addr",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "addr",
                                              "variable" : "vvv"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "address",
                                              "variable" : "vvv",
                                              "transform" : "create"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ],
                              "documentation" : "organization"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "performer"
            },
            {
              "name" : "author",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "author",
                  "variable" : "srcAuthor"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e6"
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid6",
                  "transform" : "uuid"
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/PractitionerRole/"
                    },
                    {
                      "valueId" : "uuid6"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "performer",
                  "variable" : "referenceaut",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "referenceaut",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "assignedAuthor",
                  "source" : [
                    {
                      "context" : "srcAuthor",
                      "element" : "assignedAuthor",
                      "variable" : "assignedAuthor"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "code",
                          "variable" : "codice"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code",
                          "variable" : "code2"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "CECodeableConcept",
                          "variable" : [
                            "codice",
                            "code2"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "ASSAUth",
                      "source" : [
                        {
                          "context" : "assignedAuthor"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e7"
                        },
                        {
                          "context" : "e7",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e7",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "practitioner",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Practitioner"
                            }
                          ]
                        },
                        {
                          "context" : "practitioner",
                          "contextType" : "variable",
                          "element" : "id",
                          "variable" : "uuid7",
                          "transform" : "uuid"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "functionCode",
                          "source" : [
                            {
                              "context" : "srcAuthor",
                              "element" : "functionCode",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "assignedAuthor"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "assignedAuthor"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/observation/author"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "aut",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid2",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e7",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Practitioner/"
                                        },
                                        {
                                          "valueId" : "uuid2"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "practitioner",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "2.16.840.1.113883.2.9.4.3.2",
                              "source" : [
                                {
                                  "context" : "assignedAuthor",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "diverso",
                              "source" : [
                                {
                                  "context" : "assignedAuthor",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "assignedPerson",
                              "variable" : "person"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "person",
                                  "element" : "name",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "birth",
                              "source" : [
                                {
                                  "context" : "person",
                                  "element" : "birthTime",
                                  "variable" : "birthTime"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "birthTime",
                                      "element" : "value",
                                      "variable" : "date"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "birthDate",
                                      "transform" : "truncate",
                                      "parameter" : [
                                        {
                                          "valueId" : "date"
                                        },
                                        {
                                          "valueInteger" : 10
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ],
                          "documentation" : "person"
                        }
                      ]
                    },
                    {
                      "name" : "representedOrganization",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "representedOrganization",
                          "variable" : "representedOrganization"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e8"
                        },
                        {
                          "context" : "e8",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e8",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "organization",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Organization"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "representedOrganization"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "representedOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/observation/author/representedOrganization"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Organization?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "org",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid3",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e8",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid3"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "organization",
                                      "variable" : "referenceOrg",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "referenceOrg",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid3"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "OrgPartOf",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "asOrganizationPartOf",
                              "variable" : "OrgPartOf"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e9"
                            },
                            {
                              "context" : "e9",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e9",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "organization1",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Organization"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "OrgPartOf"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "meta",
                                  "variable" : "meta"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "coding",
                                  "source" : [
                                    {
                                      "context" : "OrgPartOf"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "meta",
                                      "contextType" : "variable",
                                      "element" : "tag",
                                      "variable" : "coding",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Coding"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "system",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "http://algoritmodiscoring"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "code",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "identifier",
                                  "variable" : "identifier"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "root1",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "translate",
                                      "parameter" : [
                                        {
                                          "valueId" : "r"
                                        },
                                        {
                                          "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                        },
                                        {
                                          "valueString" : "uri"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "ext",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "UUID",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "url",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "Organization?identifier="
                                            },
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "assigningAuthorityName",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "assigningAuthorityName",
                                      "variable" : "s"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "assigner",
                                      "variable" : "a"
                                    },
                                    {
                                      "context" : "a",
                                      "contextType" : "variable",
                                      "element" : "display",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "s"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "r",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "org",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid4",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e9",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Organization/"
                                            },
                                            {
                                              "valueId" : "uuid4"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "organization",
                                          "contextType" : "variable",
                                          "element" : "partOf",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Organization/' + %organization1.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "statusCode",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "statusCode",
                                  "variable" : "status",
                                  "condition" : "(value = 'active')"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "boolean"
                                    }
                                  ]
                                },
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "true"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "wholeOrganization",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "wholeOrganization",
                                  "variable" : "wholeOrgan"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e10"
                                },
                                {
                                  "context" : "e10",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e10",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "organization2",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "wholeOrgan"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "identifier",
                                      "variable" : "identifier"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "root1",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "translate",
                                          "parameter" : [
                                            {
                                              "valueId" : "r"
                                            },
                                            {
                                              "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                            },
                                            {
                                              "valueString" : "uri"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "ext",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "UUID",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "request",
                                              "contextType" : "variable",
                                              "element" : "url",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Organization?identifier="
                                                },
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "assigningAuthorityName",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "assigningAuthorityName",
                                          "variable" : "s"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "assigner",
                                          "variable" : "a"
                                        },
                                        {
                                          "context" : "a",
                                          "contextType" : "variable",
                                          "element" : "display",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "s"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "r",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "org",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid4",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e10",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid4"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "organization1",
                                              "contextType" : "variable",
                                              "element" : "partOf",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Organization/' + %organization2.id"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "organization"
                    },
                    {
                      "name" : "Device",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "assignedAuthoringDevice",
                          "variable" : "assignedAuthoringDevice"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e11"
                        },
                        {
                          "context" : "e11",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "POST"
                            }
                          ]
                        },
                        {
                          "context" : "e11",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "device",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Device"
                            }
                          ]
                        },
                        {
                          "context" : "device",
                          "contextType" : "variable",
                          "element" : "id",
                          "variable" : "uuid11",
                          "transform" : "uuid"
                        },
                        {
                          "context" : "e11",
                          "contextType" : "variable",
                          "element" : "fullUrl",
                          "transform" : "append",
                          "parameter" : [
                            {
                              "valueString" : "https://example/Device/"
                            },
                            {
                              "valueId" : "uuid11"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "url",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "Device"
                            }
                          ]
                        },
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "author",
                          "variable" : "reference",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        },
                        {
                          "context" : "reference",
                          "contextType" : "variable",
                          "element" : "reference",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "'https://example/Device/' + %device.id"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "templateId",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "templateId",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "manufacturer",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "manufacturerModelName",
                              "variable" : "manufacturerModelName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "displayRule",
                              "source" : [
                                {
                                  "context" : "manufacturerModelName",
                                  "variable" : "m"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "device",
                                  "contextType" : "variable",
                                  "element" : "manufacturer",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "m.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "deviceName",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "softwareName",
                              "variable" : "softwareName"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "deviceName",
                              "variable" : "deviceName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "typeName",
                              "source" : [
                                {
                                  "context" : "softwareName"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "other"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "softwareName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "s.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "device"
                    }
                  ]
                }
              ],
              "documentation" : "author"
            },
            {
              "name" : "participantEncounter",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "participant",
                  "variable" : "participant",
                  "condition" : "(typeCode != 'DEV')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "encounter",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Encounter/' + %encounter.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "fhirParticipant",
                  "source" : [
                    {
                      "context" : "participant"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "encounter",
                      "contextType" : "variable",
                      "element" : "participant",
                      "variable" : "FhirParticipant"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "type",
                      "source" : [
                        {
                          "context" : "participant",
                          "variable" : "p"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "FhirParticipant",
                          "contextType" : "variable",
                          "element" : "type",
                          "variable" : "type"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "codeType",
                          "source" : [
                            {
                              "context" : "p"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "type",
                              "contextType" : "variable",
                              "element" : "coding",
                              "variable" : "coding"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "codice",
                              "source" : [
                                {
                                  "context" : "p"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "p.typeCode"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "system",
                              "source" : [
                                {
                                  "context" : "p"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "partRole",
                  "source" : [
                    {
                      "context" : "participant",
                      "element" : "participantRole",
                      "variable" : "participantRole"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e12"
                    },
                    {
                      "context" : "e12",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e12",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "practitionerRole",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "PractitionerRole"
                        }
                      ]
                    },
                    {
                      "context" : "practitionerRole",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid12",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e12",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/PractitionerRole/"
                        },
                        {
                          "valueId" : "uuid12"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "PractitionerRole"
                        }
                      ]
                    },
                    {
                      "context" : "encounter",
                      "contextType" : "variable",
                      "element" : "participant",
                      "variable" : "participant1",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "participant1",
                      "contextType" : "variable",
                      "element" : "individual",
                      "variable" : "referencepart",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "referencepart",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/Practitioner/' + %practitionerRole.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "time",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "time",
                          "variable" : "time1"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "participant1",
                          "contextType" : "variable",
                          "element" : "period",
                          "variable" : "period",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Period"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "val",
                          "source" : [
                            {
                              "context" : "time1"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "period",
                              "contextType" : "variable",
                              "element" : "start",
                              "variable" : "start",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "dateTime"
                                }
                              ]
                            }
                          ],
                          "dependent" : [
                            {
                              "name" : "TSDateTime",
                              "variable" : [
                                "time1",
                                "start"
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "participant.time -> participant1.period;"
                    },
                    {
                      "name" : "time",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "time",
                          "variable" : "time1"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "participant1",
                          "contextType" : "variable",
                          "element" : "period",
                          "variable" : "period",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Period"
                            }
                          ]
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "IVLTSPeriod",
                          "variable" : [
                            "time1",
                            "period"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "functionCode",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "functionCode",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "practitioner",
                      "source" : [
                        {
                          "context" : "participantRole"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e13"
                        },
                        {
                          "context" : "e13",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e13",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "practitioner",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Practitioner"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "participantRole"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "participantRole"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/observation/participant"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "org",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid4",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e13",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Practitioner/"
                                        },
                                        {
                                          "valueId" : "uuid4"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "practitioner",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "playingEntity",
                              "variable" : "playingEntity"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "playingEntity",
                                  "element" : "name",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "birth",
                              "source" : [
                                {
                                  "context" : "playingEntity",
                                  "element" : "birthTime",
                                  "variable" : "birthTime"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "birthTime",
                                      "element" : "value",
                                      "variable" : "date"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "birthDate",
                                      "transform" : "truncate",
                                      "parameter" : [
                                        {
                                          "valueId" : "date"
                                        },
                                        {
                                          "valueInteger" : 10
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "non mappa i 2 precedenti"
                    }
                  ]
                }
              ],
              "documentation" : "participant person"
            },
            {
              "name" : "devParticipant",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "participant",
                  "variable" : "devParticipant",
                  "condition" : "(typeCode = 'DEV')"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e14"
                },
                {
                  "context" : "e14",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e14",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "device",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Device"
                    }
                  ]
                },
                {
                  "context" : "device",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid14",
                  "transform" : "uuid"
                },
                {
                  "context" : "e14",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/Device/"
                    },
                    {
                      "valueId" : "uuid14"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "Device"
                    }
                  ]
                },
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "device",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Device/' + %device.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "participantRoleDev",
                  "source" : [
                    {
                      "context" : "devParticipant",
                      "element" : "participantRole",
                      "variable" : "participantRoleDev"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "playingDevice",
                      "source" : [
                        {
                          "context" : "participantRoleDev",
                          "element" : "playingDevice",
                          "variable" : "playingDevice"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "playingDevice",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "manufacturer",
                          "source" : [
                            {
                              "context" : "playingDevice",
                              "element" : "manufacturerModelName",
                              "variable" : "manufacturerModelName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "displayRule",
                              "source" : [
                                {
                                  "context" : "manufacturerModelName",
                                  "variable" : "m"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "device",
                                  "contextType" : "variable",
                                  "element" : "manufacturer",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "m.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "deviceName",
                          "source" : [
                            {
                              "context" : "playingDevice",
                              "element" : "softwareName",
                              "variable" : "softwareName"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "deviceName",
                              "variable" : "deviceName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "typeName",
                              "source" : [
                                {
                                  "context" : "softwareName"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "other"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "softwareName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "s.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "participant device"
            },
            {
              "name" : "observationMedia",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "entryRelationship",
                  "variable" : "er"
                }
              ],
              "rule" : [
                {
                  "name" : "media",
                  "source" : [
                    {
                      "context" : "er",
                      "element" : "observationMedia",
                      "variable" : "obsMedia"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e15"
                    },
                    {
                      "context" : "e15",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e15",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "media1",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Media"
                        }
                      ]
                    },
                    {
                      "context" : "media1",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid15",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e15",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/Media/"
                        },
                        {
                          "valueId" : "uuid15"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "Media"
                        }
                      ]
                    },
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "derivedFrom",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/Media/' + %media1.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "Attachment",
                      "source" : [
                        {
                          "context" : "obsMedia"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "media1",
                          "contextType" : "variable",
                          "element" : "content",
                          "variable" : "Attachment",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Attachment"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "status",
                          "source" : [
                            {
                              "context" : "obsMedia"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "media1",
                              "contextType" : "variable",
                              "element" : "status",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "unknown"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "valuemedia",
                          "source" : [
                            {
                              "context" : "obsMedia",
                              "element" : "value",
                              "variable" : "valueMedia"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "type",
                              "source" : [
                                {
                                  "context" : "valueMedia",
                                  "element" : "mediaType",
                                  "variable" : "type"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "Attachment",
                                  "contextType" : "variable",
                                  "element" : "contentType",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "type"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "data",
                              "source" : [
                                {
                                  "context" : "valueMedia"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "Attachment",
                                  "contextType" : "variable",
                                  "element" : "data",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "valueMedia.dataBase64Binary"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "observationMedia"
            },
            {
              "name" : "ref",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "referenceRange",
                  "variable" : "refRange"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "referenceRange",
                  "variable" : "ref",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "refRange",
                  "source" : [
                    {
                      "context" : "refRange",
                      "element" : "observationRange",
                      "variable" : "obsRange"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "value",
                      "source" : [
                        {
                          "context" : "obsRange",
                          "type" : "ST",
                          "element" : "value",
                          "variable" : "value"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ref",
                          "contextType" : "variable",
                          "element" : "text",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "string"
                            }
                          ]
                        },
                        {
                          "context" : "ref",
                          "contextType" : "variable",
                          "element" : "text",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "value.dataString"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "obsRange",
                      "source" : [
                        {
                          "context" : "obsRange"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ref",
                          "contextType" : "variable",
                          "element" : "low",
                          "variable" : "Low",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Quantity"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "IVL-PQ",
                          "source" : [
                            {
                              "context" : "obsRange",
                              "type" : "IVL_PQ",
                              "element" : "value",
                              "variable" : "v"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "decValue",
                              "source" : [
                                {
                                  "context" : "v",
                                  "element" : "low",
                                  "variable" : "l1"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "l1",
                                      "element" : "value",
                                      "variable" : "decValue"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "Low",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "decValue"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "unit",
                                  "source" : [
                                    {
                                      "context" : "l1",
                                      "element" : "unit",
                                      "variable" : "Unit"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "Low",
                                      "contextType" : "variable",
                                      "element" : "unit",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "Unit"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "high",
                              "source" : [
                                {
                                  "context" : "v"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "ref",
                                  "contextType" : "variable",
                                  "element" : "high",
                                  "variable" : "high",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Quantity"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "decValue",
                                  "source" : [
                                    {
                                      "context" : "v",
                                      "element" : "high",
                                      "variable" : "h1"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "value",
                                      "source" : [
                                        {
                                          "context" : "h1",
                                          "element" : "value",
                                          "variable" : "decValue1"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "high",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "decValue1"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "unit",
                                      "source" : [
                                        {
                                          "context" : "h1",
                                          "element" : "unit",
                                          "variable" : "Unit1"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "high",
                                          "contextType" : "variable",
                                          "element" : "unit",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "Unit1"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "interpretationCode",
                          "source" : [
                            {
                              "context" : "obsRange",
                              "element" : "interpretationCode",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "ref",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "precondition",
                          "source" : [
                            {
                              "context" : "obsRange",
                              "element" : "precondition",
                              "variable" : "precondition"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "criterion",
                              "source" : [
                                {
                                  "context" : "precondition",
                                  "element" : "criterion",
                                  "variable" : "criterion"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "appliesTo",
                                  "source" : [
                                    {
                                      "context" : "criterion",
                                      "element" : "code",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "ref",
                                      "contextType" : "variable",
                                      "element" : "appliesTo",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "v",
                                  "source" : [
                                    {
                                      "context" : "criterion",
                                      "type" : "IVL_PQ",
                                      "element" : "value",
                                      "variable" : "v"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "low",
                                      "source" : [
                                        {
                                          "context" : "v",
                                          "element" : "high",
                                          "variable" : "l1"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "age",
                                          "source" : [
                                            {
                                              "context" : "l1"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "ref",
                                              "contextType" : "variable",
                                              "element" : "age",
                                              "variable" : "age",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Quantity"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "high",
                                              "source" : [
                                                {
                                                  "context" : "l1"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "age",
                                                  "contextType" : "variable",
                                                  "element" : "high",
                                                  "variable" : "high"
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "value",
                                                  "source" : [
                                                    {
                                                      "context" : "l1",
                                                      "element" : "value",
                                                      "variable" : "decValue"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "high",
                                                      "contextType" : "variable",
                                                      "element" : "value",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueId" : "decValue"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "name" : "unit",
                                                  "source" : [
                                                    {
                                                      "context" : "l1",
                                                      "element" : "unit",
                                                      "variable" : "Unit1"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "high",
                                                      "contextType" : "variable",
                                                      "element" : "unit",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueId" : "Unit1"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "referenceRange"
            }
          ]
        },
        {
          "name" : "Observation2",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "obs",
              "type" : "Observation",
              "mode" : "source"
            },
            {
              "name" : "patient",
              "type" : "Patient",
              "mode" : "target"
            },
            {
              "name" : "encounter",
              "type" : "Encounter",
              "mode" : "target"
            },
            {
              "name" : "ob",
              "type" : "Observation",
              "mode" : "target"
            },
            {
              "name" : "bundle",
              "type" : "Bundle",
              "mode" : "target"
            },
            {
              "name" : "cda",
              "type" : "Act",
              "mode" : "source"
            },
            {
              "name" : "specimenp",
              "type" : "Specimen",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "obs"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "subject",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Patient/' + %patient.id"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "obs"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "encounter",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Encounter/' + %encounter.id"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "code",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "code",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "code",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'completed')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "final"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'active')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "registered"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'aborted')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "cancelled"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'suspended')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "partial"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "value2",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "effectiveTime",
                  "variable" : "effectiveTime"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "effective",
                  "variable" : "value",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "dateTime"
                    }
                  ]
                }
              ],
              "dependent" : [
                {
                  "name" : "TSDateTime",
                  "variable" : [
                    "effectiveTime",
                    "value"
                  ]
                }
              ]
            },
            {
              "name" : "where",
              "source" : [
                {
                  "context" : "obs",
                  "condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
                }
              ],
              "rule" : [
                {
                  "name" : "effectiveTime",
                  "source" : [
                    {
                      "context" : "obs",
                      "element" : "effectiveTime",
                      "variable" : "eff"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "effective",
                      "variable" : "period",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Period"
                        }
                      ]
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "IVLTSPeriod",
                      "variable" : [
                        "eff",
                        "period"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "interpretationCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "interpretationCode",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "interpretation",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "methodCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "methodCode",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "method",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "value",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "INT",
                  "element" : "value",
                  "variable" : "int"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "int.value"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "boolean",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "BL",
                  "element" : "value",
                  "variable" : "boolean"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "boolean.value"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "val",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "CE",
                  "element" : "value",
                  "variable" : "val"
                }
              ],
              "rule" : [
                {
                  "name" : "coding",
                  "source" : [
                    {
                      "context" : "val"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "value",
                      "variable" : "ce",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "CodeableConcept"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "originltext",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "originalText",
                          "variable" : "originalText"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "reference",
                          "source" : [
                            {
                              "context" : "originalText",
                              "element" : "reference",
                              "variable" : "reference"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "ce",
                              "contextType" : "variable",
                              "element" : "text",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueId" : "reference"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "val"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ce",
                          "contextType" : "variable",
                          "element" : "coding",
                          "variable" : "coding"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "val",
                              "element" : "code",
                              "variable" : "code"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "code",
                              "transform" : "cast",
                              "parameter" : [
                                {
                                  "valueId" : "code"
                                },
                                {
                                  "valueString" : "string"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "codeSystem",
                          "source" : [
                            {
                              "context" : "val",
                              "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" : "val",
                              "element" : "displayName",
                              "variable" : "display"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "display",
                              "transform" : "cast",
                              "parameter" : [
                                {
                                  "valueId" : "display"
                                },
                                {
                                  "valueString" : "string"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "codeSystemVersion",
                          "source" : [
                            {
                              "context" : "val",
                              "element" : "codeSystemVersion",
                              "variable" : "version"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "version",
                              "transform" : "cast",
                              "parameter" : [
                                {
                                  "valueId" : "version"
                                },
                                {
                                  "valueString" : "string"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "translation",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "translation",
                          "variable" : "translation"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ce",
                          "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" : "value",
                              "source" : [
                                {
                                  "context" : "qualifier",
                                  "element" : "value",
                                  "variable" : "value"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "ce",
                                  "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" : "valueQuantity",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "PQ",
                  "element" : "value",
                  "variable" : "val"
                }
              ],
              "rule" : [
                {
                  "name" : "quantity",
                  "source" : [
                    {
                      "context" : "val"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "value",
                      "variable" : "quantity",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Quantity"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "value",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "value",
                          "variable" : "value"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "quantity",
                          "contextType" : "variable",
                          "element" : "value",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "value"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "unit",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "unit",
                          "variable" : "unit"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "quantity",
                          "contextType" : "variable",
                          "element" : "unit",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "unit"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "value",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "ST",
                  "element" : "value",
                  "variable" : "value"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "string"
                    }
                  ]
                },
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "value.dataString"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "entryRelationship",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "entryRelationship",
                  "variable" : "entryRelationship"
                }
              ],
              "rule" : [
                {
                  "name" : "Act",
                  "source" : [
                    {
                      "context" : "entryRelationship",
                      "element" : "act",
                      "variable" : "act"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "text",
                      "source" : [
                        {
                          "context" : "act",
                          "element" : "text",
                          "variable" : "text"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "reference",
                          "source" : [
                            {
                              "context" : "text",
                              "element" : "reference",
                              "variable" : "reference"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "ob",
                              "contextType" : "variable",
                              "element" : "note",
                              "variable" : "note"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "reference",
                              "source" : [
                                {
                                  "context" : "reference"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "note",
                                  "contextType" : "variable",
                                  "element" : "text",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "reference.value"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "Note e commenti"
            },
            {
              "name" : "subject",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "subject",
                  "variable" : "sbj"
                }
              ],
              "rule" : [
                {
                  "name" : "relatedSubject",
                  "source" : [
                    {
                      "context" : "sbj",
                      "element" : "relatedSubject",
                      "variable" : "relatedSubj"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "patient",
                      "contextType" : "variable",
                      "element" : "extension",
                      "variable" : "extension2"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "ExtSubjectAnimal",
                      "variable" : [
                        "relatedSubj",
                        "extension2"
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "subject"
            },
            {
              "name" : "conditionactexists",
              "source" : [
                {
                  "context" : "cda",
                  "condition" : "cda.entryRelationship.act.exists()"
                }
              ],
              "rule" : [
                {
                  "name" : "specimen",
                  "source" : [
                    {
                      "context" : "obs",
                      "element" : "specimen",
                      "variable" : "spmn"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "specimenRole",
                      "source" : [
                        {
                          "context" : "spmn",
                          "element" : "specimenRole",
                          "variable" : "specimenRole"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "id",
                          "source" : [
                            {
                              "context" : "specimenRole",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "extobs",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "extobs"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "en",
                                  "source" : [
                                    {
                                      "context" : "cda",
                                      "element" : "entryRelationship",
                                      "variable" : "entryRelationship"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "a",
                                      "source" : [
                                        {
                                          "context" : "entryRelationship",
                                          "element" : "act",
                                          "variable" : "a"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "sp",
                                          "source" : [
                                            {
                                              "context" : "a",
                                              "element" : "specimen",
                                              "variable" : "sp"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "spr",
                                              "source" : [
                                                {
                                                  "context" : "sp",
                                                  "element" : "specimenRole",
                                                  "variable" : "spr"
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "cont",
                                                  "source" : [
                                                    {
                                                      "context" : "spr",
                                                      "element" : "id",
                                                      "condition" : "(extension = extobs)"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "bundle",
                                                      "contextType" : "variable",
                                                      "element" : "entry",
                                                      "variable" : "e4o"
                                                    },
                                                    {
                                                      "context" : "e4o",
                                                      "contextType" : "variable",
                                                      "element" : "request",
                                                      "variable" : "request",
                                                      "transform" : "create",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "BackboneElement"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "request",
                                                      "contextType" : "variable",
                                                      "element" : "method",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "POST"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "e4o",
                                                      "contextType" : "variable",
                                                      "element" : "resource",
                                                      "variable" : "specimen",
                                                      "transform" : "create",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "Specimen"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "specimen",
                                                      "contextType" : "variable",
                                                      "element" : "id",
                                                      "variable" : "uuid4o",
                                                      "transform" : "uuid"
                                                    },
                                                    {
                                                      "context" : "e4o",
                                                      "contextType" : "variable",
                                                      "element" : "fullUrl",
                                                      "transform" : "append",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "https://example/Specimen/"
                                                        },
                                                        {
                                                          "valueId" : "uuid4o"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "request",
                                                      "contextType" : "variable",
                                                      "element" : "url",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "Specimen"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "ob",
                                                      "contextType" : "variable",
                                                      "element" : "specimen",
                                                      "variable" : "reference",
                                                      "transform" : "create",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "Reference"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "reference",
                                                      "contextType" : "variable",
                                                      "element" : "reference",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "'https://example/Specimen/' + %specimen.id"
                                                        }
                                                      ]
                                                    }
                                                  ],
                                                  "rule" : [
                                                    {
                                                      "name" : "reference",
                                                      "source" : [
                                                        {
                                                          "context" : "spr"
                                                        }
                                                      ],
                                                      "target" : [
                                                        {
                                                          "context" : "specimen",
                                                          "contextType" : "variable",
                                                          "element" : "parent",
                                                          "variable" : "reference",
                                                          "transform" : "create",
                                                          "parameter" : [
                                                            {
                                                              "valueString" : "Reference"
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "context" : "reference",
                                                          "contextType" : "variable",
                                                          "element" : "reference",
                                                          "transform" : "evaluate",
                                                          "parameter" : [
                                                            {
                                                              "valueString" : "'https://example/Specimen/' + %specimenp.id"
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "name" : "id",
                                                      "source" : [
                                                        {
                                                          "context" : "spr",
                                                          "element" : "id",
                                                          "variable" : "vvv"
                                                        }
                                                      ],
                                                      "target" : [
                                                        {
                                                          "context" : "specimen",
                                                          "contextType" : "variable",
                                                          "element" : "identifier",
                                                          "variable" : "vvv",
                                                          "transform" : "create"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "name" : "ent",
                                                      "source" : [
                                                        {
                                                          "context" : "specimenRole",
                                                          "element" : "specimenPlayingEntity",
                                                          "variable" : "spent"
                                                        }
                                                      ],
                                                      "rule" : [
                                                        {
                                                          "name" : "code",
                                                          "source" : [
                                                            {
                                                              "context" : "spent",
                                                              "element" : "code",
                                                              "variable" : "vvv"
                                                            }
                                                          ],
                                                          "target" : [
                                                            {
                                                              "context" : "specimen",
                                                              "contextType" : "variable",
                                                              "element" : "type",
                                                              "variable" : "vvv",
                                                              "transform" : "create"
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "name" : "specimenPlayingEntity",
                                                      "source" : [
                                                        {
                                                          "context" : "spr",
                                                          "element" : "specimenPlayingEntity",
                                                          "variable" : "specimenPlayingEntity"
                                                        }
                                                      ],
                                                      "rule" : [
                                                        {
                                                          "name" : "code",
                                                          "source" : [
                                                            {
                                                              "context" : "specimenPlayingEntity",
                                                              "element" : "code",
                                                              "variable" : "vvv"
                                                            }
                                                          ],
                                                          "target" : [
                                                            {
                                                              "context" : "specimen",
                                                              "contextType" : "variable",
                                                              "element" : "type",
                                                              "variable" : "vvv",
                                                              "transform" : "create"
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "name" : "collection",
                                                      "source" : [
                                                        {
                                                          "context" : "a"
                                                        }
                                                      ],
                                                      "target" : [
                                                        {
                                                          "context" : "specimen",
                                                          "contextType" : "variable",
                                                          "element" : "collection",
                                                          "variable" : "collection",
                                                          "transform" : "create",
                                                          "parameter" : [
                                                            {
                                                              "valueString" : "BackboneElement"
                                                            }
                                                          ]
                                                        }
                                                      ],
                                                      "rule" : [
                                                        {
                                                          "name" : "value",
                                                          "source" : [
                                                            {
                                                              "context" : "a",
                                                              "element" : "effectiveTime",
                                                              "variable" : "effectivetime"
                                                            }
                                                          ],
                                                          "target" : [
                                                            {
                                                              "context" : "collection",
                                                              "contextType" : "variable",
                                                              "element" : "collected",
                                                              "variable" : "value",
                                                              "transform" : "create",
                                                              "parameter" : [
                                                                {
                                                                  "valueString" : "dateTime"
                                                                }
                                                              ]
                                                            }
                                                          ],
                                                          "dependent" : [
                                                            {
                                                              "name" : "TSDateTime",
                                                              "variable" : [
                                                                "effectivetime",
                                                                "value"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "name" : "where",
                                                          "source" : [
                                                            {
                                                              "context" : "a",
                                                              "condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
                                                            }
                                                          ],
                                                          "rule" : [
                                                            {
                                                              "name" : "effectiveTime",
                                                              "source" : [
                                                                {
                                                                  "context" : "a",
                                                                  "element" : "effectiveTime",
                                                                  "variable" : "eff"
                                                                }
                                                              ],
                                                              "target" : [
                                                                {
                                                                  "context" : "collection",
                                                                  "contextType" : "variable",
                                                                  "element" : "collected",
                                                                  "variable" : "period",
                                                                  "transform" : "create",
                                                                  "parameter" : [
                                                                    {
                                                                      "valueString" : "Period"
                                                                    }
                                                                  ]
                                                                }
                                                              ],
                                                              "dependent" : [
                                                                {
                                                                  "name" : "IVLTSPeriod",
                                                                  "variable" : [
                                                                    "eff",
                                                                    "period"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "name" : "participant",
                                                          "source" : [
                                                            {
                                                              "context" : "a",
                                                              "element" : "participant",
                                                              "variable" : "participant"
                                                            }
                                                          ],
                                                          "target" : [
                                                            {
                                                              "context" : "bundle",
                                                              "contextType" : "variable",
                                                              "element" : "entry",
                                                              "variable" : "e10"
                                                            },
                                                            {
                                                              "context" : "e10",
                                                              "contextType" : "variable",
                                                              "element" : "request",
                                                              "variable" : "request",
                                                              "transform" : "create",
                                                              "parameter" : [
                                                                {
                                                                  "valueString" : "BackboneElement"
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "context" : "request",
                                                              "contextType" : "variable",
                                                              "element" : "method",
                                                              "transform" : "copy",
                                                              "parameter" : [
                                                                {
                                                                  "valueString" : "PUT"
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "context" : "e10",
                                                              "contextType" : "variable",
                                                              "element" : "resource",
                                                              "variable" : "practitioner",
                                                              "transform" : "create",
                                                              "parameter" : [
                                                                {
                                                                  "valueString" : "Practitioner"
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "context" : "practitioner",
                                                              "contextType" : "variable",
                                                              "element" : "id",
                                                              "variable" : "uuid11",
                                                              "transform" : "uuid"
                                                            },
                                                            {
                                                              "context" : "e10",
                                                              "contextType" : "variable",
                                                              "element" : "fullUrl",
                                                              "transform" : "append",
                                                              "parameter" : [
                                                                {
                                                                  "valueString" : "https://example/Practitioner/"
                                                                },
                                                                {
                                                                  "valueId" : "uuid11"
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "context" : "collection",
                                                              "contextType" : "variable",
                                                              "element" : "collector",
                                                              "variable" : "reference",
                                                              "transform" : "create",
                                                              "parameter" : [
                                                                {
                                                                  "valueString" : "Reference"
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "context" : "reference",
                                                              "contextType" : "variable",
                                                              "element" : "reference",
                                                              "transform" : "evaluate",
                                                              "parameter" : [
                                                                {
                                                                  "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                                                }
                                                              ]
                                                            }
                                                          ],
                                                          "rule" : [
                                                            {
                                                              "name" : "participantRole",
                                                              "source" : [
                                                                {
                                                                  "context" : "participant",
                                                                  "element" : "participantRole",
                                                                  "variable" : "participantRole"
                                                                }
                                                              ],
                                                              "rule" : [
                                                                {
                                                                  "name" : "meta",
                                                                  "source" : [
                                                                    {
                                                                      "context" : "participantRole"
                                                                    }
                                                                  ],
                                                                  "target" : [
                                                                    {
                                                                      "context" : "practitioner",
                                                                      "contextType" : "variable",
                                                                      "element" : "meta",
                                                                      "variable" : "meta"
                                                                    }
                                                                  ],
                                                                  "rule" : [
                                                                    {
                                                                      "name" : "coding",
                                                                      "source" : [
                                                                        {
                                                                          "context" : "participantRole"
                                                                        }
                                                                      ],
                                                                      "target" : [
                                                                        {
                                                                          "context" : "meta",
                                                                          "contextType" : "variable",
                                                                          "element" : "tag",
                                                                          "variable" : "coding",
                                                                          "transform" : "create",
                                                                          "parameter" : [
                                                                            {
                                                                              "valueString" : "Coding"
                                                                            }
                                                                          ]
                                                                        }
                                                                      ],
                                                                      "rule" : [
                                                                        {
                                                                          "name" : "system",
                                                                          "source" : [
                                                                            {
                                                                              "context" : "participantRole"
                                                                            }
                                                                          ],
                                                                          "target" : [
                                                                            {
                                                                              "context" : "coding",
                                                                              "contextType" : "variable",
                                                                              "element" : "system",
                                                                              "transform" : "copy",
                                                                              "parameter" : [
                                                                                {
                                                                                  "valueString" : "http://algoritmodiscoring"
                                                                                }
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "name" : "code",
                                                                          "source" : [
                                                                            {
                                                                              "context" : "participantRole"
                                                                            }
                                                                          ],
                                                                          "target" : [
                                                                            {
                                                                              "context" : "coding",
                                                                              "contextType" : "variable",
                                                                              "element" : "code",
                                                                              "transform" : "copy",
                                                                              "parameter" : [
                                                                                {
                                                                                  "valueString" : "ClinicalDocument/body/act/participant"
                                                                                }
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "name" : "identifier",
                                                                  "source" : [
                                                                    {
                                                                      "context" : "participantRole",
                                                                      "element" : "id",
                                                                      "variable" : "id"
                                                                    }
                                                                  ],
                                                                  "target" : [
                                                                    {
                                                                      "context" : "practitioner",
                                                                      "contextType" : "variable",
                                                                      "element" : "identifier",
                                                                      "variable" : "identifier"
                                                                    }
                                                                  ],
                                                                  "rule" : [
                                                                    {
                                                                      "name" : "root1",
                                                                      "source" : [
                                                                        {
                                                                          "context" : "id",
                                                                          "element" : "root",
                                                                          "variable" : "r"
                                                                        }
                                                                      ],
                                                                      "target" : [
                                                                        {
                                                                          "context" : "identifier",
                                                                          "contextType" : "variable",
                                                                          "element" : "system",
                                                                          "transform" : "translate",
                                                                          "parameter" : [
                                                                            {
                                                                              "valueId" : "r"
                                                                            },
                                                                            {
                                                                              "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                                                            },
                                                                            {
                                                                              "valueString" : "uri"
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "name" : "ext",
                                                                      "source" : [
                                                                        {
                                                                          "context" : "id",
                                                                          "element" : "extension",
                                                                          "variable" : "ext"
                                                                        }
                                                                      ],
                                                                      "target" : [
                                                                        {
                                                                          "context" : "identifier",
                                                                          "contextType" : "variable",
                                                                          "element" : "value",
                                                                          "transform" : "copy",
                                                                          "parameter" : [
                                                                            {
                                                                              "valueId" : "ext"
                                                                            }
                                                                          ]
                                                                        }
                                                                      ],
                                                                      "rule" : [
                                                                        {
                                                                          "name" : "UUID",
                                                                          "source" : [
                                                                            {
                                                                              "context" : "participantRole"
                                                                            }
                                                                          ],
                                                                          "target" : [
                                                                            {
                                                                              "context" : "request",
                                                                              "contextType" : "variable",
                                                                              "element" : "url",
                                                                              "transform" : "append",
                                                                              "parameter" : [
                                                                                {
                                                                                  "valueString" : "Practitioner?identifier="
                                                                                },
                                                                                {
                                                                                  "valueId" : "ext"
                                                                                }
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "name" : "assigningAuthorityName",
                                                                      "source" : [
                                                                        {
                                                                          "context" : "id",
                                                                          "element" : "assigningAuthorityName",
                                                                          "variable" : "s"
                                                                        }
                                                                      ],
                                                                      "target" : [
                                                                        {
                                                                          "context" : "identifier",
                                                                          "contextType" : "variable",
                                                                          "element" : "assigner",
                                                                          "variable" : "a"
                                                                        },
                                                                        {
                                                                          "context" : "a",
                                                                          "contextType" : "variable",
                                                                          "element" : "display",
                                                                          "transform" : "copy",
                                                                          "parameter" : [
                                                                            {
                                                                              "valueId" : "s"
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "name" : "addr",
                                                                  "source" : [
                                                                    {
                                                                      "context" : "participantRole",
                                                                      "element" : "addr",
                                                                      "variable" : "vvv"
                                                                    }
                                                                  ],
                                                                  "target" : [
                                                                    {
                                                                      "context" : "practitioner",
                                                                      "contextType" : "variable",
                                                                      "element" : "address",
                                                                      "variable" : "vvv",
                                                                      "transform" : "create"
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "name" : "playingEntity",
                                                                  "source" : [
                                                                    {
                                                                      "context" : "participantRole",
                                                                      "element" : "playingEntity",
                                                                      "variable" : "playingEntity"
                                                                    }
                                                                  ],
                                                                  "rule" : [
                                                                    {
                                                                      "name" : "name",
                                                                      "source" : [
                                                                        {
                                                                          "context" : "playingEntity",
                                                                          "element" : "name",
                                                                          "variable" : "vvv"
                                                                        }
                                                                      ],
                                                                      "target" : [
                                                                        {
                                                                          "context" : "practitioner",
                                                                          "contextType" : "variable",
                                                                          "element" : "name",
                                                                          "variable" : "vvv",
                                                                          "transform" : "create"
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "documentation" : "specimen"
                }
              ]
            },
            {
              "name" : "wherenotexists",
              "source" : [
                {
                  "context" : "cda",
                  "condition" : "cda.entryRelationship.act.exists().not() and (obs.specimen.specimenRole.specimenPlayingEntity.code.code != specimenp.type.coding.code)"
                }
              ],
              "rule" : [
                {
                  "name" : "specimen",
                  "source" : [
                    {
                      "context" : "obs",
                      "element" : "specimen",
                      "variable" : "spmn"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e4o"
                    },
                    {
                      "context" : "e4o",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e4o",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "specimen",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Specimen"
                        }
                      ]
                    },
                    {
                      "context" : "specimen",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid4o",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e4o",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/Specimen/"
                        },
                        {
                          "valueId" : "uuid4o"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "Specimen"
                        }
                      ]
                    },
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "specimen",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/Specimen/' + %specimen.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "specimenRole",
                      "source" : [
                        {
                          "context" : "spmn",
                          "element" : "specimenRole",
                          "variable" : "specimenRole"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "id",
                          "source" : [
                            {
                              "context" : "specimenRole",
                              "element" : "id",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "specimen",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "specimenPlayingEntity",
                          "source" : [
                            {
                              "context" : "specimenRole",
                              "element" : "specimenPlayingEntity",
                              "variable" : "specimenPlayingEntity"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "specimenPlayingEntity",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "specimen",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "performer",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "performer",
                  "variable" : "performer"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e1"
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/PractitionerRole/"
                    },
                    {
                      "valueId" : "uuid1"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "practitionerRole",
                  "source" : [
                    {
                      "context" : "performer"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "performer",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "entity",
                      "source" : [
                        {
                          "context" : "performer",
                          "element" : "assignedEntity",
                          "variable" : "entity"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "entity",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "practitioner",
                          "source" : [
                            {
                              "context" : "entity"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e2"
                            },
                            {
                              "context" : "e2",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e2",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "practitioner",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Practitioner"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "entity"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "meta",
                                  "variable" : "meta"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "coding",
                                  "source" : [
                                    {
                                      "context" : "entity"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "meta",
                                      "contextType" : "variable",
                                      "element" : "tag",
                                      "variable" : "coding",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Coding"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "system",
                                      "source" : [
                                        {
                                          "context" : "entity"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "http://algoritmodiscoring"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "entity"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "code",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "ClinicalDocument/body/observation/performer"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "identifier",
                                  "variable" : "identifier"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "root1",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "translate",
                                      "parameter" : [
                                        {
                                          "valueId" : "r"
                                        },
                                        {
                                          "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                        },
                                        {
                                          "valueString" : "uri"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "ext",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "UUID",
                                      "source" : [
                                        {
                                          "context" : "entity"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "url",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "Practitioner?identifier="
                                            },
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "assigningAuthorityName",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "assigningAuthorityName",
                                      "variable" : "s"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "assigner",
                                      "variable" : "a"
                                    },
                                    {
                                      "context" : "a",
                                      "contextType" : "variable",
                                      "element" : "display",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "s"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "r",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "performer",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "practitioner",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid2",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e2",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Practitioner/"
                                            },
                                            {
                                              "valueId" : "uuid2"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "practitionerRole",
                                          "contextType" : "variable",
                                          "element" : "practitioner",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "2.16.840.1.113883.2.9.4.3.2",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "diverso",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "addr",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "addr",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "address",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "telecom",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "telecom",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "telecom",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "assignedPerson",
                                  "variable" : "person"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "person",
                                      "element" : "name",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "birth",
                                  "source" : [
                                    {
                                      "context" : "person",
                                      "element" : "birthTime",
                                      "variable" : "birthTime"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "value",
                                      "source" : [
                                        {
                                          "context" : "birthTime",
                                          "element" : "value",
                                          "variable" : "date"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "practitioner",
                                          "contextType" : "variable",
                                          "element" : "birthDate",
                                          "transform" : "truncate",
                                          "parameter" : [
                                            {
                                              "valueId" : "date"
                                            },
                                            {
                                              "valueInteger" : 10
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "representedOrganization",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "representedOrganization",
                                  "variable" : "representedOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e3"
                                },
                                {
                                  "context" : "e3",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e3",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "organization",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "representedOrganization"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "representedOrganization"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "representedOrganization"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/body/observation/performer/representedOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "identifier",
                                      "variable" : "identifier"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "root1",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "translate",
                                          "parameter" : [
                                            {
                                              "valueId" : "r"
                                            },
                                            {
                                              "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                            },
                                            {
                                              "valueString" : "uri"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "ext",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "UUID",
                                          "source" : [
                                            {
                                              "context" : "representedOrganization"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "request",
                                              "contextType" : "variable",
                                              "element" : "url",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Organization?identifier="
                                                },
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "assigningAuthorityName",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "assigningAuthorityName",
                                          "variable" : "s"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "assigner",
                                          "variable" : "a"
                                        },
                                        {
                                          "context" : "a",
                                          "contextType" : "variable",
                                          "element" : "display",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "s"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "r",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "aut",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid3",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e3",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid3"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "practitionerRole",
                                              "contextType" : "variable",
                                              "element" : "organization",
                                              "variable" : "referenceOrg",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "referenceOrg",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid3"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "OrgPartOf",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "asOrganizationPartOf",
                                      "variable" : "OrgPartOf"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "bundle",
                                      "contextType" : "variable",
                                      "element" : "entry",
                                      "variable" : "e4"
                                    },
                                    {
                                      "context" : "e4",
                                      "contextType" : "variable",
                                      "element" : "request",
                                      "variable" : "request",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "BackboneElement"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e4",
                                      "contextType" : "variable",
                                      "element" : "resource",
                                      "variable" : "organization1",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Organization"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "method",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "PUT"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "meta",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "meta",
                                          "variable" : "meta"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "coding",
                                          "source" : [
                                            {
                                              "context" : "OrgPartOf"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "meta",
                                              "contextType" : "variable",
                                              "element" : "tag",
                                              "variable" : "coding",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Coding"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "system",
                                              "source" : [
                                                {
                                                  "context" : "OrgPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "coding",
                                                  "contextType" : "variable",
                                                  "element" : "system",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "http://algoritmodiscoring"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "code",
                                              "source" : [
                                                {
                                                  "context" : "OrgPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "coding",
                                                  "contextType" : "variable",
                                                  "element" : "code",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "identifier",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "id",
                                          "variable" : "id"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "identifier",
                                          "variable" : "identifier"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "root1",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "root",
                                              "variable" : "r"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "identifier",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "translate",
                                              "parameter" : [
                                                {
                                                  "valueId" : "r"
                                                },
                                                {
                                                  "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                                },
                                                {
                                                  "valueString" : "uri"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "ext",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "identifier",
                                              "contextType" : "variable",
                                              "element" : "value",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "UUID",
                                              "source" : [
                                                {
                                                  "context" : "OrgPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "request",
                                                  "contextType" : "variable",
                                                  "element" : "url",
                                                  "transform" : "append",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Organization?identifier="
                                                    },
                                                    {
                                                      "valueId" : "ext"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "assigningAuthorityName",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "assigningAuthorityName",
                                              "variable" : "s"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "identifier",
                                              "contextType" : "variable",
                                              "element" : "assigner",
                                              "variable" : "a"
                                            },
                                            {
                                              "context" : "a",
                                              "contextType" : "variable",
                                              "element" : "display",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueId" : "s"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "r",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "root",
                                              "variable" : "r"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "org",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "extension",
                                                  "variable" : "ext"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "organization1",
                                                  "contextType" : "variable",
                                                  "element" : "id",
                                                  "variable" : "uuid4",
                                                  "transform" : "evaluate",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "r + '-' + ext"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "e4",
                                                  "contextType" : "variable",
                                                  "element" : "fullUrl",
                                                  "transform" : "append",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "https://example/Organization/"
                                                    },
                                                    {
                                                      "valueId" : "uuid4"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "organization",
                                                  "contextType" : "variable",
                                                  "element" : "partOf",
                                                  "variable" : "reference",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Reference"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "reference",
                                                  "contextType" : "variable",
                                                  "element" : "reference",
                                                  "transform" : "evaluate",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "'https://example/Organization/' + %organization1.id"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "code",
                                          "variable" : "vvv"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "type",
                                          "variable" : "vvv",
                                          "transform" : "create"
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "statusCode",
                                          "variable" : "status",
                                          "condition" : "(value = 'active')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "active",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "boolean"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "active",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "true"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "wholeOrganization",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "wholeOrganization",
                                          "variable" : "wholeOrgan"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "bundle",
                                          "contextType" : "variable",
                                          "element" : "entry",
                                          "variable" : "e5"
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "request",
                                          "variable" : "request",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "BackboneElement"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "method",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "PUT"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "resource",
                                          "variable" : "organization2",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Organization"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "meta",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "meta",
                                              "variable" : "meta"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "coding",
                                              "source" : [
                                                {
                                                  "context" : "wholeOrgan"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "meta",
                                                  "contextType" : "variable",
                                                  "element" : "tag",
                                                  "variable" : "coding",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Coding"
                                                    }
                                                  ]
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "system",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrgan"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "coding",
                                                      "contextType" : "variable",
                                                      "element" : "system",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "http://algoritmodiscoring"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "name" : "code",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrgan"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "coding",
                                                      "contextType" : "variable",
                                                      "element" : "code",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "identifier",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "id",
                                              "variable" : "id"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "identifier",
                                              "variable" : "identifier"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "root1",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "root",
                                                  "variable" : "r"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "identifier",
                                                  "contextType" : "variable",
                                                  "element" : "system",
                                                  "transform" : "translate",
                                                  "parameter" : [
                                                    {
                                                      "valueId" : "r"
                                                    },
                                                    {
                                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                                    },
                                                    {
                                                      "valueString" : "uri"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "ext",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "extension",
                                                  "variable" : "ext"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "identifier",
                                                  "contextType" : "variable",
                                                  "element" : "value",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueId" : "ext"
                                                    }
                                                  ]
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "UUID",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrgan"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "request",
                                                      "contextType" : "variable",
                                                      "element" : "url",
                                                      "transform" : "append",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "Organization?identifier="
                                                        },
                                                        {
                                                          "valueId" : "ext"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "assigningAuthorityName",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "assigningAuthorityName",
                                                  "variable" : "s"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "identifier",
                                                  "contextType" : "variable",
                                                  "element" : "assigner",
                                                  "variable" : "a"
                                                },
                                                {
                                                  "context" : "a",
                                                  "contextType" : "variable",
                                                  "element" : "display",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueId" : "s"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "r",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "root",
                                                  "variable" : "r"
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "org",
                                                  "source" : [
                                                    {
                                                      "context" : "id",
                                                      "element" : "extension",
                                                      "variable" : "ext"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "organization2",
                                                      "contextType" : "variable",
                                                      "element" : "id",
                                                      "variable" : "uuid5",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "r + '-' + ext"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "e5",
                                                      "contextType" : "variable",
                                                      "element" : "fullUrl",
                                                      "transform" : "append",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "https://example/Organization/"
                                                        },
                                                        {
                                                          "valueId" : "uuid5"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "organization1",
                                                      "contextType" : "variable",
                                                      "element" : "partOf",
                                                      "variable" : "reference",
                                                      "transform" : "create",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "Reference"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "reference",
                                                      "contextType" : "variable",
                                                      "element" : "reference",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "'https://example/Organization/' + %organization2.id"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "name",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "name",
                                              "variable" : "v"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "name",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "v.other"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "telecom",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "telecom",
                                              "variable" : "vvv"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "telecom",
                                              "variable" : "vvv",
                                              "transform" : "create"
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "addr",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "addr",
                                              "variable" : "vvv"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "address",
                                              "variable" : "vvv",
                                              "transform" : "create"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ],
                              "documentation" : "organization"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "performer"
            },
            {
              "name" : "author",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "author",
                  "variable" : "srcAuthor"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e6"
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid6",
                  "transform" : "uuid"
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/PractitionerRole/"
                    },
                    {
                      "valueId" : "uuid6"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "performer",
                  "variable" : "referenceaut",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "referenceaut",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "assignedAuthor",
                  "source" : [
                    {
                      "context" : "srcAuthor",
                      "element" : "assignedAuthor",
                      "variable" : "assignedAuthor"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "code",
                          "variable" : "codice"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code",
                          "variable" : "code2"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "CECodeableConcept",
                          "variable" : [
                            "codice",
                            "code2"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "ASSAUth",
                      "source" : [
                        {
                          "context" : "assignedAuthor"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e7"
                        },
                        {
                          "context" : "e7",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e7",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "practitioner",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Practitioner"
                            }
                          ]
                        },
                        {
                          "context" : "practitioner",
                          "contextType" : "variable",
                          "element" : "id",
                          "variable" : "uuid7",
                          "transform" : "uuid"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "functionCode",
                          "source" : [
                            {
                              "context" : "srcAuthor",
                              "element" : "functionCode",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "assignedAuthor"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "assignedAuthor"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/observation/author"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "aut",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid2",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e7",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Practitioner/"
                                        },
                                        {
                                          "valueId" : "uuid2"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "practitioner",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "2.16.840.1.113883.2.9.4.3.2",
                              "source" : [
                                {
                                  "context" : "assignedAuthor",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "diverso",
                              "source" : [
                                {
                                  "context" : "assignedAuthor",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "assignedPerson",
                              "variable" : "person"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "person",
                                  "element" : "name",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "birth",
                              "source" : [
                                {
                                  "context" : "person",
                                  "element" : "birthTime",
                                  "variable" : "birthTime"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "birthTime",
                                      "element" : "value",
                                      "variable" : "date"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "birthDate",
                                      "transform" : "truncate",
                                      "parameter" : [
                                        {
                                          "valueId" : "date"
                                        },
                                        {
                                          "valueInteger" : 10
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ],
                          "documentation" : "person"
                        }
                      ]
                    },
                    {
                      "name" : "representedOrganization",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "representedOrganization",
                          "variable" : "representedOrganization"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e8"
                        },
                        {
                          "context" : "e8",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e8",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "organization",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Organization"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "representedOrganization"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "representedOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/observation/author/representedOrganization"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Organization?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "org",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid3",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e8",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid3"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "organization",
                                      "variable" : "referenceOrg",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "referenceOrg",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid3"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "OrgPartOf",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "asOrganizationPartOf",
                              "variable" : "OrgPartOf"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e9"
                            },
                            {
                              "context" : "e9",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e9",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "organization1",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Organization"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "OrgPartOf"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "meta",
                                  "variable" : "meta"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "coding",
                                  "source" : [
                                    {
                                      "context" : "OrgPartOf"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "meta",
                                      "contextType" : "variable",
                                      "element" : "tag",
                                      "variable" : "coding",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Coding"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "system",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "http://algoritmodiscoring"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "code",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "identifier",
                                  "variable" : "identifier"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "root1",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "translate",
                                      "parameter" : [
                                        {
                                          "valueId" : "r"
                                        },
                                        {
                                          "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                        },
                                        {
                                          "valueString" : "uri"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "ext",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "UUID",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "url",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "Organization?identifier="
                                            },
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "assigningAuthorityName",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "assigningAuthorityName",
                                      "variable" : "s"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "assigner",
                                      "variable" : "a"
                                    },
                                    {
                                      "context" : "a",
                                      "contextType" : "variable",
                                      "element" : "display",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "s"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "r",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "org",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid4",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e9",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Organization/"
                                            },
                                            {
                                              "valueId" : "uuid4"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "organization",
                                          "contextType" : "variable",
                                          "element" : "partOf",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Organization/' + %organization1.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "statusCode",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "statusCode",
                                  "variable" : "status",
                                  "condition" : "(value = 'active')"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "boolean"
                                    }
                                  ]
                                },
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "true"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "wholeOrganization",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "wholeOrganization",
                                  "variable" : "wholeOrgan"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e10"
                                },
                                {
                                  "context" : "e10",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e10",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "organization2",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "wholeOrgan"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "identifier",
                                      "variable" : "identifier"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "root1",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "translate",
                                          "parameter" : [
                                            {
                                              "valueId" : "r"
                                            },
                                            {
                                              "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                            },
                                            {
                                              "valueString" : "uri"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "ext",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "UUID",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "request",
                                              "contextType" : "variable",
                                              "element" : "url",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Organization?identifier="
                                                },
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "assigningAuthorityName",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "assigningAuthorityName",
                                          "variable" : "s"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "assigner",
                                          "variable" : "a"
                                        },
                                        {
                                          "context" : "a",
                                          "contextType" : "variable",
                                          "element" : "display",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "s"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "r",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "org",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid4",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e10",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid4"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "organization1",
                                              "contextType" : "variable",
                                              "element" : "partOf",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Organization/' + %organization2.id"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "organization"
                    },
                    {
                      "name" : "Device",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "assignedAuthoringDevice",
                          "variable" : "assignedAuthoringDevice"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e11"
                        },
                        {
                          "context" : "e11",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "POST"
                            }
                          ]
                        },
                        {
                          "context" : "e11",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "device",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Device"
                            }
                          ]
                        },
                        {
                          "context" : "device",
                          "contextType" : "variable",
                          "element" : "id",
                          "variable" : "uuid11",
                          "transform" : "uuid"
                        },
                        {
                          "context" : "e11",
                          "contextType" : "variable",
                          "element" : "fullUrl",
                          "transform" : "append",
                          "parameter" : [
                            {
                              "valueString" : "https://example/Device/"
                            },
                            {
                              "valueId" : "uuid11"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "url",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "Device"
                            }
                          ]
                        },
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "author",
                          "variable" : "reference",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        },
                        {
                          "context" : "reference",
                          "contextType" : "variable",
                          "element" : "reference",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "'https://example/Device/' + %device.id"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "templateId",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "templateId",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "manufacturer",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "manufacturerModelName",
                              "variable" : "manufacturerModelName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "displayRule",
                              "source" : [
                                {
                                  "context" : "manufacturerModelName",
                                  "variable" : "m"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "device",
                                  "contextType" : "variable",
                                  "element" : "manufacturer",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "m.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "deviceName",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "softwareName",
                              "variable" : "softwareName"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "deviceName",
                              "variable" : "deviceName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "typeName",
                              "source" : [
                                {
                                  "context" : "softwareName"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "other"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "softwareName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "s.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "device"
                    }
                  ]
                }
              ],
              "documentation" : "author"
            },
            {
              "name" : "participantEncounter",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "participant",
                  "variable" : "participant",
                  "condition" : "(typeCode != 'DEV')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "encounter",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Encounter/' + %encounter.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "fhirParticipant",
                  "source" : [
                    {
                      "context" : "participant"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "encounter",
                      "contextType" : "variable",
                      "element" : "participant",
                      "variable" : "FhirParticipant"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "type",
                      "source" : [
                        {
                          "context" : "participant",
                          "variable" : "p"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "FhirParticipant",
                          "contextType" : "variable",
                          "element" : "type",
                          "variable" : "type"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "codeType",
                          "source" : [
                            {
                              "context" : "p"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "type",
                              "contextType" : "variable",
                              "element" : "coding",
                              "variable" : "coding"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "codice",
                              "source" : [
                                {
                                  "context" : "p"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "p.typeCode"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "system",
                              "source" : [
                                {
                                  "context" : "p"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "partRole",
                  "source" : [
                    {
                      "context" : "participant",
                      "element" : "participantRole",
                      "variable" : "participantRole"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e12"
                    },
                    {
                      "context" : "e12",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e12",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "practitionerRole",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "PractitionerRole"
                        }
                      ]
                    },
                    {
                      "context" : "practitionerRole",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid12",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e12",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/PractitionerRole/"
                        },
                        {
                          "valueId" : "uuid12"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "PractitionerRole"
                        }
                      ]
                    },
                    {
                      "context" : "encounter",
                      "contextType" : "variable",
                      "element" : "participant",
                      "variable" : "participant1",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "participant1",
                      "contextType" : "variable",
                      "element" : "individual",
                      "variable" : "referencepart",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "referencepart",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/Practitioner/' + %practitionerRole.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "time",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "time",
                          "variable" : "time1"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "participant1",
                          "contextType" : "variable",
                          "element" : "period",
                          "variable" : "period",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Period"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "val",
                          "source" : [
                            {
                              "context" : "time1"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "period",
                              "contextType" : "variable",
                              "element" : "start",
                              "variable" : "start",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "dateTime"
                                }
                              ]
                            }
                          ],
                          "dependent" : [
                            {
                              "name" : "TSDateTime",
                              "variable" : [
                                "time1",
                                "start"
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "participant.time -> participant1.period;"
                    },
                    {
                      "name" : "time",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "time",
                          "variable" : "time1"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "participant1",
                          "contextType" : "variable",
                          "element" : "period",
                          "variable" : "period",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Period"
                            }
                          ]
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "IVLTSPeriod",
                          "variable" : [
                            "time1",
                            "period"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "functionCode",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "functionCode",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "practitioner",
                      "source" : [
                        {
                          "context" : "participantRole"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e13"
                        },
                        {
                          "context" : "e13",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e13",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "practitioner",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Practitioner"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "participantRole"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "participantRole"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/observation/participant"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "org",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid4",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e13",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Practitioner/"
                                        },
                                        {
                                          "valueId" : "uuid4"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "practitioner",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "playingEntity",
                              "variable" : "playingEntity"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "playingEntity",
                                  "element" : "name",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "birth",
                              "source" : [
                                {
                                  "context" : "playingEntity",
                                  "element" : "birthTime",
                                  "variable" : "birthTime"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "birthTime",
                                      "element" : "value",
                                      "variable" : "date"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "birthDate",
                                      "transform" : "truncate",
                                      "parameter" : [
                                        {
                                          "valueId" : "date"
                                        },
                                        {
                                          "valueInteger" : 10
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "non mappa i 2 precedenti"
                    }
                  ]
                }
              ],
              "documentation" : "participant person"
            },
            {
              "name" : "devParticipant",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "participant",
                  "variable" : "devParticipant",
                  "condition" : "(typeCode = 'DEV')"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e14"
                },
                {
                  "context" : "e14",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e14",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "device",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Device"
                    }
                  ]
                },
                {
                  "context" : "device",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid14",
                  "transform" : "uuid"
                },
                {
                  "context" : "e14",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/Device/"
                    },
                    {
                      "valueId" : "uuid14"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "Device"
                    }
                  ]
                },
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "device",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Device/' + %device.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "participantRoleDev",
                  "source" : [
                    {
                      "context" : "devParticipant",
                      "element" : "participantRole",
                      "variable" : "participantRoleDev"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "playingDevice",
                      "source" : [
                        {
                          "context" : "participantRoleDev",
                          "element" : "playingDevice",
                          "variable" : "playingDevice"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "playingDevice",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "manufacturer",
                          "source" : [
                            {
                              "context" : "playingDevice",
                              "element" : "manufacturerModelName",
                              "variable" : "manufacturerModelName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "displayRule",
                              "source" : [
                                {
                                  "context" : "manufacturerModelName",
                                  "variable" : "m"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "device",
                                  "contextType" : "variable",
                                  "element" : "manufacturer",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "m.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "deviceName",
                          "source" : [
                            {
                              "context" : "playingDevice",
                              "element" : "softwareName",
                              "variable" : "softwareName"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "deviceName",
                              "variable" : "deviceName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "typeName",
                              "source" : [
                                {
                                  "context" : "softwareName"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "other"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "softwareName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "s.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "participant device"
            },
            {
              "name" : "observationMedia",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "entryRelationship",
                  "variable" : "er"
                }
              ],
              "rule" : [
                {
                  "name" : "media",
                  "source" : [
                    {
                      "context" : "er",
                      "element" : "observationMedia",
                      "variable" : "obsMedia"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e15"
                    },
                    {
                      "context" : "e15",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e15",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "media1",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Media"
                        }
                      ]
                    },
                    {
                      "context" : "media1",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid15",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e15",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/Media/"
                        },
                        {
                          "valueId" : "uuid15"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "Media"
                        }
                      ]
                    },
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "derivedFrom",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/Media/' + %media1.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "Attachment",
                      "source" : [
                        {
                          "context" : "obsMedia"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "media1",
                          "contextType" : "variable",
                          "element" : "content",
                          "variable" : "Attachment",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Attachment"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "status",
                          "source" : [
                            {
                              "context" : "obsMedia"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "media1",
                              "contextType" : "variable",
                              "element" : "status",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "unknown"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "valuemedia",
                          "source" : [
                            {
                              "context" : "obsMedia",
                              "element" : "value",
                              "variable" : "valueMedia"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "type",
                              "source" : [
                                {
                                  "context" : "valueMedia",
                                  "element" : "mediaType",
                                  "variable" : "type"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "Attachment",
                                  "contextType" : "variable",
                                  "element" : "contentType",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "type"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "data",
                              "source" : [
                                {
                                  "context" : "valueMedia"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "Attachment",
                                  "contextType" : "variable",
                                  "element" : "data",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "valueMedia.dataBase64Binary"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "observationMedia"
            },
            {
              "name" : "ref",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "referenceRange",
                  "variable" : "refRange"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "referenceRange",
                  "variable" : "ref",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "refRange",
                  "source" : [
                    {
                      "context" : "refRange",
                      "element" : "observationRange",
                      "variable" : "obsRange"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "value",
                      "source" : [
                        {
                          "context" : "obsRange",
                          "type" : "ST",
                          "element" : "value",
                          "variable" : "value"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ref",
                          "contextType" : "variable",
                          "element" : "text",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "string"
                            }
                          ]
                        },
                        {
                          "context" : "ref",
                          "contextType" : "variable",
                          "element" : "text",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "value.dataString"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "obsRange",
                      "source" : [
                        {
                          "context" : "obsRange"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ref",
                          "contextType" : "variable",
                          "element" : "low",
                          "variable" : "Low",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Quantity"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "IVL-PQ",
                          "source" : [
                            {
                              "context" : "obsRange",
                              "type" : "IVL_PQ",
                              "element" : "value",
                              "variable" : "v"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "decValue",
                              "source" : [
                                {
                                  "context" : "v",
                                  "element" : "low",
                                  "variable" : "l1"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "l1",
                                      "element" : "value",
                                      "variable" : "decValue"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "Low",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "decValue"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "unit",
                                  "source" : [
                                    {
                                      "context" : "l1",
                                      "element" : "unit",
                                      "variable" : "Unit"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "Low",
                                      "contextType" : "variable",
                                      "element" : "unit",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "Unit"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "high",
                              "source" : [
                                {
                                  "context" : "v"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "ref",
                                  "contextType" : "variable",
                                  "element" : "high",
                                  "variable" : "high",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Quantity"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "decValue",
                                  "source" : [
                                    {
                                      "context" : "v",
                                      "element" : "high",
                                      "variable" : "h1"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "value",
                                      "source" : [
                                        {
                                          "context" : "h1",
                                          "element" : "value",
                                          "variable" : "decValue1"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "high",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "decValue1"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "unit",
                                      "source" : [
                                        {
                                          "context" : "h1",
                                          "element" : "unit",
                                          "variable" : "Unit1"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "high",
                                          "contextType" : "variable",
                                          "element" : "unit",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "Unit1"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "interpretationCode",
                          "source" : [
                            {
                              "context" : "obsRange",
                              "element" : "interpretationCode",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "ref",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "precondition",
                          "source" : [
                            {
                              "context" : "obsRange",
                              "element" : "precondition",
                              "variable" : "precondition"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "criterion",
                              "source" : [
                                {
                                  "context" : "precondition",
                                  "element" : "criterion",
                                  "variable" : "criterion"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "appliesTo",
                                  "source" : [
                                    {
                                      "context" : "criterion",
                                      "element" : "code",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "ref",
                                      "contextType" : "variable",
                                      "element" : "appliesTo",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "v",
                                  "source" : [
                                    {
                                      "context" : "criterion",
                                      "type" : "IVL_PQ",
                                      "element" : "value",
                                      "variable" : "v"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "low",
                                      "source" : [
                                        {
                                          "context" : "v",
                                          "element" : "high",
                                          "variable" : "l1"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "age",
                                          "source" : [
                                            {
                                              "context" : "l1"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "ref",
                                              "contextType" : "variable",
                                              "element" : "age",
                                              "variable" : "age",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Quantity"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "high",
                                              "source" : [
                                                {
                                                  "context" : "l1"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "age",
                                                  "contextType" : "variable",
                                                  "element" : "high",
                                                  "variable" : "high"
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "value",
                                                  "source" : [
                                                    {
                                                      "context" : "l1",
                                                      "element" : "value",
                                                      "variable" : "decValue"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "high",
                                                      "contextType" : "variable",
                                                      "element" : "value",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueId" : "decValue"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "name" : "unit",
                                                  "source" : [
                                                    {
                                                      "context" : "l1",
                                                      "element" : "unit",
                                                      "variable" : "Unit1"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "high",
                                                      "contextType" : "variable",
                                                      "element" : "unit",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueId" : "Unit1"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "referenceRange"
            }
          ]
        },
        {
          "name" : "Observation3",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "obs",
              "type" : "Observation",
              "mode" : "source"
            },
            {
              "name" : "patient",
              "type" : "Patient",
              "mode" : "target"
            },
            {
              "name" : "encounter",
              "type" : "Encounter",
              "mode" : "target"
            },
            {
              "name" : "ob",
              "type" : "Observation",
              "mode" : "target"
            },
            {
              "name" : "bundle",
              "type" : "Bundle",
              "mode" : "target"
            },
            {
              "name" : "cda",
              "type" : "Act",
              "mode" : "source"
            }
          ],
          "rule" : [
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "obs"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "subject",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Patient/' + %patient.id"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "obs"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "encounter",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Encounter/' + %encounter.id"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "code",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "code",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "code",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'completed')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "final"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'active')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "registered"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'aborted')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "cancelled"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'suspended')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "partial"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "value2",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "effectiveTime",
                  "variable" : "effectiveTime"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "effective",
                  "variable" : "value",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "dateTime"
                    }
                  ]
                }
              ],
              "dependent" : [
                {
                  "name" : "TSDateTime",
                  "variable" : [
                    "effectiveTime",
                    "value"
                  ]
                }
              ]
            },
            {
              "name" : "where",
              "source" : [
                {
                  "context" : "obs",
                  "condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
                }
              ],
              "rule" : [
                {
                  "name" : "effectiveTime",
                  "source" : [
                    {
                      "context" : "obs",
                      "element" : "effectiveTime",
                      "variable" : "eff"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "effective",
                      "variable" : "period",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Period"
                        }
                      ]
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "IVLTSPeriod",
                      "variable" : [
                        "eff",
                        "period"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "interpretationCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "interpretationCode",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "interpretation",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "methodCode",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "methodCode",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "method",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "value",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "INT",
                  "element" : "value",
                  "variable" : "int"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "int.value"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "boolean",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "BL",
                  "element" : "value",
                  "variable" : "boolean"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "boolean.value"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "val",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "CE",
                  "element" : "value",
                  "variable" : "val"
                }
              ],
              "rule" : [
                {
                  "name" : "coding",
                  "source" : [
                    {
                      "context" : "val"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "value",
                      "variable" : "ce",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "CodeableConcept"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "originltext",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "originalText",
                          "variable" : "originalText"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "reference",
                          "source" : [
                            {
                              "context" : "originalText",
                              "element" : "reference",
                              "variable" : "reference"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "ce",
                              "contextType" : "variable",
                              "element" : "text",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueId" : "reference"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "val"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ce",
                          "contextType" : "variable",
                          "element" : "coding",
                          "variable" : "coding"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "val",
                              "element" : "code",
                              "variable" : "code"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "code",
                              "transform" : "cast",
                              "parameter" : [
                                {
                                  "valueId" : "code"
                                },
                                {
                                  "valueString" : "string"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "codeSystem",
                          "source" : [
                            {
                              "context" : "val",
                              "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" : "val",
                              "element" : "displayName",
                              "variable" : "display"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "display",
                              "transform" : "cast",
                              "parameter" : [
                                {
                                  "valueId" : "display"
                                },
                                {
                                  "valueString" : "string"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "codeSystemVersion",
                          "source" : [
                            {
                              "context" : "val",
                              "element" : "codeSystemVersion",
                              "variable" : "version"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "version",
                              "transform" : "cast",
                              "parameter" : [
                                {
                                  "valueId" : "version"
                                },
                                {
                                  "valueString" : "string"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "translation",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "translation",
                          "variable" : "translation"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ce",
                          "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" : "value",
                              "source" : [
                                {
                                  "context" : "qualifier",
                                  "element" : "value",
                                  "variable" : "value"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "ce",
                                  "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" : "valueQuantity",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "PQ",
                  "element" : "value",
                  "variable" : "val"
                }
              ],
              "rule" : [
                {
                  "name" : "quantity",
                  "source" : [
                    {
                      "context" : "val"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "value",
                      "variable" : "quantity",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Quantity"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "value",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "value",
                          "variable" : "value"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "quantity",
                          "contextType" : "variable",
                          "element" : "value",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "value"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "unit",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "unit",
                          "variable" : "unit"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "quantity",
                          "contextType" : "variable",
                          "element" : "unit",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "unit"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "value",
              "source" : [
                {
                  "context" : "obs",
                  "type" : "ST",
                  "element" : "value",
                  "variable" : "value"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "string"
                    }
                  ]
                },
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "value.dataString"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "entryRelationship",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "entryRelationship",
                  "variable" : "entryRelationship"
                }
              ],
              "rule" : [
                {
                  "name" : "Act",
                  "source" : [
                    {
                      "context" : "entryRelationship",
                      "element" : "act",
                      "variable" : "act"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "text",
                      "source" : [
                        {
                          "context" : "act",
                          "element" : "text",
                          "variable" : "text"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "reference",
                          "source" : [
                            {
                              "context" : "text",
                              "element" : "reference",
                              "variable" : "reference"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "ob",
                              "contextType" : "variable",
                              "element" : "note",
                              "variable" : "note"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "reference",
                              "source" : [
                                {
                                  "context" : "reference"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "note",
                                  "contextType" : "variable",
                                  "element" : "text",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "reference.value"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "Note e commenti"
            },
            {
              "name" : "subject",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "subject",
                  "variable" : "sbj"
                }
              ],
              "rule" : [
                {
                  "name" : "relatedSubject",
                  "source" : [
                    {
                      "context" : "sbj",
                      "element" : "relatedSubject",
                      "variable" : "relatedSubj"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "patient",
                      "contextType" : "variable",
                      "element" : "extension",
                      "variable" : "extension2"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "ExtSubjectAnimal",
                      "variable" : [
                        "relatedSubj",
                        "extension2"
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "subject"
            },
            {
              "name" : "specimen",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "specimen",
                  "variable" : "spmn"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e4o"
                },
                {
                  "context" : "e4o",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e4o",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "specimen",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Specimen"
                    }
                  ]
                },
                {
                  "context" : "specimen",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid4o",
                  "transform" : "uuid"
                },
                {
                  "context" : "e4o",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/Specimen/"
                    },
                    {
                      "valueId" : "uuid4o"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "Specimen"
                    }
                  ]
                },
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "specimen",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Specimen/' + %specimen.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "specimenRole",
                  "source" : [
                    {
                      "context" : "spmn",
                      "element" : "specimenRole",
                      "variable" : "specimenRole"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "id",
                      "source" : [
                        {
                          "context" : "specimenRole",
                          "element" : "id",
                          "variable" : "id"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "specimen",
                          "contextType" : "variable",
                          "element" : "identifier"
                        }
                      ]
                    },
                    {
                      "name" : "specimenPlayingEntity",
                      "source" : [
                        {
                          "context" : "specimenRole",
                          "element" : "specimenPlayingEntity",
                          "variable" : "specimenPlayingEntity"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "specimenPlayingEntity",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "specimen",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "specimen"
            },
            {
              "name" : "performer",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "performer",
                  "variable" : "performer"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e1"
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/PractitionerRole/"
                    },
                    {
                      "valueId" : "uuid1"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "practitionerRole",
                  "source" : [
                    {
                      "context" : "performer"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "performer",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "entity",
                      "source" : [
                        {
                          "context" : "performer",
                          "element" : "assignedEntity",
                          "variable" : "entity"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "entity",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "practitioner",
                          "source" : [
                            {
                              "context" : "entity"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e2"
                            },
                            {
                              "context" : "e2",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e2",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "practitioner",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Practitioner"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "entity"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "meta",
                                  "variable" : "meta"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "coding",
                                  "source" : [
                                    {
                                      "context" : "entity"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "meta",
                                      "contextType" : "variable",
                                      "element" : "tag",
                                      "variable" : "coding",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Coding"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "system",
                                      "source" : [
                                        {
                                          "context" : "entity"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "http://algoritmodiscoring"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "entity"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "code",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "ClinicalDocument/body/observation/performer"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "identifier",
                                  "variable" : "identifier"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "root1",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "translate",
                                      "parameter" : [
                                        {
                                          "valueId" : "r"
                                        },
                                        {
                                          "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                        },
                                        {
                                          "valueString" : "uri"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "ext",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "UUID",
                                      "source" : [
                                        {
                                          "context" : "entity"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "url",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "Practitioner?identifier="
                                            },
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "assigningAuthorityName",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "assigningAuthorityName",
                                      "variable" : "s"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "assigner",
                                      "variable" : "a"
                                    },
                                    {
                                      "context" : "a",
                                      "contextType" : "variable",
                                      "element" : "display",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "s"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "r",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "performer",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "practitioner",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid2",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e2",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Practitioner/"
                                            },
                                            {
                                              "valueId" : "uuid2"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "practitionerRole",
                                          "contextType" : "variable",
                                          "element" : "practitioner",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "2.16.840.1.113883.2.9.4.3.2",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "diverso",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "addr",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "addr",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "address",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "telecom",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "telecom",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "telecom",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "assignedPerson",
                                  "variable" : "person"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "person",
                                      "element" : "name",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "birth",
                                  "source" : [
                                    {
                                      "context" : "person",
                                      "element" : "birthTime",
                                      "variable" : "birthTime"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "value",
                                      "source" : [
                                        {
                                          "context" : "birthTime",
                                          "element" : "value",
                                          "variable" : "date"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "practitioner",
                                          "contextType" : "variable",
                                          "element" : "birthDate",
                                          "transform" : "truncate",
                                          "parameter" : [
                                            {
                                              "valueId" : "date"
                                            },
                                            {
                                              "valueInteger" : 10
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "representedOrganization",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "representedOrganization",
                                  "variable" : "representedOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e3"
                                },
                                {
                                  "context" : "e3",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e3",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "organization",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "representedOrganization"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "representedOrganization"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "representedOrganization"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/body/observation/performer/representedOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "identifier",
                                      "variable" : "identifier"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "root1",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "translate",
                                          "parameter" : [
                                            {
                                              "valueId" : "r"
                                            },
                                            {
                                              "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                            },
                                            {
                                              "valueString" : "uri"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "ext",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "UUID",
                                          "source" : [
                                            {
                                              "context" : "representedOrganization"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "request",
                                              "contextType" : "variable",
                                              "element" : "url",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Organization?identifier="
                                                },
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "assigningAuthorityName",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "assigningAuthorityName",
                                          "variable" : "s"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "assigner",
                                          "variable" : "a"
                                        },
                                        {
                                          "context" : "a",
                                          "contextType" : "variable",
                                          "element" : "display",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "s"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "r",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "aut",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid3",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e3",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid3"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "practitionerRole",
                                              "contextType" : "variable",
                                              "element" : "organization",
                                              "variable" : "referenceOrg",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "referenceOrg",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid3"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "OrgPartOf",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "asOrganizationPartOf",
                                      "variable" : "OrgPartOf"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "bundle",
                                      "contextType" : "variable",
                                      "element" : "entry",
                                      "variable" : "e4"
                                    },
                                    {
                                      "context" : "e4",
                                      "contextType" : "variable",
                                      "element" : "request",
                                      "variable" : "request",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "BackboneElement"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e4",
                                      "contextType" : "variable",
                                      "element" : "resource",
                                      "variable" : "organization1",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Organization"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "method",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "PUT"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "meta",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "meta",
                                          "variable" : "meta"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "coding",
                                          "source" : [
                                            {
                                              "context" : "OrgPartOf"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "meta",
                                              "contextType" : "variable",
                                              "element" : "tag",
                                              "variable" : "coding",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Coding"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "system",
                                              "source" : [
                                                {
                                                  "context" : "OrgPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "coding",
                                                  "contextType" : "variable",
                                                  "element" : "system",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "http://algoritmodiscoring"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "code",
                                              "source" : [
                                                {
                                                  "context" : "OrgPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "coding",
                                                  "contextType" : "variable",
                                                  "element" : "code",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "identifier",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "id",
                                          "variable" : "id"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "identifier",
                                          "variable" : "identifier"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "root1",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "root",
                                              "variable" : "r"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "identifier",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "translate",
                                              "parameter" : [
                                                {
                                                  "valueId" : "r"
                                                },
                                                {
                                                  "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                                },
                                                {
                                                  "valueString" : "uri"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "ext",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "identifier",
                                              "contextType" : "variable",
                                              "element" : "value",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "UUID",
                                              "source" : [
                                                {
                                                  "context" : "OrgPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "request",
                                                  "contextType" : "variable",
                                                  "element" : "url",
                                                  "transform" : "append",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Organization?identifier="
                                                    },
                                                    {
                                                      "valueId" : "ext"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "assigningAuthorityName",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "assigningAuthorityName",
                                              "variable" : "s"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "identifier",
                                              "contextType" : "variable",
                                              "element" : "assigner",
                                              "variable" : "a"
                                            },
                                            {
                                              "context" : "a",
                                              "contextType" : "variable",
                                              "element" : "display",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueId" : "s"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "r",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "root",
                                              "variable" : "r"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "org",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "extension",
                                                  "variable" : "ext"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "organization1",
                                                  "contextType" : "variable",
                                                  "element" : "id",
                                                  "variable" : "uuid4",
                                                  "transform" : "evaluate",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "r + '-' + ext"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "e4",
                                                  "contextType" : "variable",
                                                  "element" : "fullUrl",
                                                  "transform" : "append",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "https://example/Organization/"
                                                    },
                                                    {
                                                      "valueId" : "uuid4"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "organization",
                                                  "contextType" : "variable",
                                                  "element" : "partOf",
                                                  "variable" : "reference",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Reference"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "reference",
                                                  "contextType" : "variable",
                                                  "element" : "reference",
                                                  "transform" : "evaluate",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "'https://example/Organization/' + %organization1.id"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "code",
                                          "variable" : "vvv"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "type",
                                          "variable" : "vvv",
                                          "transform" : "create"
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "statusCode",
                                          "variable" : "status",
                                          "condition" : "(value = 'active')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "active",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "boolean"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "active",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "true"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "wholeOrganization",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "wholeOrganization",
                                          "variable" : "wholeOrgan"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "bundle",
                                          "contextType" : "variable",
                                          "element" : "entry",
                                          "variable" : "e5"
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "request",
                                          "variable" : "request",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "BackboneElement"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "method",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "PUT"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "resource",
                                          "variable" : "organization2",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Organization"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "meta",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "meta",
                                              "variable" : "meta"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "coding",
                                              "source" : [
                                                {
                                                  "context" : "wholeOrgan"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "meta",
                                                  "contextType" : "variable",
                                                  "element" : "tag",
                                                  "variable" : "coding",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Coding"
                                                    }
                                                  ]
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "system",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrgan"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "coding",
                                                      "contextType" : "variable",
                                                      "element" : "system",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "http://algoritmodiscoring"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "name" : "code",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrgan"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "coding",
                                                      "contextType" : "variable",
                                                      "element" : "code",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "identifier",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "id",
                                              "variable" : "id"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "identifier",
                                              "variable" : "identifier"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "root1",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "root",
                                                  "variable" : "r"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "identifier",
                                                  "contextType" : "variable",
                                                  "element" : "system",
                                                  "transform" : "translate",
                                                  "parameter" : [
                                                    {
                                                      "valueId" : "r"
                                                    },
                                                    {
                                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                                    },
                                                    {
                                                      "valueString" : "uri"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "ext",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "extension",
                                                  "variable" : "ext"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "identifier",
                                                  "contextType" : "variable",
                                                  "element" : "value",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueId" : "ext"
                                                    }
                                                  ]
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "UUID",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrgan"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "request",
                                                      "contextType" : "variable",
                                                      "element" : "url",
                                                      "transform" : "append",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "Organization?identifier="
                                                        },
                                                        {
                                                          "valueId" : "ext"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "assigningAuthorityName",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "assigningAuthorityName",
                                                  "variable" : "s"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "identifier",
                                                  "contextType" : "variable",
                                                  "element" : "assigner",
                                                  "variable" : "a"
                                                },
                                                {
                                                  "context" : "a",
                                                  "contextType" : "variable",
                                                  "element" : "display",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueId" : "s"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "r",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "root",
                                                  "variable" : "r"
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "org",
                                                  "source" : [
                                                    {
                                                      "context" : "id",
                                                      "element" : "extension",
                                                      "variable" : "ext"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "organization2",
                                                      "contextType" : "variable",
                                                      "element" : "id",
                                                      "variable" : "uuid5",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "r + '-' + ext"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "e5",
                                                      "contextType" : "variable",
                                                      "element" : "fullUrl",
                                                      "transform" : "append",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "https://example/Organization/"
                                                        },
                                                        {
                                                          "valueId" : "uuid5"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "organization1",
                                                      "contextType" : "variable",
                                                      "element" : "partOf",
                                                      "variable" : "reference",
                                                      "transform" : "create",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "Reference"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "reference",
                                                      "contextType" : "variable",
                                                      "element" : "reference",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "'https://example/Organization/' + %organization2.id"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "name",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "name",
                                              "variable" : "v"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "name",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "v.other"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "telecom",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "telecom",
                                              "variable" : "vvv"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "telecom",
                                              "variable" : "vvv",
                                              "transform" : "create"
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "addr",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "addr",
                                              "variable" : "vvv"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "address",
                                              "variable" : "vvv",
                                              "transform" : "create"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ],
                              "documentation" : "organization"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "performer"
            },
            {
              "name" : "author",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "author",
                  "variable" : "srcAuthor"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e6"
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid6",
                  "transform" : "uuid"
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/PractitionerRole/"
                    },
                    {
                      "valueId" : "uuid6"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "performer",
                  "variable" : "referenceaut",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "referenceaut",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "assignedAuthor",
                  "source" : [
                    {
                      "context" : "srcAuthor",
                      "element" : "assignedAuthor",
                      "variable" : "assignedAuthor"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "code",
                          "variable" : "codice"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code",
                          "variable" : "code2"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "CECodeableConcept",
                          "variable" : [
                            "codice",
                            "code2"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "ASSAUth",
                      "source" : [
                        {
                          "context" : "assignedAuthor"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e7"
                        },
                        {
                          "context" : "e7",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e7",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "practitioner",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Practitioner"
                            }
                          ]
                        },
                        {
                          "context" : "practitioner",
                          "contextType" : "variable",
                          "element" : "id",
                          "variable" : "uuid7",
                          "transform" : "uuid"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "functionCode",
                          "source" : [
                            {
                              "context" : "srcAuthor",
                              "element" : "functionCode",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "assignedAuthor"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "assignedAuthor"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/observation/author"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "aut",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid2",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e7",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Practitioner/"
                                        },
                                        {
                                          "valueId" : "uuid2"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "practitioner",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "2.16.840.1.113883.2.9.4.3.2",
                              "source" : [
                                {
                                  "context" : "assignedAuthor",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "diverso",
                              "source" : [
                                {
                                  "context" : "assignedAuthor",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "assignedPerson",
                              "variable" : "person"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "person",
                                  "element" : "name",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "birth",
                              "source" : [
                                {
                                  "context" : "person",
                                  "element" : "birthTime",
                                  "variable" : "birthTime"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "birthTime",
                                      "element" : "value",
                                      "variable" : "date"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "birthDate",
                                      "transform" : "truncate",
                                      "parameter" : [
                                        {
                                          "valueId" : "date"
                                        },
                                        {
                                          "valueInteger" : 10
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ],
                          "documentation" : "person"
                        }
                      ]
                    },
                    {
                      "name" : "representedOrganization",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "representedOrganization",
                          "variable" : "representedOrganization"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e8"
                        },
                        {
                          "context" : "e8",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e8",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "organization",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Organization"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "representedOrganization"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "representedOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/observation/author/representedOrganization"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Organization?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "org",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid3",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e8",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid3"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "organization",
                                      "variable" : "referenceOrg",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "referenceOrg",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid3"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "OrgPartOf",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "asOrganizationPartOf",
                              "variable" : "OrgPartOf"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e9"
                            },
                            {
                              "context" : "e9",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e9",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "organization1",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Organization"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "OrgPartOf"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "meta",
                                  "variable" : "meta"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "coding",
                                  "source" : [
                                    {
                                      "context" : "OrgPartOf"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "meta",
                                      "contextType" : "variable",
                                      "element" : "tag",
                                      "variable" : "coding",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Coding"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "system",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "http://algoritmodiscoring"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "code",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "identifier",
                                  "variable" : "identifier"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "root1",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "translate",
                                      "parameter" : [
                                        {
                                          "valueId" : "r"
                                        },
                                        {
                                          "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                        },
                                        {
                                          "valueString" : "uri"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "ext",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "UUID",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "url",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "Organization?identifier="
                                            },
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "assigningAuthorityName",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "assigningAuthorityName",
                                      "variable" : "s"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "assigner",
                                      "variable" : "a"
                                    },
                                    {
                                      "context" : "a",
                                      "contextType" : "variable",
                                      "element" : "display",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "s"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "r",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "org",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid4",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e9",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Organization/"
                                            },
                                            {
                                              "valueId" : "uuid4"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "organization",
                                          "contextType" : "variable",
                                          "element" : "partOf",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Organization/' + %organization1.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "statusCode",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "statusCode",
                                  "variable" : "status",
                                  "condition" : "(value = 'active')"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "boolean"
                                    }
                                  ]
                                },
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "true"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "wholeOrganization",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "wholeOrganization",
                                  "variable" : "wholeOrgan"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e10"
                                },
                                {
                                  "context" : "e10",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e10",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "organization2",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "wholeOrgan"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "identifier",
                                      "variable" : "identifier"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "root1",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "translate",
                                          "parameter" : [
                                            {
                                              "valueId" : "r"
                                            },
                                            {
                                              "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                            },
                                            {
                                              "valueString" : "uri"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "ext",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "UUID",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "request",
                                              "contextType" : "variable",
                                              "element" : "url",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Organization?identifier="
                                                },
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "assigningAuthorityName",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "assigningAuthorityName",
                                          "variable" : "s"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "assigner",
                                          "variable" : "a"
                                        },
                                        {
                                          "context" : "a",
                                          "contextType" : "variable",
                                          "element" : "display",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "s"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "r",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "org",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid4",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e10",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid4"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "organization1",
                                              "contextType" : "variable",
                                              "element" : "partOf",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Organization/' + %organization2.id"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "organization"
                    },
                    {
                      "name" : "Device",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "assignedAuthoringDevice",
                          "variable" : "assignedAuthoringDevice"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e11"
                        },
                        {
                          "context" : "e11",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "POST"
                            }
                          ]
                        },
                        {
                          "context" : "e11",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "device",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Device"
                            }
                          ]
                        },
                        {
                          "context" : "device",
                          "contextType" : "variable",
                          "element" : "id",
                          "variable" : "uuid11",
                          "transform" : "uuid"
                        },
                        {
                          "context" : "e11",
                          "contextType" : "variable",
                          "element" : "fullUrl",
                          "transform" : "append",
                          "parameter" : [
                            {
                              "valueString" : "https://example/Device/"
                            },
                            {
                              "valueId" : "uuid11"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "url",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "Device"
                            }
                          ]
                        },
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "author",
                          "variable" : "reference",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        },
                        {
                          "context" : "reference",
                          "contextType" : "variable",
                          "element" : "reference",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "'https://example/Device/' + %device.id"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "templateId",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "templateId",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "manufacturer",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "manufacturerModelName",
                              "variable" : "manufacturerModelName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "displayRule",
                              "source" : [
                                {
                                  "context" : "manufacturerModelName",
                                  "variable" : "m"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "device",
                                  "contextType" : "variable",
                                  "element" : "manufacturer",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "m.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "deviceName",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "softwareName",
                              "variable" : "softwareName"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "deviceName",
                              "variable" : "deviceName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "typeName",
                              "source" : [
                                {
                                  "context" : "softwareName"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "other"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "softwareName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "s.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "device"
                    }
                  ]
                }
              ],
              "documentation" : "author"
            },
            {
              "name" : "participantEncounter",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "participant",
                  "variable" : "participant",
                  "condition" : "(typeCode != 'DEV')"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "encounter",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Encounter/' + %encounter.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "fhirParticipant",
                  "source" : [
                    {
                      "context" : "participant"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "encounter",
                      "contextType" : "variable",
                      "element" : "participant",
                      "variable" : "FhirParticipant"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "type",
                      "source" : [
                        {
                          "context" : "participant",
                          "variable" : "p"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "FhirParticipant",
                          "contextType" : "variable",
                          "element" : "type",
                          "variable" : "type"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "codeType",
                          "source" : [
                            {
                              "context" : "p"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "type",
                              "contextType" : "variable",
                              "element" : "coding",
                              "variable" : "coding"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "codice",
                              "source" : [
                                {
                                  "context" : "p"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "p.typeCode"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "system",
                              "source" : [
                                {
                                  "context" : "p"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "partRole",
                  "source" : [
                    {
                      "context" : "participant",
                      "element" : "participantRole",
                      "variable" : "participantRole"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e12"
                    },
                    {
                      "context" : "e12",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e12",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "practitionerRole",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "PractitionerRole"
                        }
                      ]
                    },
                    {
                      "context" : "practitionerRole",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid12",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e12",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/PractitionerRole/"
                        },
                        {
                          "valueId" : "uuid12"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "PractitionerRole"
                        }
                      ]
                    },
                    {
                      "context" : "encounter",
                      "contextType" : "variable",
                      "element" : "participant",
                      "variable" : "participant1",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "participant1",
                      "contextType" : "variable",
                      "element" : "individual",
                      "variable" : "referencepart",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "referencepart",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/Practitioner/' + %practitionerRole.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "time",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "time",
                          "variable" : "time1"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "participant1",
                          "contextType" : "variable",
                          "element" : "period",
                          "variable" : "period",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Period"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "val",
                          "source" : [
                            {
                              "context" : "time1"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "period",
                              "contextType" : "variable",
                              "element" : "start",
                              "variable" : "start",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "dateTime"
                                }
                              ]
                            }
                          ],
                          "dependent" : [
                            {
                              "name" : "TSDateTime",
                              "variable" : [
                                "time1",
                                "start"
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "participant.time -> participant1.period;"
                    },
                    {
                      "name" : "time",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "time",
                          "variable" : "time1"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "participant1",
                          "contextType" : "variable",
                          "element" : "period",
                          "variable" : "period",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Period"
                            }
                          ]
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "IVLTSPeriod",
                          "variable" : [
                            "time1",
                            "period"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "functionCode",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "functionCode",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "practitioner",
                      "source" : [
                        {
                          "context" : "participantRole"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e13"
                        },
                        {
                          "context" : "e13",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e13",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "practitioner",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Practitioner"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "participantRole"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "participantRole"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/observation/participant"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "org",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid4",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e13",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Practitioner/"
                                        },
                                        {
                                          "valueId" : "uuid4"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "practitioner",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "playingEntity",
                              "variable" : "playingEntity"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "playingEntity",
                                  "element" : "name",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "birth",
                              "source" : [
                                {
                                  "context" : "playingEntity",
                                  "element" : "birthTime",
                                  "variable" : "birthTime"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "birthTime",
                                      "element" : "value",
                                      "variable" : "date"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "birthDate",
                                      "transform" : "truncate",
                                      "parameter" : [
                                        {
                                          "valueId" : "date"
                                        },
                                        {
                                          "valueInteger" : 10
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "non mappa i 2 precedenti"
                    }
                  ]
                }
              ],
              "documentation" : "participant person"
            },
            {
              "name" : "devParticipant",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "participant",
                  "variable" : "devParticipant",
                  "condition" : "(typeCode = 'DEV')"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e14"
                },
                {
                  "context" : "e14",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e14",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "device",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Device"
                    }
                  ]
                },
                {
                  "context" : "device",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid14",
                  "transform" : "uuid"
                },
                {
                  "context" : "e14",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/Device/"
                    },
                    {
                      "valueId" : "uuid14"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "Device"
                    }
                  ]
                },
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "device",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Device/' + %device.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "participantRoleDev",
                  "source" : [
                    {
                      "context" : "devParticipant",
                      "element" : "participantRole",
                      "variable" : "participantRoleDev"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "playingDevice",
                      "source" : [
                        {
                          "context" : "participantRoleDev",
                          "element" : "playingDevice",
                          "variable" : "playingDevice"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "playingDevice",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "manufacturer",
                          "source" : [
                            {
                              "context" : "playingDevice",
                              "element" : "manufacturerModelName",
                              "variable" : "manufacturerModelName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "displayRule",
                              "source" : [
                                {
                                  "context" : "manufacturerModelName",
                                  "variable" : "m"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "device",
                                  "contextType" : "variable",
                                  "element" : "manufacturer",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "m.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "deviceName",
                          "source" : [
                            {
                              "context" : "playingDevice",
                              "element" : "softwareName",
                              "variable" : "softwareName"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "deviceName",
                              "variable" : "deviceName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "typeName",
                              "source" : [
                                {
                                  "context" : "softwareName"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "other"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "softwareName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "s.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "participant device"
            },
            {
              "name" : "observationMedia",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "entryRelationship",
                  "variable" : "er"
                }
              ],
              "rule" : [
                {
                  "name" : "media",
                  "source" : [
                    {
                      "context" : "er",
                      "element" : "observationMedia",
                      "variable" : "obsMedia"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e15"
                    },
                    {
                      "context" : "e15",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e15",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "media1",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Media"
                        }
                      ]
                    },
                    {
                      "context" : "media1",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid15",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e15",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/Media/"
                        },
                        {
                          "valueId" : "uuid15"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "Media"
                        }
                      ]
                    },
                    {
                      "context" : "ob",
                      "contextType" : "variable",
                      "element" : "derivedFrom",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/Media/' + %media1.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "Attachment",
                      "source" : [
                        {
                          "context" : "obsMedia"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "media1",
                          "contextType" : "variable",
                          "element" : "content",
                          "variable" : "Attachment",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Attachment"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "status",
                          "source" : [
                            {
                              "context" : "obsMedia"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "media1",
                              "contextType" : "variable",
                              "element" : "status",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "unknown"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "valuemedia",
                          "source" : [
                            {
                              "context" : "obsMedia",
                              "element" : "value",
                              "variable" : "valueMedia"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "type",
                              "source" : [
                                {
                                  "context" : "valueMedia",
                                  "element" : "mediaType",
                                  "variable" : "type"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "Attachment",
                                  "contextType" : "variable",
                                  "element" : "contentType",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "type"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "data",
                              "source" : [
                                {
                                  "context" : "valueMedia"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "Attachment",
                                  "contextType" : "variable",
                                  "element" : "data",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "valueMedia.dataBase64Binary"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "observationMedia"
            },
            {
              "name" : "ref",
              "source" : [
                {
                  "context" : "obs",
                  "element" : "referenceRange",
                  "variable" : "refRange"
                }
              ],
              "target" : [
                {
                  "context" : "ob",
                  "contextType" : "variable",
                  "element" : "referenceRange",
                  "variable" : "ref",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "refRange",
                  "source" : [
                    {
                      "context" : "refRange",
                      "element" : "observationRange",
                      "variable" : "obsRange"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "value",
                      "source" : [
                        {
                          "context" : "obsRange",
                          "type" : "ST",
                          "element" : "value",
                          "variable" : "value"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ref",
                          "contextType" : "variable",
                          "element" : "text",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "string"
                            }
                          ]
                        },
                        {
                          "context" : "ref",
                          "contextType" : "variable",
                          "element" : "text",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "value.dataString"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "obsRange",
                      "source" : [
                        {
                          "context" : "obsRange"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "ref",
                          "contextType" : "variable",
                          "element" : "low",
                          "variable" : "Low",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Quantity"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "IVLPQ",
                          "source" : [
                            {
                              "context" : "obsRange",
                              "type" : "IVL_PQ",
                              "element" : "value",
                              "variable" : "v"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "decValue",
                              "source" : [
                                {
                                  "context" : "v",
                                  "element" : "low",
                                  "variable" : "l1"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "l1",
                                      "element" : "value",
                                      "variable" : "decValue"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "Low",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "decValue"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "unit",
                                  "source" : [
                                    {
                                      "context" : "l1",
                                      "element" : "unit",
                                      "variable" : "Unit"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "Low",
                                      "contextType" : "variable",
                                      "element" : "unit",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "Unit"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "high",
                              "source" : [
                                {
                                  "context" : "v"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "ref",
                                  "contextType" : "variable",
                                  "element" : "high",
                                  "variable" : "high",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Quantity"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "decValue",
                                  "source" : [
                                    {
                                      "context" : "v",
                                      "element" : "high",
                                      "variable" : "h1"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "value",
                                      "source" : [
                                        {
                                          "context" : "h1",
                                          "element" : "value",
                                          "variable" : "decValue1"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "high",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "decValue1"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "unit",
                                      "source" : [
                                        {
                                          "context" : "h1",
                                          "element" : "unit",
                                          "variable" : "Unit1"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "high",
                                          "contextType" : "variable",
                                          "element" : "unit",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "Unit1"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "interpretationCode",
                          "source" : [
                            {
                              "context" : "obsRange",
                              "element" : "interpretationCode",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "ref",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "precondition",
                          "source" : [
                            {
                              "context" : "obsRange",
                              "element" : "precondition",
                              "variable" : "precondition"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "criterion",
                              "source" : [
                                {
                                  "context" : "precondition",
                                  "element" : "criterion",
                                  "variable" : "criterion"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "appliesTo",
                                  "source" : [
                                    {
                                      "context" : "criterion",
                                      "element" : "code",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "ref",
                                      "contextType" : "variable",
                                      "element" : "appliesTo",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "v",
                                  "source" : [
                                    {
                                      "context" : "criterion",
                                      "type" : "IVL_PQ",
                                      "element" : "value",
                                      "variable" : "v"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "low",
                                      "source" : [
                                        {
                                          "context" : "v",
                                          "element" : "high",
                                          "variable" : "l1"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "age",
                                          "source" : [
                                            {
                                              "context" : "l1"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "ref",
                                              "contextType" : "variable",
                                              "element" : "age",
                                              "variable" : "age",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Quantity"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "high",
                                              "source" : [
                                                {
                                                  "context" : "l1"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "age",
                                                  "contextType" : "variable",
                                                  "element" : "high",
                                                  "variable" : "high"
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "value",
                                                  "source" : [
                                                    {
                                                      "context" : "l1",
                                                      "element" : "value",
                                                      "variable" : "decValue"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "high",
                                                      "contextType" : "variable",
                                                      "element" : "value",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueId" : "decValue"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "name" : "unit",
                                                  "source" : [
                                                    {
                                                      "context" : "l1",
                                                      "element" : "unit",
                                                      "variable" : "Unit1"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "high",
                                                      "contextType" : "variable",
                                                      "element" : "unit",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueId" : "Unit1"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "referenceRange"
            }
          ]
        },
        {
          "name" : "Act",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "cda",
              "type" : "Act",
              "mode" : "source"
            },
            {
              "name" : "pat",
              "type" : "Patient",
              "mode" : "target"
            },
            {
              "name" : "ac",
              "type" : "DiagnosticReport",
              "mode" : "target"
            },
            {
              "name" : "enc",
              "type" : "Encounter",
              "mode" : "target"
            },
            {
              "name" : "bundle",
              "type" : "Bundle",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "code",
              "source" : [
                {
                  "context" : "cda",
                  "element" : "code",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "ac",
                  "contextType" : "variable",
                  "element" : "code",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "status",
              "source" : [
                {
                  "context" : "cda",
                  "condition" : "cda.statusCode.exists().not()"
                }
              ],
              "rule" : [
                {
                  "name" : "statuscode",
                  "source" : [
                    {
                      "context" : "cda"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ac",
                      "contextType" : "variable",
                      "element" : "status",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "final"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "cda",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'completed')"
                }
              ],
              "target" : [
                {
                  "context" : "ac",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "final"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "cda",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'active')"
                }
              ],
              "target" : [
                {
                  "context" : "ac",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "registered"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "cda",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'aborted')"
                }
              ],
              "target" : [
                {
                  "context" : "ac",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "cancelled"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "cda",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'suspended')"
                }
              ],
              "target" : [
                {
                  "context" : "ac",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "partial"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "value3",
              "source" : [
                {
                  "context" : "cda",
                  "element" : "effectiveTime",
                  "variable" : "effectiveTime"
                }
              ],
              "target" : [
                {
                  "context" : "ac",
                  "contextType" : "variable",
                  "element" : "effective",
                  "variable" : "value",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "dateTime"
                    }
                  ]
                }
              ],
              "dependent" : [
                {
                  "name" : "TSDateTime",
                  "variable" : [
                    "effectiveTime",
                    "value"
                  ]
                }
              ]
            },
            {
              "name" : "where",
              "source" : [
                {
                  "context" : "cda",
                  "condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
                }
              ],
              "rule" : [
                {
                  "name" : "effectiveTime",
                  "source" : [
                    {
                      "context" : "cda",
                      "element" : "effectiveTime",
                      "variable" : "eff"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ac",
                      "contextType" : "variable",
                      "element" : "effective",
                      "variable" : "period",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Period"
                        }
                      ]
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "IVLTSPeriod",
                      "variable" : [
                        "eff",
                        "period"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "cda"
                }
              ],
              "target" : [
                {
                  "context" : "ac",
                  "contextType" : "variable",
                  "element" : "subject",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Patient/' + %pat.id"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "cda"
                }
              ],
              "target" : [
                {
                  "context" : "ac",
                  "contextType" : "variable",
                  "element" : "encounter",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Encounter/' + %enc.id"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "exist",
              "source" : [
                {
                  "context" : "cda",
                  "condition" : "cda.specimen.exists()"
                }
              ],
              "rule" : [
                {
                  "name" : "specimen",
                  "source" : [
                    {
                      "context" : "cda",
                      "element" : "specimen",
                      "variable" : "src"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e4"
                    },
                    {
                      "context" : "e4",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e4",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "specimen",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Specimen"
                        }
                      ]
                    },
                    {
                      "context" : "specimen",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid4",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e4",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/Specimen/"
                        },
                        {
                          "valueId" : "uuid4"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "Specimen"
                        }
                      ]
                    },
                    {
                      "context" : "ac",
                      "contextType" : "variable",
                      "element" : "specimen",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/Specimen/' + %specimen.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "SpecimenRole",
                      "source" : [
                        {
                          "context" : "src",
                          "element" : "specimenRole",
                          "variable" : "specimenRole"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "id",
                          "source" : [
                            {
                              "context" : "specimenRole",
                              "element" : "id",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "specimen",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "specimenPlayingEntity",
                          "source" : [
                            {
                              "context" : "specimenRole",
                              "element" : "specimenPlayingEntity",
                              "variable" : "specimenPlayingEntity"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "specimenPlayingEntity",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "specimen",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "reference",
                      "source" : [
                        {
                          "context" : "src"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "specimen",
                          "contextType" : "variable",
                          "element" : "subject",
                          "variable" : "reference",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        },
                        {
                          "context" : "reference",
                          "contextType" : "variable",
                          "element" : "reference",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "'https://example/Patient/' + %patient.id"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "entryRelationshipobservation",
                      "source" : [
                        {
                          "context" : "cda",
                          "element" : "entryRelationship",
                          "variable" : "entryRelationship"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "observation",
                          "source" : [
                            {
                              "context" : "entryRelationship",
                              "element" : "observation",
                              "variable" : "observation"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "obs",
                              "source" : [
                                {
                                  "context" : "observation"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e12"
                                },
                                {
                                  "context" : "e12",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "POST"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e12",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "obs",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Observation"
                                    }
                                  ]
                                },
                                {
                                  "context" : "obs",
                                  "contextType" : "variable",
                                  "element" : "id",
                                  "variable" : "uuid13",
                                  "transform" : "uuid"
                                },
                                {
                                  "context" : "e12",
                                  "contextType" : "variable",
                                  "element" : "fullUrl",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "https://example/Observation/"
                                    },
                                    {
                                      "valueId" : "uuid13"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "url",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "Observation"
                                    }
                                  ]
                                },
                                {
                                  "context" : "ac",
                                  "contextType" : "variable",
                                  "element" : "result",
                                  "variable" : "reference",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Reference"
                                    }
                                  ]
                                },
                                {
                                  "context" : "reference",
                                  "contextType" : "variable",
                                  "element" : "reference",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "'https://example/Observation/' + %obs.id"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "ORG",
                                  "source" : [
                                    {
                                      "context" : "observation"
                                    }
                                  ],
                                  "dependent" : [
                                    {
                                      "name" : "Observation2",
                                      "variable" : [
                                        "observation",
                                        "pat",
                                        "enc",
                                        "obs",
                                        "bundle",
                                        "cda",
                                        "specimen"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "entryRelationshipprocedure",
                                  "source" : [
                                    {
                                      "context" : "cda",
                                      "element" : "entryRelationship",
                                      "variable" : "entryRelationship1"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "procedure",
                                      "source" : [
                                        {
                                          "context" : "entryRelationship1",
                                          "element" : "procedure",
                                          "variable" : "proc"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "bundle",
                                          "contextType" : "variable",
                                          "element" : "entry",
                                          "variable" : "e5"
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "request",
                                          "variable" : "request",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "BackboneElement"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "method",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "POST"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "resource",
                                          "variable" : "procedure",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Procedure"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid5",
                                          "transform" : "uuid"
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Procedure/"
                                            },
                                            {
                                              "valueId" : "uuid5"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "url",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "Procedure"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "obs",
                                          "contextType" : "variable",
                                          "element" : "partOf",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Procedure/' + %procedure.id"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "reference",
                                          "source" : [
                                            {
                                              "context" : "proc"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "subject",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Patient/' + %patient.id"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "reference",
                                          "source" : [
                                            {
                                              "context" : "proc"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "encounter",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Encounter/' + %encounter.id"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "status",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "condition" : "proc.statusCode.exists().not()"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "statuscode",
                                              "source" : [
                                                {
                                                  "context" : "proc"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "procedure",
                                                  "contextType" : "variable",
                                                  "element" : "status",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "unknown"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'completed')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "completed"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'active')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "in-progress"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'aborted')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "stopped"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'suspended')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "on-hold"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'cancelled')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "not-done"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'held')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "on-hold"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'new')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "preparation"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'obsolete')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "entered-in-error"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'nullified')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "unknown"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "datetime",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "effectiveTime",
                                              "variable" : "effectiveTime"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "performed",
                                              "variable" : "value",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "dateTime"
                                                }
                                              ]
                                            }
                                          ],
                                          "dependent" : [
                                            {
                                              "name" : "TSDateTime",
                                              "variable" : [
                                                "effectiveTime",
                                                "value"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "where",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "effectiveTime",
                                              "source" : [
                                                {
                                                  "context" : "proc",
                                                  "element" : "effectiveTime",
                                                  "variable" : "eff"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "procedure",
                                                  "contextType" : "variable",
                                                  "element" : "performed",
                                                  "variable" : "period",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Period"
                                                    }
                                                  ]
                                                }
                                              ],
                                              "dependent" : [
                                                {
                                                  "name" : "IVLTSPeriod",
                                                  "variable" : [
                                                    "eff",
                                                    "period"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "targetSiteCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "targetSiteCode",
                                              "variable" : "vvv"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "bodySite",
                                              "variable" : "vvv",
                                              "transform" : "create"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ],
                                  "documentation" : "procedure"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "organizer",
                          "source" : [
                            {
                              "context" : "entryRelationship",
                              "element" : "organizer",
                              "variable" : "organizer"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "Organizer",
                              "source" : [
                                {
                                  "context" : "organizer"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e12"
                                },
                                {
                                  "context" : "e12",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "POST"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e12",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "obs",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Observation"
                                    }
                                  ]
                                },
                                {
                                  "context" : "obs",
                                  "contextType" : "variable",
                                  "element" : "id",
                                  "variable" : "uuid13",
                                  "transform" : "uuid"
                                },
                                {
                                  "context" : "e12",
                                  "contextType" : "variable",
                                  "element" : "fullUrl",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "https://example/Observation/"
                                    },
                                    {
                                      "valueId" : "uuid13"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "url",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "Observation"
                                    }
                                  ]
                                },
                                {
                                  "context" : "ac",
                                  "contextType" : "variable",
                                  "element" : "result",
                                  "variable" : "reference",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Reference"
                                    }
                                  ]
                                },
                                {
                                  "context" : "reference",
                                  "contextType" : "variable",
                                  "element" : "reference",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "'https://example/Observation/' + %obs.id"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "ORG",
                                  "source" : [
                                    {
                                      "context" : "organizer"
                                    }
                                  ],
                                  "dependent" : [
                                    {
                                      "name" : "Organizer",
                                      "variable" : [
                                        "cda",
                                        "organizer",
                                        "pat",
                                        "enc",
                                        "obs",
                                        "bundle"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "entryRelationshiprocedure",
                                  "source" : [
                                    {
                                      "context" : "cda",
                                      "element" : "entryRelationship",
                                      "variable" : "entryRelationship1"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "pbservation",
                                      "source" : [
                                        {
                                          "context" : "entryRelationship1",
                                          "element" : "procedure",
                                          "variable" : "proc"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "bundle",
                                          "contextType" : "variable",
                                          "element" : "entry",
                                          "variable" : "e5"
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "request",
                                          "variable" : "request",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "BackboneElement"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "method",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "POST"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "resource",
                                          "variable" : "procedure",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Procedure"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid5",
                                          "transform" : "uuid"
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Procedure/"
                                            },
                                            {
                                              "valueId" : "uuid5"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "url",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "Procedure"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "obs",
                                          "contextType" : "variable",
                                          "element" : "partOf",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Procedure/' + %procedure.id"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "reference",
                                          "source" : [
                                            {
                                              "context" : "proc"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "subject",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Patient/' + %patient.id"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "reference",
                                          "source" : [
                                            {
                                              "context" : "proc"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "encounter",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Encounter/' + %encounter.id"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "status",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "condition" : "proc.statusCode.exists().not()"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "statuscode",
                                              "source" : [
                                                {
                                                  "context" : "proc"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "procedure",
                                                  "contextType" : "variable",
                                                  "element" : "status",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "unknown"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'completed')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "completed"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'active')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "in-progress"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'aborted')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "stopped"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'suspended')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "on-hold"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'cancelled')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "not-done"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'held')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "on-hold"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'new')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "preparation"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'obsolete')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "entered-in-error"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "statusCode",
                                              "variable" : "statusc",
                                              "condition" : "(code = 'nullified')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "unknown"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "datetime",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "effectiveTime",
                                              "variable" : "effectiveTime"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "performed",
                                              "variable" : "value",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "dateTime"
                                                }
                                              ]
                                            }
                                          ],
                                          "dependent" : [
                                            {
                                              "name" : "TSDateTime",
                                              "variable" : [
                                                "effectiveTime",
                                                "value"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "where",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "effectiveTime",
                                              "source" : [
                                                {
                                                  "context" : "proc",
                                                  "element" : "effectiveTime",
                                                  "variable" : "eff"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "procedure",
                                                  "contextType" : "variable",
                                                  "element" : "performed",
                                                  "variable" : "period",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Period"
                                                    }
                                                  ]
                                                }
                                              ],
                                              "dependent" : [
                                                {
                                                  "name" : "IVLTSPeriod",
                                                  "variable" : [
                                                    "eff",
                                                    "period"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "targetSiteCode",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "targetSiteCode",
                                              "variable" : "vvv"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "bodySite",
                                              "variable" : "vvv",
                                              "transform" : "create"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ],
                                  "documentation" : "procedure"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "specimen"
            },
            {
              "name" : "existnot",
              "source" : [
                {
                  "context" : "cda",
                  "condition" : "cda.specimen.exists().not()"
                }
              ],
              "rule" : [
                {
                  "name" : "entryRelationshipobservation",
                  "source" : [
                    {
                      "context" : "cda",
                      "element" : "entryRelationship",
                      "variable" : "entryRelationship"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "observation",
                      "source" : [
                        {
                          "context" : "entryRelationship",
                          "element" : "observation",
                          "variable" : "observation"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "obs",
                          "source" : [
                            {
                              "context" : "observation"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e12"
                            },
                            {
                              "context" : "e12",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "POST"
                                }
                              ]
                            },
                            {
                              "context" : "e12",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "obs",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Observation"
                                }
                              ]
                            },
                            {
                              "context" : "obs",
                              "contextType" : "variable",
                              "element" : "id",
                              "variable" : "uuid13",
                              "transform" : "uuid"
                            },
                            {
                              "context" : "e12",
                              "contextType" : "variable",
                              "element" : "fullUrl",
                              "transform" : "append",
                              "parameter" : [
                                {
                                  "valueString" : "https://example/Observation/"
                                },
                                {
                                  "valueId" : "uuid13"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "url",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "Observation"
                                }
                              ]
                            },
                            {
                              "context" : "ac",
                              "contextType" : "variable",
                              "element" : "result",
                              "variable" : "reference",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Reference"
                                }
                              ]
                            },
                            {
                              "context" : "reference",
                              "contextType" : "variable",
                              "element" : "reference",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "'https://example/Observation/' + %obs.id"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "ORG",
                              "source" : [
                                {
                                  "context" : "observation"
                                }
                              ],
                              "dependent" : [
                                {
                                  "name" : "Observation3",
                                  "variable" : [
                                    "observation",
                                    "pat",
                                    "enc",
                                    "obs",
                                    "bundle",
                                    "cda"
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "entryRelationshipprocedure",
                              "source" : [
                                {
                                  "context" : "cda",
                                  "element" : "entryRelationship",
                                  "variable" : "entryRelationship1"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "procedure",
                                  "source" : [
                                    {
                                      "context" : "entryRelationship1",
                                      "element" : "procedure",
                                      "variable" : "proc"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "bundle",
                                      "contextType" : "variable",
                                      "element" : "entry",
                                      "variable" : "e5"
                                    },
                                    {
                                      "context" : "e5",
                                      "contextType" : "variable",
                                      "element" : "request",
                                      "variable" : "request",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "BackboneElement"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "method",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "POST"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e5",
                                      "contextType" : "variable",
                                      "element" : "resource",
                                      "variable" : "procedure",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Procedure"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "procedure",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid5",
                                      "transform" : "uuid"
                                    },
                                    {
                                      "context" : "e5",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Procedure/"
                                        },
                                        {
                                          "valueId" : "uuid5"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "Procedure"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "obs",
                                      "contextType" : "variable",
                                      "element" : "partOf",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Procedure/' + %procedure.id"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "reference",
                                      "source" : [
                                        {
                                          "context" : "proc"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "subject",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Patient/' + %patient.id"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "reference",
                                      "source" : [
                                        {
                                          "context" : "proc"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "encounter",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Encounter/' + %encounter.id"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "status",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "condition" : "proc.statusCode.exists().not()"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "statuscode",
                                          "source" : [
                                            {
                                              "context" : "proc"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "unknown"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'completed')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "completed"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'active')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "in-progress"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'aborted')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "stopped"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'suspended')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "on-hold"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'cancelled')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "not-done"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'held')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "on-hold"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'new')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "preparation"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'obsolete')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "entered-in-error"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'nullified')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "unknown"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "datetime",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "effectiveTime",
                                          "variable" : "effectiveTime"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "performed",
                                          "variable" : "value",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "dateTime"
                                            }
                                          ]
                                        }
                                      ],
                                      "dependent" : [
                                        {
                                          "name" : "TSDateTime",
                                          "variable" : [
                                            "effectiveTime",
                                            "value"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "where",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "effectiveTime",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "effectiveTime",
                                              "variable" : "eff"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "performed",
                                              "variable" : "period",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Period"
                                                }
                                              ]
                                            }
                                          ],
                                          "dependent" : [
                                            {
                                              "name" : "IVLTSPeriod",
                                              "variable" : [
                                                "eff",
                                                "period"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "targetSiteCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "targetSiteCode",
                                          "variable" : "vvv"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "bodySite",
                                          "variable" : "vvv",
                                          "transform" : "create"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ],
                              "documentation" : "procedure"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "organizer",
                      "source" : [
                        {
                          "context" : "entryRelationship",
                          "element" : "organizer",
                          "variable" : "organizer"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "Organizer",
                          "source" : [
                            {
                              "context" : "organizer"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e12"
                            },
                            {
                              "context" : "e12",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "POST"
                                }
                              ]
                            },
                            {
                              "context" : "e12",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "obs",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Observation"
                                }
                              ]
                            },
                            {
                              "context" : "obs",
                              "contextType" : "variable",
                              "element" : "id",
                              "variable" : "uuid13",
                              "transform" : "uuid"
                            },
                            {
                              "context" : "e12",
                              "contextType" : "variable",
                              "element" : "fullUrl",
                              "transform" : "append",
                              "parameter" : [
                                {
                                  "valueString" : "https://example/Observation/"
                                },
                                {
                                  "valueId" : "uuid13"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "url",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "Observation"
                                }
                              ]
                            },
                            {
                              "context" : "ac",
                              "contextType" : "variable",
                              "element" : "result",
                              "variable" : "reference",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Reference"
                                }
                              ]
                            },
                            {
                              "context" : "reference",
                              "contextType" : "variable",
                              "element" : "reference",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "'https://example/Observation/' + %obs.id"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "ORG",
                              "source" : [
                                {
                                  "context" : "organizer"
                                }
                              ],
                              "dependent" : [
                                {
                                  "name" : "Organizer",
                                  "variable" : [
                                    "cda",
                                    "organizer",
                                    "pat",
                                    "enc",
                                    "obs",
                                    "bundle"
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "entryRelationshiprocedure",
                              "source" : [
                                {
                                  "context" : "cda",
                                  "element" : "entryRelationship",
                                  "variable" : "entryRelationship1"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "pbservation",
                                  "source" : [
                                    {
                                      "context" : "entryRelationship1",
                                      "element" : "procedure",
                                      "variable" : "proc"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "bundle",
                                      "contextType" : "variable",
                                      "element" : "entry",
                                      "variable" : "e5"
                                    },
                                    {
                                      "context" : "e5",
                                      "contextType" : "variable",
                                      "element" : "request",
                                      "variable" : "request",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "BackboneElement"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "method",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "POST"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e5",
                                      "contextType" : "variable",
                                      "element" : "resource",
                                      "variable" : "procedure",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Procedure"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "procedure",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid5",
                                      "transform" : "uuid"
                                    },
                                    {
                                      "context" : "e5",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Procedure/"
                                        },
                                        {
                                          "valueId" : "uuid5"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "Procedure"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "obs",
                                      "contextType" : "variable",
                                      "element" : "partOf",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Procedure/' + %procedure.id"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "reference",
                                      "source" : [
                                        {
                                          "context" : "proc"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "subject",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Patient/' + %patient.id"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "reference",
                                      "source" : [
                                        {
                                          "context" : "proc"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "encounter",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Encounter/' + %encounter.id"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "status",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "condition" : "proc.statusCode.exists().not()"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "statuscode",
                                          "source" : [
                                            {
                                              "context" : "proc"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "status",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "unknown"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'completed')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "completed"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'active')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "in-progress"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'aborted')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "stopped"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'suspended')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "on-hold"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'cancelled')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "not-done"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'held')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "on-hold"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'new')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "preparation"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'obsolete')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "entered-in-error"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "statusCode",
                                          "variable" : "statusc",
                                          "condition" : "(code = 'nullified')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "status",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "unknown"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "datetime",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "effectiveTime",
                                          "variable" : "effectiveTime"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "performed",
                                          "variable" : "value",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "dateTime"
                                            }
                                          ]
                                        }
                                      ],
                                      "dependent" : [
                                        {
                                          "name" : "TSDateTime",
                                          "variable" : [
                                            "effectiveTime",
                                            "value"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "where",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "effectiveTime",
                                          "source" : [
                                            {
                                              "context" : "proc",
                                              "element" : "effectiveTime",
                                              "variable" : "eff"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "procedure",
                                              "contextType" : "variable",
                                              "element" : "performed",
                                              "variable" : "period",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Period"
                                                }
                                              ]
                                            }
                                          ],
                                          "dependent" : [
                                            {
                                              "name" : "IVLTSPeriod",
                                              "variable" : [
                                                "eff",
                                                "period"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "targetSiteCode",
                                      "source" : [
                                        {
                                          "context" : "proc",
                                          "element" : "targetSiteCode",
                                          "variable" : "vvv"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "procedure",
                                          "contextType" : "variable",
                                          "element" : "bodySite",
                                          "variable" : "vvv",
                                          "transform" : "create"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ],
                              "documentation" : "procedure"
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "documentation" : "cda -> bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'POST', e4.resource = create('Specimen') as specimen,  specimen.id = uuid() as uuid4,  e4.fullUrl = append('https://example/Specimen/', uuid4), request.url = 'Specimen' then {"
                }
              ]
            },
            {
              "name" : "participant",
              "source" : [
                {
                  "context" : "cda",
                  "element" : "participant",
                  "variable" : "part",
                  "condition" : "(typeCode != 'DEV')"
                }
              ],
              "target" : [
                {
                  "context" : "enc",
                  "contextType" : "variable",
                  "element" : "participant",
                  "variable" : "participant"
                }
              ],
              "rule" : [
                {
                  "name" : "type",
                  "source" : [
                    {
                      "context" : "part"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "participant",
                      "contextType" : "variable",
                      "element" : "type",
                      "variable" : "type"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "codeType",
                      "source" : [
                        {
                          "context" : "part"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "type",
                          "contextType" : "variable",
                          "element" : "coding",
                          "variable" : "coding"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "codice",
                          "source" : [
                            {
                              "context" : "part"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "code",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "part.typeCode"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "system",
                          "source" : [
                            {
                              "context" : "part"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "system",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "participantRole",
                  "source" : [
                    {
                      "context" : "part",
                      "element" : "participantRole",
                      "variable" : "participantRole"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "participant",
                      "contextType" : "variable",
                      "element" : "individual",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "participanRoleBund",
                      "source" : [
                        {
                          "context" : "participantRole"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e"
                        },
                        {
                          "context" : "e",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "practitioner",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Practitioner"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "time",
                          "source" : [
                            {
                              "context" : "part",
                              "element" : "time",
                              "variable" : "time1"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "participant",
                              "contextType" : "variable",
                              "element" : "period",
                              "variable" : "period",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Period"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "val",
                              "source" : [
                                {
                                  "context" : "time1"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "period",
                                  "contextType" : "variable",
                                  "element" : "start",
                                  "variable" : "start",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "dateTime"
                                    }
                                  ]
                                }
                              ],
                              "dependent" : [
                                {
                                  "name" : "TSDateTime",
                                  "variable" : [
                                    "time1",
                                    "start"
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "time",
                          "source" : [
                            {
                              "context" : "part",
                              "element" : "time",
                              "variable" : "time1"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "participant",
                              "contextType" : "variable",
                              "element" : "period",
                              "variable" : "period",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Period"
                                }
                              ]
                            }
                          ],
                          "dependent" : [
                            {
                              "name" : "IVLTSPeriod",
                              "variable" : [
                                "time1",
                                "period"
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "participantRole"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "participantRole"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/act/participant"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "org",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid4",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Practitioner/"
                                        },
                                        {
                                          "valueId" : "uuid4"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "playingEntity",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "playingEntity",
                              "variable" : "playingEntity"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "playingEntity",
                                  "element" : "name",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "PARTICIPANT"
            },
            {
              "name" : "performer",
              "source" : [
                {
                  "context" : "cda",
                  "element" : "performer",
                  "variable" : "performer"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e1"
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/PractitionerRole/"
                    },
                    {
                      "valueId" : "uuid1"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "ac",
                  "contextType" : "variable",
                  "element" : "performer",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "performer",
                  "source" : [
                    {
                      "context" : "performer",
                      "element" : "assignedEntity",
                      "variable" : "assignedEntity"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "assignedEntity",
                          "element" : "code",
                          "variable" : "codice"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code"
                        }
                      ]
                    },
                    {
                      "name" : "ASSAUth",
                      "source" : [
                        {
                          "context" : "assignedEntity"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e2"
                        },
                        {
                          "context" : "e2",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e2",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "practitioner",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Practitioner"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "assignedEntity",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "assignedEntity"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "assignedEntity"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "assignedEntity"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "assignedEntity"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/act/performer"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "assignedEntity",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "assignedEntity"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "pra",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid4",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e2",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Practitioner/"
                                        },
                                        {
                                          "valueId" : "uuid4"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "practitioner",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "assignedEntity",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "assignedEntity",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "assignedEntity",
                              "element" : "assignedPerson",
                              "variable" : "person"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "person",
                                  "element" : "name",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "birth",
                              "source" : [
                                {
                                  "context" : "person",
                                  "element" : "birthTime",
                                  "variable" : "birthTime"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "birthTime",
                                      "element" : "value",
                                      "variable" : "date"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "birthDate",
                                      "transform" : "truncate",
                                      "parameter" : [
                                        {
                                          "valueId" : "date"
                                        },
                                        {
                                          "valueInteger" : 10
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "representedOrganization",
                      "source" : [
                        {
                          "context" : "assignedEntity",
                          "element" : "representedOrganization",
                          "variable" : "representedOrganization"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e3"
                        },
                        {
                          "context" : "e3",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e3",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "organization",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Organization"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "representedOrganization"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "representedOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/act/representedOrganization"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Organization?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "org",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid2",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e3",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid2"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "organization",
                                      "variable" : "referenceOrg",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "referenceOrg",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid2"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "OrgPartOf",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "asOrganizationPartOf",
                              "variable" : "OrgPartOf"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e4"
                            },
                            {
                              "context" : "e4",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e4",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "organization1",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Organization"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "OrgPartOf"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "meta",
                                  "variable" : "meta"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "coding",
                                  "source" : [
                                    {
                                      "context" : "OrgPartOf"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "meta",
                                      "contextType" : "variable",
                                      "element" : "tag",
                                      "variable" : "coding",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Coding"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "system",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "http://algoritmodiscoring"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "code",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "ClinicalDocument/body/act/representedOrganization/asOrganizationPartOf"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "identifier",
                                  "variable" : "identifier"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "root1",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "translate",
                                      "parameter" : [
                                        {
                                          "valueId" : "r"
                                        },
                                        {
                                          "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                        },
                                        {
                                          "valueString" : "uri"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "ext",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "UUID",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "url",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "Organization?identifier="
                                            },
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "assigningAuthorityName",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "assigningAuthorityName",
                                      "variable" : "s"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "assigner",
                                      "variable" : "a"
                                    },
                                    {
                                      "context" : "a",
                                      "contextType" : "variable",
                                      "element" : "display",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "s"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "r",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "org",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid3",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid3",
                                          "transform" : "uuid"
                                        },
                                        {
                                          "context" : "e4",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Organization/"
                                            },
                                            {
                                              "valueId" : "uuid3"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "organization",
                                          "contextType" : "variable",
                                          "element" : "partOf",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Organization/' + %organization1.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "statusCode",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "statusCode",
                                  "variable" : "status",
                                  "condition" : "(value = 'active')"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "boolean"
                                    }
                                  ]
                                },
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "true"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "wholeOrganization",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "wholeOrganization",
                                  "variable" : "wholeOrgan"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e10bis"
                                },
                                {
                                  "context" : "e10bis",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e10bis",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "organization2",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "OrgPartOf"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "OrgPartOf"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "OrgPartOf"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/body/act/representedOrganization/asOrganizationPartOf/wholeOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "identifier",
                                      "variable" : "identifier"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "root1",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "translate",
                                          "parameter" : [
                                            {
                                              "valueId" : "r"
                                            },
                                            {
                                              "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                            },
                                            {
                                              "valueString" : "uri"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "ext",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "UUID",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "request",
                                              "contextType" : "variable",
                                              "element" : "url",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Organization?identifier="
                                                },
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "assigningAuthorityName",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "assigningAuthorityName",
                                          "variable" : "s"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "assigner",
                                          "variable" : "a"
                                        },
                                        {
                                          "context" : "a",
                                          "contextType" : "variable",
                                          "element" : "display",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "s"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "r",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "org",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid5",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e10bis",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid5"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "organization1",
                                              "contextType" : "variable",
                                              "element" : "partOf",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Organization/' + %organization2.id"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "PERFORMER"
            },
            {
              "name" : "author",
              "source" : [
                {
                  "context" : "cda",
                  "element" : "author",
                  "variable" : "srcAuthor"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e5"
                },
                {
                  "context" : "e5",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e5",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid6",
                  "transform" : "uuid"
                },
                {
                  "context" : "e5",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/PractitionerRole/"
                    },
                    {
                      "valueId" : "uuid6"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "ac",
                  "contextType" : "variable",
                  "element" : "performer",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "author",
                  "source" : [
                    {
                      "context" : "srcAuthor",
                      "element" : "assignedAuthor",
                      "variable" : "assignedAuthor"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "code",
                          "variable" : "codice"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code"
                        }
                      ]
                    },
                    {
                      "name" : "ASSAUth",
                      "source" : [
                        {
                          "context" : "assignedAuthor"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e7"
                        },
                        {
                          "context" : "e7",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e7",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "practitioner",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Practitioner"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "functionCode",
                          "source" : [
                            {
                              "context" : "srcAuthor",
                              "element" : "functionCode",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "assignedAuthor"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "assignedAuthor"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/act/author"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "aut",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid2",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e7",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Practitioner/"
                                        },
                                        {
                                          "valueId" : "uuid2"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "practitioner",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "2.16.840.1.113883.2.9.4.3.2",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "id",
                              "variable" : "id",
                              "condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "UUID",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "url",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "Practitioner?identifier="
                                    },
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "diverso",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "id",
                              "variable" : "id",
                              "condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "UUID",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "url",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "Practitioner?identifier="
                                    },
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "assignedPerson",
                              "variable" : "person"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "person",
                                  "element" : "name",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "birth",
                              "source" : [
                                {
                                  "context" : "person",
                                  "element" : "birthTime",
                                  "variable" : "birthTime"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "birthTime",
                                      "element" : "value",
                                      "variable" : "date"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "birthDate",
                                      "transform" : "truncate",
                                      "parameter" : [
                                        {
                                          "valueId" : "date"
                                        },
                                        {
                                          "valueInteger" : 10
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ],
                          "documentation" : "person"
                        }
                      ]
                    },
                    {
                      "name" : "representedOrganization",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "representedOrganization",
                          "variable" : "representedOrganization"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e8"
                        },
                        {
                          "context" : "e8",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e8",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "organization",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Organization"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "representedOrganization"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "representedOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/act/author/representedOrganization"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Organization?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "org",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid8",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e8",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid8"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "organization",
                                      "variable" : "referenceOrg",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "referenceOrg",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid8"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "OrgPartOf",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "asOrganizationPartOf",
                              "variable" : "OrgPartOf"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e9"
                            },
                            {
                              "context" : "e9",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e9",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "organization1",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Organization"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "OrgPartOf"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "meta",
                                  "variable" : "meta"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "coding",
                                  "source" : [
                                    {
                                      "context" : "OrgPartOf"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "meta",
                                      "contextType" : "variable",
                                      "element" : "tag",
                                      "variable" : "coding",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Coding"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "system",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "http://algoritmodiscoring"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "code",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "ClinicalDocument/body/act/author/representedOrganization/asOrganizationPartOf"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "identifier",
                                  "variable" : "identifier"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "root1",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "translate",
                                      "parameter" : [
                                        {
                                          "valueId" : "r"
                                        },
                                        {
                                          "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                        },
                                        {
                                          "valueString" : "uri"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "ext",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "UUID",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "url",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "Organization?identifier="
                                            },
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "assigningAuthorityName",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "assigningAuthorityName",
                                      "variable" : "s"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "assigner",
                                      "variable" : "a"
                                    },
                                    {
                                      "context" : "a",
                                      "contextType" : "variable",
                                      "element" : "display",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "s"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "r",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "org",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid9",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e9",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Organization/"
                                            },
                                            {
                                              "valueId" : "uuid9"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "organization",
                                          "contextType" : "variable",
                                          "element" : "partOf",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Organization/' + %organization1.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "statusCode",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "statusCode",
                                  "variable" : "status",
                                  "condition" : "(value = 'active')"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "boolean"
                                    }
                                  ]
                                },
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "true"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "wholeOrganization",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "wholeOrganization",
                                  "variable" : "wholeOrgan"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e10"
                                },
                                {
                                  "context" : "e10",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e10",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "organization2",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "wholeOrgan"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/body/act/author/representedOrganization/asOrganizationPartOf/wholeOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "identifier",
                                      "variable" : "identifier"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "root1",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "translate",
                                          "parameter" : [
                                            {
                                              "valueId" : "r"
                                            },
                                            {
                                              "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                            },
                                            {
                                              "valueString" : "uri"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "ext",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "UUID",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "request",
                                              "contextType" : "variable",
                                              "element" : "url",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Organization?identifier="
                                                },
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "assigningAuthorityName",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "assigningAuthorityName",
                                          "variable" : "s"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "assigner",
                                          "variable" : "a"
                                        },
                                        {
                                          "context" : "a",
                                          "contextType" : "variable",
                                          "element" : "display",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "s"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "r",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "org",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid10",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e10",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid10"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "organization1",
                                              "contextType" : "variable",
                                              "element" : "partOf",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Organization/' + %organization2.id"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "organization"
                    }
                  ]
                }
              ],
              "documentation" : "AUTHOR"
            },
            {
              "name" : "entryRelationship",
              "source" : [
                {
                  "context" : "cda",
                  "element" : "entryRelationship",
                  "variable" : "entryRelationship"
                }
              ],
              "rule" : [
                {
                  "name" : "Act",
                  "source" : [
                    {
                      "context" : "entryRelationship",
                      "element" : "act",
                      "variable" : "act"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "text",
                      "source" : [
                        {
                          "context" : "act",
                          "element" : "text",
                          "variable" : "text"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "reference",
                          "source" : [
                            {
                              "context" : "text",
                              "element" : "reference",
                              "variable" : "reference"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "ac",
                              "contextType" : "variable",
                              "element" : "conclusion",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "reference.value"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "<!--entryRelationship per la gestione delle note e commenti-->"
            }
          ]
        },
        {
          "name" : "Organizer",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "cda",
              "type" : "Act",
              "mode" : "source"
            },
            {
              "name" : "org",
              "type" : "Organizer",
              "mode" : "source"
            },
            {
              "name" : "patient",
              "type" : "Patient",
              "mode" : "target"
            },
            {
              "name" : "encounter",
              "type" : "Encounter",
              "mode" : "target"
            },
            {
              "name" : "observation",
              "type" : "Observation",
              "mode" : "target"
            },
            {
              "name" : "bundle",
              "type" : "Bundle",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "org"
                }
              ],
              "target" : [
                {
                  "context" : "observation",
                  "contextType" : "variable",
                  "element" : "subject",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Patient/' + %patient.id"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "reference",
              "source" : [
                {
                  "context" : "org"
                }
              ],
              "target" : [
                {
                  "context" : "observation",
                  "contextType" : "variable",
                  "element" : "encounter",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Encounter/' + %encounter.id"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "code",
              "source" : [
                {
                  "context" : "org",
                  "element" : "code",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "observation",
                  "contextType" : "variable",
                  "element" : "code",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "act",
              "source" : [
                {
                  "context" : "org",
                  "condition" : "org.code.exists().not()"
                }
              ],
              "rule" : [
                {
                  "name" : "code",
                  "source" : [
                    {
                      "context" : "cda",
                      "element" : "code",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "observation",
                      "contextType" : "variable",
                      "element" : "code",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "org",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'completed')"
                }
              ],
              "target" : [
                {
                  "context" : "observation",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "final"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "org",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'active')"
                }
              ],
              "target" : [
                {
                  "context" : "observation",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "registered"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "org",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'aborted')"
                }
              ],
              "target" : [
                {
                  "context" : "observation",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "cancelled"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "statusCode",
              "source" : [
                {
                  "context" : "org",
                  "element" : "statusCode",
                  "variable" : "statusc",
                  "condition" : "(code = 'suspended')"
                }
              ],
              "target" : [
                {
                  "context" : "observation",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "partial"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "value2",
              "source" : [
                {
                  "context" : "org",
                  "element" : "effectiveTime",
                  "variable" : "effectiveTime"
                }
              ],
              "target" : [
                {
                  "context" : "observation",
                  "contextType" : "variable",
                  "element" : "effective",
                  "variable" : "value",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "dateTime"
                    }
                  ]
                }
              ],
              "dependent" : [
                {
                  "name" : "TSDateTime",
                  "variable" : [
                    "effectiveTime",
                    "value"
                  ]
                }
              ]
            },
            {
              "name" : "where",
              "source" : [
                {
                  "context" : "org",
                  "condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
                }
              ],
              "rule" : [
                {
                  "name" : "effectiveTime",
                  "source" : [
                    {
                      "context" : "org",
                      "element" : "effectiveTime",
                      "variable" : "eff"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "observation",
                      "contextType" : "variable",
                      "element" : "effective",
                      "variable" : "period",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Period"
                        }
                      ]
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "IVLTSPeriod",
                      "variable" : [
                        "eff",
                        "period"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "specimen",
              "source" : [
                {
                  "context" : "org",
                  "element" : "specimen",
                  "variable" : "spmn"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e4o"
                },
                {
                  "context" : "e4o",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e4o",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "specimen",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Specimen"
                    }
                  ]
                },
                {
                  "context" : "specimen",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid4o",
                  "transform" : "uuid"
                },
                {
                  "context" : "e4o",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/Specimen/"
                    },
                    {
                      "valueId" : "uuid4o"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "Specimen"
                    }
                  ]
                },
                {
                  "context" : "observation",
                  "contextType" : "variable",
                  "element" : "specimen",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Specimen/' + %specimen.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "specimenRole",
                  "source" : [
                    {
                      "context" : "spmn",
                      "element" : "specimenRole",
                      "variable" : "specimenRole"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "id",
                      "source" : [
                        {
                          "context" : "specimenRole",
                          "element" : "id",
                          "variable" : "id"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "specimen",
                          "contextType" : "variable",
                          "element" : "identifier"
                        }
                      ]
                    },
                    {
                      "name" : "specimenPlayingEntity",
                      "source" : [
                        {
                          "context" : "specimenRole",
                          "element" : "specimenPlayingEntity",
                          "variable" : "specimenPlayingEntity"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "specimenPlayingEntity",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "specimen",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "specimen"
            },
            {
              "name" : "subject",
              "source" : [
                {
                  "context" : "org",
                  "element" : "subject",
                  "variable" : "sbj"
                }
              ],
              "rule" : [
                {
                  "name" : "relatedSubject",
                  "source" : [
                    {
                      "context" : "sbj",
                      "element" : "relatedSubject",
                      "variable" : "relatedSubj"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "patient",
                      "contextType" : "variable",
                      "element" : "extension",
                      "variable" : "extension2"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "ExtSubjectAnimal",
                      "variable" : [
                        "relatedSubj",
                        "extension2"
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "subject"
            },
            {
              "name" : "performer",
              "source" : [
                {
                  "context" : "org",
                  "element" : "performer",
                  "variable" : "performer"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e1"
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e1",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/PractitionerRole/"
                    },
                    {
                      "valueId" : "uuid1"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "practitionerRole",
                  "source" : [
                    {
                      "context" : "performer"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "observation",
                      "contextType" : "variable",
                      "element" : "performer",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "entity",
                      "source" : [
                        {
                          "context" : "performer",
                          "element" : "assignedEntity",
                          "variable" : "entity"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "entity",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "practitioner",
                          "source" : [
                            {
                              "context" : "entity"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e2"
                            },
                            {
                              "context" : "e2",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e2",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "practitioner",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Practitioner"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "entity"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "meta",
                                  "variable" : "meta"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "coding",
                                  "source" : [
                                    {
                                      "context" : "entity"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "meta",
                                      "contextType" : "variable",
                                      "element" : "tag",
                                      "variable" : "coding",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Coding"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "system",
                                      "source" : [
                                        {
                                          "context" : "entity"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "http://algoritmodiscoring"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "entity"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "code",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "ClinicalDocument/body/organizer/performer"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "identifier",
                                  "variable" : "identifier"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "root1",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "translate",
                                      "parameter" : [
                                        {
                                          "valueId" : "r"
                                        },
                                        {
                                          "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                        },
                                        {
                                          "valueString" : "uri"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "ext",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "UUID",
                                      "source" : [
                                        {
                                          "context" : "entity"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "url",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "Practitioner?identifier="
                                            },
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "assigningAuthorityName",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "assigningAuthorityName",
                                      "variable" : "s"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "assigner",
                                      "variable" : "a"
                                    },
                                    {
                                      "context" : "a",
                                      "contextType" : "variable",
                                      "element" : "display",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "s"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "r",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "aut",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "practitioner",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid2",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e2",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Practitioner/"
                                            },
                                            {
                                              "valueId" : "uuid2"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "practitionerRole",
                                          "contextType" : "variable",
                                          "element" : "practitioner",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "2.16.840.1.113883.2.9.4.3.2",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "diverso",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "id",
                                  "variable" : "id",
                                  "condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "addr",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "addr",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "address",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "telecom",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "telecom",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "telecom",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "assignedPerson",
                                  "variable" : "person"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "person",
                                      "element" : "name",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "birth",
                                  "source" : [
                                    {
                                      "context" : "person",
                                      "element" : "birthTime",
                                      "variable" : "birthTime"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "value",
                                      "source" : [
                                        {
                                          "context" : "birthTime",
                                          "element" : "value",
                                          "variable" : "date"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "practitioner",
                                          "contextType" : "variable",
                                          "element" : "birthDate",
                                          "transform" : "truncate",
                                          "parameter" : [
                                            {
                                              "valueId" : "date"
                                            },
                                            {
                                              "valueInteger" : 10
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "representedOrganization",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "representedOrganization",
                                  "variable" : "representedOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e3"
                                },
                                {
                                  "context" : "e3",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e3",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "organization",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "representedOrganization"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "representedOrganization"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "representedOrganization"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/body/organizer/performer/representedOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "identifier",
                                      "variable" : "identifier"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "root1",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "translate",
                                          "parameter" : [
                                            {
                                              "valueId" : "r"
                                            },
                                            {
                                              "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                            },
                                            {
                                              "valueString" : "uri"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "ext",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "UUID",
                                          "source" : [
                                            {
                                              "context" : "representedOrganization"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "request",
                                              "contextType" : "variable",
                                              "element" : "url",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Organization?identifier="
                                                },
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "assigningAuthorityName",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "assigningAuthorityName",
                                          "variable" : "s"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "assigner",
                                          "variable" : "a"
                                        },
                                        {
                                          "context" : "a",
                                          "contextType" : "variable",
                                          "element" : "display",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "s"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "r",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "aut",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid3",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e3",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid3"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "practitionerRole",
                                              "contextType" : "variable",
                                              "element" : "organization",
                                              "variable" : "referenceOrg",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "referenceOrg",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid3"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "OrgPartOf",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "asOrganizationPartOf",
                                      "variable" : "OrgPartOf"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "bundle",
                                      "contextType" : "variable",
                                      "element" : "entry",
                                      "variable" : "e4"
                                    },
                                    {
                                      "context" : "e4",
                                      "contextType" : "variable",
                                      "element" : "request",
                                      "variable" : "request",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "BackboneElement"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "method",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "PUT"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e4",
                                      "contextType" : "variable",
                                      "element" : "resource",
                                      "variable" : "organization1",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Organization"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "meta",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "meta",
                                          "variable" : "meta"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "coding",
                                          "source" : [
                                            {
                                              "context" : "OrgPartOf"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "meta",
                                              "contextType" : "variable",
                                              "element" : "tag",
                                              "variable" : "coding",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Coding"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "system",
                                              "source" : [
                                                {
                                                  "context" : "OrgPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "coding",
                                                  "contextType" : "variable",
                                                  "element" : "system",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "http://algoritmodiscoring"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "code",
                                              "source" : [
                                                {
                                                  "context" : "OrgPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "coding",
                                                  "contextType" : "variable",
                                                  "element" : "code",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "ClinicalDocument/body/organizer/performer/representedOrganization/asOrganizationPartOf"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "identifier",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "id",
                                          "variable" : "id"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "identifier",
                                          "variable" : "identifier"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "root1",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "root",
                                              "variable" : "r"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "identifier",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "translate",
                                              "parameter" : [
                                                {
                                                  "valueId" : "r"
                                                },
                                                {
                                                  "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                                },
                                                {
                                                  "valueString" : "uri"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "ext",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "identifier",
                                              "contextType" : "variable",
                                              "element" : "value",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "UUID",
                                              "source" : [
                                                {
                                                  "context" : "OrgPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "request",
                                                  "contextType" : "variable",
                                                  "element" : "url",
                                                  "transform" : "append",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Organization?identifier="
                                                    },
                                                    {
                                                      "valueId" : "ext"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "assigningAuthorityName",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "assigningAuthorityName",
                                              "variable" : "s"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "identifier",
                                              "contextType" : "variable",
                                              "element" : "assigner",
                                              "variable" : "a"
                                            },
                                            {
                                              "context" : "a",
                                              "contextType" : "variable",
                                              "element" : "display",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueId" : "s"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "r",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "root",
                                              "variable" : "r"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "org",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "extension",
                                                  "variable" : "ext"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "organization1",
                                                  "contextType" : "variable",
                                                  "element" : "id",
                                                  "variable" : "uuid4",
                                                  "transform" : "evaluate",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "r + '-' + ext"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "e4",
                                                  "contextType" : "variable",
                                                  "element" : "fullUrl",
                                                  "transform" : "append",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "https://example/Organization/"
                                                    },
                                                    {
                                                      "valueId" : "uuid4"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "organization",
                                                  "contextType" : "variable",
                                                  "element" : "partOf",
                                                  "variable" : "reference",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Reference"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "reference",
                                                  "contextType" : "variable",
                                                  "element" : "reference",
                                                  "transform" : "evaluate",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "'https://example/Organization/' + %organization1.id"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "code",
                                          "variable" : "vvv"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "type",
                                          "variable" : "vvv",
                                          "transform" : "create"
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "statusCode",
                                          "variable" : "status",
                                          "condition" : "(value = 'active')"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "active",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "boolean"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "active",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "true"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "wholeOrganization",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf",
                                          "element" : "wholeOrganization",
                                          "variable" : "wholeOrgan"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "bundle",
                                          "contextType" : "variable",
                                          "element" : "entry",
                                          "variable" : "e5"
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "request",
                                          "variable" : "request",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "BackboneElement"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "method",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "PUT"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e5",
                                          "contextType" : "variable",
                                          "element" : "resource",
                                          "variable" : "organization2",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Organization"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "meta",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "meta",
                                              "variable" : "meta"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "coding",
                                              "source" : [
                                                {
                                                  "context" : "wholeOrgan"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "meta",
                                                  "contextType" : "variable",
                                                  "element" : "tag",
                                                  "variable" : "coding",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Coding"
                                                    }
                                                  ]
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "system",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrgan"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "coding",
                                                      "contextType" : "variable",
                                                      "element" : "system",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "http://algoritmodiscoring"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "name" : "code",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrgan"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "coding",
                                                      "contextType" : "variable",
                                                      "element" : "code",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "ClinicalDocument/body/organizer/performer/representedOrganization/asOrganizationPartOf/wholeOrganization"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "identifier",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "id",
                                              "variable" : "id"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "identifier",
                                              "variable" : "identifier"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "root1",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "root",
                                                  "variable" : "r"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "identifier",
                                                  "contextType" : "variable",
                                                  "element" : "system",
                                                  "transform" : "translate",
                                                  "parameter" : [
                                                    {
                                                      "valueId" : "r"
                                                    },
                                                    {
                                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                                    },
                                                    {
                                                      "valueString" : "uri"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "ext",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "extension",
                                                  "variable" : "ext"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "identifier",
                                                  "contextType" : "variable",
                                                  "element" : "value",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueId" : "ext"
                                                    }
                                                  ]
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "UUID",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrgan"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "request",
                                                      "contextType" : "variable",
                                                      "element" : "url",
                                                      "transform" : "append",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "Organization?identifier="
                                                        },
                                                        {
                                                          "valueId" : "ext"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "assigningAuthorityName",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "assigningAuthorityName",
                                                  "variable" : "s"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "identifier",
                                                  "contextType" : "variable",
                                                  "element" : "assigner",
                                                  "variable" : "a"
                                                },
                                                {
                                                  "context" : "a",
                                                  "contextType" : "variable",
                                                  "element" : "display",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueId" : "s"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "r",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "root",
                                                  "variable" : "r"
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "org",
                                                  "source" : [
                                                    {
                                                      "context" : "id",
                                                      "element" : "extension",
                                                      "variable" : "ext"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "organization2",
                                                      "contextType" : "variable",
                                                      "element" : "id",
                                                      "variable" : "uuid4",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "r + '-' + ext"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "e5",
                                                      "contextType" : "variable",
                                                      "element" : "fullUrl",
                                                      "transform" : "append",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "https://example/Organization/"
                                                        },
                                                        {
                                                          "valueId" : "uuid4"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "organization1",
                                                      "contextType" : "variable",
                                                      "element" : "partOf",
                                                      "variable" : "reference",
                                                      "transform" : "create",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "Reference"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "reference",
                                                      "contextType" : "variable",
                                                      "element" : "reference",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "'https://example/Organization/' + %organization2.id"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "name",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "name",
                                              "variable" : "v"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "name",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "v.other"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "telecom",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "telecom",
                                              "variable" : "vvv"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "telecom",
                                              "variable" : "vvv",
                                              "transform" : "create"
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "addr",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan",
                                              "element" : "addr",
                                              "variable" : "vvv"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "address",
                                              "variable" : "vvv",
                                              "transform" : "create"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "performer"
            },
            {
              "name" : "author",
              "source" : [
                {
                  "context" : "org",
                  "element" : "author",
                  "variable" : "srcAuthor"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e6"
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid6",
                  "transform" : "uuid"
                },
                {
                  "context" : "e6",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/PractitionerRole/"
                    },
                    {
                      "valueId" : "uuid6"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "observation",
                  "contextType" : "variable",
                  "element" : "performer",
                  "variable" : "referenceaut",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "referenceaut",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "assignedAuthor",
                  "source" : [
                    {
                      "context" : "srcAuthor",
                      "element" : "assignedAuthor",
                      "variable" : "assignedAuthor"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "code",
                          "variable" : "codice"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code",
                          "variable" : "code2"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "CECodeableConcept",
                          "variable" : [
                            "codice",
                            "code2"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "ASSAUth",
                      "source" : [
                        {
                          "context" : "assignedAuthor"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e7"
                        },
                        {
                          "context" : "e7",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e7",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "practitioner",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Practitioner"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "functionCode",
                          "source" : [
                            {
                              "context" : "srcAuthor",
                              "element" : "functionCode",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "assignedAuthor"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "assignedAuthor"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/organizer/author"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ],
                          "documentation" : "assignedAuthor.code -> practitionerRole.code;"
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "assignedAuthor"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "aut",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid7",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e7",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Practitioner/"
                                        },
                                        {
                                          "valueId" : "uuid7"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "practitioner",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "2.16.840.1.113883.2.9.4.3.2",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "id",
                              "variable" : "id",
                              "condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "UUID",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "url",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "Practitioner?identifier="
                                    },
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "diverso",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "id",
                              "variable" : "id",
                              "condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "UUID",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "url",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "Practitioner?identifier="
                                    },
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "element" : "assignedPerson",
                              "variable" : "person"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "person",
                                  "element" : "name",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "birth",
                              "source" : [
                                {
                                  "context" : "person",
                                  "element" : "birthTime",
                                  "variable" : "birthTime"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "birthTime",
                                      "element" : "value",
                                      "variable" : "date"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "birthDate",
                                      "transform" : "truncate",
                                      "parameter" : [
                                        {
                                          "valueId" : "date"
                                        },
                                        {
                                          "valueInteger" : 10
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ],
                          "documentation" : "person"
                        }
                      ]
                    },
                    {
                      "name" : "representedOrganization",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "representedOrganization",
                          "variable" : "representedOrganization"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e8"
                        },
                        {
                          "context" : "e8",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e8",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "organization",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Organization"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "representedOrganization"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "representedOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/organizer/author/representedOrganization"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Organization?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "aut",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid8",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e8",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid8"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "organization",
                                      "variable" : "referenceOrg",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "referenceOrg",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid8"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "OrgPartOf",
                          "source" : [
                            {
                              "context" : "representedOrganization",
                              "element" : "asOrganizationPartOf",
                              "variable" : "OrgPartOf"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e9"
                            },
                            {
                              "context" : "e9",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e9",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "organization1",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Organization"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "OrgPartOf"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "meta",
                                  "variable" : "meta"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "coding",
                                  "source" : [
                                    {
                                      "context" : "OrgPartOf"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "meta",
                                      "contextType" : "variable",
                                      "element" : "tag",
                                      "variable" : "coding",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Coding"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "system",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "http://algoritmodiscoring"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "code",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "ClinicalDocument/body/organizer/author/representedOrganization/asOrganizationPartOf"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "identifier",
                                  "variable" : "identifier"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "root1",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "translate",
                                      "parameter" : [
                                        {
                                          "valueId" : "r"
                                        },
                                        {
                                          "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                        },
                                        {
                                          "valueString" : "uri"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "ext",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "UUID",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "url",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "Organization?identifier="
                                            },
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "assigningAuthorityName",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "assigningAuthorityName",
                                      "variable" : "s"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "assigner",
                                      "variable" : "a"
                                    },
                                    {
                                      "context" : "a",
                                      "contextType" : "variable",
                                      "element" : "display",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueId" : "s"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "r",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "root",
                                      "variable" : "r"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "aut",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid9",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e9",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Organization/"
                                            },
                                            {
                                              "valueId" : "uuid9"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "organization",
                                          "contextType" : "variable",
                                          "element" : "partOf",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Organization/' + %organization1.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "statusCode",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "statusCode",
                                  "variable" : "status",
                                  "condition" : "(value = 'active')"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "boolean"
                                    }
                                  ]
                                },
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "true"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "wholeOrganization",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "wholeOrganization",
                                  "variable" : "wholeOrgan"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e10"
                                },
                                {
                                  "context" : "e10",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e10",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "organization2",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "OrgPartOf"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "OrgPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "OrgPartOf"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "OrgPartOf"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/body/organizer/author/representedOrganization/asOrganizationPartOf/wholeOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "identifier",
                                      "variable" : "identifier"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "root1",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "translate",
                                          "parameter" : [
                                            {
                                              "valueId" : "r"
                                            },
                                            {
                                              "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                            },
                                            {
                                              "valueString" : "uri"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "ext",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "ext"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "UUID",
                                          "source" : [
                                            {
                                              "context" : "wholeOrgan"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "request",
                                              "contextType" : "variable",
                                              "element" : "url",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Organization?identifier="
                                                },
                                                {
                                                  "valueId" : "ext"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "assigningAuthorityName",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "assigningAuthorityName",
                                          "variable" : "s"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "assigner",
                                          "variable" : "a"
                                        },
                                        {
                                          "context" : "a",
                                          "contextType" : "variable",
                                          "element" : "display",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueId" : "s"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "r",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "root",
                                          "variable" : "r"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "aut",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid10",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e10",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid10"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "organization1",
                                              "contextType" : "variable",
                                              "element" : "partOf",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Organization/' + %organization2.id"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "organization"
                    },
                    {
                      "name" : "Device",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "assignedAuthoringDevice",
                          "variable" : "assignedAuthoringDevice"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e11"
                        },
                        {
                          "context" : "e11",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "POST"
                            }
                          ]
                        },
                        {
                          "context" : "e11",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "device",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Device"
                            }
                          ]
                        },
                        {
                          "context" : "device",
                          "contextType" : "variable",
                          "element" : "id",
                          "variable" : "uuid11",
                          "transform" : "uuid"
                        },
                        {
                          "context" : "e11",
                          "contextType" : "variable",
                          "element" : "fullUrl",
                          "transform" : "append",
                          "parameter" : [
                            {
                              "valueString" : "https://example/Device/"
                            },
                            {
                              "valueId" : "uuid11"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "url",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "Device"
                            }
                          ]
                        },
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "author",
                          "variable" : "reference",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        },
                        {
                          "context" : "reference",
                          "contextType" : "variable",
                          "element" : "reference",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "'https://example/Device/' + %device.id"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "templateId",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "templateId",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "manufacturer",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "manufacturerModelName",
                              "variable" : "manufacturerModelName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "displayRule",
                              "source" : [
                                {
                                  "context" : "manufacturerModelName",
                                  "variable" : "m"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "device",
                                  "contextType" : "variable",
                                  "element" : "manufacturer",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "m.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "deviceName",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "softwareName",
                              "variable" : "softwareName"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "deviceName",
                              "variable" : "deviceName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "typeName",
                              "source" : [
                                {
                                  "context" : "softwareName"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "other"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "softwareName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "s.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "device"
                    }
                  ],
                  "documentation" : "srcAuthor.time as time -> tgt.date;"
                }
              ],
              "documentation" : "author"
            },
            {
              "name" : "participantEncounter",
              "source" : [
                {
                  "context" : "org",
                  "element" : "participant",
                  "variable" : "participant",
                  "condition" : "(typeCode != 'DEV')"
                }
              ],
              "target" : [
                {
                  "context" : "observation",
                  "contextType" : "variable",
                  "element" : "encounter",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Encounter/' + %encounter.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "fhirParticipant",
                  "source" : [
                    {
                      "context" : "participant"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "encounter",
                      "contextType" : "variable",
                      "element" : "participant",
                      "variable" : "FhirParticipant"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "type",
                      "source" : [
                        {
                          "context" : "participant",
                          "variable" : "p"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "FhirParticipant",
                          "contextType" : "variable",
                          "element" : "type",
                          "variable" : "type"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "codeType",
                          "source" : [
                            {
                              "context" : "p"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "type",
                              "contextType" : "variable",
                              "element" : "coding",
                              "variable" : "coding"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "codice",
                              "source" : [
                                {
                                  "context" : "p"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "p.typeCode"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "system",
                              "source" : [
                                {
                                  "context" : "p"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "partRole",
                  "source" : [
                    {
                      "context" : "participant",
                      "element" : "participantRole",
                      "variable" : "participantRole"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e12"
                    },
                    {
                      "context" : "e12",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e12",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "practitionerRole",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "PractitionerRole"
                        }
                      ]
                    },
                    {
                      "context" : "practitionerRole",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid12",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e12",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/PractitionerRole/"
                        },
                        {
                          "valueId" : "uuid12"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "PractitionerRole"
                        }
                      ]
                    },
                    {
                      "context" : "encounter",
                      "contextType" : "variable",
                      "element" : "participant",
                      "variable" : "participant1",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "time",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "time",
                          "variable" : "time1"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "participant1",
                          "contextType" : "variable",
                          "element" : "period",
                          "variable" : "period",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Period"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "val",
                          "source" : [
                            {
                              "context" : "time1"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "period",
                              "contextType" : "variable",
                              "element" : "start",
                              "variable" : "start",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "dateTime"
                                }
                              ]
                            }
                          ],
                          "dependent" : [
                            {
                              "name" : "TSDateTime",
                              "variable" : [
                                "time1",
                                "start"
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "participant.time -> participant1.period;"
                    },
                    {
                      "name" : "time",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "time",
                          "variable" : "time1"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "participant1",
                          "contextType" : "variable",
                          "element" : "period",
                          "variable" : "period",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Period"
                            }
                          ]
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "IVLTSPeriod",
                          "variable" : [
                            "time1",
                            "period"
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "functionCode",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "functionCode",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "practitioner",
                      "source" : [
                        {
                          "context" : "participantRole"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e13"
                        },
                        {
                          "context" : "e13",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e13",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "practitioner",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Practitioner"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "par",
                          "source" : [
                            {
                              "context" : "participantRole"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "participant1",
                              "contextType" : "variable",
                              "element" : "individual",
                              "variable" : "referencepart",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Reference"
                                }
                              ]
                            },
                            {
                              "context" : "referencepart",
                              "contextType" : "variable",
                              "element" : "reference",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "participantRole"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "participantRole"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/body/organizer/participant"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "root1",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "translate",
                                  "parameter" : [
                                    {
                                      "valueId" : "r"
                                    },
                                    {
                                      "valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
                                    },
                                    {
                                      "valueString" : "uri"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "ext",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "UUID",
                                  "source" : [
                                    {
                                      "context" : "participantRole"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "url",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "Practitioner?identifier="
                                        },
                                        {
                                          "valueId" : "ext"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "assigningAuthorityName",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "assigningAuthorityName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "assigner",
                                  "variable" : "a"
                                },
                                {
                                  "context" : "a",
                                  "contextType" : "variable",
                                  "element" : "display",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "s"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "r",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "root",
                                  "variable" : "r"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "part",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid2",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e13",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Practitioner/"
                                        },
                                        {
                                          "valueId" : "uuid2"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "practitioner",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "2.16.840.1.113883.2.9.4.3.2",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "id",
                              "variable" : "id",
                              "condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "UUID",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "url",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "Practitioner?identifier="
                                    },
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "diverso",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "id",
                              "variable" : "id",
                              "condition" : "(root != '2.16.840.1.113883.2.9.4.3.2')"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "UUID",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "url",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "Practitioner?identifier="
                                    },
                                    {
                                      "valueId" : "ext"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitionerRole",
                              "contextType" : "variable",
                              "element" : "code",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "participantRole",
                              "element" : "playingEntity",
                              "variable" : "playingEntity"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "playingEntity",
                                  "element" : "name",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "birth",
                              "source" : [
                                {
                                  "context" : "playingEntity",
                                  "element" : "birthTime",
                                  "variable" : "birthTime"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "birthTime",
                                      "element" : "value",
                                      "variable" : "date"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "birthDate",
                                      "transform" : "truncate",
                                      "parameter" : [
                                        {
                                          "valueId" : "date"
                                        },
                                        {
                                          "valueInteger" : 10
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "non mappa i 2 precedenti"
                    }
                  ]
                }
              ],
              "documentation" : "participant person"
            },
            {
              "name" : "devParticipant",
              "source" : [
                {
                  "context" : "org",
                  "element" : "participant",
                  "variable" : "devParticipant",
                  "condition" : "(typeCode = 'DEV')"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e14"
                },
                {
                  "context" : "e14",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e14",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "device",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Device"
                    }
                  ]
                },
                {
                  "context" : "device",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid14",
                  "transform" : "uuid"
                },
                {
                  "context" : "e14",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/Device/"
                    },
                    {
                      "valueId" : "uuid14"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "Device"
                    }
                  ]
                },
                {
                  "context" : "observation",
                  "contextType" : "variable",
                  "element" : "device",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Device/' + %device.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "participantRoleDev",
                  "source" : [
                    {
                      "context" : "devParticipant",
                      "element" : "participantRole",
                      "variable" : "participantRoleDev"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "playingDevice",
                      "source" : [
                        {
                          "context" : "participantRoleDev",
                          "element" : "playingDevice",
                          "variable" : "playingDevice"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "playingDevice",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "manufacturer",
                          "source" : [
                            {
                              "context" : "playingDevice",
                              "element" : "manufacturerModelName",
                              "variable" : "manufacturerModelName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "displayRule",
                              "source" : [
                                {
                                  "context" : "manufacturerModelName",
                                  "variable" : "m"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "device",
                                  "contextType" : "variable",
                                  "element" : "manufacturer",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "m.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "deviceName",
                          "source" : [
                            {
                              "context" : "playingDevice",
                              "element" : "softwareName",
                              "variable" : "softwareName"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "deviceName",
                              "variable" : "deviceName"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "typeName",
                              "source" : [
                                {
                                  "context" : "softwareName"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "other"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "softwareName",
                                  "variable" : "s"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "deviceName",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "s.displayName"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "participant device"
            },
            {
              "name" : "componentobservation",
              "source" : [
                {
                  "context" : "org",
                  "element" : "component",
                  "variable" : "component"
                }
              ],
              "rule" : [
                {
                  "name" : "OBS",
                  "source" : [
                    {
                      "context" : "component",
                      "element" : "observation",
                      "variable" : "observation"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e"
                    },
                    {
                      "context" : "e",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "observationhasmember",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Observation"
                        }
                      ]
                    },
                    {
                      "context" : "observationhasmember",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid2",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/Observation/"
                        },
                        {
                          "valueId" : "uuid2"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "Observation"
                        }
                      ]
                    },
                    {
                      "context" : "observation",
                      "contextType" : "variable",
                      "element" : "hasMember",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/Observation/' + %observationhasmember.id"
                        }
                      ]
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "Observation",
                      "variable" : [
                        "observation",
                        "patient",
                        "encounter",
                        "observationhasmember",
                        "bundle"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "componentorganizer",
              "source" : [
                {
                  "context" : "org",
                  "element" : "component",
                  "variable" : "component"
                }
              ],
              "rule" : [
                {
                  "name" : "organizer",
                  "source" : [
                    {
                      "context" : "component",
                      "element" : "organizer",
                      "variable" : "organizer"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e1"
                    },
                    {
                      "context" : "e1",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e1",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "observationorganizer",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Observation"
                        }
                      ]
                    },
                    {
                      "context" : "observationorganizer",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid3",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e1",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/Observation/"
                        },
                        {
                          "valueId" : "uuid3"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "Observation"
                        }
                      ]
                    },
                    {
                      "context" : "observation",
                      "contextType" : "variable",
                      "element" : "hasMember",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/Observation/' + %observationorganizer.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "ORG",
                      "source" : [
                        {
                          "context" : "organizer"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "Organizer",
                          "variable" : [
                            "cda",
                            "organizer",
                            "patient",
                            "encounter",
                            "observationorganizer",
                            "bundle"
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "component",
              "source" : [
                {
                  "context" : "org",
                  "element" : "component",
                  "variable" : "component"
                }
              ],
              "rule" : [
                {
                  "name" : "obsmedia",
                  "source" : [
                    {
                      "context" : "component",
                      "element" : "observationMedia",
                      "variable" : "obsMedia"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e15"
                    },
                    {
                      "context" : "e15",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e15",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "media1",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Media"
                        }
                      ]
                    },
                    {
                      "context" : "media1",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid15",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e15",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/Media/"
                        },
                        {
                          "valueId" : "uuid15"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "Media"
                        }
                      ]
                    },
                    {
                      "context" : "observation",
                      "contextType" : "variable",
                      "element" : "derivedFrom",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/Media/' + %media1.id"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "Attachment",
                      "source" : [
                        {
                          "context" : "obsMedia"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "media1",
                          "contextType" : "variable",
                          "element" : "content",
                          "variable" : "Attachment",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Attachment"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "status",
                          "source" : [
                            {
                              "context" : "obsMedia"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "media1",
                              "contextType" : "variable",
                              "element" : "status",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "unknown"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "valuemedia",
                          "source" : [
                            {
                              "context" : "obsMedia",
                              "element" : "value",
                              "variable" : "valueMedia"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "type",
                              "source" : [
                                {
                                  "context" : "valueMedia",
                                  "element" : "mediaType",
                                  "variable" : "type"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "Attachment",
                                  "contextType" : "variable",
                                  "element" : "contentType",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueId" : "type"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "data",
                              "source" : [
                                {
                                  "context" : "valueMedia"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "Attachment",
                                  "contextType" : "variable",
                                  "element" : "data",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "valueMedia.dataBase64Binary"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "observationMedia"
            },
            {
              "name" : "component",
              "source" : [
                {
                  "context" : "org",
                  "element" : "component",
                  "variable" : "component"
                }
              ],
              "rule" : [
                {
                  "name" : "componentact",
                  "source" : [
                    {
                      "context" : "component",
                      "element" : "act",
                      "variable" : "act"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "text",
                      "source" : [
                        {
                          "context" : "act",
                          "element" : "text",
                          "variable" : "text"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "note",
                          "source" : [
                            {
                              "context" : "text",
                              "element" : "reference",
                              "variable" : "reference"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "observation",
                              "contextType" : "variable",
                              "element" : "note",
                              "variable" : "note"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "reference",
                              "source" : [
                                {
                                  "context" : "reference"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "note",
                                  "contextType" : "variable",
                                  "element" : "text",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "reference.value"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "note"
            }
          ]
        },
        {
          "name" : "ExtSubjectAnimal",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "src",
              "type" : "relatedSubject",
              "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/patient-animal"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "code",
              "source" : [
                {
                  "context" : "src",
                  "element" : "code",
                  "variable" : "code"
                }
              ],
              "target" : [
                {
                  "context" : "ext",
                  "contextType" : "variable",
                  "element" : "extension",
                  "variable" : "ext"
                },
                {
                  "context" : "ext",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "species"
                    }
                  ]
                },
                {
                  "context" : "ext",
                  "contextType" : "variable",
                  "element" : "value",
                  "variable" : "code1",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "CodeableConcept"
                    }
                  ]
                }
              ],
              "dependent" : [
                {
                  "name" : "CECodeableConcept",
                  "variable" : [
                    "code",
                    "code1"
                  ]
                }
              ]
            }
          ]
        }
      ]
    }