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 - XML Representation

Draft as of 2024-09-15

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="cda2fhirHeader"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
         <pre>map &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader&quot; = &quot;cda2fhirHeader&quot;

uses &quot;http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument&quot; alias ClinicalDocument as source
uses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor&quot; alias AssignedAuthor as queried
uses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity&quot; alias AssignedEntity as queried
uses &quot;http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity&quot; alias AssociatedEntity as queried
uses &quot;http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization&quot; alias CustodianOrganization as queried
uses &quot;http://hl7.org/fhir/cda/StructureDefinition/Section&quot; alias Section as queried
uses &quot;http://hl7.org/fhir/cda/StructureDefinition/PatientRole&quot; alias PatientRole as queried
uses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; alias Bundle as target
uses &quot;http://hl7.org/fhir/StructureDefinition/Composition&quot; alias Composition as produced
uses &quot;http://hl7.org/fhir/StructureDefinition/Patient&quot; alias Patient as produced
uses &quot;http://hl7.org/fhir/StructureDefinition/Encounter&quot; alias Encounter as produced
uses &quot;http://hl7.org/fhir/StructureDefinition/Person&quot; alias Patient as produced
uses &quot;http://hl7.org/fhir/StructureDefinition/Practitioner&quot; alias Practitioner as produced
uses &quot;http://hl7.org/fhir/StructureDefinition/Specimen&quot; alias Specimen as produced
uses &quot;http://hl7.org/fhir/StructureDefinition/Organization&quot; alias Organization as produced
uses &quot;http://hl7.org/fhir/cda/StructureDefinition/HealthCareFacility&quot; alias HealthCareFacility as queried

imports &quot;http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes&quot;

group CdaToBundle(source cda : ClinicalDocument, target bundle : Bundle) {
  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 {
    cda then ClinicalDocumentToBundle(cda, patient, composition, encounter, bundle, DocumentReference) &quot;cdatobundle&quot;;
    cda.recordTarget as recordTarget then {
      recordTarget.patientRole as patient then {
        patient.id as id -&gt; patient.identifier as identifier then {
          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
          id.extension as ext -&gt; identifier.value = ext &quot;value&quot;;
          // r -&gt; requestPAT.url = append('Patient?identifier=',ext) &quot;UUID&quot;;
          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
        } &quot;record&quot;;
      } &quot;recPat&quot;;
    } &quot;patient&quot;;
  } &quot;ClinicalDocumentToBody&quot;;
}

group ClinicalDocumentToBundle(source cda : ClinicalDocument, target patient : Patient, target composition : Composition, target encounter : Encounter, target bundle : Bundle, target DocumentReference : DocumentReference) {
  cda -&gt; bundle.id = uuid() &quot;id&quot;;
  cda.id -&gt; bundle.identifier &quot;identifier&quot;;
  cda -&gt; bundle.type = 'transaction' &quot;type&quot;;
  cda -&gt; bundle.timestamp = (timestamp.now()) &quot;date&quot;;
  cda then ClinicalDocumentComposition(cda, composition, patient, encounter, bundle, DocumentReference) &quot;composition&quot;;
}

group ClinicalDocumentComposition(source src : ClinicalDocument, target tgt : Composition, target patientResource : Patient, target encounter : Encounter, target bundle : Bundle, target DocumentReference : DocumentReference) {
  src.languageCode -&gt; tgt.language;
  src -&gt; DocumentReference.status = 'current' &quot;status&quot;;
  src -&gt; DocumentReference.content = create('BackboneElement') as content then {
    src -&gt;  content.attachment = create('Attachment') as attachment,  attachment.title = 'string' &quot;comp&quot;;
  } &quot;content&quot;;
  src -&gt; DocumentReference.context = create('BackboneElement') as context then {
    src -&gt;  context.related = create('Reference') as referenceComp,  referenceComp.reference = ('https://example/Composition/' + %tgt.id) &quot;comp&quot;;
  } &quot;context&quot;;
  src.id where src.setId.exists().not() -&gt; tgt.identifier &quot;identifier&quot;;
  src.setId -&gt; tgt.identifier &quot;identifier&quot;;
  src -&gt; tgt.status = 'final' &quot;status&quot;;
  src.code -&gt; tgt.type;
  src.title as t -&gt; tgt.title = (t.dataString);
  src where src.title.exists().not() then {
    src.code as code then {
      code.displayName as display -&gt; tgt.title = cast(display, 'string');
    } &quot;display&quot;;
  } &quot;title&quot;;
  src.effectiveTime as effectiveTime -&gt; tgt.date = create('dateTime') as value then TSDateTime(effectiveTime, value);
  src.versionNumber as versionNumber where (value &gt; 1) -&gt; tgt.extension as ext2 then ChExtEprVersionNumber(versionNumber, ext2);
  src.confidentialityCode -&gt; tgt.confidentiality;
  src.recordTarget as recordTarget then {
    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;;
    recordTarget.patientRole as patient -&gt;  DocumentReference.subject = create('Reference') as reference1,  reference1.reference = ('https://example/Patient/' + %patientResource.id);
  } &quot;patientRole&quot;;
  // START AUTHOR
  src.author as srcAuthor then {
    srcAuthor.time as time -&gt; tgt.date;
    srcAuthor.assignedAuthor as assignedAuthor then {
      // Codice Fiscale
      assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.6.3.2') then {
        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 {
          // assignedAuthor.code as codice -&gt; practitionerRole.code as code2 then CECodeableConcept(codice,code2);
          assignedAuthor -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'PUT',  e2.resource = create('Practitioner') as practitioner then {
            srcAuthor.functionCode -&gt; practitionerRole.code;
            assignedAuthor -&gt; practitioner.meta as meta then {
              assignedAuthor -&gt; meta.tag = create('Coding') as coding then {
                assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                assignedAuthor -&gt; coding.code = 'ClinicalDocument/author' &quot;code&quot;;
              } &quot;coding&quot;;
            } &quot;meta&quot;;
            assignedAuthor.code -&gt; practitionerRole.code;
            assignedAuthor.id as id -&gt; practitioner.identifier as identifier then {
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext;
              // then {
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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;;
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
              id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
            } &quot;2&quot;;
            assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
              id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
            } &quot;diverso&quot;;
            assignedAuthor.addr -&gt; practitioner.address;
            assignedAuthor.telecom -&gt; practitioner.telecom;
            assignedAuthor.assignedPerson as person then {
              person.name -&gt; practitioner.name;
              person.birthTime as birthTime then {
                birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);
              } &quot;birth&quot;;
            } &quot;name&quot;;
            assignedAuthor -&gt;  DocumentReference.author = create('Reference') as referenceAuth,  referenceAuth.reference = ('https://example/Practitioner/' + %practitioner.id) &quot;refAuth&quot;;
          } &quot;ASSAUth&quot;;
          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 {
            representedOrganization.id as id -&gt; organization.identifier as identifier then {
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext then {
                representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
              } &quot;ext&quot;;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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;;
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            representedOrganization -&gt; organization.meta as meta then {
              representedOrganization -&gt; meta.tag = create('Coding') as coding then {
                representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                representedOrganization -&gt; coding.code = 'ClinicalDocument/author/representedOrganization' &quot;code&quot;;
              } &quot;coding&quot;;
            } &quot;meta&quot;;
            representedOrganization.name as v -&gt; organization.name = (v.other);
            representedOrganization.telecom -&gt; organization.telecom;
            representedOrganization.addr -&gt; organization.address;
            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 {
              OrgPartOf -&gt; organization1.meta as meta then {
                OrgPartOf -&gt; meta.tag = create('Coding') as coding then {
                  OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  OrgPartOf -&gt; coding.code = 'ClinicalDocument/author/representedOrganization/asOrganizationPartOf' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              OrgPartOf.id as id -&gt; organization1.identifier as identifier then {
                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                id.extension as ext -&gt; identifier.value = ext then {
                  OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                } &quot;ext&quot;;
                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                id.root as r then {
                  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;;
                } &quot;r&quot;;
              } &quot;identifier&quot;;
              OrgPartOf.code -&gt; organization1.type;
              OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';
              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 {
                wholeOrgan -&gt; organization2.meta as meta then {
                  wholeOrgan -&gt; meta.tag = create('Coding') as coding then {
                    wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                    wholeOrgan -&gt; coding.code = 'ClinicalDocument/author/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
                  } &quot;coding&quot;;
                } &quot;meta&quot;;
                wholeOrgan.id as id -&gt; organization2.identifier as identifier then {
                  id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                  id.extension as ext -&gt; identifier.value = ext then {
                    wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                  } &quot;ext&quot;;
                  id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                  id.root as r then {
                    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;;
                  } &quot;r&quot;;
                } &quot;identifier&quot;;
                wholeOrgan.name as v -&gt; organization2.name = (v.other);
                wholeOrgan.telecom -&gt; organization2.telecom;
                wholeOrgan.addr -&gt; organization2.address;
              };
            } &quot;OrgPartOf&quot;;
          };
        } &quot;ParcatitionerROL&quot;;
      } &quot;OIDCF&quot;;
      // Partita IVA
      assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.6.3.2') then {
        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 {
          assignedAuthor -&gt;  bundle.entry as e251,  e251.request = create('BackboneElement') as request,  request.method = 'PUT',  e251.resource = create('Organization') as organization then {
            assignedAuthor -&gt; organization.meta as meta then {
              assignedAuthor -&gt; meta.tag = create('Coding') as coding then {
                assignedAuthor -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                assignedAuthor -&gt; coding.code = 'ClinicalDocument/AuthorPartitaIVA' &quot;code&quot;;
              } &quot;coding&quot;;
            } &quot;meta&quot;;
            assignedAuthor.id as id -&gt; organization.identifier as identifier then {
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext then {
                assignedAuthor -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
              } &quot;ext&quot;;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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);
              } &quot;r&quot;;
            } &quot;identifier&quot;;
          } &quot;OrgPartitaIVA&quot;;
        } &quot;Device&quot;;
      } &quot;oidPartitaIVA&quot;;
      // ID nullFlavor
      assignedAuthor.id as id where nullFlavor.exists() then {
        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 {
          // assignedAuthoringDevice.templateId -&gt; device.identifier;
          assignedAuthoringDevice.code -&gt; device.type;
          assignedAuthoringDevice.manufacturerModelName as manufacturerModelName then {
            manufacturerModelName as m -&gt; device.manufacturer = (m.displayName) &quot;displayRule&quot;;
          } &quot;manufacturer&quot;;
          assignedAuthoringDevice.softwareName as softwareName -&gt; device.deviceName as deviceName then {
            softwareName -&gt; deviceName.type = 'other' &quot;typeName&quot;;
            softwareName as s -&gt; deviceName.name = (s.displayName) &quot;name&quot;;
          } &quot;deviceName&quot;;
        } &quot;Device&quot;;
      } &quot;NullFlavor&quot;;
    };
    // START DATA ENTER
    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 {
      dataEnt.time as time -&gt; tgt.date;
      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 {
        assignedEntity -&gt; practitioner.meta as meta then {
          assignedEntity -&gt; meta.tag = create('Coding') as coding then {
            assignedEntity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
            assignedEntity -&gt; coding.code = 'ClinicalDocument/dataEnterer' &quot;code&quot;;
          } &quot;coding&quot;;
        } &quot;meta&quot;;
        assignedEntity.code as codice -&gt; practitionerRole.code as code2 then CECodeableConcept(codice, code2);
        assignedEntity.id as id -&gt; practitioner.identifier as identifier then {
          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
          id.extension as ext -&gt; identifier.value = ext;
          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
          id.root as r then {
            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;;
          } &quot;r&quot;;
        } &quot;identifier&quot;;
        assignedEntity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
        } &quot;2&quot;;
        assignedEntity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
        } &quot;diverso&quot;;
        assignedEntity.addr -&gt; practitioner.address;
        assignedEntity.telecom -&gt; practitioner.telecom;
        assignedEntity.assignedPerson as person then {
          person.name -&gt; practitioner.name;
          person.birthTime as birthTime then {
            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);
          } &quot;birth&quot;;
        };
        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 {
          representedOrganization -&gt; organization.meta as meta then {
            representedOrganization -&gt; meta.tag = create('Coding') as coding then {
              representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
              representedOrganization -&gt; coding.code = 'ClinicalDocument/dataEnterer/representedOrganization' &quot;code&quot;;
            } &quot;coding&quot;;
          } &quot;meta&quot;;
          representedOrganization.id as id -&gt; organization.identifier as identifier then {
            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
            id.extension as ext -&gt; identifier.value = ext then {
              representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
            } &quot;ext&quot;;
            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
            id.root as r then {
              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;;
            } &quot;r&quot;;
          } &quot;identifier&quot;;
          representedOrganization.name as v -&gt; organization.name = (v.other);
          representedOrganization.telecom -&gt; organization.telecom;
          representedOrganization.addr -&gt; organization.address;
          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 {
            OrgPartOf -&gt; organization1.meta as meta then {
              OrgPartOf -&gt; meta.tag = create('Coding') as coding then {
                OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                OrgPartOf -&gt; coding.code = 'ClinicalDocument/dataEnterer/representedOrganization/asOrganizationPartOf' &quot;code&quot;;
              } &quot;coding&quot;;
            } &quot;meta&quot;;
            OrgPartOf.id as id -&gt; organization1.identifier as identifier then {
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext then {
                OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
              } &quot;ext&quot;;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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;;
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            OrgPartOf.code -&gt; organization1.type;
            OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';
            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 {
              wholeOrgan -&gt; organization2.meta as meta then {
                wholeOrgan -&gt; meta.tag = create('Coding') as coding then {
                  wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  wholeOrgan -&gt; coding.code = 'ClinicalDocument/dataEnterer/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              wholeOrgan.id as id -&gt; organization2.identifier as identifier then {
                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                id.extension as ext -&gt; identifier.value = ext then {
                  wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                } &quot;ext&quot;;
                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                id.root as r then {
                  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;;
                } &quot;r&quot;;
              } &quot;identifier&quot;;
              wholeOrgan.name as v -&gt; organization2.name = (v.other);
              wholeOrgan.telecom -&gt; organization2.telecom;
              wholeOrgan.addr -&gt; organization2.address;
            };
          };
        } &quot;RepresentedOrganization&quot;;
      } &quot;AssignedEntity&quot;;
    } &quot;DataEnter&quot;;
  } &quot;srcAuthor&quot;;
  // START INFORMANT 1
  src.informant as informant then {
    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 {
      informant -&gt; tgt.attester as attester then {
        informant -&gt; attester.mode = 'professional' &quot;mode&quot;;
        informant -&gt;  attester.party = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) &quot;reference&quot;;
        assignedEntity.code -&gt; practitionerRole.code;
        assignedEntity as entity -&gt;  bundle.entry as e12,  e12.request = create('BackboneElement') as request,  request.method = 'PUT',  e12.resource = create('Practitioner') as practitioner then {
          entity -&gt; practitioner.meta as meta then {
            entity -&gt; meta.tag = create('Coding') as coding then {
              entity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
              entity -&gt; coding.code = 'ClinicalDocument/informant' &quot;code&quot;;
            } &quot;coding&quot;;
          } &quot;meta&quot;;
          entity.id as id -&gt; practitioner.identifier as identifier then {
            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
            id.extension as ext -&gt; identifier.value = ext;
            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
            id.root as r then {
              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;;
            } &quot;r&quot;;
          } &quot;identifier&quot;;
          assignedEntity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
          } &quot;2&quot;;
          assignedEntity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
          } &quot;diverso&quot;;
          entity.addr -&gt; practitioner.address;
          entity.telecom -&gt; practitioner.telecom;
          entity.assignedPerson as person then {
            person.name -&gt; practitioner.name;
            person.birthTime as birthTime then {
              birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10);
            } &quot;birth&quot;;
          } &quot;person&quot;;
          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 {
            representedOrganization -&gt; organization.meta as meta then {
              representedOrganization -&gt; meta.tag = create('Coding') as coding then {
                representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                representedOrganization -&gt; coding.code = 'ClinicalDocument/informant/representedOrganization' &quot;code&quot;;
              } &quot;coding&quot;;
            } &quot;meta&quot;;
            representedOrganization.id as id -&gt; organization.identifier as identifier then {
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext then {
                representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
              } &quot;ext&quot;;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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);
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            representedOrganization.name as v -&gt; organization.name = (v.other);
            representedOrganization.telecom -&gt; organization.telecom;
            representedOrganization.addr -&gt; organization.address;
            representedOrganization.asOrganizationPartOf -&gt; organization.partOf as partOf then {
              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 {
                organizationPartOf -&gt; organization1.meta as meta then {
                  organizationPartOf -&gt; meta.tag = create('Coding') as coding then {
                    organizationPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                    organizationPartOf -&gt; coding.code = 'ClinicalDocument/informant/representedOrganization/asOrganizationPartOf' &quot;code&quot;;
                  } &quot;coding&quot;;
                } &quot;meta&quot;;
                organizationPartOf.id as id -&gt; organization1.identifier as identifier then {
                  id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                  id.extension as ext -&gt; identifier.value = ext then {
                    organizationPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                  } &quot;ext&quot;;
                  id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                  id.root as r then {
                    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);
                  } &quot;r&quot;;
                } &quot;identifier&quot;;
                organizationPartOf.code -&gt; organization1.type;
                organizationPartOf.statusCode as status where (code = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';
                organizationPartOf.wholeOrganization -&gt; organization1.partOf as partOf1 then {
                  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 {
                    wholeOrganization -&gt; organization2.meta as meta then {
                      wholeOrganization -&gt; meta.tag = create('Coding') as coding then {
                        wholeOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                        wholeOrganization -&gt; coding.code = 'ClinicalDocument/informant/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
                      } &quot;coding&quot;;
                    } &quot;meta&quot;;
                    wholeOrganization.id as id -&gt; organization2.identifier as identifier then {
                      id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                      id.extension as ext -&gt; identifier.value = ext then {
                        wholeOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                      } &quot;ext&quot;;
                      id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                      id.root as r then {
                        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);
                      } &quot;r&quot;;
                    } &quot;identifier&quot;;
                    wholeOrganization.name as v -&gt; organization2.name = (v.other);
                    wholeOrganization.telecom -&gt; organization2.telecom;
                    wholeOrganization.addr -&gt; organization2.address;
                  };
                } &quot;asOrganizationPartOf&quot;;
              } &quot;partOf&quot;;
            } &quot;qualification&quot;;
          } &quot;organization&quot;;
        } &quot;assignedEntity&quot;;
      } &quot;attester&quot;;
    } &quot;informant&quot;;
  } &quot;inform&quot;;
  // START INFORMANT 2
  src.informant as informant then {
    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 {
      informant -&gt; tgt.attester as attester then {
        informant -&gt; attester.mode = 'professional' &quot;mode&quot;;
        informant -&gt;  attester.party = create('Reference') as reference,  reference.reference = ('https://example/RelatedPerson/' + %relatedPerson.id) &quot;reference&quot;;
        related.relatedPerson as Person then {
          related.code -&gt; relatedPerson.relationship;
          related.telecom -&gt; relatedPerson.telecom;
          related.addr -&gt; relatedPerson.address;
          Person.name -&gt; relatedPerson.name;
          related.birthTime as date then {
            date.value as value -&gt; relatedPerson.birthDate = truncate(value, 10) &quot;valueD&quot;;
          } &quot;birthinformant&quot;;
          related -&gt;  relatedPerson.patient = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patientResource.id) &quot;reference&quot;;
        } &quot;relatedPerson1&quot;;
      } &quot;relatedPerson&quot;;
    } &quot;informant&quot;;
  } &quot;inform2&quot;;
  // START CUSTODIAN
  src.custodian as custodian then {
    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 {
      assignedCustodian -&gt; Organization.meta as meta then {
        assignedCustodian -&gt; meta.tag = create('Coding') as coding then {
          assignedCustodian -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
          assignedCustodian -&gt; coding.code = 'ClinicalDocument/custodian' &quot;code&quot;;
        } &quot;coding&quot;;
      } &quot;meta&quot;;
      assignedCustodian.representedCustodianOrganization as representedCustodianOrganization then {
        representedCustodianOrganization.id as id -&gt; Organization.identifier as identifier then {
          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
          id.extension as ext -&gt; identifier.value = ext then {
            representedCustodianOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
          } &quot;ext&quot;;
          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
          id.root as r then {
            id.extension as ext -&gt;  Organization.id = (r + '-' + ext) as uuid,  e17.fullUrl = append('https://example/Organization/', uuid);
          } &quot;r&quot;;
        } &quot;identifier&quot;;
        assignedCustodian -&gt;  DocumentReference.custodian = create('Reference') as referenceCU,  referenceCU.reference = ('https://example/Organization/' + %Organization.id) &quot;RefCustodian&quot;;
        representedCustodianOrganization -&gt;  tgt.custodian = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %Organization.id) then CustodianOrganization(representedCustodianOrganization, Organization) &quot;custodian1&quot;;
      };
    } &quot;organization&quot;;
  };
  // START INFORMATION RECIPIENT
  src.informationRecipient as informationRecipient then {
    informationRecipient.intendedRecipient as intendedRecipient then {
      intendedRecipient.informationRecipient as informationRecipient2 then {
        informationRecipient -&gt; tgt.attester as attester then {
          informationRecipient2 -&gt; attester.mode = 'professional' &quot;mode&quot;;
          informationRecipient2 -&gt;  bundle.entry as e19,  e19.request = create('BackboneElement') as request,  request.method = 'PUT',  e19.resource = create('Practitioner') as practitioner then {
            informationRecipient2 -&gt; practitioner.meta as meta then {
              informationRecipient2 -&gt; meta.tag = create('Coding') as coding then {
                informationRecipient2 -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                informationRecipient2 -&gt; coding.code = 'ClinicalDocument/informationRecipient' &quot;code&quot;;
              } &quot;coding&quot;;
            } &quot;meta&quot;;
            intendedRecipient.id as id -&gt; practitioner.identifier as identifier then {
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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);
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            intendedRecipient.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
              id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
            } &quot;2&quot;;
            intendedRecipient.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
              id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
            } &quot;diverso&quot;;
            intendedRecipient.addr -&gt; practitioner.address;
            intendedRecipient.telecom -&gt; practitioner.telecom;
            informationRecipient2.name -&gt; practitioner.name;
            informationRecipient2.birthTime as bt then {
              bt.value as v -&gt; practitioner.birthDate = (v.date);
            } &quot;date&quot;;
          } &quot;PersonRecipient&quot;;
        } &quot;intendedRecipienPract&quot;;
      } &quot;attesterOrg&quot;;
      intendedRecipient.receivedOrganization as receivedOrganization then {
        informationRecipient -&gt; tgt.attester as attester then {
          receivedOrganization -&gt; attester.mode = 'official' &quot;mode&quot;;
          receivedOrganization -&gt;  bundle.entry as e20,  e20.request = create('BackboneElement') as request,  request.method = 'PUT',  e20.resource = create('Organization') as organization then {
            receivedOrganization -&gt; organization.meta as meta then {
              receivedOrganization -&gt; meta.tag = create('Coding') as coding then {
                receivedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                receivedOrganization -&gt; coding.code = 'ClinicalDocument/informationRecipient/receivedOrganization' &quot;code&quot;;
              } &quot;coding&quot;;
            } &quot;meta&quot;;
            receivedOrganization.id as id -&gt; organization.identifier as identifier then {
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext then {
                receivedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
              } &quot;ext&quot;;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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);
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            receivedOrganization.name as v -&gt; organization.name = (v.other);
            receivedOrganization.telecom -&gt; organization.telecom;
            receivedOrganization.addr -&gt; organization.address;
            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 {
              asOrganizationPartOf -&gt; organization2.meta as meta then {
                asOrganizationPartOf -&gt; meta.tag = create('Coding') as coding then {
                  asOrganizationPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  asOrganizationPartOf -&gt; coding.code = 'ClinicalDocument/informationRecipient/receivedOrganization/asOrganizationPartOf' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              asOrganizationPartOf.id as id -&gt; organization2.identifier as identifier then {
                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                id.extension as ext -&gt; identifier.value = ext then {
                  asOrganizationPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                } &quot;ext&quot;;
                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                id.root as r then {
                  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);
                } &quot;r&quot;;
              } &quot;identifier&quot;;
              asOrganizationPartOf.code -&gt; organization2.type;
              asOrganizationPartOf.statusCode as status where (value = 'active') -&gt;  organization2.active = create('boolean'),  organization2.active = 'true';
              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 {
                wholeOrganization3 -&gt; organization3.meta as meta then {
                  wholeOrganization3 -&gt; meta.tag = create('Coding') as coding then {
                    wholeOrganization3 -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                    wholeOrganization3 -&gt; coding.code = 'ClinicalDocument/informationRecipient/receivedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
                  } &quot;coding&quot;;
                } &quot;meta&quot;;
                wholeOrganization3.id as id -&gt; organization3.identifier as identifier then {
                  id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                  id.extension as ext -&gt; identifier.value = ext then {
                    wholeOrganization3 -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                  } &quot;ext&quot;;
                  id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                  id.root as r then {
                    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);
                  } &quot;r&quot;;
                } &quot;identifier&quot;;
                wholeOrganization3.name as v -&gt; organization3.name = (v.other);
                wholeOrganization3.telecom -&gt; organization3.telecom;
                wholeOrganization3.addr -&gt; organization3.address;
              };
            };
          } &quot;receivedOrganization&quot;;
        } &quot;intendedRecipienOrg&quot;;
      } &quot;attesterOrg&quot;;
    } &quot;intendedRecipent&quot;;
  } &quot;informationRecipent&quot;;
  // START Legal Authenticator
  src.legalAuthenticator as legalAuth then {
    legalAuth -&gt; tgt.attester as attester then {
      legalAuth.assignedEntity as entity then {
        // Codice Fiscale
        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 {
          legalAuth -&gt; attester.mode = 'legal' &quot;mode&quot;;
          legalAuth.time -&gt; attester.time;
          legalAuth -&gt;  attester.party = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
            entity -&gt;  bundle.entry as e24,  e24.request = create('BackboneElement') as request,  request.method = 'PUT',  e24.resource = create('Practitioner') as practitioner then {
              entity -&gt; practitioner.meta as meta then {
                entity -&gt; meta.tag = create('Coding') as coding then {
                  entity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  entity -&gt; coding.code = 'ClinicalDocument/legalAuthenticator' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              entity.id as id -&gt; practitioner.identifier as identifier then {
                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                id.extension as ext -&gt; identifier.value = ext;
                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                id.root as r then {
                  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);
                } &quot;r&quot;;
              } &quot;identifier&quot;;
              entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
                id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
              } &quot;2&quot;;
              entity.addr -&gt; practitioner.address;
              entity.telecom -&gt; practitioner.telecom;
              entity.assignedPerson as person then {
                person.name -&gt; practitioner.name;
                person.birthTime as birthTime then {
                  birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10) &quot;birthTimelegal&quot;;
                } &quot;birth&quot;;
              } &quot;person&quot;;
            } &quot;practitioner&quot;;
            entity.code -&gt; practitionerRole.code;
            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 {
              rapresentedOrg -&gt; organization.meta as meta then {
                rapresentedOrg -&gt; meta.tag = create('Coding') as coding then {
                  rapresentedOrg -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  rapresentedOrg -&gt; coding.code = 'ClinicalDocument/legalAuthenticator/representedOrganization' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              rapresentedOrg.id as id -&gt; organization.identifier as identifier then {
                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                id.extension as ext -&gt; identifier.value = ext then {
                  rapresentedOrg -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                } &quot;ext&quot;;
                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                id.root as r then {
                  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);
                } &quot;r&quot;;
              } &quot;identifier&quot;;
              rapresentedOrg.name as v -&gt; organization.name = (v.other);
              rapresentedOrg.telecom -&gt; organization.telecom;
              rapresentedOrg.addr -&gt; organization.address;
              rapresentedOrg.asOrganizationPartOf as asOrgPartOf then {
                asOrgPartOf as asOrgPartOf1 -&gt;  bundle.entry as e26,  e26.request = create('BackboneElement') as request,  request.method = 'PUT',  e26.resource = create('Organization') as asorganization then {
                  asOrgPartOf1 -&gt; asorganization.meta as meta then {
                    asOrgPartOf1 -&gt; meta.tag = create('Coding') as coding then {
                      asOrgPartOf1 -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                      asOrgPartOf1 -&gt; coding.code = 'ClinicalDocument/legalAuthenticator/representedOrganization/asOrganizationPartOf' &quot;code&quot;;
                    } &quot;coding&quot;;
                  } &quot;meta&quot;;
                  asOrgPartOf1.id as id -&gt; asorganization.identifier as identifier then {
                    id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                    id.extension as ext -&gt; identifier.value = ext then {
                      asOrgPartOf1 -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                    } &quot;ext&quot;;
                    id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                    id.root as r then {
                      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);
                    } &quot;r&quot;;
                  } &quot;identifier&quot;;
                  asOrgPartOf1.code -&gt; asorganization.type;
                  asOrgPartOf1.statusCode as status where (code = 'active') -&gt;  asorganization.active = create('boolean'),  asorganization.active = true;
                  asOrgPartOf1.wholeOrganization as wholeOrg then {
                    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 {
                      wholeOrg1 -&gt; wholeorganization.meta as meta then {
                        wholeOrg1 -&gt; meta.tag = create('Coding') as coding then {
                          wholeOrg1 -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                          wholeOrg1 -&gt; coding.code = 'ClinicalDocument/legalAuthenticator/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
                        } &quot;coding&quot;;
                      } &quot;meta&quot;;
                      wholeOrg1.id as id -&gt; wholeorganization.identifier as identifier then {
                        id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                        id.extension as ext -&gt; identifier.value = ext then {
                          wholeOrg1 -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                        } &quot;ext&quot;;
                        id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                        id.root as r then {
                          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);
                        } &quot;r&quot;;
                      } &quot;identifier&quot;;
                      wholeOrg1.name as v -&gt; wholeorganization.name = (v.other);
                      wholeOrg1.telecom -&gt; wholeorganization.telecom;
                      wholeOrg1.addr -&gt; wholeorganization.address;
                    } &quot;wholeOrg1&quot;;
                  } &quot;wholeOrg&quot;;
                } &quot;asOrgPO&quot;;
              } &quot;asOrgID&quot;;
            } &quot;LAOrganiz&quot;;
          } &quot;PractitionerLegal&quot;;
        } &quot;PractitionerROLlegal&quot;;
        // Partita IVA
        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 {
          entity -&gt; attester.mode = 'official' &quot;mode&quot;;
          entity -&gt; organization.meta as meta then {
            entity -&gt; meta.tag = create('Coding') as coding then {
              entity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
              entity -&gt; coding.code = 'ClinicalDocument/legalAuthenticatorPartitaIVA' &quot;code&quot;;
            } &quot;coding&quot;;
          } &quot;meta&quot;;
          entity.id as id -&gt; organization.identifier as identifier then {
            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
            id.extension as ext -&gt; identifier.value = ext then {
              entity -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
            } &quot;ext&quot;;
            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
            id.root as r then {
              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);
            } &quot;r&quot;;
          } &quot;identifier&quot;;
        } &quot;OrgPartitaIVA&quot;;
      } &quot;entity&quot;;
    } &quot;legalAuth&quot;;
  } &quot;LegalAuthenticator&quot;;
  // START Authenticator
  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 {
    Auth -&gt; tgt.attester as attester then {
      Auth.time -&gt; attester.time;
      Auth -&gt; attester.mode = 'professional' &quot;mode&quot;;
      Auth.assignedEntity as entity -&gt;  attester.party = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
        entity.code -&gt; practitionerRole.code;
        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 {
          entity -&gt; practitioner.meta as meta then {
            entity -&gt; meta.tag = create('Coding') as coding then {
              entity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
              entity -&gt; coding.code = 'ClinicalDocument/authenticator' &quot;code&quot;;
            } &quot;coding&quot;;
          } &quot;meta&quot;;
          entity.id as id -&gt; practitioner.identifier as identifier then {
            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
            id.extension as ext -&gt; identifier.value = ext;
            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
            id.root as r then {
              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);
            } &quot;r&quot;;
          } &quot;identifier&quot;;
          entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
          } &quot;2&quot;;
          entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
            id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
          } &quot;diverso&quot;;
          entity.addr -&gt; practitioner.address &quot;address&quot;;
          entity.telecom -&gt; practitioner.telecom;
          entity.assignedPerson as person then {
            person.name -&gt; practitioner.name &quot;personName&quot;;
            person.birthTime as birthTime then {
              birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10) &quot;birthTimeauth&quot;;
            } &quot;birth&quot;;
          } &quot;person&quot;;
        } &quot;practitioner&quot;;
        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 {
          reporganization -&gt; organization.meta as meta then {
            reporganization -&gt; meta.tag = create('Coding') as coding then {
              reporganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
              reporganization -&gt; coding.code = 'ClinicalDocument/authenticator/representedOrganization' &quot;code&quot;;
            } &quot;coding&quot;;
          } &quot;meta&quot;;
          reporganization.id as id -&gt; organization.identifier as identifier then {
            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
            id.extension as ext -&gt; identifier.value = ext then {
              reporganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
            } &quot;ext&quot;;
            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
            id.root as r then {
              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);
            } &quot;r&quot;;
          } &quot;identifier&quot;;
          reporganization.name as v -&gt; organization.name = (v.other);
          reporganization.telecom -&gt; organization.telecom;
          reporganization.addr -&gt; organization.address;
          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 {
            organizationpartof -&gt; asOrganizationpartof.meta as meta then {
              organizationpartof -&gt; meta.tag = create('Coding') as coding then {
                organizationpartof -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                organizationpartof -&gt; coding.code = 'ClinicalDocument/authenticator/representedOrganization/asOrganizationPartOf' &quot;code&quot;;
              } &quot;coding&quot;;
            } &quot;meta&quot;;
            organizationpartof.id as id -&gt; asOrganizationpartof.identifier as identifier then {
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext then {
                organizationpartof -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
              } &quot;ext&quot;;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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);
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            organizationpartof.code -&gt; asOrganizationpartof.type;
            organizationpartof.statusCode as status where (code = 'active') -&gt;  asOrganizationpartof.active = create('boolean'),  asOsrganizationpartof.active = 'true';
            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 {
              wholeorg -&gt; wholeOrganization.meta as meta then {
                wholeorg -&gt; meta.tag = create('Coding') as coding then {
                  wholeorg -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  wholeorg -&gt; coding.code = 'ClinicalDocument/authenticator/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              wholeorg.id as id -&gt; wholeOrganization.identifier as identifier then {
                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                id.extension as ext -&gt; identifier.value = ext then {
                  wholeorg -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                } &quot;ext&quot;;
                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                id.root as r then {
                  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);
                } &quot;r&quot;;
              } &quot;identifier&quot;;
              wholeorg.name as v -&gt; wholeOrganization.name = (v.other);
              wholeorg.telecom -&gt; wholeOrganization.telecom;
              wholeorg.addr -&gt; wholeOrganization.address;
            } &quot;wholeorg&quot;;
          } &quot;organizationpartof&quot;;
        } &quot;reporganization&quot;;
      } &quot;entity&quot;;
    } &quot;attester&quot;;
  } &quot;Auth&quot;;
  // PARTICIPANT
  src.participant as participant where (typeCode != 'IND') then {
    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 {
      // participant.time as time-&gt;participant1.period as period ,period.start=(time.value);
      participant -&gt; participant1.period = create('Period') as period then {
        participant.time as time -&gt; period.start = create('dateTime') as start then TSDateTime(time, start);
      } &quot;period&quot;;
      participant as p -&gt; participant1.type as type then {
        p -&gt; type.coding as coding then {
          p -&gt; coding.code = (p.typeCode) &quot;codice&quot;;
          p -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' &quot;system&quot;;
        } &quot;codeType&quot;;
      } &quot;type&quot;;
      participant -&gt;  participant1.individual = create('Reference') as referencepart,  referencepart.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) &quot;par&quot;;
      participant.functionCode -&gt; practitionerRole.code;
      associetedEntity -&gt;  bundle.entry as e33,  e33.request = create('BackboneElement') as request,  request.method = 'PUT',  e33.resource = create('Practitioner') as practitioner then {
        associetedEntity -&gt; practitioner.meta as meta then {
          associetedEntity -&gt; meta.tag = create('Coding') as coding then {
            associetedEntity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
            associetedEntity -&gt; coding.code = 'ClinicalDocument/participant' &quot;code&quot;;
          } &quot;coding&quot;;
        } &quot;meta&quot;;
        associetedEntity.id as id -&gt; practitioner.identifier as identifier then {
          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
          id.extension as ext -&gt; identifier.value = ext;
          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
          id.root as r then {
            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);
          } &quot;r&quot;;
        } &quot;identifier&quot;;
        associetedEntity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
        } &quot;2&quot;;
        associetedEntity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
        } &quot;diverso&quot;;
        associetedEntity.code -&gt; practitionerRole.code;
        associetedEntity.addr -&gt; practitioner.address;
        associetedEntity.telecom -&gt; practitioner.telecom;
        associetedEntity.associatedPerson as associatedperson then {
          associatedperson.name -&gt; practitioner.name;
          associatedperson.birthTime as birthTime then {
            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10) &quot;birthTimelegal&quot;;
          } &quot;birth&quot;;
        } &quot;name&quot;;
        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 {
          scopingOrganization -&gt; organization.meta as meta then {
            scopingOrganization -&gt; meta.tag = create('Coding') as coding then {
              scopingOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
              scopingOrganization -&gt; coding.code = 'ClinicalDocument/participant/scopingOrganization' &quot;code&quot;;
            } &quot;coding&quot;;
          } &quot;meta&quot;;
          scopingOrganization.id as id -&gt; organization.identifier as identifier then {
            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
            id.extension as ext -&gt; identifier.value = ext then {
              scopingOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
            } &quot;ext&quot;;
            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
            id.root as r then {
              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);
            } &quot;r&quot;;
          } &quot;identifier&quot;;
          scopingOrganization.name as v -&gt; organization.name = (v.other);
          scopingOrganization.telecom -&gt; organization.telecom;
          scopingOrganization.addr -&gt; organization.address;
          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 {
            OrgPartOf.id as id -&gt; organization1.identifier as identifier then {
              OrgPartOf -&gt; organization1.meta as meta then {
                OrgPartOf -&gt; meta.tag = create('Coding') as coding then {
                  OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  OrgPartOf -&gt; coding.code = 'ClinicalDocument/participant/scopingOrganization/asOrganizationPartOf' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext then {
                OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
              } &quot;ext&quot;;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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);
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            OrgPartOf.code -&gt; organization1.type;
            OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = true;
            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 {
              wholeOrgan -&gt; organization2.meta as meta then {
                wholeOrgan -&gt; meta.tag = create('Coding') as coding then {
                  wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  wholeOrgan -&gt; coding.code = 'ClinicalDocument/participant/scopingOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              wholeOrgan.id as id -&gt; organization2.identifier as identifier then {
                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                id.extension as ext -&gt; identifier.value = ext then {
                  wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                } &quot;ext&quot;;
                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                id.root as r then {
                  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);
                } &quot;r&quot;;
              } &quot;identifier&quot;;
              wholeOrgan.name as v -&gt; organization2.name = (v.other);
              wholeOrgan.telecom -&gt; organization2.telecom;
              wholeOrgan.addr -&gt; organization2.address;
            } &quot;wholeOrgan&quot;;
          } &quot;OrgPartOf&quot;;
        };
      } &quot;associetedEntity&quot;;
    } &quot;Participant1&quot;;
  };
  src.participant as participant where (typeCode = 'IND') then {
    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 {
      // participant.time as time-&gt;participant2.period as period, period.start=(time.value);
      participant -&gt; participant2.period = create('Period') as period then {
        participant.time as time -&gt; period.start = create('dateTime') as start then TSDateTime(time, start);
      } &quot;period&quot;;
      participant as p -&gt; participant2.type as type then {
        p -&gt; type.coding as coding then {
          p -&gt; coding.code = (p.typeCode) &quot;codice&quot;;
          p -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' &quot;system&quot;;
        } &quot;codeType&quot;;
      } &quot;type&quot;;
      participant -&gt;  participant2.individual = create('Reference') as referencepart,  referencepart.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) &quot;par&quot;;
      participant.functionCode -&gt; practitionerRole.code;
      associetedEntity -&gt;  bundle.entry as e33,  e33.request = create('BackboneElement') as request,  request.method = 'PUT',  e33.resource = create('Practitioner') as practitioner then {
        associetedEntity -&gt; practitioner.meta as meta then {
          associetedEntity -&gt; meta.tag = create('Coding') as coding then {
            associetedEntity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
            associetedEntity -&gt; coding.code = 'ClinicalDocument/participant' &quot;code&quot;;
          } &quot;coding&quot;;
        } &quot;meta&quot;;
        associetedEntity.id as id -&gt; practitioner.identifier as identifier then {
          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
          id.extension as ext -&gt; identifier.value = ext;
          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
          id.root as r then {
            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);
          } &quot;r&quot;;
        } &quot;identifier&quot;;
        associetedEntity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
        } &quot;2&quot;;
        associetedEntity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
        } &quot;diverso&quot;;
        associetedEntity.code -&gt; practitionerRole.code;
        associetedEntity.addr -&gt; practitioner.address;
        associetedEntity.telecom -&gt; practitioner.telecom;
        associetedEntity.associatedPerson as associatedperson then {
          associatedperson.name -&gt; practitioner.name;
          associatedperson.birthTime as birthTime then {
            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10) &quot;birthTimelegal&quot;;
          } &quot;birth&quot;;
        } &quot;name&quot;;
        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 {
          scopingOrganization -&gt; organization.meta as meta then {
            scopingOrganization -&gt; meta.tag = create('Coding') as coding then {
              scopingOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
              scopingOrganization -&gt; coding.code = 'ClinicalDocument/participant/scopingOrganization' &quot;code&quot;;
            } &quot;coding&quot;;
          } &quot;meta&quot;;
          scopingOrganization.id as id -&gt; organization.identifier as identifier then {
            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
            id.extension as ext -&gt; identifier.value = ext then {
              scopingOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
            } &quot;ext&quot;;
            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
            id.root as r then {
              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);
            } &quot;r&quot;;
          } &quot;identifier&quot;;
          scopingOrganization.name as v -&gt; organization.name = (v.other);
          scopingOrganization.telecom -&gt; organization.telecom;
          scopingOrganization.addr -&gt; organization.address;
          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 {
            OrgPartOf -&gt; organization1.meta as meta then {
              OrgPartOf -&gt; meta.tag = create('Coding') as coding then {
                OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                OrgPartOf -&gt; coding.code = 'ClinicalDocument/participant/scopingOrganization/asOrganizationPartOf' &quot;code&quot;;
              } &quot;coding&quot;;
            } &quot;meta&quot;;
            OrgPartOf.id as id -&gt; organization1.identifier as identifier then {
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext then {
                OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
              } &quot;ext&quot;;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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);
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            OrgPartOf.code -&gt; organization1.type;
            OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = true;
            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 {
              wholeOrgan -&gt; organization2.meta as meta then {
                wholeOrgan -&gt; meta.tag = create('Coding') as coding then {
                  wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  wholeOrgan -&gt; coding.code = 'ClinicalDocument/participant/scopingOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              wholeOrgan.id as id -&gt; organization2.identifier as identifier then {
                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                id.extension as ext -&gt; identifier.value = ext then {
                  wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                } &quot;ext&quot;;
                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                id.root as r then {
                  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);
                } &quot;r&quot;;
              } &quot;identifier&quot;;
              wholeOrgan.name as v -&gt; organization2.name = (v.other);
              wholeOrgan.telecom -&gt; organization2.telecom;
              wholeOrgan.addr -&gt; organization2.address;
            } &quot;wholeOrgan&quot;;
          } &quot;OrgPartOf&quot;;
        };
      } &quot;associetedEntity&quot;;
    } &quot;Participant2&quot;;
    participant.associatedEntity as associetedEntity where (classCode = 'NOK') or (classCode = 'ECON') or (classCode = 'CAREGIVER') then {
      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 {
        associetedEntity -&gt; patientResource.link as link then {
          associetedEntity -&gt; link.type = 'refer' &quot;type&quot;;
          associetedEntity -&gt;  link.other = create('Reference') as reference,  reference.reference = ('https://example/RelatedPerson/' + %RelatedPerson.id) &quot;reference&quot;;
          associetedEntity.id -&gt; RelatedPerson.identifier;
          associetedEntity -&gt;  RelatedPerson.patient = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patientResource.id) &quot;reference&quot;;
          associetedEntity.code -&gt; RelatedPerson.relationship;
          associetedEntity.telecom -&gt; RelatedPerson.telecom;
          associetedEntity.associatedPerson as associatedperson then {
            associatedperson.name -&gt; RelatedPerson.name;
          };
        } &quot;link&quot;;
      } &quot;participant3&quot;;
    } &quot;WHERE&quot;;
    // START PARTICIPANT GUAR
    participant.associatedEntity as associetedentity where (classCode = 'GUAR') then {
      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 {
        representedOrganization -&gt; organization.meta as meta then {
          representedOrganization -&gt; meta.tag = create('Coding') as coding then {
            representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
            representedOrganization -&gt; coding.code = 'ClinicalDocument/participant/scopingOrganization' &quot;code&quot;;
          } &quot;coding&quot;;
        } &quot;meta&quot;;
        associetedentity.code -&gt; organization.type;
        associetedentity.scopingOrganization as scopingOrganization then {
          associetedentity.id as id -&gt; organization.identifier as identifier then {
            participant.time as time then {
              time.high as high -&gt; identifier.period as period then {
                high -&gt; period.end = (high.value) &quot;periodend&quot;;
              } &quot;period&quot;;
            };
            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
            id.extension as ext -&gt; identifier.value = ext then {
              associetedentity -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
            } &quot;ext&quot;;
            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
            id.root as r then {
              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);
            } &quot;r&quot;;
          } &quot;identifier&quot;;
          scopingOrganization.name as v -&gt; organization.name = (v.other);
          scopingOrganization.telecom -&gt; organization.telecom;
          scopingOrganization.addr -&gt; organization.address;
          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 {
            OrgPartOf -&gt; organizationPOF.meta as meta then {
              OrgPartOf -&gt; meta.tag = create('Coding') as coding then {
                OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                OrgPartOf -&gt; coding.code = 'ClinicalDocument/participant/scopingOrganization/asOrganizationPartOf' &quot;code&quot;;
              } &quot;coding&quot;;
            } &quot;meta&quot;;
            OrgPartOf.id as id -&gt; organizationPOF.identifier as identifier then {
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext then {
                OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
              } &quot;ext&quot;;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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);
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            OrgPartOf.code -&gt; organizationPOF.type;
            OrgPartOf.statusCode as status where (value = 'active') -&gt;  organizationPOF.active = create('boolean'),  organizationPOF.active = 'true';
            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 {
              wholeOrgan -&gt; organizationW.meta as meta then {
                wholeOrgan -&gt; meta.tag = create('Coding') as coding then {
                  wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  wholeOrgan -&gt; coding.code = 'ClinicalDocument/participant/scopingOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              wholeOrgan.id as id -&gt; organizationW.identifier as identifier then {
                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                id.extension as ext -&gt; identifier.value = ext then {
                  wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                } &quot;ext&quot;;
                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                id.root as r then {
                  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);
                } &quot;r&quot;;
              } &quot;identifier&quot;;
              wholeOrgan.name as v -&gt; organizationW.name = (v.other);
              wholeOrgan.telecom -&gt; organizationW.telecom;
              wholeOrgan.addr -&gt; organizationW.address;
            } &quot;wholeOrgan&quot;;
          } &quot;OrgPartOf&quot;;
        };
      } &quot;associetedEntity&quot;;
    } &quot;repOrg&quot;;
  };
  src.inFulfillmentOf as inFulfillmentOf then {
    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 {
      order.id -&gt; serviceRequest.identifier;
      order -&gt; serviceRequest.status = 'active' &quot;status&quot;;
      order -&gt; serviceRequest.intent = 'order' &quot;intent&quot;;
      order -&gt;  serviceRequest.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patientResource.id) &quot;reference&quot;;
      order -&gt;  serviceRequest.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) &quot;reference&quot;;
      order.code -&gt; serviceRequest.code;
      order.priorityCode as priorityCode then {
        priorityCode.code as v -&gt; serviceRequest.priority = translate(v, '#priority', 'code') &quot;priority&quot;;
      };
    };
  };
  src.documentationOf as docOf then {
    docOf.serviceEvent as serviceEvent -&gt; tgt.event as event then {
      serviceEvent.code -&gt; event.code &quot;eventCode&quot;;
      serviceEvent.effectiveTime as effectiveTime then {
        effectiveTime -&gt; event.period = create('Period') as period then IVLTSPeriod(effectiveTime, period) &quot;period&quot;;
      } &quot;eventDT&quot;;
      serviceEvent.effectiveTime as effectivetime1 -&gt; event.period = create('Period') as period then {
        effectivetime1 -&gt; period.start = create('dateTime') as start then TSDateTime(effectivetime1, start) &quot;val&quot;;
      } &quot;efft&quot;;
      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 {
        performer -&gt;  event.detail = create('Reference') as reference,  reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
          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 {
            assignedEntity -&gt; practitioner.meta as meta then {
              assignedEntity -&gt; meta.tag = create('Coding') as coding then {
                assignedEntity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                assignedEntity -&gt; coding.code = 'ClinicalDocument/documentationOf/serviceEvent/performer' &quot;code&quot;;
              } &quot;coding&quot;;
            } &quot;meta&quot;;
            performer.functionCode -&gt; practitionerRole.code;
            assignedEntity.code -&gt; practitionerRole.code;
            assignedEntity.id as id -&gt; practitioner.identifier as identifier then {
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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);
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            assignedEntity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
              id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
            } &quot;2&quot;;
            assignedEntity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
              id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
            } &quot;diverso&quot;;
            assignedEntity.addr -&gt; practitioner.address;
            assignedEntity.telecom -&gt; practitioner.telecom;
            assignedEntity.assignedPerson as person then {
              person.name -&gt; practitioner.name;
              person.birthTime as birthTime then {
                birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10) &quot;birthTimelegal&quot;;
              } &quot;birth&quot;;
            } &quot;name&quot;;
            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 {
              representedOrganization -&gt; organization.meta as meta then {
                representedOrganization -&gt; meta.tag = create('Coding') as coding then {
                  representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  representedOrganization -&gt; coding.code = 'ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              representedOrganization.id as id -&gt; organization.identifier as identifier then {
                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                id.extension as ext -&gt; identifier.value = ext then {
                  representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                } &quot;ext&quot;;
                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                id.root as r then {
                  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;r&quot;;
              } &quot;identifier&quot;;
              representedOrganization.name as v -&gt; organization.name = (v.other);
              representedOrganization.telecom -&gt; organization.telecom;
              representedOrganization.addr -&gt; organization.address;
              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 {
                OrgPartOf -&gt; organization1.meta as meta then {
                  OrgPartOf -&gt; meta.tag = create('Coding') as coding then {
                    OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                    OrgPartOf -&gt; coding.code = 'ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization/asOrganizationPartOf' &quot;code&quot;;
                  } &quot;coding&quot;;
                } &quot;meta&quot;;
                OrgPartOf.id as id -&gt; organization1.identifier as identifier then {
                  id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                  id.extension as ext -&gt; identifier.value = ext then {
                    OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                  } &quot;ext&quot;;
                  id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                  id.root as r then {
                    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;r&quot;;
                } &quot;identifier&quot;;
                OrgPartOf.code -&gt; organization1.type;
                OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = 'true';
                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 {
                  wholeOrgan -&gt; organization2.meta as meta then {
                    wholeOrgan -&gt; meta.tag = create('Coding') as coding then {
                      wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                      wholeOrgan -&gt; coding.code = 'ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
                    } &quot;coding&quot;;
                  } &quot;meta&quot;;
                  wholeOrgan.id as id -&gt; organization2.identifier as identifier then {
                    id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                    id.extension as ext -&gt; identifier.value = ext then {
                      wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                    } &quot;ext&quot;;
                    id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                    id.root as r then {
                      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;r&quot;;
                  } &quot;identifier&quot;;
                  wholeOrgan.name as v -&gt; organization2.name = (v.other);
                  wholeOrgan.telecom -&gt; organization2.telecom;
                  wholeOrgan.addr -&gt; organization2.address;
                };
              };
            } &quot;RepresentedOrganization&quot;;
          } &quot;AssignedEntity&quot;;
        } &quot;performer&quot;;
      } &quot;docOf&quot;;
    };
  };
  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;;
  src.componentOf as comp then {
    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;;
    comp.encompassingEncounter as srcEnc -&gt;  tgt.encounter = create('Reference') as reference,  reference.reference = ('https://example/Encounter/' + %encounter.id) then ClinicalDocumentEncounter(srcEnc, bundle, encounter, patientResource);
  } &quot;encompassingEncounter&quot;;
}

group ClinicalDocumentRelatesTo(source src : parentDocument, target tgt : composition) {
  src.id -&gt; tgt.identifier;
  src.code -&gt; tgt.type;
  src.setId -&gt; tgt.identifier;
  src.versionNumber as vNumber -&gt; tgt.extension as ext then ChExtEprVersionNumber(vNumber, ext) &quot;versionNumberEXT&quot;;
}

group EXTbirthplace(source src : AD, target ext : Extension) {
  src -&gt; ext.url = 'http://hl7.org/fhir/StructureDefinition/patient-birthPlace' &quot;url&quot;;
  src -&gt; ext.value = create('Address') as value then ADAddress(src, value) &quot;value&quot;;
}

group ClinicalDocumentPatientRole(source src : PatientRole, target tgt : Patient, target bundle : Bundle) {
  src.addr -&gt; tgt.address;
  src.telecom -&gt; tgt.telecom;
  src.patient as patient then {
    patient.name -&gt; tgt.name;
    patient.administrativeGenderCode as gender then {
      gender.code as v -&gt; tgt.gender = translate(v, '#cm-v3-administrative-gender', 'code') &quot;gender&quot;;
    } &quot;gender&quot;;
    patient.birthTime as birthTime then {
      birthTime.value as date -&gt; tgt.birthDate = truncate(date, 10) &quot;birthTimelegal&quot;;
    } &quot;birth&quot;;
    patient.deceasedInd as deceased where (value = 'false') -&gt;  tgt.deceased = create('boolean'),  tgt.deceased = false &quot;deceasedBL&quot;;
    patient.deceasedInd as deceased where (value = 'true') then {
      patient.deceasedTime as Time -&gt; tgt.deceased = create('dateTime') as deceasedTime then TSDateTime(Time, deceasedTime);
    };
    patient.deceasedTime as Timet where Timet.empty() -&gt;  tgt.deceased = create('boolean'),  tgt.deceased = true &quot;deceasedBL&quot;;
    patient.maritalStatusCode -&gt; tgt.maritalStatus &quot;maritalStatus&quot;;
    patient.guardian as guardian then {
      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 {
        person.name -&gt; relatedPerson.name;
        person.birthTime as birthTime then {
          birthTime.value as date -&gt; relatedPerson.birthDate = truncate(date, 10) &quot;birthTimelegal&quot;;
        } &quot;birth&quot;;
        person -&gt;  relatedPerson.patient = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %tgt.id) &quot;reference&quot;;
        person -&gt; tgt.link as link then {
          person -&gt; link.type = 'refer' &quot;type&quot;;
          person -&gt;  link.other = create('Reference') as reference,  reference.reference = ('https://example/RelatedPerson/' + %relatedPerson.id) &quot;reference&quot;;
          guardian.addr -&gt; relatedPerson.address;
          guardian.telecom -&gt; relatedPerson.telecom;
          guardian.id -&gt; relatedPerson.identifier;
          guardian.code -&gt; relatedPerson.relationship;
        } &quot;person&quot;;
      };
      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 {
        guardianorg -&gt; organizationcontact.meta as meta then {
          guardianorg -&gt; meta.tag = create('Coding') as coding then {
            guardianorg -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
            guardianorg -&gt; coding.code = 'ClinicalDocument/recordTarget/PatientRole/patient/guardian/guardianOrganization' &quot;code&quot;;
          } &quot;coding&quot;;
        } &quot;meta&quot;;
        guardianorg -&gt; tgt.contact as contact then {
          guardianorg -&gt;  contact.organization = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organizationcontact.id) &quot;OrganizationContact&quot;;
          guardianorg.id as id -&gt; organizationcontact.identifier as identifier then {
            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
            id.extension as ext -&gt; identifier.value = ext then {
              guardianorg -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
            } &quot;ext&quot;;
            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
            id.root as r then {
              id.extension as ext -&gt;  organizationcontact.id = (r + '-' + ext) as uuid2,  e1.fullUrl = append('https://example/Organization/', uuid2);
            } &quot;r&quot;;
          } &quot;identifier&quot;;
          guardianorg.name as v -&gt; organizationcontact.name = (v.other);
          guardianorg.telecom -&gt; organizationcontact.telecom;
          guardianorg.addr -&gt; organizationcontact.address;
          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 {
            OrgPartOf -&gt; organizationpartOf.meta as meta then {
              OrgPartOf -&gt; meta.tag = create('Coding') as coding then {
                OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                OrgPartOf -&gt; coding.code = 'ClinicalDocument/recordTarget/PatientRole/patient/guardian/guardianOrganization/asOrganizationPartOf' &quot;code&quot;;
              } &quot;coding&quot;;
            } &quot;meta&quot;;
            OrgPartOf -&gt;  organizationcontact.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %organizationpartOf.id) &quot;asorganization&quot;;
            OrgPartOf.id as id -&gt; organizationpartOf.identifier as identifier then {
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext then {
                OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
              } &quot;ext&quot;;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                id.extension as ext -&gt;  organizationpartOf.id = (r + '-' + ext) as uuid3,  e2.fullUrl = append('https://example/Organization/', uuid3);
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            OrgPartOf.code -&gt; organizationpartOf.type;
            OrgPartOf.statusCode as status where (value = 'active') -&gt; organizationpartOf.active = 'true';
            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 {
              wholeORG -&gt; WholeOrganization.meta as meta then {
                wholeORG -&gt; meta.tag = create('Coding') as coding then {
                  wholeORG -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  wholeORG -&gt; coding.code = 'ClinicalDocument/recordTarget/PatientRole/patient/guardian/guardianOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              wholeORG -&gt;  organizationpartOf.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %WholeOrganization.id) &quot;asOrganization&quot;;
              wholeORG.id as id -&gt; WholeOrganization.identifier as identifier then {
                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                id.extension as ext -&gt; identifier.value = ext then {
                  wholeORG -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                } &quot;ext&quot;;
                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                id.root as r then {
                  id.extension as ext -&gt;  WholeOrganization.id = (r + '-' + ext) as uuid4,  e3.fullUrl = append('https://example/Organization/', uuid4);
                } &quot;r&quot;;
              } &quot;identifier&quot;;
              wholeORG.name as v -&gt; WholeOrganization.name = (v.other);
              wholeORG.telecom -&gt; WholeOrganization.telecom;
              wholeORG.addr -&gt; WholeOrganization.address;
            } &quot;WholeOrganization&quot;;
          } &quot;OrganizationPartOf&quot;;
        } &quot;contact&quot;;
      } &quot;guardianorganization&quot;;
    };
    patient.birthplace as birthplace then {
      birthplace.place as place then {
        place.addr as address -&gt; tgt.extension as ext1 then EXTbirthplace(address, ext1) &quot;birthplace&quot;;
      };
    };
    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 {
      org -&gt; providerorganization.meta as meta then {
        org -&gt; meta.tag = create('Coding') as coding then {
          org -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
          org -&gt; coding.code = 'ClinicalDocument/recordTarget/PatientRole/patient/providerOrganization' &quot;code&quot;;
        } &quot;coding&quot;;
      } &quot;meta&quot;;
      org.id as id -&gt; providerorganization.identifier as identifier then {
        id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
        id.extension as ext -&gt; identifier.value = ext then {
          org -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
        } &quot;ext&quot;;
        id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
        id.root as r then {
          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;;
        } &quot;r&quot;;
      } &quot;identifier&quot;;
      org.name as v -&gt; providerorganization.name = (v.other);
      org.telecom -&gt; providerorganization.telecom;
      org.addr -&gt; providerorganization.address;
      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 {
        OrgPartOfProvider -&gt; organizationpartOfprovider.meta as meta then {
          OrgPartOfProvider -&gt; meta.tag = create('Coding') as coding then {
            OrgPartOfProvider -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
            OrgPartOfProvider -&gt; coding.code = 'ClinicalDocument/recordTarget/PatientRole/patient/providerOrganization/asOrganizationPartOf' &quot;code&quot;;
          } &quot;coding&quot;;
        } &quot;meta&quot;;
        OrgPartOfProvider.id as id -&gt; organizationpartOfprovider.identifier as identifier then {
          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
          id.extension as ext -&gt; identifier.value = ext then {
            OrgPartOfProvider -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
          } &quot;ext&quot;;
          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
          id.root as r then {
            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;;
          } &quot;r&quot;;
        } &quot;identifier&quot;;
        OrgPartOfProvider.code -&gt; organizationpartOfprovider.type;
        OrgPartOfProvider.statusCode as status where (value = 'active') -&gt; organizationpartOfprovider.active = 'true';
        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 {
          wholeORGproveder -&gt; WholeOrganizationprovider.meta as meta then {
            wholeORGproveder -&gt; meta.tag = create('Coding') as coding then {
              wholeORGproveder -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
              wholeORGproveder -&gt; coding.code = 'ClinicalDocument/recordTarget/PatientRole/patient/providerOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
            } &quot;coding&quot;;
          } &quot;meta&quot;;
          wholeORGproveder -&gt;  organizationpartOfprovider.partOf = create('Reference') as reference,  reference.reference = ('https://example/Organization/' + %WholeOrganizationprovider.id) &quot;asOrganization&quot;;
          wholeORGproveder.id as id -&gt; WholeOrganizationprovider.identifier as identifier then {
            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
            id.extension as ext -&gt; identifier.value = ext then {
              wholeORGproveder -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
            } &quot;ext&quot;;
            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
            id.root as r then {
              id.extension as ext -&gt;  WholeOrganizationprovider.id = (r + '-' + ext) as uuid7,  e6.fullUrl = append('https://example/Organization/', uuid7);
            } &quot;r&quot;;
          } &quot;identifier&quot;;
          wholeORGproveder.name as v -&gt; WholeOrganizationprovider.name = (v.other);
          wholeORGproveder.telecom -&gt; WholeOrganizationprovider.telecom;
          wholeORGproveder.addr -&gt; WholeOrganizationprovider.address;
        } &quot;wholeOrganizationprovider&quot;;
      } &quot;OrganizationPartOfprovider&quot;;
    } &quot;organization&quot;;
  };
}

group CustodianOrganization(source src : CustodianOrganization, target tgt : Organization) {
  src.name as v -&gt; tgt.name = (v.other);
  src.telecom -&gt; tgt.telecom;
  src.addr -&gt; tgt.address;
}

group ClinicalDocumentEncounter(source src : EncompassingEncounter, target bundle : Bundle, target encounter : Encounter, target patient : Patient) {
  src.id -&gt; encounter.identifier;
  src.code as code1 -&gt; encounter.class = create('Coding') as coding then {
    code1.code as code -&gt; coding.code = cast(code, 'string');
    code1.codeSystem as system -&gt; coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
    code1.displayName as display -&gt; coding.display = cast(display, 'string');
  } &quot;class&quot;;
  src where src.code.exists().not() -&gt; encounter.class = create('Coding') as coding then {
    src -&gt; coding.code = 'AMB' &quot;code&quot;;
    src -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' &quot;codeS&quot;;
    src -&gt; coding.display = 'ambulatory' &quot;display&quot;;
  } &quot;NonCodeclass&quot;;
  src -&gt;  encounter.subject = create('Reference') as reference,  reference.reference = ('https://example/Patient/' + %patient.id) &quot;reference&quot;;
  src -&gt; encounter.status = 'finished' &quot;status&quot;;
  // effectiveTime=period
  src where effectiveTime.low.exists() or effectiveTime.high.exists() then {
    src.effectiveTime as eff -&gt; encounter.period = create('Period') as period then IVLTSPeriod(eff, period);
  } &quot;where&quot;;
  // effectiveTime = time-stamp
  src where effectiveTime.low.exists().not() or effectiveTime.high.exists().not() then {
    src.effectiveTime as effectivetime1 -&gt; encounter.period = create('Period') as period then {
      effectivetime1 -&gt; period.start = create('dateTime') as start then TSDateTime(effectivetime1, start) &quot;val&quot;;
    } &quot;efft&quot;;
  } &quot;where&quot;;
  // src.effectiveTime as effectivetime1 -&gt; encounter.period as period, period.start=(effectivetime1.value);
  src.dischargeDispositionCode as dischargeDispositionCode then {
    dischargeDispositionCode -&gt; encounter.hospitalization as hospitalization then {
      dischargeDispositionCode -&gt; hospitalization.dischargeDisposition &quot;disDisp&quot;;
    } &quot;disposition&quot;;
  } &quot;discharge&quot;;
  src.responsibleParty as responsibleParty -&gt; encounter.participant as participant then {
    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 {
      entity.code -&gt; practitionerRole.code;
      entity -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Practitioner') as practitioner then {
        entity -&gt; practitioner.meta as meta then {
          entity -&gt; meta.tag = create('Coding') as coding then {
            entity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
            entity -&gt; coding.code = 'ClinicalDocument/componentOf/EncompassingEncounter/responsibleParty' &quot;code&quot;;
          } &quot;coding&quot;;
        } &quot;meta&quot;;
        entity.id as id -&gt; practitioner.identifier as identifier then {
          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
          id.extension as ext -&gt; identifier.value = ext;
          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
          id.root as r then {
            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);
          } &quot;r&quot;;
        } &quot;identifier&quot;;
        entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
        } &quot;2&quot;;
        entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
        } &quot;diverso&quot;;
        entity.addr -&gt; practitioner.address;
        entity.telecom -&gt; practitioner.telecom;
        entity.assignedPerson as person then {
          person.name -&gt; practitioner.name;
          person.birthTime as birthTime then {
            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10) &quot;birthTimeENC&quot;;
          } &quot;birth&quot;;
        } &quot;name&quot;;
      } &quot;practitioner&quot;;
      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 {
        raporg -&gt; rapresentedorganization.meta as meta then {
          raporg -&gt; meta.tag = create('Coding') as coding then {
            raporg -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
            raporg -&gt; coding.code = 'ClinicalDocument/componentOf/EncompassingEncounter/responsibleParty/representedOrganization' &quot;code&quot;;
          } &quot;coding&quot;;
        } &quot;meta&quot;;
        // raporg.id -&gt; rapresentedorganization.identifier;
        raporg.id as id -&gt; rapresentedorganization.identifier as identifier then {
          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
          id.extension as ext -&gt; identifier.value = ext then {
            raporg -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
          } &quot;ext&quot;;
          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
          id.root as r then {
            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);
          } &quot;r&quot;;
        } &quot;identifier&quot;;
        raporg.name as v -&gt; rapresentedorganization.name = (v.other);
        raporg.telecom -&gt; rapresentedorganization.telecom;
        raporg.addr -&gt; rapresentedorganization.address;
        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 {
          // OrgPartOf.id -&gt; organization1.identifier;
          OrgPartOf -&gt; organization1.meta as meta then {
            OrgPartOf -&gt; meta.tag = create('Coding') as coding then {
              OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
              OrgPartOf -&gt; coding.code = 'ClinicalDocument/componentOf/EncompassingEncounter/responsibleParty/representedOrganization/asOrganizationPartOf' &quot;code&quot;;
            } &quot;coding&quot;;
          } &quot;meta&quot;;
          OrgPartOf.id as id -&gt; organization1.identifier as identifier then {
            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
            id.extension as ext -&gt; identifier.value = ext then {
              OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
            } &quot;ext&quot;;
            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
            id.root as r then {
              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);
            } &quot;r&quot;;
          } &quot;identifier&quot;;
          OrgPartOf.code -&gt; organization1.type;
          OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = true;
          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 {
            // wholeOrgan.id -&gt; organization2.identifier;
            wholeOrgan -&gt; organization2.meta as meta then {
              wholeOrgan -&gt; meta.tag = create('Coding') as coding then {
                wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                wholeOrgan -&gt; coding.code = 'ClinicalDocument/componentOf/EncompassingEncounter/responsibleParty/representedOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
              } &quot;coding&quot;;
            } &quot;meta&quot;;
            wholeOrgan.id as id -&gt; organization2.identifier as identifier then {
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext then {
                wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
              } &quot;ext&quot;;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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);
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            wholeOrgan.name as v -&gt; organization2.name = (v.other);
            wholeOrgan.telecom -&gt; organization2.telecom;
            wholeOrgan.addr -&gt; organization2.address;
          } &quot;wholeOrgan&quot;;
        } &quot;OrgPartOf&quot;;
      } &quot;organization&quot;;
    } &quot;entity&quot;;
  } &quot;particpant&quot;;
  src.encounterParticipant as participant then {
    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 {
      // participant.time as time-&gt;participant1.period as period ,period.start=(time.value);
      participant -&gt; participant1.period = create('Period') as period then {
        participant.time as time -&gt; period.start = create('dateTime') as start then TSDateTime(time, start);
      } &quot;period&quot;;
      participant as p -&gt; participant1.type as type then {
        p -&gt; type.coding as coding then {
          p -&gt; coding.code = (p.typeCode) &quot;codice&quot;;
          p -&gt; coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' &quot;system&quot;;
        } &quot;codeType&quot;;
      } &quot;type&quot;;
      participant -&gt;  participant1.individual = create('Reference') as referencepart,  referencepart.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) &quot;par&quot;;
      participant.functionCode -&gt; practitionerRole.code;
      assignedEntity -&gt;  bundle.entry as e33,  e33.request = create('BackboneElement') as request,  request.method = 'PUT',  e33.resource = create('Practitioner') as practitioner then {
        assignedEntity -&gt; practitioner.meta as meta then {
          assignedEntity -&gt; meta.tag = create('Coding') as coding then {
            assignedEntity -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
            assignedEntity -&gt; coding.code = 'ClinicalDocument/encounterParticipant' &quot;code&quot;;
          } &quot;coding&quot;;
        } &quot;meta&quot;;
        assignedEntity.id as id -&gt; practitioner.identifier as identifier then {
          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
          id.extension as ext -&gt; identifier.value = ext;
          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
          id.root as r then {
            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);
          } &quot;r&quot;;
        } &quot;identifier&quot;;
        assignedEntity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
        } &quot;2&quot;;
        assignedEntity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
          id.extension as ext -&gt; request.url = append('Practitioner?identifier=', ext) &quot;UUID&quot;;
        } &quot;diverso&quot;;
        assignedEntity.code -&gt; practitionerRole.code;
        assignedEntity.addr -&gt; practitioner.address;
        assignedEntity.telecom -&gt; practitioner.telecom;
        assignedEntity.associatedPerson as assignedPerson then {
          assignedPerson.name -&gt; practitioner.name;
          assignedPerson.birthTime as birthTime then {
            birthTime.value as date -&gt; practitioner.birthDate = truncate(date, 10) &quot;birthTimelegal&quot;;
          } &quot;birth&quot;;
        } &quot;name&quot;;
        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 {
          representedOrganization -&gt; organization.meta as meta then {
            representedOrganization -&gt; meta.tag = create('Coding') as coding then {
              representedOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
              representedOrganization -&gt; coding.code = 'ClinicalDocument/encounterParticipant/scopingOrganization' &quot;code&quot;;
            } &quot;coding&quot;;
          } &quot;meta&quot;;
          representedOrganization.id as id -&gt; organization.identifier as identifier then {
            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
            id.extension as ext -&gt; identifier.value = ext then {
              representedOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
            } &quot;ext&quot;;
            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
            id.root as r then {
              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);
            } &quot;r&quot;;
          } &quot;identifier&quot;;
          representedOrganization.name as v -&gt; organization.name = (v.other);
          representedOrganization.telecom -&gt; organization.telecom;
          representedOrganization.addr -&gt; organization.address;
          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 {
            OrgPartOf.id as id -&gt; organization1.identifier as identifier then {
              OrgPartOf -&gt; organization1.meta as meta then {
                OrgPartOf -&gt; meta.tag = create('Coding') as coding then {
                  OrgPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  OrgPartOf -&gt; coding.code = 'ClinicalDocument/encounterParticipant/scopingOrganization/asOrganizationPartOf' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
              id.extension as ext -&gt; identifier.value = ext then {
                OrgPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
              } &quot;ext&quot;;
              id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
              id.root as r then {
                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);
              } &quot;r&quot;;
            } &quot;identifier&quot;;
            OrgPartOf.code -&gt; organization1.type;
            OrgPartOf.statusCode as status where (value = 'active') -&gt;  organization1.active = create('boolean'),  organization1.active = true;
            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 {
              wholeOrgan -&gt; organization2.meta as meta then {
                wholeOrgan -&gt; meta.tag = create('Coding') as coding then {
                  wholeOrgan -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  wholeOrgan -&gt; coding.code = 'ClinicalDocument/encounterParticipant/scopingOrganization/asOrganizationPartOf/wholeOrganization' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              wholeOrgan.id as id -&gt; organization2.identifier as identifier then {
                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                id.extension as ext -&gt; identifier.value = ext then {
                  wholeOrgan -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                } &quot;ext&quot;;
                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                id.root as r then {
                  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);
                } &quot;r&quot;;
              } &quot;identifier&quot;;
              wholeOrgan.name as v -&gt; organization2.name = (v.other);
              wholeOrgan.telecom -&gt; organization2.telecom;
              wholeOrgan.addr -&gt; organization2.address;
            } &quot;wholeOrgan&quot;;
          } &quot;OrgPartOf&quot;;
        };
      } &quot;assignedEntity&quot;;
    } &quot;Participant&quot;;
  };
  src.location as Location then {
    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 {
      HCF -&gt; loc.meta as meta then {
        HCF -&gt; meta.tag = create('Coding') as coding then {
          HCF -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
          HCF -&gt; coding.code = 'ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility' &quot;code&quot;;
        } &quot;coding&quot;;
      } &quot;meta&quot;;
      HCF -&gt; encounter.location as locations then {
        HCF.id as id -&gt; loc.identifier as identifier then {
          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
          id.extension as ext -&gt; identifier.value = ext then {
            HCF -&gt; request.url = append('Location?identifier=', ext) &quot;UUID&quot;;
          } &quot;ext&quot;;
          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
          id.root as r then {
            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;;
          } &quot;r&quot;;
        } &quot;identifier&quot;;
        HCF.code -&gt; loc.type;
        HCF.location as srcLocation then {
          srcLocation.name as v -&gt; loc.name = (v.other);
          srcLocation.addr -&gt; loc.address;
        } &quot;location2&quot;;
        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 {
          servProvOrg -&gt; serviceProviderOrganization.meta as meta then {
            servProvOrg -&gt; meta.tag = create('Coding') as coding then {
              servProvOrg -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
              servProvOrg -&gt; coding.code = 'ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility/serviceProviderOrganization' &quot;code&quot;;
            } &quot;coding&quot;;
          } &quot;meta&quot;;
          servProvOrg.id as id -&gt; serviceProviderOrganization.identifier as identifier then {
            id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
            id.extension as ext -&gt; identifier.value = ext then {
              servProvOrg -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
            } &quot;ext&quot;;
            id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
            id.root as r then {
              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);
            } &quot;r&quot;;
          } &quot;identifier&quot;;
          servProvOrg.name as v -&gt; serviceProviderOrganization.name = (v.other);
          servProvOrg.telecom -&gt; serviceProviderOrganization.telecom;
          servProvOrg.addr -&gt; serviceProviderOrganization.address;
          servProvOrg.asOrganizationPartOf as asOrgPartOf then {
            asOrgPartOf as asOrgPartOf1 -&gt;  bundle.entry as e1,  e1.request = create('BackboneElement') as request,  request.method = 'PUT',  e1.resource = create('Organization') as asorganization then {
              asOrgPartOf1 -&gt; asorganization.meta as meta then {
                asOrgPartOf1 -&gt; meta.tag = create('Coding') as coding then {
                  asOrgPartOf1 -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                  asOrgPartOf1 -&gt; coding.code = 'ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf' &quot;code&quot;;
                } &quot;coding&quot;;
              } &quot;meta&quot;;
              asOrgPartOf1.id as id -&gt; asorganization.identifier as identifier then {
                id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                id.extension as ext -&gt; identifier.value = ext then {
                  asOrgPartOf1 -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                } &quot;ext&quot;;
                id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                id.root as r then {
                  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);
                } &quot;r&quot;;
              } &quot;identifier&quot;;
              asOrgPartOf1.code -&gt; asorganization.type;
              asOrgPartOf1.statusCode as status where (code = 'active') -&gt;  asorganization.active = create('boolean'),  asorganization.active = 'true';
              asOrgPartOf1.wholeOrganization as wholeOrg then {
                wholeOrg as wholeOrg1 -&gt;  bundle.entry as e2,  e2.request = create('BackboneElement') as request,  request.method = 'PUT',  e2.resource = create('Organization') as wholeorganization then {
                  wholeOrg1 -&gt; wholeorganization.meta as meta then {
                    wholeOrg1 -&gt; meta.tag = create('Coding') as coding then {
                      wholeOrg1 -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
                      wholeOrg1 -&gt; coding.code = 'ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf' &quot;code&quot;;
                    } &quot;coding&quot;;
                  } &quot;meta&quot;;
                  wholeOrg1.id as id -&gt; asorganization.identifier as identifier then {
                    id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
                    id.extension as ext -&gt; identifier.value = ext then {
                      wholeOrg1 -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
                    } &quot;ext&quot;;
                    id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
                    id.root as r then {
                      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);
                    } &quot;r&quot;;
                  } &quot;identifier&quot;;
                  wholeOrg1.name as v -&gt; wholeorganization.name = (v.other);
                  wholeOrg1.telecom -&gt; wholeorganization.telecom;
                  wholeOrg1.addr -&gt; wholeorganization.address;
                } &quot;wholeOrg1&quot;;
              } &quot;wholeOrg&quot;;
            } &quot;OrganizationPartOfprovider&quot;;
          } &quot;asOrg1&quot;;
        } &quot;SPO&quot;;
      } &quot;hcf&quot;;
    } &quot;location1&quot;;
  };
}

group ClinicalDocumentationOf(source src : representedOrganization, target tgt : organization, target bundle : Bundle) {
  src.name -&gt; tgt.name;
  src.telecom -&gt; tgt.telecom;
  src.addr -&gt; tgt.address;
  src.asOrganizationPartOf as asOrganizationPartOf then {
    asOrganizationPartOf -&gt;  bundle.entry as e,  e.request = create('BackboneElement') as request,  request.method = 'PUT',  e.resource = create('Organization') as organization2 then {
      asOrganizationPartOf -&gt; organization2.meta as meta then {
        asOrganizationPartOf -&gt; meta.tag = create('Coding') as coding then {
          asOrganizationPartOf -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
          asOrganizationPartOf -&gt; coding.code = 'ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization/asOrganizationPartOf' &quot;code&quot;;
        } &quot;coding&quot;;
      } &quot;meta&quot;;
      asOrganizationPartOf.id as id -&gt; organization2.identifier as identifier then {
        id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
        id.extension as ext -&gt; identifier.value = ext then {
          asOrganizationPartOf -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
        } &quot;ext&quot;;
        id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
        id.root as r then {
          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);
        } &quot;r&quot;;
      } &quot;identifier&quot;;
      asOrganizationPartOf.code -&gt; organization2.type;
      asOrganizationPartOf.statusCode where (value = 'active') -&gt; organization2.active = 'true';
      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 {
        wholeOrganization -&gt; organization3.meta as meta then {
          wholeOrganization -&gt; meta.tag = create('Coding') as coding then {
            wholeOrganization -&gt; coding.system = 'http://algoritmodiscoring' &quot;system&quot;;
            wholeOrganization -&gt; coding.code = 'ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization/asOrganizationPartOf' &quot;code&quot;;
          } &quot;coding&quot;;
        } &quot;meta&quot;;
        wholeOrganization.id as id -&gt; organization3.identifier as identifier then {
          id.root as r -&gt; identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') &quot;root1&quot;;
          id.extension as ext -&gt; identifier.value = ext then {
            wholeOrganization -&gt; request.url = append('Organization?identifier=', ext) &quot;UUID&quot;;
          } &quot;ext&quot;;
          id.assigningAuthorityName as s -&gt;  identifier.assigner as a,  a.display = s;
          id.root as r then {
            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);
          } &quot;r&quot;;
        } &quot;identifier&quot;;
        wholeOrganization.id -&gt; organization3.identifier;
        wholeOrganization.name -&gt; organization3.name;
        wholeOrganization.telecom -&gt; organization3.telecom;
        wholeOrganization.addr -&gt; organization3.address;
      };
    } &quot;organizationPartOf&quot;;
  } &quot;creation&quot;;
}

group ChExtEprVersionNumber(source src : INT, target ext : Extension) {
  src -&gt; ext.url = 'http://hl7.org/fhir/StructureDefinition/composition-clinicaldocument-versionNumber' &quot;url&quot;;
  src.value as v -&gt; ext.value = cast(v, 'string');
}

group ClinicalDocumentOrganization(source src : CustodianOrganization, target tgt : Organization) {
  src.id -&gt; tgt.identifier;
  src.name as v -&gt; tgt.name = (v.other);
  src.telecom -&gt; tgt.telecom;
  src.addr -&gt; tgt.address;
}

</pre>
      </div>
  </text>
  <url value="http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader"/>
  <version value="0.1.0"/>
  <name value="cda2fhirHeader"/>
  <status value="draft"/>
  <date value="2024-09-15T08:16:12+00:00"/>
  <publisher value="HL7 Italy"/>
  <contact>
    <name value="HL7 Italy"/>
    <telecom>
      <system value="url"/>
      <value value="http://hl7.it"/>
    </telecom>
  </contact>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="IT"/>
      <display value="Italy"/>
    </coding>
  </jurisdiction>
  <structure>
    <url
         value="http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument"/>
    <mode value="source"/>
    <alias value="ClinicalDocument"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor"/>
    <mode value="queried"/>
    <alias value="AssignedAuthor"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity"/>
    <mode value="queried"/>
    <alias value="AssignedEntity"/>
  </structure>
  <structure>
    <url
         value="http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity"/>
    <mode value="queried"/>
    <alias value="AssociatedEntity"/>
  </structure>
  <structure>
    <url
         value="http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization"/>
    <mode value="queried"/>
    <alias value="CustodianOrganization"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/cda/StructureDefinition/Section"/>
    <mode value="queried"/>
    <alias value="Section"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/cda/StructureDefinition/PatientRole"/>
    <mode value="queried"/>
    <alias value="PatientRole"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
    <mode value="target"/>
    <alias value="Bundle"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Composition"/>
    <mode value="produced"/>
    <alias value="Composition"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Patient"/>
    <mode value="produced"/>
    <alias value="Patient"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
    <mode value="produced"/>
    <alias value="Encounter"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Person"/>
    <mode value="produced"/>
    <alias value="Patient"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
    <mode value="produced"/>
    <alias value="Practitioner"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Specimen"/>
    <mode value="produced"/>
    <alias value="Specimen"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Organization"/>
    <mode value="produced"/>
    <alias value="Organization"/>
  </structure>
  <structure>
    <url
         value="http://hl7.org/fhir/cda/StructureDefinition/HealthCareFacility"/>
    <mode value="queried"/>
    <alias value="HealthCareFacility"/>
  </structure>
  <import value="http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes"/>
  <group>
    <name value="CdaToBundle"/>
    <typeMode value="none"/>
    <input>
      <name value="cda"/>
      <type value="ClinicalDocument"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="bundle"/>
      <type value="Bundle"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="ClinicalDocumentToBody"/>
      <source>
        <context value="cda"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="entry"/>
        <variable value="e"/>
      </target>
      <target>
        <context value="e"/>
        <contextType value="variable"/>
        <element value="request"/>
        <variable value="request"/>
        <transform value="create"/>
        <parameter>
          <valueString value="BackboneElement"/>
        </parameter>
      </target>
      <target>
        <context value="request"/>
        <contextType value="variable"/>
        <element value="method"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="POST"/>
        </parameter>
      </target>
      <target>
        <context value="e"/>
        <contextType value="variable"/>
        <element value="resource"/>
        <variable value="composition"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Composition"/>
        </parameter>
      </target>
      <target>
        <context value="composition"/>
        <contextType value="variable"/>
        <element value="id"/>
        <variable value="uuid1"/>
        <transform value="uuid"/>
      </target>
      <target>
        <context value="e"/>
        <contextType value="variable"/>
        <element value="fullUrl"/>
        <transform value="append"/>
        <parameter>
          <valueString value="https://example/Composition/"/>
        </parameter>
        <parameter>
          <valueId value="uuid1"/>
        </parameter>
      </target>
      <target>
        <context value="request"/>
        <contextType value="variable"/>
        <element value="url"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="Composition"/>
        </parameter>
      </target>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="entry"/>
        <variable value="e2"/>
      </target>
      <target>
        <context value="e2"/>
        <contextType value="variable"/>
        <element value="request"/>
        <variable value="requestPAT"/>
        <transform value="create"/>
        <parameter>
          <valueString value="BackboneElement"/>
        </parameter>
      </target>
      <target>
        <context value="requestPAT"/>
        <contextType value="variable"/>
        <element value="method"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="PUT"/>
        </parameter>
      </target>
      <target>
        <context value="e2"/>
        <contextType value="variable"/>
        <element value="resource"/>
        <variable value="patient"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Patient"/>
        </parameter>
      </target>
      <target>
        <context value="patient"/>
        <contextType value="variable"/>
        <element value="id"/>
        <variable value="uuid2"/>
        <transform value="uuid"/>
      </target>
      <target>
        <context value="e2"/>
        <contextType value="variable"/>
        <element value="fullUrl"/>
        <transform value="append"/>
        <parameter>
          <valueString value="https://example/Patient/"/>
        </parameter>
        <parameter>
          <valueId value="uuid2"/>
        </parameter>
      </target>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="entry"/>
        <variable value="e3"/>
      </target>
      <target>
        <context value="e3"/>
        <contextType value="variable"/>
        <element value="request"/>
        <variable value="request"/>
        <transform value="create"/>
        <parameter>
          <valueString value="BackboneElement"/>
        </parameter>
      </target>
      <target>
        <context value="request"/>
        <contextType value="variable"/>
        <element value="method"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="POST"/>
        </parameter>
      </target>
      <target>
        <context value="e3"/>
        <contextType value="variable"/>
        <element value="resource"/>
        <variable value="encounter"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Encounter"/>
        </parameter>
      </target>
      <target>
        <context value="encounter"/>
        <contextType value="variable"/>
        <element value="id"/>
        <variable value="uuid3"/>
        <transform value="uuid"/>
      </target>
      <target>
        <context value="e3"/>
        <contextType value="variable"/>
        <element value="fullUrl"/>
        <transform value="append"/>
        <parameter>
          <valueString value="https://example/Encounter/"/>
        </parameter>
        <parameter>
          <valueId value="uuid3"/>
        </parameter>
      </target>
      <target>
        <context value="request"/>
        <contextType value="variable"/>
        <element value="url"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="Encounter"/>
        </parameter>
      </target>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="entry"/>
        <variable value="e4"/>
      </target>
      <target>
        <context value="e4"/>
        <contextType value="variable"/>
        <element value="request"/>
        <variable value="request"/>
        <transform value="create"/>
        <parameter>
          <valueString value="BackboneElement"/>
        </parameter>
      </target>
      <target>
        <context value="request"/>
        <contextType value="variable"/>
        <element value="method"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="POST"/>
        </parameter>
      </target>
      <target>
        <context value="e4"/>
        <contextType value="variable"/>
        <element value="resource"/>
        <variable value="DocumentReference"/>
        <transform value="create"/>
        <parameter>
          <valueString value="DocumentReference"/>
        </parameter>
      </target>
      <target>
        <context value="DocumentReference"/>
        <contextType value="variable"/>
        <element value="id"/>
        <variable value="uuid4"/>
        <transform value="uuid"/>
      </target>
      <target>
        <context value="e4"/>
        <contextType value="variable"/>
        <element value="fullUrl"/>
        <transform value="append"/>
        <parameter>
          <valueString value="https://example/DocumentReference/"/>
        </parameter>
        <parameter>
          <valueId value="uuid3"/>
        </parameter>
      </target>
      <target>
        <context value="request"/>
        <contextType value="variable"/>
        <element value="url"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="DocumentReference"/>
        </parameter>
      </target>
      <rule>
        <name value="cdatobundle"/>
        <source>
          <context value="cda"/>
        </source>
        <dependent>
          <name value="ClinicalDocumentToBundle"/>
          <variable value="cda"/>
          <variable value="patient"/>
          <variable value="composition"/>
          <variable value="encounter"/>
          <variable value="bundle"/>
          <variable value="DocumentReference"/>
        </dependent>
      </rule>
      <rule>
        <name value="patient"/>
        <source>
          <context value="cda"/>
          <element value="recordTarget"/>
          <variable value="recordTarget"/>
        </source>
        <rule>
          <name value="recPat"/>
          <source>
            <context value="recordTarget"/>
            <element value="patientRole"/>
            <variable value="patient"/>
          </source>
          <rule>
            <name value="record"/>
            <source>
              <context value="patient"/>
              <element value="id"/>
              <variable value="id"/>
            </source>
            <target>
              <context value="patient"/>
              <contextType value="variable"/>
              <element value="identifier"/>
              <variable value="identifier"/>
            </target>
            <rule>
              <name value="root1"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="translate"/>
                <parameter>
                  <valueId value="r"/>
                </parameter>
                <parameter>
                  <valueString
                               value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                </parameter>
                <parameter>
                  <valueString value="uri"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="value"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="assigningAuthorityName"/>
              <source>
                <context value="id"/>
                <element value="assigningAuthorityName"/>
                <variable value="s"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="assigner"/>
                <variable value="a"/>
              </target>
              <target>
                <context value="a"/>
                <contextType value="variable"/>
                <element value="display"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="s"/>
                </parameter>
              </target>
              <documentation
                             value="r -&gt; requestPAT.url = append('Patient?identifier=',ext) &quot;UUID&quot;;"/>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="ClinicalDocumentToBundle"/>
    <typeMode value="none"/>
    <input>
      <name value="cda"/>
      <type value="ClinicalDocument"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="patient"/>
      <type value="Patient"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="composition"/>
      <type value="Composition"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="encounter"/>
      <type value="Encounter"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="bundle"/>
      <type value="Bundle"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="DocumentReference"/>
      <type value="DocumentReference"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id"/>
      <source>
        <context value="cda"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </target>
    </rule>
    <rule>
      <name value="identifier"/>
      <source>
        <context value="cda"/>
        <element value="id"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="type"/>
      <source>
        <context value="cda"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="type"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="transaction"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="date"/>
      <source>
        <context value="cda"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="timestamp"/>
        <transform value="evaluate"/>
        <parameter>
          <valueString value="timestamp.now()"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="composition"/>
      <source>
        <context value="cda"/>
      </source>
      <dependent>
        <name value="ClinicalDocumentComposition"/>
        <variable value="cda"/>
        <variable value="composition"/>
        <variable value="patient"/>
        <variable value="encounter"/>
        <variable value="bundle"/>
        <variable value="DocumentReference"/>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="ClinicalDocumentComposition"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="ClinicalDocument"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="Composition"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="patientResource"/>
      <type value="Patient"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="encounter"/>
      <type value="Encounter"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="bundle"/>
      <type value="Bundle"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="DocumentReference"/>
      <type value="DocumentReference"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="languageCode"/>
      <source>
        <context value="src"/>
        <element value="languageCode"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="language"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="status"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="DocumentReference"/>
        <contextType value="variable"/>
        <element value="status"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="current"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="content"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="DocumentReference"/>
        <contextType value="variable"/>
        <element value="content"/>
        <variable value="content"/>
        <transform value="create"/>
        <parameter>
          <valueString value="BackboneElement"/>
        </parameter>
      </target>
      <rule>
        <name value="comp"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="content"/>
          <contextType value="variable"/>
          <element value="attachment"/>
          <variable value="attachment"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Attachment"/>
          </parameter>
        </target>
        <target>
          <context value="attachment"/>
          <contextType value="variable"/>
          <element value="title"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="string"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="context"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="DocumentReference"/>
        <contextType value="variable"/>
        <element value="context"/>
        <variable value="context"/>
        <transform value="create"/>
        <parameter>
          <valueString value="BackboneElement"/>
        </parameter>
      </target>
      <rule>
        <name value="comp"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="context"/>
          <contextType value="variable"/>
          <element value="related"/>
          <variable value="referenceComp"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Reference"/>
          </parameter>
        </target>
        <target>
          <context value="referenceComp"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString value="'https://example/Composition/' + %tgt.id"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="identifier"/>
      <source>
        <context value="src"/>
        <element value="id"/>
        <variable value="vvv"/>
        <condition value="src.setId.exists().not()"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="identifier"/>
      <source>
        <context value="src"/>
        <element value="setId"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="status"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="status"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="final"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="code"/>
      <source>
        <context value="src"/>
        <element value="code"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="type"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="title"/>
      <source>
        <context value="src"/>
        <element value="title"/>
        <variable value="t"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="title"/>
        <transform value="evaluate"/>
        <parameter>
          <valueString value="t.dataString"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="title"/>
      <source>
        <context value="src"/>
        <condition value="src.title.exists().not()"/>
      </source>
      <rule>
        <name value="display"/>
        <source>
          <context value="src"/>
          <element value="code"/>
          <variable value="code"/>
        </source>
        <rule>
          <name value="displayName"/>
          <source>
            <context value="code"/>
            <element value="displayName"/>
            <variable value="display"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="title"/>
            <transform value="cast"/>
            <parameter>
              <valueId value="display"/>
            </parameter>
            <parameter>
              <valueString value="string"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="effectiveTime"/>
      <source>
        <context value="src"/>
        <element value="effectiveTime"/>
        <variable value="effectiveTime"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="date"/>
        <variable value="value"/>
        <transform value="create"/>
        <parameter>
          <valueString value="dateTime"/>
        </parameter>
      </target>
      <dependent>
        <name value="TSDateTime"/>
        <variable value="effectiveTime"/>
        <variable value="value"/>
      </dependent>
    </rule>
    <rule>
      <name value="versionNumber"/>
      <source>
        <context value="src"/>
        <element value="versionNumber"/>
        <variable value="versionNumber"/>
        <condition value="(value &gt; 1)"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="extension"/>
        <variable value="ext2"/>
      </target>
      <dependent>
        <name value="ChExtEprVersionNumber"/>
        <variable value="versionNumber"/>
        <variable value="ext2"/>
      </dependent>
    </rule>
    <rule>
      <name value="confidentialityCode"/>
      <source>
        <context value="src"/>
        <element value="confidentialityCode"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="confidentiality"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="patientRole"/>
      <source>
        <context value="src"/>
        <element value="recordTarget"/>
        <variable value="recordTarget"/>
      </source>
      <rule>
        <name value="subject"/>
        <source>
          <context value="recordTarget"/>
          <element value="patientRole"/>
          <variable value="patient"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="subject"/>
          <variable value="reference"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Reference"/>
          </parameter>
        </target>
        <target>
          <context value="reference"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString
                         value="'https://example/Patient/' + %patientResource.id"/>
          </parameter>
        </target>
        <dependent>
          <name value="ClinicalDocumentPatientRole"/>
          <variable value="patient"/>
          <variable value="patientResource"/>
          <variable value="bundle"/>
        </dependent>
      </rule>
      <rule>
        <name value="patientRole"/>
        <source>
          <context value="recordTarget"/>
          <element value="patientRole"/>
          <variable value="patient"/>
        </source>
        <target>
          <context value="DocumentReference"/>
          <contextType value="variable"/>
          <element value="subject"/>
          <variable value="reference1"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Reference"/>
          </parameter>
        </target>
        <target>
          <context value="reference1"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString
                         value="'https://example/Patient/' + %patientResource.id"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="srcAuthor"/>
      <source>
        <context value="src"/>
        <element value="author"/>
        <variable value="srcAuthor"/>
      </source>
      <rule>
        <name value="time"/>
        <source>
          <context value="srcAuthor"/>
          <element value="time"/>
          <variable value="time"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="date"/>
        </target>
      </rule>
      <rule>
        <name value="assignedAuthor"/>
        <source>
          <context value="srcAuthor"/>
          <element value="assignedAuthor"/>
          <variable value="assignedAuthor"/>
        </source>
        <rule>
          <name value="OIDCF"/>
          <source>
            <context value="assignedAuthor"/>
            <element value="id"/>
            <variable value="id"/>
            <condition value="(root != '2.16.840.1.113883.2.9.6.3.2')"/>
          </source>
          <rule>
            <name value="ParcatitionerROL"/>
            <source>
              <context value="assignedAuthor"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e1"/>
            </target>
            <target>
              <context value="e1"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="POST"/>
              </parameter>
            </target>
            <target>
              <context value="e1"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="practitionerRole"/>
              <transform value="create"/>
              <parameter>
                <valueString value="PractitionerRole"/>
              </parameter>
            </target>
            <target>
              <context value="practitionerRole"/>
              <contextType value="variable"/>
              <element value="id"/>
              <variable value="uuid1"/>
              <transform value="uuid"/>
            </target>
            <target>
              <context value="e1"/>
              <contextType value="variable"/>
              <element value="fullUrl"/>
              <transform value="append"/>
              <parameter>
                <valueString value="https://example/PractitionerRole/"/>
              </parameter>
              <parameter>
                <valueId value="uuid1"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="url"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="PractitionerRole"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="author"/>
              <variable value="reference"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <target>
              <context value="reference"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="evaluate"/>
              <parameter>
                <valueString
                             value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
              </parameter>
            </target>
            <rule>
              <name value="ASSAUth"/>
              <source>
                <context value="assignedAuthor"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e2"/>
              </target>
              <target>
                <context value="e2"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e2"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="practitioner"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Practitioner"/>
                </parameter>
              </target>
              <rule>
                <name value="functionCode"/>
                <source>
                  <context value="srcAuthor"/>
                  <element value="functionCode"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitionerRole"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="meta"/>
                <source>
                  <context value="assignedAuthor"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="meta"/>
                  <variable value="meta"/>
                </target>
                <rule>
                  <name value="coding"/>
                  <source>
                    <context value="assignedAuthor"/>
                  </source>
                  <target>
                    <context value="meta"/>
                    <contextType value="variable"/>
                    <element value="tag"/>
                    <variable value="coding"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Coding"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="system"/>
                    <source>
                      <context value="assignedAuthor"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="http://algoritmodiscoring"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="assignedAuthor"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="code"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="ClinicalDocument/author"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="assignedAuthor"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitionerRole"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="assignedAuthor"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                  <documentation value="then {"/>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="aut"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="practitioner"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid2"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e2"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Practitioner/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid2"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="practitionerRole"/>
                      <contextType value="variable"/>
                      <element value="practitioner"/>
                      <variable value="reference"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="reference"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString
                                     value="'https://example/Practitioner/' + %practitioner.id"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="2.16.840.1.113883.2.9.4.3.2"/>
                <source>
                  <context value="assignedAuthor"/>
                  <element value="id"/>
                  <variable value="id"/>
                  <condition value="(root = '2.16.840.1.113883.2.9.4.3.2')"/>
                </source>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Practitioner?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="diverso"/>
                <source>
                  <context value="assignedAuthor"/>
                  <element value="id"/>
                  <variable value="id"/>
                  <condition value="(root != '2.16.840.1.113883.2.9.4.3.2')"/>
                </source>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Practitioner?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="addr"/>
                <source>
                  <context value="assignedAuthor"/>
                  <element value="addr"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="address"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="telecom"/>
                <source>
                  <context value="assignedAuthor"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="name"/>
                <source>
                  <context value="assignedAuthor"/>
                  <element value="assignedPerson"/>
                  <variable value="person"/>
                </source>
                <rule>
                  <name value="name"/>
                  <source>
                    <context value="person"/>
                    <element value="name"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="practitioner"/>
                    <contextType value="variable"/>
                    <element value="name"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="birth"/>
                  <source>
                    <context value="person"/>
                    <element value="birthTime"/>
                    <variable value="birthTime"/>
                  </source>
                  <rule>
                    <name value="value"/>
                    <source>
                      <context value="birthTime"/>
                      <element value="value"/>
                      <variable value="date"/>
                    </source>
                    <target>
                      <context value="practitioner"/>
                      <contextType value="variable"/>
                      <element value="birthDate"/>
                      <transform value="truncate"/>
                      <parameter>
                        <valueId value="date"/>
                      </parameter>
                      <parameter>
                        <valueInteger value="10"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="refAuth"/>
                <source>
                  <context value="assignedAuthor"/>
                </source>
                <target>
                  <context value="DocumentReference"/>
                  <contextType value="variable"/>
                  <element value="author"/>
                  <variable value="referenceAuth"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <target>
                  <context value="referenceAuth"/>
                  <contextType value="variable"/>
                  <element value="reference"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString
                                 value="'https://example/Practitioner/' + %practitioner.id"/>
                  </parameter>
                </target>
              </rule>
              <documentation
                             value="assignedAuthor.code as codice -&gt; practitionerRole.code as code2 then CECodeableConcept(codice,code2);"/>
            </rule>
            <rule>
              <name value="representedOrganization"/>
              <source>
                <context value="assignedAuthor"/>
                <element value="representedOrganization"/>
                <variable value="representedOrganization"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e3"/>
              </target>
              <target>
                <context value="e3"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e3"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="organization"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Organization"/>
                </parameter>
              </target>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="representedOrganization"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="ext"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="UUID"/>
                    <source>
                      <context value="representedOrganization"/>
                    </source>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="Organization?identifier="/>
                      </parameter>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="aut"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="organization"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid3"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e3"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Organization/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid3"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="practitionerRole"/>
                      <contextType value="variable"/>
                      <element value="organization"/>
                      <variable value="referenceOrg"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="referenceOrg"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Organization/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid3"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="meta"/>
                <source>
                  <context value="representedOrganization"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="meta"/>
                  <variable value="meta"/>
                </target>
                <rule>
                  <name value="coding"/>
                  <source>
                    <context value="representedOrganization"/>
                  </source>
                  <target>
                    <context value="meta"/>
                    <contextType value="variable"/>
                    <element value="tag"/>
                    <variable value="coding"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Coding"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="system"/>
                    <source>
                      <context value="representedOrganization"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="http://algoritmodiscoring"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="representedOrganization"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="code"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString
                                     value="ClinicalDocument/author/representedOrganization"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="name"/>
                <source>
                  <context value="representedOrganization"/>
                  <element value="name"/>
                  <variable value="v"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="name"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="v.other"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="telecom"/>
                <source>
                  <context value="representedOrganization"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="addr"/>
                <source>
                  <context value="representedOrganization"/>
                  <element value="addr"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="address"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="OrgPartOf"/>
                <source>
                  <context value="representedOrganization"/>
                  <element value="asOrganizationPartOf"/>
                  <variable value="OrgPartOf"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e4"/>
                </target>
                <target>
                  <context value="e4"/>
                  <contextType value="variable"/>
                  <element value="request"/>
                  <variable value="request"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="BackboneElement"/>
                  </parameter>
                </target>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="method"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="PUT"/>
                  </parameter>
                </target>
                <target>
                  <context value="e4"/>
                  <contextType value="variable"/>
                  <element value="resource"/>
                  <variable value="organization1"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Organization"/>
                  </parameter>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="OrgPartOf"/>
                  </source>
                  <target>
                    <context value="organization1"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="OrgPartOf"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="OrgPartOf"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/author/representedOrganization/asOrganizationPartOf"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="identifier"/>
                  <source>
                    <context value="OrgPartOf"/>
                    <element value="id"/>
                    <variable value="id"/>
                  </source>
                  <target>
                    <context value="organization1"/>
                    <contextType value="variable"/>
                    <element value="identifier"/>
                    <variable value="identifier"/>
                  </target>
                  <rule>
                    <name value="root1"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="translate"/>
                      <parameter>
                        <valueId value="r"/>
                      </parameter>
                      <parameter>
                        <valueString
                                     value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                      </parameter>
                      <parameter>
                        <valueString value="uri"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="ext"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="value"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="UUID"/>
                      <source>
                        <context value="OrgPartOf"/>
                      </source>
                      <target>
                        <context value="request"/>
                        <contextType value="variable"/>
                        <element value="url"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="Organization?identifier="/>
                        </parameter>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                  <rule>
                    <name value="assigningAuthorityName"/>
                    <source>
                      <context value="id"/>
                      <element value="assigningAuthorityName"/>
                      <variable value="s"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="assigner"/>
                      <variable value="a"/>
                    </target>
                    <target>
                      <context value="a"/>
                      <contextType value="variable"/>
                      <element value="display"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="s"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="r"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <rule>
                      <name value="aut"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="organization1"/>
                        <contextType value="variable"/>
                        <element value="id"/>
                        <variable value="uuid4"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="r + '-' + ext"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e4"/>
                        <contextType value="variable"/>
                        <element value="fullUrl"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Organization/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid4"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="organization"/>
                        <contextType value="variable"/>
                        <element value="partOf"/>
                        <variable value="reference"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Reference"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="reference"/>
                        <contextType value="variable"/>
                        <element value="reference"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString
                                       value="'https://example/Organization/' + %organization1.id"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="OrgPartOf"/>
                    <element value="code"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization1"/>
                    <contextType value="variable"/>
                    <element value="type"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="statusCode"/>
                  <source>
                    <context value="OrgPartOf"/>
                    <element value="statusCode"/>
                    <variable value="status"/>
                    <condition value="(value = 'active')"/>
                  </source>
                  <target>
                    <context value="organization1"/>
                    <contextType value="variable"/>
                    <element value="active"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="boolean"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="organization1"/>
                    <contextType value="variable"/>
                    <element value="active"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="true"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="wholeOrganization"/>
                  <source>
                    <context value="OrgPartOf"/>
                    <element value="wholeOrganization"/>
                    <variable value="wholeOrgan"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e10bis"/>
                  </target>
                  <target>
                    <context value="e10bis"/>
                    <contextType value="variable"/>
                    <element value="request"/>
                    <variable value="request"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="BackboneElement"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="method"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="PUT"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e10bis"/>
                    <contextType value="variable"/>
                    <element value="resource"/>
                    <variable value="organization2"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Organization"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="meta"/>
                    <source>
                      <context value="wholeOrgan"/>
                    </source>
                    <target>
                      <context value="organization2"/>
                      <contextType value="variable"/>
                      <element value="meta"/>
                      <variable value="meta"/>
                    </target>
                    <rule>
                      <name value="coding"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="meta"/>
                        <contextType value="variable"/>
                        <element value="tag"/>
                        <variable value="coding"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Coding"/>
                        </parameter>
                      </target>
                      <rule>
                        <name value="system"/>
                        <source>
                          <context value="wholeOrgan"/>
                        </source>
                        <target>
                          <context value="coding"/>
                          <contextType value="variable"/>
                          <element value="system"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueString value="http://algoritmodiscoring"/>
                          </parameter>
                        </target>
                      </rule>
                      <rule>
                        <name value="code"/>
                        <source>
                          <context value="wholeOrgan"/>
                        </source>
                        <target>
                          <context value="coding"/>
                          <contextType value="variable"/>
                          <element value="code"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueString
                                         value="ClinicalDocument/author/representedOrganization/asOrganizationPartOf/wholeOrganization"/>
                          </parameter>
                        </target>
                      </rule>
                    </rule>
                  </rule>
                  <rule>
                    <name value="identifier"/>
                    <source>
                      <context value="wholeOrgan"/>
                      <element value="id"/>
                      <variable value="id"/>
                    </source>
                    <target>
                      <context value="organization2"/>
                      <contextType value="variable"/>
                      <element value="identifier"/>
                      <variable value="identifier"/>
                    </target>
                    <rule>
                      <name value="root1"/>
                      <source>
                        <context value="id"/>
                        <element value="root"/>
                        <variable value="r"/>
                      </source>
                      <target>
                        <context value="identifier"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="translate"/>
                        <parameter>
                          <valueId value="r"/>
                        </parameter>
                        <parameter>
                          <valueString
                                       value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                        </parameter>
                        <parameter>
                          <valueString value="uri"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="ext"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="identifier"/>
                        <contextType value="variable"/>
                        <element value="value"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                      <rule>
                        <name value="UUID"/>
                        <source>
                          <context value="wholeOrgan"/>
                        </source>
                        <target>
                          <context value="request"/>
                          <contextType value="variable"/>
                          <element value="url"/>
                          <transform value="append"/>
                          <parameter>
                            <valueString value="Organization?identifier="/>
                          </parameter>
                          <parameter>
                            <valueId value="ext"/>
                          </parameter>
                        </target>
                      </rule>
                    </rule>
                    <rule>
                      <name value="assigningAuthorityName"/>
                      <source>
                        <context value="id"/>
                        <element value="assigningAuthorityName"/>
                        <variable value="s"/>
                      </source>
                      <target>
                        <context value="identifier"/>
                        <contextType value="variable"/>
                        <element value="assigner"/>
                        <variable value="a"/>
                      </target>
                      <target>
                        <context value="a"/>
                        <contextType value="variable"/>
                        <element value="display"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueId value="s"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="r"/>
                      <source>
                        <context value="id"/>
                        <element value="root"/>
                        <variable value="r"/>
                      </source>
                      <rule>
                        <name value="aut"/>
                        <source>
                          <context value="id"/>
                          <element value="extension"/>
                          <variable value="ext"/>
                        </source>
                        <target>
                          <context value="organization2"/>
                          <contextType value="variable"/>
                          <element value="id"/>
                          <variable value="uuid5"/>
                          <transform value="evaluate"/>
                          <parameter>
                            <valueString value="r + '-' + ext"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="e10bis"/>
                          <contextType value="variable"/>
                          <element value="fullUrl"/>
                          <transform value="append"/>
                          <parameter>
                            <valueString
                                         value="https://example/Organization/"/>
                          </parameter>
                          <parameter>
                            <valueId value="uuid5"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="organization1"/>
                          <contextType value="variable"/>
                          <element value="partOf"/>
                          <variable value="reference"/>
                          <transform value="create"/>
                          <parameter>
                            <valueString value="Reference"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="reference"/>
                          <contextType value="variable"/>
                          <element value="reference"/>
                          <transform value="evaluate"/>
                          <parameter>
                            <valueString
                                         value="'https://example/Organization/' + %organization2.id"/>
                          </parameter>
                        </target>
                      </rule>
                    </rule>
                  </rule>
                  <rule>
                    <name value="name"/>
                    <source>
                      <context value="wholeOrgan"/>
                      <element value="name"/>
                      <variable value="v"/>
                    </source>
                    <target>
                      <context value="organization2"/>
                      <contextType value="variable"/>
                      <element value="name"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="v.other"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="telecom"/>
                    <source>
                      <context value="wholeOrgan"/>
                      <element value="telecom"/>
                      <variable value="vvv"/>
                    </source>
                    <target>
                      <context value="organization2"/>
                      <contextType value="variable"/>
                      <element value="telecom"/>
                      <variable value="vvv"/>
                      <transform value="create"/>
                    </target>
                  </rule>
                  <rule>
                    <name value="addr"/>
                    <source>
                      <context value="wholeOrgan"/>
                      <element value="addr"/>
                      <variable value="vvv"/>
                    </source>
                    <target>
                      <context value="organization2"/>
                      <contextType value="variable"/>
                      <element value="address"/>
                      <variable value="vvv"/>
                      <transform value="create"/>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
          <documentation value="Codice Fiscale"/>
        </rule>
        <rule>
          <name value="oidPartitaIVA"/>
          <source>
            <context value="assignedAuthor"/>
            <element value="id"/>
            <variable value="id"/>
            <condition value="(root = '2.16.840.1.113883.2.9.6.3.2')"/>
          </source>
          <rule>
            <name value="Device"/>
            <source>
              <context value="assignedAuthor"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e6bis3"/>
            </target>
            <target>
              <context value="e6bis3"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="POST"/>
              </parameter>
            </target>
            <target>
              <context value="e6bis3"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="device"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Device"/>
              </parameter>
            </target>
            <target>
              <context value="device"/>
              <contextType value="variable"/>
              <element value="id"/>
              <variable value="uuid6bis3"/>
              <transform value="uuid"/>
            </target>
            <target>
              <context value="e6bis3"/>
              <contextType value="variable"/>
              <element value="fullUrl"/>
              <transform value="append"/>
              <parameter>
                <valueString value="https://example/Device/"/>
              </parameter>
              <parameter>
                <valueId value="uuid6bis3"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="url"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="Device"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="author"/>
              <variable value="reference"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <target>
              <context value="reference"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="evaluate"/>
              <parameter>
                <valueString value="'https://example/Device/' + %device.id"/>
              </parameter>
            </target>
            <rule>
              <name value="OrgPartitaIVA"/>
              <source>
                <context value="assignedAuthor"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e251"/>
              </target>
              <target>
                <context value="e251"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e251"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="organization"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Organization"/>
                </parameter>
              </target>
              <rule>
                <name value="meta"/>
                <source>
                  <context value="assignedAuthor"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="meta"/>
                  <variable value="meta"/>
                </target>
                <rule>
                  <name value="coding"/>
                  <source>
                    <context value="assignedAuthor"/>
                  </source>
                  <target>
                    <context value="meta"/>
                    <contextType value="variable"/>
                    <element value="tag"/>
                    <variable value="coding"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Coding"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="system"/>
                    <source>
                      <context value="assignedAuthor"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="http://algoritmodiscoring"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="assignedAuthor"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="code"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString
                                     value="ClinicalDocument/AuthorPartitaIVA"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="assignedAuthor"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="ext"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="UUID"/>
                    <source>
                      <context value="assignedAuthor"/>
                    </source>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="Organization?identifier="/>
                      </parameter>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="extension"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="organization"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid2"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e251"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Organization/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid2"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="device"/>
                      <contextType value="variable"/>
                      <element value="owner"/>
                      <variable value="reference"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="reference"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString
                                     value="'https://example/Organization/' + %organization.id"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
          <documentation value="Partita IVA"/>
        </rule>
        <rule>
          <name value="NullFlavor"/>
          <source>
            <context value="assignedAuthor"/>
            <element value="id"/>
            <variable value="id"/>
            <condition value="nullFlavor.exists()"/>
          </source>
          <rule>
            <name value="Device"/>
            <source>
              <context value="assignedAuthor"/>
              <element value="assignedAuthoringDevice"/>
              <variable value="assignedAuthoringDevice"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e6bis"/>
            </target>
            <target>
              <context value="e6bis"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="POST"/>
              </parameter>
            </target>
            <target>
              <context value="e6bis"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="device"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Device"/>
              </parameter>
            </target>
            <target>
              <context value="device"/>
              <contextType value="variable"/>
              <element value="id"/>
              <variable value="uuid6bis"/>
              <transform value="uuid"/>
            </target>
            <target>
              <context value="e6bis"/>
              <contextType value="variable"/>
              <element value="fullUrl"/>
              <transform value="append"/>
              <parameter>
                <valueString value="https://example/Device/"/>
              </parameter>
              <parameter>
                <valueId value="uuid6bis"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="url"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="Device"/>
              </parameter>
            </target>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="author"/>
              <variable value="reference"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <target>
              <context value="reference"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="evaluate"/>
              <parameter>
                <valueString value="'https://example/Device' + %device.id"/>
              </parameter>
            </target>
            <rule>
              <name value="code"/>
              <source>
                <context value="assignedAuthoringDevice"/>
                <element value="code"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="device"/>
                <contextType value="variable"/>
                <element value="type"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
              <documentation
                             value="assignedAuthoringDevice.templateId -&gt; device.identifier;"/>
            </rule>
            <rule>
              <name value="manufacturer"/>
              <source>
                <context value="assignedAuthoringDevice"/>
                <element value="manufacturerModelName"/>
                <variable value="manufacturerModelName"/>
              </source>
              <rule>
                <name value="displayRule"/>
                <source>
                  <context value="manufacturerModelName"/>
                  <variable value="m"/>
                </source>
                <target>
                  <context value="device"/>
                  <contextType value="variable"/>
                  <element value="manufacturer"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="m.displayName"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <rule>
              <name value="deviceName"/>
              <source>
                <context value="assignedAuthoringDevice"/>
                <element value="softwareName"/>
                <variable value="softwareName"/>
              </source>
              <target>
                <context value="device"/>
                <contextType value="variable"/>
                <element value="deviceName"/>
                <variable value="deviceName"/>
              </target>
              <rule>
                <name value="typeName"/>
                <source>
                  <context value="softwareName"/>
                </source>
                <target>
                  <context value="deviceName"/>
                  <contextType value="variable"/>
                  <element value="type"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="other"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="name"/>
                <source>
                  <context value="softwareName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="deviceName"/>
                  <contextType value="variable"/>
                  <element value="name"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="s.displayName"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <documentation value="ID nullFlavor"/>
        </rule>
      </rule>
      <rule>
        <name value="DataEnter"/>
        <source>
          <context value="src"/>
          <element value="dataEnterer"/>
          <variable value="dataEnt"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="e6"/>
        </target>
        <target>
          <context value="e6"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="POST"/>
          </parameter>
        </target>
        <target>
          <context value="e6"/>
          <contextType value="variable"/>
          <element value="resource"/>
          <variable value="practitionerRole"/>
          <transform value="create"/>
          <parameter>
            <valueString value="PractitionerRole"/>
          </parameter>
        </target>
        <target>
          <context value="practitionerRole"/>
          <contextType value="variable"/>
          <element value="id"/>
          <variable value="uuid1"/>
          <transform value="uuid"/>
        </target>
        <target>
          <context value="e6"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="https://example/PractitionerRole/"/>
          </parameter>
          <parameter>
            <valueId value="uuid1"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PractitionerRole"/>
          </parameter>
        </target>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="author"/>
          <variable value="reference"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Reference"/>
          </parameter>
        </target>
        <target>
          <context value="reference"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString
                         value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
          </parameter>
        </target>
        <rule>
          <name value="time"/>
          <source>
            <context value="dataEnt"/>
            <element value="time"/>
            <variable value="time"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="date"/>
          </target>
        </rule>
        <rule>
          <name value="AssignedEntity"/>
          <source>
            <context value="dataEnt"/>
            <element value="assignedEntity"/>
            <variable value="assignedEntity"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="e7"/>
          </target>
          <target>
            <context value="e7"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="PUT"/>
            </parameter>
          </target>
          <target>
            <context value="e7"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="practitioner"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Practitioner"/>
            </parameter>
          </target>
          <rule>
            <name value="meta"/>
            <source>
              <context value="assignedEntity"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="meta"/>
              <variable value="meta"/>
            </target>
            <rule>
              <name value="coding"/>
              <source>
                <context value="assignedEntity"/>
              </source>
              <target>
                <context value="meta"/>
                <contextType value="variable"/>
                <element value="tag"/>
                <variable value="coding"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Coding"/>
                </parameter>
              </target>
              <rule>
                <name value="system"/>
                <source>
                  <context value="assignedEntity"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="http://algoritmodiscoring"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="assignedEntity"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="ClinicalDocument/dataEnterer"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="code"/>
            <source>
              <context value="assignedEntity"/>
              <element value="code"/>
              <variable value="codice"/>
            </source>
            <target>
              <context value="practitionerRole"/>
              <contextType value="variable"/>
              <element value="code"/>
              <variable value="code2"/>
            </target>
            <dependent>
              <name value="CECodeableConcept"/>
              <variable value="codice"/>
              <variable value="code2"/>
            </dependent>
          </rule>
          <rule>
            <name value="identifier"/>
            <source>
              <context value="assignedEntity"/>
              <element value="id"/>
              <variable value="id"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="identifier"/>
              <variable value="identifier"/>
            </target>
            <rule>
              <name value="root1"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="translate"/>
                <parameter>
                  <valueId value="r"/>
                </parameter>
                <parameter>
                  <valueString
                               value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                </parameter>
                <parameter>
                  <valueString value="uri"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="extension"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="assigningAuthorityName"/>
              <source>
                <context value="id"/>
                <element value="assigningAuthorityName"/>
                <variable value="s"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="assigner"/>
                <variable value="a"/>
              </target>
              <target>
                <context value="a"/>
                <contextType value="variable"/>
                <element value="display"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="s"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="r"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <rule>
                <name value="dataenterer"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <variable value="uuid2"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="r + '-' + ext"/>
                  </parameter>
                </target>
                <target>
                  <context value="e7"/>
                  <contextType value="variable"/>
                  <element value="fullUrl"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="https://example/Practitioner/"/>
                  </parameter>
                  <parameter>
                    <valueId value="uuid2"/>
                  </parameter>
                </target>
                <target>
                  <context value="practitionerRole"/>
                  <contextType value="variable"/>
                  <element value="practitioner"/>
                  <variable value="reference"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <target>
                  <context value="reference"/>
                  <contextType value="variable"/>
                  <element value="reference"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString
                                 value="'https://example/Practitioner/' + %practitioner.id"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="2.16.840.1.113883.2.9.4.3.2"/>
            <source>
              <context value="assignedEntity"/>
              <element value="id"/>
              <variable value="id"/>
              <condition value="(root = '2.16.840.1.113883.2.9.4.3.2')"/>
            </source>
            <rule>
              <name value="UUID"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="url"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="Practitioner?identifier="/>
                </parameter>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="diverso"/>
            <source>
              <context value="assignedEntity"/>
              <element value="id"/>
              <variable value="id"/>
              <condition value="(root != '2.16.840.1.113883.2.9.4.3.2')"/>
            </source>
            <rule>
              <name value="UUID"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="url"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="Practitioner?identifier="/>
                </parameter>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="addr"/>
            <source>
              <context value="assignedEntity"/>
              <element value="addr"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="address"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="telecom"/>
            <source>
              <context value="assignedEntity"/>
              <element value="telecom"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="telecom"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="assignedPerson"/>
            <source>
              <context value="assignedEntity"/>
              <element value="assignedPerson"/>
              <variable value="person"/>
            </source>
            <rule>
              <name value="name"/>
              <source>
                <context value="person"/>
                <element value="name"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="practitioner"/>
                <contextType value="variable"/>
                <element value="name"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="birth"/>
              <source>
                <context value="person"/>
                <element value="birthTime"/>
                <variable value="birthTime"/>
              </source>
              <rule>
                <name value="value"/>
                <source>
                  <context value="birthTime"/>
                  <element value="value"/>
                  <variable value="date"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="birthDate"/>
                  <transform value="truncate"/>
                  <parameter>
                    <valueId value="date"/>
                  </parameter>
                  <parameter>
                    <valueInteger value="10"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="RepresentedOrganization"/>
            <source>
              <context value="assignedEntity"/>
              <element value="representedOrganization"/>
              <variable value="representedOrganization"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e8"/>
            </target>
            <target>
              <context value="e8"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="PUT"/>
              </parameter>
            </target>
            <target>
              <context value="e8"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="organization"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Organization"/>
              </parameter>
            </target>
            <rule>
              <name value="meta"/>
              <source>
                <context value="representedOrganization"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="meta"/>
                <variable value="meta"/>
              </target>
              <rule>
                <name value="coding"/>
                <source>
                  <context value="representedOrganization"/>
                </source>
                <target>
                  <context value="meta"/>
                  <contextType value="variable"/>
                  <element value="tag"/>
                  <variable value="coding"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Coding"/>
                  </parameter>
                </target>
                <rule>
                  <name value="system"/>
                  <source>
                    <context value="representedOrganization"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="http://algoritmodiscoring"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="representedOrganization"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="code"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString
                                   value="ClinicalDocument/dataEnterer/representedOrganization"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="identifier"/>
              <source>
                <context value="representedOrganization"/>
                <element value="id"/>
                <variable value="id"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="identifier"/>
              </target>
              <rule>
                <name value="root1"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="translate"/>
                  <parameter>
                    <valueId value="r"/>
                  </parameter>
                  <parameter>
                    <valueString
                                 value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                  </parameter>
                  <parameter>
                    <valueString value="uri"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="ext"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="value"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="representedOrganization"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Organization?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="assigningAuthorityName"/>
                <source>
                  <context value="id"/>
                  <element value="assigningAuthorityName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="assigner"/>
                  <variable value="a"/>
                </target>
                <target>
                  <context value="a"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="s"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="r"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <rule>
                  <name value="dataenterer"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="id"/>
                    <variable value="uuid3"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="r + '-' + ext"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e8"/>
                    <contextType value="variable"/>
                    <element value="fullUrl"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Organization/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid3"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="practitionerRole"/>
                    <contextType value="variable"/>
                    <element value="organization"/>
                    <variable value="referenceOrg"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Reference"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="referenceOrg"/>
                    <contextType value="variable"/>
                    <element value="reference"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Organization/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid3"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="name"/>
              <source>
                <context value="representedOrganization"/>
                <element value="name"/>
                <variable value="v"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="name"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="v.other"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="representedOrganization"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="addr"/>
              <source>
                <context value="representedOrganization"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="asOrganizationPartOf"/>
              <source>
                <context value="representedOrganization"/>
                <element value="asOrganizationPartOf"/>
                <variable value="OrgPartOf"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e9"/>
              </target>
              <target>
                <context value="e9"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e9"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="organization1"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Organization"/>
                </parameter>
              </target>
              <rule>
                <name value="meta"/>
                <source>
                  <context value="OrgPartOf"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="meta"/>
                  <variable value="meta"/>
                </target>
                <rule>
                  <name value="coding"/>
                  <source>
                    <context value="OrgPartOf"/>
                  </source>
                  <target>
                    <context value="meta"/>
                    <contextType value="variable"/>
                    <element value="tag"/>
                    <variable value="coding"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Coding"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="system"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="http://algoritmodiscoring"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="code"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString
                                     value="ClinicalDocument/dataEnterer/representedOrganization/asOrganizationPartOf"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="ext"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="UUID"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="Organization?identifier="/>
                      </parameter>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="dataenterer"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid4"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e9"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Organization/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid4"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="organization"/>
                      <contextType value="variable"/>
                      <element value="partOf"/>
                      <variable value="reference"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="reference"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString
                                     value="'https://example/Organization/' + %organization1.id"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="type"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="statusCode"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="statusCode"/>
                  <variable value="status"/>
                  <condition value="(value = 'active')"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="active"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="boolean"/>
                  </parameter>
                </target>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="active"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="true"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="wholeOrganization"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="wholeOrganization"/>
                  <variable value="wholeOrgan"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e10"/>
                </target>
                <target>
                  <context value="e10"/>
                  <contextType value="variable"/>
                  <element value="request"/>
                  <variable value="request"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="BackboneElement"/>
                  </parameter>
                </target>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="method"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="PUT"/>
                  </parameter>
                </target>
                <target>
                  <context value="e10"/>
                  <contextType value="variable"/>
                  <element value="resource"/>
                  <variable value="organization2"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Organization"/>
                  </parameter>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="wholeOrgan"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="wholeOrgan"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/dataEnterer/representedOrganization/asOrganizationPartOf/wholeOrganization"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="identifier"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="id"/>
                    <variable value="id"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="identifier"/>
                    <variable value="identifier"/>
                  </target>
                  <rule>
                    <name value="root1"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="translate"/>
                      <parameter>
                        <valueId value="r"/>
                      </parameter>
                      <parameter>
                        <valueString
                                     value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                      </parameter>
                      <parameter>
                        <valueString value="uri"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="ext"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="value"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="UUID"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="request"/>
                        <contextType value="variable"/>
                        <element value="url"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="Organization?identifier="/>
                        </parameter>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                  <rule>
                    <name value="assigningAuthorityName"/>
                    <source>
                      <context value="id"/>
                      <element value="assigningAuthorityName"/>
                      <variable value="s"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="assigner"/>
                      <variable value="a"/>
                    </target>
                    <target>
                      <context value="a"/>
                      <contextType value="variable"/>
                      <element value="display"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="s"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="r"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <rule>
                      <name value="dataenterer"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="organization2"/>
                        <contextType value="variable"/>
                        <element value="id"/>
                        <variable value="uuid5"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="r + '-' + ext"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e10"/>
                        <contextType value="variable"/>
                        <element value="fullUrl"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Organization/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid5"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="organization1"/>
                        <contextType value="variable"/>
                        <element value="partOf"/>
                        <variable value="reference"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Reference"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="reference"/>
                        <contextType value="variable"/>
                        <element value="reference"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString
                                       value="'https://example/Organization/' + %organization2.id"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="name"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="name"/>
                    <variable value="v"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="name"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="v.other"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="telecom"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="addr"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="addr"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="address"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
        <documentation value="START DATA ENTER"/>
      </rule>
      <documentation value="START AUTHOR"/>
    </rule>
    <rule>
      <name value="inform"/>
      <source>
        <context value="src"/>
        <element value="informant"/>
        <variable value="informant"/>
      </source>
      <rule>
        <name value="informant"/>
        <source>
          <context value="informant"/>
          <element value="assignedEntity"/>
          <variable value="assignedEntity"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="e11"/>
        </target>
        <target>
          <context value="e11"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="POST"/>
          </parameter>
        </target>
        <target>
          <context value="e11"/>
          <contextType value="variable"/>
          <element value="resource"/>
          <variable value="practitionerRole"/>
          <transform value="create"/>
          <parameter>
            <valueString value="PractitionerRole"/>
          </parameter>
        </target>
        <target>
          <context value="practitionerRole"/>
          <contextType value="variable"/>
          <element value="id"/>
          <variable value="uuid1"/>
          <transform value="uuid"/>
        </target>
        <target>
          <context value="e11"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="https://example/PractitionerRole/"/>
          </parameter>
          <parameter>
            <valueId value="uuid1"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PractitionerRole"/>
          </parameter>
        </target>
        <rule>
          <name value="attester"/>
          <source>
            <context value="informant"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="attester"/>
            <variable value="attester"/>
          </target>
          <rule>
            <name value="mode"/>
            <source>
              <context value="informant"/>
            </source>
            <target>
              <context value="attester"/>
              <contextType value="variable"/>
              <element value="mode"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="professional"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="reference"/>
            <source>
              <context value="informant"/>
            </source>
            <target>
              <context value="attester"/>
              <contextType value="variable"/>
              <element value="party"/>
              <variable value="reference"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <target>
              <context value="reference"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="evaluate"/>
              <parameter>
                <valueString
                             value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="code"/>
            <source>
              <context value="assignedEntity"/>
              <element value="code"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitionerRole"/>
              <contextType value="variable"/>
              <element value="code"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="assignedEntity"/>
            <source>
              <context value="assignedEntity"/>
              <variable value="entity"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e12"/>
            </target>
            <target>
              <context value="e12"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="PUT"/>
              </parameter>
            </target>
            <target>
              <context value="e12"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="practitioner"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Practitioner"/>
              </parameter>
            </target>
            <rule>
              <name value="meta"/>
              <source>
                <context value="entity"/>
              </source>
              <target>
                <context value="practitioner"/>
                <contextType value="variable"/>
                <element value="meta"/>
                <variable value="meta"/>
              </target>
              <rule>
                <name value="coding"/>
                <source>
                  <context value="entity"/>
                </source>
                <target>
                  <context value="meta"/>
                  <contextType value="variable"/>
                  <element value="tag"/>
                  <variable value="coding"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Coding"/>
                  </parameter>
                </target>
                <rule>
                  <name value="system"/>
                  <source>
                    <context value="entity"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="http://algoritmodiscoring"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="entity"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="code"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="ClinicalDocument/informant"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="identifier"/>
              <source>
                <context value="entity"/>
                <element value="id"/>
                <variable value="id"/>
              </source>
              <target>
                <context value="practitioner"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="identifier"/>
              </target>
              <rule>
                <name value="root1"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="translate"/>
                  <parameter>
                    <valueId value="r"/>
                  </parameter>
                  <parameter>
                    <valueString
                                 value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                  </parameter>
                  <parameter>
                    <valueString value="uri"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="extension"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="value"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="assigningAuthorityName"/>
                <source>
                  <context value="id"/>
                  <element value="assigningAuthorityName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="assigner"/>
                  <variable value="a"/>
                </target>
                <target>
                  <context value="a"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="s"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="r"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <rule>
                  <name value="dataenterer"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="practitioner"/>
                    <contextType value="variable"/>
                    <element value="id"/>
                    <variable value="uuid2"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="r + '-' + ext"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e12"/>
                    <contextType value="variable"/>
                    <element value="fullUrl"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Practitioner/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid2"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="practitionerRole"/>
                    <contextType value="variable"/>
                    <element value="practitioner"/>
                    <variable value="reference"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Reference"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="reference"/>
                    <contextType value="variable"/>
                    <element value="reference"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString
                                   value="'https://example/Practitioner/' + %practitioner.id"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="2.16.840.1.113883.2.9.4.3.2"/>
              <source>
                <context value="assignedEntity"/>
                <element value="id"/>
                <variable value="id"/>
                <condition value="(root = '2.16.840.1.113883.2.9.4.3.2')"/>
              </source>
              <rule>
                <name value="UUID"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="url"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="Practitioner?identifier="/>
                  </parameter>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <rule>
              <name value="diverso"/>
              <source>
                <context value="assignedEntity"/>
                <element value="id"/>
                <variable value="id"/>
                <condition value="(root != '2.16.840.1.113883.2.9.4.3.2')"/>
              </source>
              <rule>
                <name value="UUID"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="url"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="Practitioner?identifier="/>
                  </parameter>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <rule>
              <name value="addr"/>
              <source>
                <context value="entity"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="practitioner"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="entity"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="practitioner"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="person"/>
              <source>
                <context value="entity"/>
                <element value="assignedPerson"/>
                <variable value="person"/>
              </source>
              <rule>
                <name value="name"/>
                <source>
                  <context value="person"/>
                  <element value="name"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="name"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="birth"/>
                <source>
                  <context value="person"/>
                  <element value="birthTime"/>
                  <variable value="birthTime"/>
                </source>
                <rule>
                  <name value="value"/>
                  <source>
                    <context value="birthTime"/>
                    <element value="value"/>
                    <variable value="date"/>
                  </source>
                  <target>
                    <context value="practitioner"/>
                    <contextType value="variable"/>
                    <element value="birthDate"/>
                    <transform value="truncate"/>
                    <parameter>
                      <valueId value="date"/>
                    </parameter>
                    <parameter>
                      <valueInteger value="10"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="organization"/>
              <source>
                <context value="entity"/>
                <element value="representedOrganization"/>
                <variable value="representedOrganization"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e13"/>
              </target>
              <target>
                <context value="e13"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e13"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="organization"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Organization"/>
                </parameter>
              </target>
              <rule>
                <name value="meta"/>
                <source>
                  <context value="representedOrganization"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="meta"/>
                  <variable value="meta"/>
                </target>
                <rule>
                  <name value="coding"/>
                  <source>
                    <context value="representedOrganization"/>
                  </source>
                  <target>
                    <context value="meta"/>
                    <contextType value="variable"/>
                    <element value="tag"/>
                    <variable value="coding"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Coding"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="system"/>
                    <source>
                      <context value="representedOrganization"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="http://algoritmodiscoring"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="representedOrganization"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="code"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString
                                     value="ClinicalDocument/informant/representedOrganization"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="representedOrganization"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="ext"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="UUID"/>
                    <source>
                      <context value="representedOrganization"/>
                    </source>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="Organization?identifier="/>
                      </parameter>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="extension"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="organization"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid3"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e13"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Organization/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid3"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="practitionerRole"/>
                      <contextType value="variable"/>
                      <element value="organization"/>
                      <variable value="reference"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="reference"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString
                                     value="'https://example/Organization/' + %organization.id"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="name"/>
                <source>
                  <context value="representedOrganization"/>
                  <element value="name"/>
                  <variable value="v"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="name"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="v.other"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="telecom"/>
                <source>
                  <context value="representedOrganization"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="addr"/>
                <source>
                  <context value="representedOrganization"/>
                  <element value="addr"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="address"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="qualification"/>
                <source>
                  <context value="representedOrganization"/>
                  <element value="asOrganizationPartOf"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="partOf"/>
                  <variable value="partOf"/>
                </target>
                <rule>
                  <name value="partOf"/>
                  <source>
                    <context value="representedOrganization"/>
                    <element value="asOrganizationPartOf"/>
                    <variable value="organizationPartOf"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e14"/>
                  </target>
                  <target>
                    <context value="e14"/>
                    <contextType value="variable"/>
                    <element value="request"/>
                    <variable value="request"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="BackboneElement"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="method"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="PUT"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e14"/>
                    <contextType value="variable"/>
                    <element value="resource"/>
                    <variable value="organization1"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Organization"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="meta"/>
                    <source>
                      <context value="organizationPartOf"/>
                    </source>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="meta"/>
                      <variable value="meta"/>
                    </target>
                    <rule>
                      <name value="coding"/>
                      <source>
                        <context value="organizationPartOf"/>
                      </source>
                      <target>
                        <context value="meta"/>
                        <contextType value="variable"/>
                        <element value="tag"/>
                        <variable value="coding"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Coding"/>
                        </parameter>
                      </target>
                      <rule>
                        <name value="system"/>
                        <source>
                          <context value="organizationPartOf"/>
                        </source>
                        <target>
                          <context value="coding"/>
                          <contextType value="variable"/>
                          <element value="system"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueString value="http://algoritmodiscoring"/>
                          </parameter>
                        </target>
                      </rule>
                      <rule>
                        <name value="code"/>
                        <source>
                          <context value="organizationPartOf"/>
                        </source>
                        <target>
                          <context value="coding"/>
                          <contextType value="variable"/>
                          <element value="code"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueString
                                         value="ClinicalDocument/informant/representedOrganization/asOrganizationPartOf"/>
                          </parameter>
                        </target>
                      </rule>
                    </rule>
                  </rule>
                  <rule>
                    <name value="identifier"/>
                    <source>
                      <context value="organizationPartOf"/>
                      <element value="id"/>
                      <variable value="id"/>
                    </source>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="identifier"/>
                      <variable value="identifier"/>
                    </target>
                    <rule>
                      <name value="root1"/>
                      <source>
                        <context value="id"/>
                        <element value="root"/>
                        <variable value="r"/>
                      </source>
                      <target>
                        <context value="identifier"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="translate"/>
                        <parameter>
                          <valueId value="r"/>
                        </parameter>
                        <parameter>
                          <valueString
                                       value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                        </parameter>
                        <parameter>
                          <valueString value="uri"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="ext"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="identifier"/>
                        <contextType value="variable"/>
                        <element value="value"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                      <rule>
                        <name value="UUID"/>
                        <source>
                          <context value="organizationPartOf"/>
                        </source>
                        <target>
                          <context value="request"/>
                          <contextType value="variable"/>
                          <element value="url"/>
                          <transform value="append"/>
                          <parameter>
                            <valueString value="Organization?identifier="/>
                          </parameter>
                          <parameter>
                            <valueId value="ext"/>
                          </parameter>
                        </target>
                      </rule>
                    </rule>
                    <rule>
                      <name value="assigningAuthorityName"/>
                      <source>
                        <context value="id"/>
                        <element value="assigningAuthorityName"/>
                        <variable value="s"/>
                      </source>
                      <target>
                        <context value="identifier"/>
                        <contextType value="variable"/>
                        <element value="assigner"/>
                        <variable value="a"/>
                      </target>
                      <target>
                        <context value="a"/>
                        <contextType value="variable"/>
                        <element value="display"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueId value="s"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="r"/>
                      <source>
                        <context value="id"/>
                        <element value="root"/>
                        <variable value="r"/>
                      </source>
                      <rule>
                        <name value="extension"/>
                        <source>
                          <context value="id"/>
                          <element value="extension"/>
                          <variable value="ext"/>
                        </source>
                        <target>
                          <context value="organization1"/>
                          <contextType value="variable"/>
                          <element value="id"/>
                          <variable value="uuid4"/>
                          <transform value="evaluate"/>
                          <parameter>
                            <valueString value="r + '-' + ext"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="e14"/>
                          <contextType value="variable"/>
                          <element value="fullUrl"/>
                          <transform value="append"/>
                          <parameter>
                            <valueString
                                         value="https://example/Organization/"/>
                          </parameter>
                          <parameter>
                            <valueId value="uuid4"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="organization"/>
                          <contextType value="variable"/>
                          <element value="partOf"/>
                          <variable value="reference"/>
                          <transform value="create"/>
                          <parameter>
                            <valueString value="Reference"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="reference"/>
                          <contextType value="variable"/>
                          <element value="reference"/>
                          <transform value="evaluate"/>
                          <parameter>
                            <valueString
                                         value="'https://example/Organization/' + %organization1.id"/>
                          </parameter>
                        </target>
                      </rule>
                    </rule>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="organizationPartOf"/>
                      <element value="code"/>
                      <variable value="vvv"/>
                    </source>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="type"/>
                      <variable value="vvv"/>
                      <transform value="create"/>
                    </target>
                  </rule>
                  <rule>
                    <name value="statusCode"/>
                    <source>
                      <context value="organizationPartOf"/>
                      <element value="statusCode"/>
                      <variable value="status"/>
                      <condition value="(code = 'active')"/>
                    </source>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="active"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="boolean"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="active"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="true"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="asOrganizationPartOf"/>
                    <source>
                      <context value="organizationPartOf"/>
                      <element value="wholeOrganization"/>
                    </source>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="partOf"/>
                      <variable value="partOf1"/>
                    </target>
                    <rule>
                      <name value="wholeOrganization"/>
                      <source>
                        <context value="organizationPartOf"/>
                        <element value="wholeOrganization"/>
                        <variable value="wholeOrganization"/>
                      </source>
                      <target>
                        <context value="bundle"/>
                        <contextType value="variable"/>
                        <element value="entry"/>
                        <variable value="e15"/>
                      </target>
                      <target>
                        <context value="e15"/>
                        <contextType value="variable"/>
                        <element value="request"/>
                        <variable value="request"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="BackboneElement"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="request"/>
                        <contextType value="variable"/>
                        <element value="method"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="PUT"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e15"/>
                        <contextType value="variable"/>
                        <element value="resource"/>
                        <variable value="organization2"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Organization"/>
                        </parameter>
                      </target>
                      <rule>
                        <name value="meta"/>
                        <source>
                          <context value="wholeOrganization"/>
                        </source>
                        <target>
                          <context value="organization2"/>
                          <contextType value="variable"/>
                          <element value="meta"/>
                          <variable value="meta"/>
                        </target>
                        <rule>
                          <name value="coding"/>
                          <source>
                            <context value="wholeOrganization"/>
                          </source>
                          <target>
                            <context value="meta"/>
                            <contextType value="variable"/>
                            <element value="tag"/>
                            <variable value="coding"/>
                            <transform value="create"/>
                            <parameter>
                              <valueString value="Coding"/>
                            </parameter>
                          </target>
                          <rule>
                            <name value="system"/>
                            <source>
                              <context value="wholeOrganization"/>
                            </source>
                            <target>
                              <context value="coding"/>
                              <contextType value="variable"/>
                              <element value="system"/>
                              <transform value="copy"/>
                              <parameter>
                                <valueString
                                             value="http://algoritmodiscoring"/>
                              </parameter>
                            </target>
                          </rule>
                          <rule>
                            <name value="code"/>
                            <source>
                              <context value="wholeOrganization"/>
                            </source>
                            <target>
                              <context value="coding"/>
                              <contextType value="variable"/>
                              <element value="code"/>
                              <transform value="copy"/>
                              <parameter>
                                <valueString
                                             value="ClinicalDocument/informant/representedOrganization/asOrganizationPartOf/wholeOrganization"/>
                              </parameter>
                            </target>
                          </rule>
                        </rule>
                      </rule>
                      <rule>
                        <name value="identifier"/>
                        <source>
                          <context value="wholeOrganization"/>
                          <element value="id"/>
                          <variable value="id"/>
                        </source>
                        <target>
                          <context value="organization2"/>
                          <contextType value="variable"/>
                          <element value="identifier"/>
                          <variable value="identifier"/>
                        </target>
                        <rule>
                          <name value="root1"/>
                          <source>
                            <context value="id"/>
                            <element value="root"/>
                            <variable value="r"/>
                          </source>
                          <target>
                            <context value="identifier"/>
                            <contextType value="variable"/>
                            <element value="system"/>
                            <transform value="translate"/>
                            <parameter>
                              <valueId value="r"/>
                            </parameter>
                            <parameter>
                              <valueString
                                           value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                            </parameter>
                            <parameter>
                              <valueString value="uri"/>
                            </parameter>
                          </target>
                        </rule>
                        <rule>
                          <name value="ext"/>
                          <source>
                            <context value="id"/>
                            <element value="extension"/>
                            <variable value="ext"/>
                          </source>
                          <target>
                            <context value="identifier"/>
                            <contextType value="variable"/>
                            <element value="value"/>
                            <transform value="copy"/>
                            <parameter>
                              <valueId value="ext"/>
                            </parameter>
                          </target>
                          <rule>
                            <name value="UUID"/>
                            <source>
                              <context value="wholeOrganization"/>
                            </source>
                            <target>
                              <context value="request"/>
                              <contextType value="variable"/>
                              <element value="url"/>
                              <transform value="append"/>
                              <parameter>
                                <valueString
                                             value="Organization?identifier="/>
                              </parameter>
                              <parameter>
                                <valueId value="ext"/>
                              </parameter>
                            </target>
                          </rule>
                        </rule>
                        <rule>
                          <name value="assigningAuthorityName"/>
                          <source>
                            <context value="id"/>
                            <element value="assigningAuthorityName"/>
                            <variable value="s"/>
                          </source>
                          <target>
                            <context value="identifier"/>
                            <contextType value="variable"/>
                            <element value="assigner"/>
                            <variable value="a"/>
                          </target>
                          <target>
                            <context value="a"/>
                            <contextType value="variable"/>
                            <element value="display"/>
                            <transform value="copy"/>
                            <parameter>
                              <valueId value="s"/>
                            </parameter>
                          </target>
                        </rule>
                        <rule>
                          <name value="r"/>
                          <source>
                            <context value="id"/>
                            <element value="root"/>
                            <variable value="r"/>
                          </source>
                          <rule>
                            <name value="extension"/>
                            <source>
                              <context value="id"/>
                              <element value="extension"/>
                              <variable value="ext"/>
                            </source>
                            <target>
                              <context value="organization2"/>
                              <contextType value="variable"/>
                              <element value="id"/>
                              <variable value="uuid5"/>
                              <transform value="evaluate"/>
                              <parameter>
                                <valueString value="r + '-' + ext"/>
                              </parameter>
                            </target>
                            <target>
                              <context value="e15"/>
                              <contextType value="variable"/>
                              <element value="fullUrl"/>
                              <transform value="append"/>
                              <parameter>
                                <valueString
                                             value="https://example/Organization/"/>
                              </parameter>
                              <parameter>
                                <valueId value="uuid5"/>
                              </parameter>
                            </target>
                            <target>
                              <context value="organization1"/>
                              <contextType value="variable"/>
                              <element value="partOf"/>
                              <variable value="reference"/>
                              <transform value="create"/>
                              <parameter>
                                <valueString value="Reference"/>
                              </parameter>
                            </target>
                            <target>
                              <context value="reference"/>
                              <contextType value="variable"/>
                              <element value="reference"/>
                              <transform value="evaluate"/>
                              <parameter>
                                <valueString
                                             value="'https://example/Organization/' + %organization2.id"/>
                              </parameter>
                            </target>
                          </rule>
                        </rule>
                      </rule>
                      <rule>
                        <name value="name"/>
                        <source>
                          <context value="wholeOrganization"/>
                          <element value="name"/>
                          <variable value="v"/>
                        </source>
                        <target>
                          <context value="organization2"/>
                          <contextType value="variable"/>
                          <element value="name"/>
                          <transform value="evaluate"/>
                          <parameter>
                            <valueString value="v.other"/>
                          </parameter>
                        </target>
                      </rule>
                      <rule>
                        <name value="telecom"/>
                        <source>
                          <context value="wholeOrganization"/>
                          <element value="telecom"/>
                          <variable value="vvv"/>
                        </source>
                        <target>
                          <context value="organization2"/>
                          <contextType value="variable"/>
                          <element value="telecom"/>
                          <variable value="vvv"/>
                          <transform value="create"/>
                        </target>
                      </rule>
                      <rule>
                        <name value="addr"/>
                        <source>
                          <context value="wholeOrganization"/>
                          <element value="addr"/>
                          <variable value="vvv"/>
                        </source>
                        <target>
                          <context value="organization2"/>
                          <contextType value="variable"/>
                          <element value="address"/>
                          <variable value="vvv"/>
                          <transform value="create"/>
                        </target>
                      </rule>
                    </rule>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <documentation value="START INFORMANT 1"/>
    </rule>
    <rule>
      <name value="inform2"/>
      <source>
        <context value="src"/>
        <element value="informant"/>
        <variable value="informant"/>
      </source>
      <rule>
        <name value="informant"/>
        <source>
          <context value="informant"/>
          <element value="relatedEntity"/>
          <variable value="related"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="e16"/>
        </target>
        <target>
          <context value="e16"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="POST"/>
          </parameter>
        </target>
        <target>
          <context value="e16"/>
          <contextType value="variable"/>
          <element value="resource"/>
          <variable value="relatedPerson"/>
          <transform value="create"/>
          <parameter>
            <valueString value="RelatedPerson"/>
          </parameter>
        </target>
        <target>
          <context value="relatedPerson"/>
          <contextType value="variable"/>
          <element value="id"/>
          <variable value="uuid1"/>
          <transform value="uuid"/>
        </target>
        <target>
          <context value="e16"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="https://example/RelatedPerson/"/>
          </parameter>
          <parameter>
            <valueId value="uuid1"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="RelatedPerson"/>
          </parameter>
        </target>
        <rule>
          <name value="relatedPerson"/>
          <source>
            <context value="informant"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="attester"/>
            <variable value="attester"/>
          </target>
          <rule>
            <name value="mode"/>
            <source>
              <context value="informant"/>
            </source>
            <target>
              <context value="attester"/>
              <contextType value="variable"/>
              <element value="mode"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="professional"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="reference"/>
            <source>
              <context value="informant"/>
            </source>
            <target>
              <context value="attester"/>
              <contextType value="variable"/>
              <element value="party"/>
              <variable value="reference"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <target>
              <context value="reference"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="evaluate"/>
              <parameter>
                <valueString
                             value="'https://example/RelatedPerson/' + %relatedPerson.id"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="relatedPerson1"/>
            <source>
              <context value="related"/>
              <element value="relatedPerson"/>
              <variable value="Person"/>
            </source>
            <rule>
              <name value="code"/>
              <source>
                <context value="related"/>
                <element value="code"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="relatedPerson"/>
                <contextType value="variable"/>
                <element value="relationship"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="related"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="relatedPerson"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="addr"/>
              <source>
                <context value="related"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="relatedPerson"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="name"/>
              <source>
                <context value="Person"/>
                <element value="name"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="relatedPerson"/>
                <contextType value="variable"/>
                <element value="name"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="birthinformant"/>
              <source>
                <context value="related"/>
                <element value="birthTime"/>
                <variable value="date"/>
              </source>
              <rule>
                <name value="valueD"/>
                <source>
                  <context value="date"/>
                  <element value="value"/>
                  <variable value="value"/>
                </source>
                <target>
                  <context value="relatedPerson"/>
                  <contextType value="variable"/>
                  <element value="birthDate"/>
                  <transform value="truncate"/>
                  <parameter>
                    <valueId value="value"/>
                  </parameter>
                  <parameter>
                    <valueInteger value="10"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <rule>
              <name value="reference"/>
              <source>
                <context value="related"/>
              </source>
              <target>
                <context value="relatedPerson"/>
                <contextType value="variable"/>
                <element value="patient"/>
                <variable value="reference"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Reference"/>
                </parameter>
              </target>
              <target>
                <context value="reference"/>
                <contextType value="variable"/>
                <element value="reference"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString
                               value="'https://example/Patient/' + %patientResource.id"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
      <documentation value="START INFORMANT 2"/>
    </rule>
    <rule>
      <name value="custodian"/>
      <source>
        <context value="src"/>
        <element value="custodian"/>
        <variable value="custodian"/>
      </source>
      <rule>
        <name value="organization"/>
        <source>
          <context value="custodian"/>
          <element value="assignedCustodian"/>
          <variable value="assignedCustodian"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="e17"/>
        </target>
        <target>
          <context value="e17"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PUT"/>
          </parameter>
        </target>
        <target>
          <context value="e17"/>
          <contextType value="variable"/>
          <element value="resource"/>
          <variable value="Organization"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Organization"/>
          </parameter>
        </target>
        <rule>
          <name value="meta"/>
          <source>
            <context value="assignedCustodian"/>
          </source>
          <target>
            <context value="Organization"/>
            <contextType value="variable"/>
            <element value="meta"/>
            <variable value="meta"/>
          </target>
          <rule>
            <name value="coding"/>
            <source>
              <context value="assignedCustodian"/>
            </source>
            <target>
              <context value="meta"/>
              <contextType value="variable"/>
              <element value="tag"/>
              <variable value="coding"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Coding"/>
              </parameter>
            </target>
            <rule>
              <name value="system"/>
              <source>
                <context value="assignedCustodian"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="http://algoritmodiscoring"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="code"/>
              <source>
                <context value="assignedCustodian"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="code"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="ClinicalDocument/custodian"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="representedCustodianOrganization"/>
          <source>
            <context value="assignedCustodian"/>
            <element value="representedCustodianOrganization"/>
            <variable value="representedCustodianOrganization"/>
          </source>
          <rule>
            <name value="identifier"/>
            <source>
              <context value="representedCustodianOrganization"/>
              <element value="id"/>
              <variable value="id"/>
            </source>
            <target>
              <context value="Organization"/>
              <contextType value="variable"/>
              <element value="identifier"/>
              <variable value="identifier"/>
            </target>
            <rule>
              <name value="root1"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="translate"/>
                <parameter>
                  <valueId value="r"/>
                </parameter>
                <parameter>
                  <valueString
                               value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                </parameter>
                <parameter>
                  <valueString value="uri"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="ext"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
              <rule>
                <name value="UUID"/>
                <source>
                  <context value="representedCustodianOrganization"/>
                </source>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="url"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="Organization?identifier="/>
                  </parameter>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <rule>
              <name value="assigningAuthorityName"/>
              <source>
                <context value="id"/>
                <element value="assigningAuthorityName"/>
                <variable value="s"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="assigner"/>
                <variable value="a"/>
              </target>
              <target>
                <context value="a"/>
                <contextType value="variable"/>
                <element value="display"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="s"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="r"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <rule>
                <name value="extension"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="Organization"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <variable value="uuid"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="r + '-' + ext"/>
                  </parameter>
                </target>
                <target>
                  <context value="e17"/>
                  <contextType value="variable"/>
                  <element value="fullUrl"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="https://example/Organization/"/>
                  </parameter>
                  <parameter>
                    <valueId value="uuid"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="RefCustodian"/>
            <source>
              <context value="assignedCustodian"/>
            </source>
            <target>
              <context value="DocumentReference"/>
              <contextType value="variable"/>
              <element value="custodian"/>
              <variable value="referenceCU"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <target>
              <context value="referenceCU"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="evaluate"/>
              <parameter>
                <valueString
                             value="'https://example/Organization/' + %Organization.id"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="custodian1"/>
            <source>
              <context value="representedCustodianOrganization"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="custodian"/>
              <variable value="reference"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <target>
              <context value="reference"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="evaluate"/>
              <parameter>
                <valueString
                             value="'https://example/Organization/' + %Organization.id"/>
              </parameter>
            </target>
            <dependent>
              <name value="CustodianOrganization"/>
              <variable value="representedCustodianOrganization"/>
              <variable value="Organization"/>
            </dependent>
          </rule>
        </rule>
      </rule>
      <documentation value="START CUSTODIAN"/>
    </rule>
    <rule>
      <name value="informationRecipent"/>
      <source>
        <context value="src"/>
        <element value="informationRecipient"/>
        <variable value="informationRecipient"/>
      </source>
      <rule>
        <name value="intendedRecipent"/>
        <source>
          <context value="informationRecipient"/>
          <element value="intendedRecipient"/>
          <variable value="intendedRecipient"/>
        </source>
        <rule>
          <name value="attesterOrg"/>
          <source>
            <context value="intendedRecipient"/>
            <element value="informationRecipient"/>
            <variable value="informationRecipient2"/>
          </source>
          <rule>
            <name value="intendedRecipienPract"/>
            <source>
              <context value="informationRecipient"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="attester"/>
              <variable value="attester"/>
            </target>
            <rule>
              <name value="mode"/>
              <source>
                <context value="informationRecipient2"/>
              </source>
              <target>
                <context value="attester"/>
                <contextType value="variable"/>
                <element value="mode"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="professional"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="PersonRecipient"/>
              <source>
                <context value="informationRecipient2"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e19"/>
              </target>
              <target>
                <context value="e19"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e19"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="practitioner"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Practitioner"/>
                </parameter>
              </target>
              <rule>
                <name value="meta"/>
                <source>
                  <context value="informationRecipient2"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="meta"/>
                  <variable value="meta"/>
                </target>
                <rule>
                  <name value="coding"/>
                  <source>
                    <context value="informationRecipient2"/>
                  </source>
                  <target>
                    <context value="meta"/>
                    <contextType value="variable"/>
                    <element value="tag"/>
                    <variable value="coding"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Coding"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="system"/>
                    <source>
                      <context value="informationRecipient2"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="http://algoritmodiscoring"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="informationRecipient2"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="code"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString
                                     value="ClinicalDocument/informationRecipient"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="intendedRecipient"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="extension"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="practitioner"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid2"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e19"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Practitioner/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid2"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="attester"/>
                      <contextType value="variable"/>
                      <element value="party"/>
                      <variable value="reference1"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="reference1"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString
                                     value="'https://example/Practitioner/' + %practitioner.id"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="2.16.840.1.113883.2.9.4.3.2"/>
                <source>
                  <context value="intendedRecipient"/>
                  <element value="id"/>
                  <variable value="id"/>
                  <condition value="(root = '2.16.840.1.113883.2.9.4.3.2')"/>
                </source>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Practitioner?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="diverso"/>
                <source>
                  <context value="intendedRecipient"/>
                  <element value="id"/>
                  <variable value="id"/>
                  <condition value="(root != '2.16.840.1.113883.2.9.4.3.2')"/>
                </source>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Practitioner?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="addr"/>
                <source>
                  <context value="intendedRecipient"/>
                  <element value="addr"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="address"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="telecom"/>
                <source>
                  <context value="intendedRecipient"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="name"/>
                <source>
                  <context value="informationRecipient2"/>
                  <element value="name"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="name"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="date"/>
                <source>
                  <context value="informationRecipient2"/>
                  <element value="birthTime"/>
                  <variable value="bt"/>
                </source>
                <rule>
                  <name value="value"/>
                  <source>
                    <context value="bt"/>
                    <element value="value"/>
                    <variable value="v"/>
                  </source>
                  <target>
                    <context value="practitioner"/>
                    <contextType value="variable"/>
                    <element value="birthDate"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="v.date"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="attesterOrg"/>
          <source>
            <context value="intendedRecipient"/>
            <element value="receivedOrganization"/>
            <variable value="receivedOrganization"/>
          </source>
          <rule>
            <name value="intendedRecipienOrg"/>
            <source>
              <context value="informationRecipient"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="attester"/>
              <variable value="attester"/>
            </target>
            <rule>
              <name value="mode"/>
              <source>
                <context value="receivedOrganization"/>
              </source>
              <target>
                <context value="attester"/>
                <contextType value="variable"/>
                <element value="mode"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="official"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="receivedOrganization"/>
              <source>
                <context value="receivedOrganization"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e20"/>
              </target>
              <target>
                <context value="e20"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e20"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="organization"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Organization"/>
                </parameter>
              </target>
              <rule>
                <name value="meta"/>
                <source>
                  <context value="receivedOrganization"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="meta"/>
                  <variable value="meta"/>
                </target>
                <rule>
                  <name value="coding"/>
                  <source>
                    <context value="receivedOrganization"/>
                  </source>
                  <target>
                    <context value="meta"/>
                    <contextType value="variable"/>
                    <element value="tag"/>
                    <variable value="coding"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Coding"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="system"/>
                    <source>
                      <context value="receivedOrganization"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="http://algoritmodiscoring"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="receivedOrganization"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="code"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString
                                     value="ClinicalDocument/informationRecipient/receivedOrganization"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="receivedOrganization"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="ext"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="UUID"/>
                    <source>
                      <context value="receivedOrganization"/>
                    </source>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="Organization?identifier="/>
                      </parameter>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="extension"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="organization"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid3"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e20"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Organization/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid3"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="attester"/>
                      <contextType value="variable"/>
                      <element value="party"/>
                      <variable value="reference2"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="reference2"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString
                                     value="'https://example/Organization/' + %organization.id"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="name"/>
                <source>
                  <context value="receivedOrganization"/>
                  <element value="name"/>
                  <variable value="v"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="name"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="v.other"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="telecom"/>
                <source>
                  <context value="receivedOrganization"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="addr"/>
                <source>
                  <context value="receivedOrganization"/>
                  <element value="addr"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="address"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="asOrganizationPartOf"/>
                <source>
                  <context value="receivedOrganization"/>
                  <element value="asOrganizationPartOf"/>
                  <variable value="asOrganizationPartOf"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e21"/>
                </target>
                <target>
                  <context value="e21"/>
                  <contextType value="variable"/>
                  <element value="request"/>
                  <variable value="request"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="BackboneElement"/>
                  </parameter>
                </target>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="method"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="PUT"/>
                  </parameter>
                </target>
                <target>
                  <context value="e21"/>
                  <contextType value="variable"/>
                  <element value="resource"/>
                  <variable value="organization2"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Organization"/>
                  </parameter>
                </target>
                <target>
                  <context value="organization2"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <variable value="uuid4"/>
                  <transform value="uuid"/>
                </target>
                <target>
                  <context value="e21"/>
                  <contextType value="variable"/>
                  <element value="fullUrl"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="https://example/Organization"/>
                  </parameter>
                  <parameter>
                    <valueId value="uuid4"/>
                  </parameter>
                </target>
                <target>
                  <context value="organization"/>
                  <contextType value="variable"/>
                  <element value="partOf"/>
                  <variable value="referenceor"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <target>
                  <context value="referenceor"/>
                  <contextType value="variable"/>
                  <element value="reference"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString
                                 value="'https://example/Organization' + %organization2.id"/>
                  </parameter>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="asOrganizationPartOf"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="asOrganizationPartOf"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="asOrganizationPartOf"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="asOrganizationPartOf"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/informationRecipient/receivedOrganization/asOrganizationPartOf"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="identifier"/>
                  <source>
                    <context value="asOrganizationPartOf"/>
                    <element value="id"/>
                    <variable value="id"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="identifier"/>
                    <variable value="identifier"/>
                  </target>
                  <rule>
                    <name value="root1"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="translate"/>
                      <parameter>
                        <valueId value="r"/>
                      </parameter>
                      <parameter>
                        <valueString
                                     value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                      </parameter>
                      <parameter>
                        <valueString value="uri"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="ext"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="value"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="UUID"/>
                      <source>
                        <context value="asOrganizationPartOf"/>
                      </source>
                      <target>
                        <context value="request"/>
                        <contextType value="variable"/>
                        <element value="url"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="Organization?identifier="/>
                        </parameter>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                  <rule>
                    <name value="assigningAuthorityName"/>
                    <source>
                      <context value="id"/>
                      <element value="assigningAuthorityName"/>
                      <variable value="s"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="assigner"/>
                      <variable value="a"/>
                    </target>
                    <target>
                      <context value="a"/>
                      <contextType value="variable"/>
                      <element value="display"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="s"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="r"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <rule>
                      <name value="extension"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="organization2"/>
                        <contextType value="variable"/>
                        <element value="id"/>
                        <variable value="uuid4"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="r + '-' + ext"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e21"/>
                        <contextType value="variable"/>
                        <element value="fullUrl"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Organization/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid4"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="organization"/>
                        <contextType value="variable"/>
                        <element value="partOf"/>
                        <variable value="referenceor"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Reference"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="referenceor"/>
                        <contextType value="variable"/>
                        <element value="reference"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString
                                       value="'https://example/Organization/' + %organization2.id"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="asOrganizationPartOf"/>
                    <element value="code"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="type"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="statusCode"/>
                  <source>
                    <context value="asOrganizationPartOf"/>
                    <element value="statusCode"/>
                    <variable value="status"/>
                    <condition value="(value = 'active')"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="active"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="boolean"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="active"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="true"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="wholeOrganization"/>
                  <source>
                    <context value="asOrganizationPartOf"/>
                    <element value="wholeOrganization"/>
                    <variable value="wholeOrganization3"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e22"/>
                  </target>
                  <target>
                    <context value="e22"/>
                    <contextType value="variable"/>
                    <element value="request"/>
                    <variable value="request"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="BackboneElement"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="method"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="PUT"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e22"/>
                    <contextType value="variable"/>
                    <element value="resource"/>
                    <variable value="organization3"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Organization"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="meta"/>
                    <source>
                      <context value="wholeOrganization3"/>
                    </source>
                    <target>
                      <context value="organization3"/>
                      <contextType value="variable"/>
                      <element value="meta"/>
                      <variable value="meta"/>
                    </target>
                    <rule>
                      <name value="coding"/>
                      <source>
                        <context value="wholeOrganization3"/>
                      </source>
                      <target>
                        <context value="meta"/>
                        <contextType value="variable"/>
                        <element value="tag"/>
                        <variable value="coding"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Coding"/>
                        </parameter>
                      </target>
                      <rule>
                        <name value="system"/>
                        <source>
                          <context value="wholeOrganization3"/>
                        </source>
                        <target>
                          <context value="coding"/>
                          <contextType value="variable"/>
                          <element value="system"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueString value="http://algoritmodiscoring"/>
                          </parameter>
                        </target>
                      </rule>
                      <rule>
                        <name value="code"/>
                        <source>
                          <context value="wholeOrganization3"/>
                        </source>
                        <target>
                          <context value="coding"/>
                          <contextType value="variable"/>
                          <element value="code"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueString
                                         value="ClinicalDocument/informationRecipient/receivedOrganization/asOrganizationPartOf/wholeOrganization"/>
                          </parameter>
                        </target>
                      </rule>
                    </rule>
                  </rule>
                  <rule>
                    <name value="identifier"/>
                    <source>
                      <context value="wholeOrganization3"/>
                      <element value="id"/>
                      <variable value="id"/>
                    </source>
                    <target>
                      <context value="organization3"/>
                      <contextType value="variable"/>
                      <element value="identifier"/>
                      <variable value="identifier"/>
                    </target>
                    <rule>
                      <name value="root1"/>
                      <source>
                        <context value="id"/>
                        <element value="root"/>
                        <variable value="r"/>
                      </source>
                      <target>
                        <context value="identifier"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="translate"/>
                        <parameter>
                          <valueId value="r"/>
                        </parameter>
                        <parameter>
                          <valueString
                                       value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                        </parameter>
                        <parameter>
                          <valueString value="uri"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="ext"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="identifier"/>
                        <contextType value="variable"/>
                        <element value="value"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                      <rule>
                        <name value="UUID"/>
                        <source>
                          <context value="wholeOrganization3"/>
                        </source>
                        <target>
                          <context value="request"/>
                          <contextType value="variable"/>
                          <element value="url"/>
                          <transform value="append"/>
                          <parameter>
                            <valueString value="Organization?identifier="/>
                          </parameter>
                          <parameter>
                            <valueId value="ext"/>
                          </parameter>
                        </target>
                      </rule>
                    </rule>
                    <rule>
                      <name value="assigningAuthorityName"/>
                      <source>
                        <context value="id"/>
                        <element value="assigningAuthorityName"/>
                        <variable value="s"/>
                      </source>
                      <target>
                        <context value="identifier"/>
                        <contextType value="variable"/>
                        <element value="assigner"/>
                        <variable value="a"/>
                      </target>
                      <target>
                        <context value="a"/>
                        <contextType value="variable"/>
                        <element value="display"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueId value="s"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="r"/>
                      <source>
                        <context value="id"/>
                        <element value="root"/>
                        <variable value="r"/>
                      </source>
                      <rule>
                        <name value="extension"/>
                        <source>
                          <context value="id"/>
                          <element value="extension"/>
                          <variable value="ext"/>
                        </source>
                        <target>
                          <context value="organization3"/>
                          <contextType value="variable"/>
                          <element value="id"/>
                          <variable value="uuid5"/>
                          <transform value="evaluate"/>
                          <parameter>
                            <valueString value="r + '-' + ext"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="e22"/>
                          <contextType value="variable"/>
                          <element value="fullUrl"/>
                          <transform value="append"/>
                          <parameter>
                            <valueString
                                         value="https://example/Organization/"/>
                          </parameter>
                          <parameter>
                            <valueId value="uuid5"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="organization2"/>
                          <contextType value="variable"/>
                          <element value="partOf"/>
                          <variable value="referenceor"/>
                          <transform value="create"/>
                          <parameter>
                            <valueString value="Reference"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="referenceor"/>
                          <contextType value="variable"/>
                          <element value="reference"/>
                          <transform value="evaluate"/>
                          <parameter>
                            <valueString
                                         value="'https://example/Organization/' + %organization3.id"/>
                          </parameter>
                        </target>
                      </rule>
                    </rule>
                  </rule>
                  <rule>
                    <name value="name"/>
                    <source>
                      <context value="wholeOrganization3"/>
                      <element value="name"/>
                      <variable value="v"/>
                    </source>
                    <target>
                      <context value="organization3"/>
                      <contextType value="variable"/>
                      <element value="name"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="v.other"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="telecom"/>
                    <source>
                      <context value="wholeOrganization3"/>
                      <element value="telecom"/>
                      <variable value="vvv"/>
                    </source>
                    <target>
                      <context value="organization3"/>
                      <contextType value="variable"/>
                      <element value="telecom"/>
                      <variable value="vvv"/>
                      <transform value="create"/>
                    </target>
                  </rule>
                  <rule>
                    <name value="addr"/>
                    <source>
                      <context value="wholeOrganization3"/>
                      <element value="addr"/>
                      <variable value="vvv"/>
                    </source>
                    <target>
                      <context value="organization3"/>
                      <contextType value="variable"/>
                      <element value="address"/>
                      <variable value="vvv"/>
                      <transform value="create"/>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <documentation value="START INFORMATION RECIPIENT"/>
    </rule>
    <rule>
      <name value="LegalAuthenticator"/>
      <source>
        <context value="src"/>
        <element value="legalAuthenticator"/>
        <variable value="legalAuth"/>
      </source>
      <rule>
        <name value="legalAuth"/>
        <source>
          <context value="legalAuth"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="attester"/>
          <variable value="attester"/>
        </target>
        <rule>
          <name value="entity"/>
          <source>
            <context value="legalAuth"/>
            <element value="assignedEntity"/>
            <variable value="entity"/>
          </source>
          <rule>
            <name value="PractitionerROLlegal"/>
            <source>
              <context value="entity"/>
              <element value="id"/>
              <variable value="id"/>
              <condition value="(root = '2.16.840.1.113883.2.9.4.3.2')"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e23"/>
            </target>
            <target>
              <context value="e23"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="POST"/>
              </parameter>
            </target>
            <target>
              <context value="e23"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="practitionerRole"/>
              <transform value="create"/>
              <parameter>
                <valueString value="PractitionerRole"/>
              </parameter>
            </target>
            <target>
              <context value="practitionerRole"/>
              <contextType value="variable"/>
              <element value="id"/>
              <variable value="uuid"/>
              <transform value="uuid"/>
            </target>
            <target>
              <context value="e23"/>
              <contextType value="variable"/>
              <element value="fullUrl"/>
              <transform value="append"/>
              <parameter>
                <valueString value="https://example/PractitionerRole/"/>
              </parameter>
              <parameter>
                <valueId value="uuid"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="url"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="PractitionerRole"/>
              </parameter>
            </target>
            <rule>
              <name value="mode"/>
              <source>
                <context value="legalAuth"/>
              </source>
              <target>
                <context value="attester"/>
                <contextType value="variable"/>
                <element value="mode"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="legal"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="time"/>
              <source>
                <context value="legalAuth"/>
                <element value="time"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="attester"/>
                <contextType value="variable"/>
                <element value="time"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="PractitionerLegal"/>
              <source>
                <context value="legalAuth"/>
              </source>
              <target>
                <context value="attester"/>
                <contextType value="variable"/>
                <element value="party"/>
                <variable value="reference"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Reference"/>
                </parameter>
              </target>
              <target>
                <context value="reference"/>
                <contextType value="variable"/>
                <element value="reference"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString
                               value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
                </parameter>
              </target>
              <rule>
                <name value="practitioner"/>
                <source>
                  <context value="entity"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e24"/>
                </target>
                <target>
                  <context value="e24"/>
                  <contextType value="variable"/>
                  <element value="request"/>
                  <variable value="request"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="BackboneElement"/>
                  </parameter>
                </target>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="method"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="PUT"/>
                  </parameter>
                </target>
                <target>
                  <context value="e24"/>
                  <contextType value="variable"/>
                  <element value="resource"/>
                  <variable value="practitioner"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Practitioner"/>
                  </parameter>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="entity"/>
                  </source>
                  <target>
                    <context value="practitioner"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="entity"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="entity"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="entity"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/legalAuthenticator"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="identifier"/>
                  <source>
                    <context value="entity"/>
                    <element value="id"/>
                    <variable value="id"/>
                  </source>
                  <target>
                    <context value="practitioner"/>
                    <contextType value="variable"/>
                    <element value="identifier"/>
                    <variable value="identifier"/>
                  </target>
                  <rule>
                    <name value="root1"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="translate"/>
                      <parameter>
                        <valueId value="r"/>
                      </parameter>
                      <parameter>
                        <valueString
                                     value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                      </parameter>
                      <parameter>
                        <valueString value="uri"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="extension"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="value"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="assigningAuthorityName"/>
                    <source>
                      <context value="id"/>
                      <element value="assigningAuthorityName"/>
                      <variable value="s"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="assigner"/>
                      <variable value="a"/>
                    </target>
                    <target>
                      <context value="a"/>
                      <contextType value="variable"/>
                      <element value="display"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="s"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="r"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <rule>
                      <name value="extension"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="practitioner"/>
                        <contextType value="variable"/>
                        <element value="id"/>
                        <variable value="uuid1"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="r + '-' + ext"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e24"/>
                        <contextType value="variable"/>
                        <element value="fullUrl"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Practitioner/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid1"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="practitionerRole"/>
                        <contextType value="variable"/>
                        <element value="practitioner"/>
                        <variable value="reference"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Reference"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="reference"/>
                        <contextType value="variable"/>
                        <element value="reference"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString
                                       value="'https://example/Practitioner/' + %practitioner.id"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="2.16.840.1.113883.2.9.4.3.2"/>
                  <source>
                    <context value="entity"/>
                    <element value="id"/>
                    <variable value="id"/>
                    <condition
                               value="(root = '2.16.840.1.113883.2.9.4.3.2')"/>
                  </source>
                  <rule>
                    <name value="UUID"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="Practitioner?identifier="/>
                      </parameter>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <rule>
                  <name value="addr"/>
                  <source>
                    <context value="entity"/>
                    <element value="addr"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="practitioner"/>
                    <contextType value="variable"/>
                    <element value="address"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="telecom"/>
                  <source>
                    <context value="entity"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="practitioner"/>
                    <contextType value="variable"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="person"/>
                  <source>
                    <context value="entity"/>
                    <element value="assignedPerson"/>
                    <variable value="person"/>
                  </source>
                  <rule>
                    <name value="name"/>
                    <source>
                      <context value="person"/>
                      <element value="name"/>
                      <variable value="vvv"/>
                    </source>
                    <target>
                      <context value="practitioner"/>
                      <contextType value="variable"/>
                      <element value="name"/>
                      <variable value="vvv"/>
                      <transform value="create"/>
                    </target>
                  </rule>
                  <rule>
                    <name value="birth"/>
                    <source>
                      <context value="person"/>
                      <element value="birthTime"/>
                      <variable value="birthTime"/>
                    </source>
                    <rule>
                      <name value="birthTimelegal"/>
                      <source>
                        <context value="birthTime"/>
                        <element value="value"/>
                        <variable value="date"/>
                      </source>
                      <target>
                        <context value="practitioner"/>
                        <contextType value="variable"/>
                        <element value="birthDate"/>
                        <transform value="truncate"/>
                        <parameter>
                          <valueId value="date"/>
                        </parameter>
                        <parameter>
                          <valueInteger value="10"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="entity"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitionerRole"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="LAOrganiz"/>
                <source>
                  <context value="entity"/>
                  <element value="representedOrganization"/>
                  <variable value="rapresentedOrg"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e25"/>
                </target>
                <target>
                  <context value="e25"/>
                  <contextType value="variable"/>
                  <element value="request"/>
                  <variable value="request"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="BackboneElement"/>
                  </parameter>
                </target>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="method"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="PUT"/>
                  </parameter>
                </target>
                <target>
                  <context value="e25"/>
                  <contextType value="variable"/>
                  <element value="resource"/>
                  <variable value="organization"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Organization"/>
                  </parameter>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="rapresentedOrg"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="rapresentedOrg"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="rapresentedOrg"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="rapresentedOrg"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/legalAuthenticator/representedOrganization"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="identifier"/>
                  <source>
                    <context value="rapresentedOrg"/>
                    <element value="id"/>
                    <variable value="id"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="identifier"/>
                    <variable value="identifier"/>
                  </target>
                  <rule>
                    <name value="root1"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="translate"/>
                      <parameter>
                        <valueId value="r"/>
                      </parameter>
                      <parameter>
                        <valueString
                                     value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                      </parameter>
                      <parameter>
                        <valueString value="uri"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="ext"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="value"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="UUID"/>
                      <source>
                        <context value="rapresentedOrg"/>
                      </source>
                      <target>
                        <context value="request"/>
                        <contextType value="variable"/>
                        <element value="url"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="Organization?identifier="/>
                        </parameter>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                  <rule>
                    <name value="assigningAuthorityName"/>
                    <source>
                      <context value="id"/>
                      <element value="assigningAuthorityName"/>
                      <variable value="s"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="assigner"/>
                      <variable value="a"/>
                    </target>
                    <target>
                      <context value="a"/>
                      <contextType value="variable"/>
                      <element value="display"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="s"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="r"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <rule>
                      <name value="extension"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="organization"/>
                        <contextType value="variable"/>
                        <element value="id"/>
                        <variable value="uuid2"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="r + '-' + ext"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e25"/>
                        <contextType value="variable"/>
                        <element value="fullUrl"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Organization/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid2"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="practitionerRole"/>
                        <contextType value="variable"/>
                        <element value="organization"/>
                        <variable value="reference"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Reference"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="reference"/>
                        <contextType value="variable"/>
                        <element value="reference"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString
                                       value="'https://example/Organization/' + %organization.id"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="name"/>
                  <source>
                    <context value="rapresentedOrg"/>
                    <element value="name"/>
                    <variable value="v"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="name"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="v.other"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="telecom"/>
                  <source>
                    <context value="rapresentedOrg"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="addr"/>
                  <source>
                    <context value="rapresentedOrg"/>
                    <element value="addr"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="address"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="asOrgID"/>
                  <source>
                    <context value="rapresentedOrg"/>
                    <element value="asOrganizationPartOf"/>
                    <variable value="asOrgPartOf"/>
                  </source>
                  <rule>
                    <name value="asOrgPO"/>
                    <source>
                      <context value="asOrgPartOf"/>
                      <variable value="asOrgPartOf1"/>
                    </source>
                    <target>
                      <context value="bundle"/>
                      <contextType value="variable"/>
                      <element value="entry"/>
                      <variable value="e26"/>
                    </target>
                    <target>
                      <context value="e26"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="request"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="BackboneElement"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="PUT"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e26"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="asorganization"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Organization"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="meta"/>
                      <source>
                        <context value="asOrgPartOf1"/>
                      </source>
                      <target>
                        <context value="asorganization"/>
                        <contextType value="variable"/>
                        <element value="meta"/>
                        <variable value="meta"/>
                      </target>
                      <rule>
                        <name value="coding"/>
                        <source>
                          <context value="asOrgPartOf1"/>
                        </source>
                        <target>
                          <context value="meta"/>
                          <contextType value="variable"/>
                          <element value="tag"/>
                          <variable value="coding"/>
                          <transform value="create"/>
                          <parameter>
                            <valueString value="Coding"/>
                          </parameter>
                        </target>
                        <rule>
                          <name value="system"/>
                          <source>
                            <context value="asOrgPartOf1"/>
                          </source>
                          <target>
                            <context value="coding"/>
                            <contextType value="variable"/>
                            <element value="system"/>
                            <transform value="copy"/>
                            <parameter>
                              <valueString value="http://algoritmodiscoring"/>
                            </parameter>
                          </target>
                        </rule>
                        <rule>
                          <name value="code"/>
                          <source>
                            <context value="asOrgPartOf1"/>
                          </source>
                          <target>
                            <context value="coding"/>
                            <contextType value="variable"/>
                            <element value="code"/>
                            <transform value="copy"/>
                            <parameter>
                              <valueString
                                           value="ClinicalDocument/legalAuthenticator/representedOrganization/asOrganizationPartOf"/>
                            </parameter>
                          </target>
                        </rule>
                      </rule>
                    </rule>
                    <rule>
                      <name value="identifier"/>
                      <source>
                        <context value="asOrgPartOf1"/>
                        <element value="id"/>
                        <variable value="id"/>
                      </source>
                      <target>
                        <context value="asorganization"/>
                        <contextType value="variable"/>
                        <element value="identifier"/>
                        <variable value="identifier"/>
                      </target>
                      <rule>
                        <name value="root1"/>
                        <source>
                          <context value="id"/>
                          <element value="root"/>
                          <variable value="r"/>
                        </source>
                        <target>
                          <context value="identifier"/>
                          <contextType value="variable"/>
                          <element value="system"/>
                          <transform value="translate"/>
                          <parameter>
                            <valueId value="r"/>
                          </parameter>
                          <parameter>
                            <valueString
                                         value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                          </parameter>
                          <parameter>
                            <valueString value="uri"/>
                          </parameter>
                        </target>
                      </rule>
                      <rule>
                        <name value="ext"/>
                        <source>
                          <context value="id"/>
                          <element value="extension"/>
                          <variable value="ext"/>
                        </source>
                        <target>
                          <context value="identifier"/>
                          <contextType value="variable"/>
                          <element value="value"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueId value="ext"/>
                          </parameter>
                        </target>
                        <rule>
                          <name value="UUID"/>
                          <source>
                            <context value="asOrgPartOf1"/>
                          </source>
                          <target>
                            <context value="request"/>
                            <contextType value="variable"/>
                            <element value="url"/>
                            <transform value="append"/>
                            <parameter>
                              <valueString value="Organization?identifier="/>
                            </parameter>
                            <parameter>
                              <valueId value="ext"/>
                            </parameter>
                          </target>
                        </rule>
                      </rule>
                      <rule>
                        <name value="assigningAuthorityName"/>
                        <source>
                          <context value="id"/>
                          <element value="assigningAuthorityName"/>
                          <variable value="s"/>
                        </source>
                        <target>
                          <context value="identifier"/>
                          <contextType value="variable"/>
                          <element value="assigner"/>
                          <variable value="a"/>
                        </target>
                        <target>
                          <context value="a"/>
                          <contextType value="variable"/>
                          <element value="display"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueId value="s"/>
                          </parameter>
                        </target>
                      </rule>
                      <rule>
                        <name value="r"/>
                        <source>
                          <context value="id"/>
                          <element value="root"/>
                          <variable value="r"/>
                        </source>
                        <rule>
                          <name value="extension"/>
                          <source>
                            <context value="id"/>
                            <element value="extension"/>
                            <variable value="ext"/>
                          </source>
                          <target>
                            <context value="asorganization"/>
                            <contextType value="variable"/>
                            <element value="id"/>
                            <variable value="uuid2"/>
                            <transform value="evaluate"/>
                            <parameter>
                              <valueString value="r + '-' + ext"/>
                            </parameter>
                          </target>
                          <target>
                            <context value="e26"/>
                            <contextType value="variable"/>
                            <element value="fullUrl"/>
                            <transform value="append"/>
                            <parameter>
                              <valueString
                                           value="https://example/Organization/"/>
                            </parameter>
                            <parameter>
                              <valueId value="uuid2"/>
                            </parameter>
                          </target>
                          <target>
                            <context value="organization"/>
                            <contextType value="variable"/>
                            <element value="partOf"/>
                            <variable value="reference"/>
                            <transform value="create"/>
                            <parameter>
                              <valueString value="Reference"/>
                            </parameter>
                          </target>
                          <target>
                            <context value="reference"/>
                            <contextType value="variable"/>
                            <element value="reference"/>
                            <transform value="evaluate"/>
                            <parameter>
                              <valueString
                                           value="'https://example/Organization/' + %asorganization.id"/>
                            </parameter>
                          </target>
                        </rule>
                      </rule>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="asOrgPartOf1"/>
                        <element value="code"/>
                        <variable value="vvv"/>
                      </source>
                      <target>
                        <context value="asorganization"/>
                        <contextType value="variable"/>
                        <element value="type"/>
                        <variable value="vvv"/>
                        <transform value="create"/>
                      </target>
                    </rule>
                    <rule>
                      <name value="statusCode"/>
                      <source>
                        <context value="asOrgPartOf1"/>
                        <element value="statusCode"/>
                        <variable value="status"/>
                        <condition value="(code = 'active')"/>
                      </source>
                      <target>
                        <context value="asorganization"/>
                        <contextType value="variable"/>
                        <element value="active"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="boolean"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="asorganization"/>
                        <contextType value="variable"/>
                        <element value="active"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueBoolean value="true"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="wholeOrg"/>
                      <source>
                        <context value="asOrgPartOf1"/>
                        <element value="wholeOrganization"/>
                        <variable value="wholeOrg"/>
                      </source>
                      <rule>
                        <name value="wholeOrg1"/>
                        <source>
                          <context value="wholeOrg"/>
                          <variable value="wholeOrg1"/>
                        </source>
                        <target>
                          <context value="bundle"/>
                          <contextType value="variable"/>
                          <element value="entry"/>
                          <variable value="e27"/>
                        </target>
                        <target>
                          <context value="e27"/>
                          <contextType value="variable"/>
                          <element value="request"/>
                          <variable value="request"/>
                          <transform value="create"/>
                          <parameter>
                            <valueString value="BackboneElement"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="request"/>
                          <contextType value="variable"/>
                          <element value="method"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueString value="PUT"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="e27"/>
                          <contextType value="variable"/>
                          <element value="resource"/>
                          <variable value="wholeorganization"/>
                          <transform value="create"/>
                          <parameter>
                            <valueString value="Organization"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="wholeorganization"/>
                          <contextType value="variable"/>
                          <element value="id"/>
                          <variable value="uuid4"/>
                          <transform value="uuid"/>
                        </target>
                        <target>
                          <context value="e27"/>
                          <contextType value="variable"/>
                          <element value="fullUrl"/>
                          <transform value="append"/>
                          <parameter>
                            <valueString
                                         value="https://example/Organization/"/>
                          </parameter>
                          <parameter>
                            <valueId value="uuid4"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="asorganization"/>
                          <contextType value="variable"/>
                          <element value="partOf"/>
                          <variable value="reference"/>
                          <transform value="create"/>
                          <parameter>
                            <valueString value="Reference"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="reference"/>
                          <contextType value="variable"/>
                          <element value="reference"/>
                          <transform value="evaluate"/>
                          <parameter>
                            <valueString
                                         value="'https://example/Organization/' + %wholeorganization.id"/>
                          </parameter>
                        </target>
                        <rule>
                          <name value="meta"/>
                          <source>
                            <context value="wholeOrg1"/>
                          </source>
                          <target>
                            <context value="wholeorganization"/>
                            <contextType value="variable"/>
                            <element value="meta"/>
                            <variable value="meta"/>
                          </target>
                          <rule>
                            <name value="coding"/>
                            <source>
                              <context value="wholeOrg1"/>
                            </source>
                            <target>
                              <context value="meta"/>
                              <contextType value="variable"/>
                              <element value="tag"/>
                              <variable value="coding"/>
                              <transform value="create"/>
                              <parameter>
                                <valueString value="Coding"/>
                              </parameter>
                            </target>
                            <rule>
                              <name value="system"/>
                              <source>
                                <context value="wholeOrg1"/>
                              </source>
                              <target>
                                <context value="coding"/>
                                <contextType value="variable"/>
                                <element value="system"/>
                                <transform value="copy"/>
                                <parameter>
                                  <valueString
                                               value="http://algoritmodiscoring"/>
                                </parameter>
                              </target>
                            </rule>
                            <rule>
                              <name value="code"/>
                              <source>
                                <context value="wholeOrg1"/>
                              </source>
                              <target>
                                <context value="coding"/>
                                <contextType value="variable"/>
                                <element value="code"/>
                                <transform value="copy"/>
                                <parameter>
                                  <valueString
                                               value="ClinicalDocument/legalAuthenticator/representedOrganization/asOrganizationPartOf/wholeOrganization"/>
                                </parameter>
                              </target>
                            </rule>
                          </rule>
                        </rule>
                        <rule>
                          <name value="identifier"/>
                          <source>
                            <context value="wholeOrg1"/>
                            <element value="id"/>
                            <variable value="id"/>
                          </source>
                          <target>
                            <context value="wholeorganization"/>
                            <contextType value="variable"/>
                            <element value="identifier"/>
                            <variable value="identifier"/>
                          </target>
                          <rule>
                            <name value="root1"/>
                            <source>
                              <context value="id"/>
                              <element value="root"/>
                              <variable value="r"/>
                            </source>
                            <target>
                              <context value="identifier"/>
                              <contextType value="variable"/>
                              <element value="system"/>
                              <transform value="translate"/>
                              <parameter>
                                <valueId value="r"/>
                              </parameter>
                              <parameter>
                                <valueString
                                             value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                              </parameter>
                              <parameter>
                                <valueString value="uri"/>
                              </parameter>
                            </target>
                          </rule>
                          <rule>
                            <name value="ext"/>
                            <source>
                              <context value="id"/>
                              <element value="extension"/>
                              <variable value="ext"/>
                            </source>
                            <target>
                              <context value="identifier"/>
                              <contextType value="variable"/>
                              <element value="value"/>
                              <transform value="copy"/>
                              <parameter>
                                <valueId value="ext"/>
                              </parameter>
                            </target>
                            <rule>
                              <name value="UUID"/>
                              <source>
                                <context value="wholeOrg1"/>
                              </source>
                              <target>
                                <context value="request"/>
                                <contextType value="variable"/>
                                <element value="url"/>
                                <transform value="append"/>
                                <parameter>
                                  <valueString
                                               value="Organization?identifier="/>
                                </parameter>
                                <parameter>
                                  <valueId value="ext"/>
                                </parameter>
                              </target>
                            </rule>
                          </rule>
                          <rule>
                            <name value="assigningAuthorityName"/>
                            <source>
                              <context value="id"/>
                              <element value="assigningAuthorityName"/>
                              <variable value="s"/>
                            </source>
                            <target>
                              <context value="identifier"/>
                              <contextType value="variable"/>
                              <element value="assigner"/>
                              <variable value="a"/>
                            </target>
                            <target>
                              <context value="a"/>
                              <contextType value="variable"/>
                              <element value="display"/>
                              <transform value="copy"/>
                              <parameter>
                                <valueId value="s"/>
                              </parameter>
                            </target>
                          </rule>
                          <rule>
                            <name value="r"/>
                            <source>
                              <context value="id"/>
                              <element value="root"/>
                              <variable value="r"/>
                            </source>
                            <rule>
                              <name value="extension"/>
                              <source>
                                <context value="id"/>
                                <element value="extension"/>
                                <variable value="ext"/>
                              </source>
                              <target>
                                <context value="wholeorganization"/>
                                <contextType value="variable"/>
                                <element value="id"/>
                                <variable value="uuid4"/>
                                <transform value="evaluate"/>
                                <parameter>
                                  <valueString value="r + '-' + ext"/>
                                </parameter>
                              </target>
                              <target>
                                <context value="e27"/>
                                <contextType value="variable"/>
                                <element value="fullUrl"/>
                                <transform value="append"/>
                                <parameter>
                                  <valueString
                                               value="https://example/Organization/"/>
                                </parameter>
                                <parameter>
                                  <valueId value="uuid4"/>
                                </parameter>
                              </target>
                              <target>
                                <context value="asorganization"/>
                                <contextType value="variable"/>
                                <element value="partOf"/>
                                <variable value="reference"/>
                                <transform value="create"/>
                                <parameter>
                                  <valueString value="Reference"/>
                                </parameter>
                              </target>
                              <target>
                                <context value="reference"/>
                                <contextType value="variable"/>
                                <element value="reference"/>
                                <transform value="evaluate"/>
                                <parameter>
                                  <valueString
                                               value="'https://example/Organization/' + %wholeorganization.id"/>
                                </parameter>
                              </target>
                            </rule>
                          </rule>
                        </rule>
                        <rule>
                          <name value="name"/>
                          <source>
                            <context value="wholeOrg1"/>
                            <element value="name"/>
                            <variable value="v"/>
                          </source>
                          <target>
                            <context value="wholeorganization"/>
                            <contextType value="variable"/>
                            <element value="name"/>
                            <transform value="evaluate"/>
                            <parameter>
                              <valueString value="v.other"/>
                            </parameter>
                          </target>
                        </rule>
                        <rule>
                          <name value="telecom"/>
                          <source>
                            <context value="wholeOrg1"/>
                            <element value="telecom"/>
                            <variable value="vvv"/>
                          </source>
                          <target>
                            <context value="wholeorganization"/>
                            <contextType value="variable"/>
                            <element value="telecom"/>
                            <variable value="vvv"/>
                            <transform value="create"/>
                          </target>
                        </rule>
                        <rule>
                          <name value="addr"/>
                          <source>
                            <context value="wholeOrg1"/>
                            <element value="addr"/>
                            <variable value="vvv"/>
                          </source>
                          <target>
                            <context value="wholeorganization"/>
                            <contextType value="variable"/>
                            <element value="address"/>
                            <variable value="vvv"/>
                            <transform value="create"/>
                          </target>
                        </rule>
                      </rule>
                    </rule>
                  </rule>
                </rule>
              </rule>
            </rule>
            <documentation value="Codice Fiscale"/>
          </rule>
          <rule>
            <name value="OrgPartitaIVA"/>
            <source>
              <context value="entity"/>
              <element value="id"/>
              <variable value="id"/>
              <condition value="(root = '2.16.840.1.113883.2.9.6.3.2')"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e251"/>
            </target>
            <target>
              <context value="e251"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="PUT"/>
              </parameter>
            </target>
            <target>
              <context value="e251"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="organization"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Organization"/>
              </parameter>
            </target>
            <rule>
              <name value="mode"/>
              <source>
                <context value="entity"/>
              </source>
              <target>
                <context value="attester"/>
                <contextType value="variable"/>
                <element value="mode"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="official"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="meta"/>
              <source>
                <context value="entity"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="meta"/>
                <variable value="meta"/>
              </target>
              <rule>
                <name value="coding"/>
                <source>
                  <context value="entity"/>
                </source>
                <target>
                  <context value="meta"/>
                  <contextType value="variable"/>
                  <element value="tag"/>
                  <variable value="coding"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Coding"/>
                  </parameter>
                </target>
                <rule>
                  <name value="system"/>
                  <source>
                    <context value="entity"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="http://algoritmodiscoring"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="entity"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="code"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString
                                   value="ClinicalDocument/legalAuthenticatorPartitaIVA"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="identifier"/>
              <source>
                <context value="entity"/>
                <element value="id"/>
                <variable value="id"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="identifier"/>
              </target>
              <rule>
                <name value="root1"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="translate"/>
                  <parameter>
                    <valueId value="r"/>
                  </parameter>
                  <parameter>
                    <valueString
                                 value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                  </parameter>
                  <parameter>
                    <valueString value="uri"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="ext"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="value"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="entity"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Organization?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="assigningAuthorityName"/>
                <source>
                  <context value="id"/>
                  <element value="assigningAuthorityName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="assigner"/>
                  <variable value="a"/>
                </target>
                <target>
                  <context value="a"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="s"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="r"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="id"/>
                    <variable value="uuid2"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="r + '-' + ext"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e251"/>
                    <contextType value="variable"/>
                    <element value="fullUrl"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Organization/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid2"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="attester"/>
                    <contextType value="variable"/>
                    <element value="party"/>
                    <variable value="reference"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Reference"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="reference"/>
                    <contextType value="variable"/>
                    <element value="reference"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString
                                   value="'https://example/Organization/' + %organization.id"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <documentation value="Partita IVA"/>
          </rule>
        </rule>
      </rule>
      <documentation value="START Legal Authenticator"/>
    </rule>
    <rule>
      <name value="Auth"/>
      <source>
        <context value="src"/>
        <element value="authenticator"/>
        <variable value="Auth"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="entry"/>
        <variable value="e28"/>
      </target>
      <target>
        <context value="e28"/>
        <contextType value="variable"/>
        <element value="request"/>
        <variable value="request"/>
        <transform value="create"/>
        <parameter>
          <valueString value="BackboneElement"/>
        </parameter>
      </target>
      <target>
        <context value="request"/>
        <contextType value="variable"/>
        <element value="method"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="POST"/>
        </parameter>
      </target>
      <target>
        <context value="e28"/>
        <contextType value="variable"/>
        <element value="resource"/>
        <variable value="practitionerRole"/>
        <transform value="create"/>
        <parameter>
          <valueString value="PractitionerRole"/>
        </parameter>
      </target>
      <target>
        <context value="practitionerRole"/>
        <contextType value="variable"/>
        <element value="id"/>
        <variable value="uuid1"/>
        <transform value="uuid"/>
      </target>
      <target>
        <context value="e28"/>
        <contextType value="variable"/>
        <element value="fullUrl"/>
        <transform value="append"/>
        <parameter>
          <valueString value="https://example/PractitionerRole/"/>
        </parameter>
        <parameter>
          <valueId value="uuid1"/>
        </parameter>
      </target>
      <target>
        <context value="request"/>
        <contextType value="variable"/>
        <element value="url"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="PractitionerRole"/>
        </parameter>
      </target>
      <rule>
        <name value="attester"/>
        <source>
          <context value="Auth"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="attester"/>
          <variable value="attester"/>
        </target>
        <rule>
          <name value="time"/>
          <source>
            <context value="Auth"/>
            <element value="time"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="attester"/>
            <contextType value="variable"/>
            <element value="time"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
        </rule>
        <rule>
          <name value="mode"/>
          <source>
            <context value="Auth"/>
          </source>
          <target>
            <context value="attester"/>
            <contextType value="variable"/>
            <element value="mode"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="professional"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="entity"/>
          <source>
            <context value="Auth"/>
            <element value="assignedEntity"/>
            <variable value="entity"/>
          </source>
          <target>
            <context value="attester"/>
            <contextType value="variable"/>
            <element value="party"/>
            <variable value="reference"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Reference"/>
            </parameter>
          </target>
          <target>
            <context value="reference"/>
            <contextType value="variable"/>
            <element value="reference"/>
            <transform value="evaluate"/>
            <parameter>
              <valueString
                           value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
            </parameter>
          </target>
          <rule>
            <name value="code"/>
            <source>
              <context value="entity"/>
              <element value="code"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitionerRole"/>
              <contextType value="variable"/>
              <element value="code"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="practitioner"/>
            <source>
              <context value="entity"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e29"/>
            </target>
            <target>
              <context value="e29"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="PUT"/>
              </parameter>
            </target>
            <target>
              <context value="e29"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="practitioner"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Practitioner"/>
              </parameter>
            </target>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="id"/>
              <variable value="uuid2"/>
              <transform value="uuid"/>
            </target>
            <target>
              <context value="e29"/>
              <contextType value="variable"/>
              <element value="fullUrl"/>
              <transform value="append"/>
              <parameter>
                <valueString value="https://example/Practitioner"/>
              </parameter>
              <parameter>
                <valueId value="uuid2"/>
              </parameter>
            </target>
            <target>
              <context value="practitionerRole"/>
              <contextType value="variable"/>
              <element value="practitioner"/>
              <variable value="reference"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <target>
              <context value="reference"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="evaluate"/>
              <parameter>
                <valueString
                             value="'https://example/Practitioner' + %practitioner.id"/>
              </parameter>
            </target>
            <rule>
              <name value="meta"/>
              <source>
                <context value="entity"/>
              </source>
              <target>
                <context value="practitioner"/>
                <contextType value="variable"/>
                <element value="meta"/>
                <variable value="meta"/>
              </target>
              <rule>
                <name value="coding"/>
                <source>
                  <context value="entity"/>
                </source>
                <target>
                  <context value="meta"/>
                  <contextType value="variable"/>
                  <element value="tag"/>
                  <variable value="coding"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Coding"/>
                  </parameter>
                </target>
                <rule>
                  <name value="system"/>
                  <source>
                    <context value="entity"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="http://algoritmodiscoring"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="entity"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="code"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="ClinicalDocument/authenticator"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="identifier"/>
              <source>
                <context value="entity"/>
                <element value="id"/>
                <variable value="id"/>
              </source>
              <target>
                <context value="practitioner"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="identifier"/>
              </target>
              <rule>
                <name value="root1"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="translate"/>
                  <parameter>
                    <valueId value="r"/>
                  </parameter>
                  <parameter>
                    <valueString
                                 value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                  </parameter>
                  <parameter>
                    <valueString value="uri"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="extension"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="value"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="assigningAuthorityName"/>
                <source>
                  <context value="id"/>
                  <element value="assigningAuthorityName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="assigner"/>
                  <variable value="a"/>
                </target>
                <target>
                  <context value="a"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="s"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="r"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="practitioner"/>
                    <contextType value="variable"/>
                    <element value="id"/>
                    <variable value="uuid2"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="r + '-' + ext"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e29"/>
                    <contextType value="variable"/>
                    <element value="fullUrl"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Practitioner/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid2"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="practitionerRole"/>
                    <contextType value="variable"/>
                    <element value="practitioner"/>
                    <variable value="reference"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Reference"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="reference"/>
                    <contextType value="variable"/>
                    <element value="reference"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString
                                   value="'https://example/Practitioner/' + %practitioner.id"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="2.16.840.1.113883.2.9.4.3.2"/>
              <source>
                <context value="entity"/>
                <element value="id"/>
                <variable value="id"/>
                <condition value="(root = '2.16.840.1.113883.2.9.4.3.2')"/>
              </source>
              <rule>
                <name value="UUID"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="url"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="Practitioner?identifier="/>
                  </parameter>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <rule>
              <name value="diverso"/>
              <source>
                <context value="entity"/>
                <element value="id"/>
                <variable value="id"/>
                <condition value="(root != '2.16.840.1.113883.2.9.4.3.2')"/>
              </source>
              <rule>
                <name value="UUID"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="url"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="Practitioner?identifier="/>
                  </parameter>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <rule>
              <name value="address"/>
              <source>
                <context value="entity"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="practitioner"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="entity"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="practitioner"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="person"/>
              <source>
                <context value="entity"/>
                <element value="assignedPerson"/>
                <variable value="person"/>
              </source>
              <rule>
                <name value="personName"/>
                <source>
                  <context value="person"/>
                  <element value="name"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="name"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="birth"/>
                <source>
                  <context value="person"/>
                  <element value="birthTime"/>
                  <variable value="birthTime"/>
                </source>
                <rule>
                  <name value="birthTimeauth"/>
                  <source>
                    <context value="birthTime"/>
                    <element value="value"/>
                    <variable value="date"/>
                  </source>
                  <target>
                    <context value="practitioner"/>
                    <contextType value="variable"/>
                    <element value="birthDate"/>
                    <transform value="truncate"/>
                    <parameter>
                      <valueId value="date"/>
                    </parameter>
                    <parameter>
                      <valueInteger value="10"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="reporganization"/>
            <source>
              <context value="entity"/>
              <element value="representedOrganization"/>
              <variable value="reporganization"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e30"/>
            </target>
            <target>
              <context value="e30"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="PUT"/>
              </parameter>
            </target>
            <target>
              <context value="e30"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="organization"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Organization"/>
              </parameter>
            </target>
            <rule>
              <name value="meta"/>
              <source>
                <context value="reporganization"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="meta"/>
                <variable value="meta"/>
              </target>
              <rule>
                <name value="coding"/>
                <source>
                  <context value="reporganization"/>
                </source>
                <target>
                  <context value="meta"/>
                  <contextType value="variable"/>
                  <element value="tag"/>
                  <variable value="coding"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Coding"/>
                  </parameter>
                </target>
                <rule>
                  <name value="system"/>
                  <source>
                    <context value="reporganization"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="http://algoritmodiscoring"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="reporganization"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="code"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString
                                   value="ClinicalDocument/authenticator/representedOrganization"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="identifier"/>
              <source>
                <context value="reporganization"/>
                <element value="id"/>
                <variable value="id"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="identifier"/>
              </target>
              <rule>
                <name value="root1"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="translate"/>
                  <parameter>
                    <valueId value="r"/>
                  </parameter>
                  <parameter>
                    <valueString
                                 value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                  </parameter>
                  <parameter>
                    <valueString value="uri"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="ext"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="value"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="reporganization"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Organization?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="assigningAuthorityName"/>
                <source>
                  <context value="id"/>
                  <element value="assigningAuthorityName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="assigner"/>
                  <variable value="a"/>
                </target>
                <target>
                  <context value="a"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="s"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="r"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="id"/>
                    <variable value="uuid3"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="r + '-' + ext"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e30"/>
                    <contextType value="variable"/>
                    <element value="fullUrl"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Organization/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid3"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="practitionerRole"/>
                    <contextType value="variable"/>
                    <element value="organization"/>
                    <variable value="reference"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Reference"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="reference"/>
                    <contextType value="variable"/>
                    <element value="reference"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString
                                   value="'https://example/Organization/' + %organization.id"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="name"/>
              <source>
                <context value="reporganization"/>
                <element value="name"/>
                <variable value="v"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="name"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="v.other"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="reporganization"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="addr"/>
              <source>
                <context value="reporganization"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="organizationpartof"/>
              <source>
                <context value="reporganization"/>
                <element value="asOrganizationPartOf"/>
                <variable value="organizationpartof"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e31"/>
              </target>
              <target>
                <context value="e31"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e31"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="asOrganizationpartof"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Organization"/>
                </parameter>
              </target>
              <rule>
                <name value="meta"/>
                <source>
                  <context value="organizationpartof"/>
                </source>
                <target>
                  <context value="asOrganizationpartof"/>
                  <contextType value="variable"/>
                  <element value="meta"/>
                  <variable value="meta"/>
                </target>
                <rule>
                  <name value="coding"/>
                  <source>
                    <context value="organizationpartof"/>
                  </source>
                  <target>
                    <context value="meta"/>
                    <contextType value="variable"/>
                    <element value="tag"/>
                    <variable value="coding"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Coding"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="system"/>
                    <source>
                      <context value="organizationpartof"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="http://algoritmodiscoring"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="organizationpartof"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="code"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString
                                     value="ClinicalDocument/authenticator/representedOrganization/asOrganizationPartOf"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="organizationpartof"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="asOrganizationpartof"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="ext"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="UUID"/>
                    <source>
                      <context value="organizationpartof"/>
                    </source>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="Organization?identifier="/>
                      </parameter>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="extension"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="asOrganizationpartof"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid4"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e31"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Organization/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid4"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="organization"/>
                      <contextType value="variable"/>
                      <element value="partOf"/>
                      <variable value="reference"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="reference"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString
                                     value="'https://example/Organization/' + %asOrganizationpartof.id"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="organizationpartof"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="asOrganizationpartof"/>
                  <contextType value="variable"/>
                  <element value="type"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="statusCode"/>
                <source>
                  <context value="organizationpartof"/>
                  <element value="statusCode"/>
                  <variable value="status"/>
                  <condition value="(code = 'active')"/>
                </source>
                <target>
                  <context value="asOrganizationpartof"/>
                  <contextType value="variable"/>
                  <element value="active"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="boolean"/>
                  </parameter>
                </target>
                <target>
                  <context value="asOsrganizationpartof"/>
                  <contextType value="variable"/>
                  <element value="active"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="true"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="wholeorg"/>
                <source>
                  <context value="organizationpartof"/>
                  <element value="wholeOrganization"/>
                  <variable value="wholeorg"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e32"/>
                </target>
                <target>
                  <context value="e32"/>
                  <contextType value="variable"/>
                  <element value="request"/>
                  <variable value="request"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="BackboneElement"/>
                  </parameter>
                </target>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="method"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="PUT"/>
                  </parameter>
                </target>
                <target>
                  <context value="e32"/>
                  <contextType value="variable"/>
                  <element value="resource"/>
                  <variable value="wholeOrganization"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Organization"/>
                  </parameter>
                </target>
                <target>
                  <context value="wholeOrganization"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <variable value="uuid5"/>
                  <transform value="uuid"/>
                </target>
                <target>
                  <context value="e32"/>
                  <contextType value="variable"/>
                  <element value="fullUrl"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="https://example/Organization/"/>
                  </parameter>
                  <parameter>
                    <valueId value="uuid5"/>
                  </parameter>
                </target>
                <target>
                  <context value="asOrganizationpartof"/>
                  <contextType value="variable"/>
                  <element value="partOf"/>
                  <variable value="reference"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <target>
                  <context value="reference"/>
                  <contextType value="variable"/>
                  <element value="reference"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString
                                 value="'https://example/Organization/' + %wholeOrganization.id"/>
                  </parameter>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="wholeorg"/>
                  </source>
                  <target>
                    <context value="wholeOrganization"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="wholeorg"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="wholeorg"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="wholeorg"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/authenticator/representedOrganization/asOrganizationPartOf/wholeOrganization"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="identifier"/>
                  <source>
                    <context value="wholeorg"/>
                    <element value="id"/>
                    <variable value="id"/>
                  </source>
                  <target>
                    <context value="wholeOrganization"/>
                    <contextType value="variable"/>
                    <element value="identifier"/>
                    <variable value="identifier"/>
                  </target>
                  <rule>
                    <name value="root1"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="translate"/>
                      <parameter>
                        <valueId value="r"/>
                      </parameter>
                      <parameter>
                        <valueString
                                     value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                      </parameter>
                      <parameter>
                        <valueString value="uri"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="ext"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="value"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="UUID"/>
                      <source>
                        <context value="wholeorg"/>
                      </source>
                      <target>
                        <context value="request"/>
                        <contextType value="variable"/>
                        <element value="url"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="Organization?identifier="/>
                        </parameter>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                  <rule>
                    <name value="assigningAuthorityName"/>
                    <source>
                      <context value="id"/>
                      <element value="assigningAuthorityName"/>
                      <variable value="s"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="assigner"/>
                      <variable value="a"/>
                    </target>
                    <target>
                      <context value="a"/>
                      <contextType value="variable"/>
                      <element value="display"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="s"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="r"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <rule>
                      <name value="extension"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="wholeOrganization"/>
                        <contextType value="variable"/>
                        <element value="id"/>
                        <variable value="uuid5"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="r + '-' + ext"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e32"/>
                        <contextType value="variable"/>
                        <element value="fullUrl"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Organization/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid5"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="asOrganizationpartof"/>
                        <contextType value="variable"/>
                        <element value="partOf"/>
                        <variable value="reference"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Reference"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="reference"/>
                        <contextType value="variable"/>
                        <element value="reference"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString
                                       value="'https://example/Organization/' + %wholeOrganization.id"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="name"/>
                  <source>
                    <context value="wholeorg"/>
                    <element value="name"/>
                    <variable value="v"/>
                  </source>
                  <target>
                    <context value="wholeOrganization"/>
                    <contextType value="variable"/>
                    <element value="name"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="v.other"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="telecom"/>
                  <source>
                    <context value="wholeorg"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="wholeOrganization"/>
                    <contextType value="variable"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="addr"/>
                  <source>
                    <context value="wholeorg"/>
                    <element value="addr"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="wholeOrganization"/>
                    <contextType value="variable"/>
                    <element value="address"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <documentation value="START Authenticator"/>
    </rule>
    <rule>
      <name value="participant"/>
      <source>
        <context value="src"/>
        <element value="participant"/>
        <variable value="participant"/>
        <condition value="(typeCode != 'IND')"/>
      </source>
      <rule>
        <name value="Participant1"/>
        <source>
          <context value="participant"/>
          <element value="associatedEntity"/>
          <variable value="associetedEntity"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="e313"/>
        </target>
        <target>
          <context value="e313"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="POST"/>
          </parameter>
        </target>
        <target>
          <context value="e313"/>
          <contextType value="variable"/>
          <element value="resource"/>
          <variable value="practitionerRole"/>
          <transform value="create"/>
          <parameter>
            <valueString value="PractitionerRole"/>
          </parameter>
        </target>
        <target>
          <context value="practitionerRole"/>
          <contextType value="variable"/>
          <element value="id"/>
          <variable value="uuid1"/>
          <transform value="uuid"/>
        </target>
        <target>
          <context value="e313"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="https://example/PractitionerRole/"/>
          </parameter>
          <parameter>
            <valueId value="uuid1"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PractitionerRole"/>
          </parameter>
        </target>
        <target>
          <context value="encounter"/>
          <contextType value="variable"/>
          <element value="participant"/>
          <variable value="participant1"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <rule>
          <name value="period"/>
          <source>
            <context value="participant"/>
          </source>
          <target>
            <context value="participant1"/>
            <contextType value="variable"/>
            <element value="period"/>
            <variable value="period"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Period"/>
            </parameter>
          </target>
          <rule>
            <name value="time"/>
            <source>
              <context value="participant"/>
              <element value="time"/>
              <variable value="time"/>
            </source>
            <target>
              <context value="period"/>
              <contextType value="variable"/>
              <element value="start"/>
              <variable value="start"/>
              <transform value="create"/>
              <parameter>
                <valueString value="dateTime"/>
              </parameter>
            </target>
            <dependent>
              <name value="TSDateTime"/>
              <variable value="time"/>
              <variable value="start"/>
            </dependent>
          </rule>
          <documentation
                         value="participant.time as time-&gt;participant1.period as period ,period.start=(time.value);"/>
        </rule>
        <rule>
          <name value="type"/>
          <source>
            <context value="participant"/>
            <variable value="p"/>
          </source>
          <target>
            <context value="participant1"/>
            <contextType value="variable"/>
            <element value="type"/>
            <variable value="type"/>
          </target>
          <rule>
            <name value="codeType"/>
            <source>
              <context value="p"/>
            </source>
            <target>
              <context value="type"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <variable value="coding"/>
            </target>
            <rule>
              <name value="codice"/>
              <source>
                <context value="p"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="code"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="p.typeCode"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="system"/>
              <source>
                <context value="p"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="copy"/>
                <parameter>
                  <valueString
                               value="http://terminology.hl7.org/CodeSystem/v3-ParticipationType"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="par"/>
          <source>
            <context value="participant"/>
          </source>
          <target>
            <context value="participant1"/>
            <contextType value="variable"/>
            <element value="individual"/>
            <variable value="referencepart"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Reference"/>
            </parameter>
          </target>
          <target>
            <context value="referencepart"/>
            <contextType value="variable"/>
            <element value="reference"/>
            <transform value="evaluate"/>
            <parameter>
              <valueString
                           value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="functionCode"/>
          <source>
            <context value="participant"/>
            <element value="functionCode"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="practitionerRole"/>
            <contextType value="variable"/>
            <element value="code"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
        </rule>
        <rule>
          <name value="associetedEntity"/>
          <source>
            <context value="associetedEntity"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="e33"/>
          </target>
          <target>
            <context value="e33"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="PUT"/>
            </parameter>
          </target>
          <target>
            <context value="e33"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="practitioner"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Practitioner"/>
            </parameter>
          </target>
          <rule>
            <name value="meta"/>
            <source>
              <context value="associetedEntity"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="meta"/>
              <variable value="meta"/>
            </target>
            <rule>
              <name value="coding"/>
              <source>
                <context value="associetedEntity"/>
              </source>
              <target>
                <context value="meta"/>
                <contextType value="variable"/>
                <element value="tag"/>
                <variable value="coding"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Coding"/>
                </parameter>
              </target>
              <rule>
                <name value="system"/>
                <source>
                  <context value="associetedEntity"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="http://algoritmodiscoring"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="associetedEntity"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="ClinicalDocument/participant"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="identifier"/>
            <source>
              <context value="associetedEntity"/>
              <element value="id"/>
              <variable value="id"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="identifier"/>
              <variable value="identifier"/>
            </target>
            <rule>
              <name value="root1"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="translate"/>
                <parameter>
                  <valueId value="r"/>
                </parameter>
                <parameter>
                  <valueString
                               value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                </parameter>
                <parameter>
                  <valueString value="uri"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="extension"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="assigningAuthorityName"/>
              <source>
                <context value="id"/>
                <element value="assigningAuthorityName"/>
                <variable value="s"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="assigner"/>
                <variable value="a"/>
              </target>
              <target>
                <context value="a"/>
                <contextType value="variable"/>
                <element value="display"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="s"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="r"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <rule>
                <name value="extension"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <variable value="uuid2"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="r + '-' + ext"/>
                  </parameter>
                </target>
                <target>
                  <context value="e33"/>
                  <contextType value="variable"/>
                  <element value="fullUrl"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="https://example/Practitioner/"/>
                  </parameter>
                  <parameter>
                    <valueId value="uuid2"/>
                  </parameter>
                </target>
                <target>
                  <context value="practitionerRole"/>
                  <contextType value="variable"/>
                  <element value="practitioner"/>
                  <variable value="reference"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <target>
                  <context value="reference"/>
                  <contextType value="variable"/>
                  <element value="reference"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString
                                 value="'https://example/Practitioner/' + %practitioner.id"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="2.16.840.1.113883.2.9.4.3.2"/>
            <source>
              <context value="associetedEntity"/>
              <element value="id"/>
              <variable value="id"/>
              <condition value="(root = '2.16.840.1.113883.2.9.4.3.2')"/>
            </source>
            <rule>
              <name value="UUID"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="url"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="Practitioner?identifier="/>
                </parameter>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="diverso"/>
            <source>
              <context value="associetedEntity"/>
              <element value="id"/>
              <variable value="id"/>
              <condition value="(root != '2.16.840.1.113883.2.9.4.3.2')"/>
            </source>
            <rule>
              <name value="UUID"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="url"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="Practitioner?identifier="/>
                </parameter>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="code"/>
            <source>
              <context value="associetedEntity"/>
              <element value="code"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitionerRole"/>
              <contextType value="variable"/>
              <element value="code"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="addr"/>
            <source>
              <context value="associetedEntity"/>
              <element value="addr"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="address"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="telecom"/>
            <source>
              <context value="associetedEntity"/>
              <element value="telecom"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="telecom"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="name"/>
            <source>
              <context value="associetedEntity"/>
              <element value="associatedPerson"/>
              <variable value="associatedperson"/>
            </source>
            <rule>
              <name value="name"/>
              <source>
                <context value="associatedperson"/>
                <element value="name"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="practitioner"/>
                <contextType value="variable"/>
                <element value="name"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="birth"/>
              <source>
                <context value="associatedperson"/>
                <element value="birthTime"/>
                <variable value="birthTime"/>
              </source>
              <rule>
                <name value="birthTimelegal"/>
                <source>
                  <context value="birthTime"/>
                  <element value="value"/>
                  <variable value="date"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="birthDate"/>
                  <transform value="truncate"/>
                  <parameter>
                    <valueId value="date"/>
                  </parameter>
                  <parameter>
                    <valueInteger value="10"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="scopingOrganization"/>
            <source>
              <context value="associetedEntity"/>
              <element value="scopingOrganization"/>
              <variable value="scopingOrganization"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e34"/>
            </target>
            <target>
              <context value="e34"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="PUT"/>
              </parameter>
            </target>
            <target>
              <context value="e34"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="organization"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Organization"/>
              </parameter>
            </target>
            <rule>
              <name value="meta"/>
              <source>
                <context value="scopingOrganization"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="meta"/>
                <variable value="meta"/>
              </target>
              <rule>
                <name value="coding"/>
                <source>
                  <context value="scopingOrganization"/>
                </source>
                <target>
                  <context value="meta"/>
                  <contextType value="variable"/>
                  <element value="tag"/>
                  <variable value="coding"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Coding"/>
                  </parameter>
                </target>
                <rule>
                  <name value="system"/>
                  <source>
                    <context value="scopingOrganization"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="http://algoritmodiscoring"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="scopingOrganization"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="code"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString
                                   value="ClinicalDocument/participant/scopingOrganization"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="identifier"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="id"/>
                <variable value="id"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="identifier"/>
              </target>
              <rule>
                <name value="root1"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="translate"/>
                  <parameter>
                    <valueId value="r"/>
                  </parameter>
                  <parameter>
                    <valueString
                                 value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                  </parameter>
                  <parameter>
                    <valueString value="uri"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="ext"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="value"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="scopingOrganization"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Organization?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="assigningAuthorityName"/>
                <source>
                  <context value="id"/>
                  <element value="assigningAuthorityName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="assigner"/>
                  <variable value="a"/>
                </target>
                <target>
                  <context value="a"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="s"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="r"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="id"/>
                    <variable value="uuid3"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="r + '-' + ext"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e34"/>
                    <contextType value="variable"/>
                    <element value="fullUrl"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Organization/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid3"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="practitionerRole"/>
                    <contextType value="variable"/>
                    <element value="organization"/>
                    <variable value="reference"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Reference"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="reference"/>
                    <contextType value="variable"/>
                    <element value="reference"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString
                                   value="'https://example/Organization/' + %organization.id"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="name"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="name"/>
                <variable value="v"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="name"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="v.other"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="addr"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="OrgPartOf"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="asOrganizationPartOf"/>
                <variable value="OrgPartOf"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e35"/>
              </target>
              <target>
                <context value="e35"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e35"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="organization1"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Organization"/>
                </parameter>
              </target>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="OrgPartOf"/>
                  </source>
                  <target>
                    <context value="organization1"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="OrgPartOf"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="OrgPartOf"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/participant/scopingOrganization/asOrganizationPartOf"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="ext"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="UUID"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="Organization?identifier="/>
                      </parameter>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="extension"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid4"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e35"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Organization/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid4"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="organization"/>
                      <contextType value="variable"/>
                      <element value="partOf"/>
                      <variable value="reference"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="reference"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString
                                     value="'https://example/Organization/' + %organization1.id"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="type"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="statusCode"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="statusCode"/>
                  <variable value="status"/>
                  <condition value="(value = 'active')"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="active"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="boolean"/>
                  </parameter>
                </target>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="active"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueBoolean value="true"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="wholeOrgan"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="wholeOrganization"/>
                  <variable value="wholeOrgan"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e36"/>
                </target>
                <target>
                  <context value="e36"/>
                  <contextType value="variable"/>
                  <element value="request"/>
                  <variable value="request"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="BackboneElement"/>
                  </parameter>
                </target>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="method"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="PUT"/>
                  </parameter>
                </target>
                <target>
                  <context value="e36"/>
                  <contextType value="variable"/>
                  <element value="resource"/>
                  <variable value="organization2"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Organization"/>
                  </parameter>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="wholeOrgan"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="wholeOrgan"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/participant/scopingOrganization/asOrganizationPartOf/wholeOrganization"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="identifier"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="id"/>
                    <variable value="id"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="identifier"/>
                    <variable value="identifier"/>
                  </target>
                  <rule>
                    <name value="root1"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="translate"/>
                      <parameter>
                        <valueId value="r"/>
                      </parameter>
                      <parameter>
                        <valueString
                                     value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                      </parameter>
                      <parameter>
                        <valueString value="uri"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="ext"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="value"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="UUID"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="request"/>
                        <contextType value="variable"/>
                        <element value="url"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="Organization?identifier="/>
                        </parameter>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                  <rule>
                    <name value="assigningAuthorityName"/>
                    <source>
                      <context value="id"/>
                      <element value="assigningAuthorityName"/>
                      <variable value="s"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="assigner"/>
                      <variable value="a"/>
                    </target>
                    <target>
                      <context value="a"/>
                      <contextType value="variable"/>
                      <element value="display"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="s"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="r"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <rule>
                      <name value="extension"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="organization1"/>
                        <contextType value="variable"/>
                        <element value="id"/>
                        <variable value="uuid5"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="r + '-' + ext"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e36"/>
                        <contextType value="variable"/>
                        <element value="fullUrl"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Organization/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid5"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="organization1"/>
                        <contextType value="variable"/>
                        <element value="partOf"/>
                        <variable value="reference"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Reference"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="reference"/>
                        <contextType value="variable"/>
                        <element value="reference"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString
                                       value="'https://example/Organization/' + %organization2.id"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="name"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="name"/>
                    <variable value="v"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="name"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="v.other"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="telecom"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="addr"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="addr"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="address"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <documentation value="PARTICIPANT"/>
    </rule>
    <rule>
      <name value="participant"/>
      <source>
        <context value="src"/>
        <element value="participant"/>
        <variable value="participant"/>
        <condition value="(typeCode = 'IND')"/>
      </source>
      <rule>
        <name value="Participant2"/>
        <source>
          <context value="participant"/>
          <element value="associatedEntity"/>
          <variable value="associetedEntity"/>
          <condition value="(classCode = 'PROV')"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="e313"/>
        </target>
        <target>
          <context value="e313"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="POST"/>
          </parameter>
        </target>
        <target>
          <context value="e313"/>
          <contextType value="variable"/>
          <element value="resource"/>
          <variable value="practitionerRole"/>
          <transform value="create"/>
          <parameter>
            <valueString value="PractitionerRole"/>
          </parameter>
        </target>
        <target>
          <context value="practitionerRole"/>
          <contextType value="variable"/>
          <element value="id"/>
          <variable value="uuid1"/>
          <transform value="uuid"/>
        </target>
        <target>
          <context value="e313"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="https://example/PractitionerRole/"/>
          </parameter>
          <parameter>
            <valueId value="uuid1"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PractitionerRole"/>
          </parameter>
        </target>
        <target>
          <context value="encounter"/>
          <contextType value="variable"/>
          <element value="participant"/>
          <variable value="participant2"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <rule>
          <name value="period"/>
          <source>
            <context value="participant"/>
          </source>
          <target>
            <context value="participant2"/>
            <contextType value="variable"/>
            <element value="period"/>
            <variable value="period"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Period"/>
            </parameter>
          </target>
          <rule>
            <name value="time"/>
            <source>
              <context value="participant"/>
              <element value="time"/>
              <variable value="time"/>
            </source>
            <target>
              <context value="period"/>
              <contextType value="variable"/>
              <element value="start"/>
              <variable value="start"/>
              <transform value="create"/>
              <parameter>
                <valueString value="dateTime"/>
              </parameter>
            </target>
            <dependent>
              <name value="TSDateTime"/>
              <variable value="time"/>
              <variable value="start"/>
            </dependent>
          </rule>
          <documentation
                         value="participant.time as time-&gt;participant2.period as period, period.start=(time.value);"/>
        </rule>
        <rule>
          <name value="type"/>
          <source>
            <context value="participant"/>
            <variable value="p"/>
          </source>
          <target>
            <context value="participant2"/>
            <contextType value="variable"/>
            <element value="type"/>
            <variable value="type"/>
          </target>
          <rule>
            <name value="codeType"/>
            <source>
              <context value="p"/>
            </source>
            <target>
              <context value="type"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <variable value="coding"/>
            </target>
            <rule>
              <name value="codice"/>
              <source>
                <context value="p"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="code"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="p.typeCode"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="system"/>
              <source>
                <context value="p"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="copy"/>
                <parameter>
                  <valueString
                               value="http://terminology.hl7.org/CodeSystem/v3-ParticipationType"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="par"/>
          <source>
            <context value="participant"/>
          </source>
          <target>
            <context value="participant2"/>
            <contextType value="variable"/>
            <element value="individual"/>
            <variable value="referencepart"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Reference"/>
            </parameter>
          </target>
          <target>
            <context value="referencepart"/>
            <contextType value="variable"/>
            <element value="reference"/>
            <transform value="evaluate"/>
            <parameter>
              <valueString
                           value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="functionCode"/>
          <source>
            <context value="participant"/>
            <element value="functionCode"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="practitionerRole"/>
            <contextType value="variable"/>
            <element value="code"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
        </rule>
        <rule>
          <name value="associetedEntity"/>
          <source>
            <context value="associetedEntity"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="e33"/>
          </target>
          <target>
            <context value="e33"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="PUT"/>
            </parameter>
          </target>
          <target>
            <context value="e33"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="practitioner"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Practitioner"/>
            </parameter>
          </target>
          <rule>
            <name value="meta"/>
            <source>
              <context value="associetedEntity"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="meta"/>
              <variable value="meta"/>
            </target>
            <rule>
              <name value="coding"/>
              <source>
                <context value="associetedEntity"/>
              </source>
              <target>
                <context value="meta"/>
                <contextType value="variable"/>
                <element value="tag"/>
                <variable value="coding"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Coding"/>
                </parameter>
              </target>
              <rule>
                <name value="system"/>
                <source>
                  <context value="associetedEntity"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="http://algoritmodiscoring"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="associetedEntity"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="ClinicalDocument/participant"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="identifier"/>
            <source>
              <context value="associetedEntity"/>
              <element value="id"/>
              <variable value="id"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="identifier"/>
              <variable value="identifier"/>
            </target>
            <rule>
              <name value="root1"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="translate"/>
                <parameter>
                  <valueId value="r"/>
                </parameter>
                <parameter>
                  <valueString
                               value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                </parameter>
                <parameter>
                  <valueString value="uri"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="extension"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="assigningAuthorityName"/>
              <source>
                <context value="id"/>
                <element value="assigningAuthorityName"/>
                <variable value="s"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="assigner"/>
                <variable value="a"/>
              </target>
              <target>
                <context value="a"/>
                <contextType value="variable"/>
                <element value="display"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="s"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="r"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <rule>
                <name value="extension"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <variable value="uuid2"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="r + '-' + ext"/>
                  </parameter>
                </target>
                <target>
                  <context value="e33"/>
                  <contextType value="variable"/>
                  <element value="fullUrl"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="https://example/Practitioner/"/>
                  </parameter>
                  <parameter>
                    <valueId value="uuid2"/>
                  </parameter>
                </target>
                <target>
                  <context value="practitionerRole"/>
                  <contextType value="variable"/>
                  <element value="practitioner"/>
                  <variable value="reference"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <target>
                  <context value="reference"/>
                  <contextType value="variable"/>
                  <element value="reference"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString
                                 value="'https://example/Practitioner/' + %practitioner.id"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="2.16.840.1.113883.2.9.4.3.2"/>
            <source>
              <context value="associetedEntity"/>
              <element value="id"/>
              <variable value="id"/>
              <condition value="(root = '2.16.840.1.113883.2.9.4.3.2')"/>
            </source>
            <rule>
              <name value="UUID"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="url"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="Practitioner?identifier="/>
                </parameter>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="diverso"/>
            <source>
              <context value="associetedEntity"/>
              <element value="id"/>
              <variable value="id"/>
              <condition value="(root != '2.16.840.1.113883.2.9.4.3.2')"/>
            </source>
            <rule>
              <name value="UUID"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="url"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="Practitioner?identifier="/>
                </parameter>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="code"/>
            <source>
              <context value="associetedEntity"/>
              <element value="code"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitionerRole"/>
              <contextType value="variable"/>
              <element value="code"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="addr"/>
            <source>
              <context value="associetedEntity"/>
              <element value="addr"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="address"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="telecom"/>
            <source>
              <context value="associetedEntity"/>
              <element value="telecom"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="telecom"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="name"/>
            <source>
              <context value="associetedEntity"/>
              <element value="associatedPerson"/>
              <variable value="associatedperson"/>
            </source>
            <rule>
              <name value="name"/>
              <source>
                <context value="associatedperson"/>
                <element value="name"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="practitioner"/>
                <contextType value="variable"/>
                <element value="name"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="birth"/>
              <source>
                <context value="associatedperson"/>
                <element value="birthTime"/>
                <variable value="birthTime"/>
              </source>
              <rule>
                <name value="birthTimelegal"/>
                <source>
                  <context value="birthTime"/>
                  <element value="value"/>
                  <variable value="date"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="birthDate"/>
                  <transform value="truncate"/>
                  <parameter>
                    <valueId value="date"/>
                  </parameter>
                  <parameter>
                    <valueInteger value="10"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="scopingOrganization"/>
            <source>
              <context value="associetedEntity"/>
              <element value="scopingOrganization"/>
              <variable value="scopingOrganization"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e34"/>
            </target>
            <target>
              <context value="e34"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="PUT"/>
              </parameter>
            </target>
            <target>
              <context value="e34"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="organization"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Organization"/>
              </parameter>
            </target>
            <rule>
              <name value="meta"/>
              <source>
                <context value="scopingOrganization"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="meta"/>
                <variable value="meta"/>
              </target>
              <rule>
                <name value="coding"/>
                <source>
                  <context value="scopingOrganization"/>
                </source>
                <target>
                  <context value="meta"/>
                  <contextType value="variable"/>
                  <element value="tag"/>
                  <variable value="coding"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Coding"/>
                  </parameter>
                </target>
                <rule>
                  <name value="system"/>
                  <source>
                    <context value="scopingOrganization"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="http://algoritmodiscoring"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="scopingOrganization"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="code"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString
                                   value="ClinicalDocument/participant/scopingOrganization"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="identifier"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="id"/>
                <variable value="id"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="identifier"/>
              </target>
              <rule>
                <name value="root1"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="translate"/>
                  <parameter>
                    <valueId value="r"/>
                  </parameter>
                  <parameter>
                    <valueString
                                 value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                  </parameter>
                  <parameter>
                    <valueString value="uri"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="ext"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="value"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="scopingOrganization"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Organization?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="assigningAuthorityName"/>
                <source>
                  <context value="id"/>
                  <element value="assigningAuthorityName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="assigner"/>
                  <variable value="a"/>
                </target>
                <target>
                  <context value="a"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="s"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="r"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="id"/>
                    <variable value="uuid3"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="r + '-' + ext"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e34"/>
                    <contextType value="variable"/>
                    <element value="fullUrl"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Organization/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid3"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="practitionerRole"/>
                    <contextType value="variable"/>
                    <element value="organization"/>
                    <variable value="reference"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Reference"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="reference"/>
                    <contextType value="variable"/>
                    <element value="reference"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString
                                   value="'https://example/Organization/' + %organization.id"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="name"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="name"/>
                <variable value="v"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="name"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="v.other"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="addr"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="OrgPartOf"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="asOrganizationPartOf"/>
                <variable value="OrgPartOf"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e35"/>
              </target>
              <target>
                <context value="e35"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e35"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="organization1"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Organization"/>
                </parameter>
              </target>
              <rule>
                <name value="meta"/>
                <source>
                  <context value="OrgPartOf"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="meta"/>
                  <variable value="meta"/>
                </target>
                <rule>
                  <name value="coding"/>
                  <source>
                    <context value="OrgPartOf"/>
                  </source>
                  <target>
                    <context value="meta"/>
                    <contextType value="variable"/>
                    <element value="tag"/>
                    <variable value="coding"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Coding"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="system"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="http://algoritmodiscoring"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="code"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString
                                     value="ClinicalDocument/participant/scopingOrganization/asOrganizationPartOf"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="ext"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="UUID"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="Organization?identifier="/>
                      </parameter>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="extension"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid4"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e35"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Organization/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid4"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="organization"/>
                      <contextType value="variable"/>
                      <element value="partOf"/>
                      <variable value="reference"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="reference"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString
                                     value="'https://example/Organization/' + %organization1.id"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="type"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="statusCode"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="statusCode"/>
                  <variable value="status"/>
                  <condition value="(value = 'active')"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="active"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="boolean"/>
                  </parameter>
                </target>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="active"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueBoolean value="true"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="wholeOrgan"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="wholeOrganization"/>
                  <variable value="wholeOrgan"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e36"/>
                </target>
                <target>
                  <context value="e36"/>
                  <contextType value="variable"/>
                  <element value="request"/>
                  <variable value="request"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="BackboneElement"/>
                  </parameter>
                </target>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="method"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="PUT"/>
                  </parameter>
                </target>
                <target>
                  <context value="e36"/>
                  <contextType value="variable"/>
                  <element value="resource"/>
                  <variable value="organization2"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Organization"/>
                  </parameter>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="wholeOrgan"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="wholeOrgan"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/participant/scopingOrganization/asOrganizationPartOf/wholeOrganization"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="identifier"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="id"/>
                    <variable value="id"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="identifier"/>
                    <variable value="identifier"/>
                  </target>
                  <rule>
                    <name value="root1"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="translate"/>
                      <parameter>
                        <valueId value="r"/>
                      </parameter>
                      <parameter>
                        <valueString
                                     value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                      </parameter>
                      <parameter>
                        <valueString value="uri"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="ext"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="value"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="UUID"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="request"/>
                        <contextType value="variable"/>
                        <element value="url"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="Organization?identifier="/>
                        </parameter>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                  <rule>
                    <name value="assigningAuthorityName"/>
                    <source>
                      <context value="id"/>
                      <element value="assigningAuthorityName"/>
                      <variable value="s"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="assigner"/>
                      <variable value="a"/>
                    </target>
                    <target>
                      <context value="a"/>
                      <contextType value="variable"/>
                      <element value="display"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="s"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="r"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <rule>
                      <name value="extension"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="organization1"/>
                        <contextType value="variable"/>
                        <element value="id"/>
                        <variable value="uuid5"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="r + '-' + ext"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e36"/>
                        <contextType value="variable"/>
                        <element value="fullUrl"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Organization/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid5"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="organization1"/>
                        <contextType value="variable"/>
                        <element value="partOf"/>
                        <variable value="reference"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Reference"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="reference"/>
                        <contextType value="variable"/>
                        <element value="reference"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString
                                       value="'https://example/Organization/' + %organization2.id"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="name"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="name"/>
                    <variable value="v"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="name"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="v.other"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="telecom"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="addr"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="addr"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="address"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="WHERE"/>
        <source>
          <context value="participant"/>
          <element value="associatedEntity"/>
          <variable value="associetedEntity"/>
          <condition
                     value="(classCode = 'NOK') or (classCode = 'ECON') or (classCode = 'CAREGIVER')"/>
        </source>
        <rule>
          <name value="participant3"/>
          <source>
            <context value="associetedEntity"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="e3131"/>
          </target>
          <target>
            <context value="e3131"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="POST"/>
            </parameter>
          </target>
          <target>
            <context value="e3131"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="RelatedPerson"/>
            <transform value="create"/>
            <parameter>
              <valueString value="RelatedPerson"/>
            </parameter>
          </target>
          <target>
            <context value="RelatedPerson"/>
            <contextType value="variable"/>
            <element value="id"/>
            <variable value="uuid1"/>
            <transform value="uuid"/>
          </target>
          <target>
            <context value="e3131"/>
            <contextType value="variable"/>
            <element value="fullUrl"/>
            <transform value="append"/>
            <parameter>
              <valueString value="https://example/RelatedPerson/"/>
            </parameter>
            <parameter>
              <valueId value="uuid1"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="url"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="RelatedPerson"/>
            </parameter>
          </target>
          <rule>
            <name value="link"/>
            <source>
              <context value="associetedEntity"/>
            </source>
            <target>
              <context value="patientResource"/>
              <contextType value="variable"/>
              <element value="link"/>
              <variable value="link"/>
            </target>
            <rule>
              <name value="type"/>
              <source>
                <context value="associetedEntity"/>
              </source>
              <target>
                <context value="link"/>
                <contextType value="variable"/>
                <element value="type"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="refer"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="reference"/>
              <source>
                <context value="associetedEntity"/>
              </source>
              <target>
                <context value="link"/>
                <contextType value="variable"/>
                <element value="other"/>
                <variable value="reference"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Reference"/>
                </parameter>
              </target>
              <target>
                <context value="reference"/>
                <contextType value="variable"/>
                <element value="reference"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString
                               value="'https://example/RelatedPerson/' + %RelatedPerson.id"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="id"/>
              <source>
                <context value="associetedEntity"/>
                <element value="id"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="RelatedPerson"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="reference"/>
              <source>
                <context value="associetedEntity"/>
              </source>
              <target>
                <context value="RelatedPerson"/>
                <contextType value="variable"/>
                <element value="patient"/>
                <variable value="reference"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Reference"/>
                </parameter>
              </target>
              <target>
                <context value="reference"/>
                <contextType value="variable"/>
                <element value="reference"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString
                               value="'https://example/Patient/' + %patientResource.id"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="code"/>
              <source>
                <context value="associetedEntity"/>
                <element value="code"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="RelatedPerson"/>
                <contextType value="variable"/>
                <element value="relationship"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="associetedEntity"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="RelatedPerson"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="associatedPerson"/>
              <source>
                <context value="associetedEntity"/>
                <element value="associatedPerson"/>
                <variable value="associatedperson"/>
              </source>
              <rule>
                <name value="name"/>
                <source>
                  <context value="associatedperson"/>
                  <element value="name"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="RelatedPerson"/>
                  <contextType value="variable"/>
                  <element value="name"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="repOrg"/>
        <source>
          <context value="participant"/>
          <element value="associatedEntity"/>
          <variable value="associetedentity"/>
          <condition value="(classCode = 'GUAR')"/>
        </source>
        <rule>
          <name value="associetedEntity"/>
          <source>
            <context value="associetedentity"/>
            <element value="scopingOrganization"/>
            <variable value="representedOrganization"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="e37"/>
          </target>
          <target>
            <context value="e37"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="PUT"/>
            </parameter>
          </target>
          <target>
            <context value="e37"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="organization"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Organization"/>
            </parameter>
          </target>
          <rule>
            <name value="meta"/>
            <source>
              <context value="representedOrganization"/>
            </source>
            <target>
              <context value="organization"/>
              <contextType value="variable"/>
              <element value="meta"/>
              <variable value="meta"/>
            </target>
            <rule>
              <name value="coding"/>
              <source>
                <context value="representedOrganization"/>
              </source>
              <target>
                <context value="meta"/>
                <contextType value="variable"/>
                <element value="tag"/>
                <variable value="coding"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Coding"/>
                </parameter>
              </target>
              <rule>
                <name value="system"/>
                <source>
                  <context value="representedOrganization"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="http://algoritmodiscoring"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="representedOrganization"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString
                                 value="ClinicalDocument/participant/scopingOrganization"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="code"/>
            <source>
              <context value="associetedentity"/>
              <element value="code"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="organization"/>
              <contextType value="variable"/>
              <element value="type"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="scopingOrganization"/>
            <source>
              <context value="associetedentity"/>
              <element value="scopingOrganization"/>
              <variable value="scopingOrganization"/>
            </source>
            <rule>
              <name value="identifier"/>
              <source>
                <context value="associetedentity"/>
                <element value="id"/>
                <variable value="id"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="identifier"/>
              </target>
              <rule>
                <name value="time"/>
                <source>
                  <context value="participant"/>
                  <element value="time"/>
                  <variable value="time"/>
                </source>
                <rule>
                  <name value="period"/>
                  <source>
                    <context value="time"/>
                    <element value="high"/>
                    <variable value="high"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="period"/>
                    <variable value="period"/>
                  </target>
                  <rule>
                    <name value="periodend"/>
                    <source>
                      <context value="high"/>
                    </source>
                    <target>
                      <context value="period"/>
                      <contextType value="variable"/>
                      <element value="end"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="high.value"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="root1"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="translate"/>
                  <parameter>
                    <valueId value="r"/>
                  </parameter>
                  <parameter>
                    <valueString
                                 value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                  </parameter>
                  <parameter>
                    <valueString value="uri"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="ext"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="value"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="associetedentity"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Organization?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="assigningAuthorityName"/>
                <source>
                  <context value="id"/>
                  <element value="assigningAuthorityName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="assigner"/>
                  <variable value="a"/>
                </target>
                <target>
                  <context value="a"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="s"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="r"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="id"/>
                    <variable value="uuid1"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="r + '-' + ext"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e37"/>
                    <contextType value="variable"/>
                    <element value="fullUrl"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Organization/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid1"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="patientResource"/>
                    <contextType value="variable"/>
                    <element value="generalPractitioner"/>
                    <variable value="referenceOrg"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Reference"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="referenceOrg"/>
                    <contextType value="variable"/>
                    <element value="reference"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Organization/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid1"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="name"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="name"/>
                <variable value="v"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="name"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="v.other"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="addr"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="OrgPartOf"/>
              <source>
                <context value="scopingOrganization"/>
                <element value="asOrganizationPartOf"/>
                <variable value="OrgPartOf"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e38"/>
              </target>
              <target>
                <context value="e38"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e38"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="organizationPOF"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Organization"/>
                </parameter>
              </target>
              <rule>
                <name value="meta"/>
                <source>
                  <context value="OrgPartOf"/>
                </source>
                <target>
                  <context value="organizationPOF"/>
                  <contextType value="variable"/>
                  <element value="meta"/>
                  <variable value="meta"/>
                </target>
                <rule>
                  <name value="coding"/>
                  <source>
                    <context value="OrgPartOf"/>
                  </source>
                  <target>
                    <context value="meta"/>
                    <contextType value="variable"/>
                    <element value="tag"/>
                    <variable value="coding"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Coding"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="system"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="http://algoritmodiscoring"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="code"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString
                                     value="ClinicalDocument/participant/scopingOrganization/asOrganizationPartOf"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="organizationPOF"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="ext"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="UUID"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="Organization?identifier="/>
                      </parameter>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="extension"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="organizationPOF"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid2"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e38"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Organization/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid2"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="organization"/>
                      <contextType value="variable"/>
                      <element value="partOf"/>
                      <variable value="reference"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="reference"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString
                                     value="'https://example/Organization/' + %organizationPOF.id"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organizationPOF"/>
                  <contextType value="variable"/>
                  <element value="type"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="statusCode"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="statusCode"/>
                  <variable value="status"/>
                  <condition value="(value = 'active')"/>
                </source>
                <target>
                  <context value="organizationPOF"/>
                  <contextType value="variable"/>
                  <element value="active"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="boolean"/>
                  </parameter>
                </target>
                <target>
                  <context value="organizationPOF"/>
                  <contextType value="variable"/>
                  <element value="active"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="true"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="wholeOrgan"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="wholeOrganization"/>
                  <variable value="wholeOrgan"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e39"/>
                </target>
                <target>
                  <context value="e39"/>
                  <contextType value="variable"/>
                  <element value="request"/>
                  <variable value="request"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="BackboneElement"/>
                  </parameter>
                </target>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="method"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="PUT"/>
                  </parameter>
                </target>
                <target>
                  <context value="e39"/>
                  <contextType value="variable"/>
                  <element value="resource"/>
                  <variable value="organizationW"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Organization"/>
                  </parameter>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="wholeOrgan"/>
                  </source>
                  <target>
                    <context value="organizationW"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="wholeOrgan"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/participant/scopingOrganization/asOrganizationPartOf/wholeOrganization"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="identifier"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="id"/>
                    <variable value="id"/>
                  </source>
                  <target>
                    <context value="organizationW"/>
                    <contextType value="variable"/>
                    <element value="identifier"/>
                    <variable value="identifier"/>
                  </target>
                  <rule>
                    <name value="root1"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="translate"/>
                      <parameter>
                        <valueId value="r"/>
                      </parameter>
                      <parameter>
                        <valueString
                                     value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                      </parameter>
                      <parameter>
                        <valueString value="uri"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="ext"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="value"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="UUID"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="request"/>
                        <contextType value="variable"/>
                        <element value="url"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="Organization?identifier="/>
                        </parameter>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                  <rule>
                    <name value="assigningAuthorityName"/>
                    <source>
                      <context value="id"/>
                      <element value="assigningAuthorityName"/>
                      <variable value="s"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="assigner"/>
                      <variable value="a"/>
                    </target>
                    <target>
                      <context value="a"/>
                      <contextType value="variable"/>
                      <element value="display"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="s"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="r"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <rule>
                      <name value="extension"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="organizationW"/>
                        <contextType value="variable"/>
                        <element value="id"/>
                        <variable value="uuid3"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="r + '-' + ext"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e39"/>
                        <contextType value="variable"/>
                        <element value="fullUrl"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Organization/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid3"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="organizationPOF"/>
                        <contextType value="variable"/>
                        <element value="partOf"/>
                        <variable value="reference"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Reference"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="reference"/>
                        <contextType value="variable"/>
                        <element value="reference"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString
                                       value="'https://example/Organization/' + %organizationW.id"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="name"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="name"/>
                    <variable value="v"/>
                  </source>
                  <target>
                    <context value="organizationW"/>
                    <contextType value="variable"/>
                    <element value="name"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="v.other"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="telecom"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organizationW"/>
                    <contextType value="variable"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="addr"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="addr"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organizationW"/>
                    <contextType value="variable"/>
                    <element value="address"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
        <documentation value="START PARTICIPANT GUAR"/>
      </rule>
    </rule>
    <rule>
      <name value="inFulfillmentOf"/>
      <source>
        <context value="src"/>
        <element value="inFulfillmentOf"/>
        <variable value="inFulfillmentOf"/>
      </source>
      <rule>
        <name value="order"/>
        <source>
          <context value="inFulfillmentOf"/>
          <element value="order"/>
          <variable value="order"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="e40"/>
        </target>
        <target>
          <context value="e40"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="POST"/>
          </parameter>
        </target>
        <target>
          <context value="e40"/>
          <contextType value="variable"/>
          <element value="resource"/>
          <variable value="serviceRequest"/>
          <transform value="create"/>
          <parameter>
            <valueString value="ServiceRequest"/>
          </parameter>
        </target>
        <target>
          <context value="serviceRequest"/>
          <contextType value="variable"/>
          <element value="id"/>
          <variable value="uuid1"/>
          <transform value="uuid"/>
        </target>
        <target>
          <context value="e40"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="https://example/ServiceRequest/"/>
          </parameter>
          <parameter>
            <valueId value="uuid1"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="ServiceRequest"/>
          </parameter>
        </target>
        <target>
          <context value="encounter"/>
          <contextType value="variable"/>
          <element value="basedOn"/>
          <variable value="reference"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Reference"/>
          </parameter>
        </target>
        <target>
          <context value="reference"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString
                         value="'https://example/ServiceRequest/' + %serviceRequest.id"/>
          </parameter>
        </target>
        <rule>
          <name value="id"/>
          <source>
            <context value="order"/>
            <element value="id"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="serviceRequest"/>
            <contextType value="variable"/>
            <element value="identifier"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
        </rule>
        <rule>
          <name value="status"/>
          <source>
            <context value="order"/>
          </source>
          <target>
            <context value="serviceRequest"/>
            <contextType value="variable"/>
            <element value="status"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="active"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="intent"/>
          <source>
            <context value="order"/>
          </source>
          <target>
            <context value="serviceRequest"/>
            <contextType value="variable"/>
            <element value="intent"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="order"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="reference"/>
          <source>
            <context value="order"/>
          </source>
          <target>
            <context value="serviceRequest"/>
            <contextType value="variable"/>
            <element value="subject"/>
            <variable value="reference"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Reference"/>
            </parameter>
          </target>
          <target>
            <context value="reference"/>
            <contextType value="variable"/>
            <element value="reference"/>
            <transform value="evaluate"/>
            <parameter>
              <valueString
                           value="'https://example/Patient/' + %patientResource.id"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="reference"/>
          <source>
            <context value="order"/>
          </source>
          <target>
            <context value="serviceRequest"/>
            <contextType value="variable"/>
            <element value="encounter"/>
            <variable value="reference"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Reference"/>
            </parameter>
          </target>
          <target>
            <context value="reference"/>
            <contextType value="variable"/>
            <element value="reference"/>
            <transform value="evaluate"/>
            <parameter>
              <valueString
                           value="'https://example/Encounter/' + %encounter.id"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="code"/>
          <source>
            <context value="order"/>
            <element value="code"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="serviceRequest"/>
            <contextType value="variable"/>
            <element value="code"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
        </rule>
        <rule>
          <name value="priorityCode"/>
          <source>
            <context value="order"/>
            <element value="priorityCode"/>
            <variable value="priorityCode"/>
          </source>
          <rule>
            <name value="priority"/>
            <source>
              <context value="priorityCode"/>
              <element value="code"/>
              <variable value="v"/>
            </source>
            <target>
              <context value="serviceRequest"/>
              <contextType value="variable"/>
              <element value="priority"/>
              <transform value="translate"/>
              <parameter>
                <valueId value="v"/>
              </parameter>
              <parameter>
                <valueString value="#priority"/>
              </parameter>
              <parameter>
                <valueString value="code"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="documentationOf"/>
      <source>
        <context value="src"/>
        <element value="documentationOf"/>
        <variable value="docOf"/>
      </source>
      <rule>
        <name value="serviceEvent"/>
        <source>
          <context value="docOf"/>
          <element value="serviceEvent"/>
          <variable value="serviceEvent"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="event"/>
          <variable value="event"/>
        </target>
        <rule>
          <name value="eventCode"/>
          <source>
            <context value="serviceEvent"/>
            <element value="code"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="event"/>
            <contextType value="variable"/>
            <element value="code"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
        </rule>
        <rule>
          <name value="eventDT"/>
          <source>
            <context value="serviceEvent"/>
            <element value="effectiveTime"/>
            <variable value="effectiveTime"/>
          </source>
          <rule>
            <name value="period"/>
            <source>
              <context value="effectiveTime"/>
            </source>
            <target>
              <context value="event"/>
              <contextType value="variable"/>
              <element value="period"/>
              <variable value="period"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Period"/>
              </parameter>
            </target>
            <dependent>
              <name value="IVLTSPeriod"/>
              <variable value="effectiveTime"/>
              <variable value="period"/>
            </dependent>
          </rule>
        </rule>
        <rule>
          <name value="efft"/>
          <source>
            <context value="serviceEvent"/>
            <element value="effectiveTime"/>
            <variable value="effectivetime1"/>
          </source>
          <target>
            <context value="event"/>
            <contextType value="variable"/>
            <element value="period"/>
            <variable value="period"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Period"/>
            </parameter>
          </target>
          <rule>
            <name value="val"/>
            <source>
              <context value="effectivetime1"/>
            </source>
            <target>
              <context value="period"/>
              <contextType value="variable"/>
              <element value="start"/>
              <variable value="start"/>
              <transform value="create"/>
              <parameter>
                <valueString value="dateTime"/>
              </parameter>
            </target>
            <dependent>
              <name value="TSDateTime"/>
              <variable value="effectivetime1"/>
              <variable value="start"/>
            </dependent>
          </rule>
        </rule>
        <rule>
          <name value="docOf"/>
          <source>
            <context value="serviceEvent"/>
            <element value="performer"/>
            <variable value="performer"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="e41"/>
          </target>
          <target>
            <context value="e41"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="POST"/>
            </parameter>
          </target>
          <target>
            <context value="e41"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="practitionerRole"/>
            <transform value="create"/>
            <parameter>
              <valueString value="PractitionerRole"/>
            </parameter>
          </target>
          <target>
            <context value="practitionerRole"/>
            <contextType value="variable"/>
            <element value="id"/>
            <variable value="uuid1"/>
            <transform value="uuid"/>
          </target>
          <target>
            <context value="e41"/>
            <contextType value="variable"/>
            <element value="fullUrl"/>
            <transform value="append"/>
            <parameter>
              <valueString value="https://example/PractitionerRole/"/>
            </parameter>
            <parameter>
              <valueId value="uuid1"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="url"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="PractitionerRole"/>
            </parameter>
          </target>
          <rule>
            <name value="performer"/>
            <source>
              <context value="performer"/>
            </source>
            <target>
              <context value="event"/>
              <contextType value="variable"/>
              <element value="detail"/>
              <variable value="reference"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <target>
              <context value="reference"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="evaluate"/>
              <parameter>
                <valueString
                             value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
              </parameter>
            </target>
            <rule>
              <name value="AssignedEntity"/>
              <source>
                <context value="performer"/>
                <element value="assignedEntity"/>
                <variable value="assignedEntity"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e42"/>
              </target>
              <target>
                <context value="e42"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e42"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="practitioner"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Practitioner"/>
                </parameter>
              </target>
              <rule>
                <name value="meta"/>
                <source>
                  <context value="assignedEntity"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="meta"/>
                  <variable value="meta"/>
                </target>
                <rule>
                  <name value="coding"/>
                  <source>
                    <context value="assignedEntity"/>
                  </source>
                  <target>
                    <context value="meta"/>
                    <contextType value="variable"/>
                    <element value="tag"/>
                    <variable value="coding"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Coding"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="system"/>
                    <source>
                      <context value="assignedEntity"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="http://algoritmodiscoring"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="assignedEntity"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="code"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString
                                     value="ClinicalDocument/documentationOf/serviceEvent/performer"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="functionCode"/>
                <source>
                  <context value="performer"/>
                  <element value="functionCode"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitionerRole"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="assignedEntity"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitionerRole"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="assignedEntity"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="extension"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="practitioner"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid2"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e42"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Practitioner/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid2"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="practitionerRole"/>
                      <contextType value="variable"/>
                      <element value="practitioner"/>
                      <variable value="reference"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="reference"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString
                                     value="'https://example/Practitioner/' + %practitioner.id"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="2.16.840.1.113883.2.9.4.3.2"/>
                <source>
                  <context value="assignedEntity"/>
                  <element value="id"/>
                  <variable value="id"/>
                  <condition value="(root = '2.16.840.1.113883.2.9.4.3.2')"/>
                </source>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Practitioner?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="diverso"/>
                <source>
                  <context value="assignedEntity"/>
                  <element value="id"/>
                  <variable value="id"/>
                  <condition value="(root != '2.16.840.1.113883.2.9.4.3.2')"/>
                </source>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Practitioner?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="addr"/>
                <source>
                  <context value="assignedEntity"/>
                  <element value="addr"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="address"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="telecom"/>
                <source>
                  <context value="assignedEntity"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="name"/>
                <source>
                  <context value="assignedEntity"/>
                  <element value="assignedPerson"/>
                  <variable value="person"/>
                </source>
                <rule>
                  <name value="name"/>
                  <source>
                    <context value="person"/>
                    <element value="name"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="practitioner"/>
                    <contextType value="variable"/>
                    <element value="name"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="birth"/>
                  <source>
                    <context value="person"/>
                    <element value="birthTime"/>
                    <variable value="birthTime"/>
                  </source>
                  <rule>
                    <name value="birthTimelegal"/>
                    <source>
                      <context value="birthTime"/>
                      <element value="value"/>
                      <variable value="date"/>
                    </source>
                    <target>
                      <context value="practitioner"/>
                      <contextType value="variable"/>
                      <element value="birthDate"/>
                      <transform value="truncate"/>
                      <parameter>
                        <valueId value="date"/>
                      </parameter>
                      <parameter>
                        <valueInteger value="10"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="RepresentedOrganization"/>
                <source>
                  <context value="assignedEntity"/>
                  <element value="representedOrganization"/>
                  <variable value="representedOrganization"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e8"/>
                </target>
                <target>
                  <context value="e8"/>
                  <contextType value="variable"/>
                  <element value="request"/>
                  <variable value="request"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="BackboneElement"/>
                  </parameter>
                </target>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="method"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="PUT"/>
                  </parameter>
                </target>
                <target>
                  <context value="e8"/>
                  <contextType value="variable"/>
                  <element value="resource"/>
                  <variable value="organization"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Organization"/>
                  </parameter>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="representedOrganization"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="representedOrganization"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="representedOrganization"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="representedOrganization"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="identifier"/>
                  <source>
                    <context value="representedOrganization"/>
                    <element value="id"/>
                    <variable value="id"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="identifier"/>
                    <variable value="identifier"/>
                  </target>
                  <rule>
                    <name value="root1"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="translate"/>
                      <parameter>
                        <valueId value="r"/>
                      </parameter>
                      <parameter>
                        <valueString
                                     value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                      </parameter>
                      <parameter>
                        <valueString value="uri"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="ext"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="value"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="UUID"/>
                      <source>
                        <context value="representedOrganization"/>
                      </source>
                      <target>
                        <context value="request"/>
                        <contextType value="variable"/>
                        <element value="url"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="Organization?identifier="/>
                        </parameter>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                  <rule>
                    <name value="assigningAuthorityName"/>
                    <source>
                      <context value="id"/>
                      <element value="assigningAuthorityName"/>
                      <variable value="s"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="assigner"/>
                      <variable value="a"/>
                    </target>
                    <target>
                      <context value="a"/>
                      <contextType value="variable"/>
                      <element value="display"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="s"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="r"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <rule>
                      <name value="extension"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="organization"/>
                        <contextType value="variable"/>
                        <element value="id"/>
                        <variable value="uuid3"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="r + '-' + ext"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e8"/>
                        <contextType value="variable"/>
                        <element value="fullUrl"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Organization/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid3"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="practitionerRole"/>
                        <contextType value="variable"/>
                        <element value="organization"/>
                        <variable value="referenceOrg"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Reference"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="referenceOrg"/>
                        <contextType value="variable"/>
                        <element value="reference"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Organization/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid3"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="name"/>
                  <source>
                    <context value="representedOrganization"/>
                    <element value="name"/>
                    <variable value="v"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="name"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="v.other"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="telecom"/>
                  <source>
                    <context value="representedOrganization"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="addr"/>
                  <source>
                    <context value="representedOrganization"/>
                    <element value="addr"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="address"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="asOrganizationPartOf"/>
                  <source>
                    <context value="representedOrganization"/>
                    <element value="asOrganizationPartOf"/>
                    <variable value="OrgPartOf"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e9"/>
                  </target>
                  <target>
                    <context value="e9"/>
                    <contextType value="variable"/>
                    <element value="request"/>
                    <variable value="request"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="BackboneElement"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="method"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="PUT"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e9"/>
                    <contextType value="variable"/>
                    <element value="resource"/>
                    <variable value="organization1"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Organization"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="meta"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="meta"/>
                      <variable value="meta"/>
                    </target>
                    <rule>
                      <name value="coding"/>
                      <source>
                        <context value="OrgPartOf"/>
                      </source>
                      <target>
                        <context value="meta"/>
                        <contextType value="variable"/>
                        <element value="tag"/>
                        <variable value="coding"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Coding"/>
                        </parameter>
                      </target>
                      <rule>
                        <name value="system"/>
                        <source>
                          <context value="OrgPartOf"/>
                        </source>
                        <target>
                          <context value="coding"/>
                          <contextType value="variable"/>
                          <element value="system"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueString value="http://algoritmodiscoring"/>
                          </parameter>
                        </target>
                      </rule>
                      <rule>
                        <name value="code"/>
                        <source>
                          <context value="OrgPartOf"/>
                        </source>
                        <target>
                          <context value="coding"/>
                          <contextType value="variable"/>
                          <element value="code"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueString
                                         value="ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization/asOrganizationPartOf"/>
                          </parameter>
                        </target>
                      </rule>
                    </rule>
                  </rule>
                  <rule>
                    <name value="identifier"/>
                    <source>
                      <context value="OrgPartOf"/>
                      <element value="id"/>
                      <variable value="id"/>
                    </source>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="identifier"/>
                      <variable value="identifier"/>
                    </target>
                    <rule>
                      <name value="root1"/>
                      <source>
                        <context value="id"/>
                        <element value="root"/>
                        <variable value="r"/>
                      </source>
                      <target>
                        <context value="identifier"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="translate"/>
                        <parameter>
                          <valueId value="r"/>
                        </parameter>
                        <parameter>
                          <valueString
                                       value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                        </parameter>
                        <parameter>
                          <valueString value="uri"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="ext"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="identifier"/>
                        <contextType value="variable"/>
                        <element value="value"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                      <rule>
                        <name value="UUID"/>
                        <source>
                          <context value="OrgPartOf"/>
                        </source>
                        <target>
                          <context value="request"/>
                          <contextType value="variable"/>
                          <element value="url"/>
                          <transform value="append"/>
                          <parameter>
                            <valueString value="Organization?identifier="/>
                          </parameter>
                          <parameter>
                            <valueId value="ext"/>
                          </parameter>
                        </target>
                      </rule>
                    </rule>
                    <rule>
                      <name value="assigningAuthorityName"/>
                      <source>
                        <context value="id"/>
                        <element value="assigningAuthorityName"/>
                        <variable value="s"/>
                      </source>
                      <target>
                        <context value="identifier"/>
                        <contextType value="variable"/>
                        <element value="assigner"/>
                        <variable value="a"/>
                      </target>
                      <target>
                        <context value="a"/>
                        <contextType value="variable"/>
                        <element value="display"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueId value="s"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="r"/>
                      <source>
                        <context value="id"/>
                        <element value="root"/>
                        <variable value="r"/>
                      </source>
                      <rule>
                        <name value="extension"/>
                        <source>
                          <context value="id"/>
                          <element value="extension"/>
                          <variable value="ext"/>
                        </source>
                        <target>
                          <context value="organization1"/>
                          <contextType value="variable"/>
                          <element value="id"/>
                          <variable value="uuid4"/>
                          <transform value="evaluate"/>
                          <parameter>
                            <valueString value="r + '-' + ext"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="e9"/>
                          <contextType value="variable"/>
                          <element value="fullUrl"/>
                          <transform value="append"/>
                          <parameter>
                            <valueString
                                         value="https://example/Organization/"/>
                          </parameter>
                          <parameter>
                            <valueId value="uuid4"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="organization"/>
                          <contextType value="variable"/>
                          <element value="partOf"/>
                          <variable value="reference"/>
                          <transform value="create"/>
                          <parameter>
                            <valueString value="Reference"/>
                          </parameter>
                        </target>
                        <target>
                          <context value="reference"/>
                          <contextType value="variable"/>
                          <element value="reference"/>
                          <transform value="evaluate"/>
                          <parameter>
                            <valueString
                                         value="'https://example/Organization/' + %organization1.id"/>
                          </parameter>
                        </target>
                      </rule>
                    </rule>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="OrgPartOf"/>
                      <element value="code"/>
                      <variable value="vvv"/>
                    </source>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="type"/>
                      <variable value="vvv"/>
                      <transform value="create"/>
                    </target>
                  </rule>
                  <rule>
                    <name value="statusCode"/>
                    <source>
                      <context value="OrgPartOf"/>
                      <element value="statusCode"/>
                      <variable value="status"/>
                      <condition value="(value = 'active')"/>
                    </source>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="active"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="boolean"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="active"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="true"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="wholeOrganization"/>
                    <source>
                      <context value="OrgPartOf"/>
                      <element value="wholeOrganization"/>
                      <variable value="wholeOrgan"/>
                    </source>
                    <target>
                      <context value="bundle"/>
                      <contextType value="variable"/>
                      <element value="entry"/>
                      <variable value="e10"/>
                    </target>
                    <target>
                      <context value="e10"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="request"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="BackboneElement"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="PUT"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e10"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="organization2"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Organization"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="meta"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="organization2"/>
                        <contextType value="variable"/>
                        <element value="meta"/>
                        <variable value="meta"/>
                      </target>
                      <rule>
                        <name value="coding"/>
                        <source>
                          <context value="wholeOrgan"/>
                        </source>
                        <target>
                          <context value="meta"/>
                          <contextType value="variable"/>
                          <element value="tag"/>
                          <variable value="coding"/>
                          <transform value="create"/>
                          <parameter>
                            <valueString value="Coding"/>
                          </parameter>
                        </target>
                        <rule>
                          <name value="system"/>
                          <source>
                            <context value="wholeOrgan"/>
                          </source>
                          <target>
                            <context value="coding"/>
                            <contextType value="variable"/>
                            <element value="system"/>
                            <transform value="copy"/>
                            <parameter>
                              <valueString value="http://algoritmodiscoring"/>
                            </parameter>
                          </target>
                        </rule>
                        <rule>
                          <name value="code"/>
                          <source>
                            <context value="wholeOrgan"/>
                          </source>
                          <target>
                            <context value="coding"/>
                            <contextType value="variable"/>
                            <element value="code"/>
                            <transform value="copy"/>
                            <parameter>
                              <valueString
                                           value="ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization/asOrganizationPartOf/wholeOrganization"/>
                            </parameter>
                          </target>
                        </rule>
                      </rule>
                    </rule>
                    <rule>
                      <name value="identifier"/>
                      <source>
                        <context value="wholeOrgan"/>
                        <element value="id"/>
                        <variable value="id"/>
                      </source>
                      <target>
                        <context value="organization2"/>
                        <contextType value="variable"/>
                        <element value="identifier"/>
                        <variable value="identifier"/>
                      </target>
                      <rule>
                        <name value="root1"/>
                        <source>
                          <context value="id"/>
                          <element value="root"/>
                          <variable value="r"/>
                        </source>
                        <target>
                          <context value="identifier"/>
                          <contextType value="variable"/>
                          <element value="system"/>
                          <transform value="translate"/>
                          <parameter>
                            <valueId value="r"/>
                          </parameter>
                          <parameter>
                            <valueString
                                         value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                          </parameter>
                          <parameter>
                            <valueString value="uri"/>
                          </parameter>
                        </target>
                      </rule>
                      <rule>
                        <name value="ext"/>
                        <source>
                          <context value="id"/>
                          <element value="extension"/>
                          <variable value="ext"/>
                        </source>
                        <target>
                          <context value="identifier"/>
                          <contextType value="variable"/>
                          <element value="value"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueId value="ext"/>
                          </parameter>
                        </target>
                        <rule>
                          <name value="UUID"/>
                          <source>
                            <context value="wholeOrgan"/>
                          </source>
                          <target>
                            <context value="request"/>
                            <contextType value="variable"/>
                            <element value="url"/>
                            <transform value="append"/>
                            <parameter>
                              <valueString value="Organization?identifier="/>
                            </parameter>
                            <parameter>
                              <valueId value="ext"/>
                            </parameter>
                          </target>
                        </rule>
                      </rule>
                      <rule>
                        <name value="assigningAuthorityName"/>
                        <source>
                          <context value="id"/>
                          <element value="assigningAuthorityName"/>
                          <variable value="s"/>
                        </source>
                        <target>
                          <context value="identifier"/>
                          <contextType value="variable"/>
                          <element value="assigner"/>
                          <variable value="a"/>
                        </target>
                        <target>
                          <context value="a"/>
                          <contextType value="variable"/>
                          <element value="display"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueId value="s"/>
                          </parameter>
                        </target>
                      </rule>
                      <rule>
                        <name value="r"/>
                        <source>
                          <context value="id"/>
                          <element value="root"/>
                          <variable value="r"/>
                        </source>
                        <rule>
                          <name value="extension"/>
                          <source>
                            <context value="id"/>
                            <element value="extension"/>
                            <variable value="ext"/>
                          </source>
                          <target>
                            <context value="organization2"/>
                            <contextType value="variable"/>
                            <element value="id"/>
                            <variable value="uuid5"/>
                            <transform value="evaluate"/>
                            <parameter>
                              <valueString value="r + '-' + ext"/>
                            </parameter>
                          </target>
                          <target>
                            <context value="e10"/>
                            <contextType value="variable"/>
                            <element value="fullUrl"/>
                            <transform value="append"/>
                            <parameter>
                              <valueString
                                           value="https://example/Organization/"/>
                            </parameter>
                            <parameter>
                              <valueId value="uuid5"/>
                            </parameter>
                          </target>
                          <target>
                            <context value="organization1"/>
                            <contextType value="variable"/>
                            <element value="partOf"/>
                            <variable value="reference"/>
                            <transform value="create"/>
                            <parameter>
                              <valueString value="Reference"/>
                            </parameter>
                          </target>
                          <target>
                            <context value="reference"/>
                            <contextType value="variable"/>
                            <element value="reference"/>
                            <transform value="evaluate"/>
                            <parameter>
                              <valueString
                                           value="'https://example/Organization/' + %organization2.id"/>
                            </parameter>
                          </target>
                        </rule>
                      </rule>
                    </rule>
                    <rule>
                      <name value="name"/>
                      <source>
                        <context value="wholeOrgan"/>
                        <element value="name"/>
                        <variable value="v"/>
                      </source>
                      <target>
                        <context value="organization2"/>
                        <contextType value="variable"/>
                        <element value="name"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="v.other"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="telecom"/>
                      <source>
                        <context value="wholeOrgan"/>
                        <element value="telecom"/>
                        <variable value="vvv"/>
                      </source>
                      <target>
                        <context value="organization2"/>
                        <contextType value="variable"/>
                        <element value="telecom"/>
                        <variable value="vvv"/>
                        <transform value="create"/>
                      </target>
                    </rule>
                    <rule>
                      <name value="addr"/>
                      <source>
                        <context value="wholeOrgan"/>
                        <element value="addr"/>
                        <variable value="vvv"/>
                      </source>
                      <target>
                        <context value="organization2"/>
                        <contextType value="variable"/>
                        <element value="address"/>
                        <variable value="vvv"/>
                        <transform value="create"/>
                      </target>
                    </rule>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="encounterExist"/>
      <source>
        <context value="src"/>
        <condition value="src.componentOf.exists().not()"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="encounter"/>
        <variable value="reference"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Reference"/>
        </parameter>
      </target>
      <target>
        <context value="reference"/>
        <contextType value="variable"/>
        <element value="reference"/>
        <transform value="evaluate"/>
        <parameter>
          <valueString value="'https://example/Encounter/' + %encounter.id"/>
        </parameter>
      </target>
      <dependent>
        <name value="ClinicalDocumentEncounter"/>
        <variable value="src"/>
        <variable value="bundle"/>
        <variable value="encounter"/>
        <variable value="patientResource"/>
      </dependent>
    </rule>
    <rule>
      <name value="encompassingEncounter"/>
      <source>
        <context value="src"/>
        <element value="componentOf"/>
        <variable value="comp"/>
      </source>
      <rule>
        <name value="enc"/>
        <source>
          <context value="comp"/>
          <condition value="comp.encompassingEncounter.exists().not()"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="encounter"/>
          <variable value="reference"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Reference"/>
          </parameter>
        </target>
        <target>
          <context value="reference"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString
                         value="'https://example/Encounter/' + %encounter.id"/>
          </parameter>
        </target>
        <dependent>
          <name value="ClinicalDocumentEncounter"/>
          <variable value="srcEnc"/>
          <variable value="bundle"/>
          <variable value="encounter"/>
          <variable value="patientResource"/>
        </dependent>
      </rule>
      <rule>
        <name value="encompassingEncounter"/>
        <source>
          <context value="comp"/>
          <element value="encompassingEncounter"/>
          <variable value="srcEnc"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="encounter"/>
          <variable value="reference"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Reference"/>
          </parameter>
        </target>
        <target>
          <context value="reference"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString
                         value="'https://example/Encounter/' + %encounter.id"/>
          </parameter>
        </target>
        <dependent>
          <name value="ClinicalDocumentEncounter"/>
          <variable value="srcEnc"/>
          <variable value="bundle"/>
          <variable value="encounter"/>
          <variable value="patientResource"/>
        </dependent>
      </rule>
    </rule>
  </group>
  <group>
    <name value="ClinicalDocumentRelatesTo"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="parentDocument"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="composition"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id"/>
      <source>
        <context value="src"/>
        <element value="id"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="code"/>
      <source>
        <context value="src"/>
        <element value="code"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="type"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="setId"/>
      <source>
        <context value="src"/>
        <element value="setId"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="versionNumberEXT"/>
      <source>
        <context value="src"/>
        <element value="versionNumber"/>
        <variable value="vNumber"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="extension"/>
        <variable value="ext"/>
      </target>
      <dependent>
        <name value="ChExtEprVersionNumber"/>
        <variable value="vNumber"/>
        <variable value="ext"/>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="EXTbirthplace"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="AD"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="ext"/>
      <type value="Extension"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="url"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="ext"/>
        <contextType value="variable"/>
        <element value="url"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="http://hl7.org/fhir/StructureDefinition/patient-birthPlace"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="value"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="ext"/>
        <contextType value="variable"/>
        <element value="value"/>
        <variable value="value"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Address"/>
        </parameter>
      </target>
      <dependent>
        <name value="ADAddress"/>
        <variable value="src"/>
        <variable value="value"/>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="ClinicalDocumentPatientRole"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="PatientRole"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="Patient"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="bundle"/>
      <type value="Bundle"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="addr"/>
      <source>
        <context value="src"/>
        <element value="addr"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="address"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="telecom"/>
      <source>
        <context value="src"/>
        <element value="telecom"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="telecom"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="patient"/>
      <source>
        <context value="src"/>
        <element value="patient"/>
        <variable value="patient"/>
      </source>
      <rule>
        <name value="name"/>
        <source>
          <context value="patient"/>
          <element value="name"/>
          <variable value="vvv"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="name"/>
          <variable value="vvv"/>
          <transform value="create"/>
        </target>
      </rule>
      <rule>
        <name value="gender"/>
        <source>
          <context value="patient"/>
          <element value="administrativeGenderCode"/>
          <variable value="gender"/>
        </source>
        <rule>
          <name value="gender"/>
          <source>
            <context value="gender"/>
            <element value="code"/>
            <variable value="v"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="gender"/>
            <transform value="translate"/>
            <parameter>
              <valueId value="v"/>
            </parameter>
            <parameter>
              <valueString value="#cm-v3-administrative-gender"/>
            </parameter>
            <parameter>
              <valueString value="code"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="birth"/>
        <source>
          <context value="patient"/>
          <element value="birthTime"/>
          <variable value="birthTime"/>
        </source>
        <rule>
          <name value="birthTimelegal"/>
          <source>
            <context value="birthTime"/>
            <element value="value"/>
            <variable value="date"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="birthDate"/>
            <transform value="truncate"/>
            <parameter>
              <valueId value="date"/>
            </parameter>
            <parameter>
              <valueInteger value="10"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="deceasedBL"/>
        <source>
          <context value="patient"/>
          <element value="deceasedInd"/>
          <variable value="deceased"/>
          <condition value="(value = 'false')"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="deceased"/>
          <transform value="create"/>
          <parameter>
            <valueString value="boolean"/>
          </parameter>
        </target>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="deceased"/>
          <transform value="copy"/>
          <parameter>
            <valueBoolean value="false"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="deceasedInd"/>
        <source>
          <context value="patient"/>
          <element value="deceasedInd"/>
          <variable value="deceased"/>
          <condition value="(value = 'true')"/>
        </source>
        <rule>
          <name value="deceasedTime"/>
          <source>
            <context value="patient"/>
            <element value="deceasedTime"/>
            <variable value="Time"/>
          </source>
          <target>
            <context value="tgt"/>
            <contextType value="variable"/>
            <element value="deceased"/>
            <variable value="deceasedTime"/>
            <transform value="create"/>
            <parameter>
              <valueString value="dateTime"/>
            </parameter>
          </target>
          <dependent>
            <name value="TSDateTime"/>
            <variable value="Time"/>
            <variable value="deceasedTime"/>
          </dependent>
        </rule>
      </rule>
      <rule>
        <name value="deceasedBL"/>
        <source>
          <context value="patient"/>
          <element value="deceasedTime"/>
          <variable value="Timet"/>
          <condition value="Timet.empty()"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="deceased"/>
          <transform value="create"/>
          <parameter>
            <valueString value="boolean"/>
          </parameter>
        </target>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="deceased"/>
          <transform value="copy"/>
          <parameter>
            <valueBoolean value="true"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="maritalStatus"/>
        <source>
          <context value="patient"/>
          <element value="maritalStatusCode"/>
          <variable value="vvv"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="maritalStatus"/>
          <variable value="vvv"/>
          <transform value="create"/>
        </target>
      </rule>
      <rule>
        <name value="guardian"/>
        <source>
          <context value="patient"/>
          <element value="guardian"/>
          <variable value="guardian"/>
        </source>
        <rule>
          <name value="guardianPerson"/>
          <source>
            <context value="guardian"/>
            <element value="guardianPerson"/>
            <variable value="person"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="e"/>
          </target>
          <target>
            <context value="e"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="POST"/>
            </parameter>
          </target>
          <target>
            <context value="e"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="relatedPerson"/>
            <transform value="create"/>
            <parameter>
              <valueString value="RelatedPerson"/>
            </parameter>
          </target>
          <target>
            <context value="relatedPerson"/>
            <contextType value="variable"/>
            <element value="id"/>
            <variable value="uuid1"/>
            <transform value="uuid"/>
          </target>
          <target>
            <context value="e"/>
            <contextType value="variable"/>
            <element value="fullUrl"/>
            <transform value="append"/>
            <parameter>
              <valueString value="https://example/RelatedPerson/"/>
            </parameter>
            <parameter>
              <valueId value="uuid1"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="url"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="RelatedPerson"/>
            </parameter>
          </target>
          <rule>
            <name value="name"/>
            <source>
              <context value="person"/>
              <element value="name"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="relatedPerson"/>
              <contextType value="variable"/>
              <element value="name"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="birth"/>
            <source>
              <context value="person"/>
              <element value="birthTime"/>
              <variable value="birthTime"/>
            </source>
            <rule>
              <name value="birthTimelegal"/>
              <source>
                <context value="birthTime"/>
                <element value="value"/>
                <variable value="date"/>
              </source>
              <target>
                <context value="relatedPerson"/>
                <contextType value="variable"/>
                <element value="birthDate"/>
                <transform value="truncate"/>
                <parameter>
                  <valueId value="date"/>
                </parameter>
                <parameter>
                  <valueInteger value="10"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="reference"/>
            <source>
              <context value="person"/>
            </source>
            <target>
              <context value="relatedPerson"/>
              <contextType value="variable"/>
              <element value="patient"/>
              <variable value="reference"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <target>
              <context value="reference"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="evaluate"/>
              <parameter>
                <valueString value="'https://example/Patient/' + %tgt.id"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="person"/>
            <source>
              <context value="person"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="link"/>
              <variable value="link"/>
            </target>
            <rule>
              <name value="type"/>
              <source>
                <context value="person"/>
              </source>
              <target>
                <context value="link"/>
                <contextType value="variable"/>
                <element value="type"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="refer"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="reference"/>
              <source>
                <context value="person"/>
              </source>
              <target>
                <context value="link"/>
                <contextType value="variable"/>
                <element value="other"/>
                <variable value="reference"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Reference"/>
                </parameter>
              </target>
              <target>
                <context value="reference"/>
                <contextType value="variable"/>
                <element value="reference"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString
                               value="'https://example/RelatedPerson/' + %relatedPerson.id"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="addr"/>
              <source>
                <context value="guardian"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="relatedPerson"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="guardian"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="relatedPerson"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="id"/>
              <source>
                <context value="guardian"/>
                <element value="id"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="relatedPerson"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="code"/>
              <source>
                <context value="guardian"/>
                <element value="code"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="relatedPerson"/>
                <contextType value="variable"/>
                <element value="relationship"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="guardianorganization"/>
          <source>
            <context value="guardian"/>
            <element value="guardianOrganization"/>
            <variable value="guardianorg"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="e1"/>
          </target>
          <target>
            <context value="e1"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="PUT"/>
            </parameter>
          </target>
          <target>
            <context value="e1"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="organizationcontact"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Organization"/>
            </parameter>
          </target>
          <rule>
            <name value="meta"/>
            <source>
              <context value="guardianorg"/>
            </source>
            <target>
              <context value="organizationcontact"/>
              <contextType value="variable"/>
              <element value="meta"/>
              <variable value="meta"/>
            </target>
            <rule>
              <name value="coding"/>
              <source>
                <context value="guardianorg"/>
              </source>
              <target>
                <context value="meta"/>
                <contextType value="variable"/>
                <element value="tag"/>
                <variable value="coding"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Coding"/>
                </parameter>
              </target>
              <rule>
                <name value="system"/>
                <source>
                  <context value="guardianorg"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="http://algoritmodiscoring"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="guardianorg"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString
                                 value="ClinicalDocument/recordTarget/PatientRole/patient/guardian/guardianOrganization"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="contact"/>
            <source>
              <context value="guardianorg"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="contact"/>
              <variable value="contact"/>
            </target>
            <rule>
              <name value="OrganizationContact"/>
              <source>
                <context value="guardianorg"/>
              </source>
              <target>
                <context value="contact"/>
                <contextType value="variable"/>
                <element value="organization"/>
                <variable value="reference"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Reference"/>
                </parameter>
              </target>
              <target>
                <context value="reference"/>
                <contextType value="variable"/>
                <element value="reference"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString
                               value="'https://example/Organization/' + %organizationcontact.id"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="identifier"/>
              <source>
                <context value="guardianorg"/>
                <element value="id"/>
                <variable value="id"/>
              </source>
              <target>
                <context value="organizationcontact"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="identifier"/>
              </target>
              <rule>
                <name value="root1"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="translate"/>
                  <parameter>
                    <valueId value="r"/>
                  </parameter>
                  <parameter>
                    <valueString
                                 value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                  </parameter>
                  <parameter>
                    <valueString value="uri"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="ext"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="value"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="guardianorg"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Organization?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="assigningAuthorityName"/>
                <source>
                  <context value="id"/>
                  <element value="assigningAuthorityName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="assigner"/>
                  <variable value="a"/>
                </target>
                <target>
                  <context value="a"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="s"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="r"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="organizationcontact"/>
                    <contextType value="variable"/>
                    <element value="id"/>
                    <variable value="uuid2"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="r + '-' + ext"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e1"/>
                    <contextType value="variable"/>
                    <element value="fullUrl"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Organization/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid2"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="name"/>
              <source>
                <context value="guardianorg"/>
                <element value="name"/>
                <variable value="v"/>
              </source>
              <target>
                <context value="organizationcontact"/>
                <contextType value="variable"/>
                <element value="name"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="v.other"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="guardianorg"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organizationcontact"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="addr"/>
              <source>
                <context value="guardianorg"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organizationcontact"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="OrganizationPartOf"/>
              <source>
                <context value="guardianorg"/>
                <element value="asOrganizationPartOf"/>
                <variable value="OrgPartOf"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e2"/>
              </target>
              <target>
                <context value="e2"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e2"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="organizationpartOf"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Organization"/>
                </parameter>
              </target>
              <rule>
                <name value="meta"/>
                <source>
                  <context value="OrgPartOf"/>
                </source>
                <target>
                  <context value="organizationpartOf"/>
                  <contextType value="variable"/>
                  <element value="meta"/>
                  <variable value="meta"/>
                </target>
                <rule>
                  <name value="coding"/>
                  <source>
                    <context value="OrgPartOf"/>
                  </source>
                  <target>
                    <context value="meta"/>
                    <contextType value="variable"/>
                    <element value="tag"/>
                    <variable value="coding"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Coding"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="system"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="http://algoritmodiscoring"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="code"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString
                                     value="ClinicalDocument/recordTarget/PatientRole/patient/guardian/guardianOrganization/asOrganizationPartOf"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="asorganization"/>
                <source>
                  <context value="OrgPartOf"/>
                </source>
                <target>
                  <context value="organizationcontact"/>
                  <contextType value="variable"/>
                  <element value="partOf"/>
                  <variable value="reference"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <target>
                  <context value="reference"/>
                  <contextType value="variable"/>
                  <element value="reference"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString
                                 value="'https://example/Organization/' + %organizationpartOf.id"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="organizationpartOf"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="ext"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="UUID"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="Organization?identifier="/>
                      </parameter>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="extension"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="organizationpartOf"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid3"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e2"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Organization/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid3"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organizationpartOf"/>
                  <contextType value="variable"/>
                  <element value="type"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="statusCode"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="statusCode"/>
                  <variable value="status"/>
                  <condition value="(value = 'active')"/>
                </source>
                <target>
                  <context value="organizationpartOf"/>
                  <contextType value="variable"/>
                  <element value="active"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="true"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="WholeOrganization"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="wholeOrganization"/>
                  <variable value="wholeORG"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e3"/>
                </target>
                <target>
                  <context value="e3"/>
                  <contextType value="variable"/>
                  <element value="request"/>
                  <variable value="request"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="BackboneElement"/>
                  </parameter>
                </target>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="method"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="PUT"/>
                  </parameter>
                </target>
                <target>
                  <context value="e3"/>
                  <contextType value="variable"/>
                  <element value="resource"/>
                  <variable value="WholeOrganization"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Organization"/>
                  </parameter>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="wholeORG"/>
                  </source>
                  <target>
                    <context value="WholeOrganization"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="wholeORG"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="wholeORG"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="wholeORG"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/recordTarget/PatientRole/patient/guardian/guardianOrganization/asOrganizationPartOf/wholeOrganization"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="asOrganization"/>
                  <source>
                    <context value="wholeORG"/>
                  </source>
                  <target>
                    <context value="organizationpartOf"/>
                    <contextType value="variable"/>
                    <element value="partOf"/>
                    <variable value="reference"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Reference"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="reference"/>
                    <contextType value="variable"/>
                    <element value="reference"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString
                                   value="'https://example/Organization/' + %WholeOrganization.id"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="identifier"/>
                  <source>
                    <context value="wholeORG"/>
                    <element value="id"/>
                    <variable value="id"/>
                  </source>
                  <target>
                    <context value="WholeOrganization"/>
                    <contextType value="variable"/>
                    <element value="identifier"/>
                    <variable value="identifier"/>
                  </target>
                  <rule>
                    <name value="root1"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="translate"/>
                      <parameter>
                        <valueId value="r"/>
                      </parameter>
                      <parameter>
                        <valueString
                                     value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                      </parameter>
                      <parameter>
                        <valueString value="uri"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="ext"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="value"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="UUID"/>
                      <source>
                        <context value="wholeORG"/>
                      </source>
                      <target>
                        <context value="request"/>
                        <contextType value="variable"/>
                        <element value="url"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="Organization?identifier="/>
                        </parameter>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                  <rule>
                    <name value="assigningAuthorityName"/>
                    <source>
                      <context value="id"/>
                      <element value="assigningAuthorityName"/>
                      <variable value="s"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="assigner"/>
                      <variable value="a"/>
                    </target>
                    <target>
                      <context value="a"/>
                      <contextType value="variable"/>
                      <element value="display"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="s"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="r"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <rule>
                      <name value="extension"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="WholeOrganization"/>
                        <contextType value="variable"/>
                        <element value="id"/>
                        <variable value="uuid4"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="r + '-' + ext"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e3"/>
                        <contextType value="variable"/>
                        <element value="fullUrl"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Organization/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid4"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="name"/>
                  <source>
                    <context value="wholeORG"/>
                    <element value="name"/>
                    <variable value="v"/>
                  </source>
                  <target>
                    <context value="WholeOrganization"/>
                    <contextType value="variable"/>
                    <element value="name"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="v.other"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="telecom"/>
                  <source>
                    <context value="wholeORG"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="WholeOrganization"/>
                    <contextType value="variable"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="addr"/>
                  <source>
                    <context value="wholeORG"/>
                    <element value="addr"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="WholeOrganization"/>
                    <contextType value="variable"/>
                    <element value="address"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="birthplace"/>
        <source>
          <context value="patient"/>
          <element value="birthplace"/>
          <variable value="birthplace"/>
        </source>
        <rule>
          <name value="place"/>
          <source>
            <context value="birthplace"/>
            <element value="place"/>
            <variable value="place"/>
          </source>
          <rule>
            <name value="birthplace"/>
            <source>
              <context value="place"/>
              <element value="addr"/>
              <variable value="address"/>
            </source>
            <target>
              <context value="tgt"/>
              <contextType value="variable"/>
              <element value="extension"/>
              <variable value="ext1"/>
            </target>
            <dependent>
              <name value="EXTbirthplace"/>
              <variable value="address"/>
              <variable value="ext1"/>
            </dependent>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="organization"/>
        <source>
          <context value="src"/>
          <element value="providerOrganization"/>
          <variable value="org"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="e4"/>
        </target>
        <target>
          <context value="e4"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PUT"/>
          </parameter>
        </target>
        <target>
          <context value="e4"/>
          <contextType value="variable"/>
          <element value="resource"/>
          <variable value="providerorganization"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Organization"/>
          </parameter>
        </target>
        <rule>
          <name value="meta"/>
          <source>
            <context value="org"/>
          </source>
          <target>
            <context value="providerorganization"/>
            <contextType value="variable"/>
            <element value="meta"/>
            <variable value="meta"/>
          </target>
          <rule>
            <name value="coding"/>
            <source>
              <context value="org"/>
            </source>
            <target>
              <context value="meta"/>
              <contextType value="variable"/>
              <element value="tag"/>
              <variable value="coding"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Coding"/>
              </parameter>
            </target>
            <rule>
              <name value="system"/>
              <source>
                <context value="org"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="http://algoritmodiscoring"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="code"/>
              <source>
                <context value="org"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="code"/>
                <transform value="copy"/>
                <parameter>
                  <valueString
                               value="ClinicalDocument/recordTarget/PatientRole/patient/providerOrganization"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="identifier"/>
          <source>
            <context value="org"/>
            <element value="id"/>
            <variable value="id"/>
          </source>
          <target>
            <context value="providerorganization"/>
            <contextType value="variable"/>
            <element value="identifier"/>
            <variable value="identifier"/>
          </target>
          <rule>
            <name value="root1"/>
            <source>
              <context value="id"/>
              <element value="root"/>
              <variable value="r"/>
            </source>
            <target>
              <context value="identifier"/>
              <contextType value="variable"/>
              <element value="system"/>
              <transform value="translate"/>
              <parameter>
                <valueId value="r"/>
              </parameter>
              <parameter>
                <valueString
                             value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
              </parameter>
              <parameter>
                <valueString value="uri"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="ext"/>
            <source>
              <context value="id"/>
              <element value="extension"/>
              <variable value="ext"/>
            </source>
            <target>
              <context value="identifier"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="ext"/>
              </parameter>
            </target>
            <rule>
              <name value="UUID"/>
              <source>
                <context value="org"/>
              </source>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="url"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="Organization?identifier="/>
                </parameter>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="assigningAuthorityName"/>
            <source>
              <context value="id"/>
              <element value="assigningAuthorityName"/>
              <variable value="s"/>
            </source>
            <target>
              <context value="identifier"/>
              <contextType value="variable"/>
              <element value="assigner"/>
              <variable value="a"/>
            </target>
            <target>
              <context value="a"/>
              <contextType value="variable"/>
              <element value="display"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="s"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="r"/>
            <source>
              <context value="id"/>
              <element value="root"/>
              <variable value="r"/>
            </source>
            <rule>
              <name value="reference"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="providerorganization"/>
                <contextType value="variable"/>
                <element value="id"/>
                <variable value="uuid5"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="r + '-' + ext"/>
                </parameter>
              </target>
              <target>
                <context value="e4"/>
                <contextType value="variable"/>
                <element value="fullUrl"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="https://example/Organization/"/>
                </parameter>
                <parameter>
                  <valueId value="uuid5"/>
                </parameter>
              </target>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="managingOrganization"/>
                <variable value="reference"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Reference"/>
                </parameter>
              </target>
              <target>
                <context value="reference"/>
                <contextType value="variable"/>
                <element value="reference"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString
                               value="'https://example/Organization/' + %providerorganization.id"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="name"/>
          <source>
            <context value="org"/>
            <element value="name"/>
            <variable value="v"/>
          </source>
          <target>
            <context value="providerorganization"/>
            <contextType value="variable"/>
            <element value="name"/>
            <transform value="evaluate"/>
            <parameter>
              <valueString value="v.other"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="telecom"/>
          <source>
            <context value="org"/>
            <element value="telecom"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="providerorganization"/>
            <contextType value="variable"/>
            <element value="telecom"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
        </rule>
        <rule>
          <name value="addr"/>
          <source>
            <context value="org"/>
            <element value="addr"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="providerorganization"/>
            <contextType value="variable"/>
            <element value="address"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
        </rule>
        <rule>
          <name value="OrganizationPartOfprovider"/>
          <source>
            <context value="org"/>
            <element value="asOrganizationPartOf"/>
            <variable value="OrgPartOfProvider"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="e5"/>
          </target>
          <target>
            <context value="e5"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="PUT"/>
            </parameter>
          </target>
          <target>
            <context value="e5"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="organizationpartOfprovider"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Organization"/>
            </parameter>
          </target>
          <rule>
            <name value="meta"/>
            <source>
              <context value="OrgPartOfProvider"/>
            </source>
            <target>
              <context value="organizationpartOfprovider"/>
              <contextType value="variable"/>
              <element value="meta"/>
              <variable value="meta"/>
            </target>
            <rule>
              <name value="coding"/>
              <source>
                <context value="OrgPartOfProvider"/>
              </source>
              <target>
                <context value="meta"/>
                <contextType value="variable"/>
                <element value="tag"/>
                <variable value="coding"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Coding"/>
                </parameter>
              </target>
              <rule>
                <name value="system"/>
                <source>
                  <context value="OrgPartOfProvider"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="http://algoritmodiscoring"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="OrgPartOfProvider"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString
                                 value="ClinicalDocument/recordTarget/PatientRole/patient/providerOrganization/asOrganizationPartOf"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="identifier"/>
            <source>
              <context value="OrgPartOfProvider"/>
              <element value="id"/>
              <variable value="id"/>
            </source>
            <target>
              <context value="organizationpartOfprovider"/>
              <contextType value="variable"/>
              <element value="identifier"/>
              <variable value="identifier"/>
            </target>
            <rule>
              <name value="root1"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="translate"/>
                <parameter>
                  <valueId value="r"/>
                </parameter>
                <parameter>
                  <valueString
                               value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                </parameter>
                <parameter>
                  <valueString value="uri"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="ext"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
              <rule>
                <name value="UUID"/>
                <source>
                  <context value="OrgPartOfProvider"/>
                </source>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="url"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="Organization?identifier="/>
                  </parameter>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <rule>
              <name value="assigningAuthorityName"/>
              <source>
                <context value="id"/>
                <element value="assigningAuthorityName"/>
                <variable value="s"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="assigner"/>
                <variable value="a"/>
              </target>
              <target>
                <context value="a"/>
                <contextType value="variable"/>
                <element value="display"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="s"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="r"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <rule>
                <name value="asorganization"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="organizationpartOfprovider"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <variable value="uuid6"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="r + '-' + ext"/>
                  </parameter>
                </target>
                <target>
                  <context value="e5"/>
                  <contextType value="variable"/>
                  <element value="fullUrl"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="https://example/Organization/"/>
                  </parameter>
                  <parameter>
                    <valueId value="uuid6"/>
                  </parameter>
                </target>
                <target>
                  <context value="providerorganization"/>
                  <contextType value="variable"/>
                  <element value="partOf"/>
                  <variable value="reference"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <target>
                  <context value="reference"/>
                  <contextType value="variable"/>
                  <element value="reference"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString
                                 value="'https://example/Organization/' + %organizationpartOfprovider.id"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="code"/>
            <source>
              <context value="OrgPartOfProvider"/>
              <element value="code"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="organizationpartOfprovider"/>
              <contextType value="variable"/>
              <element value="type"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="statusCode"/>
            <source>
              <context value="OrgPartOfProvider"/>
              <element value="statusCode"/>
              <variable value="status"/>
              <condition value="(value = 'active')"/>
            </source>
            <target>
              <context value="organizationpartOfprovider"/>
              <contextType value="variable"/>
              <element value="active"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="true"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="wholeOrganizationprovider"/>
            <source>
              <context value="OrgPartOfProvider"/>
              <element value="wholeOrganization"/>
              <variable value="wholeORGproveder"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e6"/>
            </target>
            <target>
              <context value="e6"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="PUT"/>
              </parameter>
            </target>
            <target>
              <context value="e6"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="WholeOrganizationprovider"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Organization"/>
              </parameter>
            </target>
            <rule>
              <name value="meta"/>
              <source>
                <context value="wholeORGproveder"/>
              </source>
              <target>
                <context value="WholeOrganizationprovider"/>
                <contextType value="variable"/>
                <element value="meta"/>
                <variable value="meta"/>
              </target>
              <rule>
                <name value="coding"/>
                <source>
                  <context value="wholeORGproveder"/>
                </source>
                <target>
                  <context value="meta"/>
                  <contextType value="variable"/>
                  <element value="tag"/>
                  <variable value="coding"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Coding"/>
                  </parameter>
                </target>
                <rule>
                  <name value="system"/>
                  <source>
                    <context value="wholeORGproveder"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="http://algoritmodiscoring"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="wholeORGproveder"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="code"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString
                                   value="ClinicalDocument/recordTarget/PatientRole/patient/providerOrganization/asOrganizationPartOf/wholeOrganization"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="asOrganization"/>
              <source>
                <context value="wholeORGproveder"/>
              </source>
              <target>
                <context value="organizationpartOfprovider"/>
                <contextType value="variable"/>
                <element value="partOf"/>
                <variable value="reference"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Reference"/>
                </parameter>
              </target>
              <target>
                <context value="reference"/>
                <contextType value="variable"/>
                <element value="reference"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString
                               value="'https://example/Organization/' + %WholeOrganizationprovider.id"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="identifier"/>
              <source>
                <context value="wholeORGproveder"/>
                <element value="id"/>
                <variable value="id"/>
              </source>
              <target>
                <context value="WholeOrganizationprovider"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="identifier"/>
              </target>
              <rule>
                <name value="root1"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="translate"/>
                  <parameter>
                    <valueId value="r"/>
                  </parameter>
                  <parameter>
                    <valueString
                                 value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                  </parameter>
                  <parameter>
                    <valueString value="uri"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="ext"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="value"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="wholeORGproveder"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Organization?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="assigningAuthorityName"/>
                <source>
                  <context value="id"/>
                  <element value="assigningAuthorityName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="assigner"/>
                  <variable value="a"/>
                </target>
                <target>
                  <context value="a"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="s"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="r"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="WholeOrganizationprovider"/>
                    <contextType value="variable"/>
                    <element value="id"/>
                    <variable value="uuid7"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="r + '-' + ext"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e6"/>
                    <contextType value="variable"/>
                    <element value="fullUrl"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Organization/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid7"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="name"/>
              <source>
                <context value="wholeORGproveder"/>
                <element value="name"/>
                <variable value="v"/>
              </source>
              <target>
                <context value="WholeOrganizationprovider"/>
                <contextType value="variable"/>
                <element value="name"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="v.other"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="wholeORGproveder"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="WholeOrganizationprovider"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="addr"/>
              <source>
                <context value="wholeORGproveder"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="WholeOrganizationprovider"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="CustodianOrganization"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="CustodianOrganization"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="Organization"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="name"/>
      <source>
        <context value="src"/>
        <element value="name"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="name"/>
        <transform value="evaluate"/>
        <parameter>
          <valueString value="v.other"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="telecom"/>
      <source>
        <context value="src"/>
        <element value="telecom"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="telecom"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="addr"/>
      <source>
        <context value="src"/>
        <element value="addr"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="address"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
  </group>
  <group>
    <name value="ClinicalDocumentEncounter"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="EncompassingEncounter"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="bundle"/>
      <type value="Bundle"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="encounter"/>
      <type value="Encounter"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="patient"/>
      <type value="Patient"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id"/>
      <source>
        <context value="src"/>
        <element value="id"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="encounter"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="class"/>
      <source>
        <context value="src"/>
        <element value="code"/>
        <variable value="code1"/>
      </source>
      <target>
        <context value="encounter"/>
        <contextType value="variable"/>
        <element value="class"/>
        <variable value="coding"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Coding"/>
        </parameter>
      </target>
      <rule>
        <name value="code"/>
        <source>
          <context value="code1"/>
          <element value="code"/>
          <variable value="code"/>
        </source>
        <target>
          <context value="coding"/>
          <contextType value="variable"/>
          <element value="code"/>
          <transform value="cast"/>
          <parameter>
            <valueId value="code"/>
          </parameter>
          <parameter>
            <valueString value="string"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="codeSystem"/>
        <source>
          <context value="code1"/>
          <element value="codeSystem"/>
          <variable value="system"/>
        </source>
        <target>
          <context value="coding"/>
          <contextType value="variable"/>
          <element value="system"/>
          <transform value="translate"/>
          <parameter>
            <valueId value="system"/>
          </parameter>
          <parameter>
            <valueString
                         value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
          </parameter>
          <parameter>
            <valueString value="uri"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="displayName"/>
        <source>
          <context value="code1"/>
          <element value="displayName"/>
          <variable value="display"/>
        </source>
        <target>
          <context value="coding"/>
          <contextType value="variable"/>
          <element value="display"/>
          <transform value="cast"/>
          <parameter>
            <valueId value="display"/>
          </parameter>
          <parameter>
            <valueString value="string"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="NonCodeclass"/>
      <source>
        <context value="src"/>
        <condition value="src.code.exists().not()"/>
      </source>
      <target>
        <context value="encounter"/>
        <contextType value="variable"/>
        <element value="class"/>
        <variable value="coding"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Coding"/>
        </parameter>
      </target>
      <rule>
        <name value="code"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="coding"/>
          <contextType value="variable"/>
          <element value="code"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="AMB"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="codeS"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="coding"/>
          <contextType value="variable"/>
          <element value="system"/>
          <transform value="copy"/>
          <parameter>
            <valueString
                         value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="display"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="coding"/>
          <contextType value="variable"/>
          <element value="display"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="ambulatory"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="reference"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="encounter"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <variable value="reference"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Reference"/>
        </parameter>
      </target>
      <target>
        <context value="reference"/>
        <contextType value="variable"/>
        <element value="reference"/>
        <transform value="evaluate"/>
        <parameter>
          <valueString value="'https://example/Patient/' + %patient.id"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="status"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="encounter"/>
        <contextType value="variable"/>
        <element value="status"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="finished"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="where"/>
      <source>
        <context value="src"/>
        <condition
                   value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
      </source>
      <rule>
        <name value="effectiveTime"/>
        <source>
          <context value="src"/>
          <element value="effectiveTime"/>
          <variable value="eff"/>
        </source>
        <target>
          <context value="encounter"/>
          <contextType value="variable"/>
          <element value="period"/>
          <variable value="period"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Period"/>
          </parameter>
        </target>
        <dependent>
          <name value="IVLTSPeriod"/>
          <variable value="eff"/>
          <variable value="period"/>
        </dependent>
      </rule>
      <documentation value="effectiveTime=period"/>
    </rule>
    <rule>
      <name value="where"/>
      <source>
        <context value="src"/>
        <condition
                   value="effectiveTime.low.exists().not() or effectiveTime.high.exists().not()"/>
      </source>
      <rule>
        <name value="efft"/>
        <source>
          <context value="src"/>
          <element value="effectiveTime"/>
          <variable value="effectivetime1"/>
        </source>
        <target>
          <context value="encounter"/>
          <contextType value="variable"/>
          <element value="period"/>
          <variable value="period"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Period"/>
          </parameter>
        </target>
        <rule>
          <name value="val"/>
          <source>
            <context value="effectivetime1"/>
          </source>
          <target>
            <context value="period"/>
            <contextType value="variable"/>
            <element value="start"/>
            <variable value="start"/>
            <transform value="create"/>
            <parameter>
              <valueString value="dateTime"/>
            </parameter>
          </target>
          <dependent>
            <name value="TSDateTime"/>
            <variable value="effectivetime1"/>
            <variable value="start"/>
          </dependent>
        </rule>
      </rule>
      <documentation value="effectiveTime = time-stamp"/>
    </rule>
    <rule>
      <name value="discharge"/>
      <source>
        <context value="src"/>
        <element value="dischargeDispositionCode"/>
        <variable value="dischargeDispositionCode"/>
      </source>
      <rule>
        <name value="disposition"/>
        <source>
          <context value="dischargeDispositionCode"/>
        </source>
        <target>
          <context value="encounter"/>
          <contextType value="variable"/>
          <element value="hospitalization"/>
          <variable value="hospitalization"/>
        </target>
        <rule>
          <name value="disDisp"/>
          <source>
            <context value="dischargeDispositionCode"/>
          </source>
          <target>
            <context value="hospitalization"/>
            <contextType value="variable"/>
            <element value="dischargeDisposition"/>
          </target>
        </rule>
      </rule>
      <documentation
                     value="src.effectiveTime as effectivetime1 -&gt; encounter.period as period, period.start=(effectivetime1.value);"/>
    </rule>
    <rule>
      <name value="particpant"/>
      <source>
        <context value="src"/>
        <element value="responsibleParty"/>
        <variable value="responsibleParty"/>
      </source>
      <target>
        <context value="encounter"/>
        <contextType value="variable"/>
        <element value="participant"/>
        <variable value="participant"/>
      </target>
      <rule>
        <name value="entity"/>
        <source>
          <context value="responsibleParty"/>
          <element value="assignedEntity"/>
          <variable value="entity"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="e"/>
        </target>
        <target>
          <context value="e"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="POST"/>
          </parameter>
        </target>
        <target>
          <context value="e"/>
          <contextType value="variable"/>
          <element value="resource"/>
          <variable value="practitionerRole"/>
          <transform value="create"/>
          <parameter>
            <valueString value="PractitionerRole"/>
          </parameter>
        </target>
        <target>
          <context value="practitionerRole"/>
          <contextType value="variable"/>
          <element value="id"/>
          <variable value="uuid1"/>
          <transform value="uuid"/>
        </target>
        <target>
          <context value="e"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="https://example/PractitionerRole/"/>
          </parameter>
          <parameter>
            <valueId value="uuid1"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PractitionerRole"/>
          </parameter>
        </target>
        <target>
          <context value="participant"/>
          <contextType value="variable"/>
          <element value="individual"/>
          <variable value="reference"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Reference"/>
          </parameter>
        </target>
        <target>
          <context value="reference"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString
                         value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
          </parameter>
        </target>
        <rule>
          <name value="code"/>
          <source>
            <context value="entity"/>
            <element value="code"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="practitionerRole"/>
            <contextType value="variable"/>
            <element value="code"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
        </rule>
        <rule>
          <name value="practitioner"/>
          <source>
            <context value="entity"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="e1"/>
          </target>
          <target>
            <context value="e1"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="PUT"/>
            </parameter>
          </target>
          <target>
            <context value="e1"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="practitioner"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Practitioner"/>
            </parameter>
          </target>
          <rule>
            <name value="meta"/>
            <source>
              <context value="entity"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="meta"/>
              <variable value="meta"/>
            </target>
            <rule>
              <name value="coding"/>
              <source>
                <context value="entity"/>
              </source>
              <target>
                <context value="meta"/>
                <contextType value="variable"/>
                <element value="tag"/>
                <variable value="coding"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Coding"/>
                </parameter>
              </target>
              <rule>
                <name value="system"/>
                <source>
                  <context value="entity"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="http://algoritmodiscoring"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="entity"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString
                                 value="ClinicalDocument/componentOf/EncompassingEncounter/responsibleParty"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="identifier"/>
            <source>
              <context value="entity"/>
              <element value="id"/>
              <variable value="id"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="identifier"/>
              <variable value="identifier"/>
            </target>
            <rule>
              <name value="root1"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="translate"/>
                <parameter>
                  <valueId value="r"/>
                </parameter>
                <parameter>
                  <valueString
                               value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                </parameter>
                <parameter>
                  <valueString value="uri"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="extension"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="assigningAuthorityName"/>
              <source>
                <context value="id"/>
                <element value="assigningAuthorityName"/>
                <variable value="s"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="assigner"/>
                <variable value="a"/>
              </target>
              <target>
                <context value="a"/>
                <contextType value="variable"/>
                <element value="display"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="s"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="r"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <rule>
                <name value="extension"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <variable value="uuid2"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="r + '-' + ext"/>
                  </parameter>
                </target>
                <target>
                  <context value="e1"/>
                  <contextType value="variable"/>
                  <element value="fullUrl"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="https://example/Practitioner/"/>
                  </parameter>
                  <parameter>
                    <valueId value="uuid2"/>
                  </parameter>
                </target>
                <target>
                  <context value="practitionerRole"/>
                  <contextType value="variable"/>
                  <element value="practitioner"/>
                  <variable value="reference"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <target>
                  <context value="reference"/>
                  <contextType value="variable"/>
                  <element value="reference"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString
                                 value="'https://example/Practitioner/' + %practitioner.id"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="2.16.840.1.113883.2.9.4.3.2"/>
            <source>
              <context value="entity"/>
              <element value="id"/>
              <variable value="id"/>
              <condition value="(root = '2.16.840.1.113883.2.9.4.3.2')"/>
            </source>
            <rule>
              <name value="UUID"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="url"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="Practitioner?identifier="/>
                </parameter>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="diverso"/>
            <source>
              <context value="entity"/>
              <element value="id"/>
              <variable value="id"/>
              <condition value="(root != '2.16.840.1.113883.2.9.4.3.2')"/>
            </source>
            <rule>
              <name value="UUID"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="url"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="Practitioner?identifier="/>
                </parameter>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="addr"/>
            <source>
              <context value="entity"/>
              <element value="addr"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="address"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="telecom"/>
            <source>
              <context value="entity"/>
              <element value="telecom"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="telecom"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="name"/>
            <source>
              <context value="entity"/>
              <element value="assignedPerson"/>
              <variable value="person"/>
            </source>
            <rule>
              <name value="name"/>
              <source>
                <context value="person"/>
                <element value="name"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="practitioner"/>
                <contextType value="variable"/>
                <element value="name"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="birth"/>
              <source>
                <context value="person"/>
                <element value="birthTime"/>
                <variable value="birthTime"/>
              </source>
              <rule>
                <name value="birthTimeENC"/>
                <source>
                  <context value="birthTime"/>
                  <element value="value"/>
                  <variable value="date"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="birthDate"/>
                  <transform value="truncate"/>
                  <parameter>
                    <valueId value="date"/>
                  </parameter>
                  <parameter>
                    <valueInteger value="10"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="organization"/>
          <source>
            <context value="entity"/>
            <element value="representedOrganization"/>
            <variable value="raporg"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="e2"/>
          </target>
          <target>
            <context value="e2"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="PUT"/>
            </parameter>
          </target>
          <target>
            <context value="e2"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="rapresentedorganization"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Organization"/>
            </parameter>
          </target>
          <rule>
            <name value="meta"/>
            <source>
              <context value="raporg"/>
            </source>
            <target>
              <context value="rapresentedorganization"/>
              <contextType value="variable"/>
              <element value="meta"/>
              <variable value="meta"/>
            </target>
            <rule>
              <name value="coding"/>
              <source>
                <context value="raporg"/>
              </source>
              <target>
                <context value="meta"/>
                <contextType value="variable"/>
                <element value="tag"/>
                <variable value="coding"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Coding"/>
                </parameter>
              </target>
              <rule>
                <name value="system"/>
                <source>
                  <context value="raporg"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="http://algoritmodiscoring"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="raporg"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString
                                 value="ClinicalDocument/componentOf/EncompassingEncounter/responsibleParty/representedOrganization"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="identifier"/>
            <source>
              <context value="raporg"/>
              <element value="id"/>
              <variable value="id"/>
            </source>
            <target>
              <context value="rapresentedorganization"/>
              <contextType value="variable"/>
              <element value="identifier"/>
              <variable value="identifier"/>
            </target>
            <rule>
              <name value="root1"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="translate"/>
                <parameter>
                  <valueId value="r"/>
                </parameter>
                <parameter>
                  <valueString
                               value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                </parameter>
                <parameter>
                  <valueString value="uri"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="ext"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
              <rule>
                <name value="UUID"/>
                <source>
                  <context value="raporg"/>
                </source>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="url"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="Organization?identifier="/>
                  </parameter>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <rule>
              <name value="assigningAuthorityName"/>
              <source>
                <context value="id"/>
                <element value="assigningAuthorityName"/>
                <variable value="s"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="assigner"/>
                <variable value="a"/>
              </target>
              <target>
                <context value="a"/>
                <contextType value="variable"/>
                <element value="display"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="s"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="r"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <rule>
                <name value="extension"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="rapresentedorganization"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <variable value="uuid3"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="r + '-' + ext"/>
                  </parameter>
                </target>
                <target>
                  <context value="e2"/>
                  <contextType value="variable"/>
                  <element value="fullUrl"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="https://example/Organization/"/>
                  </parameter>
                  <parameter>
                    <valueId value="uuid3"/>
                  </parameter>
                </target>
                <target>
                  <context value="practitionerRole"/>
                  <contextType value="variable"/>
                  <element value="organization"/>
                  <variable value="reference"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <target>
                  <context value="reference"/>
                  <contextType value="variable"/>
                  <element value="reference"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString
                                 value="'https://example/Organization/' + %rapresentedorganization.id"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <documentation
                           value="raporg.id -&gt; rapresentedorganization.identifier;"/>
          </rule>
          <rule>
            <name value="name"/>
            <source>
              <context value="raporg"/>
              <element value="name"/>
              <variable value="v"/>
            </source>
            <target>
              <context value="rapresentedorganization"/>
              <contextType value="variable"/>
              <element value="name"/>
              <transform value="evaluate"/>
              <parameter>
                <valueString value="v.other"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="telecom"/>
            <source>
              <context value="raporg"/>
              <element value="telecom"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="rapresentedorganization"/>
              <contextType value="variable"/>
              <element value="telecom"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="addr"/>
            <source>
              <context value="raporg"/>
              <element value="addr"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="rapresentedorganization"/>
              <contextType value="variable"/>
              <element value="address"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="OrgPartOf"/>
            <source>
              <context value="raporg"/>
              <element value="asOrganizationPartOf"/>
              <variable value="OrgPartOf"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e3"/>
            </target>
            <target>
              <context value="e3"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="PUT"/>
              </parameter>
            </target>
            <target>
              <context value="e3"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="organization1"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Organization"/>
              </parameter>
            </target>
            <target>
              <context value="organization1"/>
              <contextType value="variable"/>
              <element value="id"/>
              <variable value="uuid4"/>
              <transform value="uuid"/>
            </target>
            <target>
              <context value="e3"/>
              <contextType value="variable"/>
              <element value="fullUrl"/>
              <transform value="append"/>
              <parameter>
                <valueString value="https://example/Organization/"/>
              </parameter>
              <parameter>
                <valueId value="uuid4"/>
              </parameter>
            </target>
            <target>
              <context value="rapresentedorganization"/>
              <contextType value="variable"/>
              <element value="partOf"/>
              <variable value="reference"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Reference"/>
              </parameter>
            </target>
            <target>
              <context value="reference"/>
              <contextType value="variable"/>
              <element value="reference"/>
              <transform value="evaluate"/>
              <parameter>
                <valueString
                             value="'https://example/Organization/' + %organization1.id"/>
              </parameter>
            </target>
            <rule>
              <name value="meta"/>
              <source>
                <context value="OrgPartOf"/>
              </source>
              <target>
                <context value="organization1"/>
                <contextType value="variable"/>
                <element value="meta"/>
                <variable value="meta"/>
              </target>
              <rule>
                <name value="coding"/>
                <source>
                  <context value="OrgPartOf"/>
                </source>
                <target>
                  <context value="meta"/>
                  <contextType value="variable"/>
                  <element value="tag"/>
                  <variable value="coding"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Coding"/>
                  </parameter>
                </target>
                <rule>
                  <name value="system"/>
                  <source>
                    <context value="OrgPartOf"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="http://algoritmodiscoring"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="OrgPartOf"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="code"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString
                                   value="ClinicalDocument/componentOf/EncompassingEncounter/responsibleParty/representedOrganization/asOrganizationPartOf"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <documentation
                             value="OrgPartOf.id -&gt; organization1.identifier;"/>
            </rule>
            <rule>
              <name value="identifier"/>
              <source>
                <context value="OrgPartOf"/>
                <element value="id"/>
                <variable value="id"/>
              </source>
              <target>
                <context value="organization1"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="identifier"/>
              </target>
              <rule>
                <name value="root1"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="translate"/>
                  <parameter>
                    <valueId value="r"/>
                  </parameter>
                  <parameter>
                    <valueString
                                 value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                  </parameter>
                  <parameter>
                    <valueString value="uri"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="ext"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="value"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="OrgPartOf"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Organization?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="assigningAuthorityName"/>
                <source>
                  <context value="id"/>
                  <element value="assigningAuthorityName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="assigner"/>
                  <variable value="a"/>
                </target>
                <target>
                  <context value="a"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="s"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="r"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="organization1"/>
                    <contextType value="variable"/>
                    <element value="id"/>
                    <variable value="uuid4"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="r + '-' + ext"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e3"/>
                    <contextType value="variable"/>
                    <element value="fullUrl"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Organization/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid4"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="rapresentedorganization"/>
                    <contextType value="variable"/>
                    <element value="partOf"/>
                    <variable value="reference"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Reference"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="reference"/>
                    <contextType value="variable"/>
                    <element value="reference"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString
                                   value="'https://example/Organization/' + %organization1.id"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="code"/>
              <source>
                <context value="OrgPartOf"/>
                <element value="code"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organization1"/>
                <contextType value="variable"/>
                <element value="type"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="statusCode"/>
              <source>
                <context value="OrgPartOf"/>
                <element value="statusCode"/>
                <variable value="status"/>
                <condition value="(value = 'active')"/>
              </source>
              <target>
                <context value="organization1"/>
                <contextType value="variable"/>
                <element value="active"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="boolean"/>
                </parameter>
              </target>
              <target>
                <context value="organization1"/>
                <contextType value="variable"/>
                <element value="active"/>
                <transform value="copy"/>
                <parameter>
                  <valueBoolean value="true"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="wholeOrgan"/>
              <source>
                <context value="OrgPartOf"/>
                <element value="wholeOrganization"/>
                <variable value="wholeOrgan"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e4"/>
              </target>
              <target>
                <context value="e4"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e4"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="organization2"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Organization"/>
                </parameter>
              </target>
              <rule>
                <name value="meta"/>
                <source>
                  <context value="wholeOrgan"/>
                </source>
                <target>
                  <context value="organization2"/>
                  <contextType value="variable"/>
                  <element value="meta"/>
                  <variable value="meta"/>
                </target>
                <rule>
                  <name value="coding"/>
                  <source>
                    <context value="wholeOrgan"/>
                  </source>
                  <target>
                    <context value="meta"/>
                    <contextType value="variable"/>
                    <element value="tag"/>
                    <variable value="coding"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Coding"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="system"/>
                    <source>
                      <context value="wholeOrgan"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="http://algoritmodiscoring"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="code"/>
                    <source>
                      <context value="wholeOrgan"/>
                    </source>
                    <target>
                      <context value="coding"/>
                      <contextType value="variable"/>
                      <element value="code"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString
                                     value="ClinicalDocument/componentOf/EncompassingEncounter/responsibleParty/representedOrganization/asOrganizationPartOf/wholeOrganization"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <documentation
                               value="wholeOrgan.id -&gt; organization2.identifier;"/>
              </rule>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="wholeOrgan"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="organization2"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="ext"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="UUID"/>
                    <source>
                      <context value="wholeOrgan"/>
                    </source>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="Organization?identifier="/>
                      </parameter>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="extension"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="organization2"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid5"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e4"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Organization/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid5"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="partOf"/>
                      <variable value="reference"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="reference"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString
                                     value="'https://example/Organization/' + %organization2.id"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="name"/>
                <source>
                  <context value="wholeOrgan"/>
                  <element value="name"/>
                  <variable value="v"/>
                </source>
                <target>
                  <context value="organization2"/>
                  <contextType value="variable"/>
                  <element value="name"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="v.other"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="telecom"/>
                <source>
                  <context value="wholeOrgan"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organization2"/>
                  <contextType value="variable"/>
                  <element value="telecom"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="addr"/>
                <source>
                  <context value="wholeOrgan"/>
                  <element value="addr"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organization2"/>
                  <contextType value="variable"/>
                  <element value="address"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="encounterParticipant"/>
      <source>
        <context value="src"/>
        <element value="encounterParticipant"/>
        <variable value="participant"/>
      </source>
      <rule>
        <name value="Participant"/>
        <source>
          <context value="participant"/>
          <element value="assignedEntity"/>
          <variable value="assignedEntity"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="e313"/>
        </target>
        <target>
          <context value="e313"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="POST"/>
          </parameter>
        </target>
        <target>
          <context value="e313"/>
          <contextType value="variable"/>
          <element value="resource"/>
          <variable value="practitionerRole"/>
          <transform value="create"/>
          <parameter>
            <valueString value="PractitionerRole"/>
          </parameter>
        </target>
        <target>
          <context value="practitionerRole"/>
          <contextType value="variable"/>
          <element value="id"/>
          <variable value="uuid1"/>
          <transform value="uuid"/>
        </target>
        <target>
          <context value="e313"/>
          <contextType value="variable"/>
          <element value="fullUrl"/>
          <transform value="append"/>
          <parameter>
            <valueString value="https://example/PractitionerRole/"/>
          </parameter>
          <parameter>
            <valueId value="uuid1"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PractitionerRole"/>
          </parameter>
        </target>
        <target>
          <context value="encounter"/>
          <contextType value="variable"/>
          <element value="participant"/>
          <variable value="participant1"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <rule>
          <name value="period"/>
          <source>
            <context value="participant"/>
          </source>
          <target>
            <context value="participant1"/>
            <contextType value="variable"/>
            <element value="period"/>
            <variable value="period"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Period"/>
            </parameter>
          </target>
          <rule>
            <name value="time"/>
            <source>
              <context value="participant"/>
              <element value="time"/>
              <variable value="time"/>
            </source>
            <target>
              <context value="period"/>
              <contextType value="variable"/>
              <element value="start"/>
              <variable value="start"/>
              <transform value="create"/>
              <parameter>
                <valueString value="dateTime"/>
              </parameter>
            </target>
            <dependent>
              <name value="TSDateTime"/>
              <variable value="time"/>
              <variable value="start"/>
            </dependent>
          </rule>
          <documentation
                         value="participant.time as time-&gt;participant1.period as period ,period.start=(time.value);"/>
        </rule>
        <rule>
          <name value="type"/>
          <source>
            <context value="participant"/>
            <variable value="p"/>
          </source>
          <target>
            <context value="participant1"/>
            <contextType value="variable"/>
            <element value="type"/>
            <variable value="type"/>
          </target>
          <rule>
            <name value="codeType"/>
            <source>
              <context value="p"/>
            </source>
            <target>
              <context value="type"/>
              <contextType value="variable"/>
              <element value="coding"/>
              <variable value="coding"/>
            </target>
            <rule>
              <name value="codice"/>
              <source>
                <context value="p"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="code"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="p.typeCode"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="system"/>
              <source>
                <context value="p"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="copy"/>
                <parameter>
                  <valueString
                               value="http://terminology.hl7.org/CodeSystem/v3-ParticipationType"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="par"/>
          <source>
            <context value="participant"/>
          </source>
          <target>
            <context value="participant1"/>
            <contextType value="variable"/>
            <element value="individual"/>
            <variable value="referencepart"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Reference"/>
            </parameter>
          </target>
          <target>
            <context value="referencepart"/>
            <contextType value="variable"/>
            <element value="reference"/>
            <transform value="evaluate"/>
            <parameter>
              <valueString
                           value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="functionCode"/>
          <source>
            <context value="participant"/>
            <element value="functionCode"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="practitionerRole"/>
            <contextType value="variable"/>
            <element value="code"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
        </rule>
        <rule>
          <name value="assignedEntity"/>
          <source>
            <context value="assignedEntity"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="e33"/>
          </target>
          <target>
            <context value="e33"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="PUT"/>
            </parameter>
          </target>
          <target>
            <context value="e33"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="practitioner"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Practitioner"/>
            </parameter>
          </target>
          <rule>
            <name value="meta"/>
            <source>
              <context value="assignedEntity"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="meta"/>
              <variable value="meta"/>
            </target>
            <rule>
              <name value="coding"/>
              <source>
                <context value="assignedEntity"/>
              </source>
              <target>
                <context value="meta"/>
                <contextType value="variable"/>
                <element value="tag"/>
                <variable value="coding"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Coding"/>
                </parameter>
              </target>
              <rule>
                <name value="system"/>
                <source>
                  <context value="assignedEntity"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="http://algoritmodiscoring"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="assignedEntity"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString
                                 value="ClinicalDocument/encounterParticipant"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="identifier"/>
            <source>
              <context value="assignedEntity"/>
              <element value="id"/>
              <variable value="id"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="identifier"/>
              <variable value="identifier"/>
            </target>
            <rule>
              <name value="root1"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="translate"/>
                <parameter>
                  <valueId value="r"/>
                </parameter>
                <parameter>
                  <valueString
                               value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                </parameter>
                <parameter>
                  <valueString value="uri"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="extension"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="assigningAuthorityName"/>
              <source>
                <context value="id"/>
                <element value="assigningAuthorityName"/>
                <variable value="s"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="assigner"/>
                <variable value="a"/>
              </target>
              <target>
                <context value="a"/>
                <contextType value="variable"/>
                <element value="display"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="s"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="r"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <rule>
                <name value="extension"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <variable value="uuid2"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="r + '-' + ext"/>
                  </parameter>
                </target>
                <target>
                  <context value="e33"/>
                  <contextType value="variable"/>
                  <element value="fullUrl"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="https://example/Practitioner/"/>
                  </parameter>
                  <parameter>
                    <valueId value="uuid2"/>
                  </parameter>
                </target>
                <target>
                  <context value="practitionerRole"/>
                  <contextType value="variable"/>
                  <element value="practitioner"/>
                  <variable value="reference"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <target>
                  <context value="reference"/>
                  <contextType value="variable"/>
                  <element value="reference"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString
                                 value="'https://example/Practitioner/' + %practitioner.id"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="2.16.840.1.113883.2.9.4.3.2"/>
            <source>
              <context value="assignedEntity"/>
              <element value="id"/>
              <variable value="id"/>
              <condition value="(root = '2.16.840.1.113883.2.9.4.3.2')"/>
            </source>
            <rule>
              <name value="UUID"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="url"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="Practitioner?identifier="/>
                </parameter>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="diverso"/>
            <source>
              <context value="assignedEntity"/>
              <element value="id"/>
              <variable value="id"/>
              <condition value="(root != '2.16.840.1.113883.2.9.4.3.2')"/>
            </source>
            <rule>
              <name value="UUID"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="url"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="Practitioner?identifier="/>
                </parameter>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="code"/>
            <source>
              <context value="assignedEntity"/>
              <element value="code"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitionerRole"/>
              <contextType value="variable"/>
              <element value="code"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="addr"/>
            <source>
              <context value="assignedEntity"/>
              <element value="addr"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="address"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="telecom"/>
            <source>
              <context value="assignedEntity"/>
              <element value="telecom"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="practitioner"/>
              <contextType value="variable"/>
              <element value="telecom"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="name"/>
            <source>
              <context value="assignedEntity"/>
              <element value="associatedPerson"/>
              <variable value="assignedPerson"/>
            </source>
            <rule>
              <name value="name"/>
              <source>
                <context value="assignedPerson"/>
                <element value="name"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="practitioner"/>
                <contextType value="variable"/>
                <element value="name"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="birth"/>
              <source>
                <context value="assignedPerson"/>
                <element value="birthTime"/>
                <variable value="birthTime"/>
              </source>
              <rule>
                <name value="birthTimelegal"/>
                <source>
                  <context value="birthTime"/>
                  <element value="value"/>
                  <variable value="date"/>
                </source>
                <target>
                  <context value="practitioner"/>
                  <contextType value="variable"/>
                  <element value="birthDate"/>
                  <transform value="truncate"/>
                  <parameter>
                    <valueId value="date"/>
                  </parameter>
                  <parameter>
                    <valueInteger value="10"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="representedOrganization"/>
            <source>
              <context value="assignedEntity"/>
              <element value="representedOrganization"/>
              <variable value="representedOrganization"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e34"/>
            </target>
            <target>
              <context value="e34"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="PUT"/>
              </parameter>
            </target>
            <target>
              <context value="e34"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="organization"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Organization"/>
              </parameter>
            </target>
            <rule>
              <name value="meta"/>
              <source>
                <context value="representedOrganization"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="meta"/>
                <variable value="meta"/>
              </target>
              <rule>
                <name value="coding"/>
                <source>
                  <context value="representedOrganization"/>
                </source>
                <target>
                  <context value="meta"/>
                  <contextType value="variable"/>
                  <element value="tag"/>
                  <variable value="coding"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Coding"/>
                  </parameter>
                </target>
                <rule>
                  <name value="system"/>
                  <source>
                    <context value="representedOrganization"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="http://algoritmodiscoring"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="representedOrganization"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="code"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString
                                   value="ClinicalDocument/encounterParticipant/scopingOrganization"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="identifier"/>
              <source>
                <context value="representedOrganization"/>
                <element value="id"/>
                <variable value="id"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="identifier"/>
              </target>
              <rule>
                <name value="root1"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="translate"/>
                  <parameter>
                    <valueId value="r"/>
                  </parameter>
                  <parameter>
                    <valueString
                                 value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                  </parameter>
                  <parameter>
                    <valueString value="uri"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="ext"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="value"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="representedOrganization"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Organization?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="assigningAuthorityName"/>
                <source>
                  <context value="id"/>
                  <element value="assigningAuthorityName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="assigner"/>
                  <variable value="a"/>
                </target>
                <target>
                  <context value="a"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="s"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="r"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="organization"/>
                    <contextType value="variable"/>
                    <element value="id"/>
                    <variable value="uuid3"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="r + '-' + ext"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e34"/>
                    <contextType value="variable"/>
                    <element value="fullUrl"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Organization/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid3"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="practitionerRole"/>
                    <contextType value="variable"/>
                    <element value="organization"/>
                    <variable value="reference"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Reference"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="reference"/>
                    <contextType value="variable"/>
                    <element value="reference"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString
                                   value="'https://example/Organization/' + %organization.id"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="name"/>
              <source>
                <context value="representedOrganization"/>
                <element value="name"/>
                <variable value="v"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="name"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="v.other"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="representedOrganization"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="addr"/>
              <source>
                <context value="representedOrganization"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="organization"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="OrgPartOf"/>
              <source>
                <context value="representedOrganization"/>
                <element value="asOrganizationPartOf"/>
                <variable value="OrgPartOf"/>
              </source>
              <target>
                <context value="bundle"/>
                <contextType value="variable"/>
                <element value="entry"/>
                <variable value="e35"/>
              </target>
              <target>
                <context value="e35"/>
                <contextType value="variable"/>
                <element value="request"/>
                <variable value="request"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="BackboneElement"/>
                </parameter>
              </target>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="method"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="PUT"/>
                </parameter>
              </target>
              <target>
                <context value="e35"/>
                <contextType value="variable"/>
                <element value="resource"/>
                <variable value="organization1"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Organization"/>
                </parameter>
              </target>
              <rule>
                <name value="identifier"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="id"/>
                  <variable value="id"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="identifier"/>
                  <variable value="identifier"/>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="OrgPartOf"/>
                  </source>
                  <target>
                    <context value="organization1"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="OrgPartOf"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="OrgPartOf"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/encounterParticipant/scopingOrganization/asOrganizationPartOf"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="root1"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="translate"/>
                    <parameter>
                      <valueId value="r"/>
                    </parameter>
                    <parameter>
                      <valueString
                                   value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                    </parameter>
                    <parameter>
                      <valueString value="uri"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="ext"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="value"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                  <rule>
                    <name value="UUID"/>
                    <source>
                      <context value="OrgPartOf"/>
                    </source>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="Organization?identifier="/>
                      </parameter>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
                <rule>
                  <name value="assigningAuthorityName"/>
                  <source>
                    <context value="id"/>
                    <element value="assigningAuthorityName"/>
                    <variable value="s"/>
                  </source>
                  <target>
                    <context value="identifier"/>
                    <contextType value="variable"/>
                    <element value="assigner"/>
                    <variable value="a"/>
                  </target>
                  <target>
                    <context value="a"/>
                    <contextType value="variable"/>
                    <element value="display"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueId value="s"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="r"/>
                  <source>
                    <context value="id"/>
                    <element value="root"/>
                    <variable value="r"/>
                  </source>
                  <rule>
                    <name value="extension"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="organization1"/>
                      <contextType value="variable"/>
                      <element value="id"/>
                      <variable value="uuid4"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="r + '-' + ext"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e35"/>
                      <contextType value="variable"/>
                      <element value="fullUrl"/>
                      <transform value="append"/>
                      <parameter>
                        <valueString value="https://example/Organization/"/>
                      </parameter>
                      <parameter>
                        <valueId value="uuid4"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="organization"/>
                      <contextType value="variable"/>
                      <element value="partOf"/>
                      <variable value="reference"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Reference"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="reference"/>
                      <contextType value="variable"/>
                      <element value="reference"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString
                                     value="'https://example/Organization/' + %organization1.id"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="code"/>
                  <variable value="vvv"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="type"/>
                  <variable value="vvv"/>
                  <transform value="create"/>
                </target>
              </rule>
              <rule>
                <name value="statusCode"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="statusCode"/>
                  <variable value="status"/>
                  <condition value="(value = 'active')"/>
                </source>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="active"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="boolean"/>
                  </parameter>
                </target>
                <target>
                  <context value="organization1"/>
                  <contextType value="variable"/>
                  <element value="active"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueBoolean value="true"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="wholeOrgan"/>
                <source>
                  <context value="OrgPartOf"/>
                  <element value="wholeOrganization"/>
                  <variable value="wholeOrgan"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e36"/>
                </target>
                <target>
                  <context value="e36"/>
                  <contextType value="variable"/>
                  <element value="request"/>
                  <variable value="request"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="BackboneElement"/>
                  </parameter>
                </target>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="method"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="PUT"/>
                  </parameter>
                </target>
                <target>
                  <context value="e36"/>
                  <contextType value="variable"/>
                  <element value="resource"/>
                  <variable value="organization2"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Organization"/>
                  </parameter>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="wholeOrgan"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="wholeOrgan"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/encounterParticipant/scopingOrganization/asOrganizationPartOf/wholeOrganization"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="identifier"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="id"/>
                    <variable value="id"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="identifier"/>
                    <variable value="identifier"/>
                  </target>
                  <rule>
                    <name value="root1"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="translate"/>
                      <parameter>
                        <valueId value="r"/>
                      </parameter>
                      <parameter>
                        <valueString
                                     value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                      </parameter>
                      <parameter>
                        <valueString value="uri"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="ext"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="value"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="UUID"/>
                      <source>
                        <context value="wholeOrgan"/>
                      </source>
                      <target>
                        <context value="request"/>
                        <contextType value="variable"/>
                        <element value="url"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="Organization?identifier="/>
                        </parameter>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                  <rule>
                    <name value="assigningAuthorityName"/>
                    <source>
                      <context value="id"/>
                      <element value="assigningAuthorityName"/>
                      <variable value="s"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="assigner"/>
                      <variable value="a"/>
                    </target>
                    <target>
                      <context value="a"/>
                      <contextType value="variable"/>
                      <element value="display"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="s"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="r"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <rule>
                      <name value="extension"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="organization1"/>
                        <contextType value="variable"/>
                        <element value="id"/>
                        <variable value="uuid5"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="r + '-' + ext"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e36"/>
                        <contextType value="variable"/>
                        <element value="fullUrl"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Organization/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid5"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="organization1"/>
                        <contextType value="variable"/>
                        <element value="partOf"/>
                        <variable value="reference"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Reference"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="reference"/>
                        <contextType value="variable"/>
                        <element value="reference"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString
                                       value="'https://example/Organization/' + %organization2.id"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="name"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="name"/>
                    <variable value="v"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="name"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="v.other"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="telecom"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="telecom"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="addr"/>
                  <source>
                    <context value="wholeOrgan"/>
                    <element value="addr"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="organization2"/>
                    <contextType value="variable"/>
                    <element value="address"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="location"/>
      <source>
        <context value="src"/>
        <element value="location"/>
        <variable value="Location"/>
      </source>
      <rule>
        <name value="location1"/>
        <source>
          <context value="Location"/>
          <element value="healthCareFacility"/>
          <variable value="HCF"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="e5"/>
        </target>
        <target>
          <context value="e5"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PUT"/>
          </parameter>
        </target>
        <target>
          <context value="e5"/>
          <contextType value="variable"/>
          <element value="resource"/>
          <variable value="loc"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Location"/>
          </parameter>
        </target>
        <rule>
          <name value="meta"/>
          <source>
            <context value="HCF"/>
          </source>
          <target>
            <context value="loc"/>
            <contextType value="variable"/>
            <element value="meta"/>
            <variable value="meta"/>
          </target>
          <rule>
            <name value="coding"/>
            <source>
              <context value="HCF"/>
            </source>
            <target>
              <context value="meta"/>
              <contextType value="variable"/>
              <element value="tag"/>
              <variable value="coding"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Coding"/>
              </parameter>
            </target>
            <rule>
              <name value="system"/>
              <source>
                <context value="HCF"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="http://algoritmodiscoring"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="code"/>
              <source>
                <context value="HCF"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="code"/>
                <transform value="copy"/>
                <parameter>
                  <valueString
                               value="ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="hcf"/>
          <source>
            <context value="HCF"/>
          </source>
          <target>
            <context value="encounter"/>
            <contextType value="variable"/>
            <element value="location"/>
            <variable value="locations"/>
          </target>
          <rule>
            <name value="identifier"/>
            <source>
              <context value="HCF"/>
              <element value="id"/>
              <variable value="id"/>
            </source>
            <target>
              <context value="loc"/>
              <contextType value="variable"/>
              <element value="identifier"/>
              <variable value="identifier"/>
            </target>
            <rule>
              <name value="root1"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="translate"/>
                <parameter>
                  <valueId value="r"/>
                </parameter>
                <parameter>
                  <valueString
                               value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                </parameter>
                <parameter>
                  <valueString value="uri"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="ext"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
              <rule>
                <name value="UUID"/>
                <source>
                  <context value="HCF"/>
                </source>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="url"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="Location?identifier="/>
                  </parameter>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <rule>
              <name value="assigningAuthorityName"/>
              <source>
                <context value="id"/>
                <element value="assigningAuthorityName"/>
                <variable value="s"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="assigner"/>
                <variable value="a"/>
              </target>
              <target>
                <context value="a"/>
                <contextType value="variable"/>
                <element value="display"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="s"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="r"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <rule>
                <name value="locc"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="loc"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <variable value="uuid6"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="r + '-' + ext"/>
                  </parameter>
                </target>
                <target>
                  <context value="e5"/>
                  <contextType value="variable"/>
                  <element value="fullUrl"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="https://example/Location/"/>
                  </parameter>
                  <parameter>
                    <valueId value="uuid6"/>
                  </parameter>
                </target>
                <target>
                  <context value="locations"/>
                  <contextType value="variable"/>
                  <element value="location"/>
                  <variable value="reference"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <target>
                  <context value="reference"/>
                  <contextType value="variable"/>
                  <element value="reference"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString
                                 value="'https://example/Location/' + %loc.id"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="code"/>
            <source>
              <context value="HCF"/>
              <element value="code"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="loc"/>
              <contextType value="variable"/>
              <element value="type"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="location2"/>
            <source>
              <context value="HCF"/>
              <element value="location"/>
              <variable value="srcLocation"/>
            </source>
            <rule>
              <name value="name"/>
              <source>
                <context value="srcLocation"/>
                <element value="name"/>
                <variable value="v"/>
              </source>
              <target>
                <context value="loc"/>
                <contextType value="variable"/>
                <element value="name"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="v.other"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="addr"/>
              <source>
                <context value="srcLocation"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="loc"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="SPO"/>
            <source>
              <context value="HCF"/>
              <element value="serviceProviderOrganization"/>
              <variable value="servProvOrg"/>
            </source>
            <target>
              <context value="bundle"/>
              <contextType value="variable"/>
              <element value="entry"/>
              <variable value="e"/>
            </target>
            <target>
              <context value="e"/>
              <contextType value="variable"/>
              <element value="request"/>
              <variable value="request"/>
              <transform value="create"/>
              <parameter>
                <valueString value="BackboneElement"/>
              </parameter>
            </target>
            <target>
              <context value="request"/>
              <contextType value="variable"/>
              <element value="method"/>
              <transform value="copy"/>
              <parameter>
                <valueString value="PUT"/>
              </parameter>
            </target>
            <target>
              <context value="e"/>
              <contextType value="variable"/>
              <element value="resource"/>
              <variable value="serviceProviderOrganization"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Organization"/>
              </parameter>
            </target>
            <rule>
              <name value="meta"/>
              <source>
                <context value="servProvOrg"/>
              </source>
              <target>
                <context value="serviceProviderOrganization"/>
                <contextType value="variable"/>
                <element value="meta"/>
                <variable value="meta"/>
              </target>
              <rule>
                <name value="coding"/>
                <source>
                  <context value="servProvOrg"/>
                </source>
                <target>
                  <context value="meta"/>
                  <contextType value="variable"/>
                  <element value="tag"/>
                  <variable value="coding"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Coding"/>
                  </parameter>
                </target>
                <rule>
                  <name value="system"/>
                  <source>
                    <context value="servProvOrg"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="system"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="http://algoritmodiscoring"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="servProvOrg"/>
                  </source>
                  <target>
                    <context value="coding"/>
                    <contextType value="variable"/>
                    <element value="code"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString
                                   value="ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility/serviceProviderOrganization"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="identifier"/>
              <source>
                <context value="servProvOrg"/>
                <element value="id"/>
                <variable value="id"/>
              </source>
              <target>
                <context value="serviceProviderOrganization"/>
                <contextType value="variable"/>
                <element value="identifier"/>
                <variable value="identifier"/>
              </target>
              <rule>
                <name value="root1"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="translate"/>
                  <parameter>
                    <valueId value="r"/>
                  </parameter>
                  <parameter>
                    <valueString
                                 value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                  </parameter>
                  <parameter>
                    <valueString value="uri"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="ext"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="value"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
                <rule>
                  <name value="UUID"/>
                  <source>
                    <context value="servProvOrg"/>
                  </source>
                  <target>
                    <context value="request"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="Organization?identifier="/>
                    </parameter>
                    <parameter>
                      <valueId value="ext"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
              <rule>
                <name value="assigningAuthorityName"/>
                <source>
                  <context value="id"/>
                  <element value="assigningAuthorityName"/>
                  <variable value="s"/>
                </source>
                <target>
                  <context value="identifier"/>
                  <contextType value="variable"/>
                  <element value="assigner"/>
                  <variable value="a"/>
                </target>
                <target>
                  <context value="a"/>
                  <contextType value="variable"/>
                  <element value="display"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="s"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="r"/>
                <source>
                  <context value="id"/>
                  <element value="root"/>
                  <variable value="r"/>
                </source>
                <rule>
                  <name value="extension"/>
                  <source>
                    <context value="id"/>
                    <element value="extension"/>
                    <variable value="ext"/>
                  </source>
                  <target>
                    <context value="serviceProviderOrganization"/>
                    <contextType value="variable"/>
                    <element value="id"/>
                    <variable value="uuid"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString value="r + '-' + ext"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="e"/>
                    <contextType value="variable"/>
                    <element value="fullUrl"/>
                    <transform value="append"/>
                    <parameter>
                      <valueString value="https://example/Organization/"/>
                    </parameter>
                    <parameter>
                      <valueId value="uuid"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="loc"/>
                    <contextType value="variable"/>
                    <element value="managingOrganization"/>
                    <variable value="reference"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Reference"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="reference"/>
                    <contextType value="variable"/>
                    <element value="reference"/>
                    <transform value="evaluate"/>
                    <parameter>
                      <valueString
                                   value="'https://example/Organization/' + %serviceProviderOrganization.id"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
            <rule>
              <name value="name"/>
              <source>
                <context value="servProvOrg"/>
                <element value="name"/>
                <variable value="v"/>
              </source>
              <target>
                <context value="serviceProviderOrganization"/>
                <contextType value="variable"/>
                <element value="name"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="v.other"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="telecom"/>
              <source>
                <context value="servProvOrg"/>
                <element value="telecom"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="serviceProviderOrganization"/>
                <contextType value="variable"/>
                <element value="telecom"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="addr"/>
              <source>
                <context value="servProvOrg"/>
                <element value="addr"/>
                <variable value="vvv"/>
              </source>
              <target>
                <context value="serviceProviderOrganization"/>
                <contextType value="variable"/>
                <element value="address"/>
                <variable value="vvv"/>
                <transform value="create"/>
              </target>
            </rule>
            <rule>
              <name value="asOrg1"/>
              <source>
                <context value="servProvOrg"/>
                <element value="asOrganizationPartOf"/>
                <variable value="asOrgPartOf"/>
              </source>
              <rule>
                <name value="OrganizationPartOfprovider"/>
                <source>
                  <context value="asOrgPartOf"/>
                  <variable value="asOrgPartOf1"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e1"/>
                </target>
                <target>
                  <context value="e1"/>
                  <contextType value="variable"/>
                  <element value="request"/>
                  <variable value="request"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="BackboneElement"/>
                  </parameter>
                </target>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="method"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="PUT"/>
                  </parameter>
                </target>
                <target>
                  <context value="e1"/>
                  <contextType value="variable"/>
                  <element value="resource"/>
                  <variable value="asorganization"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Organization"/>
                  </parameter>
                </target>
                <rule>
                  <name value="meta"/>
                  <source>
                    <context value="asOrgPartOf1"/>
                  </source>
                  <target>
                    <context value="asorganization"/>
                    <contextType value="variable"/>
                    <element value="meta"/>
                    <variable value="meta"/>
                  </target>
                  <rule>
                    <name value="coding"/>
                    <source>
                      <context value="asOrgPartOf1"/>
                    </source>
                    <target>
                      <context value="meta"/>
                      <contextType value="variable"/>
                      <element value="tag"/>
                      <variable value="coding"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Coding"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="system"/>
                      <source>
                        <context value="asOrgPartOf1"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="system"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString value="http://algoritmodiscoring"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="code"/>
                      <source>
                        <context value="asOrgPartOf1"/>
                      </source>
                      <target>
                        <context value="coding"/>
                        <contextType value="variable"/>
                        <element value="code"/>
                        <transform value="copy"/>
                        <parameter>
                          <valueString
                                       value="ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="identifier"/>
                  <source>
                    <context value="asOrgPartOf1"/>
                    <element value="id"/>
                    <variable value="id"/>
                  </source>
                  <target>
                    <context value="asorganization"/>
                    <contextType value="variable"/>
                    <element value="identifier"/>
                    <variable value="identifier"/>
                  </target>
                  <rule>
                    <name value="root1"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="system"/>
                      <transform value="translate"/>
                      <parameter>
                        <valueId value="r"/>
                      </parameter>
                      <parameter>
                        <valueString
                                     value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                      </parameter>
                      <parameter>
                        <valueString value="uri"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="ext"/>
                    <source>
                      <context value="id"/>
                      <element value="extension"/>
                      <variable value="ext"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="value"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="ext"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="UUID"/>
                      <source>
                        <context value="asOrgPartOf1"/>
                      </source>
                      <target>
                        <context value="request"/>
                        <contextType value="variable"/>
                        <element value="url"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="Organization?identifier="/>
                        </parameter>
                        <parameter>
                          <valueId value="ext"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                  <rule>
                    <name value="assigningAuthorityName"/>
                    <source>
                      <context value="id"/>
                      <element value="assigningAuthorityName"/>
                      <variable value="s"/>
                    </source>
                    <target>
                      <context value="identifier"/>
                      <contextType value="variable"/>
                      <element value="assigner"/>
                      <variable value="a"/>
                    </target>
                    <target>
                      <context value="a"/>
                      <contextType value="variable"/>
                      <element value="display"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueId value="s"/>
                      </parameter>
                    </target>
                  </rule>
                  <rule>
                    <name value="r"/>
                    <source>
                      <context value="id"/>
                      <element value="root"/>
                      <variable value="r"/>
                    </source>
                    <rule>
                      <name value="extension"/>
                      <source>
                        <context value="id"/>
                        <element value="extension"/>
                        <variable value="ext"/>
                      </source>
                      <target>
                        <context value="asorganization"/>
                        <contextType value="variable"/>
                        <element value="id"/>
                        <variable value="uuid1"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="r + '-' + ext"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="e1"/>
                        <contextType value="variable"/>
                        <element value="fullUrl"/>
                        <transform value="append"/>
                        <parameter>
                          <valueString value="https://example/Organization/"/>
                        </parameter>
                        <parameter>
                          <valueId value="uuid1"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="serviceProviderOrganization"/>
                        <contextType value="variable"/>
                        <element value="partOf"/>
                        <variable value="reference"/>
                        <transform value="create"/>
                        <parameter>
                          <valueString value="Reference"/>
                        </parameter>
                      </target>
                      <target>
                        <context value="reference"/>
                        <contextType value="variable"/>
                        <element value="reference"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString
                                       value="'https://example/Organization/' + %asorganization.id"/>
                        </parameter>
                      </target>
                    </rule>
                  </rule>
                </rule>
                <rule>
                  <name value="code"/>
                  <source>
                    <context value="asOrgPartOf1"/>
                    <element value="code"/>
                    <variable value="vvv"/>
                  </source>
                  <target>
                    <context value="asorganization"/>
                    <contextType value="variable"/>
                    <element value="type"/>
                    <variable value="vvv"/>
                    <transform value="create"/>
                  </target>
                </rule>
                <rule>
                  <name value="statusCode"/>
                  <source>
                    <context value="asOrgPartOf1"/>
                    <element value="statusCode"/>
                    <variable value="status"/>
                    <condition value="(code = 'active')"/>
                  </source>
                  <target>
                    <context value="asorganization"/>
                    <contextType value="variable"/>
                    <element value="active"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="boolean"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="asorganization"/>
                    <contextType value="variable"/>
                    <element value="active"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="true"/>
                    </parameter>
                  </target>
                </rule>
                <rule>
                  <name value="wholeOrg"/>
                  <source>
                    <context value="asOrgPartOf1"/>
                    <element value="wholeOrganization"/>
                    <variable value="wholeOrg"/>
                  </source>
                  <rule>
                    <name value="wholeOrg1"/>
                    <source>
                      <context value="wholeOrg"/>
                      <variable value="wholeOrg1"/>
                    </source>
                    <target>
                      <context value="bundle"/>
                      <contextType value="variable"/>
                      <element value="entry"/>
                      <variable value="e2"/>
                    </target>
                    <target>
                      <context value="e2"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="request"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="BackboneElement"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="request"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="PUT"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="e2"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="wholeorganization"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Organization"/>
                      </parameter>
                    </target>
                    <rule>
                      <name value="meta"/>
                      <source>
                        <context value="wholeOrg1"/>
                      </source>
                      <target>
                        <context value="wholeorganization"/>
                        <contextType value="variable"/>
                        <element value="meta"/>
                        <variable value="meta"/>
                      </target>
                      <rule>
                        <name value="coding"/>
                        <source>
                          <context value="wholeOrg1"/>
                        </source>
                        <target>
                          <context value="meta"/>
                          <contextType value="variable"/>
                          <element value="tag"/>
                          <variable value="coding"/>
                          <transform value="create"/>
                          <parameter>
                            <valueString value="Coding"/>
                          </parameter>
                        </target>
                        <rule>
                          <name value="system"/>
                          <source>
                            <context value="wholeOrg1"/>
                          </source>
                          <target>
                            <context value="coding"/>
                            <contextType value="variable"/>
                            <element value="system"/>
                            <transform value="copy"/>
                            <parameter>
                              <valueString value="http://algoritmodiscoring"/>
                            </parameter>
                          </target>
                        </rule>
                        <rule>
                          <name value="code"/>
                          <source>
                            <context value="wholeOrg1"/>
                          </source>
                          <target>
                            <context value="coding"/>
                            <contextType value="variable"/>
                            <element value="code"/>
                            <transform value="copy"/>
                            <parameter>
                              <valueString
                                           value="ClinicalDocument/componentOf/EncompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf"/>
                            </parameter>
                          </target>
                        </rule>
                      </rule>
                    </rule>
                    <rule>
                      <name value="identifier"/>
                      <source>
                        <context value="wholeOrg1"/>
                        <element value="id"/>
                        <variable value="id"/>
                      </source>
                      <target>
                        <context value="asorganization"/>
                        <contextType value="variable"/>
                        <element value="identifier"/>
                        <variable value="identifier"/>
                      </target>
                      <rule>
                        <name value="root1"/>
                        <source>
                          <context value="id"/>
                          <element value="root"/>
                          <variable value="r"/>
                        </source>
                        <target>
                          <context value="identifier"/>
                          <contextType value="variable"/>
                          <element value="system"/>
                          <transform value="translate"/>
                          <parameter>
                            <valueId value="r"/>
                          </parameter>
                          <parameter>
                            <valueString
                                         value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                          </parameter>
                          <parameter>
                            <valueString value="uri"/>
                          </parameter>
                        </target>
                      </rule>
                      <rule>
                        <name value="ext"/>
                        <source>
                          <context value="id"/>
                          <element value="extension"/>
                          <variable value="ext"/>
                        </source>
                        <target>
                          <context value="identifier"/>
                          <contextType value="variable"/>
                          <element value="value"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueId value="ext"/>
                          </parameter>
                        </target>
                        <rule>
                          <name value="UUID"/>
                          <source>
                            <context value="wholeOrg1"/>
                          </source>
                          <target>
                            <context value="request"/>
                            <contextType value="variable"/>
                            <element value="url"/>
                            <transform value="append"/>
                            <parameter>
                              <valueString value="Organization?identifier="/>
                            </parameter>
                            <parameter>
                              <valueId value="ext"/>
                            </parameter>
                          </target>
                        </rule>
                      </rule>
                      <rule>
                        <name value="assigningAuthorityName"/>
                        <source>
                          <context value="id"/>
                          <element value="assigningAuthorityName"/>
                          <variable value="s"/>
                        </source>
                        <target>
                          <context value="identifier"/>
                          <contextType value="variable"/>
                          <element value="assigner"/>
                          <variable value="a"/>
                        </target>
                        <target>
                          <context value="a"/>
                          <contextType value="variable"/>
                          <element value="display"/>
                          <transform value="copy"/>
                          <parameter>
                            <valueId value="s"/>
                          </parameter>
                        </target>
                      </rule>
                      <rule>
                        <name value="r"/>
                        <source>
                          <context value="id"/>
                          <element value="root"/>
                          <variable value="r"/>
                        </source>
                        <rule>
                          <name value="extension"/>
                          <source>
                            <context value="id"/>
                            <element value="extension"/>
                            <variable value="ext"/>
                          </source>
                          <target>
                            <context value="wholeorganization"/>
                            <contextType value="variable"/>
                            <element value="id"/>
                            <variable value="uuid2"/>
                            <transform value="evaluate"/>
                            <parameter>
                              <valueString value="r + '-' + ext"/>
                            </parameter>
                          </target>
                          <target>
                            <context value="e2"/>
                            <contextType value="variable"/>
                            <element value="fullUrl"/>
                            <transform value="append"/>
                            <parameter>
                              <valueString
                                           value="https://example/Organization/"/>
                            </parameter>
                            <parameter>
                              <valueId value="uuid2"/>
                            </parameter>
                          </target>
                          <target>
                            <context value="asorganization"/>
                            <contextType value="variable"/>
                            <element value="partOf"/>
                            <variable value="reference"/>
                            <transform value="create"/>
                            <parameter>
                              <valueString value="Reference"/>
                            </parameter>
                          </target>
                          <target>
                            <context value="reference"/>
                            <contextType value="variable"/>
                            <element value="reference"/>
                            <transform value="evaluate"/>
                            <parameter>
                              <valueString
                                           value="'https://example/Organization/' + %wholeorganization.id"/>
                            </parameter>
                          </target>
                        </rule>
                      </rule>
                    </rule>
                    <rule>
                      <name value="name"/>
                      <source>
                        <context value="wholeOrg1"/>
                        <element value="name"/>
                        <variable value="v"/>
                      </source>
                      <target>
                        <context value="wholeorganization"/>
                        <contextType value="variable"/>
                        <element value="name"/>
                        <transform value="evaluate"/>
                        <parameter>
                          <valueString value="v.other"/>
                        </parameter>
                      </target>
                    </rule>
                    <rule>
                      <name value="telecom"/>
                      <source>
                        <context value="wholeOrg1"/>
                        <element value="telecom"/>
                        <variable value="vvv"/>
                      </source>
                      <target>
                        <context value="wholeorganization"/>
                        <contextType value="variable"/>
                        <element value="telecom"/>
                        <variable value="vvv"/>
                        <transform value="create"/>
                      </target>
                    </rule>
                    <rule>
                      <name value="addr"/>
                      <source>
                        <context value="wholeOrg1"/>
                        <element value="addr"/>
                        <variable value="vvv"/>
                      </source>
                      <target>
                        <context value="wholeorganization"/>
                        <contextType value="variable"/>
                        <element value="address"/>
                        <variable value="vvv"/>
                        <transform value="create"/>
                      </target>
                    </rule>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="ClinicalDocumentationOf"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="representedOrganization"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="organization"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="bundle"/>
      <type value="Bundle"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="name"/>
      <source>
        <context value="src"/>
        <element value="name"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="name"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="telecom"/>
      <source>
        <context value="src"/>
        <element value="telecom"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="telecom"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="addr"/>
      <source>
        <context value="src"/>
        <element value="addr"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="address"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="creation"/>
      <source>
        <context value="src"/>
        <element value="asOrganizationPartOf"/>
        <variable value="asOrganizationPartOf"/>
      </source>
      <rule>
        <name value="organizationPartOf"/>
        <source>
          <context value="asOrganizationPartOf"/>
        </source>
        <target>
          <context value="bundle"/>
          <contextType value="variable"/>
          <element value="entry"/>
          <variable value="e"/>
        </target>
        <target>
          <context value="e"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="request"/>
          <transform value="create"/>
          <parameter>
            <valueString value="BackboneElement"/>
          </parameter>
        </target>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="PUT"/>
          </parameter>
        </target>
        <target>
          <context value="e"/>
          <contextType value="variable"/>
          <element value="resource"/>
          <variable value="organization2"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Organization"/>
          </parameter>
        </target>
        <rule>
          <name value="meta"/>
          <source>
            <context value="asOrganizationPartOf"/>
          </source>
          <target>
            <context value="organization2"/>
            <contextType value="variable"/>
            <element value="meta"/>
            <variable value="meta"/>
          </target>
          <rule>
            <name value="coding"/>
            <source>
              <context value="asOrganizationPartOf"/>
            </source>
            <target>
              <context value="meta"/>
              <contextType value="variable"/>
              <element value="tag"/>
              <variable value="coding"/>
              <transform value="create"/>
              <parameter>
                <valueString value="Coding"/>
              </parameter>
            </target>
            <rule>
              <name value="system"/>
              <source>
                <context value="asOrganizationPartOf"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="copy"/>
                <parameter>
                  <valueString value="http://algoritmodiscoring"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="code"/>
              <source>
                <context value="asOrganizationPartOf"/>
              </source>
              <target>
                <context value="coding"/>
                <contextType value="variable"/>
                <element value="code"/>
                <transform value="copy"/>
                <parameter>
                  <valueString
                               value="ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization/asOrganizationPartOf"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="identifier"/>
          <source>
            <context value="asOrganizationPartOf"/>
            <element value="id"/>
            <variable value="id"/>
          </source>
          <target>
            <context value="organization2"/>
            <contextType value="variable"/>
            <element value="identifier"/>
            <variable value="identifier"/>
          </target>
          <rule>
            <name value="root1"/>
            <source>
              <context value="id"/>
              <element value="root"/>
              <variable value="r"/>
            </source>
            <target>
              <context value="identifier"/>
              <contextType value="variable"/>
              <element value="system"/>
              <transform value="translate"/>
              <parameter>
                <valueId value="r"/>
              </parameter>
              <parameter>
                <valueString
                             value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
              </parameter>
              <parameter>
                <valueString value="uri"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="ext"/>
            <source>
              <context value="id"/>
              <element value="extension"/>
              <variable value="ext"/>
            </source>
            <target>
              <context value="identifier"/>
              <contextType value="variable"/>
              <element value="value"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="ext"/>
              </parameter>
            </target>
            <rule>
              <name value="UUID"/>
              <source>
                <context value="asOrganizationPartOf"/>
              </source>
              <target>
                <context value="request"/>
                <contextType value="variable"/>
                <element value="url"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="Organization?identifier="/>
                </parameter>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="assigningAuthorityName"/>
            <source>
              <context value="id"/>
              <element value="assigningAuthorityName"/>
              <variable value="s"/>
            </source>
            <target>
              <context value="identifier"/>
              <contextType value="variable"/>
              <element value="assigner"/>
              <variable value="a"/>
            </target>
            <target>
              <context value="a"/>
              <contextType value="variable"/>
              <element value="display"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="s"/>
              </parameter>
            </target>
          </rule>
          <rule>
            <name value="r"/>
            <source>
              <context value="id"/>
              <element value="root"/>
              <variable value="r"/>
            </source>
            <rule>
              <name value="extension"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="organization2"/>
                <contextType value="variable"/>
                <element value="id"/>
                <variable value="uuid"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString value="r + '-' + ext"/>
                </parameter>
              </target>
              <target>
                <context value="e"/>
                <contextType value="variable"/>
                <element value="fullUrl"/>
                <transform value="append"/>
                <parameter>
                  <valueString value="https://example/Organization/"/>
                </parameter>
                <parameter>
                  <valueId value="uuid"/>
                </parameter>
              </target>
              <target>
                <context value="tgt"/>
                <contextType value="variable"/>
                <element value="partOf"/>
                <variable value="reference"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Reference"/>
                </parameter>
              </target>
              <target>
                <context value="reference"/>
                <contextType value="variable"/>
                <element value="reference"/>
                <transform value="evaluate"/>
                <parameter>
                  <valueString
                               value="'https://example/Organization/' + %organization2.id"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
        <rule>
          <name value="code"/>
          <source>
            <context value="asOrganizationPartOf"/>
            <element value="code"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="organization2"/>
            <contextType value="variable"/>
            <element value="type"/>
            <variable value="vvv"/>
            <transform value="create"/>
          </target>
        </rule>
        <rule>
          <name value="statusCode"/>
          <source>
            <context value="asOrganizationPartOf"/>
            <element value="statusCode"/>
            <condition value="(value = 'active')"/>
          </source>
          <target>
            <context value="organization2"/>
            <contextType value="variable"/>
            <element value="active"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="true"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="wholeOrganization"/>
          <source>
            <context value="asOrganizationPartOf"/>
            <element value="wholeOrganization"/>
            <variable value="wholeOrganization"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="e3"/>
          </target>
          <target>
            <context value="e3"/>
            <contextType value="variable"/>
            <element value="request"/>
            <variable value="request"/>
            <transform value="create"/>
            <parameter>
              <valueString value="BackboneElement"/>
            </parameter>
          </target>
          <target>
            <context value="request"/>
            <contextType value="variable"/>
            <element value="method"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="PUT"/>
            </parameter>
          </target>
          <target>
            <context value="e3"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="organization3"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Organization"/>
            </parameter>
          </target>
          <rule>
            <name value="meta"/>
            <source>
              <context value="wholeOrganization"/>
            </source>
            <target>
              <context value="organization3"/>
              <contextType value="variable"/>
              <element value="meta"/>
              <variable value="meta"/>
            </target>
            <rule>
              <name value="coding"/>
              <source>
                <context value="wholeOrganization"/>
              </source>
              <target>
                <context value="meta"/>
                <contextType value="variable"/>
                <element value="tag"/>
                <variable value="coding"/>
                <transform value="create"/>
                <parameter>
                  <valueString value="Coding"/>
                </parameter>
              </target>
              <rule>
                <name value="system"/>
                <source>
                  <context value="wholeOrganization"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="system"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString value="http://algoritmodiscoring"/>
                  </parameter>
                </target>
              </rule>
              <rule>
                <name value="code"/>
                <source>
                  <context value="wholeOrganization"/>
                </source>
                <target>
                  <context value="coding"/>
                  <contextType value="variable"/>
                  <element value="code"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueString
                                 value="ClinicalDocument/documentationOf/serviceEvent/performer/representedOrganization/asOrganizationPartOf"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="identifier"/>
            <source>
              <context value="wholeOrganization"/>
              <element value="id"/>
              <variable value="id"/>
            </source>
            <target>
              <context value="organization3"/>
              <contextType value="variable"/>
              <element value="identifier"/>
              <variable value="identifier"/>
            </target>
            <rule>
              <name value="root1"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="system"/>
                <transform value="translate"/>
                <parameter>
                  <valueId value="r"/>
                </parameter>
                <parameter>
                  <valueString
                               value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
                </parameter>
                <parameter>
                  <valueString value="uri"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="ext"/>
              <source>
                <context value="id"/>
                <element value="extension"/>
                <variable value="ext"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="value"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="ext"/>
                </parameter>
              </target>
              <rule>
                <name value="UUID"/>
                <source>
                  <context value="wholeOrganization"/>
                </source>
                <target>
                  <context value="request"/>
                  <contextType value="variable"/>
                  <element value="url"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="Organization?identifier="/>
                  </parameter>
                  <parameter>
                    <valueId value="ext"/>
                  </parameter>
                </target>
              </rule>
            </rule>
            <rule>
              <name value="assigningAuthorityName"/>
              <source>
                <context value="id"/>
                <element value="assigningAuthorityName"/>
                <variable value="s"/>
              </source>
              <target>
                <context value="identifier"/>
                <contextType value="variable"/>
                <element value="assigner"/>
                <variable value="a"/>
              </target>
              <target>
                <context value="a"/>
                <contextType value="variable"/>
                <element value="display"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="s"/>
                </parameter>
              </target>
            </rule>
            <rule>
              <name value="r"/>
              <source>
                <context value="id"/>
                <element value="root"/>
                <variable value="r"/>
              </source>
              <rule>
                <name value="extension"/>
                <source>
                  <context value="id"/>
                  <element value="extension"/>
                  <variable value="ext"/>
                </source>
                <target>
                  <context value="organization3"/>
                  <contextType value="variable"/>
                  <element value="id"/>
                  <variable value="uuid1"/>
                  <transform value="evaluate"/>
                  <parameter>
                    <valueString value="r + '-' + ext"/>
                  </parameter>
                </target>
                <target>
                  <context value="e"/>
                  <contextType value="variable"/>
                  <element value="fullUrl"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="https://example/Organization/"/>
                  </parameter>
                  <parameter>
                    <valueId value="uuid1"/>
                  </parameter>
                </target>
                <target>
                  <context value="organization2"/>
                  <contextType value="variable"/>
                  <element value="partOf"/>
                  <variable value="referenceOrg"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="Reference"/>
                  </parameter>
                </target>
                <target>
                  <context value="referenceOrg"/>
                  <contextType value="variable"/>
                  <element value="reference"/>
                  <transform value="append"/>
                  <parameter>
                    <valueString value="https://example/Organization/"/>
                  </parameter>
                  <parameter>
                    <valueId value="uuid1"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
          <rule>
            <name value="id"/>
            <source>
              <context value="wholeOrganization"/>
              <element value="id"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="organization3"/>
              <contextType value="variable"/>
              <element value="identifier"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="name"/>
            <source>
              <context value="wholeOrganization"/>
              <element value="name"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="organization3"/>
              <contextType value="variable"/>
              <element value="name"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="telecom"/>
            <source>
              <context value="wholeOrganization"/>
              <element value="telecom"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="organization3"/>
              <contextType value="variable"/>
              <element value="telecom"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
          <rule>
            <name value="addr"/>
            <source>
              <context value="wholeOrganization"/>
              <element value="addr"/>
              <variable value="vvv"/>
            </source>
            <target>
              <context value="organization3"/>
              <contextType value="variable"/>
              <element value="address"/>
              <variable value="vvv"/>
              <transform value="create"/>
            </target>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="ChExtEprVersionNumber"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="INT"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="ext"/>
      <type value="Extension"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="url"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="ext"/>
        <contextType value="variable"/>
        <element value="url"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="http://hl7.org/fhir/StructureDefinition/composition-clinicaldocument-versionNumber"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="value"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="ext"/>
        <contextType value="variable"/>
        <element value="value"/>
        <transform value="cast"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
        <parameter>
          <valueString value="string"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="ClinicalDocumentOrganization"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="CustodianOrganization"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="Organization"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id"/>
      <source>
        <context value="src"/>
        <element value="id"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="name"/>
      <source>
        <context value="src"/>
        <element value="name"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="name"/>
        <transform value="evaluate"/>
        <parameter>
          <valueString value="v.other"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="telecom"/>
      <source>
        <context value="src"/>
        <element value="telecom"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="telecom"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
    <rule>
      <name value="addr"/>
      <source>
        <context value="src"/>
        <element value="addr"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="address"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
    </rule>
  </group>
</StructureMap>