CDA to FHIR Maps
0.1.0 - ci-build Italy flag

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

: CDA to FHIR - Header - JSON Representation

Draft as of 2024-09-15

Raw json | Download


{
  "resourceType" : "StructureMap",
  "id" : "cda2fhirHeader",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n         <pre>map &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader&quot; = &quot;cda2fhirHeader&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/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/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/Organization&quot; alias Organization as produced\nuses &quot;http://hl7.org/fhir/cda/StructureDefinition/HealthCareFacility&quot; alias HealthCareFacility as queried\n\nimports &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes&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 e4,  e4.request = create('BackboneElement') as request,  request.method = 'POST',  e4.resource = create('DocumentReference') as DocumentReference,  DocumentReference.id = uuid() as uuid4,  e4.fullUrl = append('https://example/DocumentReference/', uuid3),  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 ext -&gt; identifier.value = ext &quot;value&quot;;\n          // r -&gt; requestPAT.url = append('Patient?identifier=',ext) &quot;UUID&quot;;\n          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;\n        } &quot;record&quot;;\n      } &quot;recPat&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}\n\ngroup ClinicalDocumentComposition(source src : ClinicalDocument, target tgt : Composition, target patientResource : Patient, target encounter : Encounter, target bundle : Bundle, target DocumentReference : DocumentReference) {\n  src.languageCode -&gt; tgt.language;\n  src -&gt; DocumentReference.status = 'current' &quot;status&quot;;\n  src -&gt; DocumentReference.content = create('BackboneElement') as content then {\n    src -&gt;  content.attachment = create('Attachment') as attachment,  attachment.title = 'string' &quot;comp&quot;;\n  } &quot;content&quot;;\n  src -&gt; DocumentReference.context = create('BackboneElement') as context then {\n    src -&gt;  context.related = create('Reference') as referenceComp,  referenceComp.reference = ('https://example/Composition/' + %tgt.id) &quot;comp&quot;;\n  } &quot;context&quot;;\n  src.id where src.setId.exists().not() -&gt; tgt.identifier &quot;identifier&quot;;\n  src.setId -&gt; tgt.identifier &quot;identifier&quot;;\n  src -&gt; tgt.status = 'final' &quot;status&quot;;\n  src.code -&gt; tgt.type;\n  src.title as t -&gt; tgt.title = (t.dataString);\n  src where src.title.exists().not() then {\n    src.code as code then {\n      code.displayName as display -&gt; tgt.title = cast(display, 'string');\n    } &quot;display&quot;;\n  } &quot;title&quot;;\n  src.effectiveTime as effectiveTime -&gt; tgt.date = create('dateTime') as value then TSDateTime(effectiveTime, value);\n  src.versionNumber as versionNumber where (value &gt; 1) -&gt; tgt.extension as ext2 then ChExtEprVersionNumber(versionNumber, ext2);\n  src.confidentialityCode -&gt; tgt.confidentiality;\n  src.recordTarget as recordTarget then {\n    recordTarget.patientRole as patient -&gt;  tgt.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patientResource.id) then ClinicalDocumentPatientRole(patient, patientResource, bundle) &quot;subject&quot;;\n    recordTarget.patientRole as patient -&gt;  DocumentReference.subject = create('Reference') as reference1,  reference1.reference = ('https://example/Patient/' + %patientResource.id);\n  } &quot;patientRole&quot;;\n  // START AUTHOR\n  src.author as srcAuthor then {\n    srcAuthor.time as time -&gt; tgt.date;\n    srcAuthor.assignedAuthor as assignedAuthor then {\n      // Codice Fiscale\n      assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.6.3.2') then {\n        assignedAuthor -&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',  tgt.author = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n          // assignedAuthor.code as codice -&gt; practitionerRole.code as code2 then CECodeableConcept(codice,code2);\n          assignedAuthor -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'PUT',  e2.resource = create('Practitioner') as practitioner 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/author' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            assignedAuthor.code -&gt; practitionerRole.code;\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;\n              // then {\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            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            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            assignedAuthor -&gt;  DocumentReference.author = create('Reference') as referenceAuth,  referenceAuth.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;refAuth&quot;;\n          } &quot;ASSAUth&quot;;\n          assignedAuthor.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.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 -&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/author/representedOrganization' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&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/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,  e4.fullUrl = append('https://example/Organization/', uuid4),  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 e10bis,  e10bis.request = create('BackboneElement') as request,  request.method = 'PUT',  e10bis.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/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 uuid5,  e10bis.fullUrl = append('https://example/Organization/', uuid5),  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        } &quot;ParcatitionerROL&quot;;\n      } &quot;OIDCF&quot;;\n      // Partita IVA\n      assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.6.3.2') then {\n        assignedAuthor -&gt;  bundle.entry as e6bis3,  e6bis3.request = create('BackboneElement') as request,  request.method = 'POST',  e6bis3.resource = create('Device') as device,  device.id = uuid() as uuid6bis3,  e6bis3.fullUrl = append('https://example/Device/', uuid6bis3),  request.url = 'Device',  tgt.author = create('Reference') as reference,  reference.reference = ('https://example/Device/' + %device.id) then {\n          assignedAuthor -&gt;  bundle.entry as e251,  e251.request = create('BackboneElement') as request,  request.method = 'PUT',  e251.resource = create('Organization') as organization then {\n            assignedAuthor -&gt; organization.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/AuthorPartitaIVA' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            assignedAuthor.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                assignedAuthor -&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,  e251.fullUrl = append('https://example/Organization/', uuid2),  device.owner = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization.id);\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n          } &quot;OrgPartitaIVA&quot;;\n        } &quot;Device&quot;;\n      } &quot;oidPartitaIVA&quot;;\n      // ID nullFlavor\n      assignedAuthor.id as id where nullFlavor.exists() then {\n        assignedAuthor.assignedAuthoringDevice as assignedAuthoringDevice -&gt;  bundle.entry as e6bis,  e6bis.request = create('BackboneElement') as request,  request.method = 'POST',  e6bis.resource = create('Device') as device,  device.id = uuid() as uuid6bis,  e6bis.fullUrl = append('https://example/Device/', uuid6bis),  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      } &quot;NullFlavor&quot;;\n    };\n    // START DATA ENTER\n    src.dataEnterer as dataEnt -&gt;  bundle.entry as e6,  e6.request = create('BackboneElement') as request,  request.method = 'POST',  e6.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e6.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole',  tgt.author = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n      dataEnt.time as time -&gt; tgt.date;\n      dataEnt.assignedEntity as assignedEntity -&gt;  bundle.entry as e7,  e7.request = create('BackboneElement') as request,  request.method = 'PUT',  e7.resource = create('Practitioner') as practitioner then {\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/dataEnterer' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        assignedEntity.code as codice -&gt; practitionerRole.code as code2 then CECodeableConcept(codice, code2);\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;\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;dataenterer&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        assignedEntity.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        assignedEntity.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        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        };\n        assignedEntity.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/dataEnterer/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;dataenterer&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/dataEnterer/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;dataenterer&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/dataEnterer/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,  e10.fullUrl = append('https://example/Organization/', uuid5),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id) &quot;dataenterer&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          };\n        } &quot;RepresentedOrganization&quot;;\n      } &quot;AssignedEntity&quot;;\n    } &quot;DataEnter&quot;;\n  } &quot;srcAuthor&quot;;\n  // START INFORMANT 1\n  src.informant as informant then {\n    informant.assignedEntity as assignedEntity -&gt;  bundle.entry as e11,  e11.request = create('BackboneElement') as request,  request.method = 'POST',  e11.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e11.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole' then {\n      informant -&gt; tgt.attester as attester then {\n        informant -&gt; attester.mode = 'professional' &quot;mode&quot;;\n        informant -&gt;  attester.party = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) &quot;reference&quot;;\n        assignedEntity.code -&gt; practitionerRole.code;\n        assignedEntity as entity -&gt;  bundle.entry as e12,  e12.request = create('BackboneElement') as request,  request.method = 'PUT',  e12.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/informant' &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;\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,  e12.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;dataenterer&quot;;\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          assignedEntity.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          assignedEntity.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;person&quot;;\n          entity.representedOrganization as representedOrganization -&gt;  bundle.entry as e13,  e13.request = create('BackboneElement') as request,  request.method = 'PUT',  e13.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/informant/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,  e13.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization.id);\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 -&gt; organization.partOf as partOf then {\n              representedOrganization.asOrganizationPartOf as organizationPartOf -&gt;  bundle.entry as e14,  e14.request = create('BackboneElement') as request,  request.method = 'PUT',  e14.resource = create('Organization') as organization1 then {\n                organizationPartOf -&gt; organization1.meta as meta then {\n                  organizationPartOf -&gt; meta.tag = create('Coding') as coding then {\n                    organizationPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                    organizationPartOf -&gt; coding.code = 'ClinicalDocument/informant/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n                  } &quot;coding&quot;;\n                } &quot;meta&quot;;\n                organizationPartOf.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                    organizationPartOf -&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,  e14.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id);\n                  } &quot;r&quot;;\n                } &quot;identifier&quot;;\n                organizationPartOf.code -&gt; organization1.type;\n                organizationPartOf.statusCode as status where (code = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';\n                organizationPartOf.wholeOrganization -&gt; organization1.partOf as partOf1 then {\n                  organizationPartOf.wholeOrganization as wholeOrganization -&gt;  bundle.entry as e15,  e15.request = create('BackboneElement') as request,  request.method = 'PUT',  e15.resource = create('Organization') as organization2 then {\n                    wholeOrganization -&gt; organization2.meta as meta then {\n                      wholeOrganization -&gt; meta.tag = create('Coding') as coding then {\n                        wholeOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                        wholeOrganization -&gt; coding.code = 'ClinicalDocument/informant/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n                      } &quot;coding&quot;;\n                    } &quot;meta&quot;;\n                    wholeOrganization.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                        wholeOrganization -&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,  e15.fullUrl = append('https://example/Organization/', uuid5),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id);\n                      } &quot;r&quot;;\n                    } &quot;identifier&quot;;\n                    wholeOrganization.name as v -&gt; organization2.name = (v.other);\n                    wholeOrganization.telecom -&gt; organization2.telecom;\n                    wholeOrganization.addr -&gt; organization2.address;\n                  };\n                } &quot;asOrganizationPartOf&quot;;\n              } &quot;partOf&quot;;\n            } &quot;qualification&quot;;\n          } &quot;organization&quot;;\n        } &quot;assignedEntity&quot;;\n      } &quot;attester&quot;;\n    } &quot;informant&quot;;\n  } &quot;inform&quot;;\n  // START INFORMANT 2\n  src.informant as informant then {\n    informant.relatedEntity as related -&gt;  bundle.entry as e16,  e16.request = create('BackboneElement') as request,  request.method = 'POST',  e16.resource = create('RelatedPerson') as relatedPerson,  relatedPerson.id = uuid() as uuid1,  e16.fullUrl = append('https://example/RelatedPerson/', uuid1),  request.url = 'RelatedPerson' then {\n      informant -&gt; tgt.attester as attester then {\n        informant -&gt; attester.mode = 'professional' &quot;mode&quot;;\n        informant -&gt;  attester.party = create('Reference') as reference,  reference.reference = ('https://example/RelatedPerson/' + %relatedPerson.id) &quot;reference&quot;;\n        related.relatedPerson as Person then {\n          related.code -&gt; relatedPerson.relationship;\n          related.telecom -&gt; relatedPerson.telecom;\n          related.addr -&gt; relatedPerson.address;\n          Person.name -&gt; relatedPerson.name;\n          related.birthTime as date then {\n            date.value as value -&gt; relatedPerson.birthDate = truncate(value, 10) &quot;valueD&quot;;\n          } &quot;birthinformant&quot;;\n          related -&gt;  relatedPerson.patient = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patientResource.id) &quot;reference&quot;;\n        } &quot;relatedPerson1&quot;;\n      } &quot;relatedPerson&quot;;\n    } &quot;informant&quot;;\n  } &quot;inform2&quot;;\n  // START CUSTODIAN\n  src.custodian as custodian then {\n    custodian.assignedCustodian as assignedCustodian -&gt;  bundle.entry as e17,  e17.request = create('BackboneElement') as request,  request.method = 'PUT',  e17.resource = create('Organization') as Organization then {\n      assignedCustodian -&gt; Organization.meta as meta then {\n        assignedCustodian -&gt; meta.tag = create('Coding') as coding then {\n          assignedCustodian -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n          assignedCustodian -&gt; coding.code = 'ClinicalDocument/custodian' &quot;code&quot;;\n        } &quot;coding&quot;;\n      } &quot;meta&quot;;\n      assignedCustodian.representedCustodianOrganization as representedCustodianOrganization then {\n        representedCustodianOrganization.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            representedCustodianOrganization -&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 uuid,  e17.fullUrl = append('https://example/Organization/', uuid);\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        assignedCustodian -&gt;  DocumentReference.custodian = create('Reference') as referenceCU,  referenceCU.reference = ('https://example/Organization/' + %Organization.id) &quot;RefCustodian&quot;;\n        representedCustodianOrganization -&gt;  tgt.custodian = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %Organization.id) then CustodianOrganization(representedCustodianOrganization, Organization) &quot;custodian1&quot;;\n      };\n    } &quot;organization&quot;;\n  };\n  // START INFORMATION RECIPIENT\n  src.informationRecipient as informationRecipient then {\n    informationRecipient.intendedRecipient as intendedRecipient then {\n      intendedRecipient.informationRecipient as informationRecipient2 then {\n        informationRecipient -&gt; tgt.attester as attester then {\n          informationRecipient2 -&gt; attester.mode = 'professional' &quot;mode&quot;;\n          informationRecipient2 -&gt;  bundle.entry as e19,  e19.request = create('BackboneElement') as request,  request.method = 'PUT',  e19.resource = create('Practitioner') as practitioner then {\n            informationRecipient2 -&gt; practitioner.meta as meta then {\n              informationRecipient2 -&gt; meta.tag = create('Coding') as coding then {\n                informationRecipient2 -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                informationRecipient2 -&gt; coding.code = 'ClinicalDocument/informationRecipient' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            intendedRecipient.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;\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,  e19.fullUrl = append('https://example/Practitioner/', uuid2),  attester.party = create('Reference') as reference1,  reference1.reference = ('https://example/Practitioner/' + %practitioner.id);\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            intendedRecipient.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            intendedRecipient.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            intendedRecipient.addr -&gt; practitioner.address;\n            intendedRecipient.telecom -&gt; practitioner.telecom;\n            informationRecipient2.name -&gt; practitioner.name;\n            informationRecipient2.birthTime as bt then {\n              bt.value as v -&gt; practitioner.birthDate = (v.date);\n            } &quot;date&quot;;\n          } &quot;PersonRecipient&quot;;\n        } &quot;intendedRecipienPract&quot;;\n      } &quot;attesterOrg&quot;;\n      intendedRecipient.receivedOrganization as receivedOrganization then {\n        informationRecipient -&gt; tgt.attester as attester then {\n          receivedOrganization -&gt; attester.mode = 'official' &quot;mode&quot;;\n          receivedOrganization -&gt;  bundle.entry as e20,  e20.request = create('BackboneElement') as request,  request.method = 'PUT',  e20.resource = create('Organization') as organization then {\n            receivedOrganization -&gt; organization.meta as meta then {\n              receivedOrganization -&gt; meta.tag = create('Coding') as coding then {\n                receivedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                receivedOrganization -&gt; coding.code = 'ClinicalDocument/informationRecipient/receivedOrganization' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            receivedOrganization.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                receivedOrganization -&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,  e20.fullUrl = append('https://example/Organization/', uuid3),  attester.party = create('Reference') as reference2,  reference2.reference = ('https://example/Organization/' + %organization.id);\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            receivedOrganization.name as v -&gt; organization.name = (v.other);\n            receivedOrganization.telecom -&gt; organization.telecom;\n            receivedOrganization.addr -&gt; organization.address;\n            receivedOrganization.asOrganizationPartOf as asOrganizationPartOf -&gt;  bundle.entry as e21,  e21.request = create('BackboneElement') as request,  request.method = 'PUT',  e21.resource = create('Organization') as organization2,  organization2.id = uuid() as uuid4,  e21.fullUrl = append('https://example/Organization', uuid4),  organization.partOf = create('Reference') as referenceor,  referenceor.reference = ('https://example/Organization' + %organization2.id) then {\n              asOrganizationPartOf -&gt; organization2.meta as meta then {\n                asOrganizationPartOf -&gt; meta.tag = create('Coding') as coding then {\n                  asOrganizationPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  asOrganizationPartOf -&gt; coding.code = 'ClinicalDocument/informationRecipient/receivedOrganization/asOrganizationPartOf' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              asOrganizationPartOf.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                  asOrganizationPartOf -&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,  e21.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as referenceor,  referenceor.reference = ('https://example/Organization/' + %organization2.id);\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              asOrganizationPartOf.code -&gt; organization2.type;\n              asOrganizationPartOf.statusCode as status where (value = 'active') -&gt;  organization2.active = create('boolean'),  organization2.active = 'true';\n              asOrganizationPartOf.wholeOrganization as wholeOrganization3 -&gt;  bundle.entry as e22,  e22.request = create('BackboneElement') as request,  request.method = 'PUT',  e22.resource = create('Organization') as organization3 then {\n                wholeOrganization3 -&gt; organization3.meta as meta then {\n                  wholeOrganization3 -&gt; meta.tag = create('Coding') as coding then {\n                    wholeOrganization3 -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                    wholeOrganization3 -&gt; coding.code = 'ClinicalDocument/informationRecipient/receivedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n                  } &quot;coding&quot;;\n                } &quot;meta&quot;;\n                wholeOrganization3.id as id -&gt; organization3.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                    wholeOrganization3 -&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;  organization3.id = (r + '-' + ext) as uuid5,  e22.fullUrl = append('https://example/Organization/', uuid5),  organization2.partOf = create('Reference') as referenceor,  referenceor.reference = ('https://example/Organization/' + %organization3.id);\n                  } &quot;r&quot;;\n                } &quot;identifier&quot;;\n                wholeOrganization3.name as v -&gt; organization3.name = (v.other);\n                wholeOrganization3.telecom -&gt; organization3.telecom;\n                wholeOrganization3.addr -&gt; organization3.address;\n              };\n            };\n          } &quot;receivedOrganization&quot;;\n        } &quot;intendedRecipienOrg&quot;;\n      } &quot;attesterOrg&quot;;\n    } &quot;intendedRecipent&quot;;\n  } &quot;informationRecipent&quot;;\n  // START Legal Authenticator\n  src.legalAuthenticator as legalAuth then {\n    legalAuth -&gt; tgt.attester as attester then {\n      legalAuth.assignedEntity as entity then {\n        // Codice Fiscale\n        entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') -&gt;  bundle.entry as e23,  e23.request = create('BackboneElement') as request,  request.method = 'POST',  e23.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid,  e23.fullUrl = append('https://example/PractitionerRole/', uuid),  request.url = 'PractitionerRole' then {\n          legalAuth -&gt; attester.mode = 'legal' &quot;mode&quot;;\n          legalAuth.time -&gt; attester.time;\n          legalAuth -&gt;  attester.party = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n            entity -&gt;  bundle.entry as e24,  e24.request = create('BackboneElement') as request,  request.method = 'PUT',  e24.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/legalAuthenticator' &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;\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 uuid1,  e24.fullUrl = append('https://example/Practitioner/', uuid1),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id);\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.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) &quot;birthTimelegal&quot;;\n                } &quot;birth&quot;;\n              } &quot;person&quot;;\n            } &quot;practitioner&quot;;\n            entity.code -&gt; practitionerRole.code;\n            entity.representedOrganization as rapresentedOrg -&gt;  bundle.entry as e25,  e25.request = create('BackboneElement') as request,  request.method = 'PUT',  e25.resource = create('Organization') as organization then {\n              rapresentedOrg -&gt; organization.meta as meta then {\n                rapresentedOrg -&gt; meta.tag = create('Coding') as coding then {\n                  rapresentedOrg -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  rapresentedOrg -&gt; coding.code = 'ClinicalDocument/legalAuthenticator/representedOrganization' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              rapresentedOrg.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                  rapresentedOrg -&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,  e25.fullUrl = append('https://example/Organization/', uuid2),  practitionerRole.organization = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization.id);\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              rapresentedOrg.name as v -&gt; organization.name = (v.other);\n              rapresentedOrg.telecom -&gt; organization.telecom;\n              rapresentedOrg.addr -&gt; organization.address;\n              rapresentedOrg.asOrganizationPartOf as asOrgPartOf then {\n                asOrgPartOf as asOrgPartOf1 -&gt;  bundle.entry as e26,  e26.request = create('BackboneElement') as request,  request.method = 'PUT',  e26.resource = create('Organization') as asorganization then {\n                  asOrgPartOf1 -&gt; asorganization.meta as meta then {\n                    asOrgPartOf1 -&gt; meta.tag = create('Coding') as coding then {\n                      asOrgPartOf1 -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                      asOrgPartOf1 -&gt; coding.code = 'ClinicalDocument/legalAuthenticator/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n                    } &quot;coding&quot;;\n                  } &quot;meta&quot;;\n                  asOrgPartOf1.id as id -&gt; asorganization.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                      asOrgPartOf1 -&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;  asorganization.id = (r + '-' + ext) as uuid2,  e26.fullUrl = append('https://example/Organization/', uuid2),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %asorganization.id);\n                    } &quot;r&quot;;\n                  } &quot;identifier&quot;;\n                  asOrgPartOf1.code -&gt; asorganization.type;\n                  asOrgPartOf1.statusCode as status where (code = 'active') -&gt;  asorganization.active = create('boolean'),  asorganization.active = true;\n                  asOrgPartOf1.wholeOrganization as wholeOrg then {\n                    wholeOrg as wholeOrg1 -&gt;  bundle.entry as e27,  e27.request = create('BackboneElement') as request,  request.method = 'PUT',  e27.resource = create('Organization') as wholeorganization,  wholeorganization.id = uuid() as uuid4,  e27.fullUrl = append('https://example/Organization/', uuid4),  asorganization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %wholeorganization.id) then {\n                      wholeOrg1 -&gt; wholeorganization.meta as meta then {\n                        wholeOrg1 -&gt; meta.tag = create('Coding') as coding then {\n                          wholeOrg1 -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                          wholeOrg1 -&gt; coding.code = 'ClinicalDocument/legalAuthenticator/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n                        } &quot;coding&quot;;\n                      } &quot;meta&quot;;\n                      wholeOrg1.id as id -&gt; wholeorganization.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                          wholeOrg1 -&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;  wholeorganization.id = (r + '-' + ext) as uuid4,  e27.fullUrl = append('https://example/Organization/', uuid4),  asorganization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %wholeorganization.id);\n                        } &quot;r&quot;;\n                      } &quot;identifier&quot;;\n                      wholeOrg1.name as v -&gt; wholeorganization.name = (v.other);\n                      wholeOrg1.telecom -&gt; wholeorganization.telecom;\n                      wholeOrg1.addr -&gt; wholeorganization.address;\n                    } &quot;wholeOrg1&quot;;\n                  } &quot;wholeOrg&quot;;\n                } &quot;asOrgPO&quot;;\n              } &quot;asOrgID&quot;;\n            } &quot;LAOrganiz&quot;;\n          } &quot;PractitionerLegal&quot;;\n        } &quot;PractitionerROLlegal&quot;;\n        // Partita IVA\n        entity.id as id where (root = '2.16.840.1.113883.2.9.6.3.2') -&gt;  bundle.entry as e251,  e251.request = create('BackboneElement') as request,  request.method = 'PUT',  e251.resource = create('Organization') as organization then {\n          entity -&gt; attester.mode = 'official' &quot;mode&quot;;\n          entity -&gt; organization.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/legalAuthenticatorPartitaIVA' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          entity.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              entity -&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,  e251.fullUrl = append('https://example/Organization/', uuid2),  attester.party = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization.id);\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n        } &quot;OrgPartitaIVA&quot;;\n      } &quot;entity&quot;;\n    } &quot;legalAuth&quot;;\n  } &quot;LegalAuthenticator&quot;;\n  // START Authenticator\n  src.authenticator as Auth -&gt;  bundle.entry as e28,  e28.request = create('BackboneElement') as request,  request.method = 'POST',  e28.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e28.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole' then {\n    Auth -&gt; tgt.attester as attester then {\n      Auth.time -&gt; attester.time;\n      Auth -&gt; attester.mode = 'professional' &quot;mode&quot;;\n      Auth.assignedEntity as entity -&gt;  attester.party = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n        entity.code -&gt; practitionerRole.code;\n        entity -&gt;  bundle.entry as e29,  e29.request = create('BackboneElement') as request,  request.method = 'PUT',  e29.resource = create('Practitioner') as practitioner,  practitioner.id = uuid() as uuid2,  e29.fullUrl = append('https://example/Practitioner', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner' + %practitioner.id) 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/authenticator' &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;\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,  e29.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id);\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 &quot;address&quot;;\n          entity.telecom -&gt; practitioner.telecom;\n          entity.assignedPerson as person then {\n            person.name -&gt; practitioner.name &quot;personName&quot;;\n            person.birthTime as birthTime then {\n              birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10) &quot;birthTimeauth&quot;;\n            } &quot;birth&quot;;\n          } &quot;person&quot;;\n        } &quot;practitioner&quot;;\n        entity.representedOrganization as reporganization -&gt;  bundle.entry as e30,  e30.request = create('BackboneElement') as request,  request.method = 'PUT',  e30.resource = create('Organization') as organization then {\n          reporganization -&gt; organization.meta as meta then {\n            reporganization -&gt; meta.tag = create('Coding') as coding then {\n              reporganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              reporganization -&gt; coding.code = 'ClinicalDocument/authenticator/representedOrganization' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          reporganization.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              reporganization -&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,  e30.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization.id);\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          reporganization.name as v -&gt; organization.name = (v.other);\n          reporganization.telecom -&gt; organization.telecom;\n          reporganization.addr -&gt; organization.address;\n          reporganization.asOrganizationPartOf as organizationpartof -&gt;  bundle.entry as e31,  e31.request = create('BackboneElement') as request,  request.method = 'PUT',  e31.resource = create('Organization') as asOrganizationpartof then {\n            organizationpartof -&gt; asOrganizationpartof.meta as meta then {\n              organizationpartof -&gt; meta.tag = create('Coding') as coding then {\n                organizationpartof -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                organizationpartof -&gt; coding.code = 'ClinicalDocument/authenticator/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            organizationpartof.id as id -&gt; asOrganizationpartof.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                organizationpartof -&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;  asOrganizationpartof.id = (r + '-' + ext) as uuid4,  e31.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %asOrganizationpartof.id);\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            organizationpartof.code -&gt; asOrganizationpartof.type;\n            organizationpartof.statusCode as status where (code = 'active') -&gt;  asOrganizationpartof.active = create('boolean'),  asOsrganizationpartof.active = 'true';\n            organizationpartof.wholeOrganization as wholeorg -&gt;  bundle.entry as e32,  e32.request = create('BackboneElement') as request,  request.method = 'PUT',  e32.resource = create('Organization') as wholeOrganization,  wholeOrganization.id = uuid() as uuid5,  e32.fullUrl = append('https://example/Organization/', uuid5),  asOrganizationpartof.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %wholeOrganization.id) then {\n              wholeorg -&gt; wholeOrganization.meta as meta then {\n                wholeorg -&gt; meta.tag = create('Coding') as coding then {\n                  wholeorg -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  wholeorg -&gt; coding.code = 'ClinicalDocument/authenticator/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              wholeorg.id as id -&gt; wholeOrganization.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                  wholeorg -&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;  wholeOrganization.id = (r + '-' + ext) as uuid5,  e32.fullUrl = append('https://example/Organization/', uuid5),  asOrganizationpartof.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %wholeOrganization.id);\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              wholeorg.name as v -&gt; wholeOrganization.name = (v.other);\n              wholeorg.telecom -&gt; wholeOrganization.telecom;\n              wholeorg.addr -&gt; wholeOrganization.address;\n            } &quot;wholeorg&quot;;\n          } &quot;organizationpartof&quot;;\n        } &quot;reporganization&quot;;\n      } &quot;entity&quot;;\n    } &quot;attester&quot;;\n  } &quot;Auth&quot;;\n  // PARTICIPANT\n  src.participant as participant where (typeCode != 'IND') then {\n    participant.associatedEntity as associetedEntity -&gt;  bundle.entry as e313,  e313.request = create('BackboneElement') as request,  request.method = 'POST',  e313.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e313.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole',  encounter.participant = create('BackboneElement') as participant1 then {\n      // participant.time as time-&gt;participant1.period as period ,period.start=(time.value);\n      participant -&gt; participant1.period = create('Period') as period then {\n        participant.time as time -&gt; period.start = create('dateTime') as start then TSDateTime(time, start);\n      } &quot;period&quot;;\n      participant as p -&gt; participant1.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      participant -&gt;  participant1.individual = create('Reference') as referencepart,  referencepart.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) &quot;par&quot;;\n      participant.functionCode -&gt; practitionerRole.code;\n      associetedEntity -&gt;  bundle.entry as e33,  e33.request = create('BackboneElement') as request,  request.method = 'PUT',  e33.resource = create('Practitioner') as practitioner then {\n        associetedEntity -&gt; practitioner.meta as meta then {\n          associetedEntity -&gt; meta.tag = create('Coding') as coding then {\n            associetedEntity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            associetedEntity -&gt; coding.code = 'ClinicalDocument/participant' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        associetedEntity.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;\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,  e33.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id);\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        associetedEntity.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        associetedEntity.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        associetedEntity.code -&gt; practitionerRole.code;\n        associetedEntity.addr -&gt; practitioner.address;\n        associetedEntity.telecom -&gt; practitioner.telecom;\n        associetedEntity.associatedPerson as associatedperson then {\n          associatedperson.name -&gt; practitioner.name;\n          associatedperson.birthTime as birthTime then {\n            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10) &quot;birthTimelegal&quot;;\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n        associetedEntity.scopingOrganization as scopingOrganization -&gt;  bundle.entry as e34,  e34.request = create('BackboneElement') as request,  request.method = 'PUT',  e34.resource = create('Organization') as organization then {\n          scopingOrganization -&gt; organization.meta as meta then {\n            scopingOrganization -&gt; meta.tag = create('Coding') as coding then {\n              scopingOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              scopingOrganization -&gt; coding.code = 'ClinicalDocument/participant/scopingOrganization' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          scopingOrganization.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              scopingOrganization -&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,  e34.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization.id);\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          scopingOrganization.name as v -&gt; organization.name = (v.other);\n          scopingOrganization.telecom -&gt; organization.telecom;\n          scopingOrganization.addr -&gt; organization.address;\n          scopingOrganization.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e35,  e35.request = create('BackboneElement') as request,  request.method = 'PUT',  e35.resource = create('Organization') as organization1 then {\n            OrgPartOf.id as id -&gt; organization1.identifier as identifier 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/participant/scopingOrganization/asOrganizationPartOf' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\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,  e35.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id);\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 e36,  e36.request = create('BackboneElement') as request,  request.method = 'PUT',  e36.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/participant/scopingOrganization/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;  organization1.id = (r + '-' + ext) as uuid5,  e36.fullUrl = append('https://example/Organization/', uuid5),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id);\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            } &quot;wholeOrgan&quot;;\n          } &quot;OrgPartOf&quot;;\n        };\n      } &quot;associetedEntity&quot;;\n    } &quot;Participant1&quot;;\n  };\n  src.participant as participant where (typeCode = 'IND') then {\n    participant.associatedEntity as associetedEntity where (classCode = 'PROV') -&gt;  bundle.entry as e313,  e313.request = create('BackboneElement') as request,  request.method = 'POST',  e313.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e313.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole',  encounter.participant = create('BackboneElement') as participant2 then {\n      // participant.time as time-&gt;participant2.period as period, period.start=(time.value);\n      participant -&gt; participant2.period = create('Period') as period then {\n        participant.time as time -&gt; period.start = create('dateTime') as start then TSDateTime(time, start);\n      } &quot;period&quot;;\n      participant as p -&gt; participant2.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      participant -&gt;  participant2.individual = create('Reference') as referencepart,  referencepart.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) &quot;par&quot;;\n      participant.functionCode -&gt; practitionerRole.code;\n      associetedEntity -&gt;  bundle.entry as e33,  e33.request = create('BackboneElement') as request,  request.method = 'PUT',  e33.resource = create('Practitioner') as practitioner then {\n        associetedEntity -&gt; practitioner.meta as meta then {\n          associetedEntity -&gt; meta.tag = create('Coding') as coding then {\n            associetedEntity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            associetedEntity -&gt; coding.code = 'ClinicalDocument/participant' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        associetedEntity.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;\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,  e33.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id);\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        associetedEntity.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        associetedEntity.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        associetedEntity.code -&gt; practitionerRole.code;\n        associetedEntity.addr -&gt; practitioner.address;\n        associetedEntity.telecom -&gt; practitioner.telecom;\n        associetedEntity.associatedPerson as associatedperson then {\n          associatedperson.name -&gt; practitioner.name;\n          associatedperson.birthTime as birthTime then {\n            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10) &quot;birthTimelegal&quot;;\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n        associetedEntity.scopingOrganization as scopingOrganization -&gt;  bundle.entry as e34,  e34.request = create('BackboneElement') as request,  request.method = 'PUT',  e34.resource = create('Organization') as organization then {\n          scopingOrganization -&gt; organization.meta as meta then {\n            scopingOrganization -&gt; meta.tag = create('Coding') as coding then {\n              scopingOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              scopingOrganization -&gt; coding.code = 'ClinicalDocument/participant/scopingOrganization' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          scopingOrganization.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              scopingOrganization -&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,  e34.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization.id);\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          scopingOrganization.name as v -&gt; organization.name = (v.other);\n          scopingOrganization.telecom -&gt; organization.telecom;\n          scopingOrganization.addr -&gt; organization.address;\n          scopingOrganization.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e35,  e35.request = create('BackboneElement') as request,  request.method = 'PUT',  e35.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/participant/scopingOrganization/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,  e35.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id);\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 e36,  e36.request = create('BackboneElement') as request,  request.method = 'PUT',  e36.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/participant/scopingOrganization/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;  organization1.id = (r + '-' + ext) as uuid5,  e36.fullUrl = append('https://example/Organization/', uuid5),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id);\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            } &quot;wholeOrgan&quot;;\n          } &quot;OrgPartOf&quot;;\n        };\n      } &quot;associetedEntity&quot;;\n    } &quot;Participant2&quot;;\n    participant.associatedEntity as associetedEntity where (classCode = 'NOK') or (classCode = 'ECON') or (classCode = 'CAREGIVER') then {\n      associetedEntity -&gt;  bundle.entry as e3131,  e3131.request = create('BackboneElement') as request,  request.method = 'POST',  e3131.resource = create('RelatedPerson') as RelatedPerson,  RelatedPerson.id = uuid() as uuid1,  e3131.fullUrl = append('https://example/RelatedPerson/', uuid1),  request.url = 'RelatedPerson' then {\n        associetedEntity -&gt; patientResource.link as link then {\n          associetedEntity -&gt; link.type = 'refer' &quot;type&quot;;\n          associetedEntity -&gt;  link.other = create('Reference') as reference,  reference.reference = ('https://example/RelatedPerson/' + %RelatedPerson.id) &quot;reference&quot;;\n          associetedEntity.id -&gt; RelatedPerson.identifier;\n          associetedEntity -&gt;  RelatedPerson.patient = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patientResource.id) &quot;reference&quot;;\n          associetedEntity.code -&gt; RelatedPerson.relationship;\n          associetedEntity.telecom -&gt; RelatedPerson.telecom;\n          associetedEntity.associatedPerson as associatedperson then {\n            associatedperson.name -&gt; RelatedPerson.name;\n          };\n        } &quot;link&quot;;\n      } &quot;participant3&quot;;\n    } &quot;WHERE&quot;;\n    // START PARTICIPANT GUAR\n    participant.associatedEntity as associetedentity where (classCode = 'GUAR') then {\n      associetedentity.scopingOrganization as representedOrganization -&gt;  bundle.entry as e37,  e37.request = create('BackboneElement') as request,  request.method = 'PUT',  e37.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/participant/scopingOrganization' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        associetedentity.code -&gt; organization.type;\n        associetedentity.scopingOrganization as scopingOrganization then {\n          associetedentity.id as id -&gt; organization.identifier as identifier then {\n            participant.time as time then {\n              time.high as high -&gt; identifier.period as period then {\n                high -&gt; period.end = (high.value) &quot;periodend&quot;;\n              } &quot;period&quot;;\n            };\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              associetedentity -&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 uuid1,  e37.fullUrl = append('https://example/Organization/', uuid1),  patientResource.generalPractitioner = create('Reference') as referenceOrg,  referenceOrg.reference = append('https://example/Organization/', uuid1);\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          scopingOrganization.name as v -&gt; organization.name = (v.other);\n          scopingOrganization.telecom -&gt; organization.telecom;\n          scopingOrganization.addr -&gt; organization.address;\n          scopingOrganization.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e38,  e38.request = create('BackboneElement') as request,  request.method = 'PUT',  e38.resource = create('Organization') as organizationPOF then {\n            OrgPartOf -&gt; organizationPOF.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/participant/scopingOrganization/asOrganizationPartOf' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            OrgPartOf.id as id -&gt; organizationPOF.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;  organizationPOF.id = (r + '-' + ext) as uuid2,  e38.fullUrl = append('https://example/Organization/', uuid2),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organizationPOF.id);\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            OrgPartOf.code -&gt; organizationPOF.type;\n            OrgPartOf.statusCode as status where (value = 'active') -&gt;  organizationPOF.active = create('boolean'),  organizationPOF.active = 'true';\n            OrgPartOf.wholeOrganization as wholeOrgan -&gt;  bundle.entry as e39,  e39.request = create('BackboneElement') as request,  request.method = 'PUT',  e39.resource = create('Organization') as organizationW then {\n              wholeOrgan -&gt; organizationW.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/participant/scopingOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              wholeOrgan.id as id -&gt; organizationW.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;  organizationW.id = (r + '-' + ext) as uuid3,  e39.fullUrl = append('https://example/Organization/', uuid3),  organizationPOF.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organizationW.id);\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              wholeOrgan.name as v -&gt; organizationW.name = (v.other);\n              wholeOrgan.telecom -&gt; organizationW.telecom;\n              wholeOrgan.addr -&gt; organizationW.address;\n            } &quot;wholeOrgan&quot;;\n          } &quot;OrgPartOf&quot;;\n        };\n      } &quot;associetedEntity&quot;;\n    } &quot;repOrg&quot;;\n  };\n  src.inFulfillmentOf as inFulfillmentOf then {\n    inFulfillmentOf.order as order -&gt;  bundle.entry as e40,  e40.request = create('BackboneElement') as request,  request.method = 'POST',  e40.resource = create('ServiceRequest') as serviceRequest,  serviceRequest.id = uuid() as uuid1,  e40.fullUrl = append('https://example/ServiceRequest/', uuid1),  request.url = 'ServiceRequest',  encounter.basedOn = create('Reference') as reference,  reference.reference = ('https://example/ServiceRequest/' + %serviceRequest.id) then {\n      order.id -&gt; serviceRequest.identifier;\n      order -&gt; serviceRequest.status = 'active' &quot;status&quot;;\n      order -&gt; serviceRequest.intent = 'order' &quot;intent&quot;;\n      order -&gt;  serviceRequest.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patientResource.id) &quot;reference&quot;;\n      order -&gt;  serviceRequest.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;\n      order.code -&gt; serviceRequest.code;\n      order.priorityCode as priorityCode then {\n        priorityCode.code as v -&gt; serviceRequest.priority = translate(v, '#priority', 'code') &quot;priority&quot;;\n      };\n    };\n  };\n  src.documentationOf as docOf then {\n    docOf.serviceEvent as serviceEvent -&gt; tgt.event as event then {\n      serviceEvent.code -&gt; event.code &quot;eventCode&quot;;\n      serviceEvent.effectiveTime as effectiveTime then {\n        effectiveTime -&gt; event.period = create('Period') as period then IVLTSPeriod(effectiveTime, period) &quot;period&quot;;\n      } &quot;eventDT&quot;;\n      serviceEvent.effectiveTime as effectivetime1 -&gt; event.period = create('Period') as period then {\n        effectivetime1 -&gt; period.start = create('dateTime') as start then TSDateTime(effectivetime1, start) &quot;val&quot;;\n      } &quot;efft&quot;;\n      serviceEvent.performer as performer -&gt;  bundle.entry as e41,  e41.request = create('BackboneElement') as request,  request.method = 'POST',  e41.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e41.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole' then {\n        performer -&gt;  event.detail = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n          performer.assignedEntity as assignedEntity -&gt;  bundle.entry as e42,  e42.request = create('BackboneElement') as request,  request.method = 'PUT',  e42.resource = create('Practitioner') as practitioner then {\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/documentationOf/serviceEvent/performer' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            performer.functionCode -&gt; practitionerRole.code;\n            assignedEntity.code -&gt; practitionerRole.code;\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;\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,  e42.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id);\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            assignedEntity.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            assignedEntity.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            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) &quot;birthTimelegal&quot;;\n              } &quot;birth&quot;;\n            } &quot;name&quot;;\n            assignedEntity.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/documentationOf/serviceEvent/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,  e8.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as referenceOrg,  referenceOrg.reference = append('https://example/Organization/', uuid3);\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/documentationOf/serviceEvent/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,  e9.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id);\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/documentationOf/serviceEvent/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 uuid5,  e10.fullUrl = append('https://example/Organization/', uuid5),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id);\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              };\n            } &quot;RepresentedOrganization&quot;;\n          } &quot;AssignedEntity&quot;;\n        } &quot;performer&quot;;\n      } &quot;docOf&quot;;\n    };\n  };\n  src where src.componentOf.exists().not() -&gt;  tgt.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) then ClinicalDocumentEncounter(src, bundle, encounter, patientResource) &quot;encounterExist&quot;;\n  src.componentOf as comp then {\n    comp where comp.encompassingEncounter.exists().not() -&gt;  tgt.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) then ClinicalDocumentEncounter(srcEnc, bundle, encounter, patientResource) &quot;enc&quot;;\n    comp.encompassingEncounter as srcEnc -&gt;  tgt.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) then ClinicalDocumentEncounter(srcEnc, bundle, encounter, patientResource);\n  } &quot;encompassingEncounter&quot;;\n}\n\ngroup ClinicalDocumentRelatesTo(source src : parentDocument, target tgt : composition) {\n  src.id -&gt; tgt.identifier;\n  src.code -&gt; tgt.type;\n  src.setId -&gt; tgt.identifier;\n  src.versionNumber as vNumber -&gt; tgt.extension as ext then ChExtEprVersionNumber(vNumber, ext) &quot;versionNumberEXT&quot;;\n}\n\ngroup EXTbirthplace(source src : AD, target ext : Extension) {\n  src -&gt; ext.url = 'http://hl7.org/fhir/StructureDefinition/patient-birthPlace' &quot;url&quot;;\n  src -&gt; ext.value = create('Address') as value then ADAddress(src, value) &quot;value&quot;;\n}\n\ngroup ClinicalDocumentPatientRole(source src : PatientRole, target tgt : Patient, target bundle : Bundle) {\n  src.addr -&gt; tgt.address;\n  src.telecom -&gt; tgt.telecom;\n  src.patient as patient then {\n    patient.name -&gt; tgt.name;\n    patient.administrativeGenderCode as gender then {\n      gender.code as v -&gt; tgt.gender = translate(v, '#cm-v3-administrative-gender', 'code') &quot;gender&quot;;\n    } &quot;gender&quot;;\n    patient.birthTime as birthTime then {\n      birthTime.value as date -&gt; tgt.birthDate = truncate(date, 10) &quot;birthTimelegal&quot;;\n    } &quot;birth&quot;;\n    patient.deceasedInd as deceased where (value = 'false') -&gt;  tgt.deceased = create('boolean'),  tgt.deceased = false &quot;deceasedBL&quot;;\n    patient.deceasedInd as deceased where (value = 'true') then {\n      patient.deceasedTime as Time -&gt; tgt.deceased = create('dateTime') as deceasedTime then TSDateTime(Time, deceasedTime);\n    };\n    patient.deceasedTime as Timet where Timet.empty() -&gt;  tgt.deceased = create('boolean'),  tgt.deceased = true &quot;deceasedBL&quot;;\n    patient.maritalStatusCode -&gt; tgt.maritalStatus &quot;maritalStatus&quot;;\n    patient.guardian as guardian then {\n      guardian.guardianPerson as person -&gt;  bundle.entry as e,  e.request = create('BackboneElement') as request,  request.method = 'POST',  e.resource = create('RelatedPerson') as relatedPerson,  relatedPerson.id = uuid() as uuid1,  e.fullUrl = append('https://example/RelatedPerson/', uuid1),  request.url = 'RelatedPerson' then {\n        person.name -&gt; relatedPerson.name;\n        person.birthTime as birthTime then {\n          birthTime.value as date -&gt; relatedPerson.birthDate = truncate(date, 10) &quot;birthTimelegal&quot;;\n        } &quot;birth&quot;;\n        person -&gt;  relatedPerson.patient = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %tgt.id) &quot;reference&quot;;\n        person -&gt; tgt.link as link then {\n          person -&gt; link.type = 'refer' &quot;type&quot;;\n          person -&gt;  link.other = create('Reference') as reference,  reference.reference = ('https://example/RelatedPerson/' + %relatedPerson.id) &quot;reference&quot;;\n          guardian.addr -&gt; relatedPerson.address;\n          guardian.telecom -&gt; relatedPerson.telecom;\n          guardian.id -&gt; relatedPerson.identifier;\n          guardian.code -&gt; relatedPerson.relationship;\n        } &quot;person&quot;;\n      };\n      guardian.guardianOrganization as guardianorg -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Organization') as organizationcontact then {\n        guardianorg -&gt; organizationcontact.meta as meta then {\n          guardianorg -&gt; meta.tag = create('Coding') as coding then {\n            guardianorg -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            guardianorg -&gt; coding.code = 'ClinicalDocument/recordTarget/PatientRole/patient/guardian/guardianOrganization' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        guardianorg -&gt; tgt.contact as contact then {\n          guardianorg -&gt;  contact.organization = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organizationcontact.id) &quot;OrganizationContact&quot;;\n          guardianorg.id as id -&gt; organizationcontact.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              guardianorg -&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;  organizationcontact.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Organization/', uuid2);\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          guardianorg.name as v -&gt; organizationcontact.name = (v.other);\n          guardianorg.telecom -&gt; organizationcontact.telecom;\n          guardianorg.addr -&gt; organizationcontact.address;\n          guardianorg.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'PUT',  e2.resource = create('Organization') as organizationpartOf then {\n            OrgPartOf -&gt; organizationpartOf.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/recordTarget/PatientRole/patient/guardian/guardianOrganization/asOrganizationPartOf' &quot;code&quot;;\n              } &quot;coding&quot;;\n            } &quot;meta&quot;;\n            OrgPartOf -&gt;  organizationcontact.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organizationpartOf.id) &quot;asorganization&quot;;\n            OrgPartOf.id as id -&gt; organizationpartOf.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;  organizationpartOf.id = (r + '-' + ext) as uuid3,  e2.fullUrl = append('https://example/Organization/', uuid3);\n              } &quot;r&quot;;\n            } &quot;identifier&quot;;\n            OrgPartOf.code -&gt; organizationpartOf.type;\n            OrgPartOf.statusCode as status where (value = 'active') -&gt; organizationpartOf.active = 'true';\n            OrgPartOf.wholeOrganization as wholeORG -&gt;  bundle.entry as e3,  e3.request = create('BackboneElement') as request,  request.method = 'PUT',  e3.resource = create('Organization') as WholeOrganization then {\n              wholeORG -&gt; WholeOrganization.meta as meta then {\n                wholeORG -&gt; meta.tag = create('Coding') as coding then {\n                  wholeORG -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  wholeORG -&gt; coding.code = 'ClinicalDocument/recordTarget/PatientRole/patient/guardian/guardianOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              wholeORG -&gt;  organizationpartOf.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %WholeOrganization.id) &quot;asOrganization&quot;;\n              wholeORG.id as id -&gt; WholeOrganization.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                  wholeORG -&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;  WholeOrganization.id = (r + '-' + ext) as uuid4,  e3.fullUrl = append('https://example/Organization/', uuid4);\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              wholeORG.name as v -&gt; WholeOrganization.name = (v.other);\n              wholeORG.telecom -&gt; WholeOrganization.telecom;\n              wholeORG.addr -&gt; WholeOrganization.address;\n            } &quot;WholeOrganization&quot;;\n          } &quot;OrganizationPartOf&quot;;\n        } &quot;contact&quot;;\n      } &quot;guardianorganization&quot;;\n    };\n    patient.birthplace as birthplace then {\n      birthplace.place as place then {\n        place.addr as address -&gt; tgt.extension as ext1 then EXTbirthplace(address, ext1) &quot;birthplace&quot;;\n      };\n    };\n    src.providerOrganization as org -&gt;  bundle.entry as e4,  e4.request = create('BackboneElement') as request,  request.method = 'PUT',  e4.resource = create('Organization') as providerorganization then {\n      org -&gt; providerorganization.meta as meta then {\n        org -&gt; meta.tag = create('Coding') as coding then {\n          org -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n          org -&gt; coding.code = 'ClinicalDocument/recordTarget/PatientRole/patient/providerOrganization' &quot;code&quot;;\n        } &quot;coding&quot;;\n      } &quot;meta&quot;;\n      org.id as id -&gt; providerorganization.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          org -&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;  providerorganization.id = (r + '-' + ext) as uuid5,  e4.fullUrl = append('https://example/Organization/', uuid5),  tgt.managingOrganization = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %providerorganization.id) &quot;reference&quot;;\n        } &quot;r&quot;;\n      } &quot;identifier&quot;;\n      org.name as v -&gt; providerorganization.name = (v.other);\n      org.telecom -&gt; providerorganization.telecom;\n      org.addr -&gt; providerorganization.address;\n      org.asOrganizationPartOf as OrgPartOfProvider -&gt;  bundle.entry as e5,  e5.request = create('BackboneElement') as request,  request.method = 'PUT',  e5.resource = create('Organization') as organizationpartOfprovider then {\n        OrgPartOfProvider -&gt; organizationpartOfprovider.meta as meta then {\n          OrgPartOfProvider -&gt; meta.tag = create('Coding') as coding then {\n            OrgPartOfProvider -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            OrgPartOfProvider -&gt; coding.code = 'ClinicalDocument/recordTarget/PatientRole/patient/providerOrganization/asOrganizationPartOf' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        OrgPartOfProvider.id as id -&gt; organizationpartOfprovider.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            OrgPartOfProvider -&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;  organizationpartOfprovider.id = (r + '-' + ext) as uuid6,  e5.fullUrl = append('https://example/Organization/', uuid6),  providerorganization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organizationpartOfprovider.id) &quot;asorganization&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        OrgPartOfProvider.code -&gt; organizationpartOfprovider.type;\n        OrgPartOfProvider.statusCode as status where (value = 'active') -&gt; organizationpartOfprovider.active = 'true';\n        OrgPartOfProvider.wholeOrganization as wholeORGproveder -&gt;  bundle.entry as e6,  e6.request = create('BackboneElement') as request,  request.method = 'PUT',  e6.resource = create('Organization') as WholeOrganizationprovider then {\n          wholeORGproveder -&gt; WholeOrganizationprovider.meta as meta then {\n            wholeORGproveder -&gt; meta.tag = create('Coding') as coding then {\n              wholeORGproveder -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              wholeORGproveder -&gt; coding.code = 'ClinicalDocument/recordTarget/PatientRole/patient/providerOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          wholeORGproveder -&gt;  organizationpartOfprovider.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %WholeOrganizationprovider.id) &quot;asOrganization&quot;;\n          wholeORGproveder.id as id -&gt; WholeOrganizationprovider.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              wholeORGproveder -&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;  WholeOrganizationprovider.id = (r + '-' + ext) as uuid7,  e6.fullUrl = append('https://example/Organization/', uuid7);\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          wholeORGproveder.name as v -&gt; WholeOrganizationprovider.name = (v.other);\n          wholeORGproveder.telecom -&gt; WholeOrganizationprovider.telecom;\n          wholeORGproveder.addr -&gt; WholeOrganizationprovider.address;\n        } &quot;wholeOrganizationprovider&quot;;\n      } &quot;OrganizationPartOfprovider&quot;;\n    } &quot;organization&quot;;\n  };\n}\n\ngroup CustodianOrganization(source src : CustodianOrganization, target tgt : Organization) {\n  src.name as v -&gt; tgt.name = (v.other);\n  src.telecom -&gt; tgt.telecom;\n  src.addr -&gt; tgt.address;\n}\n\ngroup ClinicalDocumentEncounter(source src : EncompassingEncounter, target bundle : Bundle, target encounter : Encounter, target patient : Patient) {\n  src.id -&gt; encounter.identifier;\n  src.code as code1 -&gt; encounter.class = create('Coding') as coding then {\n    code1.code as code -&gt; coding.code = cast(code, 'string');\n    code1.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n    code1.displayName as display -&gt; coding.display = cast(display, 'string');\n  } &quot;class&quot;;\n  src where src.code.exists().not() -&gt; encounter.class = create('Coding') as coding then {\n    src -&gt; coding.code = 'AMB' &quot;code&quot;;\n    src -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' &quot;codeS&quot;;\n    src -&gt; coding.display = 'ambulatory' &quot;display&quot;;\n  } &quot;NonCodeclass&quot;;\n  src -&gt;  encounter.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;\n  src -&gt; encounter.status = 'finished' &quot;status&quot;;\n  // effectiveTime=period\n  src where effectiveTime.low.exists() or effectiveTime.high.exists() then {\n    src.effectiveTime as eff -&gt; encounter.period = create('Period') as period then IVLTSPeriod(eff, period);\n  } &quot;where&quot;;\n  // effectiveTime = time-stamp\n  src where effectiveTime.low.exists().not() or effectiveTime.high.exists().not() then {\n    src.effectiveTime as effectivetime1 -&gt; encounter.period = create('Period') as period then {\n      effectivetime1 -&gt; period.start = create('dateTime') as start then TSDateTime(effectivetime1, start) &quot;val&quot;;\n    } &quot;efft&quot;;\n  } &quot;where&quot;;\n  // src.effectiveTime as effectivetime1 -&gt; encounter.period as period, period.start=(effectivetime1.value);\n  src.dischargeDispositionCode as dischargeDispositionCode then {\n    dischargeDispositionCode -&gt; encounter.hospitalization as hospitalization then {\n      dischargeDispositionCode -&gt; hospitalization.dischargeDisposition &quot;disDisp&quot;;\n    } &quot;disposition&quot;;\n  } &quot;discharge&quot;;\n  src.responsibleParty as responsibleParty -&gt; encounter.participant as participant then {\n    responsibleParty.assignedEntity as entity -&gt;  bundle.entry as e,  e.request = create('BackboneElement') as request,  request.method = 'POST',  e.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole',  participant.individual = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {\n      entity.code -&gt; practitionerRole.code;\n      entity -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.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/componentOf/EncompassingEncounter/responsibleParty' &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;\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,  e1.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id);\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) &quot;birthTimeENC&quot;;\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n      } &quot;practitioner&quot;;\n      entity.representedOrganization as raporg -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'PUT',  e2.resource = create('Organization') as rapresentedorganization then {\n        raporg -&gt; rapresentedorganization.meta as meta then {\n          raporg -&gt; meta.tag = create('Coding') as coding then {\n            raporg -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            raporg -&gt; coding.code = 'ClinicalDocument/componentOf/EncompassingEncounter/responsibleParty/representedOrganization' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        // raporg.id -&gt; rapresentedorganization.identifier;\n        raporg.id as id -&gt; rapresentedorganization.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            raporg -&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;  rapresentedorganization.id = (r + '-' + ext) as uuid3,  e2.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %rapresentedorganization.id);\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        raporg.name as v -&gt; rapresentedorganization.name = (v.other);\n        raporg.telecom -&gt; rapresentedorganization.telecom;\n        raporg.addr -&gt; rapresentedorganization.address;\n        raporg.asOrganizationPartOf as OrgPartOf -&gt;  bundle.entry as e3,  e3.request = create('BackboneElement') as request,  request.method = 'PUT',  e3.resource = create('Organization') as organization1,  organization1.id = uuid() as uuid4,  e3.fullUrl = append('https://example/Organization/', uuid4),  rapresentedorganization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id) then {\n          // OrgPartOf.id -&gt; organization1.identifier;\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/componentOf/EncompassingEncounter/responsibleParty/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,  e3.fullUrl = append('https://example/Organization/', uuid4),  rapresentedorganization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id);\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 e4,  e4.request = create('BackboneElement') as request,  request.method = 'PUT',  e4.resource = create('Organization') as organization2 then {\n            // wholeOrgan.id -&gt; organization2.identifier;\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/componentOf/EncompassingEncounter/responsibleParty/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,  e4.fullUrl = append('https://example/Organization/', uuid5),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id);\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          } &quot;wholeOrgan&quot;;\n        } &quot;OrgPartOf&quot;;\n      } &quot;organization&quot;;\n    } &quot;entity&quot;;\n  } &quot;particpant&quot;;\n  src.encounterParticipant as participant then {\n    participant.assignedEntity as assignedEntity -&gt;  bundle.entry as e313,  e313.request = create('BackboneElement') as request,  request.method = 'POST',  e313.resource = create('PractitionerRole') as practitionerRole,  practitionerRole.id = uuid() as uuid1,  e313.fullUrl = append('https://example/PractitionerRole/', uuid1),  request.url = 'PractitionerRole',  encounter.participant = create('BackboneElement') as participant1 then {\n      // participant.time as time-&gt;participant1.period as period ,period.start=(time.value);\n      participant -&gt; participant1.period = create('Period') as period then {\n        participant.time as time -&gt; period.start = create('dateTime') as start then TSDateTime(time, start);\n      } &quot;period&quot;;\n      participant as p -&gt; participant1.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      participant -&gt;  participant1.individual = create('Reference') as referencepart,  referencepart.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) &quot;par&quot;;\n      participant.functionCode -&gt; practitionerRole.code;\n      assignedEntity -&gt;  bundle.entry as e33,  e33.request = create('BackboneElement') as request,  request.method = 'PUT',  e33.resource = create('Practitioner') as practitioner then {\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/encounterParticipant' &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;\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,  e33.fullUrl = append('https://example/Practitioner/', uuid2),  practitionerRole.practitioner = create('Reference') as reference,  reference.reference = ('https://example/Practitioner/' + %practitioner.id);\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        assignedEntity.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        assignedEntity.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        assignedEntity.code -&gt; practitionerRole.code;\n        assignedEntity.addr -&gt; practitioner.address;\n        assignedEntity.telecom -&gt; practitioner.telecom;\n        assignedEntity.associatedPerson as assignedPerson then {\n          assignedPerson.name -&gt; practitioner.name;\n          assignedPerson.birthTime as birthTime then {\n            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10) &quot;birthTimelegal&quot;;\n          } &quot;birth&quot;;\n        } &quot;name&quot;;\n        assignedEntity.representedOrganization as representedOrganization -&gt;  bundle.entry as e34,  e34.request = create('BackboneElement') as request,  request.method = 'PUT',  e34.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/encounterParticipant/scopingOrganization' &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,  e34.fullUrl = append('https://example/Organization/', uuid3),  practitionerRole.organization = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization.id);\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 e35,  e35.request = create('BackboneElement') as request,  request.method = 'PUT',  e35.resource = create('Organization') as organization1 then {\n            OrgPartOf.id as id -&gt; organization1.identifier as identifier 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/encounterParticipant/scopingOrganization/asOrganizationPartOf' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\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,  e35.fullUrl = append('https://example/Organization/', uuid4),  organization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization1.id);\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 e36,  e36.request = create('BackboneElement') as request,  request.method = 'PUT',  e36.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/encounterParticipant/scopingOrganization/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;  organization1.id = (r + '-' + ext) as uuid5,  e36.fullUrl = append('https://example/Organization/', uuid5),  organization1.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id);\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            } &quot;wholeOrgan&quot;;\n          } &quot;OrgPartOf&quot;;\n        };\n      } &quot;assignedEntity&quot;;\n    } &quot;Participant&quot;;\n  };\n  src.location as Location then {\n    Location.healthCareFacility as HCF -&gt;  bundle.entry as e5,  e5.request = create('BackboneElement') as request,  request.method = 'PUT',  e5.resource = create('Location') as loc then {\n      HCF -&gt; loc.meta as meta then {\n        HCF -&gt; meta.tag = create('Coding') as coding then {\n          HCF -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n          HCF -&gt; coding.code = 'ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility' &quot;code&quot;;\n        } &quot;coding&quot;;\n      } &quot;meta&quot;;\n      HCF -&gt; encounter.location as locations then {\n        HCF.id as id -&gt; loc.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            HCF -&gt; request.url = append('Location?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;  loc.id = (r + '-' + ext) as uuid6,  e5.fullUrl = append('https://example/Location/', uuid6),  locations.location = create('Reference') as reference,  reference.reference = ('https://example/Location/' + %loc.id) &quot;locc&quot;;\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        HCF.code -&gt; loc.type;\n        HCF.location as srcLocation then {\n          srcLocation.name as v -&gt; loc.name = (v.other);\n          srcLocation.addr -&gt; loc.address;\n        } &quot;location2&quot;;\n        HCF.serviceProviderOrganization as servProvOrg -&gt;  bundle.entry as e,  e.request = create('BackboneElement') as request,  request.method = 'PUT',  e.resource = create('Organization') as serviceProviderOrganization then {\n          servProvOrg -&gt; serviceProviderOrganization.meta as meta then {\n            servProvOrg -&gt; meta.tag = create('Coding') as coding then {\n              servProvOrg -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n              servProvOrg -&gt; coding.code = 'ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility/serviceProviderOrganization' &quot;code&quot;;\n            } &quot;coding&quot;;\n          } &quot;meta&quot;;\n          servProvOrg.id as id -&gt; serviceProviderOrganization.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              servProvOrg -&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;  serviceProviderOrganization.id = (r + '-' + ext) as uuid,  e.fullUrl = append('https://example/Organization/', uuid),  loc.managingOrganization = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %serviceProviderOrganization.id);\n            } &quot;r&quot;;\n          } &quot;identifier&quot;;\n          servProvOrg.name as v -&gt; serviceProviderOrganization.name = (v.other);\n          servProvOrg.telecom -&gt; serviceProviderOrganization.telecom;\n          servProvOrg.addr -&gt; serviceProviderOrganization.address;\n          servProvOrg.asOrganizationPartOf as asOrgPartOf then {\n            asOrgPartOf as asOrgPartOf1 -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Organization') as asorganization then {\n              asOrgPartOf1 -&gt; asorganization.meta as meta then {\n                asOrgPartOf1 -&gt; meta.tag = create('Coding') as coding then {\n                  asOrgPartOf1 -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                  asOrgPartOf1 -&gt; coding.code = 'ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf' &quot;code&quot;;\n                } &quot;coding&quot;;\n              } &quot;meta&quot;;\n              asOrgPartOf1.id as id -&gt; asorganization.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                  asOrgPartOf1 -&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;  asorganization.id = (r + '-' + ext) as uuid1,  e1.fullUrl = append('https://example/Organization/', uuid1),  serviceProviderOrganization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %asorganization.id);\n                } &quot;r&quot;;\n              } &quot;identifier&quot;;\n              asOrgPartOf1.code -&gt; asorganization.type;\n              asOrgPartOf1.statusCode as status where (code = 'active') -&gt;  asorganization.active = create('boolean'),  asorganization.active = 'true';\n              asOrgPartOf1.wholeOrganization as wholeOrg then {\n                wholeOrg as wholeOrg1 -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'PUT',  e2.resource = create('Organization') as wholeorganization then {\n                  wholeOrg1 -&gt; wholeorganization.meta as meta then {\n                    wholeOrg1 -&gt; meta.tag = create('Coding') as coding then {\n                      wholeOrg1 -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n                      wholeOrg1 -&gt; coding.code = 'ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf' &quot;code&quot;;\n                    } &quot;coding&quot;;\n                  } &quot;meta&quot;;\n                  wholeOrg1.id as id -&gt; asorganization.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                      wholeOrg1 -&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;  wholeorganization.id = (r + '-' + ext) as uuid2,  e2.fullUrl = append('https://example/Organization/', uuid2),  asorganization.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %wholeorganization.id);\n                    } &quot;r&quot;;\n                  } &quot;identifier&quot;;\n                  wholeOrg1.name as v -&gt; wholeorganization.name = (v.other);\n                  wholeOrg1.telecom -&gt; wholeorganization.telecom;\n                  wholeOrg1.addr -&gt; wholeorganization.address;\n                } &quot;wholeOrg1&quot;;\n              } &quot;wholeOrg&quot;;\n            } &quot;OrganizationPartOfprovider&quot;;\n          } &quot;asOrg1&quot;;\n        } &quot;SPO&quot;;\n      } &quot;hcf&quot;;\n    } &quot;location1&quot;;\n  };\n}\n\ngroup ClinicalDocumentationOf(source src : representedOrganization, target tgt : organization, target bundle : Bundle) {\n  src.name -&gt; tgt.name;\n  src.telecom -&gt; tgt.telecom;\n  src.addr -&gt; tgt.address;\n  src.asOrganizationPartOf as asOrganizationPartOf then {\n    asOrganizationPartOf -&gt;  bundle.entry as e,  e.request = create('BackboneElement') as request,  request.method = 'PUT',  e.resource = create('Organization') as organization2 then {\n      asOrganizationPartOf -&gt; organization2.meta as meta then {\n        asOrganizationPartOf -&gt; meta.tag = create('Coding') as coding then {\n          asOrganizationPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n          asOrganizationPartOf -&gt; coding.code = 'ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n        } &quot;coding&quot;;\n      } &quot;meta&quot;;\n      asOrganizationPartOf.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          asOrganizationPartOf -&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 uuid,  e.fullUrl = append('https://example/Organization/', uuid),  tgt.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organization2.id);\n        } &quot;r&quot;;\n      } &quot;identifier&quot;;\n      asOrganizationPartOf.code -&gt; organization2.type;\n      asOrganizationPartOf.statusCode where (value = 'active') -&gt; organization2.active = 'true';\n      asOrganizationPartOf.wholeOrganization as wholeOrganization -&gt;  bundle.entry as e3,  e3.request = create('BackboneElement') as request,  request.method = 'PUT',  e3.resource = create('Organization') as organization3 then {\n        wholeOrganization -&gt; organization3.meta as meta then {\n          wholeOrganization -&gt; meta.tag = create('Coding') as coding then {\n            wholeOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;\n            wholeOrganization -&gt; coding.code = 'ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization/asOrganizationPartOf' &quot;code&quot;;\n          } &quot;coding&quot;;\n        } &quot;meta&quot;;\n        wholeOrganization.id as id -&gt; organization3.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            wholeOrganization -&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;  organization3.id = (r + '-' + ext) as uuid1,  e.fullUrl = append('https://example/Organization/', uuid1),  organization2.partOf = create('Reference') as referenceOrg,  referenceOrg.reference = append('https://example/Organization/', uuid1);\n          } &quot;r&quot;;\n        } &quot;identifier&quot;;\n        wholeOrganization.id -&gt; organization3.identifier;\n        wholeOrganization.name -&gt; organization3.name;\n        wholeOrganization.telecom -&gt; organization3.telecom;\n        wholeOrganization.addr -&gt; organization3.address;\n      };\n    } &quot;organizationPartOf&quot;;\n  } &quot;creation&quot;;\n}\n\ngroup ChExtEprVersionNumber(source src : INT, target ext : Extension) {\n  src -&gt; ext.url = 'http://hl7.org/fhir/StructureDefinition/composition-clinicaldocument-versionNumber' &quot;url&quot;;\n  src.value as v -&gt; ext.value = cast(v, 'string');\n}\n\ngroup ClinicalDocumentOrganization(source src : CustodianOrganization, target tgt : Organization) {\n  src.id -&gt; tgt.identifier;\n  src.name as v -&gt; tgt.name = (v.other);\n  src.telecom -&gt; tgt.telecom;\n  src.addr -&gt; tgt.address;\n}\n\n</pre>\n      </div>"
  },
  "url" : "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader",
  "version" : "0.1.0",
  "name" : "cda2fhirHeader",
  "status" : "draft",
  "date" : "2024-09-15T08:16:12+00:00",
  "publisher" : "HL7 Italy",
  "contact" : [
    {
      "name" : "HL7 Italy",
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://hl7.it"
        }
      ]
    }
  ],
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "urn:iso:std:iso:3166",
          "code" : "IT",
          "display" : "Italy"
        }
      ]
    }
  ],
  "structure" : [
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/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/Section",
      "mode" : "queried",
      "alias" : "Section"
    },
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/PatientRole",
      "mode" : "queried",
      "alias" : "PatientRole"
    },
    {
      "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/Organization",
      "mode" : "produced",
      "alias" : "Organization"
    },
    {
      "url" : "http://hl7.org/fhir/cda/StructureDefinition/HealthCareFacility",
      "mode" : "queried",
      "alias" : "HealthCareFacility"
    }
  ],
  "import" : [
    🔗 "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes"
  ],
  "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" : "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" : "DocumentReference",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "DocumentReference"
                }
              ]
            },
            {
              "context" : "DocumentReference",
              "contextType" : "variable",
              "element" : "id",
              "variable" : "uuid4",
              "transform" : "uuid"
            },
            {
              "context" : "e4",
              "contextType" : "variable",
              "element" : "fullUrl",
              "transform" : "append",
              "parameter" : [
                {
                  "valueString" : "https://example/DocumentReference/"
                },
                {
                  "valueId" : "uuid3"
                }
              ]
            },
            {
              "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" : "recPat",
                  "source" : [
                    {
                      "context" : "recordTarget",
                      "element" : "patientRole",
                      "variable" : "patient"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "record",
                      "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" : "ext"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "identifier",
                              "contextType" : "variable",
                              "element" : "value",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "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"
                                }
                              ]
                            }
                          ],
                          "documentation" : "r -> requestPAT.url = append('Patient?identifier=',ext) \"UUID\";"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "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" : "ClinicalDocumentComposition",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "ClinicalDocument",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "Composition",
          "mode" : "target"
        },
        {
          "name" : "patientResource",
          "type" : "Patient",
          "mode" : "target"
        },
        {
          "name" : "encounter",
          "type" : "Encounter",
          "mode" : "target"
        },
        {
          "name" : "bundle",
          "type" : "Bundle",
          "mode" : "target"
        },
        {
          "name" : "DocumentReference",
          "type" : "DocumentReference",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "languageCode",
          "source" : [
            {
              "context" : "src",
              "element" : "languageCode",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "language",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "status",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "DocumentReference",
              "contextType" : "variable",
              "element" : "status",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "current"
                }
              ]
            }
          ]
        },
        {
          "name" : "content",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "DocumentReference",
              "contextType" : "variable",
              "element" : "content",
              "variable" : "content",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "BackboneElement"
                }
              ]
            }
          ],
          "rule" : [
            {
              "name" : "comp",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "content",
                  "contextType" : "variable",
                  "element" : "attachment",
                  "variable" : "attachment",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Attachment"
                    }
                  ]
                },
                {
                  "context" : "attachment",
                  "contextType" : "variable",
                  "element" : "title",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "string"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "context",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "DocumentReference",
              "contextType" : "variable",
              "element" : "context",
              "variable" : "context",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "BackboneElement"
                }
              ]
            }
          ],
          "rule" : [
            {
              "name" : "comp",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "context",
                  "contextType" : "variable",
                  "element" : "related",
                  "variable" : "referenceComp",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "referenceComp",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Composition/' + %tgt.id"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "identifier",
          "source" : [
            {
              "context" : "src",
              "element" : "id",
              "variable" : "vvv",
              "condition" : "src.setId.exists().not()"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "identifier",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "identifier",
          "source" : [
            {
              "context" : "src",
              "element" : "setId",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "identifier",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "status",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "status",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "final"
                }
              ]
            }
          ]
        },
        {
          "name" : "code",
          "source" : [
            {
              "context" : "src",
              "element" : "code",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "type",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "title",
          "source" : [
            {
              "context" : "src",
              "element" : "title",
              "variable" : "t"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "title",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "t.dataString"
                }
              ]
            }
          ]
        },
        {
          "name" : "title",
          "source" : [
            {
              "context" : "src",
              "condition" : "src.title.exists().not()"
            }
          ],
          "rule" : [
            {
              "name" : "display",
              "source" : [
                {
                  "context" : "src",
                  "element" : "code",
                  "variable" : "code"
                }
              ],
              "rule" : [
                {
                  "name" : "displayName",
                  "source" : [
                    {
                      "context" : "code",
                      "element" : "displayName",
                      "variable" : "display"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "title",
                      "transform" : "cast",
                      "parameter" : [
                        {
                          "valueId" : "display"
                        },
                        {
                          "valueString" : "string"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "effectiveTime",
          "source" : [
            {
              "context" : "src",
              "element" : "effectiveTime",
              "variable" : "effectiveTime"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "date",
              "variable" : "value",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "dateTime"
                }
              ]
            }
          ],
          "dependent" : [
            {
              "name" : "TSDateTime",
              "variable" : [
                "effectiveTime",
                "value"
              ]
            }
          ]
        },
        {
          "name" : "versionNumber",
          "source" : [
            {
              "context" : "src",
              "element" : "versionNumber",
              "variable" : "versionNumber",
              "condition" : "(value > 1)"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "extension",
              "variable" : "ext2"
            }
          ],
          "dependent" : [
            {
              "name" : "ChExtEprVersionNumber",
              "variable" : [
                "versionNumber",
                "ext2"
              ]
            }
          ]
        },
        {
          "name" : "confidentialityCode",
          "source" : [
            {
              "context" : "src",
              "element" : "confidentialityCode",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "confidentiality",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "patientRole",
          "source" : [
            {
              "context" : "src",
              "element" : "recordTarget",
              "variable" : "recordTarget"
            }
          ],
          "rule" : [
            {
              "name" : "subject",
              "source" : [
                {
                  "context" : "recordTarget",
                  "element" : "patientRole",
                  "variable" : "patient"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "subject",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Patient/' + %patientResource.id"
                    }
                  ]
                }
              ],
              "dependent" : [
                {
                  "name" : "ClinicalDocumentPatientRole",
                  "variable" : [
                    "patient",
                    "patientResource",
                    "bundle"
                  ]
                }
              ]
            },
            {
              "name" : "patientRole",
              "source" : [
                {
                  "context" : "recordTarget",
                  "element" : "patientRole",
                  "variable" : "patient"
                }
              ],
              "target" : [
                {
                  "context" : "DocumentReference",
                  "contextType" : "variable",
                  "element" : "subject",
                  "variable" : "reference1",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference1",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/Patient/' + %patientResource.id"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "srcAuthor",
          "source" : [
            {
              "context" : "src",
              "element" : "author",
              "variable" : "srcAuthor"
            }
          ],
          "rule" : [
            {
              "name" : "time",
              "source" : [
                {
                  "context" : "srcAuthor",
                  "element" : "time",
                  "variable" : "time"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "date"
                }
              ]
            },
            {
              "name" : "assignedAuthor",
              "source" : [
                {
                  "context" : "srcAuthor",
                  "element" : "assignedAuthor",
                  "variable" : "assignedAuthor"
                }
              ],
              "rule" : [
                {
                  "name" : "OIDCF",
                  "source" : [
                    {
                      "context" : "assignedAuthor",
                      "element" : "id",
                      "variable" : "id",
                      "condition" : "(root != '2.16.840.1.113883.2.9.6.3.2')"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "ParcatitionerROL",
                      "source" : [
                        {
                          "context" : "assignedAuthor"
                        }
                      ],
                      "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" : "tgt",
                          "contextType" : "variable",
                          "element" : "author",
                          "variable" : "reference",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        },
                        {
                          "context" : "reference",
                          "contextType" : "variable",
                          "element" : "reference",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "ASSAUth",
                          "source" : [
                            {
                              "context" : "assignedAuthor"
                            }
                          ],
                          "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" : "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/author"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "assignedAuthor",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitionerRole",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "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"
                                        }
                                      ]
                                    }
                                  ],
                                  "documentation" : "then {"
                                },
                                {
                                  "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" : "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
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "refAuth",
                              "source" : [
                                {
                                  "context" : "assignedAuthor"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "DocumentReference",
                                  "contextType" : "variable",
                                  "element" : "author",
                                  "variable" : "referenceAuth",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Reference"
                                    }
                                  ]
                                },
                                {
                                  "context" : "referenceAuth",
                                  "contextType" : "variable",
                                  "element" : "reference",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "'https://example/Practitioner/' + %practitioner.id"
                                    }
                                  ]
                                }
                              ]
                            }
                          ],
                          "documentation" : "assignedAuthor.code as codice -> practitionerRole.code as code2 then CECodeableConcept(codice,code2);"
                        },
                        {
                          "name" : "representedOrganization",
                          "source" : [
                            {
                              "context" : "assignedAuthor",
                              "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" : "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" : "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/author/representedOrganization"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "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/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" : "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" : "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" : "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/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" : "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" : "Codice Fiscale"
                },
                {
                  "name" : "oidPartitaIVA",
                  "source" : [
                    {
                      "context" : "assignedAuthor",
                      "element" : "id",
                      "variable" : "id",
                      "condition" : "(root = '2.16.840.1.113883.2.9.6.3.2')"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "Device",
                      "source" : [
                        {
                          "context" : "assignedAuthor"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e6bis3"
                        },
                        {
                          "context" : "e6bis3",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "POST"
                            }
                          ]
                        },
                        {
                          "context" : "e6bis3",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "device",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Device"
                            }
                          ]
                        },
                        {
                          "context" : "device",
                          "contextType" : "variable",
                          "element" : "id",
                          "variable" : "uuid6bis3",
                          "transform" : "uuid"
                        },
                        {
                          "context" : "e6bis3",
                          "contextType" : "variable",
                          "element" : "fullUrl",
                          "transform" : "append",
                          "parameter" : [
                            {
                              "valueString" : "https://example/Device/"
                            },
                            {
                              "valueId" : "uuid6bis3"
                            }
                          ]
                        },
                        {
                          "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" : "OrgPartitaIVA",
                          "source" : [
                            {
                              "context" : "assignedAuthor"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e251"
                            },
                            {
                              "context" : "e251",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e251",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "organization",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Organization"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "assignedAuthor"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization",
                                  "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/AuthorPartitaIVA"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "assignedAuthor",
                                  "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" : "assignedAuthor"
                                        }
                                      ],
                                      "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" : "extension",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid2",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e251",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Organization/"
                                            },
                                            {
                                              "valueId" : "uuid2"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "device",
                                          "contextType" : "variable",
                                          "element" : "owner",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Organization/' + %organization.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "documentation" : "Partita IVA"
                },
                {
                  "name" : "NullFlavor",
                  "source" : [
                    {
                      "context" : "assignedAuthor",
                      "element" : "id",
                      "variable" : "id",
                      "condition" : "nullFlavor.exists()"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "Device",
                      "source" : [
                        {
                          "context" : "assignedAuthor",
                          "element" : "assignedAuthoringDevice",
                          "variable" : "assignedAuthoringDevice"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e6bis"
                        },
                        {
                          "context" : "e6bis",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "POST"
                            }
                          ]
                        },
                        {
                          "context" : "e6bis",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "device",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Device"
                            }
                          ]
                        },
                        {
                          "context" : "device",
                          "contextType" : "variable",
                          "element" : "id",
                          "variable" : "uuid6bis",
                          "transform" : "uuid"
                        },
                        {
                          "context" : "e6bis",
                          "contextType" : "variable",
                          "element" : "fullUrl",
                          "transform" : "append",
                          "parameter" : [
                            {
                              "valueString" : "https://example/Device/"
                            },
                            {
                              "valueId" : "uuid6bis"
                            }
                          ]
                        },
                        {
                          "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" : "code",
                          "source" : [
                            {
                              "context" : "assignedAuthoringDevice",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "device",
                              "contextType" : "variable",
                              "element" : "type",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ],
                          "documentation" : "assignedAuthoringDevice.templateId -> device.identifier;"
                        },
                        {
                          "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" : "ID nullFlavor"
                }
              ]
            },
            {
              "name" : "DataEnter",
              "source" : [
                {
                  "context" : "src",
                  "element" : "dataEnterer",
                  "variable" : "dataEnt"
                }
              ],
              "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" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e6",
                  "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" : "tgt",
                  "contextType" : "variable",
                  "element" : "author",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "time",
                  "source" : [
                    {
                      "context" : "dataEnt",
                      "element" : "time",
                      "variable" : "time"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "date"
                    }
                  ]
                },
                {
                  "name" : "AssignedEntity",
                  "source" : [
                    {
                      "context" : "dataEnt",
                      "element" : "assignedEntity",
                      "variable" : "assignedEntity"
                    }
                  ],
                  "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" : "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/dataEnterer"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "assignedEntity",
                          "element" : "code",
                          "variable" : "codice"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code",
                          "variable" : "code2"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "CECodeableConcept",
                          "variable" : [
                            "codice",
                            "code2"
                          ]
                        }
                      ]
                    },
                    {
                      "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" : "extension",
                          "source" : [
                            {
                              "context" : "id",
                              "element" : "extension",
                              "variable" : "ext"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "identifier",
                              "contextType" : "variable",
                              "element" : "value",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "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" : "dataenterer",
                              "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" : "assignedEntity",
                          "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" : "assignedEntity",
                          "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" : "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" : "assignedPerson",
                      "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" : "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/dataEnterer/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" : "dataenterer",
                                  "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" : "asOrganizationPartOf",
                          "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/dataEnterer/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" : "dataenterer",
                                      "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/dataEnterer/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" : "dataenterer",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid5",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e10",
                                              "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" : "START DATA ENTER"
            }
          ],
          "documentation" : "START AUTHOR"
        },
        {
          "name" : "inform",
          "source" : [
            {
              "context" : "src",
              "element" : "informant",
              "variable" : "informant"
            }
          ],
          "rule" : [
            {
              "name" : "informant",
              "source" : [
                {
                  "context" : "informant",
                  "element" : "assignedEntity",
                  "variable" : "assignedEntity"
                }
              ],
              "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" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e11",
                  "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" : "attester",
                  "source" : [
                    {
                      "context" : "informant"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "attester",
                      "variable" : "attester"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "mode",
                      "source" : [
                        {
                          "context" : "informant"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "attester",
                          "contextType" : "variable",
                          "element" : "mode",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "professional"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "reference",
                      "source" : [
                        {
                          "context" : "informant"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "attester",
                          "contextType" : "variable",
                          "element" : "party",
                          "variable" : "reference",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        },
                        {
                          "context" : "reference",
                          "contextType" : "variable",
                          "element" : "reference",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "assignedEntity",
                          "element" : "code",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "assignedEntity",
                      "source" : [
                        {
                          "context" : "assignedEntity",
                          "variable" : "entity"
                        }
                      ],
                      "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" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e12",
                          "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/informant"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "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" : "extension",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "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" : "dataenterer",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid2",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e12",
                                      "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" : "assignedEntity",
                              "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" : "assignedEntity",
                              "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" : "person",
                          "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" : "organization",
                          "source" : [
                            {
                              "context" : "entity",
                              "element" : "representedOrganization",
                              "variable" : "representedOrganization"
                            }
                          ],
                          "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" : "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/informant/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" : "extension",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid3",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e13",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Organization/"
                                            },
                                            {
                                              "valueId" : "uuid3"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "practitionerRole",
                                          "contextType" : "variable",
                                          "element" : "organization",
                                          "variable" : "reference",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Organization/' + %organization.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "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" : "qualification",
                              "source" : [
                                {
                                  "context" : "representedOrganization",
                                  "element" : "asOrganizationPartOf"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization",
                                  "contextType" : "variable",
                                  "element" : "partOf",
                                  "variable" : "partOf"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "partOf",
                                  "source" : [
                                    {
                                      "context" : "representedOrganization",
                                      "element" : "asOrganizationPartOf",
                                      "variable" : "organizationPartOf"
                                    }
                                  ],
                                  "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" : "PUT"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e14",
                                      "contextType" : "variable",
                                      "element" : "resource",
                                      "variable" : "organization1",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Organization"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "meta",
                                      "source" : [
                                        {
                                          "context" : "organizationPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "meta",
                                          "variable" : "meta"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "coding",
                                          "source" : [
                                            {
                                              "context" : "organizationPartOf"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "meta",
                                              "contextType" : "variable",
                                              "element" : "tag",
                                              "variable" : "coding",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Coding"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "system",
                                              "source" : [
                                                {
                                                  "context" : "organizationPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "coding",
                                                  "contextType" : "variable",
                                                  "element" : "system",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "http://algoritmodiscoring"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "code",
                                              "source" : [
                                                {
                                                  "context" : "organizationPartOf"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "coding",
                                                  "contextType" : "variable",
                                                  "element" : "code",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "ClinicalDocument/informant/representedOrganization/asOrganizationPartOf"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "identifier",
                                      "source" : [
                                        {
                                          "context" : "organizationPartOf",
                                          "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" : "organizationPartOf"
                                                }
                                              ],
                                              "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" : "extension",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "extension",
                                                  "variable" : "ext"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "organization1",
                                                  "contextType" : "variable",
                                                  "element" : "id",
                                                  "variable" : "uuid4",
                                                  "transform" : "evaluate",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "r + '-' + ext"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "e14",
                                                  "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" : "organizationPartOf",
                                          "element" : "code",
                                          "variable" : "vvv"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "type",
                                          "variable" : "vvv",
                                          "transform" : "create"
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "statusCode",
                                      "source" : [
                                        {
                                          "context" : "organizationPartOf",
                                          "element" : "statusCode",
                                          "variable" : "status",
                                          "condition" : "(code = '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" : "asOrganizationPartOf",
                                      "source" : [
                                        {
                                          "context" : "organizationPartOf",
                                          "element" : "wholeOrganization"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "partOf",
                                          "variable" : "partOf1"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "wholeOrganization",
                                          "source" : [
                                            {
                                              "context" : "organizationPartOf",
                                              "element" : "wholeOrganization",
                                              "variable" : "wholeOrganization"
                                            }
                                          ],
                                          "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" : "PUT"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e15",
                                              "contextType" : "variable",
                                              "element" : "resource",
                                              "variable" : "organization2",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Organization"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "meta",
                                              "source" : [
                                                {
                                                  "context" : "wholeOrganization"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "organization2",
                                                  "contextType" : "variable",
                                                  "element" : "meta",
                                                  "variable" : "meta"
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "coding",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrganization"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "meta",
                                                      "contextType" : "variable",
                                                      "element" : "tag",
                                                      "variable" : "coding",
                                                      "transform" : "create",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "Coding"
                                                        }
                                                      ]
                                                    }
                                                  ],
                                                  "rule" : [
                                                    {
                                                      "name" : "system",
                                                      "source" : [
                                                        {
                                                          "context" : "wholeOrganization"
                                                        }
                                                      ],
                                                      "target" : [
                                                        {
                                                          "context" : "coding",
                                                          "contextType" : "variable",
                                                          "element" : "system",
                                                          "transform" : "copy",
                                                          "parameter" : [
                                                            {
                                                              "valueString" : "http://algoritmodiscoring"
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "name" : "code",
                                                      "source" : [
                                                        {
                                                          "context" : "wholeOrganization"
                                                        }
                                                      ],
                                                      "target" : [
                                                        {
                                                          "context" : "coding",
                                                          "contextType" : "variable",
                                                          "element" : "code",
                                                          "transform" : "copy",
                                                          "parameter" : [
                                                            {
                                                              "valueString" : "ClinicalDocument/informant/representedOrganization/asOrganizationPartOf/wholeOrganization"
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "identifier",
                                              "source" : [
                                                {
                                                  "context" : "wholeOrganization",
                                                  "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" : "wholeOrganization"
                                                        }
                                                      ],
                                                      "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" : "extension",
                                                      "source" : [
                                                        {
                                                          "context" : "id",
                                                          "element" : "extension",
                                                          "variable" : "ext"
                                                        }
                                                      ],
                                                      "target" : [
                                                        {
                                                          "context" : "organization2",
                                                          "contextType" : "variable",
                                                          "element" : "id",
                                                          "variable" : "uuid5",
                                                          "transform" : "evaluate",
                                                          "parameter" : [
                                                            {
                                                              "valueString" : "r + '-' + ext"
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "context" : "e15",
                                                          "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" : "wholeOrganization",
                                                  "element" : "name",
                                                  "variable" : "v"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "organization2",
                                                  "contextType" : "variable",
                                                  "element" : "name",
                                                  "transform" : "evaluate",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "v.other"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "telecom",
                                              "source" : [
                                                {
                                                  "context" : "wholeOrganization",
                                                  "element" : "telecom",
                                                  "variable" : "vvv"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "organization2",
                                                  "contextType" : "variable",
                                                  "element" : "telecom",
                                                  "variable" : "vvv",
                                                  "transform" : "create"
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "addr",
                                              "source" : [
                                                {
                                                  "context" : "wholeOrganization",
                                                  "element" : "addr",
                                                  "variable" : "vvv"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "organization2",
                                                  "contextType" : "variable",
                                                  "element" : "address",
                                                  "variable" : "vvv",
                                                  "transform" : "create"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ],
          "documentation" : "START INFORMANT 1"
        },
        {
          "name" : "inform2",
          "source" : [
            {
              "context" : "src",
              "element" : "informant",
              "variable" : "informant"
            }
          ],
          "rule" : [
            {
              "name" : "informant",
              "source" : [
                {
                  "context" : "informant",
                  "element" : "relatedEntity",
                  "variable" : "related"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e16"
                },
                {
                  "context" : "e16",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e16",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "relatedPerson",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "RelatedPerson"
                    }
                  ]
                },
                {
                  "context" : "relatedPerson",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e16",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/RelatedPerson/"
                    },
                    {
                      "valueId" : "uuid1"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "RelatedPerson"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "relatedPerson",
                  "source" : [
                    {
                      "context" : "informant"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "attester",
                      "variable" : "attester"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "mode",
                      "source" : [
                        {
                          "context" : "informant"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "attester",
                          "contextType" : "variable",
                          "element" : "mode",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "professional"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "reference",
                      "source" : [
                        {
                          "context" : "informant"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "attester",
                          "contextType" : "variable",
                          "element" : "party",
                          "variable" : "reference",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        },
                        {
                          "context" : "reference",
                          "contextType" : "variable",
                          "element" : "reference",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "'https://example/RelatedPerson/' + %relatedPerson.id"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "relatedPerson1",
                      "source" : [
                        {
                          "context" : "related",
                          "element" : "relatedPerson",
                          "variable" : "Person"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "related",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "relatedPerson",
                              "contextType" : "variable",
                              "element" : "relationship",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "related",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "relatedPerson",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "related",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "relatedPerson",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "Person",
                              "element" : "name",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "relatedPerson",
                              "contextType" : "variable",
                              "element" : "name",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "birthinformant",
                          "source" : [
                            {
                              "context" : "related",
                              "element" : "birthTime",
                              "variable" : "date"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "valueD",
                              "source" : [
                                {
                                  "context" : "date",
                                  "element" : "value",
                                  "variable" : "value"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "relatedPerson",
                                  "contextType" : "variable",
                                  "element" : "birthDate",
                                  "transform" : "truncate",
                                  "parameter" : [
                                    {
                                      "valueId" : "value"
                                    },
                                    {
                                      "valueInteger" : 10
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "reference",
                          "source" : [
                            {
                              "context" : "related"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "relatedPerson",
                              "contextType" : "variable",
                              "element" : "patient",
                              "variable" : "reference",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Reference"
                                }
                              ]
                            },
                            {
                              "context" : "reference",
                              "contextType" : "variable",
                              "element" : "reference",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "'https://example/Patient/' + %patientResource.id"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ],
          "documentation" : "START INFORMANT 2"
        },
        {
          "name" : "custodian",
          "source" : [
            {
              "context" : "src",
              "element" : "custodian",
              "variable" : "custodian"
            }
          ],
          "rule" : [
            {
              "name" : "organization",
              "source" : [
                {
                  "context" : "custodian",
                  "element" : "assignedCustodian",
                  "variable" : "assignedCustodian"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e17"
                },
                {
                  "context" : "e17",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "PUT"
                    }
                  ]
                },
                {
                  "context" : "e17",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "Organization",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Organization"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "meta",
                  "source" : [
                    {
                      "context" : "assignedCustodian"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "Organization",
                      "contextType" : "variable",
                      "element" : "meta",
                      "variable" : "meta"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "coding",
                      "source" : [
                        {
                          "context" : "assignedCustodian"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "meta",
                          "contextType" : "variable",
                          "element" : "tag",
                          "variable" : "coding",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Coding"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "system",
                          "source" : [
                            {
                              "context" : "assignedCustodian"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "system",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "http://algoritmodiscoring"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "assignedCustodian"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "code",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "ClinicalDocument/custodian"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "representedCustodianOrganization",
                  "source" : [
                    {
                      "context" : "assignedCustodian",
                      "element" : "representedCustodianOrganization",
                      "variable" : "representedCustodianOrganization"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "identifier",
                      "source" : [
                        {
                          "context" : "representedCustodianOrganization",
                          "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" : "representedCustodianOrganization"
                                }
                              ],
                              "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" : "extension",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "Organization",
                                  "contextType" : "variable",
                                  "element" : "id",
                                  "variable" : "uuid",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "r + '-' + ext"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e17",
                                  "contextType" : "variable",
                                  "element" : "fullUrl",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "https://example/Organization/"
                                    },
                                    {
                                      "valueId" : "uuid"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "RefCustodian",
                      "source" : [
                        {
                          "context" : "assignedCustodian"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "DocumentReference",
                          "contextType" : "variable",
                          "element" : "custodian",
                          "variable" : "referenceCU",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        },
                        {
                          "context" : "referenceCU",
                          "contextType" : "variable",
                          "element" : "reference",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "'https://example/Organization/' + %Organization.id"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "custodian1",
                      "source" : [
                        {
                          "context" : "representedCustodianOrganization"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "custodian",
                          "variable" : "reference",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        },
                        {
                          "context" : "reference",
                          "contextType" : "variable",
                          "element" : "reference",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "'https://example/Organization/' + %Organization.id"
                            }
                          ]
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "CustodianOrganization",
                          "variable" : [
                            "representedCustodianOrganization",
                            "Organization"
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ],
          "documentation" : "START CUSTODIAN"
        },
        {
          "name" : "informationRecipent",
          "source" : [
            {
              "context" : "src",
              "element" : "informationRecipient",
              "variable" : "informationRecipient"
            }
          ],
          "rule" : [
            {
              "name" : "intendedRecipent",
              "source" : [
                {
                  "context" : "informationRecipient",
                  "element" : "intendedRecipient",
                  "variable" : "intendedRecipient"
                }
              ],
              "rule" : [
                {
                  "name" : "attesterOrg",
                  "source" : [
                    {
                      "context" : "intendedRecipient",
                      "element" : "informationRecipient",
                      "variable" : "informationRecipient2"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "intendedRecipienPract",
                      "source" : [
                        {
                          "context" : "informationRecipient"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "attester",
                          "variable" : "attester"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "mode",
                          "source" : [
                            {
                              "context" : "informationRecipient2"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "attester",
                              "contextType" : "variable",
                              "element" : "mode",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "professional"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "PersonRecipient",
                          "source" : [
                            {
                              "context" : "informationRecipient2"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e19"
                            },
                            {
                              "context" : "e19",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e19",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "practitioner",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Practitioner"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "informationRecipient2"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "meta",
                                  "variable" : "meta"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "coding",
                                  "source" : [
                                    {
                                      "context" : "informationRecipient2"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "meta",
                                      "contextType" : "variable",
                                      "element" : "tag",
                                      "variable" : "coding",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Coding"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "system",
                                      "source" : [
                                        {
                                          "context" : "informationRecipient2"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "http://algoritmodiscoring"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "informationRecipient2"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "code",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "ClinicalDocument/informationRecipient"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "intendedRecipient",
                                  "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "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" : "extension",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "practitioner",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid2",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e19",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Practitioner/"
                                            },
                                            {
                                              "valueId" : "uuid2"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "attester",
                                          "contextType" : "variable",
                                          "element" : "party",
                                          "variable" : "reference1",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference1",
                                          "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" : "intendedRecipient",
                                  "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" : "intendedRecipient",
                                  "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" : "intendedRecipient",
                                  "element" : "addr",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "address",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "telecom",
                              "source" : [
                                {
                                  "context" : "intendedRecipient",
                                  "element" : "telecom",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "telecom",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "informationRecipient2",
                                  "element" : "name",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "date",
                              "source" : [
                                {
                                  "context" : "informationRecipient2",
                                  "element" : "birthTime",
                                  "variable" : "bt"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "value",
                                  "source" : [
                                    {
                                      "context" : "bt",
                                      "element" : "value",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "birthDate",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.date"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "attesterOrg",
                  "source" : [
                    {
                      "context" : "intendedRecipient",
                      "element" : "receivedOrganization",
                      "variable" : "receivedOrganization"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "intendedRecipienOrg",
                      "source" : [
                        {
                          "context" : "informationRecipient"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "attester",
                          "variable" : "attester"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "mode",
                          "source" : [
                            {
                              "context" : "receivedOrganization"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "attester",
                              "contextType" : "variable",
                              "element" : "mode",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "official"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "receivedOrganization",
                          "source" : [
                            {
                              "context" : "receivedOrganization"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e20"
                            },
                            {
                              "context" : "e20",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e20",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "organization",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Organization"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "receivedOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization",
                                  "contextType" : "variable",
                                  "element" : "meta",
                                  "variable" : "meta"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "coding",
                                  "source" : [
                                    {
                                      "context" : "receivedOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "meta",
                                      "contextType" : "variable",
                                      "element" : "tag",
                                      "variable" : "coding",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Coding"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "system",
                                      "source" : [
                                        {
                                          "context" : "receivedOrganization"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "http://algoritmodiscoring"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "receivedOrganization"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "code",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "ClinicalDocument/informationRecipient/receivedOrganization"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "receivedOrganization",
                                  "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" : "receivedOrganization"
                                        }
                                      ],
                                      "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" : "extension",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid3",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e20",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Organization/"
                                            },
                                            {
                                              "valueId" : "uuid3"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "attester",
                                          "contextType" : "variable",
                                          "element" : "party",
                                          "variable" : "reference2",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Reference"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "reference2",
                                          "contextType" : "variable",
                                          "element" : "reference",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "'https://example/Organization/' + %organization.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "receivedOrganization",
                                  "element" : "name",
                                  "variable" : "v"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "v.other"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "telecom",
                              "source" : [
                                {
                                  "context" : "receivedOrganization",
                                  "element" : "telecom",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization",
                                  "contextType" : "variable",
                                  "element" : "telecom",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "addr",
                              "source" : [
                                {
                                  "context" : "receivedOrganization",
                                  "element" : "addr",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization",
                                  "contextType" : "variable",
                                  "element" : "address",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "asOrganizationPartOf",
                              "source" : [
                                {
                                  "context" : "receivedOrganization",
                                  "element" : "asOrganizationPartOf",
                                  "variable" : "asOrganizationPartOf"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e21"
                                },
                                {
                                  "context" : "e21",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e21",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "organization2",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                },
                                {
                                  "context" : "organization2",
                                  "contextType" : "variable",
                                  "element" : "id",
                                  "variable" : "uuid4",
                                  "transform" : "uuid"
                                },
                                {
                                  "context" : "e21",
                                  "contextType" : "variable",
                                  "element" : "fullUrl",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "https://example/Organization"
                                    },
                                    {
                                      "valueId" : "uuid4"
                                    }
                                  ]
                                },
                                {
                                  "context" : "organization",
                                  "contextType" : "variable",
                                  "element" : "partOf",
                                  "variable" : "referenceor",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Reference"
                                    }
                                  ]
                                },
                                {
                                  "context" : "referenceor",
                                  "contextType" : "variable",
                                  "element" : "reference",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "'https://example/Organization' + %organization2.id"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "asOrganizationPartOf"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "asOrganizationPartOf"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "asOrganizationPartOf"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "asOrganizationPartOf"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/informationRecipient/receivedOrganization/asOrganizationPartOf"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "asOrganizationPartOf",
                                      "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" : "asOrganizationPartOf"
                                            }
                                          ],
                                          "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" : "extension",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization2",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid4",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e21",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid4"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "organization",
                                              "contextType" : "variable",
                                              "element" : "partOf",
                                              "variable" : "referenceor",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "referenceor",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Organization/' + %organization2.id"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "asOrganizationPartOf",
                                      "element" : "code",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "type",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "statusCode",
                                  "source" : [
                                    {
                                      "context" : "asOrganizationPartOf",
                                      "element" : "statusCode",
                                      "variable" : "status",
                                      "condition" : "(value = 'active')"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "active",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "boolean"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "organization2",
                                      "contextType" : "variable",
                                      "element" : "active",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "true"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "wholeOrganization",
                                  "source" : [
                                    {
                                      "context" : "asOrganizationPartOf",
                                      "element" : "wholeOrganization",
                                      "variable" : "wholeOrganization3"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "bundle",
                                      "contextType" : "variable",
                                      "element" : "entry",
                                      "variable" : "e22"
                                    },
                                    {
                                      "context" : "e22",
                                      "contextType" : "variable",
                                      "element" : "request",
                                      "variable" : "request",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "BackboneElement"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "request",
                                      "contextType" : "variable",
                                      "element" : "method",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "PUT"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e22",
                                      "contextType" : "variable",
                                      "element" : "resource",
                                      "variable" : "organization3",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Organization"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "meta",
                                      "source" : [
                                        {
                                          "context" : "wholeOrganization3"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization3",
                                          "contextType" : "variable",
                                          "element" : "meta",
                                          "variable" : "meta"
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "coding",
                                          "source" : [
                                            {
                                              "context" : "wholeOrganization3"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "meta",
                                              "contextType" : "variable",
                                              "element" : "tag",
                                              "variable" : "coding",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Coding"
                                                }
                                              ]
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "system",
                                              "source" : [
                                                {
                                                  "context" : "wholeOrganization3"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "coding",
                                                  "contextType" : "variable",
                                                  "element" : "system",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "http://algoritmodiscoring"
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "name" : "code",
                                              "source" : [
                                                {
                                                  "context" : "wholeOrganization3"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "coding",
                                                  "contextType" : "variable",
                                                  "element" : "code",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "ClinicalDocument/informationRecipient/receivedOrganization/asOrganizationPartOf/wholeOrganization"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "identifier",
                                      "source" : [
                                        {
                                          "context" : "wholeOrganization3",
                                          "element" : "id",
                                          "variable" : "id"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization3",
                                          "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" : "wholeOrganization3"
                                                }
                                              ],
                                              "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" : "extension",
                                              "source" : [
                                                {
                                                  "context" : "id",
                                                  "element" : "extension",
                                                  "variable" : "ext"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "organization3",
                                                  "contextType" : "variable",
                                                  "element" : "id",
                                                  "variable" : "uuid5",
                                                  "transform" : "evaluate",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "r + '-' + ext"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "e22",
                                                  "contextType" : "variable",
                                                  "element" : "fullUrl",
                                                  "transform" : "append",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "https://example/Organization/"
                                                    },
                                                    {
                                                      "valueId" : "uuid5"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "organization2",
                                                  "contextType" : "variable",
                                                  "element" : "partOf",
                                                  "variable" : "referenceor",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Reference"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "referenceor",
                                                  "contextType" : "variable",
                                                  "element" : "reference",
                                                  "transform" : "evaluate",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "'https://example/Organization/' + %organization3.id"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "name",
                                      "source" : [
                                        {
                                          "context" : "wholeOrganization3",
                                          "element" : "name",
                                          "variable" : "v"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization3",
                                          "contextType" : "variable",
                                          "element" : "name",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "v.other"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "telecom",
                                      "source" : [
                                        {
                                          "context" : "wholeOrganization3",
                                          "element" : "telecom",
                                          "variable" : "vvv"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization3",
                                          "contextType" : "variable",
                                          "element" : "telecom",
                                          "variable" : "vvv",
                                          "transform" : "create"
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "addr",
                                      "source" : [
                                        {
                                          "context" : "wholeOrganization3",
                                          "element" : "addr",
                                          "variable" : "vvv"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization3",
                                          "contextType" : "variable",
                                          "element" : "address",
                                          "variable" : "vvv",
                                          "transform" : "create"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ],
          "documentation" : "START INFORMATION RECIPIENT"
        },
        {
          "name" : "LegalAuthenticator",
          "source" : [
            {
              "context" : "src",
              "element" : "legalAuthenticator",
              "variable" : "legalAuth"
            }
          ],
          "rule" : [
            {
              "name" : "legalAuth",
              "source" : [
                {
                  "context" : "legalAuth"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "attester",
                  "variable" : "attester"
                }
              ],
              "rule" : [
                {
                  "name" : "entity",
                  "source" : [
                    {
                      "context" : "legalAuth",
                      "element" : "assignedEntity",
                      "variable" : "entity"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "PractitionerROLlegal",
                      "source" : [
                        {
                          "context" : "entity",
                          "element" : "id",
                          "variable" : "id",
                          "condition" : "(root = '2.16.840.1.113883.2.9.4.3.2')"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e23"
                        },
                        {
                          "context" : "e23",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "POST"
                            }
                          ]
                        },
                        {
                          "context" : "e23",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "practitionerRole",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "PractitionerRole"
                            }
                          ]
                        },
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "id",
                          "variable" : "uuid",
                          "transform" : "uuid"
                        },
                        {
                          "context" : "e23",
                          "contextType" : "variable",
                          "element" : "fullUrl",
                          "transform" : "append",
                          "parameter" : [
                            {
                              "valueString" : "https://example/PractitionerRole/"
                            },
                            {
                              "valueId" : "uuid"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "url",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PractitionerRole"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "mode",
                          "source" : [
                            {
                              "context" : "legalAuth"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "attester",
                              "contextType" : "variable",
                              "element" : "mode",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "legal"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "time",
                          "source" : [
                            {
                              "context" : "legalAuth",
                              "element" : "time",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "attester",
                              "contextType" : "variable",
                              "element" : "time",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "PractitionerLegal",
                          "source" : [
                            {
                              "context" : "legalAuth"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "attester",
                              "contextType" : "variable",
                              "element" : "party",
                              "variable" : "reference",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Reference"
                                }
                              ]
                            },
                            {
                              "context" : "reference",
                              "contextType" : "variable",
                              "element" : "reference",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "practitioner",
                              "source" : [
                                {
                                  "context" : "entity"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e24"
                                },
                                {
                                  "context" : "e24",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e24",
                                  "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/legalAuthenticator"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "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" : "extension",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "identifier",
                                          "contextType" : "variable",
                                          "element" : "value",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "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" : "extension",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "practitioner",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid1",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e24",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Practitioner/"
                                                },
                                                {
                                                  "valueId" : "uuid1"
                                                }
                                              ]
                                            },
                                            {
                                              "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" : "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" : "person",
                                  "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" : "birthTimelegal",
                                          "source" : [
                                            {
                                              "context" : "birthTime",
                                              "element" : "value",
                                              "variable" : "date"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "practitioner",
                                              "contextType" : "variable",
                                              "element" : "birthDate",
                                              "transform" : "truncate",
                                              "parameter" : [
                                                {
                                                  "valueId" : "date"
                                                },
                                                {
                                                  "valueInteger" : 10
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitionerRole",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "LAOrganiz",
                              "source" : [
                                {
                                  "context" : "entity",
                                  "element" : "representedOrganization",
                                  "variable" : "rapresentedOrg"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e25"
                                },
                                {
                                  "context" : "e25",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e25",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "organization",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "rapresentedOrg"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "rapresentedOrg"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "rapresentedOrg"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "rapresentedOrg"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/legalAuthenticator/representedOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "rapresentedOrg",
                                      "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" : "rapresentedOrg"
                                            }
                                          ],
                                          "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" : "extension",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid2",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e25",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid2"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "practitionerRole",
                                              "contextType" : "variable",
                                              "element" : "organization",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Organization/' + %organization.id"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "rapresentedOrg",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "rapresentedOrg",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "rapresentedOrg",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "asOrgID",
                                  "source" : [
                                    {
                                      "context" : "rapresentedOrg",
                                      "element" : "asOrganizationPartOf",
                                      "variable" : "asOrgPartOf"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "asOrgPO",
                                      "source" : [
                                        {
                                          "context" : "asOrgPartOf",
                                          "variable" : "asOrgPartOf1"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "bundle",
                                          "contextType" : "variable",
                                          "element" : "entry",
                                          "variable" : "e26"
                                        },
                                        {
                                          "context" : "e26",
                                          "contextType" : "variable",
                                          "element" : "request",
                                          "variable" : "request",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "BackboneElement"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "request",
                                          "contextType" : "variable",
                                          "element" : "method",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "PUT"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e26",
                                          "contextType" : "variable",
                                          "element" : "resource",
                                          "variable" : "asorganization",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Organization"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "meta",
                                          "source" : [
                                            {
                                              "context" : "asOrgPartOf1"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "asorganization",
                                              "contextType" : "variable",
                                              "element" : "meta",
                                              "variable" : "meta"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "coding",
                                              "source" : [
                                                {
                                                  "context" : "asOrgPartOf1"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "meta",
                                                  "contextType" : "variable",
                                                  "element" : "tag",
                                                  "variable" : "coding",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Coding"
                                                    }
                                                  ]
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "system",
                                                  "source" : [
                                                    {
                                                      "context" : "asOrgPartOf1"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "coding",
                                                      "contextType" : "variable",
                                                      "element" : "system",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "http://algoritmodiscoring"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "name" : "code",
                                                  "source" : [
                                                    {
                                                      "context" : "asOrgPartOf1"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "coding",
                                                      "contextType" : "variable",
                                                      "element" : "code",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "ClinicalDocument/legalAuthenticator/representedOrganization/asOrganizationPartOf"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "identifier",
                                          "source" : [
                                            {
                                              "context" : "asOrgPartOf1",
                                              "element" : "id",
                                              "variable" : "id"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "asorganization",
                                              "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" : "asOrgPartOf1"
                                                    }
                                                  ],
                                                  "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" : "extension",
                                                  "source" : [
                                                    {
                                                      "context" : "id",
                                                      "element" : "extension",
                                                      "variable" : "ext"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "asorganization",
                                                      "contextType" : "variable",
                                                      "element" : "id",
                                                      "variable" : "uuid2",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "r + '-' + ext"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "e26",
                                                      "contextType" : "variable",
                                                      "element" : "fullUrl",
                                                      "transform" : "append",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "https://example/Organization/"
                                                        },
                                                        {
                                                          "valueId" : "uuid2"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "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/' + %asorganization.id"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "asOrgPartOf1",
                                              "element" : "code",
                                              "variable" : "vvv"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "asorganization",
                                              "contextType" : "variable",
                                              "element" : "type",
                                              "variable" : "vvv",
                                              "transform" : "create"
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "statusCode",
                                          "source" : [
                                            {
                                              "context" : "asOrgPartOf1",
                                              "element" : "statusCode",
                                              "variable" : "status",
                                              "condition" : "(code = 'active')"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "asorganization",
                                              "contextType" : "variable",
                                              "element" : "active",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "boolean"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "asorganization",
                                              "contextType" : "variable",
                                              "element" : "active",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueBoolean" : true
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "wholeOrg",
                                          "source" : [
                                            {
                                              "context" : "asOrgPartOf1",
                                              "element" : "wholeOrganization",
                                              "variable" : "wholeOrg"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "wholeOrg1",
                                              "source" : [
                                                {
                                                  "context" : "wholeOrg",
                                                  "variable" : "wholeOrg1"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "bundle",
                                                  "contextType" : "variable",
                                                  "element" : "entry",
                                                  "variable" : "e27"
                                                },
                                                {
                                                  "context" : "e27",
                                                  "contextType" : "variable",
                                                  "element" : "request",
                                                  "variable" : "request",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "BackboneElement"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "request",
                                                  "contextType" : "variable",
                                                  "element" : "method",
                                                  "transform" : "copy",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "PUT"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "e27",
                                                  "contextType" : "variable",
                                                  "element" : "resource",
                                                  "variable" : "wholeorganization",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Organization"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "wholeorganization",
                                                  "contextType" : "variable",
                                                  "element" : "id",
                                                  "variable" : "uuid4",
                                                  "transform" : "uuid"
                                                },
                                                {
                                                  "context" : "e27",
                                                  "contextType" : "variable",
                                                  "element" : "fullUrl",
                                                  "transform" : "append",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "https://example/Organization/"
                                                    },
                                                    {
                                                      "valueId" : "uuid4"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "asorganization",
                                                  "contextType" : "variable",
                                                  "element" : "partOf",
                                                  "variable" : "reference",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Reference"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "context" : "reference",
                                                  "contextType" : "variable",
                                                  "element" : "reference",
                                                  "transform" : "evaluate",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "'https://example/Organization/' + %wholeorganization.id"
                                                    }
                                                  ]
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "meta",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrg1"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "wholeorganization",
                                                      "contextType" : "variable",
                                                      "element" : "meta",
                                                      "variable" : "meta"
                                                    }
                                                  ],
                                                  "rule" : [
                                                    {
                                                      "name" : "coding",
                                                      "source" : [
                                                        {
                                                          "context" : "wholeOrg1"
                                                        }
                                                      ],
                                                      "target" : [
                                                        {
                                                          "context" : "meta",
                                                          "contextType" : "variable",
                                                          "element" : "tag",
                                                          "variable" : "coding",
                                                          "transform" : "create",
                                                          "parameter" : [
                                                            {
                                                              "valueString" : "Coding"
                                                            }
                                                          ]
                                                        }
                                                      ],
                                                      "rule" : [
                                                        {
                                                          "name" : "system",
                                                          "source" : [
                                                            {
                                                              "context" : "wholeOrg1"
                                                            }
                                                          ],
                                                          "target" : [
                                                            {
                                                              "context" : "coding",
                                                              "contextType" : "variable",
                                                              "element" : "system",
                                                              "transform" : "copy",
                                                              "parameter" : [
                                                                {
                                                                  "valueString" : "http://algoritmodiscoring"
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "name" : "code",
                                                          "source" : [
                                                            {
                                                              "context" : "wholeOrg1"
                                                            }
                                                          ],
                                                          "target" : [
                                                            {
                                                              "context" : "coding",
                                                              "contextType" : "variable",
                                                              "element" : "code",
                                                              "transform" : "copy",
                                                              "parameter" : [
                                                                {
                                                                  "valueString" : "ClinicalDocument/legalAuthenticator/representedOrganization/asOrganizationPartOf/wholeOrganization"
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "name" : "identifier",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrg1",
                                                      "element" : "id",
                                                      "variable" : "id"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "wholeorganization",
                                                      "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" : "wholeOrg1"
                                                            }
                                                          ],
                                                          "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" : "extension",
                                                          "source" : [
                                                            {
                                                              "context" : "id",
                                                              "element" : "extension",
                                                              "variable" : "ext"
                                                            }
                                                          ],
                                                          "target" : [
                                                            {
                                                              "context" : "wholeorganization",
                                                              "contextType" : "variable",
                                                              "element" : "id",
                                                              "variable" : "uuid4",
                                                              "transform" : "evaluate",
                                                              "parameter" : [
                                                                {
                                                                  "valueString" : "r + '-' + ext"
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "context" : "e27",
                                                              "contextType" : "variable",
                                                              "element" : "fullUrl",
                                                              "transform" : "append",
                                                              "parameter" : [
                                                                {
                                                                  "valueString" : "https://example/Organization/"
                                                                },
                                                                {
                                                                  "valueId" : "uuid4"
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "context" : "asorganization",
                                                              "contextType" : "variable",
                                                              "element" : "partOf",
                                                              "variable" : "reference",
                                                              "transform" : "create",
                                                              "parameter" : [
                                                                {
                                                                  "valueString" : "Reference"
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "context" : "reference",
                                                              "contextType" : "variable",
                                                              "element" : "reference",
                                                              "transform" : "evaluate",
                                                              "parameter" : [
                                                                {
                                                                  "valueString" : "'https://example/Organization/' + %wholeorganization.id"
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "name" : "name",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrg1",
                                                      "element" : "name",
                                                      "variable" : "v"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "wholeorganization",
                                                      "contextType" : "variable",
                                                      "element" : "name",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "v.other"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "name" : "telecom",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrg1",
                                                      "element" : "telecom",
                                                      "variable" : "vvv"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "wholeorganization",
                                                      "contextType" : "variable",
                                                      "element" : "telecom",
                                                      "variable" : "vvv",
                                                      "transform" : "create"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "name" : "addr",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrg1",
                                                      "element" : "addr",
                                                      "variable" : "vvv"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "wholeorganization",
                                                      "contextType" : "variable",
                                                      "element" : "address",
                                                      "variable" : "vvv",
                                                      "transform" : "create"
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "Codice Fiscale"
                    },
                    {
                      "name" : "OrgPartitaIVA",
                      "source" : [
                        {
                          "context" : "entity",
                          "element" : "id",
                          "variable" : "id",
                          "condition" : "(root = '2.16.840.1.113883.2.9.6.3.2')"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e251"
                        },
                        {
                          "context" : "e251",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e251",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "organization",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Organization"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "mode",
                          "source" : [
                            {
                              "context" : "entity"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "attester",
                              "contextType" : "variable",
                              "element" : "mode",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "official"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "entity"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "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/legalAuthenticatorPartitaIVA"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "entity",
                              "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" : "entity"
                                    }
                                  ],
                                  "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid2",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e251",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid2"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "attester",
                                      "contextType" : "variable",
                                      "element" : "party",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Organization/' + %organization.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "Partita IVA"
                    }
                  ]
                }
              ]
            }
          ],
          "documentation" : "START Legal Authenticator"
        },
        {
          "name" : "Auth",
          "source" : [
            {
              "context" : "src",
              "element" : "authenticator",
              "variable" : "Auth"
            }
          ],
          "target" : [
            {
              "context" : "bundle",
              "contextType" : "variable",
              "element" : "entry",
              "variable" : "e28"
            },
            {
              "context" : "e28",
              "contextType" : "variable",
              "element" : "request",
              "variable" : "request",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "BackboneElement"
                }
              ]
            },
            {
              "context" : "request",
              "contextType" : "variable",
              "element" : "method",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "POST"
                }
              ]
            },
            {
              "context" : "e28",
              "contextType" : "variable",
              "element" : "resource",
              "variable" : "practitionerRole",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "PractitionerRole"
                }
              ]
            },
            {
              "context" : "practitionerRole",
              "contextType" : "variable",
              "element" : "id",
              "variable" : "uuid1",
              "transform" : "uuid"
            },
            {
              "context" : "e28",
              "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" : "attester",
              "source" : [
                {
                  "context" : "Auth"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "attester",
                  "variable" : "attester"
                }
              ],
              "rule" : [
                {
                  "name" : "time",
                  "source" : [
                    {
                      "context" : "Auth",
                      "element" : "time",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "attester",
                      "contextType" : "variable",
                      "element" : "time",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ]
                },
                {
                  "name" : "mode",
                  "source" : [
                    {
                      "context" : "Auth"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "attester",
                      "contextType" : "variable",
                      "element" : "mode",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "professional"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "entity",
                  "source" : [
                    {
                      "context" : "Auth",
                      "element" : "assignedEntity",
                      "variable" : "entity"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "attester",
                      "contextType" : "variable",
                      "element" : "party",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                        }
                      ]
                    }
                  ],
                  "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" : "e29"
                        },
                        {
                          "context" : "e29",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e29",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "practitioner",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Practitioner"
                            }
                          ]
                        },
                        {
                          "context" : "practitioner",
                          "contextType" : "variable",
                          "element" : "id",
                          "variable" : "uuid2",
                          "transform" : "uuid"
                        },
                        {
                          "context" : "e29",
                          "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"
                            }
                          ]
                        }
                      ],
                      "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/authenticator"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "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" : "extension",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "identifier",
                                  "contextType" : "variable",
                                  "element" : "value",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid2",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e29",
                                      "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" : "address",
                          "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" : "person",
                          "source" : [
                            {
                              "context" : "entity",
                              "element" : "assignedPerson",
                              "variable" : "person"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "personName",
                              "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" : "birthTimeauth",
                                  "source" : [
                                    {
                                      "context" : "birthTime",
                                      "element" : "value",
                                      "variable" : "date"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "practitioner",
                                      "contextType" : "variable",
                                      "element" : "birthDate",
                                      "transform" : "truncate",
                                      "parameter" : [
                                        {
                                          "valueId" : "date"
                                        },
                                        {
                                          "valueInteger" : 10
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "reporganization",
                      "source" : [
                        {
                          "context" : "entity",
                          "element" : "representedOrganization",
                          "variable" : "reporganization"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e30"
                        },
                        {
                          "context" : "e30",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e30",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "organization",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Organization"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "reporganization"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "reporganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "reporganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "reporganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/authenticator/representedOrganization"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "reporganization",
                              "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" : "reporganization"
                                    }
                                  ],
                                  "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid3",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e30",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid3"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "organization",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Organization/' + %organization.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "reporganization",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "reporganization",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "reporganization",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "organizationpartof",
                          "source" : [
                            {
                              "context" : "reporganization",
                              "element" : "asOrganizationPartOf",
                              "variable" : "organizationpartof"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e31"
                            },
                            {
                              "context" : "e31",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e31",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "asOrganizationpartof",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Organization"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "organizationpartof"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "asOrganizationpartof",
                                  "contextType" : "variable",
                                  "element" : "meta",
                                  "variable" : "meta"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "coding",
                                  "source" : [
                                    {
                                      "context" : "organizationpartof"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "meta",
                                      "contextType" : "variable",
                                      "element" : "tag",
                                      "variable" : "coding",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Coding"
                                        }
                                      ]
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "system",
                                      "source" : [
                                        {
                                          "context" : "organizationpartof"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "system",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "http://algoritmodiscoring"
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "name" : "code",
                                      "source" : [
                                        {
                                          "context" : "organizationpartof"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "coding",
                                          "contextType" : "variable",
                                          "element" : "code",
                                          "transform" : "copy",
                                          "parameter" : [
                                            {
                                              "valueString" : "ClinicalDocument/authenticator/representedOrganization/asOrganizationPartOf"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "organizationpartof",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "asOrganizationpartof",
                                  "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" : "organizationpartof"
                                        }
                                      ],
                                      "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" : "extension",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "asOrganizationpartof",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid4",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e31",
                                          "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/' + %asOrganizationpartof.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "organizationpartof",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "asOrganizationpartof",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "statusCode",
                              "source" : [
                                {
                                  "context" : "organizationpartof",
                                  "element" : "statusCode",
                                  "variable" : "status",
                                  "condition" : "(code = 'active')"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "asOrganizationpartof",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "boolean"
                                    }
                                  ]
                                },
                                {
                                  "context" : "asOsrganizationpartof",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "true"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "wholeorg",
                              "source" : [
                                {
                                  "context" : "organizationpartof",
                                  "element" : "wholeOrganization",
                                  "variable" : "wholeorg"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e32"
                                },
                                {
                                  "context" : "e32",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e32",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "wholeOrganization",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                },
                                {
                                  "context" : "wholeOrganization",
                                  "contextType" : "variable",
                                  "element" : "id",
                                  "variable" : "uuid5",
                                  "transform" : "uuid"
                                },
                                {
                                  "context" : "e32",
                                  "contextType" : "variable",
                                  "element" : "fullUrl",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "https://example/Organization/"
                                    },
                                    {
                                      "valueId" : "uuid5"
                                    }
                                  ]
                                },
                                {
                                  "context" : "asOrganizationpartof",
                                  "contextType" : "variable",
                                  "element" : "partOf",
                                  "variable" : "reference",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Reference"
                                    }
                                  ]
                                },
                                {
                                  "context" : "reference",
                                  "contextType" : "variable",
                                  "element" : "reference",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "'https://example/Organization/' + %wholeOrganization.id"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "wholeorg"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "wholeOrganization",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "wholeorg"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "wholeorg"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "wholeorg"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/authenticator/representedOrganization/asOrganizationPartOf/wholeOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "wholeorg",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "wholeOrganization",
                                      "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" : "wholeorg"
                                            }
                                          ],
                                          "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" : "extension",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "wholeOrganization",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid5",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e32",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid5"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "asOrganizationpartof",
                                              "contextType" : "variable",
                                              "element" : "partOf",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Organization/' + %wholeOrganization.id"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "wholeorg",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "wholeOrganization",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "wholeorg",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "wholeOrganization",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "wholeorg",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "wholeOrganization",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ],
          "documentation" : "START Authenticator"
        },
        {
          "name" : "participant",
          "source" : [
            {
              "context" : "src",
              "element" : "participant",
              "variable" : "participant",
              "condition" : "(typeCode != 'IND')"
            }
          ],
          "rule" : [
            {
              "name" : "Participant1",
              "source" : [
                {
                  "context" : "participant",
                  "element" : "associatedEntity",
                  "variable" : "associetedEntity"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e313"
                },
                {
                  "context" : "e313",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e313",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e313",
                  "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" : "encounter",
                  "contextType" : "variable",
                  "element" : "participant",
                  "variable" : "participant1",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "period",
                  "source" : [
                    {
                      "context" : "participant"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "participant1",
                      "contextType" : "variable",
                      "element" : "period",
                      "variable" : "period",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Period"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "time",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "time",
                          "variable" : "time"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "period",
                          "contextType" : "variable",
                          "element" : "start",
                          "variable" : "start",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "dateTime"
                            }
                          ]
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "TSDateTime",
                          "variable" : [
                            "time",
                            "start"
                          ]
                        }
                      ]
                    }
                  ],
                  "documentation" : "participant.time as time->participant1.period as period ,period.start=(time.value);"
                },
                {
                  "name" : "type",
                  "source" : [
                    {
                      "context" : "participant",
                      "variable" : "p"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "participant1",
                      "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" : "par",
                  "source" : [
                    {
                      "context" : "participant"
                    }
                  ],
                  "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" : "functionCode",
                  "source" : [
                    {
                      "context" : "participant",
                      "element" : "functionCode",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "practitionerRole",
                      "contextType" : "variable",
                      "element" : "code",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ]
                },
                {
                  "name" : "associetedEntity",
                  "source" : [
                    {
                      "context" : "associetedEntity"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e33"
                    },
                    {
                      "context" : "e33",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "PUT"
                        }
                      ]
                    },
                    {
                      "context" : "e33",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "practitioner",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Practitioner"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "meta",
                      "source" : [
                        {
                          "context" : "associetedEntity"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitioner",
                          "contextType" : "variable",
                          "element" : "meta",
                          "variable" : "meta"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "coding",
                          "source" : [
                            {
                              "context" : "associetedEntity"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "meta",
                              "contextType" : "variable",
                              "element" : "tag",
                              "variable" : "coding",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Coding"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "system",
                              "source" : [
                                {
                                  "context" : "associetedEntity"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "http://algoritmodiscoring"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "associetedEntity"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "ClinicalDocument/participant"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "identifier",
                      "source" : [
                        {
                          "context" : "associetedEntity",
                          "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" : "extension",
                          "source" : [
                            {
                              "context" : "id",
                              "element" : "extension",
                              "variable" : "ext"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "identifier",
                              "contextType" : "variable",
                              "element" : "value",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "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" : "extension",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "id",
                                  "variable" : "uuid2",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "r + '-' + ext"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e33",
                                  "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" : "associetedEntity",
                          "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" : "associetedEntity",
                          "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" : "associetedEntity",
                          "element" : "code",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "addr",
                      "source" : [
                        {
                          "context" : "associetedEntity",
                          "element" : "addr",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitioner",
                          "contextType" : "variable",
                          "element" : "address",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "telecom",
                      "source" : [
                        {
                          "context" : "associetedEntity",
                          "element" : "telecom",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitioner",
                          "contextType" : "variable",
                          "element" : "telecom",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "name",
                      "source" : [
                        {
                          "context" : "associetedEntity",
                          "element" : "associatedPerson",
                          "variable" : "associatedperson"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "associatedperson",
                              "element" : "name",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "name",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "birth",
                          "source" : [
                            {
                              "context" : "associatedperson",
                              "element" : "birthTime",
                              "variable" : "birthTime"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "birthTimelegal",
                              "source" : [
                                {
                                  "context" : "birthTime",
                                  "element" : "value",
                                  "variable" : "date"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "birthDate",
                                  "transform" : "truncate",
                                  "parameter" : [
                                    {
                                      "valueId" : "date"
                                    },
                                    {
                                      "valueInteger" : 10
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "scopingOrganization",
                      "source" : [
                        {
                          "context" : "associetedEntity",
                          "element" : "scopingOrganization",
                          "variable" : "scopingOrganization"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e34"
                        },
                        {
                          "context" : "e34",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e34",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "organization",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Organization"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "scopingOrganization"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "scopingOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "scopingOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "scopingOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/participant/scopingOrganization"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "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" : "scopingOrganization"
                                    }
                                  ],
                                  "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid3",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e34",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid3"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "organization",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Organization/' + %organization.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "OrgPartOf",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "element" : "asOrganizationPartOf",
                              "variable" : "OrgPartOf"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e35"
                            },
                            {
                              "context" : "e35",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e35",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "organization1",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Organization"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "identifier",
                                  "variable" : "identifier"
                                }
                              ],
                              "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/participant/scopingOrganization/asOrganizationPartOf"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "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" : "extension",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid4",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e35",
                                          "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" : [
                                    {
                                      "valueBoolean" : true
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "wholeOrgan",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "wholeOrganization",
                                  "variable" : "wholeOrgan"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e36"
                                },
                                {
                                  "context" : "e36",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e36",
                                  "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/participant/scopingOrganization/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" : "extension",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization1",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid5",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e36",
                                              "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" : "PARTICIPANT"
        },
        {
          "name" : "participant",
          "source" : [
            {
              "context" : "src",
              "element" : "participant",
              "variable" : "participant",
              "condition" : "(typeCode = 'IND')"
            }
          ],
          "rule" : [
            {
              "name" : "Participant2",
              "source" : [
                {
                  "context" : "participant",
                  "element" : "associatedEntity",
                  "variable" : "associetedEntity",
                  "condition" : "(classCode = 'PROV')"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e313"
                },
                {
                  "context" : "e313",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e313",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e313",
                  "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" : "encounter",
                  "contextType" : "variable",
                  "element" : "participant",
                  "variable" : "participant2",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "period",
                  "source" : [
                    {
                      "context" : "participant"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "participant2",
                      "contextType" : "variable",
                      "element" : "period",
                      "variable" : "period",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Period"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "time",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "time",
                          "variable" : "time"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "period",
                          "contextType" : "variable",
                          "element" : "start",
                          "variable" : "start",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "dateTime"
                            }
                          ]
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "TSDateTime",
                          "variable" : [
                            "time",
                            "start"
                          ]
                        }
                      ]
                    }
                  ],
                  "documentation" : "participant.time as time->participant2.period as period, period.start=(time.value);"
                },
                {
                  "name" : "type",
                  "source" : [
                    {
                      "context" : "participant",
                      "variable" : "p"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "participant2",
                      "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" : "par",
                  "source" : [
                    {
                      "context" : "participant"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "participant2",
                      "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" : "functionCode",
                  "source" : [
                    {
                      "context" : "participant",
                      "element" : "functionCode",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "practitionerRole",
                      "contextType" : "variable",
                      "element" : "code",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ]
                },
                {
                  "name" : "associetedEntity",
                  "source" : [
                    {
                      "context" : "associetedEntity"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e33"
                    },
                    {
                      "context" : "e33",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "PUT"
                        }
                      ]
                    },
                    {
                      "context" : "e33",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "practitioner",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Practitioner"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "meta",
                      "source" : [
                        {
                          "context" : "associetedEntity"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitioner",
                          "contextType" : "variable",
                          "element" : "meta",
                          "variable" : "meta"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "coding",
                          "source" : [
                            {
                              "context" : "associetedEntity"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "meta",
                              "contextType" : "variable",
                              "element" : "tag",
                              "variable" : "coding",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Coding"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "system",
                              "source" : [
                                {
                                  "context" : "associetedEntity"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "http://algoritmodiscoring"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "associetedEntity"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "ClinicalDocument/participant"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "identifier",
                      "source" : [
                        {
                          "context" : "associetedEntity",
                          "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" : "extension",
                          "source" : [
                            {
                              "context" : "id",
                              "element" : "extension",
                              "variable" : "ext"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "identifier",
                              "contextType" : "variable",
                              "element" : "value",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "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" : "extension",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "id",
                                  "variable" : "uuid2",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "r + '-' + ext"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e33",
                                  "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" : "associetedEntity",
                          "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" : "associetedEntity",
                          "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" : "associetedEntity",
                          "element" : "code",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "addr",
                      "source" : [
                        {
                          "context" : "associetedEntity",
                          "element" : "addr",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitioner",
                          "contextType" : "variable",
                          "element" : "address",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "telecom",
                      "source" : [
                        {
                          "context" : "associetedEntity",
                          "element" : "telecom",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitioner",
                          "contextType" : "variable",
                          "element" : "telecom",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "name",
                      "source" : [
                        {
                          "context" : "associetedEntity",
                          "element" : "associatedPerson",
                          "variable" : "associatedperson"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "associatedperson",
                              "element" : "name",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "name",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "birth",
                          "source" : [
                            {
                              "context" : "associatedperson",
                              "element" : "birthTime",
                              "variable" : "birthTime"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "birthTimelegal",
                              "source" : [
                                {
                                  "context" : "birthTime",
                                  "element" : "value",
                                  "variable" : "date"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "birthDate",
                                  "transform" : "truncate",
                                  "parameter" : [
                                    {
                                      "valueId" : "date"
                                    },
                                    {
                                      "valueInteger" : 10
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "scopingOrganization",
                      "source" : [
                        {
                          "context" : "associetedEntity",
                          "element" : "scopingOrganization",
                          "variable" : "scopingOrganization"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "bundle",
                          "contextType" : "variable",
                          "element" : "entry",
                          "variable" : "e34"
                        },
                        {
                          "context" : "e34",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e34",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "organization",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Organization"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "scopingOrganization"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "scopingOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "scopingOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "scopingOrganization"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/participant/scopingOrganization"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "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" : "scopingOrganization"
                                    }
                                  ],
                                  "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid3",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e34",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid3"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "organization",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Organization/' + %organization.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "OrgPartOf",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "element" : "asOrganizationPartOf",
                              "variable" : "OrgPartOf"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e35"
                            },
                            {
                              "context" : "e35",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e35",
                              "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/participant/scopingOrganization/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" : "extension",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid4",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e35",
                                          "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" : [
                                    {
                                      "valueBoolean" : true
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "wholeOrgan",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "wholeOrganization",
                                  "variable" : "wholeOrgan"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e36"
                                },
                                {
                                  "context" : "e36",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e36",
                                  "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/participant/scopingOrganization/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" : "extension",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization1",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid5",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e36",
                                              "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"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "WHERE",
              "source" : [
                {
                  "context" : "participant",
                  "element" : "associatedEntity",
                  "variable" : "associetedEntity",
                  "condition" : "(classCode = 'NOK') or (classCode = 'ECON') or (classCode = 'CAREGIVER')"
                }
              ],
              "rule" : [
                {
                  "name" : "participant3",
                  "source" : [
                    {
                      "context" : "associetedEntity"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e3131"
                    },
                    {
                      "context" : "e3131",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e3131",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "RelatedPerson",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "RelatedPerson"
                        }
                      ]
                    },
                    {
                      "context" : "RelatedPerson",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid1",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e3131",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/RelatedPerson/"
                        },
                        {
                          "valueId" : "uuid1"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "RelatedPerson"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "link",
                      "source" : [
                        {
                          "context" : "associetedEntity"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "patientResource",
                          "contextType" : "variable",
                          "element" : "link",
                          "variable" : "link"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "type",
                          "source" : [
                            {
                              "context" : "associetedEntity"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "link",
                              "contextType" : "variable",
                              "element" : "type",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "refer"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "reference",
                          "source" : [
                            {
                              "context" : "associetedEntity"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "link",
                              "contextType" : "variable",
                              "element" : "other",
                              "variable" : "reference",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Reference"
                                }
                              ]
                            },
                            {
                              "context" : "reference",
                              "contextType" : "variable",
                              "element" : "reference",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "'https://example/RelatedPerson/' + %RelatedPerson.id"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "id",
                          "source" : [
                            {
                              "context" : "associetedEntity",
                              "element" : "id",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "RelatedPerson",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "reference",
                          "source" : [
                            {
                              "context" : "associetedEntity"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "RelatedPerson",
                              "contextType" : "variable",
                              "element" : "patient",
                              "variable" : "reference",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Reference"
                                }
                              ]
                            },
                            {
                              "context" : "reference",
                              "contextType" : "variable",
                              "element" : "reference",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "'https://example/Patient/' + %patientResource.id"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "associetedEntity",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "RelatedPerson",
                              "contextType" : "variable",
                              "element" : "relationship",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "associetedEntity",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "RelatedPerson",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "associatedPerson",
                          "source" : [
                            {
                              "context" : "associetedEntity",
                              "element" : "associatedPerson",
                              "variable" : "associatedperson"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "name",
                              "source" : [
                                {
                                  "context" : "associatedperson",
                                  "element" : "name",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "RelatedPerson",
                                  "contextType" : "variable",
                                  "element" : "name",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "repOrg",
              "source" : [
                {
                  "context" : "participant",
                  "element" : "associatedEntity",
                  "variable" : "associetedentity",
                  "condition" : "(classCode = 'GUAR')"
                }
              ],
              "rule" : [
                {
                  "name" : "associetedEntity",
                  "source" : [
                    {
                      "context" : "associetedentity",
                      "element" : "scopingOrganization",
                      "variable" : "representedOrganization"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e37"
                    },
                    {
                      "context" : "e37",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "PUT"
                        }
                      ]
                    },
                    {
                      "context" : "e37",
                      "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/participant/scopingOrganization"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "associetedentity",
                          "element" : "code",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "organization",
                          "contextType" : "variable",
                          "element" : "type",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "scopingOrganization",
                      "source" : [
                        {
                          "context" : "associetedentity",
                          "element" : "scopingOrganization",
                          "variable" : "scopingOrganization"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "associetedentity",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "identifier"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "time",
                              "source" : [
                                {
                                  "context" : "participant",
                                  "element" : "time",
                                  "variable" : "time"
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "period",
                                  "source" : [
                                    {
                                      "context" : "time",
                                      "element" : "high",
                                      "variable" : "high"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "period",
                                      "variable" : "period"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "periodend",
                                      "source" : [
                                        {
                                          "context" : "high"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "period",
                                          "contextType" : "variable",
                                          "element" : "end",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "high.value"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "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" : "associetedentity"
                                    }
                                  ],
                                  "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid1",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e37",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid1"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "patientResource",
                                      "contextType" : "variable",
                                      "element" : "generalPractitioner",
                                      "variable" : "referenceOrg",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "referenceOrg",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid1"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "OrgPartOf",
                          "source" : [
                            {
                              "context" : "scopingOrganization",
                              "element" : "asOrganizationPartOf",
                              "variable" : "OrgPartOf"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e38"
                            },
                            {
                              "context" : "e38",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e38",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "organizationPOF",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Organization"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "OrgPartOf"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organizationPOF",
                                  "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/participant/scopingOrganization/asOrganizationPartOf"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organizationPOF",
                                  "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" : "extension",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organizationPOF",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid2",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e38",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Organization/"
                                            },
                                            {
                                              "valueId" : "uuid2"
                                            }
                                          ]
                                        },
                                        {
                                          "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/' + %organizationPOF.id"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organizationPOF",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "statusCode",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "statusCode",
                                  "variable" : "status",
                                  "condition" : "(value = 'active')"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organizationPOF",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "boolean"
                                    }
                                  ]
                                },
                                {
                                  "context" : "organizationPOF",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "true"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "wholeOrgan",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "wholeOrganization",
                                  "variable" : "wholeOrgan"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e39"
                                },
                                {
                                  "context" : "e39",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e39",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "organizationW",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organizationW",
                                      "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/participant/scopingOrganization/asOrganizationPartOf/wholeOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organizationW",
                                      "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" : "extension",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organizationW",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid3",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e39",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid3"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "organizationPOF",
                                              "contextType" : "variable",
                                              "element" : "partOf",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Organization/' + %organizationW.id"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organizationW",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organizationW",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "wholeOrgan",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organizationW",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "documentation" : "START PARTICIPANT GUAR"
            }
          ]
        },
        {
          "name" : "inFulfillmentOf",
          "source" : [
            {
              "context" : "src",
              "element" : "inFulfillmentOf",
              "variable" : "inFulfillmentOf"
            }
          ],
          "rule" : [
            {
              "name" : "order",
              "source" : [
                {
                  "context" : "inFulfillmentOf",
                  "element" : "order",
                  "variable" : "order"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e40"
                },
                {
                  "context" : "e40",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e40",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "serviceRequest",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "ServiceRequest"
                    }
                  ]
                },
                {
                  "context" : "serviceRequest",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e40",
                  "contextType" : "variable",
                  "element" : "fullUrl",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "https://example/ServiceRequest/"
                    },
                    {
                      "valueId" : "uuid1"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "url",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "ServiceRequest"
                    }
                  ]
                },
                {
                  "context" : "encounter",
                  "contextType" : "variable",
                  "element" : "basedOn",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/ServiceRequest/' + %serviceRequest.id"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "id",
                  "source" : [
                    {
                      "context" : "order",
                      "element" : "id",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "serviceRequest",
                      "contextType" : "variable",
                      "element" : "identifier",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ]
                },
                {
                  "name" : "status",
                  "source" : [
                    {
                      "context" : "order"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "serviceRequest",
                      "contextType" : "variable",
                      "element" : "status",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "active"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "intent",
                  "source" : [
                    {
                      "context" : "order"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "serviceRequest",
                      "contextType" : "variable",
                      "element" : "intent",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "order"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "reference",
                  "source" : [
                    {
                      "context" : "order"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "serviceRequest",
                      "contextType" : "variable",
                      "element" : "subject",
                      "variable" : "reference",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Reference"
                        }
                      ]
                    },
                    {
                      "context" : "reference",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "'https://example/Patient/' + %patientResource.id"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "reference",
                  "source" : [
                    {
                      "context" : "order"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "serviceRequest",
                      "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" : "order",
                      "element" : "code",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "serviceRequest",
                      "contextType" : "variable",
                      "element" : "code",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ]
                },
                {
                  "name" : "priorityCode",
                  "source" : [
                    {
                      "context" : "order",
                      "element" : "priorityCode",
                      "variable" : "priorityCode"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "priority",
                      "source" : [
                        {
                          "context" : "priorityCode",
                          "element" : "code",
                          "variable" : "v"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "serviceRequest",
                          "contextType" : "variable",
                          "element" : "priority",
                          "transform" : "translate",
                          "parameter" : [
                            {
                              "valueId" : "v"
                            },
                            {
                              "valueString" : "#priority"
                            },
                            {
                              "valueString" : "code"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "documentationOf",
          "source" : [
            {
              "context" : "src",
              "element" : "documentationOf",
              "variable" : "docOf"
            }
          ],
          "rule" : [
            {
              "name" : "serviceEvent",
              "source" : [
                {
                  "context" : "docOf",
                  "element" : "serviceEvent",
                  "variable" : "serviceEvent"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "event",
                  "variable" : "event"
                }
              ],
              "rule" : [
                {
                  "name" : "eventCode",
                  "source" : [
                    {
                      "context" : "serviceEvent",
                      "element" : "code",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "event",
                      "contextType" : "variable",
                      "element" : "code",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ]
                },
                {
                  "name" : "eventDT",
                  "source" : [
                    {
                      "context" : "serviceEvent",
                      "element" : "effectiveTime",
                      "variable" : "effectiveTime"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "period",
                      "source" : [
                        {
                          "context" : "effectiveTime"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "event",
                          "contextType" : "variable",
                          "element" : "period",
                          "variable" : "period",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Period"
                            }
                          ]
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "IVLTSPeriod",
                          "variable" : [
                            "effectiveTime",
                            "period"
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "efft",
                  "source" : [
                    {
                      "context" : "serviceEvent",
                      "element" : "effectiveTime",
                      "variable" : "effectivetime1"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "event",
                      "contextType" : "variable",
                      "element" : "period",
                      "variable" : "period",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Period"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "val",
                      "source" : [
                        {
                          "context" : "effectivetime1"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "period",
                          "contextType" : "variable",
                          "element" : "start",
                          "variable" : "start",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "dateTime"
                            }
                          ]
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "TSDateTime",
                          "variable" : [
                            "effectivetime1",
                            "start"
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "docOf",
                  "source" : [
                    {
                      "context" : "serviceEvent",
                      "element" : "performer",
                      "variable" : "performer"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e41"
                    },
                    {
                      "context" : "e41",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "POST"
                        }
                      ]
                    },
                    {
                      "context" : "e41",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "practitionerRole",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "PractitionerRole"
                        }
                      ]
                    },
                    {
                      "context" : "practitionerRole",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid1",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e41",
                      "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" : "performer",
                      "source" : [
                        {
                          "context" : "performer"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "event",
                          "contextType" : "variable",
                          "element" : "detail",
                          "variable" : "reference",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        },
                        {
                          "context" : "reference",
                          "contextType" : "variable",
                          "element" : "reference",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "AssignedEntity",
                          "source" : [
                            {
                              "context" : "performer",
                              "element" : "assignedEntity",
                              "variable" : "assignedEntity"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "bundle",
                              "contextType" : "variable",
                              "element" : "entry",
                              "variable" : "e42"
                            },
                            {
                              "context" : "e42",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e42",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "practitioner",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Practitioner"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "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/documentationOf/serviceEvent/performer"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "functionCode",
                              "source" : [
                                {
                                  "context" : "performer",
                                  "element" : "functionCode",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitionerRole",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "assignedEntity",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitionerRole",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "identifier",
                                      "contextType" : "variable",
                                      "element" : "value",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "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" : "extension",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "practitioner",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid2",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e42",
                                          "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" : "assignedEntity",
                                  "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" : "assignedEntity",
                                  "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" : "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" : "birthTimelegal",
                                      "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" : "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/documentationOf/serviceEvent/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" : "extension",
                                          "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" : "asOrganizationPartOf",
                                  "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/documentationOf/serviceEvent/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" : "extension",
                                              "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/documentationOf/serviceEvent/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" : "extension",
                                                  "source" : [
                                                    {
                                                      "context" : "id",
                                                      "element" : "extension",
                                                      "variable" : "ext"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "organization2",
                                                      "contextType" : "variable",
                                                      "element" : "id",
                                                      "variable" : "uuid5",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "r + '-' + ext"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "e10",
                                                      "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"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "encounterExist",
          "source" : [
            {
              "context" : "src",
              "condition" : "src.componentOf.exists().not()"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "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"
                }
              ]
            }
          ],
          "dependent" : [
            {
              "name" : "ClinicalDocumentEncounter",
              "variable" : [
                "src",
                "bundle",
                "encounter",
                "patientResource"
              ]
            }
          ]
        },
        {
          "name" : "encompassingEncounter",
          "source" : [
            {
              "context" : "src",
              "element" : "componentOf",
              "variable" : "comp"
            }
          ],
          "rule" : [
            {
              "name" : "enc",
              "source" : [
                {
                  "context" : "comp",
                  "condition" : "comp.encompassingEncounter.exists().not()"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "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"
                    }
                  ]
                }
              ],
              "dependent" : [
                {
                  "name" : "ClinicalDocumentEncounter",
                  "variable" : [
                    "srcEnc",
                    "bundle",
                    "encounter",
                    "patientResource"
                  ]
                }
              ]
            },
            {
              "name" : "encompassingEncounter",
              "source" : [
                {
                  "context" : "comp",
                  "element" : "encompassingEncounter",
                  "variable" : "srcEnc"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "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"
                    }
                  ]
                }
              ],
              "dependent" : [
                {
                  "name" : "ClinicalDocumentEncounter",
                  "variable" : [
                    "srcEnc",
                    "bundle",
                    "encounter",
                    "patientResource"
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "ClinicalDocumentRelatesTo",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "parentDocument",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "composition",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "id",
          "source" : [
            {
              "context" : "src",
              "element" : "id",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "identifier",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "code",
          "source" : [
            {
              "context" : "src",
              "element" : "code",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "type",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "setId",
          "source" : [
            {
              "context" : "src",
              "element" : "setId",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "identifier",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "versionNumberEXT",
          "source" : [
            {
              "context" : "src",
              "element" : "versionNumber",
              "variable" : "vNumber"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "extension",
              "variable" : "ext"
            }
          ],
          "dependent" : [
            {
              "name" : "ChExtEprVersionNumber",
              "variable" : [
                "vNumber",
                "ext"
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "EXTbirthplace",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "AD",
          "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-birthPlace"
                }
              ]
            }
          ]
        },
        {
          "name" : "value",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "ext",
              "contextType" : "variable",
              "element" : "value",
              "variable" : "value",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "Address"
                }
              ]
            }
          ],
          "dependent" : [
            {
              "name" : "ADAddress",
              "variable" : [
                "src",
                "value"
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "ClinicalDocumentPatientRole",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "PatientRole",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "Patient",
          "mode" : "target"
        },
        {
          "name" : "bundle",
          "type" : "Bundle",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "addr",
          "source" : [
            {
              "context" : "src",
              "element" : "addr",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "address",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "telecom",
          "source" : [
            {
              "context" : "src",
              "element" : "telecom",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "telecom",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "patient",
          "source" : [
            {
              "context" : "src",
              "element" : "patient",
              "variable" : "patient"
            }
          ],
          "rule" : [
            {
              "name" : "name",
              "source" : [
                {
                  "context" : "patient",
                  "element" : "name",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "name",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "gender",
              "source" : [
                {
                  "context" : "patient",
                  "element" : "administrativeGenderCode",
                  "variable" : "gender"
                }
              ],
              "rule" : [
                {
                  "name" : "gender",
                  "source" : [
                    {
                      "context" : "gender",
                      "element" : "code",
                      "variable" : "v"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "gender",
                      "transform" : "translate",
                      "parameter" : [
                        {
                          "valueId" : "v"
                        },
                        {
                          "valueString" : "#cm-v3-administrative-gender"
                        },
                        {
                          "valueString" : "code"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "birth",
              "source" : [
                {
                  "context" : "patient",
                  "element" : "birthTime",
                  "variable" : "birthTime"
                }
              ],
              "rule" : [
                {
                  "name" : "birthTimelegal",
                  "source" : [
                    {
                      "context" : "birthTime",
                      "element" : "value",
                      "variable" : "date"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "birthDate",
                      "transform" : "truncate",
                      "parameter" : [
                        {
                          "valueId" : "date"
                        },
                        {
                          "valueInteger" : 10
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "deceasedBL",
              "source" : [
                {
                  "context" : "patient",
                  "element" : "deceasedInd",
                  "variable" : "deceased",
                  "condition" : "(value = 'false')"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "deceased",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "boolean"
                    }
                  ]
                },
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "deceased",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueBoolean" : false
                    }
                  ]
                }
              ]
            },
            {
              "name" : "deceasedInd",
              "source" : [
                {
                  "context" : "patient",
                  "element" : "deceasedInd",
                  "variable" : "deceased",
                  "condition" : "(value = 'true')"
                }
              ],
              "rule" : [
                {
                  "name" : "deceasedTime",
                  "source" : [
                    {
                      "context" : "patient",
                      "element" : "deceasedTime",
                      "variable" : "Time"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "deceased",
                      "variable" : "deceasedTime",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "dateTime"
                        }
                      ]
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "TSDateTime",
                      "variable" : [
                        "Time",
                        "deceasedTime"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "deceasedBL",
              "source" : [
                {
                  "context" : "patient",
                  "element" : "deceasedTime",
                  "variable" : "Timet",
                  "condition" : "Timet.empty()"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "deceased",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "boolean"
                    }
                  ]
                },
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "deceased",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueBoolean" : true
                    }
                  ]
                }
              ]
            },
            {
              "name" : "maritalStatus",
              "source" : [
                {
                  "context" : "patient",
                  "element" : "maritalStatusCode",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "maritalStatus",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ]
            },
            {
              "name" : "guardian",
              "source" : [
                {
                  "context" : "patient",
                  "element" : "guardian",
                  "variable" : "guardian"
                }
              ],
              "rule" : [
                {
                  "name" : "guardianPerson",
                  "source" : [
                    {
                      "context" : "guardian",
                      "element" : "guardianPerson",
                      "variable" : "person"
                    }
                  ],
                  "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" : "relatedPerson",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "RelatedPerson"
                        }
                      ]
                    },
                    {
                      "context" : "relatedPerson",
                      "contextType" : "variable",
                      "element" : "id",
                      "variable" : "uuid1",
                      "transform" : "uuid"
                    },
                    {
                      "context" : "e",
                      "contextType" : "variable",
                      "element" : "fullUrl",
                      "transform" : "append",
                      "parameter" : [
                        {
                          "valueString" : "https://example/RelatedPerson/"
                        },
                        {
                          "valueId" : "uuid1"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "url",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "RelatedPerson"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "name",
                      "source" : [
                        {
                          "context" : "person",
                          "element" : "name",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "relatedPerson",
                          "contextType" : "variable",
                          "element" : "name",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "birth",
                      "source" : [
                        {
                          "context" : "person",
                          "element" : "birthTime",
                          "variable" : "birthTime"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "birthTimelegal",
                          "source" : [
                            {
                              "context" : "birthTime",
                              "element" : "value",
                              "variable" : "date"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "relatedPerson",
                              "contextType" : "variable",
                              "element" : "birthDate",
                              "transform" : "truncate",
                              "parameter" : [
                                {
                                  "valueId" : "date"
                                },
                                {
                                  "valueInteger" : 10
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "reference",
                      "source" : [
                        {
                          "context" : "person"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "relatedPerson",
                          "contextType" : "variable",
                          "element" : "patient",
                          "variable" : "reference",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Reference"
                            }
                          ]
                        },
                        {
                          "context" : "reference",
                          "contextType" : "variable",
                          "element" : "reference",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "'https://example/Patient/' + %tgt.id"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "person",
                      "source" : [
                        {
                          "context" : "person"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "link",
                          "variable" : "link"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "type",
                          "source" : [
                            {
                              "context" : "person"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "link",
                              "contextType" : "variable",
                              "element" : "type",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "refer"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "reference",
                          "source" : [
                            {
                              "context" : "person"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "link",
                              "contextType" : "variable",
                              "element" : "other",
                              "variable" : "reference",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Reference"
                                }
                              ]
                            },
                            {
                              "context" : "reference",
                              "contextType" : "variable",
                              "element" : "reference",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "'https://example/RelatedPerson/' + %relatedPerson.id"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "guardian",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "relatedPerson",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "guardian",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "relatedPerson",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "id",
                          "source" : [
                            {
                              "context" : "guardian",
                              "element" : "id",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "relatedPerson",
                              "contextType" : "variable",
                              "element" : "identifier",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "guardian",
                              "element" : "code",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "relatedPerson",
                              "contextType" : "variable",
                              "element" : "relationship",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "guardianorganization",
                  "source" : [
                    {
                      "context" : "guardian",
                      "element" : "guardianOrganization",
                      "variable" : "guardianorg"
                    }
                  ],
                  "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" : "PUT"
                        }
                      ]
                    },
                    {
                      "context" : "e1",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "organizationcontact",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Organization"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "meta",
                      "source" : [
                        {
                          "context" : "guardianorg"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "organizationcontact",
                          "contextType" : "variable",
                          "element" : "meta",
                          "variable" : "meta"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "coding",
                          "source" : [
                            {
                              "context" : "guardianorg"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "meta",
                              "contextType" : "variable",
                              "element" : "tag",
                              "variable" : "coding",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Coding"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "system",
                              "source" : [
                                {
                                  "context" : "guardianorg"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "http://algoritmodiscoring"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "guardianorg"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "ClinicalDocument/recordTarget/PatientRole/patient/guardian/guardianOrganization"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "contact",
                      "source" : [
                        {
                          "context" : "guardianorg"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "contact",
                          "variable" : "contact"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "OrganizationContact",
                          "source" : [
                            {
                              "context" : "guardianorg"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "contact",
                              "contextType" : "variable",
                              "element" : "organization",
                              "variable" : "reference",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Reference"
                                }
                              ]
                            },
                            {
                              "context" : "reference",
                              "contextType" : "variable",
                              "element" : "reference",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "'https://example/Organization/' + %organizationcontact.id"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "guardianorg",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organizationcontact",
                              "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" : "guardianorg"
                                    }
                                  ],
                                  "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organizationcontact",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid2",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e1",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid2"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "guardianorg",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organizationcontact",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "guardianorg",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organizationcontact",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "guardianorg",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organizationcontact",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "OrganizationPartOf",
                          "source" : [
                            {
                              "context" : "guardianorg",
                              "element" : "asOrganizationPartOf",
                              "variable" : "OrgPartOf"
                            }
                          ],
                          "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" : "organizationpartOf",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Organization"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "meta",
                              "source" : [
                                {
                                  "context" : "OrgPartOf"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organizationpartOf",
                                  "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/recordTarget/PatientRole/patient/guardian/guardianOrganization/asOrganizationPartOf"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "asorganization",
                              "source" : [
                                {
                                  "context" : "OrgPartOf"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organizationcontact",
                                  "contextType" : "variable",
                                  "element" : "partOf",
                                  "variable" : "reference",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Reference"
                                    }
                                  ]
                                },
                                {
                                  "context" : "reference",
                                  "contextType" : "variable",
                                  "element" : "reference",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "'https://example/Organization/' + %organizationpartOf.id"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organizationpartOf",
                                  "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" : "extension",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organizationpartOf",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid3",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e2",
                                          "contextType" : "variable",
                                          "element" : "fullUrl",
                                          "transform" : "append",
                                          "parameter" : [
                                            {
                                              "valueString" : "https://example/Organization/"
                                            },
                                            {
                                              "valueId" : "uuid3"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "code",
                                  "variable" : "vvv"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organizationpartOf",
                                  "contextType" : "variable",
                                  "element" : "type",
                                  "variable" : "vvv",
                                  "transform" : "create"
                                }
                              ]
                            },
                            {
                              "name" : "statusCode",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "statusCode",
                                  "variable" : "status",
                                  "condition" : "(value = 'active')"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organizationpartOf",
                                  "contextType" : "variable",
                                  "element" : "active",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "true"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "WholeOrganization",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "wholeOrganization",
                                  "variable" : "wholeORG"
                                }
                              ],
                              "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" : "WholeOrganization",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "wholeORG"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "WholeOrganization",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "wholeORG"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "wholeORG"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "wholeORG"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/recordTarget/PatientRole/patient/guardian/guardianOrganization/asOrganizationPartOf/wholeOrganization"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "asOrganization",
                                  "source" : [
                                    {
                                      "context" : "wholeORG"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organizationpartOf",
                                      "contextType" : "variable",
                                      "element" : "partOf",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Organization/' + %WholeOrganization.id"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "wholeORG",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "WholeOrganization",
                                      "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" : "wholeORG"
                                            }
                                          ],
                                          "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" : "extension",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "WholeOrganization",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid4",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e3",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid4"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "name",
                                  "source" : [
                                    {
                                      "context" : "wholeORG",
                                      "element" : "name",
                                      "variable" : "v"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "WholeOrganization",
                                      "contextType" : "variable",
                                      "element" : "name",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "v.other"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "telecom",
                                  "source" : [
                                    {
                                      "context" : "wholeORG",
                                      "element" : "telecom",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "WholeOrganization",
                                      "contextType" : "variable",
                                      "element" : "telecom",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "addr",
                                  "source" : [
                                    {
                                      "context" : "wholeORG",
                                      "element" : "addr",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "WholeOrganization",
                                      "contextType" : "variable",
                                      "element" : "address",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "birthplace",
              "source" : [
                {
                  "context" : "patient",
                  "element" : "birthplace",
                  "variable" : "birthplace"
                }
              ],
              "rule" : [
                {
                  "name" : "place",
                  "source" : [
                    {
                      "context" : "birthplace",
                      "element" : "place",
                      "variable" : "place"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "birthplace",
                      "source" : [
                        {
                          "context" : "place",
                          "element" : "addr",
                          "variable" : "address"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "extension",
                          "variable" : "ext1"
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "EXTbirthplace",
                          "variable" : [
                            "address",
                            "ext1"
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "organization",
              "source" : [
                {
                  "context" : "src",
                  "element" : "providerOrganization",
                  "variable" : "org"
                }
              ],
              "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" : "providerorganization",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Organization"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "meta",
                  "source" : [
                    {
                      "context" : "org"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "providerorganization",
                      "contextType" : "variable",
                      "element" : "meta",
                      "variable" : "meta"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "coding",
                      "source" : [
                        {
                          "context" : "org"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "meta",
                          "contextType" : "variable",
                          "element" : "tag",
                          "variable" : "coding",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Coding"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "system",
                          "source" : [
                            {
                              "context" : "org"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "system",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "http://algoritmodiscoring"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "org"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "code",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "ClinicalDocument/recordTarget/PatientRole/patient/providerOrganization"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "identifier",
                  "source" : [
                    {
                      "context" : "org",
                      "element" : "id",
                      "variable" : "id"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "providerorganization",
                      "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" : "org"
                            }
                          ],
                          "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" : "reference",
                          "source" : [
                            {
                              "context" : "id",
                              "element" : "extension",
                              "variable" : "ext"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "providerorganization",
                              "contextType" : "variable",
                              "element" : "id",
                              "variable" : "uuid5",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "r + '-' + ext"
                                }
                              ]
                            },
                            {
                              "context" : "e4",
                              "contextType" : "variable",
                              "element" : "fullUrl",
                              "transform" : "append",
                              "parameter" : [
                                {
                                  "valueString" : "https://example/Organization/"
                                },
                                {
                                  "valueId" : "uuid5"
                                }
                              ]
                            },
                            {
                              "context" : "tgt",
                              "contextType" : "variable",
                              "element" : "managingOrganization",
                              "variable" : "reference",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Reference"
                                }
                              ]
                            },
                            {
                              "context" : "reference",
                              "contextType" : "variable",
                              "element" : "reference",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "'https://example/Organization/' + %providerorganization.id"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "name",
                  "source" : [
                    {
                      "context" : "org",
                      "element" : "name",
                      "variable" : "v"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "providerorganization",
                      "contextType" : "variable",
                      "element" : "name",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "v.other"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "telecom",
                  "source" : [
                    {
                      "context" : "org",
                      "element" : "telecom",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "providerorganization",
                      "contextType" : "variable",
                      "element" : "telecom",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ]
                },
                {
                  "name" : "addr",
                  "source" : [
                    {
                      "context" : "org",
                      "element" : "addr",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "providerorganization",
                      "contextType" : "variable",
                      "element" : "address",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ]
                },
                {
                  "name" : "OrganizationPartOfprovider",
                  "source" : [
                    {
                      "context" : "org",
                      "element" : "asOrganizationPartOf",
                      "variable" : "OrgPartOfProvider"
                    }
                  ],
                  "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" : "organizationpartOfprovider",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Organization"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "meta",
                      "source" : [
                        {
                          "context" : "OrgPartOfProvider"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "organizationpartOfprovider",
                          "contextType" : "variable",
                          "element" : "meta",
                          "variable" : "meta"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "coding",
                          "source" : [
                            {
                              "context" : "OrgPartOfProvider"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "meta",
                              "contextType" : "variable",
                              "element" : "tag",
                              "variable" : "coding",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Coding"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "system",
                              "source" : [
                                {
                                  "context" : "OrgPartOfProvider"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "http://algoritmodiscoring"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "OrgPartOfProvider"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "ClinicalDocument/recordTarget/PatientRole/patient/providerOrganization/asOrganizationPartOf"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "identifier",
                      "source" : [
                        {
                          "context" : "OrgPartOfProvider",
                          "element" : "id",
                          "variable" : "id"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "organizationpartOfprovider",
                          "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" : "OrgPartOfProvider"
                                }
                              ],
                              "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" : "asorganization",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organizationpartOfprovider",
                                  "contextType" : "variable",
                                  "element" : "id",
                                  "variable" : "uuid6",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "r + '-' + ext"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e5",
                                  "contextType" : "variable",
                                  "element" : "fullUrl",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "https://example/Organization/"
                                    },
                                    {
                                      "valueId" : "uuid6"
                                    }
                                  ]
                                },
                                {
                                  "context" : "providerorganization",
                                  "contextType" : "variable",
                                  "element" : "partOf",
                                  "variable" : "reference",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Reference"
                                    }
                                  ]
                                },
                                {
                                  "context" : "reference",
                                  "contextType" : "variable",
                                  "element" : "reference",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "'https://example/Organization/' + %organizationpartOfprovider.id"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "OrgPartOfProvider",
                          "element" : "code",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "organizationpartOfprovider",
                          "contextType" : "variable",
                          "element" : "type",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "statusCode",
                      "source" : [
                        {
                          "context" : "OrgPartOfProvider",
                          "element" : "statusCode",
                          "variable" : "status",
                          "condition" : "(value = 'active')"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "organizationpartOfprovider",
                          "contextType" : "variable",
                          "element" : "active",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "true"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "wholeOrganizationprovider",
                      "source" : [
                        {
                          "context" : "OrgPartOfProvider",
                          "element" : "wholeOrganization",
                          "variable" : "wholeORGproveder"
                        }
                      ],
                      "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" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e6",
                          "contextType" : "variable",
                          "element" : "resource",
                          "variable" : "WholeOrganizationprovider",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Organization"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "wholeORGproveder"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "WholeOrganizationprovider",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "wholeORGproveder"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "wholeORGproveder"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "wholeORGproveder"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/recordTarget/PatientRole/patient/providerOrganization/asOrganizationPartOf/wholeOrganization"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "asOrganization",
                          "source" : [
                            {
                              "context" : "wholeORGproveder"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organizationpartOfprovider",
                              "contextType" : "variable",
                              "element" : "partOf",
                              "variable" : "reference",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Reference"
                                }
                              ]
                            },
                            {
                              "context" : "reference",
                              "contextType" : "variable",
                              "element" : "reference",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "'https://example/Organization/' + %WholeOrganizationprovider.id"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "wholeORGproveder",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "WholeOrganizationprovider",
                              "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" : "wholeORGproveder"
                                    }
                                  ],
                                  "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "WholeOrganizationprovider",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid7",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e6",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid7"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "wholeORGproveder",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "WholeOrganizationprovider",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "wholeORGproveder",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "WholeOrganizationprovider",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "wholeORGproveder",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "WholeOrganizationprovider",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "CustodianOrganization",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "CustodianOrganization",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "Organization",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "name",
          "source" : [
            {
              "context" : "src",
              "element" : "name",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "name",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.other"
                }
              ]
            }
          ]
        },
        {
          "name" : "telecom",
          "source" : [
            {
              "context" : "src",
              "element" : "telecom",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "telecom",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "addr",
          "source" : [
            {
              "context" : "src",
              "element" : "addr",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "address",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        }
      ]
    },
    {
      "name" : "ClinicalDocumentEncounter",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "EncompassingEncounter",
          "mode" : "source"
        },
        {
          "name" : "bundle",
          "type" : "Bundle",
          "mode" : "target"
        },
        {
          "name" : "encounter",
          "type" : "Encounter",
          "mode" : "target"
        },
        {
          "name" : "patient",
          "type" : "Patient",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "id",
          "source" : [
            {
              "context" : "src",
              "element" : "id",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "encounter",
              "contextType" : "variable",
              "element" : "identifier",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "class",
          "source" : [
            {
              "context" : "src",
              "element" : "code",
              "variable" : "code1"
            }
          ],
          "target" : [
            {
              "context" : "encounter",
              "contextType" : "variable",
              "element" : "class",
              "variable" : "coding",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "Coding"
                }
              ]
            }
          ],
          "rule" : [
            {
              "name" : "code",
              "source" : [
                {
                  "context" : "code1",
                  "element" : "code",
                  "variable" : "code"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "code",
                  "transform" : "cast",
                  "parameter" : [
                    {
                      "valueId" : "code"
                    },
                    {
                      "valueString" : "string"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "codeSystem",
              "source" : [
                {
                  "context" : "code1",
                  "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" : "code1",
                  "element" : "displayName",
                  "variable" : "display"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "display",
                  "transform" : "cast",
                  "parameter" : [
                    {
                      "valueId" : "display"
                    },
                    {
                      "valueString" : "string"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "NonCodeclass",
          "source" : [
            {
              "context" : "src",
              "condition" : "src.code.exists().not()"
            }
          ],
          "target" : [
            {
              "context" : "encounter",
              "contextType" : "variable",
              "element" : "class",
              "variable" : "coding",
              "transform" : "create",
              "parameter" : [
                {
                  "valueString" : "Coding"
                }
              ]
            }
          ],
          "rule" : [
            {
              "name" : "code",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "code",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "AMB"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "codeS",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "system",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "http://terminology.hl7.org/CodeSystem/v3-ActCode"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "display",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "coding",
                  "contextType" : "variable",
                  "element" : "display",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "ambulatory"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "reference",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "encounter",
              "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" : "status",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "encounter",
              "contextType" : "variable",
              "element" : "status",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "finished"
                }
              ]
            }
          ]
        },
        {
          "name" : "where",
          "source" : [
            {
              "context" : "src",
              "condition" : "effectiveTime.low.exists() or effectiveTime.high.exists()"
            }
          ],
          "rule" : [
            {
              "name" : "effectiveTime",
              "source" : [
                {
                  "context" : "src",
                  "element" : "effectiveTime",
                  "variable" : "eff"
                }
              ],
              "target" : [
                {
                  "context" : "encounter",
                  "contextType" : "variable",
                  "element" : "period",
                  "variable" : "period",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Period"
                    }
                  ]
                }
              ],
              "dependent" : [
                {
                  "name" : "IVLTSPeriod",
                  "variable" : [
                    "eff",
                    "period"
                  ]
                }
              ]
            }
          ],
          "documentation" : "effectiveTime=period"
        },
        {
          "name" : "where",
          "source" : [
            {
              "context" : "src",
              "condition" : "effectiveTime.low.exists().not() or effectiveTime.high.exists().not()"
            }
          ],
          "rule" : [
            {
              "name" : "efft",
              "source" : [
                {
                  "context" : "src",
                  "element" : "effectiveTime",
                  "variable" : "effectivetime1"
                }
              ],
              "target" : [
                {
                  "context" : "encounter",
                  "contextType" : "variable",
                  "element" : "period",
                  "variable" : "period",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Period"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "val",
                  "source" : [
                    {
                      "context" : "effectivetime1"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "period",
                      "contextType" : "variable",
                      "element" : "start",
                      "variable" : "start",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "dateTime"
                        }
                      ]
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "TSDateTime",
                      "variable" : [
                        "effectivetime1",
                        "start"
                      ]
                    }
                  ]
                }
              ]
            }
          ],
          "documentation" : "effectiveTime = time-stamp"
        },
        {
          "name" : "discharge",
          "source" : [
            {
              "context" : "src",
              "element" : "dischargeDispositionCode",
              "variable" : "dischargeDispositionCode"
            }
          ],
          "rule" : [
            {
              "name" : "disposition",
              "source" : [
                {
                  "context" : "dischargeDispositionCode"
                }
              ],
              "target" : [
                {
                  "context" : "encounter",
                  "contextType" : "variable",
                  "element" : "hospitalization",
                  "variable" : "hospitalization"
                }
              ],
              "rule" : [
                {
                  "name" : "disDisp",
                  "source" : [
                    {
                      "context" : "dischargeDispositionCode"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "hospitalization",
                      "contextType" : "variable",
                      "element" : "dischargeDisposition"
                    }
                  ]
                }
              ]
            }
          ],
          "documentation" : "src.effectiveTime as effectivetime1 -> encounter.period as period, period.start=(effectivetime1.value);"
        },
        {
          "name" : "particpant",
          "source" : [
            {
              "context" : "src",
              "element" : "responsibleParty",
              "variable" : "responsibleParty"
            }
          ],
          "target" : [
            {
              "context" : "encounter",
              "contextType" : "variable",
              "element" : "participant",
              "variable" : "participant"
            }
          ],
          "rule" : [
            {
              "name" : "entity",
              "source" : [
                {
                  "context" : "responsibleParty",
                  "element" : "assignedEntity",
                  "variable" : "entity"
                }
              ],
              "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" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e",
                  "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" : "participant",
                  "contextType" : "variable",
                  "element" : "individual",
                  "variable" : "reference",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "reference",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "'https://example/PractitionerRole/' + %practitionerRole.id"
                    }
                  ]
                }
              ],
              "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" : "e1"
                    },
                    {
                      "context" : "e1",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "PUT"
                        }
                      ]
                    },
                    {
                      "context" : "e1",
                      "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/componentOf/EncompassingEncounter/responsibleParty"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "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" : "extension",
                          "source" : [
                            {
                              "context" : "id",
                              "element" : "extension",
                              "variable" : "ext"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "identifier",
                              "contextType" : "variable",
                              "element" : "value",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "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" : "extension",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "id",
                                  "variable" : "uuid2",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "r + '-' + ext"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e1",
                                  "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" : "birthTimeENC",
                              "source" : [
                                {
                                  "context" : "birthTime",
                                  "element" : "value",
                                  "variable" : "date"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "birthDate",
                                  "transform" : "truncate",
                                  "parameter" : [
                                    {
                                      "valueId" : "date"
                                    },
                                    {
                                      "valueInteger" : 10
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "organization",
                  "source" : [
                    {
                      "context" : "entity",
                      "element" : "representedOrganization",
                      "variable" : "raporg"
                    }
                  ],
                  "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" : "rapresentedorganization",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Organization"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "meta",
                      "source" : [
                        {
                          "context" : "raporg"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "rapresentedorganization",
                          "contextType" : "variable",
                          "element" : "meta",
                          "variable" : "meta"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "coding",
                          "source" : [
                            {
                              "context" : "raporg"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "meta",
                              "contextType" : "variable",
                              "element" : "tag",
                              "variable" : "coding",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Coding"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "system",
                              "source" : [
                                {
                                  "context" : "raporg"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "http://algoritmodiscoring"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "raporg"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "ClinicalDocument/componentOf/EncompassingEncounter/responsibleParty/representedOrganization"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "identifier",
                      "source" : [
                        {
                          "context" : "raporg",
                          "element" : "id",
                          "variable" : "id"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "rapresentedorganization",
                          "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" : "raporg"
                                }
                              ],
                              "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" : "extension",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "rapresentedorganization",
                                  "contextType" : "variable",
                                  "element" : "id",
                                  "variable" : "uuid3",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "r + '-' + ext"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e2",
                                  "contextType" : "variable",
                                  "element" : "fullUrl",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "https://example/Organization/"
                                    },
                                    {
                                      "valueId" : "uuid3"
                                    }
                                  ]
                                },
                                {
                                  "context" : "practitionerRole",
                                  "contextType" : "variable",
                                  "element" : "organization",
                                  "variable" : "reference",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Reference"
                                    }
                                  ]
                                },
                                {
                                  "context" : "reference",
                                  "contextType" : "variable",
                                  "element" : "reference",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "'https://example/Organization/' + %rapresentedorganization.id"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "documentation" : "raporg.id -> rapresentedorganization.identifier;"
                    },
                    {
                      "name" : "name",
                      "source" : [
                        {
                          "context" : "raporg",
                          "element" : "name",
                          "variable" : "v"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "rapresentedorganization",
                          "contextType" : "variable",
                          "element" : "name",
                          "transform" : "evaluate",
                          "parameter" : [
                            {
                              "valueString" : "v.other"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "telecom",
                      "source" : [
                        {
                          "context" : "raporg",
                          "element" : "telecom",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "rapresentedorganization",
                          "contextType" : "variable",
                          "element" : "telecom",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "addr",
                      "source" : [
                        {
                          "context" : "raporg",
                          "element" : "addr",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "rapresentedorganization",
                          "contextType" : "variable",
                          "element" : "address",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "OrgPartOf",
                      "source" : [
                        {
                          "context" : "raporg",
                          "element" : "asOrganizationPartOf",
                          "variable" : "OrgPartOf"
                        }
                      ],
                      "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" : "organization1",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Organization"
                            }
                          ]
                        },
                        {
                          "context" : "organization1",
                          "contextType" : "variable",
                          "element" : "id",
                          "variable" : "uuid4",
                          "transform" : "uuid"
                        },
                        {
                          "context" : "e3",
                          "contextType" : "variable",
                          "element" : "fullUrl",
                          "transform" : "append",
                          "parameter" : [
                            {
                              "valueString" : "https://example/Organization/"
                            },
                            {
                              "valueId" : "uuid4"
                            }
                          ]
                        },
                        {
                          "context" : "rapresentedorganization",
                          "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"
                            }
                          ]
                        }
                      ],
                      "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/componentOf/EncompassingEncounter/responsibleParty/representedOrganization/asOrganizationPartOf"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ],
                          "documentation" : "OrgPartOf.id -> organization1.identifier;"
                        },
                        {
                          "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization1",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid4",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e3",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid4"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "rapresentedorganization",
                                      "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" : [
                                {
                                  "valueBoolean" : true
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "wholeOrgan",
                          "source" : [
                            {
                              "context" : "OrgPartOf",
                              "element" : "wholeOrganization",
                              "variable" : "wholeOrgan"
                            }
                          ],
                          "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" : "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/componentOf/EncompassingEncounter/responsibleParty/representedOrganization/asOrganizationPartOf/wholeOrganization"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ],
                              "documentation" : "wholeOrgan.id -> organization2.identifier;"
                            },
                            {
                              "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" : "extension",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization2",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid5",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e4",
                                          "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"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "encounterParticipant",
          "source" : [
            {
              "context" : "src",
              "element" : "encounterParticipant",
              "variable" : "participant"
            }
          ],
          "rule" : [
            {
              "name" : "Participant",
              "source" : [
                {
                  "context" : "participant",
                  "element" : "assignedEntity",
                  "variable" : "assignedEntity"
                }
              ],
              "target" : [
                {
                  "context" : "bundle",
                  "contextType" : "variable",
                  "element" : "entry",
                  "variable" : "e313"
                },
                {
                  "context" : "e313",
                  "contextType" : "variable",
                  "element" : "request",
                  "variable" : "request",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                },
                {
                  "context" : "request",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "POST"
                    }
                  ]
                },
                {
                  "context" : "e313",
                  "contextType" : "variable",
                  "element" : "resource",
                  "variable" : "practitionerRole",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PractitionerRole"
                    }
                  ]
                },
                {
                  "context" : "practitionerRole",
                  "contextType" : "variable",
                  "element" : "id",
                  "variable" : "uuid1",
                  "transform" : "uuid"
                },
                {
                  "context" : "e313",
                  "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" : "encounter",
                  "contextType" : "variable",
                  "element" : "participant",
                  "variable" : "participant1",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "BackboneElement"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "period",
                  "source" : [
                    {
                      "context" : "participant"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "participant1",
                      "contextType" : "variable",
                      "element" : "period",
                      "variable" : "period",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Period"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "time",
                      "source" : [
                        {
                          "context" : "participant",
                          "element" : "time",
                          "variable" : "time"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "period",
                          "contextType" : "variable",
                          "element" : "start",
                          "variable" : "start",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "dateTime"
                            }
                          ]
                        }
                      ],
                      "dependent" : [
                        {
                          "name" : "TSDateTime",
                          "variable" : [
                            "time",
                            "start"
                          ]
                        }
                      ]
                    }
                  ],
                  "documentation" : "participant.time as time->participant1.period as period ,period.start=(time.value);"
                },
                {
                  "name" : "type",
                  "source" : [
                    {
                      "context" : "participant",
                      "variable" : "p"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "participant1",
                      "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" : "par",
                  "source" : [
                    {
                      "context" : "participant"
                    }
                  ],
                  "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" : "functionCode",
                  "source" : [
                    {
                      "context" : "participant",
                      "element" : "functionCode",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "practitionerRole",
                      "contextType" : "variable",
                      "element" : "code",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ]
                },
                {
                  "name" : "assignedEntity",
                  "source" : [
                    {
                      "context" : "assignedEntity"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "bundle",
                      "contextType" : "variable",
                      "element" : "entry",
                      "variable" : "e33"
                    },
                    {
                      "context" : "e33",
                      "contextType" : "variable",
                      "element" : "request",
                      "variable" : "request",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "BackboneElement"
                        }
                      ]
                    },
                    {
                      "context" : "request",
                      "contextType" : "variable",
                      "element" : "method",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "PUT"
                        }
                      ]
                    },
                    {
                      "context" : "e33",
                      "contextType" : "variable",
                      "element" : "resource",
                      "variable" : "practitioner",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Practitioner"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "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/encounterParticipant"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "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" : "extension",
                          "source" : [
                            {
                              "context" : "id",
                              "element" : "extension",
                              "variable" : "ext"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "identifier",
                              "contextType" : "variable",
                              "element" : "value",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "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" : "extension",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "practitioner",
                                  "contextType" : "variable",
                                  "element" : "id",
                                  "variable" : "uuid2",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "r + '-' + ext"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e33",
                                  "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" : "assignedEntity",
                          "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" : "assignedEntity",
                          "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" : "assignedEntity",
                          "element" : "code",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "practitionerRole",
                          "contextType" : "variable",
                          "element" : "code",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "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" : "associatedPerson",
                          "variable" : "assignedPerson"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "assignedPerson",
                              "element" : "name",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "practitioner",
                              "contextType" : "variable",
                              "element" : "name",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "birth",
                          "source" : [
                            {
                              "context" : "assignedPerson",
                              "element" : "birthTime",
                              "variable" : "birthTime"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "birthTimelegal",
                              "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" : "e34"
                        },
                        {
                          "context" : "e34",
                          "contextType" : "variable",
                          "element" : "request",
                          "variable" : "request",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "BackboneElement"
                            }
                          ]
                        },
                        {
                          "context" : "request",
                          "contextType" : "variable",
                          "element" : "method",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "PUT"
                            }
                          ]
                        },
                        {
                          "context" : "e34",
                          "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/encounterParticipant/scopingOrganization"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "organization",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid3",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e34",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid3"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "practitionerRole",
                                      "contextType" : "variable",
                                      "element" : "organization",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Organization/' + %organization.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "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" : "e35"
                            },
                            {
                              "context" : "e35",
                              "contextType" : "variable",
                              "element" : "request",
                              "variable" : "request",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "BackboneElement"
                                }
                              ]
                            },
                            {
                              "context" : "request",
                              "contextType" : "variable",
                              "element" : "method",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "PUT"
                                }
                              ]
                            },
                            {
                              "context" : "e35",
                              "contextType" : "variable",
                              "element" : "resource",
                              "variable" : "organization1",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Organization"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "identifier",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "id",
                                  "variable" : "id"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization1",
                                  "contextType" : "variable",
                                  "element" : "identifier",
                                  "variable" : "identifier"
                                }
                              ],
                              "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/encounterParticipant/scopingOrganization/asOrganizationPartOf"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "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" : "extension",
                                      "source" : [
                                        {
                                          "context" : "id",
                                          "element" : "extension",
                                          "variable" : "ext"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "organization1",
                                          "contextType" : "variable",
                                          "element" : "id",
                                          "variable" : "uuid4",
                                          "transform" : "evaluate",
                                          "parameter" : [
                                            {
                                              "valueString" : "r + '-' + ext"
                                            }
                                          ]
                                        },
                                        {
                                          "context" : "e35",
                                          "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" : [
                                    {
                                      "valueBoolean" : true
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "wholeOrgan",
                              "source" : [
                                {
                                  "context" : "OrgPartOf",
                                  "element" : "wholeOrganization",
                                  "variable" : "wholeOrgan"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "bundle",
                                  "contextType" : "variable",
                                  "element" : "entry",
                                  "variable" : "e36"
                                },
                                {
                                  "context" : "e36",
                                  "contextType" : "variable",
                                  "element" : "request",
                                  "variable" : "request",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "BackboneElement"
                                    }
                                  ]
                                },
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "method",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e36",
                                  "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/encounterParticipant/scopingOrganization/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" : "extension",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "organization1",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid5",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e36",
                                              "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"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "location",
          "source" : [
            {
              "context" : "src",
              "element" : "location",
              "variable" : "Location"
            }
          ],
          "rule" : [
            {
              "name" : "location1",
              "source" : [
                {
                  "context" : "Location",
                  "element" : "healthCareFacility",
                  "variable" : "HCF"
                }
              ],
              "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" : "loc",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Location"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "meta",
                  "source" : [
                    {
                      "context" : "HCF"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "loc",
                      "contextType" : "variable",
                      "element" : "meta",
                      "variable" : "meta"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "coding",
                      "source" : [
                        {
                          "context" : "HCF"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "meta",
                          "contextType" : "variable",
                          "element" : "tag",
                          "variable" : "coding",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Coding"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "system",
                          "source" : [
                            {
                              "context" : "HCF"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "system",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "http://algoritmodiscoring"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "HCF"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "code",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "hcf",
                  "source" : [
                    {
                      "context" : "HCF"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "encounter",
                      "contextType" : "variable",
                      "element" : "location",
                      "variable" : "locations"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "identifier",
                      "source" : [
                        {
                          "context" : "HCF",
                          "element" : "id",
                          "variable" : "id"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "loc",
                          "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" : "HCF"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "request",
                                  "contextType" : "variable",
                                  "element" : "url",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "Location?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" : "locc",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "loc",
                                  "contextType" : "variable",
                                  "element" : "id",
                                  "variable" : "uuid6",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "r + '-' + ext"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e5",
                                  "contextType" : "variable",
                                  "element" : "fullUrl",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "https://example/Location/"
                                    },
                                    {
                                      "valueId" : "uuid6"
                                    }
                                  ]
                                },
                                {
                                  "context" : "locations",
                                  "contextType" : "variable",
                                  "element" : "location",
                                  "variable" : "reference",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Reference"
                                    }
                                  ]
                                },
                                {
                                  "context" : "reference",
                                  "contextType" : "variable",
                                  "element" : "reference",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "'https://example/Location/' + %loc.id"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "code",
                      "source" : [
                        {
                          "context" : "HCF",
                          "element" : "code",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "loc",
                          "contextType" : "variable",
                          "element" : "type",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "location2",
                      "source" : [
                        {
                          "context" : "HCF",
                          "element" : "location",
                          "variable" : "srcLocation"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "srcLocation",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "loc",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "srcLocation",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "loc",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "SPO",
                      "source" : [
                        {
                          "context" : "HCF",
                          "element" : "serviceProviderOrganization",
                          "variable" : "servProvOrg"
                        }
                      ],
                      "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" : "serviceProviderOrganization",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Organization"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "meta",
                          "source" : [
                            {
                              "context" : "servProvOrg"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "serviceProviderOrganization",
                              "contextType" : "variable",
                              "element" : "meta",
                              "variable" : "meta"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "coding",
                              "source" : [
                                {
                                  "context" : "servProvOrg"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "meta",
                                  "contextType" : "variable",
                                  "element" : "tag",
                                  "variable" : "coding",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Coding"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "system",
                                  "source" : [
                                    {
                                      "context" : "servProvOrg"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "system",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "http://algoritmodiscoring"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "servProvOrg"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "coding",
                                      "contextType" : "variable",
                                      "element" : "code",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility/serviceProviderOrganization"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "identifier",
                          "source" : [
                            {
                              "context" : "servProvOrg",
                              "element" : "id",
                              "variable" : "id"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "serviceProviderOrganization",
                              "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" : "servProvOrg"
                                    }
                                  ],
                                  "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" : "extension",
                                  "source" : [
                                    {
                                      "context" : "id",
                                      "element" : "extension",
                                      "variable" : "ext"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "serviceProviderOrganization",
                                      "contextType" : "variable",
                                      "element" : "id",
                                      "variable" : "uuid",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "r + '-' + ext"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "e",
                                      "contextType" : "variable",
                                      "element" : "fullUrl",
                                      "transform" : "append",
                                      "parameter" : [
                                        {
                                          "valueString" : "https://example/Organization/"
                                        },
                                        {
                                          "valueId" : "uuid"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "loc",
                                      "contextType" : "variable",
                                      "element" : "managingOrganization",
                                      "variable" : "reference",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "Reference"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "reference",
                                      "contextType" : "variable",
                                      "element" : "reference",
                                      "transform" : "evaluate",
                                      "parameter" : [
                                        {
                                          "valueString" : "'https://example/Organization/' + %serviceProviderOrganization.id"
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "name",
                          "source" : [
                            {
                              "context" : "servProvOrg",
                              "element" : "name",
                              "variable" : "v"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "serviceProviderOrganization",
                              "contextType" : "variable",
                              "element" : "name",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "v.other"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "telecom",
                          "source" : [
                            {
                              "context" : "servProvOrg",
                              "element" : "telecom",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "serviceProviderOrganization",
                              "contextType" : "variable",
                              "element" : "telecom",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "addr",
                          "source" : [
                            {
                              "context" : "servProvOrg",
                              "element" : "addr",
                              "variable" : "vvv"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "serviceProviderOrganization",
                              "contextType" : "variable",
                              "element" : "address",
                              "variable" : "vvv",
                              "transform" : "create"
                            }
                          ]
                        },
                        {
                          "name" : "asOrg1",
                          "source" : [
                            {
                              "context" : "servProvOrg",
                              "element" : "asOrganizationPartOf",
                              "variable" : "asOrgPartOf"
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "OrganizationPartOfprovider",
                              "source" : [
                                {
                                  "context" : "asOrgPartOf",
                                  "variable" : "asOrgPartOf1"
                                }
                              ],
                              "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" : "PUT"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e1",
                                  "contextType" : "variable",
                                  "element" : "resource",
                                  "variable" : "asorganization",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Organization"
                                    }
                                  ]
                                }
                              ],
                              "rule" : [
                                {
                                  "name" : "meta",
                                  "source" : [
                                    {
                                      "context" : "asOrgPartOf1"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "asorganization",
                                      "contextType" : "variable",
                                      "element" : "meta",
                                      "variable" : "meta"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "coding",
                                      "source" : [
                                        {
                                          "context" : "asOrgPartOf1"
                                        }
                                      ],
                                      "target" : [
                                        {
                                          "context" : "meta",
                                          "contextType" : "variable",
                                          "element" : "tag",
                                          "variable" : "coding",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Coding"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "system",
                                          "source" : [
                                            {
                                              "context" : "asOrgPartOf1"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "system",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "http://algoritmodiscoring"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "code",
                                          "source" : [
                                            {
                                              "context" : "asOrgPartOf1"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "coding",
                                              "contextType" : "variable",
                                              "element" : "code",
                                              "transform" : "copy",
                                              "parameter" : [
                                                {
                                                  "valueString" : "ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "identifier",
                                  "source" : [
                                    {
                                      "context" : "asOrgPartOf1",
                                      "element" : "id",
                                      "variable" : "id"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "asorganization",
                                      "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" : "asOrgPartOf1"
                                            }
                                          ],
                                          "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" : "extension",
                                          "source" : [
                                            {
                                              "context" : "id",
                                              "element" : "extension",
                                              "variable" : "ext"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "asorganization",
                                              "contextType" : "variable",
                                              "element" : "id",
                                              "variable" : "uuid1",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "r + '-' + ext"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "e1",
                                              "contextType" : "variable",
                                              "element" : "fullUrl",
                                              "transform" : "append",
                                              "parameter" : [
                                                {
                                                  "valueString" : "https://example/Organization/"
                                                },
                                                {
                                                  "valueId" : "uuid1"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "serviceProviderOrganization",
                                              "contextType" : "variable",
                                              "element" : "partOf",
                                              "variable" : "reference",
                                              "transform" : "create",
                                              "parameter" : [
                                                {
                                                  "valueString" : "Reference"
                                                }
                                              ]
                                            },
                                            {
                                              "context" : "reference",
                                              "contextType" : "variable",
                                              "element" : "reference",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "'https://example/Organization/' + %asorganization.id"
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "code",
                                  "source" : [
                                    {
                                      "context" : "asOrgPartOf1",
                                      "element" : "code",
                                      "variable" : "vvv"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "asorganization",
                                      "contextType" : "variable",
                                      "element" : "type",
                                      "variable" : "vvv",
                                      "transform" : "create"
                                    }
                                  ]
                                },
                                {
                                  "name" : "statusCode",
                                  "source" : [
                                    {
                                      "context" : "asOrgPartOf1",
                                      "element" : "statusCode",
                                      "variable" : "status",
                                      "condition" : "(code = 'active')"
                                    }
                                  ],
                                  "target" : [
                                    {
                                      "context" : "asorganization",
                                      "contextType" : "variable",
                                      "element" : "active",
                                      "transform" : "create",
                                      "parameter" : [
                                        {
                                          "valueString" : "boolean"
                                        }
                                      ]
                                    },
                                    {
                                      "context" : "asorganization",
                                      "contextType" : "variable",
                                      "element" : "active",
                                      "transform" : "copy",
                                      "parameter" : [
                                        {
                                          "valueString" : "true"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "name" : "wholeOrg",
                                  "source" : [
                                    {
                                      "context" : "asOrgPartOf1",
                                      "element" : "wholeOrganization",
                                      "variable" : "wholeOrg"
                                    }
                                  ],
                                  "rule" : [
                                    {
                                      "name" : "wholeOrg1",
                                      "source" : [
                                        {
                                          "context" : "wholeOrg",
                                          "variable" : "wholeOrg1"
                                        }
                                      ],
                                      "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" : "wholeorganization",
                                          "transform" : "create",
                                          "parameter" : [
                                            {
                                              "valueString" : "Organization"
                                            }
                                          ]
                                        }
                                      ],
                                      "rule" : [
                                        {
                                          "name" : "meta",
                                          "source" : [
                                            {
                                              "context" : "wholeOrg1"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "wholeorganization",
                                              "contextType" : "variable",
                                              "element" : "meta",
                                              "variable" : "meta"
                                            }
                                          ],
                                          "rule" : [
                                            {
                                              "name" : "coding",
                                              "source" : [
                                                {
                                                  "context" : "wholeOrg1"
                                                }
                                              ],
                                              "target" : [
                                                {
                                                  "context" : "meta",
                                                  "contextType" : "variable",
                                                  "element" : "tag",
                                                  "variable" : "coding",
                                                  "transform" : "create",
                                                  "parameter" : [
                                                    {
                                                      "valueString" : "Coding"
                                                    }
                                                  ]
                                                }
                                              ],
                                              "rule" : [
                                                {
                                                  "name" : "system",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrg1"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "coding",
                                                      "contextType" : "variable",
                                                      "element" : "system",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "http://algoritmodiscoring"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "name" : "code",
                                                  "source" : [
                                                    {
                                                      "context" : "wholeOrg1"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "coding",
                                                      "contextType" : "variable",
                                                      "element" : "code",
                                                      "transform" : "copy",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "identifier",
                                          "source" : [
                                            {
                                              "context" : "wholeOrg1",
                                              "element" : "id",
                                              "variable" : "id"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "asorganization",
                                              "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" : "wholeOrg1"
                                                    }
                                                  ],
                                                  "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" : "extension",
                                                  "source" : [
                                                    {
                                                      "context" : "id",
                                                      "element" : "extension",
                                                      "variable" : "ext"
                                                    }
                                                  ],
                                                  "target" : [
                                                    {
                                                      "context" : "wholeorganization",
                                                      "contextType" : "variable",
                                                      "element" : "id",
                                                      "variable" : "uuid2",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "r + '-' + ext"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "e2",
                                                      "contextType" : "variable",
                                                      "element" : "fullUrl",
                                                      "transform" : "append",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "https://example/Organization/"
                                                        },
                                                        {
                                                          "valueId" : "uuid2"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "asorganization",
                                                      "contextType" : "variable",
                                                      "element" : "partOf",
                                                      "variable" : "reference",
                                                      "transform" : "create",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "Reference"
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "context" : "reference",
                                                      "contextType" : "variable",
                                                      "element" : "reference",
                                                      "transform" : "evaluate",
                                                      "parameter" : [
                                                        {
                                                          "valueString" : "'https://example/Organization/' + %wholeorganization.id"
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "name",
                                          "source" : [
                                            {
                                              "context" : "wholeOrg1",
                                              "element" : "name",
                                              "variable" : "v"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "wholeorganization",
                                              "contextType" : "variable",
                                              "element" : "name",
                                              "transform" : "evaluate",
                                              "parameter" : [
                                                {
                                                  "valueString" : "v.other"
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "telecom",
                                          "source" : [
                                            {
                                              "context" : "wholeOrg1",
                                              "element" : "telecom",
                                              "variable" : "vvv"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "wholeorganization",
                                              "contextType" : "variable",
                                              "element" : "telecom",
                                              "variable" : "vvv",
                                              "transform" : "create"
                                            }
                                          ]
                                        },
                                        {
                                          "name" : "addr",
                                          "source" : [
                                            {
                                              "context" : "wholeOrg1",
                                              "element" : "addr",
                                              "variable" : "vvv"
                                            }
                                          ],
                                          "target" : [
                                            {
                                              "context" : "wholeorganization",
                                              "contextType" : "variable",
                                              "element" : "address",
                                              "variable" : "vvv",
                                              "transform" : "create"
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "ClinicalDocumentationOf",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "representedOrganization",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "organization",
          "mode" : "target"
        },
        {
          "name" : "bundle",
          "type" : "Bundle",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "name",
          "source" : [
            {
              "context" : "src",
              "element" : "name",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "name",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "telecom",
          "source" : [
            {
              "context" : "src",
              "element" : "telecom",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "telecom",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "addr",
          "source" : [
            {
              "context" : "src",
              "element" : "addr",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "address",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "creation",
          "source" : [
            {
              "context" : "src",
              "element" : "asOrganizationPartOf",
              "variable" : "asOrganizationPartOf"
            }
          ],
          "rule" : [
            {
              "name" : "organizationPartOf",
              "source" : [
                {
                  "context" : "asOrganizationPartOf"
                }
              ],
              "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" : "organization2",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Organization"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "meta",
                  "source" : [
                    {
                      "context" : "asOrganizationPartOf"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "organization2",
                      "contextType" : "variable",
                      "element" : "meta",
                      "variable" : "meta"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "coding",
                      "source" : [
                        {
                          "context" : "asOrganizationPartOf"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "meta",
                          "contextType" : "variable",
                          "element" : "tag",
                          "variable" : "coding",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Coding"
                            }
                          ]
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "system",
                          "source" : [
                            {
                              "context" : "asOrganizationPartOf"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "system",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "http://algoritmodiscoring"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name" : "code",
                          "source" : [
                            {
                              "context" : "asOrganizationPartOf"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "coding",
                              "contextType" : "variable",
                              "element" : "code",
                              "transform" : "copy",
                              "parameter" : [
                                {
                                  "valueString" : "ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization/asOrganizationPartOf"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "identifier",
                  "source" : [
                    {
                      "context" : "asOrganizationPartOf",
                      "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" : "asOrganizationPartOf"
                            }
                          ],
                          "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" : "extension",
                          "source" : [
                            {
                              "context" : "id",
                              "element" : "extension",
                              "variable" : "ext"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "organization2",
                              "contextType" : "variable",
                              "element" : "id",
                              "variable" : "uuid",
                              "transform" : "evaluate",
                              "parameter" : [
                                {
                                  "valueString" : "r + '-' + ext"
                                }
                              ]
                            },
                            {
                              "context" : "e",
                              "contextType" : "variable",
                              "element" : "fullUrl",
                              "transform" : "append",
                              "parameter" : [
                                {
                                  "valueString" : "https://example/Organization/"
                                },
                                {
                                  "valueId" : "uuid"
                                }
                              ]
                            },
                            {
                              "context" : "tgt",
                              "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" : "code",
                  "source" : [
                    {
                      "context" : "asOrganizationPartOf",
                      "element" : "code",
                      "variable" : "vvv"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "organization2",
                      "contextType" : "variable",
                      "element" : "type",
                      "variable" : "vvv",
                      "transform" : "create"
                    }
                  ]
                },
                {
                  "name" : "statusCode",
                  "source" : [
                    {
                      "context" : "asOrganizationPartOf",
                      "element" : "statusCode",
                      "condition" : "(value = 'active')"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "organization2",
                      "contextType" : "variable",
                      "element" : "active",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueString" : "true"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "wholeOrganization",
                  "source" : [
                    {
                      "context" : "asOrganizationPartOf",
                      "element" : "wholeOrganization",
                      "variable" : "wholeOrganization"
                    }
                  ],
                  "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" : "organization3",
                      "transform" : "create",
                      "parameter" : [
                        {
                          "valueString" : "Organization"
                        }
                      ]
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "meta",
                      "source" : [
                        {
                          "context" : "wholeOrganization"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "organization3",
                          "contextType" : "variable",
                          "element" : "meta",
                          "variable" : "meta"
                        }
                      ],
                      "rule" : [
                        {
                          "name" : "coding",
                          "source" : [
                            {
                              "context" : "wholeOrganization"
                            }
                          ],
                          "target" : [
                            {
                              "context" : "meta",
                              "contextType" : "variable",
                              "element" : "tag",
                              "variable" : "coding",
                              "transform" : "create",
                              "parameter" : [
                                {
                                  "valueString" : "Coding"
                                }
                              ]
                            }
                          ],
                          "rule" : [
                            {
                              "name" : "system",
                              "source" : [
                                {
                                  "context" : "wholeOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "system",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "http://algoritmodiscoring"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "name" : "code",
                              "source" : [
                                {
                                  "context" : "wholeOrganization"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "coding",
                                  "contextType" : "variable",
                                  "element" : "code",
                                  "transform" : "copy",
                                  "parameter" : [
                                    {
                                      "valueString" : "ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization/asOrganizationPartOf"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "identifier",
                      "source" : [
                        {
                          "context" : "wholeOrganization",
                          "element" : "id",
                          "variable" : "id"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "organization3",
                          "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" : "wholeOrganization"
                                }
                              ],
                              "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" : "extension",
                              "source" : [
                                {
                                  "context" : "id",
                                  "element" : "extension",
                                  "variable" : "ext"
                                }
                              ],
                              "target" : [
                                {
                                  "context" : "organization3",
                                  "contextType" : "variable",
                                  "element" : "id",
                                  "variable" : "uuid1",
                                  "transform" : "evaluate",
                                  "parameter" : [
                                    {
                                      "valueString" : "r + '-' + ext"
                                    }
                                  ]
                                },
                                {
                                  "context" : "e",
                                  "contextType" : "variable",
                                  "element" : "fullUrl",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "https://example/Organization/"
                                    },
                                    {
                                      "valueId" : "uuid1"
                                    }
                                  ]
                                },
                                {
                                  "context" : "organization2",
                                  "contextType" : "variable",
                                  "element" : "partOf",
                                  "variable" : "referenceOrg",
                                  "transform" : "create",
                                  "parameter" : [
                                    {
                                      "valueString" : "Reference"
                                    }
                                  ]
                                },
                                {
                                  "context" : "referenceOrg",
                                  "contextType" : "variable",
                                  "element" : "reference",
                                  "transform" : "append",
                                  "parameter" : [
                                    {
                                      "valueString" : "https://example/Organization/"
                                    },
                                    {
                                      "valueId" : "uuid1"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name" : "id",
                      "source" : [
                        {
                          "context" : "wholeOrganization",
                          "element" : "id",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "organization3",
                          "contextType" : "variable",
                          "element" : "identifier",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "name",
                      "source" : [
                        {
                          "context" : "wholeOrganization",
                          "element" : "name",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "organization3",
                          "contextType" : "variable",
                          "element" : "name",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "telecom",
                      "source" : [
                        {
                          "context" : "wholeOrganization",
                          "element" : "telecom",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "organization3",
                          "contextType" : "variable",
                          "element" : "telecom",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    },
                    {
                      "name" : "addr",
                      "source" : [
                        {
                          "context" : "wholeOrganization",
                          "element" : "addr",
                          "variable" : "vvv"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "organization3",
                          "contextType" : "variable",
                          "element" : "address",
                          "variable" : "vvv",
                          "transform" : "create"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "ChExtEprVersionNumber",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "INT",
          "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/composition-clinicaldocument-versionNumber"
                }
              ]
            }
          ]
        },
        {
          "name" : "value",
          "source" : [
            {
              "context" : "src",
              "element" : "value",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "ext",
              "contextType" : "variable",
              "element" : "value",
              "transform" : "cast",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "string"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "ClinicalDocumentOrganization",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "CustodianOrganization",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "Organization",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "id",
          "source" : [
            {
              "context" : "src",
              "element" : "id",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "identifier",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "name",
          "source" : [
            {
              "context" : "src",
              "element" : "name",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "name",
              "transform" : "evaluate",
              "parameter" : [
                {
                  "valueString" : "v.other"
                }
              ]
            }
          ]
        },
        {
          "name" : "telecom",
          "source" : [
            {
              "context" : "src",
              "element" : "telecom",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "telecom",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        },
        {
          "name" : "addr",
          "source" : [
            {
              "context" : "src",
              "element" : "addr",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "contextType" : "variable",
              "element" : "address",
              "variable" : "vvv",
              "transform" : "create"
            }
          ]
        }
      ]
    }
  ]
}