CDA to FHIR Maps - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
Draft as of 2024-04-11 |
<StructureMap xmlns="http://hl7.org/fhir">
<id value="cda2fhirLabReport"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>map "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirLabReport" = "cda2fhirLabReport"
uses "http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument" alias ClinicalDocument as source
uses "http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor" alias AssignedAuthor as queried
uses "http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity" alias AssignedEntity as queried
uses "http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity" alias AssociatedEntity as queried
uses "http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization" alias CustodianOrganization as queried
uses "http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf" alias OrganizationPartOf as queried
uses "http://hl7.org/fhir/cda/StructureDefinition/Organization" alias rapresentedOrganization as queried
uses "http://hl7.org/fhir/cda/StructureDefinition/Section" alias Section as queried
uses "http://hl7.org/fhir/cda/StructureDefinition/PatientRole" alias PatientRole as queried
uses "http://hl7.org/fhir/cda/StructureDefinition/AD" alias AD as source
uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target
uses "http://hl7.org/fhir/StructureDefinition/Composition" alias Composition as produced
uses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as produced
uses "http://hl7.org/fhir/StructureDefinition/Encounter" alias Encounter as produced
uses "http://hl7.org/fhir/StructureDefinition/Person" alias Patient as produced
uses "http://hl7.org/fhir/StructureDefinition/Practitioner" alias Practitioner as produced
uses "http://hl7.org/fhir/StructureDefinition/Specimen" alias Specimen as produced
uses "http://hl7.org/fhir/StructureDefinition/Procedure" alias Procedure as produced
uses "http://hl7.org/fhir/StructureDefinition/Organization" alias Organization as produced
uses "http://hl7.org/fhir/cda/StructureDefinition/Act" alias Act as produced
uses "http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ" alias IVL_PQ as source
uses "http://hl7.org/fhir/cda/StructureDefinition/PQ" alias PQ as source
uses "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" alias SimpleQuantity as target
uses "http://hl7.org/fhir/cda/StructureDefinition/Organizer" alias Organizer as source
imports "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes"
imports "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader"
group CdaToBundle(source cda : ClinicalDocument, target bundle : Bundle) {
cda -> bundle.entry as e, e.request = create('BackboneElement') as request, request.method = 'POST', e.resource = create('Composition') as composition, composition.id = uuid() as uuid1, e.fullUrl = append('https://example/Composition/', uuid1), request.url = 'Composition', bundle.entry as e2, e2.request = create('BackboneElement') as requestPAT, requestPAT.method = 'PUT', e2.resource = create('Patient') as patient, patient.id = uuid() as uuid2, e2.fullUrl = append('https://example/Patient/', uuid2), bundle.entry as e3, e3.request = create('BackboneElement') as request, request.method = 'POST', e3.resource = create('Encounter') as encounter, encounter.id = uuid() as uuid3, e3.fullUrl = append('https://example/Encounter/', uuid3), request.url = 'Encounter', bundle.entry as e6, e6.request = create('BackboneElement') as request, request.method = 'POST', e6.resource = create('DocumentReference') as DocumentReference, DocumentReference.id = uuid() as uuid6, e6.fullUrl = append('https://example/DocumentReference/', uuid6), request.url = 'DocumentReference' then {
cda then ClinicalDocumentToBundle(cda, patient, composition, encounter, bundle, DocumentReference) "cdatobundle";
cda.recordTarget as recordTarget then {
recordTarget.patientRole as patient then {
patient.id as id -> patient.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext1 -> identifier.value = ext1 "value";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
} "idfr";
patient.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') or (root = '2.16.840.1.113883.2.9.4.3.7') or (root = '2.16.840.1.113883.2.9.4.3.3') or (root = '2.16.840.1.113883.2.9.4.3.17') or (root = '2.16.840.1.113883.2.9.4.3.18') or (root = '2.16.840.1.113883.2.9.2.10.4.1.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1.1') or (root = '2.16.840.1.113883.2.9.2.10.4.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1') or (root = '2.16.840.1.113883.2.9.4.3.15') then {
id.extension as ext -> requestPAT.url = append('Patient?identifier=', ext) "UUID";
} "ext";
} "record";
} "patient";
} "ClinicalDocumentToBody";
}
group ClinicalDocumentToBundle(source cda : ClinicalDocument, target patient : Patient, target composition : Composition, target encounter : Encounter, target bundle : Bundle, target documentreference : DocumentReference) {
cda -> bundle.id = uuid() "id";
cda.id -> bundle.identifier "identifier";
cda -> bundle.type = 'transaction' "type";
cda -> bundle.timestamp = (timestamp.now()) "date";
cda then ClinicalDocumentComposition(cda, composition, patient, encounter, bundle, documentreference) "composition";
cda.component as component then {
component.structuredBody as body then {
body.component as component then {
component.section as srcSection then {
srcSection.code -> composition.section as tgtSection then ClinicalDocumentSection(cda, srcSection, patient, tgtSection, bundle, encounter, documentreference);
};
};
} "body";
};
}
group ClinicalDocumentSection(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter, target documentreference : DocumentReference) {
src.title as t -> tgt.title = (t.dataString);
src.code -> tgt.code;
src.text as cdaText -> tgt.text as fhirText then {
cdaText -> fhirText.status = 'generated' "narrativeStatus";
cdaText as t -> fhirText.div = t "narrativeText";
} "cdaText";
src.entry as entry1 -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('DiagnosticReport') as DiagnosticReport, DiagnosticReport.id = uuid() as uuid1, e1.fullUrl = append('https://example/DiagnosticReport/', uuid1), request.url = 'DiagnosticReport', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/DiagnosticReport/' + %DiagnosticReport.id) then {
entry1.act as act1 then Act(act1, patient, DiagnosticReport, enc, bundle);
};
src.component as component then {
component.section as sec -> tgt.section as tgtSection then ClinicalDocumentSection(cda, sec, patient, tgtSection, bundle, enc, documentreference);
};
}
group Observation(source obs : Observation, target patient : Patient, target encounter : Encounter, target ob : Observation, target bundle : Bundle) {
obs -> ob.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
obs -> ob.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
obs.code -> ob.code;
obs.statusCode as statusc where (code = 'completed') -> ob.status = 'final';
obs.statusCode as statusc where (code = 'active') -> ob.status = 'registered';
obs.statusCode as statusc where (code = 'aborted') -> ob.status = 'cancelled';
obs.statusCode as statusc where (code = 'suspended') -> ob.status = 'partial';
obs.effectiveTime as effectiveTime -> ob.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value2";
obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {
obs.effectiveTime as eff -> ob.effective = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
obs.interpretationCode -> ob.interpretation;
obs.methodCode -> ob.method;
obs.value : INT as int -> ob.value = (int.value);
obs.value : BL as boolean -> ob.value = (boolean.value) "boolean";
obs.value : CE as val then {
val -> ob.value = create('CodeableConcept') as ce then {
val.originalText as originalText then {
originalText.reference as reference -> ce.text = reference;
} "originltext";
val -> ce.coding as coding then {
val.code as code -> coding.code = cast(code, 'string');
val.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
val.displayName as display -> coding.display = cast(display, 'string');
val.codeSystemVersion as version -> coding.version = cast(version, 'string');
} "code";
val.translation as translation -> ce.coding as coding then {
translation.code as code -> coding.code = cast(code, 'string');
translation.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
translation.displayName as display -> coding.display = cast(display, 'string');
translation.codeSystemVersion as version -> coding.version = cast(version, 'string');
translation.qualifier as qualifier then {
qualifier.value as value -> ce.coding as coding then {
value.code as code -> coding.code = cast(code, 'string');
value.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
value.displayName as display -> coding.display = cast(display, 'string');
value.codeSystemVersion as version -> coding.version = cast(version, 'string');
};
};
};
} "coding";
} "val";
obs.value : CD as val then {
val -> ob.value = create('CodeableConcept') as ce then {
val.originalText as originalText then {
originalText.reference as reference -> ce.text = reference;
} "originltext";
val -> ce.coding as coding then {
val.code as code -> coding.code = cast(code, 'string');
val.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
val.displayName as display -> coding.display = cast(display, 'string');
val.codeSystemVersion as version -> coding.version = cast(version, 'string');
} "code";
val.translation as translation -> ce.coding as coding then {
translation.code as code -> coding.code = cast(code, 'string');
translation.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
translation.displayName as display -> coding.display = cast(display, 'string');
translation.codeSystemVersion as version -> coding.version = cast(version, 'string');
translation.qualifier as qualifier then {
qualifier.value as value -> ce.coding as coding then {
value.code as code -> coding.code = cast(code, 'string');
value.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
value.displayName as display -> coding.display = cast(display, 'string');
value.codeSystemVersion as version -> coding.version = cast(version, 'string');
};
};
};
} "coding";
} "val";
obs.value : PQ as val then {
val -> ob.value = create('Quantity') as quantity then {
val.value as value -> quantity.value = value;
val.unit as unit -> quantity.unit = unit;
} "quantity";
} "valueQuantity";
obs.value : ST as value -> ob.value = create('string'), ob.value = (value.dataString);
// Note e commenti
obs.entryRelationship as entryRelationship then {
entryRelationship.act as act then {
act.text as text then {
text.reference as reference -> ob.note as note then {
reference -> note.text = (reference.value) "reference";
};
};
} "Act";
};
// subject
obs.subject as sbj then {
sbj.relatedSubject as relatedSubj -> patient.extension as extension2 then ExtSubjectAnimal(relatedSubj, extension2);
};
// performer
obs.performer as performer -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid1, e1.fullUrl = append('https://example/PractitionerRole/', uuid1), request.url = 'PractitionerRole' then {
performer -> ob.performer = create('Reference') as reference, reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
performer.assignedEntity as entity then {
entity.code -> practitionerRole.code;
entity -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'PUT', e2.resource = create('Practitioner') as practitioner then {
entity -> practitioner.meta as meta then {
entity -> meta.tag = create('Coding') as coding then {
entity -> coding.system = 'http://algoritmodiscoring' "system";
entity -> coding.code = 'ClinicalDocument/body/observation/performer' "code";
} "coding";
} "meta";
entity.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
entity -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "performer";
} "r";
} "identifier";
entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "2";
entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "diverso";
entity.addr -> practitioner.address;
entity.telecom -> practitioner.telecom;
entity.assignedPerson as person then {
person.name -> practitioner.name;
person.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
// organization
entity.representedOrganization as representedOrganization -> bundle.entry as e3, e3.request = create('BackboneElement') as request, request.method = 'PUT', e3.resource = create('Organization') as organization then {
representedOrganization -> organization.meta as meta then {
representedOrganization -> meta.tag = create('Coding') as coding then {
representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";
representedOrganization -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization' "code";
} "coding";
} "meta";
representedOrganization.id as id -> organization.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "aut";
} "r";
} "identifier";
representedOrganization.name as v -> organization.name = (v.other);
representedOrganization.telecom -> organization.telecom;
representedOrganization.addr -> organization.address;
representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e4, e4.request = create('BackboneElement') as request, e4.resource = create('Organization') as organization1, request.method = 'PUT' then {
OrgPartOf -> organization1.meta as meta then {
OrgPartOf -> meta.tag = create('Coding') as coding then {
OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";
OrgPartOf -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf' "code";
} "coding";
} "meta";
OrgPartOf.id as id -> organization1.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "org";
} "r";
} "identifier";
OrgPartOf.code -> organization1.type;
OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';
OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'PUT', e5.resource = create('Organization') as organization2 then {
wholeOrgan -> organization2.meta as meta then {
wholeOrgan -> meta.tag = create('Coding') as coding then {
wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";
wholeOrgan -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization' "code";
} "coding";
} "meta";
wholeOrgan.id as id -> organization2.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization2.id = (r + '-' + ext) as uuid5, e5.fullUrl = append('https://example/Organization/', uuid5), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";
} "r";
} "identifier";
wholeOrgan.name as v -> organization2.name = (v.other);
wholeOrgan.telecom -> organization2.telecom;
wholeOrgan.addr -> organization2.address;
};
} "OrgPartOf";
};
} "practitioner";
} "entity";
} "practitionerRole";
};
// author
obs.author as srcAuthor -> bundle.entry as e6, e6.request = create('BackboneElement') as request, request.method = 'POST', e6.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid6, e6.fullUrl = append('https://example/PractitionerRole/', uuid6), request.url = 'PractitionerRole', ob.performer = create('Reference') as referenceaut, referenceaut.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
srcAuthor.assignedAuthor as assignedAuthor then {
assignedAuthor.code as codice -> practitionerRole.code as code2 then CECodeableConcept(codice, code2);
assignedAuthor -> bundle.entry as e7, e7.request = create('BackboneElement') as request, request.method = 'PUT', e7.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid7 then {
srcAuthor.functionCode -> practitionerRole.code;
assignedAuthor -> practitioner.meta as meta then {
assignedAuthor -> meta.tag = create('Coding') as coding then {
assignedAuthor -> coding.system = 'http://algoritmodiscoring' "system";
assignedAuthor -> coding.code = 'ClinicalDocument/body/observation/author' "code";
} "coding";
} "meta";
assignedAuthor.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
assignedAuthor -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "aut";
} "r";
assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "2";
assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "diverso";
} "identifier";
assignedAuthor.addr -> practitioner.address;
assignedAuthor.telecom -> practitioner.telecom;
// person
assignedAuthor.assignedPerson as person then {
person.name -> practitioner.name;
person.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
} "ASSAUth";
// organization
assignedAuthor.representedOrganization as representedOrganization -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'PUT', e8.resource = create('Organization') as organization then {
representedOrganization -> organization.meta as meta then {
representedOrganization -> meta.tag = create('Coding') as coding then {
representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";
representedOrganization -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization' "code";
} "coding";
} "meta";
representedOrganization.id as id -> organization.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "org";
} "r";
} "identifier";
representedOrganization.name as v -> organization.name = (v.other);
representedOrganization.telecom -> organization.telecom;
representedOrganization.addr -> organization.address;
representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'PUT', e9.resource = create('Organization') as organization1 then {
OrgPartOf -> organization1.meta as meta then {
OrgPartOf -> meta.tag = create('Coding') as coding then {
OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";
OrgPartOf -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf' "code";
} "coding";
} "meta";
OrgPartOf.id as id -> organization1.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "org";
} "r";
} "identifier";
OrgPartOf.code -> organization1.type;
OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';
OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e10, e10.request = create('BackboneElement') as request, request.method = 'PUT', e10.resource = create('Organization') as organization2 then {
wholeOrgan -> organization2.meta as meta then {
wholeOrgan -> meta.tag = create('Coding') as coding then {
wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";
wholeOrgan -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";
} "coding";
} "meta";
wholeOrgan.id as id -> organization2.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization2.id = (r + '-' + ext) as uuid4, e10.fullUrl = append('https://example/Organization/', uuid4), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";
} "r";
} "identifier";
wholeOrgan.name as v -> organization2.name = (v.other);
wholeOrgan.telecom -> organization2.telecom;
wholeOrgan.addr -> organization2.address;
};
} "OrgPartOf";
};
// device
assignedAuthor.assignedAuthoringDevice as assignedAuthoringDevice -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'POST', e11.resource = create('Device') as device, device.id = uuid() as uuid11, e11.fullUrl = append('https://example/Device/', uuid11), request.url = 'Device', tgt.author = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {
assignedAuthoringDevice.templateId -> device.identifier;
assignedAuthoringDevice.code -> device.type;
assignedAuthoringDevice.manufacturerModelName as manufacturerModelName then {
manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";
} "manufacturer";
assignedAuthoringDevice.softwareName as softwareName -> device.deviceName as deviceName then {
softwareName -> deviceName.type = 'other' "typeName";
softwareName as s -> deviceName.name = (s.displayName) "name";
} "deviceName";
} "Device";
};
};
// participant person
obs.participant as participant where (typeCode != 'DEV') -> ob.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) then {
participant -> encounter.participant as FhirParticipant then {
participant as p -> FhirParticipant.type as type then {
p -> type.coding as coding then {
p -> coding.code = (p.typeCode) "codice";
p -> coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' "system";
} "codeType";
} "type";
} "fhirParticipant";
participant.participantRole as participantRole -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid12, e12.fullUrl = append('https://example/PractitionerRole/', uuid12), request.url = 'PractitionerRole', encounter.participant = create('BackboneElement') as participant1, participant1.individual = create('Reference') as referencepart, referencepart.reference = ('https://example/Practitioner/' + %practitionerRole.id) then {
// participant.time -> participant1.period;
participant.time as time1 -> participant1.period = create('Period') as period then {
time1 -> period.start = create('dateTime') as start then TSDateTime(time1, start) "val";
};
participant.time as time1 -> participant1.period = create('Period') as period then IVLTSPeriod(time1, period);
participant.functionCode -> practitionerRole.code;
// non mappa i 2 precedenti
participantRole -> bundle.entry as e13, e13.request = create('BackboneElement') as request, request.method = 'PUT', e13.resource = create('Practitioner') as practitioner then {
participantRole -> practitioner.meta as meta then {
participantRole -> meta.tag = create('Coding') as coding then {
participantRole -> coding.system = 'http://algoritmodiscoring' "system";
participantRole -> coding.code = 'ClinicalDocument/body/observation/participant' "code";
} "coding";
} "meta";
participantRole.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
participantRole -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid4, e13.fullUrl = append('https://example/Practitioner/', uuid4), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "org";
} "r";
} "identifier";
participantRole.code -> practitionerRole.code;
participantRole.addr -> practitioner.address;
participantRole.telecom -> practitioner.telecom;
participantRole.playingEntity as playingEntity then {
playingEntity.name -> practitioner.name;
playingEntity.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
} "practitioner";
} "partRole";
} "participantEncounter";
// participant device
obs.participant as devParticipant where (typeCode = 'DEV') -> bundle.entry as e14, e14.request = create('BackboneElement') as request, request.method = 'POST', e14.resource = create('Device') as device, device.id = uuid() as uuid14, e14.fullUrl = append('https://example/Device/', uuid14), request.url = 'Device', ob.device = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {
devParticipant.participantRole as participantRoleDev then {
participantRoleDev.playingDevice as playingDevice then {
playingDevice.code -> device.type;
playingDevice.manufacturerModelName as manufacturerModelName then {
manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";
} "manufacturer";
playingDevice.softwareName as softwareName -> device.deviceName as deviceName then {
softwareName -> deviceName.type = 'other' "typeName";
softwareName as s -> deviceName.name = (s.displayName) "name";
} "deviceName";
};
} "participantRoleDev";
} "devParticipant";
// observationMedia
obs.entryRelationship as er then {
er.observationMedia as obsMedia -> bundle.entry as e15, e15.request = create('BackboneElement') as request, request.method = 'POST', e15.resource = create('Media') as media1, media1.id = uuid() as uuid15, e15.fullUrl = append('https://example/Media/', uuid15), request.url = 'Media', ob.derivedFrom = create('Reference') as reference, reference.reference = ('https://example/Media/' + %media1.id) then {
obsMedia -> media1.content = create('Attachment') as Attachment then {
obsMedia -> media1.status = 'unknown' "status";
obsMedia.value as valueMedia then {
valueMedia.mediaType as type -> Attachment.contentType = type "type";
valueMedia -> Attachment.data = (valueMedia.dataBase64Binary) "data";
} "valuemedia";
} "Attachment";
} "media";
} "observationMedia";
// referenceRange
obs.referenceRange as refRange -> ob.referenceRange = create('BackboneElement') as ref then {
refRange.observationRange as obsRange then {
obsRange.value : ST as value -> ref.text = create('string'), ref.text = (value.dataString);
obsRange -> ref.low = create('Quantity') as Low then {
obsRange.value : IVL_PQ as v then {
v.low as l1 then {
l1.value as decValue -> Low.value = decValue;
l1.unit as Unit -> Low.unit = Unit;
} "decValue";
v -> ref.high = create('Quantity') as high then {
v.high as h1 then {
h1.value as decValue1 -> high.value = decValue1;
h1.unit as Unit1 -> high.unit = Unit1;
} "decValue";
} "high";
} "IVL-PQ";
obsRange.interpretationCode -> ref.type;
obsRange.precondition as precondition then {
precondition.criterion as criterion then {
criterion.code -> ref.appliesTo "appliesTo";
criterion.value : IVL_PQ as v then {
v.high as l1 then {
l1 -> ref.age = create('Quantity') as age then {
l1 -> age.high as high then {
l1.value as decValue -> high.value = decValue;
l1.unit as Unit1 -> high.unit = Unit1;
} "high";
} "age";
} "low";
} "v";
};
};
} "obsRange";
} "refRange";
} "ref";
}
group Observation2(source obs : Observation, target patient : Patient, target encounter : Encounter, target ob : Observation, target bundle : Bundle, source cda : Act, target specimenp : Specimen) {
obs -> ob.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
obs -> ob.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
obs.code -> ob.code;
obs.statusCode as statusc where (code = 'completed') -> ob.status = 'final';
obs.statusCode as statusc where (code = 'active') -> ob.status = 'registered';
obs.statusCode as statusc where (code = 'aborted') -> ob.status = 'cancelled';
obs.statusCode as statusc where (code = 'suspended') -> ob.status = 'partial';
obs.effectiveTime as effectiveTime -> ob.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value2";
obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {
obs.effectiveTime as eff -> ob.effective = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
obs.interpretationCode -> ob.interpretation;
obs.methodCode -> ob.method;
obs.value : INT as int -> ob.value = (int.value);
obs.value : BL as boolean -> ob.value = (boolean.value) "boolean";
obs.value : CE as val then {
val -> ob.value = create('CodeableConcept') as ce then {
val.originalText as originalText then {
originalText.reference as reference -> ce.text = reference;
} "originltext";
val -> ce.coding as coding then {
val.code as code -> coding.code = cast(code, 'string');
val.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
val.displayName as display -> coding.display = cast(display, 'string');
val.codeSystemVersion as version -> coding.version = cast(version, 'string');
} "code";
val.translation as translation -> ce.coding as coding then {
translation.code as code -> coding.code = cast(code, 'string');
translation.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
translation.displayName as display -> coding.display = cast(display, 'string');
translation.codeSystemVersion as version -> coding.version = cast(version, 'string');
translation.qualifier as qualifier then {
qualifier.value as value -> ce.coding as coding then {
value.code as code -> coding.code = cast(code, 'string');
value.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
value.displayName as display -> coding.display = cast(display, 'string');
value.codeSystemVersion as version -> coding.version = cast(version, 'string');
};
};
};
} "coding";
} "val";
obs.value : PQ as val then {
val -> ob.value = create('Quantity') as quantity then {
val.value as value -> quantity.value = value;
val.unit as unit -> quantity.unit = unit;
} "quantity";
} "valueQuantity";
obs.value : ST as value -> ob.value = create('string'), ob.value = (value.dataString);
// Note e commenti
obs.entryRelationship as entryRelationship then {
entryRelationship.act as act then {
act.text as text then {
text.reference as reference -> ob.note as note then {
reference -> note.text = (reference.value) "reference";
};
};
} "Act";
};
// subject
obs.subject as sbj then {
sbj.relatedSubject as relatedSubj -> patient.extension as extension2 then ExtSubjectAnimal(relatedSubj, extension2);
};
cda where cda.entryRelationship.act.exists() then {
// specimen
obs.specimen as spmn then {
spmn.specimenRole as specimenRole then {
specimenRole.id as id then {
id.extension as extobs then {
cda.entryRelationship as entryRelationship then {
entryRelationship.act as a then {
a.specimen as sp then {
sp.specimenRole as spr then {
spr.id where (extension = extobs) -> bundle.entry as e4o, e4o.request = create('BackboneElement') as request, request.method = 'POST', e4o.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4o, e4o.fullUrl = append('https://example/Specimen/', uuid4o), request.url = 'Specimen', ob.specimen = create('Reference') as reference, reference.reference = ('https://example/Specimen/' + %specimen.id) then {
spr -> specimen.parent = create('Reference') as reference, reference.reference = ('https://example/Specimen/' + %specimenp.id) "reference";
spr.id -> specimen.identifier;
specimenRole.specimenPlayingEntity as spent then {
spent.code -> specimen.type;
} "ent";
spr.specimenPlayingEntity as specimenPlayingEntity then {
specimenPlayingEntity.code -> specimen.type;
};
a -> specimen.collection = create('BackboneElement') as collection then {
a.effectiveTime as effectivetime -> collection.collected = create('dateTime') as value then TSDateTime(effectivetime, value) "value";
a where effectiveTime.low.exists() or effectiveTime.high.exists() then {
a.effectiveTime as eff -> collection.collected = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
a.participant as participant -> bundle.entry as e10, e10.request = create('BackboneElement') as request, request.method = 'PUT', e10.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid11, e10.fullUrl = append('https://example/Practitioner/', uuid11), collection.collector = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) then {
participant.participantRole as participantRole then {
participantRole -> practitioner.meta as meta then {
participantRole -> meta.tag = create('Coding') as coding then {
participantRole -> coding.system = 'http://algoritmodiscoring' "system";
participantRole -> coding.code = 'ClinicalDocument/body/act/participant' "code";
} "coding";
} "meta";
participantRole.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
participantRole -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
} "identifier";
participantRole.addr -> practitioner.address;
participantRole.playingEntity as playingEntity then {
playingEntity.name -> practitioner.name;
};
};
};
} "collection";
} "cont";
} "spr";
} "sp";
} "a";
} "en";
} "extobs";
};
};
};
} "conditionactexists";
cda where cda.entryRelationship.act.exists().not() and (obs.specimen.specimenRole.specimenPlayingEntity.code.code != specimenp.type.coding.code) then {
obs.specimen as spmn -> bundle.entry as e4o, e4o.request = create('BackboneElement') as request, request.method = 'POST', e4o.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4o, e4o.fullUrl = append('https://example/Specimen/', uuid4o), request.url = 'Specimen', ob.specimen = create('Reference') as reference, reference.reference = ('https://example/Specimen/' + %specimen.id) then {
spmn.specimenRole as specimenRole then {
specimenRole.id -> specimen.identifier;
specimenRole.specimenPlayingEntity as specimenPlayingEntity then {
specimenPlayingEntity.code -> specimen.type;
};
};
};
} "wherenotexists";
// performer
obs.performer as performer -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid1, e1.fullUrl = append('https://example/PractitionerRole/', uuid1), request.url = 'PractitionerRole' then {
performer -> ob.performer = create('Reference') as reference, reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
performer.assignedEntity as entity then {
entity.code -> practitionerRole.code;
entity -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'PUT', e2.resource = create('Practitioner') as practitioner then {
entity -> practitioner.meta as meta then {
entity -> meta.tag = create('Coding') as coding then {
entity -> coding.system = 'http://algoritmodiscoring' "system";
entity -> coding.code = 'ClinicalDocument/body/observation/performer' "code";
} "coding";
} "meta";
entity.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
entity -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "performer";
} "r";
} "identifier";
entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "2";
entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "diverso";
entity.addr -> practitioner.address;
entity.telecom -> practitioner.telecom;
entity.assignedPerson as person then {
person.name -> practitioner.name;
person.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
// organization
entity.representedOrganization as representedOrganization -> bundle.entry as e3, e3.request = create('BackboneElement') as request, request.method = 'PUT', e3.resource = create('Organization') as organization then {
representedOrganization -> organization.meta as meta then {
representedOrganization -> meta.tag = create('Coding') as coding then {
representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";
representedOrganization -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization' "code";
} "coding";
} "meta";
representedOrganization.id as id -> organization.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "aut";
} "r";
} "identifier";
representedOrganization.name as v -> organization.name = (v.other);
representedOrganization.telecom -> organization.telecom;
representedOrganization.addr -> organization.address;
representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e4, e4.request = create('BackboneElement') as request, e4.resource = create('Organization') as organization1, request.method = 'PUT' then {
OrgPartOf -> organization1.meta as meta then {
OrgPartOf -> meta.tag = create('Coding') as coding then {
OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";
OrgPartOf -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf' "code";
} "coding";
} "meta";
OrgPartOf.id as id -> organization1.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "org";
} "r";
} "identifier";
OrgPartOf.code -> organization1.type;
OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';
OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'PUT', e5.resource = create('Organization') as organization2 then {
wholeOrgan -> organization2.meta as meta then {
wholeOrgan -> meta.tag = create('Coding') as coding then {
wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";
wholeOrgan -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization' "code";
} "coding";
} "meta";
wholeOrgan.id as id -> organization2.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization2.id = (r + '-' + ext) as uuid5, e5.fullUrl = append('https://example/Organization/', uuid5), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";
} "r";
} "identifier";
wholeOrgan.name as v -> organization2.name = (v.other);
wholeOrgan.telecom -> organization2.telecom;
wholeOrgan.addr -> organization2.address;
};
} "OrgPartOf";
};
} "practitioner";
} "entity";
} "practitionerRole";
};
// author
obs.author as srcAuthor -> bundle.entry as e6, e6.request = create('BackboneElement') as request, request.method = 'POST', e6.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid6, e6.fullUrl = append('https://example/PractitionerRole/', uuid6), request.url = 'PractitionerRole', ob.performer = create('Reference') as referenceaut, referenceaut.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
srcAuthor.assignedAuthor as assignedAuthor then {
assignedAuthor.code as codice -> practitionerRole.code as code2 then CECodeableConcept(codice, code2);
assignedAuthor -> bundle.entry as e7, e7.request = create('BackboneElement') as request, request.method = 'PUT', e7.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid7 then {
srcAuthor.functionCode -> practitionerRole.code;
assignedAuthor -> practitioner.meta as meta then {
assignedAuthor -> meta.tag = create('Coding') as coding then {
assignedAuthor -> coding.system = 'http://algoritmodiscoring' "system";
assignedAuthor -> coding.code = 'ClinicalDocument/body/observation/author' "code";
} "coding";
} "meta";
assignedAuthor.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
assignedAuthor -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "aut";
} "r";
assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "2";
assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "diverso";
} "identifier";
assignedAuthor.addr -> practitioner.address;
assignedAuthor.telecom -> practitioner.telecom;
// person
assignedAuthor.assignedPerson as person then {
person.name -> practitioner.name;
person.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
} "ASSAUth";
// organization
assignedAuthor.representedOrganization as representedOrganization -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'PUT', e8.resource = create('Organization') as organization then {
representedOrganization -> organization.meta as meta then {
representedOrganization -> meta.tag = create('Coding') as coding then {
representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";
representedOrganization -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization' "code";
} "coding";
} "meta";
representedOrganization.id as id -> organization.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "org";
} "r";
} "identifier";
representedOrganization.name as v -> organization.name = (v.other);
representedOrganization.telecom -> organization.telecom;
representedOrganization.addr -> organization.address;
representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'PUT', e9.resource = create('Organization') as organization1 then {
OrgPartOf -> organization1.meta as meta then {
OrgPartOf -> meta.tag = create('Coding') as coding then {
OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";
OrgPartOf -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf' "code";
} "coding";
} "meta";
OrgPartOf.id as id -> organization1.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "org";
} "r";
} "identifier";
OrgPartOf.code -> organization1.type;
OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';
OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e10, e10.request = create('BackboneElement') as request, request.method = 'PUT', e10.resource = create('Organization') as organization2 then {
wholeOrgan -> organization2.meta as meta then {
wholeOrgan -> meta.tag = create('Coding') as coding then {
wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";
wholeOrgan -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";
} "coding";
} "meta";
wholeOrgan.id as id -> organization2.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization2.id = (r + '-' + ext) as uuid4, e10.fullUrl = append('https://example/Organization/', uuid4), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";
} "r";
} "identifier";
wholeOrgan.name as v -> organization2.name = (v.other);
wholeOrgan.telecom -> organization2.telecom;
wholeOrgan.addr -> organization2.address;
};
} "OrgPartOf";
};
// device
assignedAuthor.assignedAuthoringDevice as assignedAuthoringDevice -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'POST', e11.resource = create('Device') as device, device.id = uuid() as uuid11, e11.fullUrl = append('https://example/Device/', uuid11), request.url = 'Device', tgt.author = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {
assignedAuthoringDevice.templateId -> device.identifier;
assignedAuthoringDevice.code -> device.type;
assignedAuthoringDevice.manufacturerModelName as manufacturerModelName then {
manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";
} "manufacturer";
assignedAuthoringDevice.softwareName as softwareName -> device.deviceName as deviceName then {
softwareName -> deviceName.type = 'other' "typeName";
softwareName as s -> deviceName.name = (s.displayName) "name";
} "deviceName";
} "Device";
};
};
// participant person
obs.participant as participant where (typeCode != 'DEV') -> ob.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) then {
participant -> encounter.participant as FhirParticipant then {
participant as p -> FhirParticipant.type as type then {
p -> type.coding as coding then {
p -> coding.code = (p.typeCode) "codice";
p -> coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' "system";
} "codeType";
} "type";
} "fhirParticipant";
participant.participantRole as participantRole -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid12, e12.fullUrl = append('https://example/PractitionerRole/', uuid12), request.url = 'PractitionerRole', encounter.participant = create('BackboneElement') as participant1, participant1.individual = create('Reference') as referencepart, referencepart.reference = ('https://example/Practitioner/' + %practitionerRole.id) then {
// participant.time -> participant1.period;
participant.time as time1 -> participant1.period = create('Period') as period then {
time1 -> period.start = create('dateTime') as start then TSDateTime(time1, start) "val";
};
participant.time as time1 -> participant1.period = create('Period') as period then IVLTSPeriod(time1, period);
participant.functionCode -> practitionerRole.code;
// non mappa i 2 precedenti
participantRole -> bundle.entry as e13, e13.request = create('BackboneElement') as request, request.method = 'PUT', e13.resource = create('Practitioner') as practitioner then {
participantRole -> practitioner.meta as meta then {
participantRole -> meta.tag = create('Coding') as coding then {
participantRole -> coding.system = 'http://algoritmodiscoring' "system";
participantRole -> coding.code = 'ClinicalDocument/body/observation/participant' "code";
} "coding";
} "meta";
participantRole.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
participantRole -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid4, e13.fullUrl = append('https://example/Practitioner/', uuid4), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "org";
} "r";
} "identifier";
participantRole.code -> practitionerRole.code;
participantRole.addr -> practitioner.address;
participantRole.telecom -> practitioner.telecom;
participantRole.playingEntity as playingEntity then {
playingEntity.name -> practitioner.name;
playingEntity.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
} "practitioner";
} "partRole";
} "participantEncounter";
// participant device
obs.participant as devParticipant where (typeCode = 'DEV') -> bundle.entry as e14, e14.request = create('BackboneElement') as request, request.method = 'POST', e14.resource = create('Device') as device, device.id = uuid() as uuid14, e14.fullUrl = append('https://example/Device/', uuid14), request.url = 'Device', ob.device = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {
devParticipant.participantRole as participantRoleDev then {
participantRoleDev.playingDevice as playingDevice then {
playingDevice.code -> device.type;
playingDevice.manufacturerModelName as manufacturerModelName then {
manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";
} "manufacturer";
playingDevice.softwareName as softwareName -> device.deviceName as deviceName then {
softwareName -> deviceName.type = 'other' "typeName";
softwareName as s -> deviceName.name = (s.displayName) "name";
} "deviceName";
};
} "participantRoleDev";
} "devParticipant";
// observationMedia
obs.entryRelationship as er then {
er.observationMedia as obsMedia -> bundle.entry as e15, e15.request = create('BackboneElement') as request, request.method = 'POST', e15.resource = create('Media') as media1, media1.id = uuid() as uuid15, e15.fullUrl = append('https://example/Media/', uuid15), request.url = 'Media', ob.derivedFrom = create('Reference') as reference, reference.reference = ('https://example/Media/' + %media1.id) then {
obsMedia -> media1.content = create('Attachment') as Attachment then {
obsMedia -> media1.status = 'unknown' "status";
obsMedia.value as valueMedia then {
valueMedia.mediaType as type -> Attachment.contentType = type "type";
valueMedia -> Attachment.data = (valueMedia.dataBase64Binary) "data";
} "valuemedia";
} "Attachment";
} "media";
} "observationMedia";
// referenceRange
obs.referenceRange as refRange -> ob.referenceRange = create('BackboneElement') as ref then {
refRange.observationRange as obsRange then {
obsRange.value : ST as value -> ref.text = create('string'), ref.text = (value.dataString);
obsRange -> ref.low = create('Quantity') as Low then {
obsRange.value : IVL_PQ as v then {
v.low as l1 then {
l1.value as decValue -> Low.value = decValue;
l1.unit as Unit -> Low.unit = Unit;
} "decValue";
v -> ref.high = create('Quantity') as high then {
v.high as h1 then {
h1.value as decValue1 -> high.value = decValue1;
h1.unit as Unit1 -> high.unit = Unit1;
} "decValue";
} "high";
} "IVL-PQ";
obsRange.interpretationCode -> ref.type;
obsRange.precondition as precondition then {
precondition.criterion as criterion then {
criterion.code -> ref.appliesTo "appliesTo";
criterion.value : IVL_PQ as v then {
v.high as l1 then {
l1 -> ref.age = create('Quantity') as age then {
l1 -> age.high as high then {
l1.value as decValue -> high.value = decValue;
l1.unit as Unit1 -> high.unit = Unit1;
} "high";
} "age";
} "low";
} "v";
};
};
} "obsRange";
} "refRange";
} "ref";
}
group Observation3(source obs : Observation, target patient : Patient, target encounter : Encounter, target ob : Observation, target bundle : Bundle, source cda : Act) {
obs -> ob.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
obs -> ob.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
obs.code -> ob.code;
obs.statusCode as statusc where (code = 'completed') -> ob.status = 'final';
obs.statusCode as statusc where (code = 'active') -> ob.status = 'registered';
obs.statusCode as statusc where (code = 'aborted') -> ob.status = 'cancelled';
obs.statusCode as statusc where (code = 'suspended') -> ob.status = 'partial';
obs.effectiveTime as effectiveTime -> ob.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value2";
obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {
obs.effectiveTime as eff -> ob.effective = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
obs.interpretationCode -> ob.interpretation;
obs.methodCode -> ob.method;
obs.value : INT as int -> ob.value = (int.value);
obs.value : BL as boolean -> ob.value = (boolean.value) "boolean";
obs.value : CE as val then {
val -> ob.value = create('CodeableConcept') as ce then {
val.originalText as originalText then {
originalText.reference as reference -> ce.text = reference;
} "originltext";
val -> ce.coding as coding then {
val.code as code -> coding.code = cast(code, 'string');
val.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
val.displayName as display -> coding.display = cast(display, 'string');
val.codeSystemVersion as version -> coding.version = cast(version, 'string');
} "code";
val.translation as translation -> ce.coding as coding then {
translation.code as code -> coding.code = cast(code, 'string');
translation.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
translation.displayName as display -> coding.display = cast(display, 'string');
translation.codeSystemVersion as version -> coding.version = cast(version, 'string');
translation.qualifier as qualifier then {
qualifier.value as value -> ce.coding as coding then {
value.code as code -> coding.code = cast(code, 'string');
value.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
value.displayName as display -> coding.display = cast(display, 'string');
value.codeSystemVersion as version -> coding.version = cast(version, 'string');
};
};
};
} "coding";
} "val";
obs.value : PQ as val then {
val -> ob.value = create('Quantity') as quantity then {
val.value as value -> quantity.value = value;
val.unit as unit -> quantity.unit = unit;
} "quantity";
} "valueQuantity";
obs.value : ST as value -> ob.value = create('string'), ob.value = (value.dataString);
// Note e commenti
obs.entryRelationship as entryRelationship then {
entryRelationship.act as act then {
act.text as text then {
text.reference as reference -> ob.note as note then {
reference -> note.text = (reference.value) "reference";
};
};
} "Act";
};
// subject
obs.subject as sbj then {
sbj.relatedSubject as relatedSubj -> patient.extension as extension2 then ExtSubjectAnimal(relatedSubj, extension2);
};
// specimen
obs.specimen as spmn -> bundle.entry as e4o, e4o.request = create('BackboneElement') as request, request.method = 'POST', e4o.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4o, e4o.fullUrl = append('https://example/Specimen/', uuid4o), request.url = 'Specimen', ob.specimen = create('Reference') as reference, reference.reference = ('https://example/Specimen/' + %specimen.id) then {
spmn.specimenRole as specimenRole then {
specimenRole.id as id -> specimen.identifier;
specimenRole.specimenPlayingEntity as specimenPlayingEntity then {
specimenPlayingEntity.code -> specimen.type;
};
};
};
// performer
obs.performer as performer -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid1, e1.fullUrl = append('https://example/PractitionerRole/', uuid1), request.url = 'PractitionerRole' then {
performer -> ob.performer = create('Reference') as reference, reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
performer.assignedEntity as entity then {
entity.code -> practitionerRole.code;
entity -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'PUT', e2.resource = create('Practitioner') as practitioner then {
entity -> practitioner.meta as meta then {
entity -> meta.tag = create('Coding') as coding then {
entity -> coding.system = 'http://algoritmodiscoring' "system";
entity -> coding.code = 'ClinicalDocument/body/observation/performer' "code";
} "coding";
} "meta";
entity.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
entity -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "performer";
} "r";
} "identifier";
entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "2";
entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "diverso";
entity.addr -> practitioner.address;
entity.telecom -> practitioner.telecom;
entity.assignedPerson as person then {
person.name -> practitioner.name;
person.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
// organization
entity.representedOrganization as representedOrganization -> bundle.entry as e3, e3.request = create('BackboneElement') as request, request.method = 'PUT', e3.resource = create('Organization') as organization then {
representedOrganization -> organization.meta as meta then {
representedOrganization -> meta.tag = create('Coding') as coding then {
representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";
representedOrganization -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization' "code";
} "coding";
} "meta";
representedOrganization.id as id -> organization.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "aut";
} "r";
} "identifier";
representedOrganization.name as v -> organization.name = (v.other);
representedOrganization.telecom -> organization.telecom;
representedOrganization.addr -> organization.address;
representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e4, e4.request = create('BackboneElement') as request, e4.resource = create('Organization') as organization1, request.method = 'PUT' then {
OrgPartOf -> organization1.meta as meta then {
OrgPartOf -> meta.tag = create('Coding') as coding then {
OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";
OrgPartOf -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/asOrganizationPartOf' "code";
} "coding";
} "meta";
OrgPartOf.id as id -> organization1.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "org";
} "r";
} "identifier";
OrgPartOf.code -> organization1.type;
OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';
OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'PUT', e5.resource = create('Organization') as organization2 then {
wholeOrgan -> organization2.meta as meta then {
wholeOrgan -> meta.tag = create('Coding') as coding then {
wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";
wholeOrgan -> coding.code = 'ClinicalDocument/body/observation/performer/representedOrganization/wholeOrganization' "code";
} "coding";
} "meta";
wholeOrgan.id as id -> organization2.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization2.id = (r + '-' + ext) as uuid5, e5.fullUrl = append('https://example/Organization/', uuid5), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";
} "r";
} "identifier";
wholeOrgan.name as v -> organization2.name = (v.other);
wholeOrgan.telecom -> organization2.telecom;
wholeOrgan.addr -> organization2.address;
};
} "OrgPartOf";
};
} "practitioner";
} "entity";
} "practitionerRole";
};
// author
obs.author as srcAuthor -> bundle.entry as e6, e6.request = create('BackboneElement') as request, request.method = 'POST', e6.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid6, e6.fullUrl = append('https://example/PractitionerRole/', uuid6), request.url = 'PractitionerRole', ob.performer = create('Reference') as referenceaut, referenceaut.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
srcAuthor.assignedAuthor as assignedAuthor then {
assignedAuthor.code as codice -> practitionerRole.code as code2 then CECodeableConcept(codice, code2);
assignedAuthor -> bundle.entry as e7, e7.request = create('BackboneElement') as request, request.method = 'PUT', e7.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid7 then {
srcAuthor.functionCode -> practitionerRole.code;
assignedAuthor -> practitioner.meta as meta then {
assignedAuthor -> meta.tag = create('Coding') as coding then {
assignedAuthor -> coding.system = 'http://algoritmodiscoring' "system";
assignedAuthor -> coding.code = 'ClinicalDocument/body/observation/author' "code";
} "coding";
} "meta";
assignedAuthor.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
assignedAuthor -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "aut";
} "r";
assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "2";
assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "diverso";
} "identifier";
assignedAuthor.addr -> practitioner.address;
assignedAuthor.telecom -> practitioner.telecom;
// person
assignedAuthor.assignedPerson as person then {
person.name -> practitioner.name;
person.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
} "ASSAUth";
// organization
assignedAuthor.representedOrganization as representedOrganization -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'PUT', e8.resource = create('Organization') as organization then {
representedOrganization -> organization.meta as meta then {
representedOrganization -> meta.tag = create('Coding') as coding then {
representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";
representedOrganization -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization' "code";
} "coding";
} "meta";
representedOrganization.id as id -> organization.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "org";
} "r";
} "identifier";
representedOrganization.name as v -> organization.name = (v.other);
representedOrganization.telecom -> organization.telecom;
representedOrganization.addr -> organization.address;
representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'PUT', e9.resource = create('Organization') as organization1 then {
OrgPartOf -> organization1.meta as meta then {
OrgPartOf -> meta.tag = create('Coding') as coding then {
OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";
OrgPartOf -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf' "code";
} "coding";
} "meta";
OrgPartOf.id as id -> organization1.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "org";
} "r";
} "identifier";
OrgPartOf.code -> organization1.type;
OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';
OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e10, e10.request = create('BackboneElement') as request, request.method = 'PUT', e10.resource = create('Organization') as organization2 then {
wholeOrgan -> organization2.meta as meta then {
wholeOrgan -> meta.tag = create('Coding') as coding then {
wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";
wholeOrgan -> coding.code = 'ClinicalDocument/body/observation/author/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";
} "coding";
} "meta";
wholeOrgan.id as id -> organization2.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization2.id = (r + '-' + ext) as uuid4, e10.fullUrl = append('https://example/Organization/', uuid4), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";
} "r";
} "identifier";
wholeOrgan.name as v -> organization2.name = (v.other);
wholeOrgan.telecom -> organization2.telecom;
wholeOrgan.addr -> organization2.address;
};
} "OrgPartOf";
};
// device
assignedAuthor.assignedAuthoringDevice as assignedAuthoringDevice -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'POST', e11.resource = create('Device') as device, device.id = uuid() as uuid11, e11.fullUrl = append('https://example/Device/', uuid11), request.url = 'Device', tgt.author = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {
assignedAuthoringDevice.templateId -> device.identifier;
assignedAuthoringDevice.code -> device.type;
assignedAuthoringDevice.manufacturerModelName as manufacturerModelName then {
manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";
} "manufacturer";
assignedAuthoringDevice.softwareName as softwareName -> device.deviceName as deviceName then {
softwareName -> deviceName.type = 'other' "typeName";
softwareName as s -> deviceName.name = (s.displayName) "name";
} "deviceName";
} "Device";
};
};
// participant person
obs.participant as participant where (typeCode != 'DEV') -> ob.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) then {
participant -> encounter.participant as FhirParticipant then {
participant as p -> FhirParticipant.type as type then {
p -> type.coding as coding then {
p -> coding.code = (p.typeCode) "codice";
p -> coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' "system";
} "codeType";
} "type";
} "fhirParticipant";
participant.participantRole as participantRole -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid12, e12.fullUrl = append('https://example/PractitionerRole/', uuid12), request.url = 'PractitionerRole', encounter.participant = create('BackboneElement') as participant1, participant1.individual = create('Reference') as referencepart, referencepart.reference = ('https://example/Practitioner/' + %practitionerRole.id) then {
// participant.time -> participant1.period;
participant.time as time1 -> participant1.period = create('Period') as period then {
time1 -> period.start = create('dateTime') as start then TSDateTime(time1, start) "val";
};
participant.time as time1 -> participant1.period = create('Period') as period then IVLTSPeriod(time1, period);
participant.functionCode -> practitionerRole.code;
// non mappa i 2 precedenti
participantRole -> bundle.entry as e13, e13.request = create('BackboneElement') as request, request.method = 'PUT', e13.resource = create('Practitioner') as practitioner then {
participantRole -> practitioner.meta as meta then {
participantRole -> meta.tag = create('Coding') as coding then {
participantRole -> coding.system = 'http://algoritmodiscoring' "system";
participantRole -> coding.code = 'ClinicalDocument/body/observation/participant' "code";
} "coding";
} "meta";
participantRole.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
participantRole -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid4, e13.fullUrl = append('https://example/Practitioner/', uuid4), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "org";
} "r";
} "identifier";
participantRole.code -> practitionerRole.code;
participantRole.addr -> practitioner.address;
participantRole.telecom -> practitioner.telecom;
participantRole.playingEntity as playingEntity then {
playingEntity.name -> practitioner.name;
playingEntity.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
} "practitioner";
} "partRole";
} "participantEncounter";
// participant device
obs.participant as devParticipant where (typeCode = 'DEV') -> bundle.entry as e14, e14.request = create('BackboneElement') as request, request.method = 'POST', e14.resource = create('Device') as device, device.id = uuid() as uuid14, e14.fullUrl = append('https://example/Device/', uuid14), request.url = 'Device', ob.device = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {
devParticipant.participantRole as participantRoleDev then {
participantRoleDev.playingDevice as playingDevice then {
playingDevice.code -> device.type;
playingDevice.manufacturerModelName as manufacturerModelName then {
manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";
} "manufacturer";
playingDevice.softwareName as softwareName -> device.deviceName as deviceName then {
softwareName -> deviceName.type = 'other' "typeName";
softwareName as s -> deviceName.name = (s.displayName) "name";
} "deviceName";
};
} "participantRoleDev";
} "devParticipant";
// observationMedia
obs.entryRelationship as er then {
er.observationMedia as obsMedia -> bundle.entry as e15, e15.request = create('BackboneElement') as request, request.method = 'POST', e15.resource = create('Media') as media1, media1.id = uuid() as uuid15, e15.fullUrl = append('https://example/Media/', uuid15), request.url = 'Media', ob.derivedFrom = create('Reference') as reference, reference.reference = ('https://example/Media/' + %media1.id) then {
obsMedia -> media1.content = create('Attachment') as Attachment then {
obsMedia -> media1.status = 'unknown' "status";
obsMedia.value as valueMedia then {
valueMedia.mediaType as type -> Attachment.contentType = type "type";
valueMedia -> Attachment.data = (valueMedia.dataBase64Binary) "data";
} "valuemedia";
} "Attachment";
} "media";
} "observationMedia";
// referenceRange
obs.referenceRange as refRange -> ob.referenceRange = create('BackboneElement') as ref then {
refRange.observationRange as obsRange then {
obsRange.value : ST as value -> ref.text = create('string'), ref.text = (value.dataString);
obsRange -> ref.low = create('Quantity') as Low then {
obsRange.value : IVL_PQ as v then {
v.low as l1 then {
l1.value as decValue -> Low.value = decValue;
l1.unit as Unit -> Low.unit = Unit;
} "decValue";
v -> ref.high = create('Quantity') as high then {
v.high as h1 then {
h1.value as decValue1 -> high.value = decValue1;
h1.unit as Unit1 -> high.unit = Unit1;
} "decValue";
} "high";
} "IVLPQ";
obsRange.interpretationCode -> ref.type;
obsRange.precondition as precondition then {
precondition.criterion as criterion then {
criterion.code -> ref.appliesTo "appliesTo";
criterion.value : IVL_PQ as v then {
v.high as l1 then {
l1 -> ref.age = create('Quantity') as age then {
l1 -> age.high as high then {
l1.value as decValue -> high.value = decValue;
l1.unit as Unit1 -> high.unit = Unit1;
} "high";
} "age";
} "low";
} "v";
};
};
} "obsRange";
} "refRange";
} "ref";
}
group Act(source cda : Act, target pat : Patient, target ac : DiagnosticReport, target enc : Encounter, target bundle : Bundle) {
cda.code -> ac.code;
cda where cda.statusCode.exists().not() then {
cda -> ac.status = 'final' "statuscode";
} "status";
cda.statusCode as statusc where (code = 'completed') -> ac.status = 'final';
cda.statusCode as statusc where (code = 'active') -> ac.status = 'registered';
cda.statusCode as statusc where (code = 'aborted') -> ac.status = 'cancelled';
cda.statusCode as statusc where (code = 'suspended') -> ac.status = 'partial';
cda.effectiveTime as effectiveTime -> ac.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value3";
cda where effectiveTime.low.exists() or effectiveTime.high.exists() then {
cda.effectiveTime as eff -> ac.effective = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
cda -> ac.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %pat.id) "reference";
cda -> ac.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
// specimen
cda where cda.specimen.exists() then {
cda.specimen as src -> bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'POST', e4.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4, e4.fullUrl = append('https://example/Specimen/', uuid4), request.url = 'Specimen', ac.specimen = create('Reference') as reference, reference.reference = ('https://example/Specimen/' + %specimen.id) then {
src.specimenRole as specimenRole then {
specimenRole.id -> specimen.identifier;
specimenRole.specimenPlayingEntity as specimenPlayingEntity then {
specimenPlayingEntity.code -> specimen.type;
};
} "SpecimenRole";
src -> specimen.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
cda.entryRelationship as entryRelationship then {
entryRelationship.observation as observation then {
observation -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('Observation') as obs, obs.id = uuid() as uuid13, e12.fullUrl = append('https://example/Observation/', uuid13), request.url = 'Observation', ac.result = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %obs.id) then {
observation then Observation2(observation, pat, enc, obs, bundle, cda, specimen) "ORG";
// procedure
cda.entryRelationship as entryRelationship1 then {
entryRelationship1.procedure as proc -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'POST', e5.resource = create('Procedure') as procedure, procedure.id = uuid() as uuid5, e5.fullUrl = append('https://example/Procedure/', uuid5), request.url = 'Procedure', obs.partOf = create('Reference') as reference, reference.reference = ('https://example/Procedure/' + %procedure.id) then {
proc -> procedure.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
proc -> procedure.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
proc where proc.statusCode.exists().not() then {
proc -> procedure.status = 'unknown' "statuscode";
} "status";
proc.statusCode as statusc where (code = 'completed') -> procedure.status = 'completed';
proc.statusCode as statusc where (code = 'active') -> procedure.status = 'in-progress';
proc.statusCode as statusc where (code = 'aborted') -> procedure.status = 'stopped';
proc.statusCode as statusc where (code = 'suspended') -> procedure.status = 'on-hold';
proc.statusCode as statusc where (code = 'cancelled') -> procedure.status = 'not-done';
proc.statusCode as statusc where (code = 'held') -> procedure.status = 'on-hold';
proc.statusCode as statusc where (code = 'new') -> procedure.status = 'preparation';
proc.statusCode as statusc where (code = 'obsolete') -> procedure.status = 'entered-in-error';
proc.statusCode as statusc where (code = 'nullified') -> procedure.status = 'unknown';
proc.effectiveTime as effectiveTime -> procedure.performed = create('dateTime') as value then TSDateTime(effectiveTime, value) "datetime";
proc where effectiveTime.low.exists() or effectiveTime.high.exists() then {
proc.effectiveTime as eff -> procedure.performed = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
proc.targetSiteCode -> procedure.bodySite;
};
} "entryRelationshipprocedure";
} "obs";
};
entryRelationship.organizer as organizer then {
organizer -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('Observation') as obs, obs.id = uuid() as uuid13, e12.fullUrl = append('https://example/Observation/', uuid13), request.url = 'Observation', ac.result = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %obs.id) then {
organizer then Organizer(cda, organizer, pat, enc, obs, bundle) "ORG";
// procedure
cda.entryRelationship as entryRelationship1 then {
entryRelationship1.procedure as proc -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'POST', e5.resource = create('Procedure') as procedure, procedure.id = uuid() as uuid5, e5.fullUrl = append('https://example/Procedure/', uuid5), request.url = 'Procedure', obs.partOf = create('Reference') as reference, reference.reference = ('https://example/Procedure/' + %procedure.id) then {
proc -> procedure.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
proc -> procedure.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
proc where proc.statusCode.exists().not() then {
proc -> procedure.status = 'unknown' "statuscode";
} "status";
proc.statusCode as statusc where (code = 'completed') -> procedure.status = 'completed';
proc.statusCode as statusc where (code = 'active') -> procedure.status = 'in-progress';
proc.statusCode as statusc where (code = 'aborted') -> procedure.status = 'stopped';
proc.statusCode as statusc where (code = 'suspended') -> procedure.status = 'on-hold';
proc.statusCode as statusc where (code = 'cancelled') -> procedure.status = 'not-done';
proc.statusCode as statusc where (code = 'held') -> procedure.status = 'on-hold';
proc.statusCode as statusc where (code = 'new') -> procedure.status = 'preparation';
proc.statusCode as statusc where (code = 'obsolete') -> procedure.status = 'entered-in-error';
proc.statusCode as statusc where (code = 'nullified') -> procedure.status = 'unknown';
proc.effectiveTime as effectiveTime -> procedure.performed = create('dateTime') as value then TSDateTime(effectiveTime, value) "datetime";
proc where effectiveTime.low.exists() or effectiveTime.high.exists() then {
proc.effectiveTime as eff -> procedure.performed = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
proc.targetSiteCode -> procedure.bodySite;
} "pbservation";
} "entryRelationshiprocedure";
} "Organizer";
};
} "entryRelationshipobservation";
};
} "exist";
cda where cda.specimen.exists().not() then {
// cda -> bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'POST', e4.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4, e4.fullUrl = append('https://example/Specimen/', uuid4), request.url = 'Specimen' then {
cda.entryRelationship as entryRelationship then {
entryRelationship.observation as observation then {
observation -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('Observation') as obs, obs.id = uuid() as uuid13, e12.fullUrl = append('https://example/Observation/', uuid13), request.url = 'Observation', ac.result = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %obs.id) then {
observation then Observation3(observation, pat, enc, obs, bundle, cda) "ORG";
// procedure
cda.entryRelationship as entryRelationship1 then {
entryRelationship1.procedure as proc -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'POST', e5.resource = create('Procedure') as procedure, procedure.id = uuid() as uuid5, e5.fullUrl = append('https://example/Procedure/', uuid5), request.url = 'Procedure', obs.partOf = create('Reference') as reference, reference.reference = ('https://example/Procedure/' + %procedure.id) then {
proc -> procedure.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
proc -> procedure.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
proc where proc.statusCode.exists().not() then {
proc -> procedure.status = 'unknown' "statuscode";
} "status";
proc.statusCode as statusc where (code = 'completed') -> procedure.status = 'completed';
proc.statusCode as statusc where (code = 'active') -> procedure.status = 'in-progress';
proc.statusCode as statusc where (code = 'aborted') -> procedure.status = 'stopped';
proc.statusCode as statusc where (code = 'suspended') -> procedure.status = 'on-hold';
proc.statusCode as statusc where (code = 'cancelled') -> procedure.status = 'not-done';
proc.statusCode as statusc where (code = 'held') -> procedure.status = 'on-hold';
proc.statusCode as statusc where (code = 'new') -> procedure.status = 'preparation';
proc.statusCode as statusc where (code = 'obsolete') -> procedure.status = 'entered-in-error';
proc.statusCode as statusc where (code = 'nullified') -> procedure.status = 'unknown';
proc.effectiveTime as effectiveTime -> procedure.performed = create('dateTime') as value then TSDateTime(effectiveTime, value) "datetime";
proc where effectiveTime.low.exists() or effectiveTime.high.exists() then {
proc.effectiveTime as eff -> procedure.performed = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
proc.targetSiteCode -> procedure.bodySite;
};
} "entryRelationshipprocedure";
} "obs";
};
entryRelationship.organizer as organizer then {
organizer -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('Observation') as obs, obs.id = uuid() as uuid13, e12.fullUrl = append('https://example/Observation/', uuid13), request.url = 'Observation', ac.result = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %obs.id) then {
organizer then Organizer(cda, organizer, pat, enc, obs, bundle) "ORG";
// procedure
cda.entryRelationship as entryRelationship1 then {
entryRelationship1.procedure as proc -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'POST', e5.resource = create('Procedure') as procedure, procedure.id = uuid() as uuid5, e5.fullUrl = append('https://example/Procedure/', uuid5), request.url = 'Procedure', obs.partOf = create('Reference') as reference, reference.reference = ('https://example/Procedure/' + %procedure.id) then {
proc -> procedure.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
proc -> procedure.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
proc where proc.statusCode.exists().not() then {
proc -> procedure.status = 'unknown' "statuscode";
} "status";
proc.statusCode as statusc where (code = 'completed') -> procedure.status = 'completed';
proc.statusCode as statusc where (code = 'active') -> procedure.status = 'in-progress';
proc.statusCode as statusc where (code = 'aborted') -> procedure.status = 'stopped';
proc.statusCode as statusc where (code = 'suspended') -> procedure.status = 'on-hold';
proc.statusCode as statusc where (code = 'cancelled') -> procedure.status = 'not-done';
proc.statusCode as statusc where (code = 'held') -> procedure.status = 'on-hold';
proc.statusCode as statusc where (code = 'new') -> procedure.status = 'preparation';
proc.statusCode as statusc where (code = 'obsolete') -> procedure.status = 'entered-in-error';
proc.statusCode as statusc where (code = 'nullified') -> procedure.status = 'unknown';
proc.effectiveTime as effectiveTime -> procedure.performed = create('dateTime') as value then TSDateTime(effectiveTime, value) "datetime";
proc where effectiveTime.low.exists() or effectiveTime.high.exists() then {
proc.effectiveTime as eff -> procedure.performed = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
proc.targetSiteCode -> procedure.bodySite;
} "pbservation";
} "entryRelationshiprocedure";
} "Organizer";
};
} "entryRelationshipobservation";
} "existnot";
// PARTICIPANT
cda.participant as part where (typeCode != 'DEV') -> enc.participant as participant then {
part -> participant.type as type then {
part -> type.coding as coding then {
part -> coding.code = (part.typeCode) "codice";
part -> coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' "system";
} "codeType";
} "type";
part.participantRole as participantRole -> participant.individual = create('Reference') as reference then {
participantRole -> bundle.entry as e, e.request = create('BackboneElement') as request, request.method = 'PUT', e.resource = create('Practitioner') as practitioner then {
part.time as time1 -> participant.period = create('Period') as period then {
time1 -> period.start = create('dateTime') as start then TSDateTime(time1, start) "val";
};
part.time as time1 -> participant.period = create('Period') as period then IVLTSPeriod(time1, period);
participantRole -> practitioner.meta as meta then {
participantRole -> meta.tag = create('Coding') as coding then {
participantRole -> coding.system = 'http://algoritmodiscoring' "system";
participantRole -> coding.code = 'ClinicalDocument/body/act/participant' "code";
} "coding";
} "meta";
participantRole.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
participantRole -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid4, e.fullUrl = append('https://example/Practitioner/', uuid4), reference.reference = ('https://example/Practitioner/' + %practitioner.id) "org";
} "r";
} "identifier";
participantRole.addr -> practitioner.address;
participantRole.playingEntity as playingEntity then {
playingEntity.name -> practitioner.name;
};
} "participanRoleBund";
};
};
// PERFORMER
cda.performer as performer -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid1, e1.fullUrl = append('https://example/PractitionerRole/', uuid1), request.url = 'PractitionerRole', ac.performer = create('Reference') as reference, reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
performer.assignedEntity as assignedEntity then {
assignedEntity.code as codice -> practitionerRole.code;
assignedEntity -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'PUT', e2.resource = create('Practitioner') as practitioner then {
assignedEntity.code -> practitionerRole.code;
assignedEntity -> practitioner.meta as meta then {
assignedEntity -> meta.tag = create('Coding') as coding then {
assignedEntity -> coding.system = 'http://algoritmodiscoring' "system";
assignedEntity -> coding.code = 'ClinicalDocument/body/act/performer' "code";
} "coding";
} "meta";
assignedEntity.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
assignedEntity -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid4, e2.fullUrl = append('https://example/Practitioner/', uuid4), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "pra";
} "r";
} "identifier";
assignedEntity.addr -> practitioner.address;
assignedEntity.telecom -> practitioner.telecom;
assignedEntity.assignedPerson as person then {
person.name -> practitioner.name;
person.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
} "ASSAUth";
assignedEntity.representedOrganization as representedOrganization -> bundle.entry as e3, e3.request = create('BackboneElement') as request, request.method = 'PUT', e3.resource = create('Organization') as organization then {
representedOrganization -> organization.meta as meta then {
representedOrganization -> meta.tag = create('Coding') as coding then {
representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";
representedOrganization -> coding.code = 'ClinicalDocument/body/act/representedOrganization' "code";
} "coding";
} "meta";
representedOrganization.id as id -> organization.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization.id = (r + '-' + ext) as uuid2, e3.fullUrl = append('https://example/Organization/', uuid2), practitionerRole.organization = create('Reference') as referenceOrg, referenceOrg.reference = append('https://example/Organization/', uuid2) "org";
} "r";
} "identifier";
representedOrganization.name as v -> organization.name = (v.other);
representedOrganization.telecom -> organization.telecom;
representedOrganization.addr -> organization.address;
representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'PUT', e4.resource = create('Organization') as organization1 then {
OrgPartOf -> organization1.meta as meta then {
OrgPartOf -> meta.tag = create('Coding') as coding then {
OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";
OrgPartOf -> coding.code = 'ClinicalDocument/body/act/representedOrganization/asOrganizationPartOf' "code";
} "coding";
} "meta";
OrgPartOf.id as id -> organization1.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization1.id = (r + '-' + ext) as uuid3, organization1.id = uuid() as uuid3, e4.fullUrl = append('https://example/Organization/', uuid3), organization.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization1.id) "org";
} "r";
} "identifier";
OrgPartOf.code -> organization1.type;
OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';
OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e10bis, e10bis.request = create('BackboneElement') as request, request.method = 'PUT', e10bis.resource = create('Organization') as organization2 then {
OrgPartOf -> organization2.meta as meta then {
OrgPartOf -> meta.tag = create('Coding') as coding then {
OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";
OrgPartOf -> coding.code = 'ClinicalDocument/body/act/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";
} "coding";
} "meta";
wholeOrgan.id as id -> organization2.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "org";
} "r";
} "identifier";
wholeOrgan.name as v -> organization2.name = (v.other);
wholeOrgan.telecom -> organization2.telecom;
wholeOrgan.addr -> organization2.address;
};
} "OrgPartOf";
};
} "performer";
};
// AUTHOR
cda.author as srcAuthor -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'POST', e5.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid6, e5.fullUrl = append('https://example/PractitionerRole/', uuid6), request.url = 'PractitionerRole', ac.performer = create('Reference') as reference, reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
srcAuthor.assignedAuthor as assignedAuthor then {
assignedAuthor.code as codice -> practitionerRole.code;
assignedAuthor -> bundle.entry as e7, e7.request = create('BackboneElement') as request, request.method = 'PUT', e7.resource = create('Practitioner') as practitioner then {
srcAuthor.functionCode -> practitionerRole.code;
assignedAuthor.code -> practitionerRole.code;
assignedAuthor -> practitioner.meta as meta then {
assignedAuthor -> meta.tag = create('Coding') as coding then {
assignedAuthor -> coding.system = 'http://algoritmodiscoring' "system";
assignedAuthor -> coding.code = 'ClinicalDocument/body/act/author' "code";
} "coding";
} "meta";
assignedAuthor.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
assignedAuthor -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "aut";
} "r";
} "identifier";
assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "2";
assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "diverso";
assignedAuthor.addr -> practitioner.address;
assignedAuthor.telecom -> practitioner.telecom;
// person
assignedAuthor.assignedPerson as person then {
person.name -> practitioner.name;
person.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
} "ASSAUth";
// organization
assignedAuthor.representedOrganization as representedOrganization -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'PUT', e8.resource = create('Organization') as organization then {
representedOrganization -> organization.meta as meta then {
representedOrganization -> meta.tag = create('Coding') as coding then {
representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";
representedOrganization -> coding.code = 'ClinicalDocument/body/act/author/representedOrganization' "code";
} "coding";
} "meta";
representedOrganization.id as id -> organization.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization.id = (r + '-' + ext) as uuid8, e8.fullUrl = append('https://example/Organization/', uuid8), practitionerRole.organization = create('Reference') as referenceOrg, referenceOrg.reference = append('https://example/Organization/', uuid8) "org";
} "r";
} "identifier";
representedOrganization.name as v -> organization.name = (v.other);
representedOrganization.telecom -> organization.telecom;
representedOrganization.addr -> organization.address;
representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'PUT', e9.resource = create('Organization') as organization1 then {
OrgPartOf -> organization1.meta as meta then {
OrgPartOf -> meta.tag = create('Coding') as coding then {
OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";
OrgPartOf -> coding.code = 'ClinicalDocument/body/act/author/representedOrganization/asOrganizationPartOf' "code";
} "coding";
} "meta";
OrgPartOf.id as id -> organization1.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization1.id = (r + '-' + ext) as uuid9, e9.fullUrl = append('https://example/Organization/', uuid9), organization.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization1.id) "org";
} "r";
} "identifier";
OrgPartOf.code -> organization1.type;
OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';
OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e10, e10.request = create('BackboneElement') as request, request.method = 'PUT', e10.resource = create('Organization') as organization2 then {
wholeOrgan -> organization2.meta as meta then {
wholeOrgan -> meta.tag = create('Coding') as coding then {
wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";
wholeOrgan -> coding.code = 'ClinicalDocument/body/act/author/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";
} "coding";
} "meta";
wholeOrgan.id as id -> organization2.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization2.id = (r + '-' + ext) as uuid10, e10.fullUrl = append('https://example/Organization/', uuid10), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";
} "r";
} "identifier";
wholeOrgan.name as v -> organization2.name = (v.other);
wholeOrgan.telecom -> organization2.telecom;
wholeOrgan.addr -> organization2.address;
};
} "OrgPartOf";
};
} "author";
};
// <!--entryRelationship per la gestione delle note e commenti-->
cda.entryRelationship as entryRelationship then {
entryRelationship.act as act then {
act.text as text then {
text.reference as reference -> ac.conclusion = (reference.value);
};
} "Act";
};
}
group Organizer(source cda : Act, source org : Organizer, target patient : Patient, target encounter : Encounter, target observation : Observation, target bundle : Bundle) {
org -> observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
org -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
org.code -> observation.code;
org where org.code.exists().not() then {
cda.code -> observation.code;
} "act";
org.statusCode as statusc where (code = 'completed') -> observation.status = 'final';
org.statusCode as statusc where (code = 'active') -> observation.status = 'registered';
org.statusCode as statusc where (code = 'aborted') -> observation.status = 'cancelled';
org.statusCode as statusc where (code = 'suspended') -> observation.status = 'partial';
org.effectiveTime as effectiveTime -> observation.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value2";
org where effectiveTime.low.exists() or effectiveTime.high.exists() then {
org.effectiveTime as eff -> observation.effective = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
// specimen
org.specimen as spmn -> bundle.entry as e4o, e4o.request = create('BackboneElement') as request, request.method = 'POST', e4o.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4o, e4o.fullUrl = append('https://example/Specimen/', uuid4o), request.url = 'Specimen', observation.specimen = create('Reference') as reference, reference.reference = ('https://example/Specimen/' + %specimen.id) then {
spmn.specimenRole as specimenRole then {
specimenRole.id as id -> specimen.identifier;
specimenRole.specimenPlayingEntity as specimenPlayingEntity then {
specimenPlayingEntity.code -> specimen.type;
};
};
};
// subject
org.subject as sbj then {
sbj.relatedSubject as relatedSubj -> patient.extension as extension2 then ExtSubjectAnimal(relatedSubj, extension2);
};
// performer
org.performer as performer -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid1, e1.fullUrl = append('https://example/PractitionerRole/', uuid1), request.url = 'PractitionerRole' then {
performer -> observation.performer = create('Reference') as reference, reference.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
performer.assignedEntity as entity then {
entity.code -> practitionerRole.code;
entity -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'PUT', e2.resource = create('Practitioner') as practitioner then {
entity -> practitioner.meta as meta then {
entity -> meta.tag = create('Coding') as coding then {
entity -> coding.system = 'http://algoritmodiscoring' "system";
entity -> coding.code = 'ClinicalDocument/body/organizer/performer' "code";
} "coding";
} "meta";
entity.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
entity -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "aut";
} "r";
} "identifier";
entity.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "2";
entity.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "diverso";
entity.addr -> practitioner.address;
entity.telecom -> practitioner.telecom;
entity.assignedPerson as person then {
person.name -> practitioner.name;
person.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
entity.representedOrganization as representedOrganization -> bundle.entry as e3, e3.request = create('BackboneElement') as request, request.method = 'PUT', e3.resource = create('Organization') as organization then {
representedOrganization -> organization.meta as meta then {
representedOrganization -> meta.tag = create('Coding') as coding then {
representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";
representedOrganization -> coding.code = 'ClinicalDocument/body/organizer/performer/representedOrganization' "code";
} "coding";
} "meta";
representedOrganization.id as id -> organization.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "aut";
} "r";
} "identifier";
representedOrganization.name as v -> organization.name = (v.other);
representedOrganization.telecom -> organization.telecom;
representedOrganization.addr -> organization.address;
representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'PUT', e4.resource = create('Organization') as organization1 then {
OrgPartOf -> organization1.meta as meta then {
OrgPartOf -> meta.tag = create('Coding') as coding then {
OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";
OrgPartOf -> coding.code = 'ClinicalDocument/body/organizer/performer/representedOrganization/asOrganizationPartOf' "code";
} "coding";
} "meta";
OrgPartOf.id as id -> organization1.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> 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) "org";
} "r";
} "identifier";
OrgPartOf.code -> organization1.type;
OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';
OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'PUT', e5.resource = create('Organization') as organization2 then {
wholeOrgan -> organization2.meta as meta then {
wholeOrgan -> meta.tag = create('Coding') as coding then {
wholeOrgan -> coding.system = 'http://algoritmodiscoring' "system";
wholeOrgan -> coding.code = 'ClinicalDocument/body/organizer/performer/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";
} "coding";
} "meta";
wholeOrgan.id as id -> organization2.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization2.id = (r + '-' + ext) as uuid4, e5.fullUrl = append('https://example/Organization/', uuid4), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "org";
} "r";
} "identifier";
wholeOrgan.name as v -> organization2.name = (v.other);
wholeOrgan.telecom -> organization2.telecom;
wholeOrgan.addr -> organization2.address;
};
} "OrgPartOf";
};
} "practitioner";
} "entity";
} "practitionerRole";
};
// author
org.author as srcAuthor -> bundle.entry as e6, e6.request = create('BackboneElement') as request, request.method = 'POST', e6.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid6, e6.fullUrl = append('https://example/PractitionerRole/', uuid6), request.url = 'PractitionerRole', observation.performer = create('Reference') as referenceaut, referenceaut.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
// srcAuthor.time as time -> tgt.date;
srcAuthor.assignedAuthor as assignedAuthor then {
assignedAuthor.code as codice -> practitionerRole.code as code2 then CECodeableConcept(codice, code2);
assignedAuthor -> bundle.entry as e7, e7.request = create('BackboneElement') as request, request.method = 'PUT', e7.resource = create('Practitioner') as practitioner then {
srcAuthor.functionCode -> practitionerRole.code;
// assignedAuthor.code -> practitionerRole.code;
assignedAuthor -> practitioner.meta as meta then {
assignedAuthor -> meta.tag = create('Coding') as coding then {
assignedAuthor -> coding.system = 'http://algoritmodiscoring' "system";
assignedAuthor -> coding.code = 'ClinicalDocument/body/organizer/author' "code";
} "coding";
} "meta";
assignedAuthor.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
assignedAuthor -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid7, e7.fullUrl = append('https://example/Practitioner/', uuid7), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
assignedAuthor.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "2";
assignedAuthor.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "diverso";
assignedAuthor.addr -> practitioner.address;
assignedAuthor.telecom -> practitioner.telecom;
// person
assignedAuthor.assignedPerson as person then {
person.name -> practitioner.name;
person.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
} "ASSAUth";
// organization
assignedAuthor.representedOrganization as representedOrganization -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'PUT', e8.resource = create('Organization') as organization then {
representedOrganization -> organization.meta as meta then {
representedOrganization -> meta.tag = create('Coding') as coding then {
representedOrganization -> coding.system = 'http://algoritmodiscoring' "system";
representedOrganization -> coding.code = 'ClinicalDocument/body/organizer/author/representedOrganization' "code";
} "coding";
} "meta";
representedOrganization.id as id -> organization.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
representedOrganization -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization.id = (r + '-' + ext) as uuid8, e8.fullUrl = append('https://example/Organization/', uuid8), practitionerRole.organization = create('Reference') as referenceOrg, referenceOrg.reference = append('https://example/Organization/', uuid8) "aut";
} "r";
} "identifier";
representedOrganization.name as v -> organization.name = (v.other);
representedOrganization.telecom -> organization.telecom;
representedOrganization.addr -> organization.address;
representedOrganization.asOrganizationPartOf as OrgPartOf -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'PUT', e9.resource = create('Organization') as organization1 then {
OrgPartOf -> organization1.meta as meta then {
OrgPartOf -> meta.tag = create('Coding') as coding then {
OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";
OrgPartOf -> coding.code = 'ClinicalDocument/body/organizer/author/representedOrganization/asOrganizationPartOf' "code";
} "coding";
} "meta";
OrgPartOf.id as id -> organization1.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
OrgPartOf -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization1.id = (r + '-' + ext) as uuid9, e9.fullUrl = append('https://example/Organization/', uuid9), organization.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization1.id) "aut";
} "r";
} "identifier";
OrgPartOf.code -> organization1.type;
OrgPartOf.statusCode as status where (value = 'active') -> organization1.active = create('boolean'), organization1.active = 'true';
OrgPartOf.wholeOrganization as wholeOrgan -> bundle.entry as e10, e10.request = create('BackboneElement') as request, request.method = 'PUT', e10.resource = create('Organization') as organization2 then {
OrgPartOf -> organization2.meta as meta then {
OrgPartOf -> meta.tag = create('Coding') as coding then {
OrgPartOf -> coding.system = 'http://algoritmodiscoring' "system";
OrgPartOf -> coding.code = 'ClinicalDocument/body/organizer/author/representedOrganization/asOrganizationPartOf/wholeOrganization' "code";
} "coding";
} "meta";
wholeOrgan.id as id -> organization2.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
wholeOrgan -> request.url = append('Organization?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> organization2.id = (r + '-' + ext) as uuid10, e10.fullUrl = append('https://example/Organization/', uuid10), organization1.partOf = create('Reference') as reference, reference.reference = ('https://example/Organization/' + %organization2.id) "aut";
} "r";
} "identifier";
wholeOrgan.name as v -> organization2.name = (v.other);
wholeOrgan.telecom -> organization2.telecom;
wholeOrgan.addr -> organization2.address;
};
} "OrgPartOf";
};
// device
assignedAuthor.assignedAuthoringDevice as assignedAuthoringDevice -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'POST', e11.resource = create('Device') as device, device.id = uuid() as uuid11, e11.fullUrl = append('https://example/Device/', uuid11), request.url = 'Device', tgt.author = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {
assignedAuthoringDevice.templateId -> device.identifier;
assignedAuthoringDevice.code -> device.type;
assignedAuthoringDevice.manufacturerModelName as manufacturerModelName then {
manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";
} "manufacturer";
assignedAuthoringDevice.softwareName as softwareName -> device.deviceName as deviceName then {
softwareName -> deviceName.type = 'other' "typeName";
softwareName as s -> deviceName.name = (s.displayName) "name";
} "deviceName";
} "Device";
};
};
// participant person
org.participant as participant where (typeCode != 'DEV') -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) then {
participant -> encounter.participant as FhirParticipant then {
participant as p -> FhirParticipant.type as type then {
p -> type.coding as coding then {
p -> coding.code = (p.typeCode) "codice";
p -> coding.system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType' "system";
} "codeType";
} "type";
} "fhirParticipant";
participant.participantRole as participantRole -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('PractitionerRole') as practitionerRole, practitionerRole.id = uuid() as uuid12, e12.fullUrl = append('https://example/PractitionerRole/', uuid12), request.url = 'PractitionerRole', encounter.participant = create('BackboneElement') as participant1 then {
// participant.time -> participant1.period;
participant.time as time1 -> participant1.period = create('Period') as period then {
time1 -> period.start = create('dateTime') as start then TSDateTime(time1, start) "val";
};
participant.time as time1 -> participant1.period = create('Period') as period then IVLTSPeriod(time1, period);
participant.functionCode -> practitionerRole.code;
// non mappa i 2 precedenti
participantRole -> bundle.entry as e13, e13.request = create('BackboneElement') as request, request.method = 'PUT', e13.resource = create('Practitioner') as practitioner then {
participantRole -> participant1.individual = create('Reference') as referencepart, referencepart.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) "par";
participantRole -> practitioner.meta as meta then {
participantRole -> meta.tag = create('Coding') as coding then {
participantRole -> coding.system = 'http://algoritmodiscoring' "system";
participantRole -> coding.code = 'ClinicalDocument/body/organizer/participant' "code";
} "coding";
} "meta";
participantRole.id as id -> practitioner.identifier as identifier then {
id.root as r -> identifier.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identifier.value = ext then {
participantRole -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> practitioner.id = (r + '-' + ext) as uuid2, e13.fullUrl = append('https://example/Practitioner/', uuid2), practitionerRole.practitioner = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "part";
} "r";
} "identifier";
participantRole.id as id where (root = '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "2";
participantRole.id as id where (root != '2.16.840.1.113883.2.9.4.3.2') then {
id.extension as ext -> request.url = append('Practitioner?identifier=', ext) "UUID";
} "diverso";
participantRole.code -> practitionerRole.code;
participantRole.addr -> practitioner.address;
participantRole.telecom -> practitioner.telecom;
participantRole.playingEntity as playingEntity then {
playingEntity.name -> practitioner.name;
playingEntity.birthTime as birthTime then {
birthTime.value as date -> practitioner.birthDate = truncate(date, 10);
} "birth";
} "name";
} "practitioner";
} "partRole";
} "participantEncounter";
// participant device
org.participant as devParticipant where (typeCode = 'DEV') -> bundle.entry as e14, e14.request = create('BackboneElement') as request, request.method = 'POST', e14.resource = create('Device') as device, device.id = uuid() as uuid14, e14.fullUrl = append('https://example/Device/', uuid14), request.url = 'Device', observation.device = create('Reference') as reference, reference.reference = ('https://example/Device/' + %device.id) then {
devParticipant.participantRole as participantRoleDev then {
participantRoleDev.playingDevice as playingDevice then {
playingDevice.code -> device.type;
playingDevice.manufacturerModelName as manufacturerModelName then {
manufacturerModelName as m -> device.manufacturer = (m.displayName) "displayRule";
} "manufacturer";
playingDevice.softwareName as softwareName -> device.deviceName as deviceName then {
softwareName -> deviceName.type = 'other' "typeName";
softwareName as s -> deviceName.name = (s.displayName) "name";
} "deviceName";
};
} "participantRoleDev";
} "devParticipant";
org.component as component then {
component.observation as observation -> bundle.entry as e, e.request = create('BackboneElement') as request, request.method = 'POST', e.resource = create('Observation') as observationhasmember, observationhasmember.id = uuid() as uuid2, e.fullUrl = append('https://example/Observation/', uuid2), request.url = 'Observation', observation.hasMember = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observationhasmember.id) then Observation(observation, patient, encounter, observationhasmember, bundle) "OBS";
} "componentobservation";
org.component as component then {
component.organizer as organizer -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observationorganizer, observationorganizer.id = uuid() as uuid3, e1.fullUrl = append('https://example/Observation/', uuid3), request.url = 'Observation', observation.hasMember = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observationorganizer.id) then {
organizer then Organizer(cda, organizer, patient, encounter, observationorganizer, bundle) "ORG";
};
} "componentorganizer";
// observationMedia
org.component as component then {
component.observationMedia as obsMedia -> bundle.entry as e15, e15.request = create('BackboneElement') as request, request.method = 'POST', e15.resource = create('Media') as media1, media1.id = uuid() as uuid15, e15.fullUrl = append('https://example/Media/', uuid15), request.url = 'Media', observation.derivedFrom = create('Reference') as reference, reference.reference = ('https://example/Media/' + %media1.id) then {
obsMedia -> media1.content = create('Attachment') as Attachment then {
obsMedia -> media1.status = 'unknown' "status";
obsMedia.value as valueMedia then {
valueMedia.mediaType as type -> Attachment.contentType = type "type";
valueMedia -> Attachment.data = (valueMedia.dataBase64Binary) "data";
} "valuemedia";
} "Attachment";
} "obsmedia";
};
// note
org.component as component then {
component.act as act then {
act.text as text then {
text.reference as reference -> observation.note as note then {
reference -> note.text = (reference.value) "reference";
} "note";
};
} "componentact";
};
}
group ExtSubjectAnimal(source src : relatedSubject, target ext : Extension) {
src -> ext.url = 'http://hl7.org/fhir/StructureDefinition/patient-animal' "url";
src.code as code -> ext.extension as ext, ext.url = 'species', ext.value = create('CodeableConcept') as code1 then CECodeableConcept(code, code1);
}
</pre>
</div>
</text>
<url value="http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirLabReport"/>
<version value="0.1.0"/>
<name value="cda2fhirLabReport"/>
<status value="draft"/>
<date value="2024-04-11T15:38:19+02: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/OrganizationPartOf"/>
<mode value="queried"/>
<alias value="OrganizationPartOf"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/cda/StructureDefinition/Organization"/>
<mode value="queried"/>
<alias value="rapresentedOrganization"/>
</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/cda/StructureDefinition/AD"/>
<mode value="source"/>
<alias value="AD"/>
</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/Procedure"/>
<mode value="produced"/>
<alias value="Procedure"/>
</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/Act"/>
<mode value="produced"/>
<alias value="Act"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ"/>
<mode value="source"/>
<alias value="IVL_PQ"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/cda/StructureDefinition/PQ"/>
<mode value="source"/>
<alias value="PQ"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity"/>
<mode value="target"/>
<alias value="SimpleQuantity"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/cda/StructureDefinition/Organizer"/>
<mode value="source"/>
<alias value="Organizer"/>
</structure>
<import value="http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes"/>
<import value="http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirHeader"/>
<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="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="DocumentReference"/>
<transform value="create"/>
<parameter>
<valueString value="DocumentReference"/>
</parameter>
</target>
<target>
<context value="DocumentReference"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid6"/>
<transform value="uuid"/>
</target>
<target>
<context value="e6"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/DocumentReference/"/>
</parameter>
<parameter>
<valueId value="uuid6"/>
</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="record"/>
<source>
<context value="recordTarget"/>
<element value="patientRole"/>
<variable value="patient"/>
</source>
<rule>
<name value="idfr"/>
<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="ext1"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext1"/>
</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>
<rule>
<name value="ext"/>
<source>
<context value="patient"/>
<element value="id"/>
<variable value="id"/>
<condition
value="(root = '2.16.840.1.113883.2.9.4.3.2') or (root = '2.16.840.1.113883.2.9.4.3.7') or (root = '2.16.840.1.113883.2.9.4.3.3') or (root = '2.16.840.1.113883.2.9.4.3.17') or (root = '2.16.840.1.113883.2.9.4.3.18') or (root = '2.16.840.1.113883.2.9.2.10.4.1.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1.1') or (root = '2.16.840.1.113883.2.9.2.10.4.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1') or (root = '2.16.840.1.113883.2.9.4.3.15')"/>
</source>
<rule>
<name value="UUID"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="requestPAT"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Patient?identifier="/>
</parameter>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</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>
<rule>
<name value="component"/>
<source>
<context value="cda"/>
<element value="component"/>
<variable value="component"/>
</source>
<rule>
<name value="body"/>
<source>
<context value="component"/>
<element value="structuredBody"/>
<variable value="body"/>
</source>
<rule>
<name value="component"/>
<source>
<context value="body"/>
<element value="component"/>
<variable value="component"/>
</source>
<rule>
<name value="section"/>
<source>
<context value="component"/>
<element value="section"/>
<variable value="srcSection"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="srcSection"/>
<element value="code"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="ClinicalDocumentSection"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
<variable value="documentreference"/>
</dependent>
</rule>
</rule>
</rule>
</rule>
</rule>
</group>
<group>
<name value="ClinicalDocumentSection"/>
<typeMode value="none"/>
<input>
<name value="cda"/>
<type value="ClinicalDocument"/>
<mode value="source"/>
</input>
<input>
<name value="src"/>
<type value="Section"/>
<mode value="source"/>
</input>
<input>
<name value="patient"/>
<type value="Patient"/>
<mode value="target"/>
</input>
<input>
<name value="tgt"/>
<mode value="target"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<input>
<name value="enc"/>
<type value="Encounter"/>
<mode value="target"/>
</input>
<input>
<name value="documentreference"/>
<type value="DocumentReference"/>
<mode value="target"/>
</input>
<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="code"/>
<source>
<context value="src"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="cdaText"/>
<source>
<context value="src"/>
<element value="text"/>
<variable value="cdaText"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="text"/>
<variable value="fhirText"/>
</target>
<rule>
<name value="narrativeStatus"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="fhirText"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="generated"/>
</parameter>
</target>
</rule>
<rule>
<name value="narrativeText"/>
<source>
<context value="cdaText"/>
<variable value="t"/>
</source>
<target>
<context value="fhirText"/>
<contextType value="variable"/>
<element value="div"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="entry"/>
<source>
<context value="src"/>
<element value="entry"/>
<variable value="entry1"/>
</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="DiagnosticReport"/>
<transform value="create"/>
<parameter>
<valueString value="DiagnosticReport"/>
</parameter>
</target>
<target>
<context value="DiagnosticReport"/>
<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/DiagnosticReport/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="DiagnosticReport"/>
</parameter>
</target>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="entry"/>
<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/DiagnosticReport/' + %DiagnosticReport.id"/>
</parameter>
</target>
<rule>
<name value="act"/>
<source>
<context value="entry1"/>
<element value="act"/>
<variable value="act1"/>
</source>
<dependent>
<name value="Act"/>
<variable value="act1"/>
<variable value="patient"/>
<variable value="DiagnosticReport"/>
<variable value="enc"/>
<variable value="bundle"/>
</dependent>
</rule>
</rule>
<rule>
<name value="component"/>
<source>
<context value="src"/>
<element value="component"/>
<variable value="component"/>
</source>
<rule>
<name value="section"/>
<source>
<context value="component"/>
<element value="section"/>
<variable value="sec"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="ClinicalDocumentSection"/>
<variable value="cda"/>
<variable value="sec"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="enc"/>
<variable value="documentreference"/>
</dependent>
</rule>
</rule>
</group>
<group>
<name value="Observation"/>
<typeMode value="none"/>
<input>
<name value="obs"/>
<type value="Observation"/>
<mode value="source"/>
</input>
<input>
<name value="patient"/>
<type value="Patient"/>
<mode value="target"/>
</input>
<input>
<name value="encounter"/>
<type value="Encounter"/>
<mode value="target"/>
</input>
<input>
<name value="ob"/>
<type value="Observation"/>
<mode value="target"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<rule>
<name value="reference"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="ob"/>
<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="reference"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="ob"/>
<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="obs"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="obs"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'completed')"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="obs"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'active')"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="registered"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="obs"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'aborted')"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="cancelled"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="obs"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'suspended')"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="partial"/>
</parameter>
</target>
</rule>
<rule>
<name value="value2"/>
<source>
<context value="obs"/>
<element value="effectiveTime"/>
<variable value="effectiveTime"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="effective"/>
<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="where"/>
<source>
<context value="obs"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="obs"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="effective"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
</rule>
<rule>
<name value="interpretationCode"/>
<source>
<context value="obs"/>
<element value="interpretationCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="interpretation"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="methodCode"/>
<source>
<context value="obs"/>
<element value="methodCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="method"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="value"/>
<source>
<context value="obs"/>
<type value="INT"/>
<element value="value"/>
<variable value="int"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="int.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="boolean"/>
<source>
<context value="obs"/>
<type value="BL"/>
<element value="value"/>
<variable value="boolean"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="boolean.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="val"/>
<source>
<context value="obs"/>
<type value="CE"/>
<element value="value"/>
<variable value="val"/>
</source>
<rule>
<name value="coding"/>
<source>
<context value="val"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<variable value="ce"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="originltext"/>
<source>
<context value="val"/>
<element value="originalText"/>
<variable value="originalText"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="originalText"/>
<element value="reference"/>
<variable value="reference"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="reference"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="val"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="val"/>
<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="val"/>
<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="val"/>
<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>
<name value="codeSystemVersion"/>
<source>
<context value="val"/>
<element value="codeSystemVersion"/>
<variable value="version"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="version"/>
<transform value="cast"/>
<parameter>
<valueId value="version"/>
</parameter>
<parameter>
<valueString value="string"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="translation"/>
<source>
<context value="val"/>
<element value="translation"/>
<variable value="translation"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="translation"/>
<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="translation"/>
<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="translation"/>
<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>
<name value="codeSystemVersion"/>
<source>
<context value="translation"/>
<element value="codeSystemVersion"/>
<variable value="version"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="version"/>
<transform value="cast"/>
<parameter>
<valueId value="version"/>
</parameter>
<parameter>
<valueString value="string"/>
</parameter>
</target>
</rule>
<rule>
<name value="qualifier"/>
<source>
<context value="translation"/>
<element value="qualifier"/>
<variable value="qualifier"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="qualifier"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="value"/>
<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="value"/>
<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="value"/>
<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>
<name value="codeSystemVersion"/>
<source>
<context value="value"/>
<element value="codeSystemVersion"/>
<variable value="version"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="version"/>
<transform value="cast"/>
<parameter>
<valueId value="version"/>
</parameter>
<parameter>
<valueString value="string"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="val"/>
<source>
<context value="obs"/>
<type value="CD"/>
<element value="value"/>
<variable value="val"/>
</source>
<rule>
<name value="coding"/>
<source>
<context value="val"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<variable value="ce"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="originltext"/>
<source>
<context value="val"/>
<element value="originalText"/>
<variable value="originalText"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="originalText"/>
<element value="reference"/>
<variable value="reference"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="reference"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="val"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="val"/>
<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="val"/>
<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="val"/>
<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>
<name value="codeSystemVersion"/>
<source>
<context value="val"/>
<element value="codeSystemVersion"/>
<variable value="version"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="version"/>
<transform value="cast"/>
<parameter>
<valueId value="version"/>
</parameter>
<parameter>
<valueString value="string"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="translation"/>
<source>
<context value="val"/>
<element value="translation"/>
<variable value="translation"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="translation"/>
<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="translation"/>
<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="translation"/>
<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>
<name value="codeSystemVersion"/>
<source>
<context value="translation"/>
<element value="codeSystemVersion"/>
<variable value="version"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="version"/>
<transform value="cast"/>
<parameter>
<valueId value="version"/>
</parameter>
<parameter>
<valueString value="string"/>
</parameter>
</target>
</rule>
<rule>
<name value="qualifier"/>
<source>
<context value="translation"/>
<element value="qualifier"/>
<variable value="qualifier"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="qualifier"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="value"/>
<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="value"/>
<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="value"/>
<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>
<name value="codeSystemVersion"/>
<source>
<context value="value"/>
<element value="codeSystemVersion"/>
<variable value="version"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="version"/>
<transform value="cast"/>
<parameter>
<valueId value="version"/>
</parameter>
<parameter>
<valueString value="string"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="valueQuantity"/>
<source>
<context value="obs"/>
<type value="PQ"/>
<element value="value"/>
<variable value="val"/>
</source>
<rule>
<name value="quantity"/>
<source>
<context value="val"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<variable value="quantity"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="value"/>
<source>
<context value="val"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="quantity"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="value"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="val"/>
<element value="unit"/>
<variable value="unit"/>
</source>
<target>
<context value="quantity"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="unit"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="value"/>
<source>
<context value="obs"/>
<type value="ST"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="create"/>
<parameter>
<valueString value="string"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="entryRelationship"/>
<source>
<context value="obs"/>
<element value="entryRelationship"/>
<variable value="entryRelationship"/>
</source>
<rule>
<name value="Act"/>
<source>
<context value="entryRelationship"/>
<element value="act"/>
<variable value="act"/>
</source>
<rule>
<name value="text"/>
<source>
<context value="act"/>
<element value="text"/>
<variable value="text"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="text"/>
<element value="reference"/>
<variable value="reference"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="reference"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="reference.value"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<documentation value="Note e commenti"/>
</rule>
<rule>
<name value="subject"/>
<source>
<context value="obs"/>
<element value="subject"/>
<variable value="sbj"/>
</source>
<rule>
<name value="relatedSubject"/>
<source>
<context value="sbj"/>
<element value="relatedSubject"/>
<variable value="relatedSubj"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="extension"/>
<variable value="extension2"/>
</target>
<dependent>
<name value="ExtSubjectAnimal"/>
<variable value="relatedSubj"/>
<variable value="extension2"/>
</dependent>
</rule>
<documentation value="subject"/>
</rule>
<rule>
<name value="performer"/>
<source>
<context value="obs"/>
<element value="performer"/>
<variable value="performer"/>
</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>
<rule>
<name value="practitionerRole"/>
<source>
<context value="performer"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="performer"/>
<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="entity"/>
<source>
<context value="performer"/>
<element value="assignedEntity"/>
<variable value="entity"/>
</source>
<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="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="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/body/observation/performer"/>
</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="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="Practitioner?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="performer"/>
<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="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="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="entity"/>
<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="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/body/observation/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="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="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="e4"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="organization1"/>
<transform value="create"/>
<parameter>
<valueString value="Organization"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</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/body/observation/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="org"/>
<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="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="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/body/observation/performer/representedOrganization/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="org"/>
<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="e5"/>
<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>
<documentation value="organization"/>
</rule>
</rule>
</rule>
</rule>
<documentation value="performer"/>
</rule>
<rule>
<name value="author"/>
<source>
<context value="obs"/>
<element value="author"/>
<variable value="srcAuthor"/>
</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="uuid6"/>
<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="uuid6"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="PractitionerRole"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="performer"/>
<variable value="referenceaut"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="referenceaut"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
</parameter>
</target>
<rule>
<name value="assignedAuthor"/>
<source>
<context value="srcAuthor"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="assignedAuthor"/>
<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="ASSAUth"/>
<source>
<context value="assignedAuthor"/>
</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>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid7"/>
<transform value="uuid"/>
</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/body/observation/author"/>
</parameter>
</target>
</rule>
</rule>
</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="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="Practitioner?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="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>
<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>
<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>
<documentation value="person"/>
</rule>
</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="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/body/observation/author/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="org"/>
<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="OrgPartOf"/>
<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/body/observation/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="org"/>
<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/body/observation/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="org"/>
<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="e10"/>
<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="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>
<documentation value="organization"/>
</rule>
<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="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="device"/>
<transform value="create"/>
<parameter>
<valueString value="Device"/>
</parameter>
</target>
<target>
<context value="device"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid11"/>
<transform value="uuid"/>
</target>
<target>
<context value="e11"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Device/"/>
</parameter>
<parameter>
<valueId value="uuid11"/>
</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="templateId"/>
<source>
<context value="assignedAuthoringDevice"/>
<element value="templateId"/>
<variable value="vvv"/>
</source>
<target>
<context value="device"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<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>
</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>
<documentation value="device"/>
</rule>
</rule>
<documentation value="author"/>
</rule>
<rule>
<name value="participantEncounter"/>
<source>
<context value="obs"/>
<element value="participant"/>
<variable value="participant"/>
<condition value="(typeCode != 'DEV')"/>
</source>
<target>
<context value="ob"/>
<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>
<name value="fhirParticipant"/>
<source>
<context value="participant"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="participant"/>
<variable value="FhirParticipant"/>
</target>
<rule>
<name value="type"/>
<source>
<context value="participant"/>
<variable value="p"/>
</source>
<target>
<context value="FhirParticipant"/>
<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>
<rule>
<name value="partRole"/>
<source>
<context value="participant"/>
<element value="participantRole"/>
<variable value="participantRole"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e12"/>
<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="uuid12"/>
<transform value="uuid"/>
</target>
<target>
<context value="e12"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/PractitionerRole/"/>
</parameter>
<parameter>
<valueId value="uuid12"/>
</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>
<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/Practitioner/' + %practitionerRole.id"/>
</parameter>
</target>
<rule>
<name value="time"/>
<source>
<context value="participant"/>
<element value="time"/>
<variable value="time1"/>
</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="val"/>
<source>
<context value="time1"/>
</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="time1"/>
<variable value="start"/>
</dependent>
</rule>
<documentation value="participant.time -> participant1.period;"/>
</rule>
<rule>
<name value="time"/>
<source>
<context value="participant"/>
<element value="time"/>
<variable value="time1"/>
</source>
<target>
<context value="participant1"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="time1"/>
<variable value="period"/>
</dependent>
</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="practitioner"/>
<source>
<context value="participantRole"/>
</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="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<rule>
<name value="meta"/>
<source>
<context value="participantRole"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="participantRole"/>
</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="participantRole"/>
</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="participantRole"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/observation/participant"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="participantRole"/>
<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="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="participantRole"/>
</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="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="org"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid4"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid4"/>
</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="code"/>
<source>
<context value="participantRole"/>
<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="participantRole"/>
<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="participantRole"/>
<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="participantRole"/>
<element value="playingEntity"/>
<variable value="playingEntity"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="playingEntity"/>
<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="playingEntity"/>
<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>
<documentation value="non mappa i 2 precedenti"/>
</rule>
</rule>
<documentation value="participant person"/>
</rule>
<rule>
<name value="devParticipant"/>
<source>
<context value="obs"/>
<element value="participant"/>
<variable value="devParticipant"/>
<condition value="(typeCode = 'DEV')"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e14"/>
<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="uuid14"/>
<transform value="uuid"/>
</target>
<target>
<context value="e14"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Device/"/>
</parameter>
<parameter>
<valueId value="uuid14"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Device"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="device"/>
<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="participantRoleDev"/>
<source>
<context value="devParticipant"/>
<element value="participantRole"/>
<variable value="participantRoleDev"/>
</source>
<rule>
<name value="playingDevice"/>
<source>
<context value="participantRoleDev"/>
<element value="playingDevice"/>
<variable value="playingDevice"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="playingDevice"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="device"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="manufacturer"/>
<source>
<context value="playingDevice"/>
<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="playingDevice"/>
<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>
</rule>
<documentation value="participant device"/>
</rule>
<rule>
<name value="observationMedia"/>
<source>
<context value="obs"/>
<element value="entryRelationship"/>
<variable value="er"/>
</source>
<rule>
<name value="media"/>
<source>
<context value="er"/>
<element value="observationMedia"/>
<variable value="obsMedia"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e15"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="media1"/>
<transform value="create"/>
<parameter>
<valueString value="Media"/>
</parameter>
</target>
<target>
<context value="media1"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid15"/>
<transform value="uuid"/>
</target>
<target>
<context value="e15"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Media/"/>
</parameter>
<parameter>
<valueId value="uuid15"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Media"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="derivedFrom"/>
<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/Media/' + %media1.id"/>
</parameter>
</target>
<rule>
<name value="Attachment"/>
<source>
<context value="obsMedia"/>
</source>
<target>
<context value="media1"/>
<contextType value="variable"/>
<element value="content"/>
<variable value="Attachment"/>
<transform value="create"/>
<parameter>
<valueString value="Attachment"/>
</parameter>
</target>
<rule>
<name value="status"/>
<source>
<context value="obsMedia"/>
</source>
<target>
<context value="media1"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="unknown"/>
</parameter>
</target>
</rule>
<rule>
<name value="valuemedia"/>
<source>
<context value="obsMedia"/>
<element value="value"/>
<variable value="valueMedia"/>
</source>
<rule>
<name value="type"/>
<source>
<context value="valueMedia"/>
<element value="mediaType"/>
<variable value="type"/>
</source>
<target>
<context value="Attachment"/>
<contextType value="variable"/>
<element value="contentType"/>
<transform value="copy"/>
<parameter>
<valueId value="type"/>
</parameter>
</target>
</rule>
<rule>
<name value="data"/>
<source>
<context value="valueMedia"/>
</source>
<target>
<context value="Attachment"/>
<contextType value="variable"/>
<element value="data"/>
<transform value="evaluate"/>
<parameter>
<valueString value="valueMedia.dataBase64Binary"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<documentation value="observationMedia"/>
</rule>
<rule>
<name value="ref"/>
<source>
<context value="obs"/>
<element value="referenceRange"/>
<variable value="refRange"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="referenceRange"/>
<variable value="ref"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<rule>
<name value="refRange"/>
<source>
<context value="refRange"/>
<element value="observationRange"/>
<variable value="obsRange"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="obsRange"/>
<type value="ST"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="create"/>
<parameter>
<valueString value="string"/>
</parameter>
</target>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="obsRange"/>
<source>
<context value="obsRange"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="low"/>
<variable value="Low"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="IVL-PQ"/>
<source>
<context value="obsRange"/>
<type value="IVL_PQ"/>
<element value="value"/>
<variable value="v"/>
</source>
<rule>
<name value="decValue"/>
<source>
<context value="v"/>
<element value="low"/>
<variable value="l1"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="l1"/>
<element value="value"/>
<variable value="decValue"/>
</source>
<target>
<context value="Low"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="decValue"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="l1"/>
<element value="unit"/>
<variable value="Unit"/>
</source>
<target>
<context value="Low"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="Unit"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="high"/>
<source>
<context value="v"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="high"/>
<variable value="high"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="decValue"/>
<source>
<context value="v"/>
<element value="high"/>
<variable value="h1"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="h1"/>
<element value="value"/>
<variable value="decValue1"/>
</source>
<target>
<context value="high"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="decValue1"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="h1"/>
<element value="unit"/>
<variable value="Unit1"/>
</source>
<target>
<context value="high"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="Unit1"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="interpretationCode"/>
<source>
<context value="obsRange"/>
<element value="interpretationCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="precondition"/>
<source>
<context value="obsRange"/>
<element value="precondition"/>
<variable value="precondition"/>
</source>
<rule>
<name value="criterion"/>
<source>
<context value="precondition"/>
<element value="criterion"/>
<variable value="criterion"/>
</source>
<rule>
<name value="appliesTo"/>
<source>
<context value="criterion"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="appliesTo"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="v"/>
<source>
<context value="criterion"/>
<type value="IVL_PQ"/>
<element value="value"/>
<variable value="v"/>
</source>
<rule>
<name value="low"/>
<source>
<context value="v"/>
<element value="high"/>
<variable value="l1"/>
</source>
<rule>
<name value="age"/>
<source>
<context value="l1"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="age"/>
<variable value="age"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="high"/>
<source>
<context value="l1"/>
</source>
<target>
<context value="age"/>
<contextType value="variable"/>
<element value="high"/>
<variable value="high"/>
</target>
<rule>
<name value="value"/>
<source>
<context value="l1"/>
<element value="value"/>
<variable value="decValue"/>
</source>
<target>
<context value="high"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="decValue"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="l1"/>
<element value="unit"/>
<variable value="Unit1"/>
</source>
<target>
<context value="high"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="Unit1"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<documentation value="referenceRange"/>
</rule>
</group>
<group>
<name value="Observation2"/>
<typeMode value="none"/>
<input>
<name value="obs"/>
<type value="Observation"/>
<mode value="source"/>
</input>
<input>
<name value="patient"/>
<type value="Patient"/>
<mode value="target"/>
</input>
<input>
<name value="encounter"/>
<type value="Encounter"/>
<mode value="target"/>
</input>
<input>
<name value="ob"/>
<type value="Observation"/>
<mode value="target"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<input>
<name value="cda"/>
<type value="Act"/>
<mode value="source"/>
</input>
<input>
<name value="specimenp"/>
<type value="Specimen"/>
<mode value="target"/>
</input>
<rule>
<name value="reference"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="ob"/>
<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="reference"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="ob"/>
<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="obs"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="obs"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'completed')"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="obs"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'active')"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="registered"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="obs"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'aborted')"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="cancelled"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="obs"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'suspended')"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="partial"/>
</parameter>
</target>
</rule>
<rule>
<name value="value2"/>
<source>
<context value="obs"/>
<element value="effectiveTime"/>
<variable value="effectiveTime"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="effective"/>
<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="where"/>
<source>
<context value="obs"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="obs"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="effective"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
</rule>
<rule>
<name value="interpretationCode"/>
<source>
<context value="obs"/>
<element value="interpretationCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="interpretation"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="methodCode"/>
<source>
<context value="obs"/>
<element value="methodCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="method"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="value"/>
<source>
<context value="obs"/>
<type value="INT"/>
<element value="value"/>
<variable value="int"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="int.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="boolean"/>
<source>
<context value="obs"/>
<type value="BL"/>
<element value="value"/>
<variable value="boolean"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="boolean.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="val"/>
<source>
<context value="obs"/>
<type value="CE"/>
<element value="value"/>
<variable value="val"/>
</source>
<rule>
<name value="coding"/>
<source>
<context value="val"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<variable value="ce"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="originltext"/>
<source>
<context value="val"/>
<element value="originalText"/>
<variable value="originalText"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="originalText"/>
<element value="reference"/>
<variable value="reference"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="reference"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="val"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="val"/>
<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="val"/>
<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="val"/>
<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>
<name value="codeSystemVersion"/>
<source>
<context value="val"/>
<element value="codeSystemVersion"/>
<variable value="version"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="version"/>
<transform value="cast"/>
<parameter>
<valueId value="version"/>
</parameter>
<parameter>
<valueString value="string"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="translation"/>
<source>
<context value="val"/>
<element value="translation"/>
<variable value="translation"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="translation"/>
<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="translation"/>
<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="translation"/>
<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>
<name value="codeSystemVersion"/>
<source>
<context value="translation"/>
<element value="codeSystemVersion"/>
<variable value="version"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="version"/>
<transform value="cast"/>
<parameter>
<valueId value="version"/>
</parameter>
<parameter>
<valueString value="string"/>
</parameter>
</target>
</rule>
<rule>
<name value="qualifier"/>
<source>
<context value="translation"/>
<element value="qualifier"/>
<variable value="qualifier"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="qualifier"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="value"/>
<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="value"/>
<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="value"/>
<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>
<name value="codeSystemVersion"/>
<source>
<context value="value"/>
<element value="codeSystemVersion"/>
<variable value="version"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="version"/>
<transform value="cast"/>
<parameter>
<valueId value="version"/>
</parameter>
<parameter>
<valueString value="string"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="valueQuantity"/>
<source>
<context value="obs"/>
<type value="PQ"/>
<element value="value"/>
<variable value="val"/>
</source>
<rule>
<name value="quantity"/>
<source>
<context value="val"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<variable value="quantity"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="value"/>
<source>
<context value="val"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="quantity"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="value"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="val"/>
<element value="unit"/>
<variable value="unit"/>
</source>
<target>
<context value="quantity"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="unit"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="value"/>
<source>
<context value="obs"/>
<type value="ST"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="create"/>
<parameter>
<valueString value="string"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="entryRelationship"/>
<source>
<context value="obs"/>
<element value="entryRelationship"/>
<variable value="entryRelationship"/>
</source>
<rule>
<name value="Act"/>
<source>
<context value="entryRelationship"/>
<element value="act"/>
<variable value="act"/>
</source>
<rule>
<name value="text"/>
<source>
<context value="act"/>
<element value="text"/>
<variable value="text"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="text"/>
<element value="reference"/>
<variable value="reference"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="reference"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="reference.value"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<documentation value="Note e commenti"/>
</rule>
<rule>
<name value="subject"/>
<source>
<context value="obs"/>
<element value="subject"/>
<variable value="sbj"/>
</source>
<rule>
<name value="relatedSubject"/>
<source>
<context value="sbj"/>
<element value="relatedSubject"/>
<variable value="relatedSubj"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="extension"/>
<variable value="extension2"/>
</target>
<dependent>
<name value="ExtSubjectAnimal"/>
<variable value="relatedSubj"/>
<variable value="extension2"/>
</dependent>
</rule>
<documentation value="subject"/>
</rule>
<rule>
<name value="conditionactexists"/>
<source>
<context value="cda"/>
<condition value="cda.entryRelationship.act.exists()"/>
</source>
<rule>
<name value="specimen"/>
<source>
<context value="obs"/>
<element value="specimen"/>
<variable value="spmn"/>
</source>
<rule>
<name value="specimenRole"/>
<source>
<context value="spmn"/>
<element value="specimenRole"/>
<variable value="specimenRole"/>
</source>
<rule>
<name value="id"/>
<source>
<context value="specimenRole"/>
<element value="id"/>
<variable value="id"/>
</source>
<rule>
<name value="extobs"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="extobs"/>
</source>
<rule>
<name value="en"/>
<source>
<context value="cda"/>
<element value="entryRelationship"/>
<variable value="entryRelationship"/>
</source>
<rule>
<name value="a"/>
<source>
<context value="entryRelationship"/>
<element value="act"/>
<variable value="a"/>
</source>
<rule>
<name value="sp"/>
<source>
<context value="a"/>
<element value="specimen"/>
<variable value="sp"/>
</source>
<rule>
<name value="spr"/>
<source>
<context value="sp"/>
<element value="specimenRole"/>
<variable value="spr"/>
</source>
<rule>
<name value="cont"/>
<source>
<context value="spr"/>
<element value="id"/>
<condition value="(extension = extobs)"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e4o"/>
</target>
<target>
<context value="e4o"/>
<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="e4o"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="specimen"/>
<transform value="create"/>
<parameter>
<valueString value="Specimen"/>
</parameter>
</target>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid4o"/>
<transform value="uuid"/>
</target>
<target>
<context value="e4o"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Specimen/"/>
</parameter>
<parameter>
<valueId value="uuid4o"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Specimen"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="specimen"/>
<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/Specimen/' + %specimen.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="spr"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="parent"/>
<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/Specimen/' + %specimenp.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="id"/>
<source>
<context value="spr"/>
<element value="id"/>
<variable value="vvv"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="ent"/>
<source>
<context value="specimenRole"/>
<element value="specimenPlayingEntity"/>
<variable value="spent"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="spent"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
<rule>
<name value="specimenPlayingEntity"/>
<source>
<context value="spr"/>
<element value="specimenPlayingEntity"/>
<variable value="specimenPlayingEntity"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="specimenPlayingEntity"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
<rule>
<name value="collection"/>
<source>
<context value="a"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="collection"/>
<variable value="collection"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<rule>
<name value="value"/>
<source>
<context value="a"/>
<element value="effectiveTime"/>
<variable value="effectivetime"/>
</source>
<target>
<context value="collection"/>
<contextType value="variable"/>
<element value="collected"/>
<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="where"/>
<source>
<context value="a"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="a"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="collection"/>
<contextType value="variable"/>
<element value="collected"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
</rule>
<rule>
<name value="participant"/>
<source>
<context value="a"/>
<element value="participant"/>
<variable value="participant"/>
</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="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid11"/>
<transform value="uuid"/>
</target>
<target>
<context value="e10"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString
value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid11"/>
</parameter>
</target>
<target>
<context value="collection"/>
<contextType value="variable"/>
<element value="collector"/>
<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="participantRole"/>
<source>
<context value="participant"/>
<element value="participantRole"/>
<variable value="participantRole"/>
</source>
<rule>
<name value="meta"/>
<source>
<context value="participantRole"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="participantRole"/>
</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="participantRole"/>
</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="participantRole"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/act/participant"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="participantRole"/>
<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="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="participantRole"/>
</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="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>
<rule>
<name value="addr"/>
<source>
<context value="participantRole"/>
<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="playingEntity"/>
<source>
<context value="participantRole"/>
<element value="playingEntity"/>
<variable value="playingEntity"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="playingEntity"/>
<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>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<documentation value="specimen"/>
</rule>
</rule>
<rule>
<name value="wherenotexists"/>
<source>
<context value="cda"/>
<condition
value="cda.entryRelationship.act.exists().not() and (obs.specimen.specimenRole.specimenPlayingEntity.code.code != specimenp.type.coding.code)"/>
</source>
<rule>
<name value="specimen"/>
<source>
<context value="obs"/>
<element value="specimen"/>
<variable value="spmn"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e4o"/>
</target>
<target>
<context value="e4o"/>
<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="e4o"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="specimen"/>
<transform value="create"/>
<parameter>
<valueString value="Specimen"/>
</parameter>
</target>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid4o"/>
<transform value="uuid"/>
</target>
<target>
<context value="e4o"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Specimen/"/>
</parameter>
<parameter>
<valueId value="uuid4o"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Specimen"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="specimen"/>
<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/Specimen/' + %specimen.id"/>
</parameter>
</target>
<rule>
<name value="specimenRole"/>
<source>
<context value="spmn"/>
<element value="specimenRole"/>
<variable value="specimenRole"/>
</source>
<rule>
<name value="id"/>
<source>
<context value="specimenRole"/>
<element value="id"/>
<variable value="vvv"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="specimenPlayingEntity"/>
<source>
<context value="specimenRole"/>
<element value="specimenPlayingEntity"/>
<variable value="specimenPlayingEntity"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="specimenPlayingEntity"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="performer"/>
<source>
<context value="obs"/>
<element value="performer"/>
<variable value="performer"/>
</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>
<rule>
<name value="practitionerRole"/>
<source>
<context value="performer"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="performer"/>
<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="entity"/>
<source>
<context value="performer"/>
<element value="assignedEntity"/>
<variable value="entity"/>
</source>
<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="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="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/body/observation/performer"/>
</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="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="Practitioner?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="performer"/>
<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="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="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="entity"/>
<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="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/body/observation/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="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="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="e4"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="organization1"/>
<transform value="create"/>
<parameter>
<valueString value="Organization"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</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/body/observation/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="org"/>
<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="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="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/body/observation/performer/representedOrganization/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="org"/>
<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="e5"/>
<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>
<documentation value="organization"/>
</rule>
</rule>
</rule>
</rule>
<documentation value="performer"/>
</rule>
<rule>
<name value="author"/>
<source>
<context value="obs"/>
<element value="author"/>
<variable value="srcAuthor"/>
</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="uuid6"/>
<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="uuid6"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="PractitionerRole"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="performer"/>
<variable value="referenceaut"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="referenceaut"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
</parameter>
</target>
<rule>
<name value="assignedAuthor"/>
<source>
<context value="srcAuthor"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="assignedAuthor"/>
<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="ASSAUth"/>
<source>
<context value="assignedAuthor"/>
</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>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid7"/>
<transform value="uuid"/>
</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/body/observation/author"/>
</parameter>
</target>
</rule>
</rule>
</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="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="Practitioner?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="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>
<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>
<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>
<documentation value="person"/>
</rule>
</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="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/body/observation/author/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="org"/>
<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="OrgPartOf"/>
<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/body/observation/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="org"/>
<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/body/observation/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="org"/>
<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="e10"/>
<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="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>
<documentation value="organization"/>
</rule>
<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="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="device"/>
<transform value="create"/>
<parameter>
<valueString value="Device"/>
</parameter>
</target>
<target>
<context value="device"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid11"/>
<transform value="uuid"/>
</target>
<target>
<context value="e11"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Device/"/>
</parameter>
<parameter>
<valueId value="uuid11"/>
</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="templateId"/>
<source>
<context value="assignedAuthoringDevice"/>
<element value="templateId"/>
<variable value="vvv"/>
</source>
<target>
<context value="device"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<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>
</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>
<documentation value="device"/>
</rule>
</rule>
<documentation value="author"/>
</rule>
<rule>
<name value="participantEncounter"/>
<source>
<context value="obs"/>
<element value="participant"/>
<variable value="participant"/>
<condition value="(typeCode != 'DEV')"/>
</source>
<target>
<context value="ob"/>
<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>
<name value="fhirParticipant"/>
<source>
<context value="participant"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="participant"/>
<variable value="FhirParticipant"/>
</target>
<rule>
<name value="type"/>
<source>
<context value="participant"/>
<variable value="p"/>
</source>
<target>
<context value="FhirParticipant"/>
<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>
<rule>
<name value="partRole"/>
<source>
<context value="participant"/>
<element value="participantRole"/>
<variable value="participantRole"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e12"/>
<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="uuid12"/>
<transform value="uuid"/>
</target>
<target>
<context value="e12"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/PractitionerRole/"/>
</parameter>
<parameter>
<valueId value="uuid12"/>
</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>
<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/Practitioner/' + %practitionerRole.id"/>
</parameter>
</target>
<rule>
<name value="time"/>
<source>
<context value="participant"/>
<element value="time"/>
<variable value="time1"/>
</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="val"/>
<source>
<context value="time1"/>
</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="time1"/>
<variable value="start"/>
</dependent>
</rule>
<documentation value="participant.time -> participant1.period;"/>
</rule>
<rule>
<name value="time"/>
<source>
<context value="participant"/>
<element value="time"/>
<variable value="time1"/>
</source>
<target>
<context value="participant1"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="time1"/>
<variable value="period"/>
</dependent>
</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="practitioner"/>
<source>
<context value="participantRole"/>
</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="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<rule>
<name value="meta"/>
<source>
<context value="participantRole"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="participantRole"/>
</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="participantRole"/>
</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="participantRole"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/observation/participant"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="participantRole"/>
<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="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="participantRole"/>
</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="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="org"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid4"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid4"/>
</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="code"/>
<source>
<context value="participantRole"/>
<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="participantRole"/>
<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="participantRole"/>
<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="participantRole"/>
<element value="playingEntity"/>
<variable value="playingEntity"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="playingEntity"/>
<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="playingEntity"/>
<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>
<documentation value="non mappa i 2 precedenti"/>
</rule>
</rule>
<documentation value="participant person"/>
</rule>
<rule>
<name value="devParticipant"/>
<source>
<context value="obs"/>
<element value="participant"/>
<variable value="devParticipant"/>
<condition value="(typeCode = 'DEV')"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e14"/>
<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="uuid14"/>
<transform value="uuid"/>
</target>
<target>
<context value="e14"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Device/"/>
</parameter>
<parameter>
<valueId value="uuid14"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Device"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="device"/>
<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="participantRoleDev"/>
<source>
<context value="devParticipant"/>
<element value="participantRole"/>
<variable value="participantRoleDev"/>
</source>
<rule>
<name value="playingDevice"/>
<source>
<context value="participantRoleDev"/>
<element value="playingDevice"/>
<variable value="playingDevice"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="playingDevice"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="device"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="manufacturer"/>
<source>
<context value="playingDevice"/>
<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="playingDevice"/>
<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>
</rule>
<documentation value="participant device"/>
</rule>
<rule>
<name value="observationMedia"/>
<source>
<context value="obs"/>
<element value="entryRelationship"/>
<variable value="er"/>
</source>
<rule>
<name value="media"/>
<source>
<context value="er"/>
<element value="observationMedia"/>
<variable value="obsMedia"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e15"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="media1"/>
<transform value="create"/>
<parameter>
<valueString value="Media"/>
</parameter>
</target>
<target>
<context value="media1"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid15"/>
<transform value="uuid"/>
</target>
<target>
<context value="e15"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Media/"/>
</parameter>
<parameter>
<valueId value="uuid15"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Media"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="derivedFrom"/>
<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/Media/' + %media1.id"/>
</parameter>
</target>
<rule>
<name value="Attachment"/>
<source>
<context value="obsMedia"/>
</source>
<target>
<context value="media1"/>
<contextType value="variable"/>
<element value="content"/>
<variable value="Attachment"/>
<transform value="create"/>
<parameter>
<valueString value="Attachment"/>
</parameter>
</target>
<rule>
<name value="status"/>
<source>
<context value="obsMedia"/>
</source>
<target>
<context value="media1"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="unknown"/>
</parameter>
</target>
</rule>
<rule>
<name value="valuemedia"/>
<source>
<context value="obsMedia"/>
<element value="value"/>
<variable value="valueMedia"/>
</source>
<rule>
<name value="type"/>
<source>
<context value="valueMedia"/>
<element value="mediaType"/>
<variable value="type"/>
</source>
<target>
<context value="Attachment"/>
<contextType value="variable"/>
<element value="contentType"/>
<transform value="copy"/>
<parameter>
<valueId value="type"/>
</parameter>
</target>
</rule>
<rule>
<name value="data"/>
<source>
<context value="valueMedia"/>
</source>
<target>
<context value="Attachment"/>
<contextType value="variable"/>
<element value="data"/>
<transform value="evaluate"/>
<parameter>
<valueString value="valueMedia.dataBase64Binary"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<documentation value="observationMedia"/>
</rule>
<rule>
<name value="ref"/>
<source>
<context value="obs"/>
<element value="referenceRange"/>
<variable value="refRange"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="referenceRange"/>
<variable value="ref"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<rule>
<name value="refRange"/>
<source>
<context value="refRange"/>
<element value="observationRange"/>
<variable value="obsRange"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="obsRange"/>
<type value="ST"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="create"/>
<parameter>
<valueString value="string"/>
</parameter>
</target>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="obsRange"/>
<source>
<context value="obsRange"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="low"/>
<variable value="Low"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="IVL-PQ"/>
<source>
<context value="obsRange"/>
<type value="IVL_PQ"/>
<element value="value"/>
<variable value="v"/>
</source>
<rule>
<name value="decValue"/>
<source>
<context value="v"/>
<element value="low"/>
<variable value="l1"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="l1"/>
<element value="value"/>
<variable value="decValue"/>
</source>
<target>
<context value="Low"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="decValue"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="l1"/>
<element value="unit"/>
<variable value="Unit"/>
</source>
<target>
<context value="Low"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="Unit"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="high"/>
<source>
<context value="v"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="high"/>
<variable value="high"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="decValue"/>
<source>
<context value="v"/>
<element value="high"/>
<variable value="h1"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="h1"/>
<element value="value"/>
<variable value="decValue1"/>
</source>
<target>
<context value="high"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="decValue1"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="h1"/>
<element value="unit"/>
<variable value="Unit1"/>
</source>
<target>
<context value="high"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="Unit1"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="interpretationCode"/>
<source>
<context value="obsRange"/>
<element value="interpretationCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="precondition"/>
<source>
<context value="obsRange"/>
<element value="precondition"/>
<variable value="precondition"/>
</source>
<rule>
<name value="criterion"/>
<source>
<context value="precondition"/>
<element value="criterion"/>
<variable value="criterion"/>
</source>
<rule>
<name value="appliesTo"/>
<source>
<context value="criterion"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="appliesTo"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="v"/>
<source>
<context value="criterion"/>
<type value="IVL_PQ"/>
<element value="value"/>
<variable value="v"/>
</source>
<rule>
<name value="low"/>
<source>
<context value="v"/>
<element value="high"/>
<variable value="l1"/>
</source>
<rule>
<name value="age"/>
<source>
<context value="l1"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="age"/>
<variable value="age"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="high"/>
<source>
<context value="l1"/>
</source>
<target>
<context value="age"/>
<contextType value="variable"/>
<element value="high"/>
<variable value="high"/>
</target>
<rule>
<name value="value"/>
<source>
<context value="l1"/>
<element value="value"/>
<variable value="decValue"/>
</source>
<target>
<context value="high"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="decValue"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="l1"/>
<element value="unit"/>
<variable value="Unit1"/>
</source>
<target>
<context value="high"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="Unit1"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<documentation value="referenceRange"/>
</rule>
</group>
<group>
<name value="Observation3"/>
<typeMode value="none"/>
<input>
<name value="obs"/>
<type value="Observation"/>
<mode value="source"/>
</input>
<input>
<name value="patient"/>
<type value="Patient"/>
<mode value="target"/>
</input>
<input>
<name value="encounter"/>
<type value="Encounter"/>
<mode value="target"/>
</input>
<input>
<name value="ob"/>
<type value="Observation"/>
<mode value="target"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<input>
<name value="cda"/>
<type value="Act"/>
<mode value="source"/>
</input>
<rule>
<name value="reference"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="ob"/>
<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="reference"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="ob"/>
<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="obs"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="obs"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'completed')"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="obs"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'active')"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="registered"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="obs"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'aborted')"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="cancelled"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="obs"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'suspended')"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="partial"/>
</parameter>
</target>
</rule>
<rule>
<name value="value2"/>
<source>
<context value="obs"/>
<element value="effectiveTime"/>
<variable value="effectiveTime"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="effective"/>
<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="where"/>
<source>
<context value="obs"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="obs"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="effective"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
</rule>
<rule>
<name value="interpretationCode"/>
<source>
<context value="obs"/>
<element value="interpretationCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="interpretation"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="methodCode"/>
<source>
<context value="obs"/>
<element value="methodCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="method"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="value"/>
<source>
<context value="obs"/>
<type value="INT"/>
<element value="value"/>
<variable value="int"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="int.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="boolean"/>
<source>
<context value="obs"/>
<type value="BL"/>
<element value="value"/>
<variable value="boolean"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="boolean.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="val"/>
<source>
<context value="obs"/>
<type value="CE"/>
<element value="value"/>
<variable value="val"/>
</source>
<rule>
<name value="coding"/>
<source>
<context value="val"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<variable value="ce"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="originltext"/>
<source>
<context value="val"/>
<element value="originalText"/>
<variable value="originalText"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="originalText"/>
<element value="reference"/>
<variable value="reference"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="reference"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="val"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="val"/>
<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="val"/>
<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="val"/>
<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>
<name value="codeSystemVersion"/>
<source>
<context value="val"/>
<element value="codeSystemVersion"/>
<variable value="version"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="version"/>
<transform value="cast"/>
<parameter>
<valueId value="version"/>
</parameter>
<parameter>
<valueString value="string"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="translation"/>
<source>
<context value="val"/>
<element value="translation"/>
<variable value="translation"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="translation"/>
<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="translation"/>
<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="translation"/>
<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>
<name value="codeSystemVersion"/>
<source>
<context value="translation"/>
<element value="codeSystemVersion"/>
<variable value="version"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="version"/>
<transform value="cast"/>
<parameter>
<valueId value="version"/>
</parameter>
<parameter>
<valueString value="string"/>
</parameter>
</target>
</rule>
<rule>
<name value="qualifier"/>
<source>
<context value="translation"/>
<element value="qualifier"/>
<variable value="qualifier"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="qualifier"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="value"/>
<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="value"/>
<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="value"/>
<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>
<name value="codeSystemVersion"/>
<source>
<context value="value"/>
<element value="codeSystemVersion"/>
<variable value="version"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="version"/>
<transform value="cast"/>
<parameter>
<valueId value="version"/>
</parameter>
<parameter>
<valueString value="string"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="valueQuantity"/>
<source>
<context value="obs"/>
<type value="PQ"/>
<element value="value"/>
<variable value="val"/>
</source>
<rule>
<name value="quantity"/>
<source>
<context value="val"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<variable value="quantity"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="value"/>
<source>
<context value="val"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="quantity"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="value"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="val"/>
<element value="unit"/>
<variable value="unit"/>
</source>
<target>
<context value="quantity"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="unit"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="value"/>
<source>
<context value="obs"/>
<type value="ST"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="create"/>
<parameter>
<valueString value="string"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="entryRelationship"/>
<source>
<context value="obs"/>
<element value="entryRelationship"/>
<variable value="entryRelationship"/>
</source>
<rule>
<name value="Act"/>
<source>
<context value="entryRelationship"/>
<element value="act"/>
<variable value="act"/>
</source>
<rule>
<name value="text"/>
<source>
<context value="act"/>
<element value="text"/>
<variable value="text"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="text"/>
<element value="reference"/>
<variable value="reference"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="reference"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="reference.value"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<documentation value="Note e commenti"/>
</rule>
<rule>
<name value="subject"/>
<source>
<context value="obs"/>
<element value="subject"/>
<variable value="sbj"/>
</source>
<rule>
<name value="relatedSubject"/>
<source>
<context value="sbj"/>
<element value="relatedSubject"/>
<variable value="relatedSubj"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="extension"/>
<variable value="extension2"/>
</target>
<dependent>
<name value="ExtSubjectAnimal"/>
<variable value="relatedSubj"/>
<variable value="extension2"/>
</dependent>
</rule>
<documentation value="subject"/>
</rule>
<rule>
<name value="specimen"/>
<source>
<context value="obs"/>
<element value="specimen"/>
<variable value="spmn"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e4o"/>
</target>
<target>
<context value="e4o"/>
<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="e4o"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="specimen"/>
<transform value="create"/>
<parameter>
<valueString value="Specimen"/>
</parameter>
</target>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid4o"/>
<transform value="uuid"/>
</target>
<target>
<context value="e4o"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Specimen/"/>
</parameter>
<parameter>
<valueId value="uuid4o"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Specimen"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="specimen"/>
<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/Specimen/' + %specimen.id"/>
</parameter>
</target>
<rule>
<name value="specimenRole"/>
<source>
<context value="spmn"/>
<element value="specimenRole"/>
<variable value="specimenRole"/>
</source>
<rule>
<name value="id"/>
<source>
<context value="specimenRole"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="identifier"/>
</target>
</rule>
<rule>
<name value="specimenPlayingEntity"/>
<source>
<context value="specimenRole"/>
<element value="specimenPlayingEntity"/>
<variable value="specimenPlayingEntity"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="specimenPlayingEntity"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
</rule>
<documentation value="specimen"/>
</rule>
<rule>
<name value="performer"/>
<source>
<context value="obs"/>
<element value="performer"/>
<variable value="performer"/>
</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>
<rule>
<name value="practitionerRole"/>
<source>
<context value="performer"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="performer"/>
<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="entity"/>
<source>
<context value="performer"/>
<element value="assignedEntity"/>
<variable value="entity"/>
</source>
<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="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="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/body/observation/performer"/>
</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="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="Practitioner?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="performer"/>
<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="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="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="entity"/>
<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="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/body/observation/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="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="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="e4"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="organization1"/>
<transform value="create"/>
<parameter>
<valueString value="Organization"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</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/body/observation/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="org"/>
<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="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="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/body/observation/performer/representedOrganization/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="org"/>
<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="e5"/>
<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>
<documentation value="organization"/>
</rule>
</rule>
</rule>
</rule>
<documentation value="performer"/>
</rule>
<rule>
<name value="author"/>
<source>
<context value="obs"/>
<element value="author"/>
<variable value="srcAuthor"/>
</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="uuid6"/>
<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="uuid6"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="PractitionerRole"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="performer"/>
<variable value="referenceaut"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="referenceaut"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
</parameter>
</target>
<rule>
<name value="assignedAuthor"/>
<source>
<context value="srcAuthor"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="assignedAuthor"/>
<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="ASSAUth"/>
<source>
<context value="assignedAuthor"/>
</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>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid7"/>
<transform value="uuid"/>
</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/body/observation/author"/>
</parameter>
</target>
</rule>
</rule>
</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="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="Practitioner?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="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>
<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>
<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>
<documentation value="person"/>
</rule>
</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="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/body/observation/author/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="org"/>
<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="OrgPartOf"/>
<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/body/observation/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="org"/>
<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/body/observation/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="org"/>
<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="e10"/>
<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="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>
<documentation value="organization"/>
</rule>
<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="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="device"/>
<transform value="create"/>
<parameter>
<valueString value="Device"/>
</parameter>
</target>
<target>
<context value="device"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid11"/>
<transform value="uuid"/>
</target>
<target>
<context value="e11"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Device/"/>
</parameter>
<parameter>
<valueId value="uuid11"/>
</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="templateId"/>
<source>
<context value="assignedAuthoringDevice"/>
<element value="templateId"/>
<variable value="vvv"/>
</source>
<target>
<context value="device"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<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>
</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>
<documentation value="device"/>
</rule>
</rule>
<documentation value="author"/>
</rule>
<rule>
<name value="participantEncounter"/>
<source>
<context value="obs"/>
<element value="participant"/>
<variable value="participant"/>
<condition value="(typeCode != 'DEV')"/>
</source>
<target>
<context value="ob"/>
<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>
<name value="fhirParticipant"/>
<source>
<context value="participant"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="participant"/>
<variable value="FhirParticipant"/>
</target>
<rule>
<name value="type"/>
<source>
<context value="participant"/>
<variable value="p"/>
</source>
<target>
<context value="FhirParticipant"/>
<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>
<rule>
<name value="partRole"/>
<source>
<context value="participant"/>
<element value="participantRole"/>
<variable value="participantRole"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e12"/>
<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="uuid12"/>
<transform value="uuid"/>
</target>
<target>
<context value="e12"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/PractitionerRole/"/>
</parameter>
<parameter>
<valueId value="uuid12"/>
</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>
<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/Practitioner/' + %practitionerRole.id"/>
</parameter>
</target>
<rule>
<name value="time"/>
<source>
<context value="participant"/>
<element value="time"/>
<variable value="time1"/>
</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="val"/>
<source>
<context value="time1"/>
</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="time1"/>
<variable value="start"/>
</dependent>
</rule>
<documentation value="participant.time -> participant1.period;"/>
</rule>
<rule>
<name value="time"/>
<source>
<context value="participant"/>
<element value="time"/>
<variable value="time1"/>
</source>
<target>
<context value="participant1"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="time1"/>
<variable value="period"/>
</dependent>
</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="practitioner"/>
<source>
<context value="participantRole"/>
</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="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<rule>
<name value="meta"/>
<source>
<context value="participantRole"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="participantRole"/>
</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="participantRole"/>
</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="participantRole"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/observation/participant"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="participantRole"/>
<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="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="participantRole"/>
</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="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="org"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid4"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid4"/>
</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="code"/>
<source>
<context value="participantRole"/>
<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="participantRole"/>
<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="participantRole"/>
<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="participantRole"/>
<element value="playingEntity"/>
<variable value="playingEntity"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="playingEntity"/>
<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="playingEntity"/>
<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>
<documentation value="non mappa i 2 precedenti"/>
</rule>
</rule>
<documentation value="participant person"/>
</rule>
<rule>
<name value="devParticipant"/>
<source>
<context value="obs"/>
<element value="participant"/>
<variable value="devParticipant"/>
<condition value="(typeCode = 'DEV')"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e14"/>
<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="uuid14"/>
<transform value="uuid"/>
</target>
<target>
<context value="e14"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Device/"/>
</parameter>
<parameter>
<valueId value="uuid14"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Device"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="device"/>
<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="participantRoleDev"/>
<source>
<context value="devParticipant"/>
<element value="participantRole"/>
<variable value="participantRoleDev"/>
</source>
<rule>
<name value="playingDevice"/>
<source>
<context value="participantRoleDev"/>
<element value="playingDevice"/>
<variable value="playingDevice"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="playingDevice"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="device"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="manufacturer"/>
<source>
<context value="playingDevice"/>
<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="playingDevice"/>
<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>
</rule>
<documentation value="participant device"/>
</rule>
<rule>
<name value="observationMedia"/>
<source>
<context value="obs"/>
<element value="entryRelationship"/>
<variable value="er"/>
</source>
<rule>
<name value="media"/>
<source>
<context value="er"/>
<element value="observationMedia"/>
<variable value="obsMedia"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e15"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="media1"/>
<transform value="create"/>
<parameter>
<valueString value="Media"/>
</parameter>
</target>
<target>
<context value="media1"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid15"/>
<transform value="uuid"/>
</target>
<target>
<context value="e15"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Media/"/>
</parameter>
<parameter>
<valueId value="uuid15"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Media"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="derivedFrom"/>
<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/Media/' + %media1.id"/>
</parameter>
</target>
<rule>
<name value="Attachment"/>
<source>
<context value="obsMedia"/>
</source>
<target>
<context value="media1"/>
<contextType value="variable"/>
<element value="content"/>
<variable value="Attachment"/>
<transform value="create"/>
<parameter>
<valueString value="Attachment"/>
</parameter>
</target>
<rule>
<name value="status"/>
<source>
<context value="obsMedia"/>
</source>
<target>
<context value="media1"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="unknown"/>
</parameter>
</target>
</rule>
<rule>
<name value="valuemedia"/>
<source>
<context value="obsMedia"/>
<element value="value"/>
<variable value="valueMedia"/>
</source>
<rule>
<name value="type"/>
<source>
<context value="valueMedia"/>
<element value="mediaType"/>
<variable value="type"/>
</source>
<target>
<context value="Attachment"/>
<contextType value="variable"/>
<element value="contentType"/>
<transform value="copy"/>
<parameter>
<valueId value="type"/>
</parameter>
</target>
</rule>
<rule>
<name value="data"/>
<source>
<context value="valueMedia"/>
</source>
<target>
<context value="Attachment"/>
<contextType value="variable"/>
<element value="data"/>
<transform value="evaluate"/>
<parameter>
<valueString value="valueMedia.dataBase64Binary"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<documentation value="observationMedia"/>
</rule>
<rule>
<name value="ref"/>
<source>
<context value="obs"/>
<element value="referenceRange"/>
<variable value="refRange"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="referenceRange"/>
<variable value="ref"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<rule>
<name value="refRange"/>
<source>
<context value="refRange"/>
<element value="observationRange"/>
<variable value="obsRange"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="obsRange"/>
<type value="ST"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="create"/>
<parameter>
<valueString value="string"/>
</parameter>
</target>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="obsRange"/>
<source>
<context value="obsRange"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="low"/>
<variable value="Low"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="IVLPQ"/>
<source>
<context value="obsRange"/>
<type value="IVL_PQ"/>
<element value="value"/>
<variable value="v"/>
</source>
<rule>
<name value="decValue"/>
<source>
<context value="v"/>
<element value="low"/>
<variable value="l1"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="l1"/>
<element value="value"/>
<variable value="decValue"/>
</source>
<target>
<context value="Low"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="decValue"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="l1"/>
<element value="unit"/>
<variable value="Unit"/>
</source>
<target>
<context value="Low"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="Unit"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="high"/>
<source>
<context value="v"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="high"/>
<variable value="high"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="decValue"/>
<source>
<context value="v"/>
<element value="high"/>
<variable value="h1"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="h1"/>
<element value="value"/>
<variable value="decValue1"/>
</source>
<target>
<context value="high"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="decValue1"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="h1"/>
<element value="unit"/>
<variable value="Unit1"/>
</source>
<target>
<context value="high"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="Unit1"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="interpretationCode"/>
<source>
<context value="obsRange"/>
<element value="interpretationCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="precondition"/>
<source>
<context value="obsRange"/>
<element value="precondition"/>
<variable value="precondition"/>
</source>
<rule>
<name value="criterion"/>
<source>
<context value="precondition"/>
<element value="criterion"/>
<variable value="criterion"/>
</source>
<rule>
<name value="appliesTo"/>
<source>
<context value="criterion"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="appliesTo"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="v"/>
<source>
<context value="criterion"/>
<type value="IVL_PQ"/>
<element value="value"/>
<variable value="v"/>
</source>
<rule>
<name value="low"/>
<source>
<context value="v"/>
<element value="high"/>
<variable value="l1"/>
</source>
<rule>
<name value="age"/>
<source>
<context value="l1"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="age"/>
<variable value="age"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="high"/>
<source>
<context value="l1"/>
</source>
<target>
<context value="age"/>
<contextType value="variable"/>
<element value="high"/>
<variable value="high"/>
</target>
<rule>
<name value="value"/>
<source>
<context value="l1"/>
<element value="value"/>
<variable value="decValue"/>
</source>
<target>
<context value="high"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="decValue"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="l1"/>
<element value="unit"/>
<variable value="Unit1"/>
</source>
<target>
<context value="high"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="Unit1"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<documentation value="referenceRange"/>
</rule>
</group>
<group>
<name value="Act"/>
<typeMode value="none"/>
<input>
<name value="cda"/>
<type value="Act"/>
<mode value="source"/>
</input>
<input>
<name value="pat"/>
<type value="Patient"/>
<mode value="target"/>
</input>
<input>
<name value="ac"/>
<type value="DiagnosticReport"/>
<mode value="target"/>
</input>
<input>
<name value="enc"/>
<type value="Encounter"/>
<mode value="target"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<rule>
<name value="code"/>
<source>
<context value="cda"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="status"/>
<source>
<context value="cda"/>
<condition value="cda.statusCode.exists().not()"/>
</source>
<rule>
<name value="statuscode"/>
<source>
<context value="cda"/>
</source>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="cda"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'completed')"/>
</source>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="cda"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'active')"/>
</source>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="registered"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="cda"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'aborted')"/>
</source>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="cancelled"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="cda"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'suspended')"/>
</source>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="partial"/>
</parameter>
</target>
</rule>
<rule>
<name value="value3"/>
<source>
<context value="cda"/>
<element value="effectiveTime"/>
<variable value="effectiveTime"/>
</source>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="effective"/>
<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="where"/>
<source>
<context value="cda"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="cda"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="effective"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cda"/>
</source>
<target>
<context value="ac"/>
<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/' + %pat.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cda"/>
</source>
<target>
<context value="ac"/>
<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/' + %enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="exist"/>
<source>
<context value="cda"/>
<condition value="cda.specimen.exists()"/>
</source>
<rule>
<name value="specimen"/>
<source>
<context value="cda"/>
<element value="specimen"/>
<variable value="src"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e4"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="specimen"/>
<transform value="create"/>
<parameter>
<valueString value="Specimen"/>
</parameter>
</target>
<target>
<context value="specimen"/>
<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/Specimen/"/>
</parameter>
<parameter>
<valueId value="uuid4"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Specimen"/>
</parameter>
</target>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="specimen"/>
<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/Specimen/' + %specimen.id"/>
</parameter>
</target>
<rule>
<name value="SpecimenRole"/>
<source>
<context value="src"/>
<element value="specimenRole"/>
<variable value="specimenRole"/>
</source>
<rule>
<name value="id"/>
<source>
<context value="specimenRole"/>
<element value="id"/>
<variable value="vvv"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="specimenPlayingEntity"/>
<source>
<context value="specimenRole"/>
<element value="specimenPlayingEntity"/>
<variable value="specimenPlayingEntity"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="specimenPlayingEntity"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
</source>
<target>
<context value="specimen"/>
<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="entryRelationshipobservation"/>
<source>
<context value="cda"/>
<element value="entryRelationship"/>
<variable value="entryRelationship"/>
</source>
<rule>
<name value="observation"/>
<source>
<context value="entryRelationship"/>
<element value="observation"/>
<variable value="observation"/>
</source>
<rule>
<name value="obs"/>
<source>
<context value="observation"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e12"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="obs"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="obs"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid13"/>
<transform value="uuid"/>
</target>
<target>
<context value="e12"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid13"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="result"/>
<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/Observation/' + %obs.id"/>
</parameter>
</target>
<rule>
<name value="ORG"/>
<source>
<context value="observation"/>
</source>
<dependent>
<name value="Observation2"/>
<variable value="observation"/>
<variable value="pat"/>
<variable value="enc"/>
<variable value="obs"/>
<variable value="bundle"/>
<variable value="cda"/>
<variable value="specimen"/>
</dependent>
</rule>
<rule>
<name value="entryRelationshipprocedure"/>
<source>
<context value="cda"/>
<element value="entryRelationship"/>
<variable value="entryRelationship1"/>
</source>
<rule>
<name value="procedure"/>
<source>
<context value="entryRelationship1"/>
<element value="procedure"/>
<variable value="proc"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e5"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="procedure"/>
<transform value="create"/>
<parameter>
<valueString value="Procedure"/>
</parameter>
</target>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid5"/>
<transform value="uuid"/>
</target>
<target>
<context value="e5"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Procedure/"/>
</parameter>
<parameter>
<valueId value="uuid5"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Procedure"/>
</parameter>
</target>
<target>
<context value="obs"/>
<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/Procedure/' + %procedure.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="proc"/>
</source>
<target>
<context value="procedure"/>
<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="reference"/>
<source>
<context value="proc"/>
</source>
<target>
<context value="procedure"/>
<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="status"/>
<source>
<context value="proc"/>
<condition value="proc.statusCode.exists().not()"/>
</source>
<rule>
<name value="statuscode"/>
<source>
<context value="proc"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="unknown"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'completed')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="completed"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'active')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="in-progress"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'aborted')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="stopped"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'suspended')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="on-hold"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'cancelled')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="not-done"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'held')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="on-hold"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'new')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="preparation"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'obsolete')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="entered-in-error"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'nullified')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="unknown"/>
</parameter>
</target>
</rule>
<rule>
<name value="datetime"/>
<source>
<context value="proc"/>
<element value="effectiveTime"/>
<variable value="effectiveTime"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="performed"/>
<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="where"/>
<source>
<context value="proc"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="proc"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="performed"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
</rule>
<rule>
<name value="targetSiteCode"/>
<source>
<context value="proc"/>
<element value="targetSiteCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="bodySite"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
<documentation value="procedure"/>
</rule>
</rule>
</rule>
<rule>
<name value="organizer"/>
<source>
<context value="entryRelationship"/>
<element value="organizer"/>
<variable value="organizer"/>
</source>
<rule>
<name value="Organizer"/>
<source>
<context value="organizer"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e12"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="obs"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="obs"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid13"/>
<transform value="uuid"/>
</target>
<target>
<context value="e12"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid13"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="result"/>
<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/Observation/' + %obs.id"/>
</parameter>
</target>
<rule>
<name value="ORG"/>
<source>
<context value="organizer"/>
</source>
<dependent>
<name value="Organizer"/>
<variable value="cda"/>
<variable value="organizer"/>
<variable value="pat"/>
<variable value="enc"/>
<variable value="obs"/>
<variable value="bundle"/>
</dependent>
</rule>
<rule>
<name value="entryRelationshiprocedure"/>
<source>
<context value="cda"/>
<element value="entryRelationship"/>
<variable value="entryRelationship1"/>
</source>
<rule>
<name value="pbservation"/>
<source>
<context value="entryRelationship1"/>
<element value="procedure"/>
<variable value="proc"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e5"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="procedure"/>
<transform value="create"/>
<parameter>
<valueString value="Procedure"/>
</parameter>
</target>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid5"/>
<transform value="uuid"/>
</target>
<target>
<context value="e5"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Procedure/"/>
</parameter>
<parameter>
<valueId value="uuid5"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Procedure"/>
</parameter>
</target>
<target>
<context value="obs"/>
<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/Procedure/' + %procedure.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="proc"/>
</source>
<target>
<context value="procedure"/>
<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="reference"/>
<source>
<context value="proc"/>
</source>
<target>
<context value="procedure"/>
<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="status"/>
<source>
<context value="proc"/>
<condition value="proc.statusCode.exists().not()"/>
</source>
<rule>
<name value="statuscode"/>
<source>
<context value="proc"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="unknown"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'completed')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="completed"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'active')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="in-progress"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'aborted')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="stopped"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'suspended')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="on-hold"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'cancelled')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="not-done"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'held')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="on-hold"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'new')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="preparation"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'obsolete')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="entered-in-error"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'nullified')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="unknown"/>
</parameter>
</target>
</rule>
<rule>
<name value="datetime"/>
<source>
<context value="proc"/>
<element value="effectiveTime"/>
<variable value="effectiveTime"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="performed"/>
<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="where"/>
<source>
<context value="proc"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="proc"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="performed"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
</rule>
<rule>
<name value="targetSiteCode"/>
<source>
<context value="proc"/>
<element value="targetSiteCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="bodySite"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
<documentation value="procedure"/>
</rule>
</rule>
</rule>
</rule>
</rule>
<documentation value="specimen"/>
</rule>
<rule>
<name value="existnot"/>
<source>
<context value="cda"/>
<condition value="cda.specimen.exists().not()"/>
</source>
<rule>
<name value="entryRelationshipobservation"/>
<source>
<context value="cda"/>
<element value="entryRelationship"/>
<variable value="entryRelationship"/>
</source>
<rule>
<name value="observation"/>
<source>
<context value="entryRelationship"/>
<element value="observation"/>
<variable value="observation"/>
</source>
<rule>
<name value="obs"/>
<source>
<context value="observation"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e12"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="obs"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="obs"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid13"/>
<transform value="uuid"/>
</target>
<target>
<context value="e12"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid13"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="result"/>
<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/Observation/' + %obs.id"/>
</parameter>
</target>
<rule>
<name value="ORG"/>
<source>
<context value="observation"/>
</source>
<dependent>
<name value="Observation3"/>
<variable value="observation"/>
<variable value="pat"/>
<variable value="enc"/>
<variable value="obs"/>
<variable value="bundle"/>
<variable value="cda"/>
</dependent>
</rule>
<rule>
<name value="entryRelationshipprocedure"/>
<source>
<context value="cda"/>
<element value="entryRelationship"/>
<variable value="entryRelationship1"/>
</source>
<rule>
<name value="procedure"/>
<source>
<context value="entryRelationship1"/>
<element value="procedure"/>
<variable value="proc"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e5"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="procedure"/>
<transform value="create"/>
<parameter>
<valueString value="Procedure"/>
</parameter>
</target>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid5"/>
<transform value="uuid"/>
</target>
<target>
<context value="e5"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Procedure/"/>
</parameter>
<parameter>
<valueId value="uuid5"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Procedure"/>
</parameter>
</target>
<target>
<context value="obs"/>
<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/Procedure/' + %procedure.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="proc"/>
</source>
<target>
<context value="procedure"/>
<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="reference"/>
<source>
<context value="proc"/>
</source>
<target>
<context value="procedure"/>
<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="status"/>
<source>
<context value="proc"/>
<condition value="proc.statusCode.exists().not()"/>
</source>
<rule>
<name value="statuscode"/>
<source>
<context value="proc"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="unknown"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'completed')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="completed"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'active')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="in-progress"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'aborted')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="stopped"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'suspended')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="on-hold"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'cancelled')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="not-done"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'held')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="on-hold"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'new')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="preparation"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'obsolete')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="entered-in-error"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'nullified')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="unknown"/>
</parameter>
</target>
</rule>
<rule>
<name value="datetime"/>
<source>
<context value="proc"/>
<element value="effectiveTime"/>
<variable value="effectiveTime"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="performed"/>
<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="where"/>
<source>
<context value="proc"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="proc"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="performed"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
</rule>
<rule>
<name value="targetSiteCode"/>
<source>
<context value="proc"/>
<element value="targetSiteCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="bodySite"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
<documentation value="procedure"/>
</rule>
</rule>
</rule>
<rule>
<name value="organizer"/>
<source>
<context value="entryRelationship"/>
<element value="organizer"/>
<variable value="organizer"/>
</source>
<rule>
<name value="Organizer"/>
<source>
<context value="organizer"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e12"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="obs"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="obs"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid13"/>
<transform value="uuid"/>
</target>
<target>
<context value="e12"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid13"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="result"/>
<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/Observation/' + %obs.id"/>
</parameter>
</target>
<rule>
<name value="ORG"/>
<source>
<context value="organizer"/>
</source>
<dependent>
<name value="Organizer"/>
<variable value="cda"/>
<variable value="organizer"/>
<variable value="pat"/>
<variable value="enc"/>
<variable value="obs"/>
<variable value="bundle"/>
</dependent>
</rule>
<rule>
<name value="entryRelationshiprocedure"/>
<source>
<context value="cda"/>
<element value="entryRelationship"/>
<variable value="entryRelationship1"/>
</source>
<rule>
<name value="pbservation"/>
<source>
<context value="entryRelationship1"/>
<element value="procedure"/>
<variable value="proc"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e5"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="procedure"/>
<transform value="create"/>
<parameter>
<valueString value="Procedure"/>
</parameter>
</target>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid5"/>
<transform value="uuid"/>
</target>
<target>
<context value="e5"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Procedure/"/>
</parameter>
<parameter>
<valueId value="uuid5"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Procedure"/>
</parameter>
</target>
<target>
<context value="obs"/>
<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/Procedure/' + %procedure.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="proc"/>
</source>
<target>
<context value="procedure"/>
<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="reference"/>
<source>
<context value="proc"/>
</source>
<target>
<context value="procedure"/>
<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="status"/>
<source>
<context value="proc"/>
<condition value="proc.statusCode.exists().not()"/>
</source>
<rule>
<name value="statuscode"/>
<source>
<context value="proc"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="unknown"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'completed')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="completed"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'active')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="in-progress"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'aborted')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="stopped"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'suspended')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="on-hold"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'cancelled')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="not-done"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'held')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="on-hold"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'new')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="preparation"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'obsolete')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="entered-in-error"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="proc"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'nullified')"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="unknown"/>
</parameter>
</target>
</rule>
<rule>
<name value="datetime"/>
<source>
<context value="proc"/>
<element value="effectiveTime"/>
<variable value="effectiveTime"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="performed"/>
<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="where"/>
<source>
<context value="proc"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="proc"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="performed"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
</rule>
<rule>
<name value="targetSiteCode"/>
<source>
<context value="proc"/>
<element value="targetSiteCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="procedure"/>
<contextType value="variable"/>
<element value="bodySite"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
<documentation value="procedure"/>
</rule>
</rule>
</rule>
<documentation
value="cda -> bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'POST', e4.resource = create('Specimen') as specimen, specimen.id = uuid() as uuid4, e4.fullUrl = append('https://example/Specimen/', uuid4), request.url = 'Specimen' then {"/>
</rule>
</rule>
<rule>
<name value="participant"/>
<source>
<context value="cda"/>
<element value="participant"/>
<variable value="part"/>
<condition value="(typeCode != 'DEV')"/>
</source>
<target>
<context value="enc"/>
<contextType value="variable"/>
<element value="participant"/>
<variable value="participant"/>
</target>
<rule>
<name value="type"/>
<source>
<context value="part"/>
</source>
<target>
<context value="participant"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="type"/>
</target>
<rule>
<name value="codeType"/>
<source>
<context value="part"/>
</source>
<target>
<context value="type"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="codice"/>
<source>
<context value="part"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="evaluate"/>
<parameter>
<valueString value="part.typeCode"/>
</parameter>
</target>
</rule>
<rule>
<name value="system"/>
<source>
<context value="part"/>
</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="participantRole"/>
<source>
<context value="part"/>
<element value="participantRole"/>
<variable value="participantRole"/>
</source>
<target>
<context value="participant"/>
<contextType value="variable"/>
<element value="individual"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<rule>
<name value="participanRoleBund"/>
<source>
<context value="participantRole"/>
</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="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<rule>
<name value="time"/>
<source>
<context value="part"/>
<element value="time"/>
<variable value="time1"/>
</source>
<target>
<context value="participant"/>
<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="time1"/>
</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="time1"/>
<variable value="start"/>
</dependent>
</rule>
</rule>
<rule>
<name value="time"/>
<source>
<context value="part"/>
<element value="time"/>
<variable value="time1"/>
</source>
<target>
<context value="participant"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="time1"/>
<variable value="period"/>
</dependent>
</rule>
<rule>
<name value="meta"/>
<source>
<context value="participantRole"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="participantRole"/>
</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="participantRole"/>
</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="participantRole"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/act/participant"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="participantRole"/>
<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="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="participantRole"/>
</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="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="org"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid4"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid4"/>
</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="addr"/>
<source>
<context value="participantRole"/>
<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="playingEntity"/>
<source>
<context value="participantRole"/>
<element value="playingEntity"/>
<variable value="playingEntity"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="playingEntity"/>
<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>
</rule>
</rule>
<documentation value="PARTICIPANT"/>
</rule>
<rule>
<name value="performer"/>
<source>
<context value="cda"/>
<element value="performer"/>
<variable value="performer"/>
</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="ac"/>
<contextType value="variable"/>
<element value="performer"/>
<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="performer"/>
<source>
<context value="performer"/>
<element value="assignedEntity"/>
<variable value="assignedEntity"/>
</source>
<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"/>
</target>
</rule>
<rule>
<name value="ASSAUth"/>
<source>
<context value="assignedEntity"/>
</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="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="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/body/act/performer"/>
</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="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="assignedEntity"/>
</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="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="pra"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid4"/>
<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="uuid4"/>
</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="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="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>
<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="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="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/body/act/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="org"/>
<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="e3"/>
<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="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="uuid2"/>
</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/body/act/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="org"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="organization1"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid3"/>
<transform value="evaluate"/>
<parameter>
<valueString value="r + '-' + ext"/>
</parameter>
</target>
<target>
<context value="organization1"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid3"/>
<transform value="uuid"/>
</target>
<target>
<context value="e4"/>
<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="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="OrgPartOf"/>
</source>
<target>
<context value="organization2"/>
<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/body/act/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="org"/>
<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="PERFORMER"/>
</rule>
<rule>
<name value="author"/>
<source>
<context value="cda"/>
<element value="author"/>
<variable value="srcAuthor"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e5"/>
<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="uuid6"/>
<transform value="uuid"/>
</target>
<target>
<context value="e5"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/PractitionerRole/"/>
</parameter>
<parameter>
<valueId value="uuid6"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="PractitionerRole"/>
</parameter>
</target>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="performer"/>
<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="author"/>
<source>
<context value="srcAuthor"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="assignedAuthor"/>
<element value="code"/>
<variable value="codice"/>
</source>
<target>
<context value="practitionerRole"/>
<contextType value="variable"/>
<element value="code"/>
</target>
</rule>
<rule>
<name value="ASSAUth"/>
<source>
<context value="assignedAuthor"/>
</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="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="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="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/body/act/author"/>
</parameter>
</target>
</rule>
</rule>
</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="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="Practitioner?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="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="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>
<documentation value="person"/>
</rule>
</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="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/body/act/author/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="org"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="organization"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid8"/>
<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="uuid8"/>
</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="uuid8"/>
</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="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/body/act/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="org"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="organization1"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid9"/>
<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="uuid9"/>
</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/body/act/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="org"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="organization2"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid10"/>
<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="uuid10"/>
</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>
<documentation value="organization"/>
</rule>
</rule>
<documentation value="AUTHOR"/>
</rule>
<rule>
<name value="entryRelationship"/>
<source>
<context value="cda"/>
<element value="entryRelationship"/>
<variable value="entryRelationship"/>
</source>
<rule>
<name value="Act"/>
<source>
<context value="entryRelationship"/>
<element value="act"/>
<variable value="act"/>
</source>
<rule>
<name value="text"/>
<source>
<context value="act"/>
<element value="text"/>
<variable value="text"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="text"/>
<element value="reference"/>
<variable value="reference"/>
</source>
<target>
<context value="ac"/>
<contextType value="variable"/>
<element value="conclusion"/>
<transform value="evaluate"/>
<parameter>
<valueString value="reference.value"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<documentation
value="<!--entryRelationship per la gestione delle note e commenti-->"/>
</rule>
</group>
<group>
<name value="Organizer"/>
<typeMode value="none"/>
<input>
<name value="cda"/>
<type value="Act"/>
<mode value="source"/>
</input>
<input>
<name value="org"/>
<type value="Organizer"/>
<mode value="source"/>
</input>
<input>
<name value="patient"/>
<type value="Patient"/>
<mode value="target"/>
</input>
<input>
<name value="encounter"/>
<type value="Encounter"/>
<mode value="target"/>
</input>
<input>
<name value="observation"/>
<type value="Observation"/>
<mode value="target"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<rule>
<name value="reference"/>
<source>
<context value="org"/>
</source>
<target>
<context value="observation"/>
<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="reference"/>
<source>
<context value="org"/>
</source>
<target>
<context value="observation"/>
<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="org"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="act"/>
<source>
<context value="org"/>
<condition value="org.code.exists().not()"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="cda"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="org"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'completed')"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="org"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'active')"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="registered"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="org"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'aborted')"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="cancelled"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="org"/>
<element value="statusCode"/>
<variable value="statusc"/>
<condition value="(code = 'suspended')"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="partial"/>
</parameter>
</target>
</rule>
<rule>
<name value="value2"/>
<source>
<context value="org"/>
<element value="effectiveTime"/>
<variable value="effectiveTime"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="effective"/>
<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="where"/>
<source>
<context value="org"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="org"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="effective"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
</rule>
<rule>
<name value="specimen"/>
<source>
<context value="org"/>
<element value="specimen"/>
<variable value="spmn"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e4o"/>
</target>
<target>
<context value="e4o"/>
<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="e4o"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="specimen"/>
<transform value="create"/>
<parameter>
<valueString value="Specimen"/>
</parameter>
</target>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid4o"/>
<transform value="uuid"/>
</target>
<target>
<context value="e4o"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Specimen/"/>
</parameter>
<parameter>
<valueId value="uuid4o"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Specimen"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="specimen"/>
<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/Specimen/' + %specimen.id"/>
</parameter>
</target>
<rule>
<name value="specimenRole"/>
<source>
<context value="spmn"/>
<element value="specimenRole"/>
<variable value="specimenRole"/>
</source>
<rule>
<name value="id"/>
<source>
<context value="specimenRole"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="identifier"/>
</target>
</rule>
<rule>
<name value="specimenPlayingEntity"/>
<source>
<context value="specimenRole"/>
<element value="specimenPlayingEntity"/>
<variable value="specimenPlayingEntity"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="specimenPlayingEntity"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
</rule>
<documentation value="specimen"/>
</rule>
<rule>
<name value="subject"/>
<source>
<context value="org"/>
<element value="subject"/>
<variable value="sbj"/>
</source>
<rule>
<name value="relatedSubject"/>
<source>
<context value="sbj"/>
<element value="relatedSubject"/>
<variable value="relatedSubj"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="extension"/>
<variable value="extension2"/>
</target>
<dependent>
<name value="ExtSubjectAnimal"/>
<variable value="relatedSubj"/>
<variable value="extension2"/>
</dependent>
</rule>
<documentation value="subject"/>
</rule>
<rule>
<name value="performer"/>
<source>
<context value="org"/>
<element value="performer"/>
<variable value="performer"/>
</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>
<rule>
<name value="practitionerRole"/>
<source>
<context value="performer"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="performer"/>
<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="entity"/>
<source>
<context value="performer"/>
<element value="assignedEntity"/>
<variable value="entity"/>
</source>
<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="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="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/body/organizer/performer"/>
</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="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="Practitioner?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="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="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="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="entity"/>
<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="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/body/organizer/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="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="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/body/organizer/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="org"/>
<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="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="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/body/organizer/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="org"/>
<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="e5"/>
<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="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>
<documentation value="performer"/>
</rule>
<rule>
<name value="author"/>
<source>
<context value="org"/>
<element value="author"/>
<variable value="srcAuthor"/>
</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="uuid6"/>
<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="uuid6"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="PractitionerRole"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="performer"/>
<variable value="referenceaut"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="referenceaut"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/PractitionerRole/' + %practitionerRole.id"/>
</parameter>
</target>
<rule>
<name value="assignedAuthor"/>
<source>
<context value="srcAuthor"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="assignedAuthor"/>
<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="ASSAUth"/>
<source>
<context value="assignedAuthor"/>
</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="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/body/organizer/author"/>
</parameter>
</target>
</rule>
</rule>
<documentation
value="assignedAuthor.code -> practitionerRole.code;"/>
</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="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="Practitioner?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="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid7"/>
<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="uuid7"/>
</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>
<documentation value="person"/>
</rule>
</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="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/body/organizer/author/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="aut"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="organization"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid8"/>
<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="uuid8"/>
</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="uuid8"/>
</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="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/body/organizer/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="uuid9"/>
<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="uuid9"/>
</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="OrgPartOf"/>
</source>
<target>
<context value="organization2"/>
<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/body/organizer/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="uuid10"/>
<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="uuid10"/>
</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>
<documentation value="organization"/>
</rule>
<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="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="device"/>
<transform value="create"/>
<parameter>
<valueString value="Device"/>
</parameter>
</target>
<target>
<context value="device"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid11"/>
<transform value="uuid"/>
</target>
<target>
<context value="e11"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Device/"/>
</parameter>
<parameter>
<valueId value="uuid11"/>
</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="templateId"/>
<source>
<context value="assignedAuthoringDevice"/>
<element value="templateId"/>
<variable value="vvv"/>
</source>
<target>
<context value="device"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<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>
</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>
<documentation value="device"/>
</rule>
<documentation value="srcAuthor.time as time -> tgt.date;"/>
</rule>
<documentation value="author"/>
</rule>
<rule>
<name value="participantEncounter"/>
<source>
<context value="org"/>
<element value="participant"/>
<variable value="participant"/>
<condition value="(typeCode != 'DEV')"/>
</source>
<target>
<context value="observation"/>
<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>
<name value="fhirParticipant"/>
<source>
<context value="participant"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="participant"/>
<variable value="FhirParticipant"/>
</target>
<rule>
<name value="type"/>
<source>
<context value="participant"/>
<variable value="p"/>
</source>
<target>
<context value="FhirParticipant"/>
<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>
<rule>
<name value="partRole"/>
<source>
<context value="participant"/>
<element value="participantRole"/>
<variable value="participantRole"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e12"/>
<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="uuid12"/>
<transform value="uuid"/>
</target>
<target>
<context value="e12"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/PractitionerRole/"/>
</parameter>
<parameter>
<valueId value="uuid12"/>
</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="time"/>
<source>
<context value="participant"/>
<element value="time"/>
<variable value="time1"/>
</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="val"/>
<source>
<context value="time1"/>
</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="time1"/>
<variable value="start"/>
</dependent>
</rule>
<documentation value="participant.time -> participant1.period;"/>
</rule>
<rule>
<name value="time"/>
<source>
<context value="participant"/>
<element value="time"/>
<variable value="time1"/>
</source>
<target>
<context value="participant1"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="time1"/>
<variable value="period"/>
</dependent>
</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="practitioner"/>
<source>
<context value="participantRole"/>
</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="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<rule>
<name value="par"/>
<source>
<context value="participantRole"/>
</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="meta"/>
<source>
<context value="participantRole"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="participantRole"/>
</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="participantRole"/>
</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="participantRole"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/organizer/participant"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="participantRole"/>
<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="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="participantRole"/>
</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="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="part"/>
<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="e13"/>
<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="participantRole"/>
<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="participantRole"/>
<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="participantRole"/>
<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="participantRole"/>
<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="participantRole"/>
<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="participantRole"/>
<element value="playingEntity"/>
<variable value="playingEntity"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="playingEntity"/>
<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="playingEntity"/>
<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>
<documentation value="non mappa i 2 precedenti"/>
</rule>
</rule>
<documentation value="participant person"/>
</rule>
<rule>
<name value="devParticipant"/>
<source>
<context value="org"/>
<element value="participant"/>
<variable value="devParticipant"/>
<condition value="(typeCode = 'DEV')"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e14"/>
<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="uuid14"/>
<transform value="uuid"/>
</target>
<target>
<context value="e14"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Device/"/>
</parameter>
<parameter>
<valueId value="uuid14"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Device"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="device"/>
<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="participantRoleDev"/>
<source>
<context value="devParticipant"/>
<element value="participantRole"/>
<variable value="participantRoleDev"/>
</source>
<rule>
<name value="playingDevice"/>
<source>
<context value="participantRoleDev"/>
<element value="playingDevice"/>
<variable value="playingDevice"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="playingDevice"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="device"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="manufacturer"/>
<source>
<context value="playingDevice"/>
<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="playingDevice"/>
<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>
</rule>
<documentation value="participant device"/>
</rule>
<rule>
<name value="componentobservation"/>
<source>
<context value="org"/>
<element value="component"/>
<variable value="component"/>
</source>
<rule>
<name value="OBS"/>
<source>
<context value="component"/>
<element value="observation"/>
<variable value="observation"/>
</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="observationhasmember"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observationhasmember"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid2"/>
<transform value="uuid"/>
</target>
<target>
<context value="e"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="hasMember"/>
<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/Observation/' + %observationhasmember.id"/>
</parameter>
</target>
<dependent>
<name value="Observation"/>
<variable value="observation"/>
<variable value="patient"/>
<variable value="encounter"/>
<variable value="observationhasmember"/>
<variable value="bundle"/>
</dependent>
</rule>
</rule>
<rule>
<name value="componentorganizer"/>
<source>
<context value="org"/>
<element value="component"/>
<variable value="component"/>
</source>
<rule>
<name value="organizer"/>
<source>
<context value="component"/>
<element value="organizer"/>
<variable value="organizer"/>
</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="observationorganizer"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observationorganizer"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid3"/>
<transform value="uuid"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid3"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="hasMember"/>
<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/Observation/' + %observationorganizer.id"/>
</parameter>
</target>
<rule>
<name value="ORG"/>
<source>
<context value="organizer"/>
</source>
<dependent>
<name value="Organizer"/>
<variable value="cda"/>
<variable value="organizer"/>
<variable value="patient"/>
<variable value="encounter"/>
<variable value="observationorganizer"/>
<variable value="bundle"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="component"/>
<source>
<context value="org"/>
<element value="component"/>
<variable value="component"/>
</source>
<rule>
<name value="obsmedia"/>
<source>
<context value="component"/>
<element value="observationMedia"/>
<variable value="obsMedia"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e15"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="media1"/>
<transform value="create"/>
<parameter>
<valueString value="Media"/>
</parameter>
</target>
<target>
<context value="media1"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid15"/>
<transform value="uuid"/>
</target>
<target>
<context value="e15"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Media/"/>
</parameter>
<parameter>
<valueId value="uuid15"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Media"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="derivedFrom"/>
<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/Media/' + %media1.id"/>
</parameter>
</target>
<rule>
<name value="Attachment"/>
<source>
<context value="obsMedia"/>
</source>
<target>
<context value="media1"/>
<contextType value="variable"/>
<element value="content"/>
<variable value="Attachment"/>
<transform value="create"/>
<parameter>
<valueString value="Attachment"/>
</parameter>
</target>
<rule>
<name value="status"/>
<source>
<context value="obsMedia"/>
</source>
<target>
<context value="media1"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="unknown"/>
</parameter>
</target>
</rule>
<rule>
<name value="valuemedia"/>
<source>
<context value="obsMedia"/>
<element value="value"/>
<variable value="valueMedia"/>
</source>
<rule>
<name value="type"/>
<source>
<context value="valueMedia"/>
<element value="mediaType"/>
<variable value="type"/>
</source>
<target>
<context value="Attachment"/>
<contextType value="variable"/>
<element value="contentType"/>
<transform value="copy"/>
<parameter>
<valueId value="type"/>
</parameter>
</target>
</rule>
<rule>
<name value="data"/>
<source>
<context value="valueMedia"/>
</source>
<target>
<context value="Attachment"/>
<contextType value="variable"/>
<element value="data"/>
<transform value="evaluate"/>
<parameter>
<valueString value="valueMedia.dataBase64Binary"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<documentation value="observationMedia"/>
</rule>
<rule>
<name value="component"/>
<source>
<context value="org"/>
<element value="component"/>
<variable value="component"/>
</source>
<rule>
<name value="componentact"/>
<source>
<context value="component"/>
<element value="act"/>
<variable value="act"/>
</source>
<rule>
<name value="text"/>
<source>
<context value="act"/>
<element value="text"/>
<variable value="text"/>
</source>
<rule>
<name value="note"/>
<source>
<context value="text"/>
<element value="reference"/>
<variable value="reference"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="reference"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="reference.value"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<documentation value="note"/>
</rule>
</group>
<group>
<name value="ExtSubjectAnimal"/>
<typeMode value="none"/>
<input>
<name value="src"/>
<type value="relatedSubject"/>
<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-animal"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="src"/>
<element value="code"/>
<variable value="code"/>
</source>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="extension"/>
<variable value="ext"/>
</target>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="species"/>
</parameter>
</target>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="value"/>
<variable value="code1"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<dependent>
<name value="CECodeableConcept"/>
<variable value="code"/>
<variable value="code1"/>
</dependent>
</rule>
</group>
</StructureMap>