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="cda2fhirEdReport"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>map "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirEdReport" = "cda2fhirEdReport"
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/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/IVL-TS" 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
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";
} "recPat";
} "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 where (code = '11459-5') -> composition.section as tgtSection then ModalitadiTrasposto(cda, srcSection, patient, tgtSection, bundle, encounter) "Modalitaditrasporto";
srcSection.code where (code = '78337-3') -> composition.section as tgtSection then InquadramentoClinicoIniziale(cda, srcSection, patient, tgtSection, bundle, encounter) "Inquadramentoclinico";
srcSection.code where (code = '46239-0') -> composition.section as tgtSection then MotivoDellaVisita(cda, srcSection, patient, tgtSection, bundle, encounter) "Inquadramentoclinico";
srcSection.code where (code = '54094-8') -> composition.section as tgtSection then Triage(cda, srcSection, patient, tgtSection, bundle, encounter) "Triage";
srcSection.code where (code = '46240-8') -> composition.section as tgtSection then ClinicalDocumentSectionEncounter(cda, srcSection, patient, tgtSection, bundle, encounter) "motivoricovero";
srcSection.code where (code = '8648-8') -> composition.section as tgtSection then ClinicalDocumentSectionDecorsoOspedaliero(cda, srcSection, patient, tgtSection, bundle, encounter) "DecorsoOspedaliero";
srcSection.code where (code = '55109-3') -> composition.section as tgtSection then ClinicalDocumentSectionComplicanze(cda, srcSection, patient, tgtSection, bundle, encounter) "Complicazioni";
srcSection.code where (code = '62387-6') -> composition.section as tgtSection then ClinicalDocumentSectionConsulenza(cda, srcSection, patient, tgtSection, bundle, encounter) "Hospitaldischargestudiessummary";
srcSection.code where (code = '30954-2') -> composition.section as tgtSection then ClinicalDocumentSectionAccertamenti(cda, srcSection, patient, tgtSection, bundle, encounter) "Accertamenti";
srcSection.code where (code = '8716-3') -> composition.section as tgtSection then ClinicalDocumentSectionParametriVitali(cda, srcSection, patient, tgtSection, bundle, encounter) "Accertamenti";
srcSection.code where (code = '29549-3') -> composition.section as tgtSection then ClinicalDocumentSectionTerapiaFarmacoInPronto(cda, srcSection, patient, tgtSection, bundle, encounter) "Accertamenti";
srcSection.code where (code = '18776-5') -> composition.section as tgtSection then ClinicalDocumentSectionPianoCuraDimissione(cda, srcSection, patient, tgtSection, bundle, encounter) "Pianodicuraalladimissione";
srcSection.code where (code = '28574-2') -> composition.section as tgtSection then ClinicalDocumentSectionDimissione(cda, srcSection, patient, tgtSection, bundle, encounter) "Dimissione";
srcSection.code where (code = '75311-1') -> composition.section as tgtSection then ClinicalDocumentSectionTerapiaFarmacologicaDimissione(cda, srcSection, patient, tgtSection, bundle, encounter) "TerapiaFarmacologicaDimissione";
};
};
} "body";
};
}
// Sezione complicanze--------------------------------------------------------------------------
group ClinicalDocumentSectionComplicanze(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {
src.title as t -> tgt.title = (t.dataString);
src.code -> tgt.code;
src where src.entry.exists() then {
src.text as cdaText -> tgt.text as fhirText then {
cdaText -> fhirText.status = 'generated' "narrativeStatus";
cdaText as t -> fhirText.div = t "narrativeText";
} "cdaText";
} "entryexists";
// Sezione Strutturata-----------------------------------------------------------------------------------------------------------------------------------------------
src.entry as entry1 -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observation, observation.id = uuid() as uuid1, e1.fullUrl = append('https://example/Observation/', uuid1), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id) then {
entry1.observation as obs then Observation(obs, patient, enc, observation, bundle) "act";
};
// Sezione Narrativa---------------------------------------------------------------------------------------------------------------------------------------------
src where src.entry.exists().not() then {
src.text as cdaText -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'POST', e8.resource = create('Observation') as Observation, Observation.id = uuid() as uuid8, e8.fullUrl = append('https://example/Observation/', uuid8), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %Observation.id) then {
src -> Observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
src -> Observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
src.code -> Observation.code;
src where observation.statusCode.exists().not() then {
src -> Observation.status = 'final' "status";
} "statuscode";
cdaText -> Observation.note as note then {
cdaText as t -> note.text = t "reference";
} "reference";
} "cdaText";
} "where";
}
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 where obs.statusCode.exists().not() then {
obs -> ob.status = 'final' "status";
} "statuscode";
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.value : INT as int -> ob.value = (int.value);
obs.value : CD as val then {
val -> ob.value = create('CodeableConcept') as ce then {
val.originalText -> ce.text;
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');
} "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.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');
};
} "translation1";
};
} "coding";
} "val";
obs.value : CE as val then {
val -> ob.value = create('CodeableConcept') as ce then {
val.originalText -> ce.text;
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');
} "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.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');
};
} "translation1";
};
} "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 : BL as value -> ob.value = create('boolean'), ob.value = (value.value);
obs.value : ST as value -> ob.value = create('string'), ob.value = (value.dataString);
obs.interpretationCode -> ob.interpretation;
obs.methodCode -> ob.method;
obs.performer as performer -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner then {
performer.assignedEntity as entity 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 uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), ob.performer = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "performer";
} "r";
} "identifier";
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";
};
};
obs.referenceRange as refRange -> ob.referenceRange = create('BackboneElement') as ref then {
refRange.observationRange as obsRange -> ref.low = create('SimpleQuantity') 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";
} "IVL-PQ";
} "obsRange";
} "refRange";
}
// ------------------------------------------------------------------------------------------------------
// Sezione Decorso Ospedaliero----------------------------------------------------------------------------
group ClinicalDocumentSectionDecorsoOspedaliero(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {
src.title as t -> tgt.title = (t.dataString);
src.code -> tgt.code;
src -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observation, observation.id = uuid() as uuid1, e1.fullUrl = append('https://example/Observation/', uuid1), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id), observation.note as note then {
src.code -> observation.code;
src where observation.statusCode.exists().not() then {
src -> observation.status = 'final' "status";
} "statuscode";
src -> observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
src -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
src.text as t -> note.text = t "reference";
src.author as auth -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
auth.time as ti -> note.time = create('dateTime') as value then TSDateTime(ti, value);
auth.assignedAuthor as assAuth then {
// meta+identifier
assAuth -> practitioner.meta as meta then {
assAuth -> meta.tag = create('Coding') as coding then {
assAuth -> coding.system = 'http://algoritmodiscoring' "system";
assAuth -> coding.code = 'ClinicalDocument/body/DecorsoOspedaliero/author' "code";
} "coding";
} "meta";
assAuth.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), note.author = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
assAuth.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";
assAuth.assignedPerson as assPers then {
assPers.name -> practitioner.name;
} "assPers";
} "assAuth";
} "Auth";
} "OB-note";
}
// --------------------------------------------------------------------------------------------------------
// Sezione Encounter---------------------------------------------------------------------------------------
group ClinicalDocumentSectionEncounter(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc1 : Encounter) {
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('Encounter') as encounter, encounter.id = uuid() as uuid1, e1.fullUrl = append('https://example/Encounter/', uuid1), request.url = 'Encounter', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) then {
entry1 -> encounter.partOf = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc1.id) "refer";
entry1 -> encounter.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "refer";
entry1 -> encounter.status = 'finished' "status";
entry1 -> encounter.class = create('Coding') as cl then {
entry1 -> cl.code = 'AMB' "code";
entry1 -> cl.display = 'ambulatory' "code";
} "class";
entry1.encounter as enc then {
enc.code -> encounter.type;
// effectiveTime=period
enc where effectiveTime.low.exists() or effectiveTime.high.exists() then {
enc.effectiveTime as eff -> encounter.period = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
// effectiveTime = time-stamp
enc where effectiveTime.low.exists().not() or effectiveTime.high.exists().not() then {
enc.effectiveTime as effectivetime1 -> encounter.period = create('Period') as period then {
effectivetime1 -> period.start = create('dateTime') as start then TSDateTime(effectivetime1, start) "val";
} "efft";
} "where";
// enc.effectiveTime as eff -> encounter.period = create('Period') as period then{
enc.participant as part where (typeCode != 'LOC') -> encounter.participant = create('BackboneElement') as patarg then {
part -> patarg.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.time as time1 -> patarg.period = create('Period') as period then {
time1 -> period.start = create('dateTime') as start then TSDateTime(time1, start) "val";
};
part.time as ti -> patarg.period = create('Period') as period then IVLTSPeriod(ti, period);
part.participantRole as partRole -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
// modifica meta+identifier
partRole -> practitioner.meta as meta then {
partRole -> meta.tag = create('Coding') as coding then {
partRole -> coding.system = 'http://algoritmodiscoring' "system";
partRole -> coding.code = 'ClinicalDocument/body/Encounter/participant' "code";
} "coding";
} "meta";
partRole.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), patarg.individual = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
partRole.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";
partRole.playingEntity as playEnt then {
playEnt.name -> practitioner.name;
} "playEnt";
} "partRole";
} "participant-ADM";
enc.participant as part where (typeCode = 'LOC') then {
part.time as tim -> encounter.location as locat then {
tim -> locat.period = create('Period') as period then IVLTSPeriod(tim, period) "time";
part.time as tim -> locat.period = create('Period') as period then {
tim -> period.start = create('dateTime') as start then TSDateTime(tim, start) "val";
};
part.participantRole as partRole -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Location') as location, location.id = uuid() as uuid1, e1.fullUrl = append('https://example/Location/', uuid1) then {
part -> location.meta as meta then {
part -> meta.tag = create('Coding') as coding then {
part -> coding.system = 'http://algoritmodiscoring' "system";
part -> coding.code = 'ClinicalDocument/body/Encounter/participant' "code";
} "coding";
} "meta";
partRole.id as id -> location.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 {
partRole -> request.url = append('Location?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> location.id = (r + '-' + ext) as uuid, e1.fullUrl = append('https://example/Location/', uuid), locat.location = create('Reference') as reference, reference.reference = ('https://example/Location/' + %location.id) "idasi";
} "r";
} "identifier";
partRole.code -> location.type;
} "partRole";
} "location";
} "participant2";
enc.entryRelationship as entr -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observation, observation.id = uuid() as uuid1, e1.fullUrl = append('https://example/Observation/', uuid1), request.url = 'Observation', encounter.reasonReference = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id) then {
entr.act as act then {
act.code -> observation.code;
act -> observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
act -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc1.id) "reference";
act where act.statusCode.exists().not() then {
act -> observation.status = 'final' "status";
} "statuscode";
act -> observation.note = create('Annotation') as note then {
act.text as text then {
text.reference as reff -> note.text = (reff.value);
};
act.text as tx then {
tx.reference as ref -> note.text = (ref.value) "val";
} "String";
act.author as auth -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
auth.time as ti -> note.time = create('dateTime') as value then TSDateTime(ti, value) "notetime";
auth.assignedAuthor as assAuth then {
assAuth -> practitioner.meta as meta then {
assAuth -> meta.tag = create('Coding') as coding then {
assAuth -> coding.system = 'http://algoritmodiscoring' "system";
assAuth -> coding.code = 'ClinicalDocument/body/Encounter/author' "code";
} "coding";
} "meta";
assAuth.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), note.author = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
assAuth.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";
// fine modifica
assAuth.time as t -> note.text = create('dateTime') as value then TSDateTime(t, value);
assAuth.assignedPerson as assPers then {
assPers.name -> practitioner.name;
} "name";
} "assAush";
} "practitioner";
} "note";
};
} "entryRel-SUBJ";
};
};
}
// --------------------------------------------------------------------------------------------------------
// Sezione Consulenza--------------------------------------------------------------------------------------
group ClinicalDocumentSectionConsulenza(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {
src.title as t -> tgt.title = (t.dataString);
src.code -> tgt.code;
src where src.entry.exists() then {
src.text as cdaText -> tgt.text as fhirText then {
cdaText -> fhirText.status = 'generated' "narrativeStatus";
cdaText as t -> fhirText.div = t "narrativeText";
} "cdaText";
} "entry-exists";
// Sezione Narrativa--------------------------------------------------------------------------------------------------------------------------------------------------
src where src.entry.exists().not() then {
src.text as cdaText -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'POST', e8.resource = create('ServiceRequest') as ServiceRequest, ServiceRequest.id = uuid() as uuid8, e8.fullUrl = append('https://example/ServiceRequest/', uuid8), request.url = 'ServiceRequest', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/ServiceRequest/' + %ServiceRequest.id) then {
src -> ServiceRequest.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
src -> ServiceRequest.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
src -> ServiceRequest.status = 'active' "status";
src -> ServiceRequest.intent = 'order' "intent";
cdaText -> ServiceRequest.note as note then {
cdaText as t -> note.text = t "reference";
} "reference";
} "cdaText";
} "where";
// Sezione Strutturata--------------------------------------------------------------------------------------------------------------------------------------------
src.entry as entry1 -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('ServiceRequest') as serviceRequest, serviceRequest.id = uuid() as uuid1, e1.fullUrl = append('https://example/ServiceRequest/', uuid1), request.url = 'ServiceRequest', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/ServiceRequest/' + %serviceRequest.id), serviceRequest.note as note then {
entry1 -> serviceRequest.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
entry1 -> serviceRequest.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
entry1 -> serviceRequest.status = 'active' "status";
entry1 -> serviceRequest.intent = 'order' "intent";
entry1.act as act then {
act.code -> serviceRequest.code;
act.text as t -> note.text = (t.dataString);
act.statusCode as code -> serviceRequest.status = (code.code);
act.performer as perf -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
perf.time as time -> serviceRequest.occurrence = create('dateTime') as t then TSDateTime(time, t);
perf.assignedEntity as assEnt then {
assEnt -> practitioner.meta as meta then {
assEnt -> meta.tag = create('Coding') as coding then {
assEnt -> coding.system = 'http://algoritmodiscoring' "system";
assEnt -> coding.code = 'ClinicalDocument/body/Consulenze/performer' "code";
} "coding";
} "meta";
assEnt.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), serviceRequest.performer = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
assEnt.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";
assEnt.assignedPerson as assPer then {
assPer.name -> practitioner.name;
} "assPer";
} "assEnt";
};
act.participant as parti -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
parti.time as time -> serviceRequest.authoredOn = create('dateTime') as t then TSDateTime(time, t);
parti.participantRole as partRole then {
partRole -> practitioner.meta as meta then {
partRole -> meta.tag = create('Coding') as coding then {
partRole -> coding.system = 'http://algoritmodiscoring' "system";
partRole -> coding.code = 'ClinicalDocument/body/Consulenze/participant' "code";
} "coding";
} "meta";
partRole.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), serviceRequest.requester = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
partRole.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";
partRole.playingEntity as entity then {
entity.name -> practitioner.name;
} "entity";
} "partRole";
};
} "ACT";
};
}
// ---------------------------------------------------------------------------------------------------------
// Sezione Accertamenti--------------------------------------------------------------------------------------
group ClinicalDocumentSectionAccertamenti(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {
src.title as t -> tgt.title = (t.dataString);
src.code -> tgt.code;
src where src.entry.exists() then {
src.text as cdaText -> tgt.text as fhirText then {
cdaText -> fhirText.status = 'generated' "narrativeStatus";
cdaText as t -> fhirText.div = t "narrativeText";
} "cdaText";
} "entryExists";
// Sezione Strutturata---------------------------------------------------------------------------------------------------------------------------------------------
src.entry as entry1 -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observation, observation.id = uuid() as uuid1, e1.fullUrl = append('https://example/Observation/', uuid1), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id) then {
entry1.organizer as obs then {
src.code -> observation.code;
obs then ObservationAccertamenti(obs, patient, enc, observation, bundle) "act";
} "obs";
};
// Sezione Narrativa--------------------------------------------------------------------------------------------------------------------------------------------
src where src.entry.exists().not() then {
src.text as cdaText -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'POST', e8.resource = create('Observation') as Observation, Observation.id = uuid() as uuid8, e8.fullUrl = append('https://example/Observation/', uuid8), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %Observation.id) then {
src -> Observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
src -> Observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
src.code -> Observation.code;
src where observation.statusCode.exists().not() then {
src -> Observation.status = 'final' "status";
} "statuscode";
cdaText -> Observation.note as note then {
cdaText as t -> note.text = t "reference";
} "reference";
} "cdaText";
} "where";
}
group ObservationAccertamenti(source obs : Observation, target patient : Patient, target encounter : Encounter, target ob : Observation, target bundle : Bundle) {
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 where obs.statusCode.exists().not() then {
obs -> ob.status = 'final' "status";
} "statuscode";
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.value : CD as val then {
val -> ob.value = create('CodeableConcept') as ce then {
val.originalText -> ce.text;
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');
} "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.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');
};
} "qual";
};
} "coding";
} "val";
obs.value : CE as val then {
val -> ob.value = create('CodeableConcept') as ce then {
val.originalText -> ce.text;
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');
} "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.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');
};
} "qual";
};
} "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);
obs.value : INT as int -> ob.value = (int.value);
obs.value : BL as boolean -> ob.value = (boolean.value) "boolean";
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.interpretationCode -> ob.interpretation;
obs.methodCode -> ob.method;
obs.referenceRange as refRange -> ob.referenceRange = create('BackboneElement') as ref then {
refRange.observationRange as obsRange -> ref.low = create('SimpleQuantity') 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";
} "IVL-PQ";
} "obsRange";
} "refRange";
obs.performer as performer -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
performer.assignedEntity as assEntity then {
// inizio modifica identifier+meta
assEntity -> practitioner.meta as meta then {
assEntity -> meta.tag = create('Coding') as coding then {
assEntity -> coding.system = 'http://algoritmodiscoring' "system";
assEntity -> coding.code = 'ClinicalDocument/body/Accertamenti/performer' "code";
} "coding";
} "meta";
assEntity.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), ob.performer = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
assEntity.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";
// fine modifica
assEntity.assignedPerson as assi then {
assi.name -> practitioner.name;
} "assi";
} "assEntity";
} "perf";
obs.participant as participant -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('ServiceRequest') as serviceRequest, serviceRequest.id = uuid() as uuid1, e1.fullUrl = append('https://example/ServiceRequest/', uuid1), request.url = 'ServiceRequest', ob.basedOn = create('Reference') as reference, reference.reference = ('https://example/ServiceRequest/' + %serviceRequest.id) then {
// participant.time as t -> serviceRequest.authoredOn = (t.value);
participant.time as t -> serviceRequest.authoredOn = create('dateTime') as value then TSDateTime(t, value) "value2";
obs -> serviceRequest.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
obs -> serviceRequest.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
obs -> serviceRequest.status = 'active' "status";
obs -> serviceRequest.intent = 'order' "intent";
participant.participantRole as participantRole -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
// modifica meta+identifier
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/Accertamenti/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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), serviceRequest.requester = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "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";
// fine modifica
participantRole.playingEntity as pe then {
pe.name -> practitioner.name;
} "pe";
};
};
obs.component as comp -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observation, observation.id = uuid() as uuid1, e1.fullUrl = append('https://example/Observation/', uuid1), request.url = 'Observation', ob.hasMember = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id) then {
comp.observation as obs then {
obs.code -> observation.code;
obs.statusCode as statusc where (code = 'completed') -> observation.status = 'final';
obs.statusCode as statusc where (code = 'active') -> observation.status = 'registered';
obs.statusCode as statusc where (code = 'aborted') -> observation.status = 'cancelled';
obs.statusCode as statusc where (code = 'suspended') -> observation.status = 'partial';
obs where obs.statusCode.exists().not() then {
obs -> observation.status = 'final' "status";
} "statuscode";
obs -> observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
obs -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
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.value as val -> observation.value = (val.dataString);
} "obs";
} "observation";
}
// -----------------------------------------------------------------------------------------------------------
// Sezione ParametriVitali--------------------------------------------------------------------------------------
group ClinicalDocumentSectionParametriVitali(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {
src.title as t -> tgt.title = (t.dataString);
src.code -> tgt.code;
src where src.entry.exists() then {
src.text as cdaText -> tgt.text as fhirText then {
cdaText -> fhirText.status = 'generated' "narrativeStatus";
cdaText as t -> fhirText.div = t "narrativeText";
} "cdaText";
} "entry-exists";
// Sezione Narrativa----------------------------------------------------------------------------------------------------------------------------------------------------
src where src.entry.exists().not() then {
src.text as cdaText -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'POST', e8.resource = create('Observation') as Observation, Observation.id = uuid() as uuid8, e8.fullUrl = append('https://example/Observation/', uuid8), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %Observation.id) then {
src -> Observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
src -> Observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
src.code -> Observation.code;
src where observation.statusCode.exists().not() then {
src -> Observation.status = 'final' "status";
} "statuscode";
cdaText -> Observation.note as note then {
cdaText as t -> note.text = t "reference";
} "reference";
} "cdaText";
} "where";
// Sezione Strutturata --------------------------------------------------------------------------------------------------------------------------------------------------------
src.entry as entry1 -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observation, observation.id = uuid() as uuid1, e1.fullUrl = append('https://example/Observation/', uuid1), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id) then {
entry1.organizer as org then {
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/' + %enc.id) "reference";
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 where obs.statusCode.exists().not() then {
org -> observation.status = 'final' "status";
} "statuscode";
org.code -> observation.code;
org where org.code.exists().not() then {
src.code -> observation.code;
} "code";
org.component as component -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observation1, observation1.id = uuid() as uuid1, e1.fullUrl = append('https://example/Observation/', uuid1), request.url = 'Observation', observation.hasMember = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation1.id) then {
component.observation as obs then {
obs -> observation1.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
obs -> observation1.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
obs.code -> observation1.code;
obs.statusCode -> observation1.status;
obs.statusCode as statusc where (code = 'completed') -> observation1.status = 'final';
obs.statusCode as statusc where (code = 'active') -> observation1.status = 'registered';
obs.statusCode as statusc where (code = 'aborted') -> observation1.status = 'cancelled';
obs.statusCode as statusc where (code = 'suspended') -> observation1.status = 'partial';
obs where obs.statusCode.exists().not() then {
obs -> observation1.status = 'final' "status";
} "statuscode";
obs -> observation1.value = create('Quantity') as quant then {
obs.value as v -> quant.value = (v.value);
obs.value as v -> quant.unit = (v.unit);
} "quant";
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 : ST as value -> ob.value = create('string'), ob.value = (value.dataString);
obs.value : INT as int -> ob.value = (int.value);
obs.value : BL as boolean -> ob.value = (boolean.value) "boolean";
obs.interpretationCode -> observation1.interpretation;
obs.methodCode -> observation1.method;
obs.targetSiteCode -> observation1.bodySite;
obs.performer as performer -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
performer.time as t -> observation1.issued = create('dateTime') as date then TSDateTime(t, date);
performer.assignedEntity as assEntity then {
// inizio modifica meta+ identifier
assEntity -> practitioner.meta as meta then {
assEntity -> meta.tag = create('Coding') as coding then {
assEntity -> coding.system = 'http://algoritmodiscoring' "system";
assEntity -> coding.code = 'ClinicalDocument/body/ParametriVitali/performer' "code";
} "coding";
} "meta";
assEntity.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), observation1.performer = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
assEntity.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";
// fine modifica
assEntity.assignedPerson as assPerson then {
assPerson.name -> practitioner.name;
} "assPerson";
} "assEntity";
};
obs.participant as parti -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('ServiceRequest') as serviceRequest, serviceRequest.id = uuid() as uuid1, e1.fullUrl = append('https://example/ServiceRequest/', uuid1), request.url = 'ServiceRequest', observation1.basedOn = create('Reference') as reference, reference.reference = ('https://example/ServiceRequest/' + %serviceRequest.id) then {
parti -> serviceRequest.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
parti -> serviceRequest.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
parti -> serviceRequest.status = 'active' "status";
parti -> serviceRequest.intent = 'order' "intent";
parti.time as t -> serviceRequest.authoredOn = create('dateTime') as value then TSDateTime(t, value) "value2";
parti.participantRole as partRole -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
// inizio modifica meta + identifier
partRole -> practitioner.meta as meta then {
partRole -> meta.tag = create('Coding') as coding then {
partRole -> coding.system = 'http://algoritmodiscoring' "system";
partRole -> coding.code = 'ClinicalDocument/body/ParametriVitali/participant' "code";
} "coding";
} "meta";
partRole.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), serviceRequest.requester = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
partRole.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";
// fine modifica
partRole.playingEntity as playingEntity then {
playingEntity.name -> practitioner.name;
} "name";
} "partRole";
} "parti";
} "obs";
};
} "obs";
} "Observation";
}
// -----------------------------------------------------------------------------------------------------------------
// Sezione terapia Farma in Pronto----------------------------------------------------------------------------------
group ClinicalDocumentSectionTerapiaFarmacoInPronto(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {
src.title as t -> tgt.title = (t.dataString);
src.code -> tgt.code;
src where src.entry.exists() then {
src.text as cdaText -> tgt.text as fhirText then {
cdaText -> fhirText.status = 'generated' "narrativeStatus";
cdaText as t -> fhirText.div = t "narrativeText";
} "cdaText";
} "entry-exists";
// Sezione Narrativa------------------------------------------------------------------------------------------------------------------------------------------------
src where src.entry.exists().not() then {
src.text as cdaText -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'POST', e8.resource = create('MedicationAdministration') as MedicationAdministration, MedicationAdministration.id = uuid() as uuid8, e8.fullUrl = append('https://example/MedicationAdministration/', uuid8), request.url = 'MedicationAdministration', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/MedicationAdministration/' + %MedicationAdministration.id) then {
src -> MedicationAdministration.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
src -> MedicationAdministration.context = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
src -> MedicationAdministration.effective = create('Period') as period then {
src -> period.start = (start.now()) "low";
src -> period.end = (end.now()) "high";
} "Period";
src where sub.statusCode.exists().not() then {
src -> MedicationAdministration.status = 'completed' "status";
} "statuscode";
cdaText -> MedicationAdministration.note as note then {
cdaText as t -> note.text = t "reference";
cdaText -> MedicationAdministration.medication = create('CodeableConcept') as medication then {
cdaText as txt -> medication.text = txt "text";
} "medication";
} "reference";
} "cdaText";
} "where";
// Sezione Strutturata-------------------------------------------------------------------------------------------------------------------------------------------------
src.entry as entry1 -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('MedicationAdministration') as medAdm, medAdm.id = uuid() as uuid1, e1.fullUrl = append('https://example/MedicationAdministration/', uuid1), request.url = 'MedicationAdministration', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/MedicationAdministration/' + %medAdm.id), medAdm.note as note then {
entry1 -> medAdm.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
entry1 -> medAdm.context = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
entry1.substanceAdministration as sub then {
sub.text as tx then {
tx.reference as reff -> note.text = (reff.value);
} "txx";
sub.statusCode -> medAdm.status;
// sub.effectiveTime: IVL_TS as eff -> medAdm.effective =create('Period') as period then IVLTSPeriod(eff,period); CHECK THIS
sub.effectiveTime as eff -> medAdm.effective = create('Period') as period then IVLTSPeriod(eff, period);
sub.effectiveTime : PIVL_TS as eff -> medAdm.dosage as dosage then {
eff -> dosage.rate = create('Ratio') as ratio then {
eff -> ratio.numerator = create('Quantity') as num then {
eff.period as per -> num.value = (per.value);
eff.period as per -> num.unit = (per.unit);
} "num";
eff -> ratio.denominator = create('Quantity') as num then {
eff.period as per -> num.value = '1';
eff.period as per -> num.unit = (per.unit);
} "den";
} "ratio";
} "eff2";
sub -> medAdm.dosage as dosage then {
sub.routeCode -> dosage.route;
} "route";
sub -> medAdm.dosage as dosage then {
sub.approachSiteCode -> dosage.site;
} "route";
sub -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('MedicationRequest') as medRq, medRq.id = uuid() as uuid1, e1.fullUrl = append('https://example/MedicationRequest/', uuid1), request.url = 'MedicationRequest', medAdm.request = create('Reference') as reference, reference.reference = ('https://example/MedicationRequest/' + %medRq.id) then {
sub.entryRelationship as rel then {
rel.supply as supl -> medRq.dispenseRequest = create('BackboneElement') as disp then {
supl -> disp.quantity = create('SimpleQuantity') as q then {
supl.quantity as qua -> q.value = (qua.value) "fds";
} "SimpleQuantity";
} "obs";
} "rel";
sub -> medRq.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
sub -> medRq.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
sub -> medRq.status = 'active' "status";
sub -> medRq.intent = 'order' "intent";
sub -> medRq.medication = create('CodeableConcept') as cod then {
sub -> cod.text = 'medication' "Medi";
} "code";
sub.doseQuantity as quantity then {
quantity -> medRq.dosageInstruction = create('Dosage') as dosage then {
quantity -> dosage.doseAndRate as dosRange then {
quantity -> dosRange.dose = create('Range') as range then {
quantity -> range.low = create('SimpleQuantity') as quant then {
quantity.low as l -> quant.value = (l.value) "v1";
quantity.low as l -> quant.unit = (l.unit) "v1";
} "low";
quantity -> range.high = create('SimpleQuantity') as quant then {
quantity.high as h -> quant.value = (h.value) "v1";
quantity.high as h -> quant.unit = (h.unit) "v1";
} "high";
} "range";
} "dos";
} "dosage";
} "dose-quantity";
sub.rateQuantity as rate then {
rate -> medRq.dosageInstruction = create('Dosage') as dosage then {
rate -> dosage.doseAndRate as dosRange then {
rate -> dosRange.dose = create('Range') as range then {
rate -> range.low = create('SimpleQuantity') as quant then {
rate.low as l -> quant.value = (l.value) "v1";
rate.low as l -> quant.unit = (l.unit) "v1";
} "low";
rate -> range.high = create('SimpleQuantity') as quant then {
rate.high as h -> quant.value = (h.value) "v1";
rate.high as h -> quant.unit = (h.unit) "v1";
} "high";
} "range";
} "dos";
} "dosage";
} "Rate-quantity";
sub.participant as part then {
part.time as t -> medRq.authoredOn = create('dateTime') as date then TSDateTime(t, date);
part.participantRole as partRole -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
// inizio meta+identifier
partRole -> practitioner.meta as meta then {
partRole -> meta.tag = create('Coding') as coding then {
partRole -> coding.system = 'http://algoritmodiscoring' "system";
partRole -> coding.code = 'ClinicalDocument/body/TerapiaFarmacologicaPS/participant' "code";
} "coding";
} "meta";
partRole.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), medRq.requester = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
partRole.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";
// fine modifiche
partRole.id -> practitioner.identifier;
partRole.playingEntity as play then {
play.name -> practitioner.name;
} "play";
} "Part";
} "part";
} "medicationRequest";
sub -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Medication') as med, med.id = uuid() as uuid1, e1.fullUrl = append('https://example/Medication/', uuid1), request.url = 'Medication', medAdm.medication = create('Reference') as reference, reference.reference = ('https://example/Medication/' + %med.id) then {
sub.administrationUnitCode as adduni then {
sub.administrationUnitCode -> med.form;
sub.consumable as consum then {
consum.manufacturedProduct as manuProd then {
manuProd.manufacturedMaterial as manuMt then {
manuMt.code -> med.code;
} "manuMat";
} "manuMat";
} "consum";
} "unicode";
sub.entryRelationship as entryR then {
entryR.observation as observation then {
observation.code where displayName = 'Grammatura' -> med.ingredient as ingredient then {
sub.consumable as consumable then {
consumable.manufacturedProduct as manufacturedProduct then {
manufacturedProduct.manufacturedMaterial as manufacturedMaterial then {
manufacturedMaterial.code as code -> ingredient.item = create('CodeableConcept') as value then CECodeableConcept(code, value) "CE";
} "material";
} "product";
};
observation.value as value -> ingredient.strength as strength then {
value -> strength.numerator as numerator then {
value -> numerator.value = (value.value) "valueN";
} "numerator";
value -> strength.denominator as denominator then {
value -> denominator.value = 1 "valueD";
} "denominator";
} "strenght";
} "ingredient";
observation.code where displayName = 'Quantità nella Confezione' then {
observation.value as value -> med.amount as amount then {
value -> amount.numerator as numerator then {
value -> numerator.value = (value.value) "valueN";
} "numerator";
value -> amount.denominator as denominator then {
value -> denominator.value = 1 "valueD";
} "denominator";
} "amount";
} "quantita";
} "obs";
} "entry-R";
} "med";
sub.performer as perf -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
perf -> medAdm.note as note then {
perf -> note.text = 'performertime' "notaa";
perf.time as t -> note.time = create('dateTime') as value then TSDateTime(t, value) "notetime";
} "preftime";
perf.assignedEntity as ent then {
// inizio modifica meta+identifier
ent -> practitioner.meta as meta then {
ent -> meta.tag = create('Coding') as coding then {
ent -> coding.system = 'http://algoritmodiscoring' "system";
ent -> coding.code = 'ClinicalDocument/body/TerapiaFarmacologicaPS/performer' "code";
} "coding";
} "meta";
ent.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), medAdm.performer as p, p.actor = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
ent.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";
// fine modifica
ent.assignedPerson as assPerson then {
assPerson.name -> practitioner.name;
} "assperson";
} "ent";
} "perform";
} "MedAdm";
};
}
// ------------------------------------------------------------------------------------------------------------------
// -
group ClinicalDocumentSectionPianoCuraDimissione(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {
src.title as t -> tgt.title = (t.dataString);
src.code -> tgt.code;
src as entry1 -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('CarePlan') as careplan, careplan.id = uuid() as uuid1, e1.fullUrl = append('https://example/CarePlan/', uuid1), request.url = 'CarePlan', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/CarePlan/' + %careplan.id) then {
src -> careplan.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
src -> careplan.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
src -> careplan.status = 'active' "status";
src -> careplan.intent = 'order' "intent";
src.text as cdaText -> careplan.note as carenote then {
cdaText as t -> carenote.text = t "notetxt";
entry1.author as author then {
author.time as t -> carenote.time = create('dateTime') as value then TSDateTime(t, value) "notetime";
author.assignedAuthor as assauthor -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
// inizio modifica meta+identifier
assauthor -> practitioner.meta as meta then {
assauthor -> meta.tag = create('Coding') as coding then {
assauthor -> coding.system = 'http://algoritmodiscoring' "system";
assauthor -> coding.code = 'ClinicalDocument/body/PianoCuraDimissione/author' "code";
} "coding";
} "meta";
assauthor.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), carenote.author = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
assauthor.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";
// fine modifica
assauthor.assignedPerson as pers then {
pers.name -> practitioner.name;
} "namepers";
} "authpract";
} "CFauthor";
} "author";
entry1.entry as entry2 then {
entry2.act as entryact -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('ServiceRequest') as servicerequest, servicerequest.id = uuid() as uuid1, e1.fullUrl = append('https://example/ServiceRequest/', uuid1), request.url = 'ServiceRequest', careplan.activity = create('BackboneElement') as activ, activ.reference = create('Reference') as reference, reference.reference = ('https://example/ServiceRequest/' + %servicerequest.id) then {
entryact -> servicerequest.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
entryact -> servicerequest.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
entryact -> servicerequest.status = 'active' "status";
entryact -> servicerequest.intent = 'order' "intent";
entryact -> servicerequest.identifier = create('BackboneElement') as identif then {
entryact.reference as actref then {
actref.externalAct as extact then {
extact -> servicerequest.identifier = create('BackboneElement') as identif3 then {
extact.id as id then {
id.root as r -> identif3.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
id.extension as ext -> identif3.value = ext then {
id.assigningAuthorityName as s -> identif3.assigner as a, a.display = s;
} "ext";
} "idnetn";
} "extact";
} "actref";
} "jarilemes";
entryact.code -> servicerequest.code;
entryact.statusCode -> servicerequest.status;
entryact.author as actauthor then {
actauthor.time as t -> servicerequest.authoredOn = create('dateTime') as date then TSDateTime(t, date);
actauthor.assignedAuthor as assauthor -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
// inizio modifica identifier
assauthor -> practitioner.meta as meta then {
assauthor -> meta.tag = create('Coding') as coding then {
assauthor -> coding.system = 'http://algoritmodiscoring' "system";
assauthor -> coding.code = 'ClinicalDocument/body/PianoCuraDimissione/author' "code";
} "coding";
} "meta";
assauthor.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), servicerequest.requester = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
assauthor.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";
// fine modifica
assauthor.assignedPerson as pers then {
pers.name -> practitioner.name;
} "namepers";
} "author";
} "servReq";
} "entry2";
} "carnote";
} "entry1";
} "entryident3";
}
// -------Dimissione------------------------------------------------------------------------------------------------------
group ClinicalDocumentSectionDimissione(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {
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 then {
entry1.act as act -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Encounter') as encountert, encountert.id = uuid() as uuid1, e1.fullUrl = append('https://example/Encounter/', uuid1), request.url = 'Encounter', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encountert.id) then {
act -> encountert.status = 'finished' "status";
act -> encountert.class = create('Coding') as cl then {
act -> cl.code = 'AMB' "code";
act -> cl.display = 'ambulatory' "code";
} "class";
act -> encountert.partOf = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + enc.id) "refenc";
act -> encountert.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + patient.id) "refpatient";
act.code -> encountert.type;
act where effectiveTime.low.exists() or effectiveTime.high.exists() then {
act.effectiveTime as eff -> encountert.period = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
// effectiveTime = time-stamp
act where effectiveTime.low.exists().not() or effectiveTime.high.exists().not() then {
act.effectiveTime as effectivetime1 -> encountert.period = create('Period') as period then {
effectivetime1 -> period.start = create('dateTime') as start then TSDateTime(effectivetime1, start) "val";
} "efft";
} "where";
act.performer as performer -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
// performer.time as ti -> note.time = (ti.value);
performer.assignedEntity as assEnty then {
assEnty -> practitioner.meta as meta then {
assEnty -> meta.tag = create('Coding') as coding then {
assEnty -> coding.system = 'http://algoritmodiscoring' "system";
assEnty -> coding.code = 'ClinicalDocument/body/Dimissione/performer' "code";
} "coding";
} "meta";
assEnty.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), encountert.participant as perf then {
performer -> perf.period = create('Period') as period then {
performer.time as time -> period.start = create('dateTime') as start then TSDateTime(time, start);
} "period";
performer -> perf.individual = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "perf";
} "r";
} "identifier";
assEnty.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";
assEnty.assignedPerson as assPers then {
assPers.name -> practitioner.name;
} "assPer";
} "ass";
} "erformer";
// Encounter Post dimissione---------------------------------------------------------------------------------------------------------------------------------------
act.entryRelationship as entriRel then {
entriRel.encounter as enc1 then {
enc1 -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Encounter') as encountert1, encountert1.id = uuid() as uuid1, e1.fullUrl = append('https://example/Encounter/', uuid1), request.url = 'Encounter', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encountert1.id), encountert1.partOf = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + encountert.id) then {
enc1 -> encountert1.status = 'finished' "status";
enc1 -> encountert1.class = create('Coding') as cl then {
enc1 -> cl.code = 'AMB' "code";
enc1 -> cl.display = 'ambulatory' "code";
} "class";
enc1 -> encountert1.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + patient.id) "refpatient";
enc1.id -> encountert1.identifier;
// enc1.code -> encountert1.type;
enc1 -> encountert1.type = create('CodeableConcept') as ti then {
enc1 -> ti.coding = create('Coding') as cod then {
enc1.code as c -> cod.code = (c.code);
enc1.code as c then {
c.codeSystem as s -> cod.system = translate(s, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "system";
} "syst";
enc1.code as c -> cod.display = (c.displayName) "dispaly";
} "coding";
enc1.text as tx then {
tx.reference as ref -> ti.text = (ref.value) "val";
};
} "code";
enc1 where effectiveTime.low.exists() or effectiveTime.high.exists() then {
enc1.effectiveTime as eff -> encountert1.period = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
// effectiveTime = time-stamp
enc1 where effectiveTime.low.exists().not() or effectiveTime.high.exists().not() then {
enc1.effectiveTime as effectivetime1 -> encountert1.period = create('Period') as period then {
effectivetime1 -> period.start = create('dateTime') as start then TSDateTime(effectivetime1, start) "val";
} "efft";
} "where";
enc1.participant as part where (typeCode = 'LOC') -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Location') as location, location.id = uuid() as uuid1, e1.fullUrl = append('https://example/Location/', uuid1), request.url = append('Location/', uuid1) then {
part -> location.meta as meta then {
part -> meta.tag = create('Coding') as coding then {
part -> coding.system = 'http://algoritmodiscoring' "system";
part -> coding.code = 'ClinicalDocument/body/Dimissione/participant' "code";
} "coding";
} "meta";
part.time as tim -> encountert1.location as locat then {
tim -> locat.period = create('Period') as period then IVLTSPeriod(tim, period) "time";
part.time as tim -> locat.period = create('Period') as period then {
tim -> period.start = create('dateTime') as start then TSDateTime(tim, start) "val";
};
part.participantRole as partRole then {
partRole.id as id -> location.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 {
partRole -> request.url = append('Location?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> location.id = (r + '-' + ext) as uuid, e1.fullUrl = append('https://example/Location/', uuid), locat.location = create('Reference') as reference, reference.reference = ('https://example/Location/' + %location.id) "idasi";
} "r";
} "identifier";
// partRole.id -> location.identifier;
partRole.code -> location.type;
} "partRole";
} "location1";
} "Location";
enc1.entryRelationship as entryrel2 -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observation, observation.id = uuid() as uuid1, e1.fullUrl = append('https://example/Observation/', uuid1), request.url = 'Observation', encountert1.reasonReference = create('BackboneElement') as reference, reference.reference = ('https://example/Observation/' + %observation.id) then {
entryrel2.observation as obs then {
obs -> observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
obs -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encountert1.id) "reference";
obs.code -> observation.code;
obs.statusCode as statusc where (code = 'completed') -> observation.status = 'final';
obs.statusCode as statusc where (code = 'active') -> observation.status = 'registered';
obs.statusCode as statusc where (code = 'aborted') -> observation.status = 'cancelled';
obs.statusCode as statusc where (code = 'suspended') -> observation.status = 'partial';
obs -> observation.status = 'final' "notpresent";
obs.effectiveTime as effectiveTime -> observation.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value2";
obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {
obs.effectiveTime as eff -> observation.effective = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
obs.value : INT as int -> observation.value = (int.value);
obs.value : BL as boolean -> observation.value = (boolean.value) "boolean";
obs.value : CE as val then {
val -> observation.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 -> observation.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 -> observation.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 -> observation.value = create('string'), observation.value = (value.dataString);
} "obs";
} "entryrel2";
} "enc1";
} "enc";
} "entriRel";
// Trasferimento post dimissione-------------------------------------------------------------------------------------------------------------------------------------
act.entryRelationship as entriRel2 then {
entriRel2.act as a then {
a -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Encounter') as encountert2, encountert2.id = uuid() as uuid1, e1.fullUrl = append('https://example/Encounter/', uuid1), request.url = 'Encounter', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + encountert2.id), encountert2.partOf = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + encountert.id) then {
a -> encountert2.status = 'finished' "status";
a -> encountert2.class = create('Coding') as cl then {
a -> cl.code = 'AMB' "code";
a -> cl.display = 'ambulatory' "code";
} "class";
a -> encountert2.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + patient.id) "refpatient";
a where effectiveTime.low.exists() or effectiveTime.high.exists() then {
a.effectiveTime as eff -> encountert2.period = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
// effectiveTime = time-stamp
a where effectiveTime.low.exists().not() or effectiveTime.high.exists().not() then {
a.effectiveTime as effectivetime1 -> encountert2.period = create('Period') as period then {
effectivetime1 -> period.start = create('dateTime') as start then TSDateTime(effectivetime1, start) "val";
} "efft";
} "where";
a -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Location') as location, location.id = uuid() as uuid1, e1.fullUrl = append('https://example/Location/', uuid1), request.url = append('Location/', uuid1) then {
a.text as tx then {
tx.reference as ref -> location.description = (ref.value) "dfs";
};
a.participant as part then {
part -> location.meta as meta then {
part -> meta.tag = create('Coding') as coding then {
part -> coding.system = 'http://algoritmodiscoring' "system";
part -> coding.code = 'ClinicalDocument/body/Dimissione/act' "code";
} "coding";
} "meta";
part.time as tim -> encountert2.location as locat then {
tim -> locat.period = create('Period') as period then IVLTSPeriod(tim, period) "time";
part.time as tim -> locat.period = create('Period') as period then {
tim -> period.start = create('dateTime') as start then TSDateTime(tim, start) "val";
};
part.participantRole as partRole then {
partRole.id as id -> location.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 {
partRole -> request.url = append('Location?identifier=', ext) "UUID";
} "ext";
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> location.id = (r + '-' + ext) as uuid, e1.fullUrl = append('https://example/Location/', uuid), locat.location = create('Reference') as reference, reference.reference = ('https://example/Location/' + %location.id) "idasi";
} "r";
} "identifier";
// partRole.id -> location.identifier;
partRole.code -> location.type;
} "partRole";
} "loc2";
} "Location";
} "loc";
a.entryRelationship as entryrel2 -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observation, observation.id = uuid() as uuid1, e1.fullUrl = append('https://example/Observation/', uuid1), request.url = 'Observation', encountert2.reasonReference = create('BackboneElement') as reference, reference.reference = ('https://example/Observation/' + %observation.id) then {
entryrel2.observation as obs then {
obs -> observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
obs -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encountert2.id) "reference";
obs.code -> observation.code;
obs.statusCode as statusc where (code = 'completed') -> observation.status = 'final';
obs.statusCode as statusc where (code = 'active') -> observation.status = 'registered';
obs.statusCode as statusc where (code = 'aborted') -> observation.status = 'cancelled';
obs.statusCode as statusc where (code = 'suspended') -> observation.status = 'partial';
obs -> observation.status = 'final' "notpresent";
obs.effectiveTime as effectiveTime -> observation.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value2";
obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {
obs.effectiveTime as eff -> observation.effective = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
obs.value : INT as int -> observation.value = (int.value);
obs.value : BL as boolean -> observation.value = (boolean.value) "boolean";
obs.value : CE as val then {
val -> observation.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 -> observation.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 -> observation.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 -> observation.value = create('string'), observation.value = (value.dataString);
} "obs";
} "entryrel2";
} "act";
} "a";
} "entri-act";
// --------------Diagnosi alla dimissione-------------------------------------------------------------
act.entryRelationship as entryrel2 then {
entryrel2.observation as obs then {
obs.code as code where (code = '29308-4') -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observation, observation.id = uuid() as uuid1, e1.fullUrl = append('https://example/Observation/', uuid1), request.url = 'Observation', encountert.reasonReference = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id) then {
obs -> observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
obs -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encountert.id) "reference";
obs.code -> observation.code;
obs.statusCode as statusc where (code = 'completed') -> observation.status = 'final';
obs.statusCode as statusc where (code = 'active') -> observation.status = 'registered';
obs.statusCode as statusc where (code = 'aborted') -> observation.status = 'cancelled';
obs.statusCode as statusc where (code = 'suspended') -> observation.status = 'partial';
// obs where obs.statusCode.exists().not() then {
obs -> observation.status = 'final' "status";
// }"statuscode";
obs.effectiveTime as effectiveTime -> observation.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value2";
obs where effectiveTime.low.exists() or effectiveTime.high.exists() then {
obs.effectiveTime as eff -> observation.effective = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
obs.value as val then {
val -> observation.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 : INT as int -> ob.value = (int.value);
obs.value : BL as boolean -> ob.value = (boolean.value) "boolean";
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);
} "222";
} "obs";
} "entryrel2";
// --------Esito----------------------------
act.entryRelationship as entriRel3 then {
entriRel3.observation as obs2 then {
obs2.code as code then {
code.code where (code.code = '11302-7') then {
obs2 -> encountert.hospitalization as hospital then {
obs2.value -> hospital.dischargeDisposition;
} "hospital";
} "entry-obs1";
} "act";
} "x";
} "3";
};
} "entry1";
src.entry as entry1 then {
entry1.observation as obs then {
obs -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observation, observation.id = uuid() as uuid1, e1.fullUrl = append('https://example/Observation/', uuid1), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id) then {
obs.value as val where ('xsi:type' = 'BL') -> observation.value = (val.value);
obs then Observation(obs, patient, enc, observation, bundle) "act";
} "obstarg";
} "obs";
};
}
// -----------------------------------------------------------------------------------------------------------------------
// ------------------------------TerapiaFarmacologicaDimissione-----------------------------------------------------------------------------------------
group ClinicalDocumentSectionTerapiaFarmacologicaDimissione(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {
src.title as t -> tgt.title = (t.dataString);
src.code -> tgt.code;
// Sezione Narrativa------------------------------------------------------------------------------------------------------------------------------------------------
src where src.entry.exists().not() then {
src.text as cdaText -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('MedicationRequest') as medRq, medRq.id = uuid() as uuid1, e1.fullUrl = append('https://example/MedicationRequest/', uuid1), request.url = 'MedicationRequest', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/MedicationRequest/' + %medRq.id), medRq.note = create('Annotation') as note then {
cdaText -> note.text = cdaText "reference";
cdaText -> medRq.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
cdaText -> medRq.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
cdaText -> medRq.status = 'active' "status";
cdaText -> medRq.intent = 'order' "intent";
src.author as auth -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
auth.time as t -> note.time = create('dateTime') as value then TSDateTime(t, value);
auth.assignedAuthor as assAuth then {
// assAuth.time -> note.time;
assAuth -> practitioner.meta as meta then {
assAuth -> meta.tag = create('Coding') as coding then {
assAuth -> coding.system = 'http://algoritmodiscoring' "system";
assAuth -> coding.code = 'ClinicalDocument/body/TerapiaFarmacologicaDimissione/author' "code";
} "coding";
} "meta";
assAuth.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), note.author = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
assAuth.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";
assAuth.assignedPerson as asspers then {
asspers.name -> practitioner.name;
} "assPers";
} "assAuth";
} "auth";
src -> medRq.medication = create('CodeableConcept') as medication then {
src.text as txt -> medication.text = txt;
} "medicationesiste";
} "note";
} "text";
// Sezione Strutturata------------------------------------------------------------------------------------------------------------------------------------------
src where src.entry.exists() then {
src -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('MedicationRequest') as medRq, medRq.id = uuid() as uuid1, e1.fullUrl = append('https://example/MedicationRequest/', uuid1), request.url = 'MedicationRequest', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/MedicationRequest/' + %medRq.id), medRq.note = create('Annotation') as note then {
src.text as t -> note.text = t "reference";
src -> medRq.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
src -> medRq.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
src -> medRq.status = 'active' "status";
src -> medRq.intent = 'order' "intent";
src.author as auth -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as practitioner, practitioner.id = uuid() as uuid1, e1.fullUrl = append('https://example/Practitioner/', uuid1), request.url = append('Practitioner/', uuid1) then {
auth.time as t -> note.time = create('dateTime') as value then TSDateTime(t, value);
auth.assignedAuthor as assAuth then {
// assAuth.time -> note.time;
assAuth -> practitioner.meta as meta then {
assAuth -> meta.tag = create('Coding') as coding then {
assAuth -> coding.system = 'http://algoritmodiscoring' "system";
assAuth -> coding.code = 'ClinicalDocument/body/TerapiaFarmacologicaDimissione/author' "code";
} "coding";
} "meta";
assAuth.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;
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, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), note.author = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "aut";
} "r";
} "identifier";
assAuth.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";
assAuth.assignedPerson as asspers then {
asspers.name -> practitioner.name;
} "assPers";
} "assAuth";
} "auth";
src.entry as entry1 then {
entry1.substanceAdministration as sub then {
sub.statusCode -> medRq.status;
sub -> medRq.dosageInstruction = create('Dosage') as dosage then {
sub -> dosage.timing = create('Timing') as tim then {
sub.effectiveTime as eff -> tim.repeat as repeat then {
eff -> repeat.bounds = create('Period') as period then IVLTSPeriod(eff, period) "boundsperiod";
} "repeat";
} "timing";
} "dosage";
sub.effectiveTime : PIVL_TS as eff -> medRq.dosageInstruction = create('Dosage') as dosage then {
eff -> dosage.timing = create('Timing') as timing then periodTiming(eff, timing) "cod";
} "eff";
sub -> medRq.dosageInstruction = create('Dosage') as dosage then {
sub.routeCode -> dosage.route;
} "dosage";
sub -> medRq.dosageInstruction = create('Dosage') as dosage then {
sub.approachSiteCode -> dosage.site;
} "dosage";
sub.doseQuantity as doseQuant then {
doseQuant -> medRq.dosageInstruction = create('Dosage') as dosageInstruction then {
doseQuant.originalText as ot then {
ot.reference -> dosageInstruction.text;
} "ot";
doseQuant -> dosageInstruction.doseAndRate as dosageRate then {
doseQuant -> dosageRate.dose = create('Range') as d then {
doseQuant -> d.low = create('SimpleQuantity') as l then {
doseQuant.low as lo -> l.value = (lo.value);
doseQuant.low as lo -> l.unit = (lo.unit);
} "low";
doseQuant -> d.high = create('SimpleQuantity') as h then {
doseQuant.high as hi -> h.value = (hi.value);
doseQuant.high as hi -> h.unit = (hi.unit);
} "low";
} "d";
} "dosageRate";
sub.rateQuantity as rateQuantity -> medRq.dosageInstruction = create('Dosage') as dosageInstruction1 then {
rateQuantity.originalText as ot then {
ot.reference -> dosageInstruction1.text;
} "ot";
rateQuantity -> dosageInstruction1.doseAndRate as dosageRate then {
rateQuantity -> dosageRate.rate = create('Range') as d then {
rateQuantity -> d.low = create('SimpleQuantity') as l then {
rateQuantity.low as lo -> l.value = (lo.value);
rateQuantity.low as lo -> l.unit = (lo.unit);
} "low";
rateQuantity -> d.high = create('SimpleQuantity') as h then {
rateQuantity.high as hi -> h.value = (hi.value);
rateQuantity.high as hi -> h.unit = (hi.unit);
} "low";
} "d";
} "qualcosa";
} "dosageRate";
} "Dosage";
} "doseQuant";
sub -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Medication') as medication, medication.id = uuid() as uuid1, e1.fullUrl = append('https://example/Medication/', uuid1), request.url = 'Medication', medRq.medication = create('Reference') as reference, reference.reference = ('https://example/Medication/' + %medication.id) then {
sub.administrationUnitCode -> medication.form;
sub.consumable as cons then {
cons.manufacturedProduct as manuprod then {
manuprod.manufacturedMaterial as manufact then {
manufact.code -> medication.code;
} "manuFact";
} "manumat";
} "cons";
sub.entryRelationship as entryR then {
entryR.observation as observation then {
observation.code where displayName = 'Grammatura' -> medication.ingredient as ingredient then {
sub.consumable as consumable then {
consumable.manufacturedProduct as manufacturedProduct then {
manufacturedProduct.manufacturedMaterial as manufacturedMaterial then {
manufacturedMaterial.code as code -> ingredient.item = create('CodeableConcept') as value then CECodeableConcept(code, value) "CE";
} "material";
} "product";
};
observation.value as value -> ingredient.strength as strength then {
value -> strength.numerator as numerator then {
value -> numerator.value = (value.value) "valueN";
} "numerator";
value -> strength.denominator as denominator then {
value -> denominator.value = 1 "valueD";
} "denominator";
} "strenght";
} "ingredient";
observation.code where displayName = 'Quantità nella Confezione' then {
observation.value as value -> medication.amount as amount then {
value -> amount.numerator as numerator then {
value -> numerator.value = (value.value) "valueN";
} "numerator";
value -> amount.denominator as denominator then {
value -> denominator.value = 1 "valueD";
} "denominator";
} "amount";
} "quantita";
} "obs";
} "entryR";
sub.participant as part -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'PUT', e1.resource = create('Practitioner') as participant, participant.id = uuid() as uuid1, e1.fullUrl = append('https://example/Participant/', uuid1), request.url = append('Participant/', uuid1) then {
part.time as t -> medRq.authoredOn = create('dateTime') as date then TSDateTime(t, date) "authoredOn";
part.participantRole as partRole then {
partRole -> participant.meta as meta then {
partRole -> meta.tag = create('Coding') as coding then {
partRole -> coding.system = 'http://algoritmodiscoring' "system";
partRole -> coding.code = 'ClinicalDocument/body/TerapiaFarmacologicaDimissione/participant' "code";
} "coding";
} "meta";
partRole.id as id -> participant.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;
id.assigningAuthorityName as s -> identifier.assigner as a, a.display = s;
id.root as r then {
id.extension as ext -> participant.id = (r + '-' + ext) as uuid2, e1.fullUrl = append('https://example/Practitioner/', uuid2), request.url = append('Practitioner/', uuid2), medRq.requester = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %participant.id) "aut";
} "r";
} "identifier";
partRole.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";
partRole.playingEntity as playent then {
playent.name -> participant.name;
} "playent";
} "partRole";
};
sub.reference as ref then {
ref.externalAct as external then {
external.id -> medRq.identifier;
} "external";
} "ref";
sub.entryRelationship as entryRelationship then {
entryRelationship.supply as sup -> medRq.dispenseRequest as dispreq then {
sup -> dispreq.quantity = create('SimpleQuantity') as quantity then {
sup.quantity as q -> quantity.value = (q.value);
} "quantity";
} "sub";
} "med";
} "admnistrationUnicode";
} "sub";
};
} "medication";
} "sezioneesiste";
}
// -----------------------------------------------------------------------------------------------------------------------
// ______1._____________Sections________________________
group ModalitadiTrasposto(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {
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 then {
src.entry as entry1 -> tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) then {
entry1.act as act1 then Act(act1, patient, enc, bundle);
} "entry1";
};
}
group MotivoDellaVisita(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {
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 entry -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'POST', e2.resource = create('Observation') as observation, observation.id = uuid() as uuid2, e2.fullUrl = append('https://example/Observation/', uuid2), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id) then {
entry.observation as obs then Observation(obs, patient, enc, observation, bundle);
};
}
group Triage(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {
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 entry -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'POST', e2.resource = create('Observation') as observation, observation.id = uuid() as uuid2, e2.fullUrl = append('https://example/Observation/', uuid2), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id) then {
entry.observation as obs then Observation(obs, patient, enc, observation, bundle);
};
}
group InquadramentoClinicoIniziale(source cda : ClinicalDocument, source src : Section, target patient : Patient, target tgt, target bundle : Bundle, target enc : Encounter) {
src.title as t -> tgt.title = (t.dataString);
src.code -> tgt.code;
src.text as cdaText -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observation, observation.id = uuid() as uuid1, e1.fullUrl = append('https://example/Observation/', uuid1), request.url = 'Observation', tgt.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id), tgt.text as fhirText then {
src.code -> observation.code;
src where observation.statusCode.exists().not() then {
src -> observation.status = 'final' "status";
} "statuscode";
src -> observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
src -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
cdaText -> observation.note as note then {
src.author as author then {
author -> bundle.entry as e2, e2.request = create('BackboneElement') as request, request.method = 'PUT', e2.resource = create('Practitioner') as practitioner then {
author.assignedAuthor as assignedAuthor then {
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/InquadramentoClinicoIniziale/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;
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), request.url = append('Practitioner/', uuid2), note.author = 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.assignedPerson as person then {
person.name -> practitioner.name;
} "name";
};
} "practitioner";
author.time as t -> note.time = create('dateTime') as value then TSDateTime(t, value);
} "Author";
cdaText as t -> note.text = t "reference";
} "reference";
} "cdaText";
// START sottosections
src.component as component then {
component.section as sottosection then {
sottosection -> tgt.section as section then {
// 1. Anamnesi Narrativa-------------------------------------------------------------------------------------------------------------------------------------------
sottosection.code where (code = '11329-0') -> section.code;
sottosection.code as code1 where (code = '11329-0') then {
src where sottosection.entry.exists().not() then {
sottosection.title as t -> section.title = (t.dataString);
sottosection.text as cdaText -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'POST', e8.resource = create('Observation') as observation, observation.id = uuid() as uuid8, e8.fullUrl = append('https://example/Observation/', uuid8), request.url = 'Observation', section.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id) then {
cdaText -> observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
cdaText -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
sottosection.code -> observation.code;
src where observation.statusCode.exists().not() then {
src -> observation.status = 'final' "status";
} "statuscode";
cdaText -> observation.note as note then {
cdaText as t -> note.text = t "reference";
sottosection.author as authors then {
authors.time as time -> note.time = create('dateTime') as value then TSDateTime(time, value) "timeAuthor";
authors.assignedAuthor as assignedAuthor -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'PUT', e9.resource = create('Practitioner') as practitioner then {
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/EsameObiettivo/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;
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 uuid9, e9.fullUrl = append('https://example/Practitioner/', uuid9), request.url = append('Practitioner/', uuid9), note.author = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "autore";
} "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.assignedPerson as person then {
person.name -> practitioner.name;
};
} "assighedAuthor";
};
} "reference";
} "cdaText";
} "where";
// Anamnesi Strutturata-----------------------------------------------------------------------------------------------------------------------------------------
sottosection.entry as entry1 then {
entry1.observation as obs then {
obs.code where (code = '75326-9') then {
obs -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Condition') as condition, condition.id = uuid() as uuid1, e1.fullUrl = append('https://example/Condition/', uuid1), request.url = 'Condition', section.entry = create('Reference') as reference, reference.reference = ('https://example/Condition/' + %condition.id) then {
obs.code -> condition.category;
obs -> condition.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
obs -> condition.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
obs.statusCode as status where (code = 'completed') -> condition.verificationStatus as status2 then {
status -> status2.coding as status3 then {
status -> status3.code = 'confirmed' "finald";
status -> status3.system = 'http://terminology.hl7.org/CodeSystem/condition-ver-status' "system";
} "st3";
} "status";
// blocco Narrativo
sottosection.text as cdaText1 -> condition.note as note then {
cdaText1 as t -> note.text = t "reference";
sottosection.author as authors then {
authors.time as time -> note.time = create('dateTime') as value then TSDateTime(time, value) "timeAuthor";
authors.assignedAuthor as assignedAuthor -> bundle.entry as e5, e5.request = create('BackboneElement') as request, request.method = 'PUT', e5.resource = create('Practitioner') as practitioner then {
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/Anamnesi/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;
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 uuid5, e5.fullUrl = append('https://example/Practitioner/', uuid5), request.url = append('Practitioner/', uuid5), note.author = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id);
} "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.assignedPerson as person then {
person.name -> practitioner.name;
};
} "assighedAuthor";
};
} "cdaText1";
obs.effectiveTime as effective1 then {
effective1 where effective1.low.exists() or effective1.high.exists() then {
effective1 -> condition.onset = create('Period') as periodonset then IVLTSPeriod(effective1, periodonset) "onsetperiod";
} "ef";
} "effectivetime1";
obs.effectiveTime as effectiveTime -> condition.onset = create('dateTime') as value then TSDateTime(effectiveTime, value) "onsetDateTime";
obs.value : INT as int -> ob.value = (int.value);
obs.value : BL as boolean -> ob.value = (boolean.value) "boolean";
obs.value : ST as value -> ob.value = create('string'), ob.value = (value.dataString);
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 -> condition.code = create('CodeableConcept') as ce then {
val.originalText -> ce.text;
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');
} "coding";
} "Ce";
} "Value";
obs.entryRelationship as entriRel then {
entriRel -> condition.evidence = create('BackboneElement') as evidence then {
entriRel.observation as observation2 then {
observation2.code as code then {
code.code where (code.code = '89261-2') then {
obs -> bundle.entry as e1, e1.request = create('BackboneElement') as request, request.method = 'POST', e1.resource = create('Observation') as observation, observation.id = uuid() as uuid1, e1.fullUrl = append('https://example/Observation/', uuid1), request.url = 'Observation' then {
entriRel -> evidence.detail = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id) "ref";
observation2.code -> observation.code;
observation2 where observation.statusCode.exists().not() then {
observation2 -> observation.status = 'final' "status";
} "statuscode";
observation2.text as text -> observation.note = create('Annotation') as note then {
text.reference as ref -> note.text = (ref.value) "val";
} "Annontation";
obs -> observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
obs -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
observation2.statusCode as statusc where (code = 'completed') -> ob.status = 'final';
observation2.statusCode as statusc where (code = 'active') -> ob.status = 'registered';
observation2.statusCode as statusc where (code = 'aborted') -> ob.status = 'cancelled';
observation2.statusCode as statusc where (code = 'suspended') -> ob.status = 'partial';
observation2.value : INT as int -> observation.value = (int.value);
observation2.value : BL as boolean -> observation.value = (boolean.value) "boolean";
observation2.value : ST as value -> observation.value = create('string'), observation.value = (value.dataString);
observation2.effectiveTime as effectiveTime -> observation.effective = create('dateTime') as value then TSDateTime(effectiveTime, value) "value2";
observation2 where effectiveTime.low.exists() or effectiveTime.high.exists() then {
observation2.effectiveTime as eff -> observation.effective = create('Period') as period then IVLTSPeriod(eff, period);
} "where";
observation2.value : PQ as val then {
val -> observation.value = create('Quantity') as quantity then {
val.value as value -> quantity.value = value;
val.unit as unit -> quantity.unit = unit;
} "quantity";
} "valueQuantity";
observation2.value : CE as val then {
val -> observation.value = create('CodeableConcept') as ce then {
val.originalText -> ce.text;
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');
} "coding";
} "Ce";
} "Value";
} "obser";
} "whereDecorsoClinico";
};
} "Observation2";
} "evidence";
} "EntryRelationship1";
obs.entryRelationship as entriRel then {
entriRel.observation as observation2 then {
observation2.code as code then {
code.code where (code.code = '33999-4') then {
observation2 -> condition.clinicalStatus = create('CodeableConcept') as status then {
observation2.text as text then {
text.reference as refstat -> status.text = (refstat.value) "statref";
} "textstat";
observation2 -> status.coding = create('Coding') as coding then {
observation2.value as value then {
value.code where (value.code = 'LA16666-2') -> coding.code = 'active' "active";
value.code where (value.code = 'LA18632-2') -> coding.code = 'inactive' "inactive";
value.codeSystem as system -> coding.system = 'http://terminology.hl7.org/CodeSystem/condition-clinical' "system";
value.displayName as display -> coding.display = cast(display, 'string');
} "value1";
} "coding";
} "code";
} "whereDecorsoClinico";
} "codestatus";
} "observationstatus";
} "entryrelationshipstatus";
} "condition";
} "89261-2";
} "entryobservation1";
// Anamnesi Familiare---------------------------------------------------------------------------------------------------------------------------------------------
entry1.organizer as organizer then {
organizer.code where (code = '10157-6') then {
organizer -> bundle.entry as e4, e4.request = create('BackboneElement') as request, request.method = 'POST', e4.resource = create('FamilyMemberHistory') as FamilyMemberHistory, FamilyMemberHistory.id = uuid() as uuid5, e4.fullUrl = append('https://example/FamilyMemberHistory/', uuid5), request.url = 'FamilyMemberHistory', section.entry = create('Reference') as reference, reference.reference = ('https://example/FamilyMemberHistory/' + %FamilyMemberHistory.id) then {
organizer.effectiveTime as effective then {
effective.value as eff -> FamilyMemberHistory.date = create('dateTime') as value then TSDateTime(eff, value) "date";
} "effective";
organizer -> FamilyMemberHistory.patient = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
organizer.subject as subject then {
subject.relatedSubject as relatedSubject then {
relatedSubject.code -> FamilyMemberHistory.relationship "relationship";
relatedSubject.subject as subject -> FamilyMemberHistory.sex as sex then {
subject.administrativeGenderCode as administrativeGenderCode -> sex.coding as coding then {
administrativeGenderCode.code as code -> coding.code = translate(code, '#AdministrativeGender', 'code') "gender";
administrativeGenderCode -> coding.system = 'http://hl7.org/fhir/administrative-gender' "system";
} "coding";
} "subject1";
};
};
// blocco Narrativo
sottosection.text as cdaText1 -> FamilyMemberHistory.note as note then {
cdaText1 as t -> note.text = t "reference";
sottosection.author as authors then {
authors.time as time -> note.time = create('dateTime') as value then TSDateTime(time, value) "timeAuthor";
authors.assignedAuthor as assignedAuthor -> bundle.entry as e7, e7.request = create('BackboneElement') as request, request.method = 'PUT', e7.resource = create('Practitioner') as practitioner then {
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/Anamnesi/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;
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), request.url = append('Practitioner/', uuid7), note.author = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id);
} "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.assignedPerson as person then {
person.name -> practitioner.name;
};
} "assighedAuthor";
};
} "cdaText1";
organizer.component as component -> FamilyMemberHistory.condition as condition then {
component.observation as observation then {
observation.code -> condition.code;
observation.text as text -> FamilyMemberHistory.note as note then {
text.reference as reference -> note.text = (reference.value) "value";
} "reference";
observation.statusCode -> FamilyMemberHistory.status;
observation.value -> condition.outcome "codeable";
observation.entryRelationship as entryRelationship then {
entryRelationship.observation as obsservation1 then {
obsservation1.code as code then {
code.code where (code.code = '35267-4') then {
obsservation1.value as value -> condition.onset = create('Age') as Age then {
value.value as valueAge -> Age.value = valueAge "age";
value.unit as unit -> Age.code = unit;
value.unit as unit -> Age.unit = unit;
value -> Age.system = 'http://unitsofmeasure.org' "system";
};
} "insorgenza";
};
obsservation1.code as code then {
code.code where (code.code = '39016-1') then {
obsservation1.value as value -> FamilyMemberHistory.deceased = create('Age') as Age then {
value.value as valueAge -> Age.value = valueAge "age";
value.unit as unit -> Age.code = unit;
value.unit as unit -> Age.unit = unit;
value -> Age.system = 'http://unitsofmeasure.org' "system";
};
} "deceased";
};
} "obser";
} "EntryRel";
observation where observation.effectiveTime.exists() then {
observation.effectiveTime as effectiveTime -> FamilyMemberHistory.condition = create('BackboneElement') as condition then {
effectiveTime -> condition.onset = create('Period') as period then {
effectiveTime -> period.start = create('dateTime') as start then TSDateTime(effectiveTime, start) "val";
} "efft";
observation.code -> condition.code;
observation.value -> condition.outcome "codeable";
} "effttemp";
} "cont";
} "observationCondition";
};
} "organizer";
} "10157-6";
} "observation1";
} "subsection1";
} "11329-0";
// 2. Esame Obiettivo Narrativa-----------------------------------------------------------------------------------------------------------------------------------
sottosection.code where (code = '29545-1') -> section.code;
sottosection.code as code1 where (code = '29545-1') then {
sottosection.title as t -> section.title = (t.dataString);
sottosection.text as cdaText -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'POST', e8.resource = create('Observation') as observation, observation.id = uuid() as uuid8, e8.fullUrl = append('https://example/Observation/', uuid8), request.url = 'Observation', section.entry = create('Reference') as reference, reference.reference = ('https://example/Observation/' + %observation.id) then {
cdaText -> observation.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
cdaText -> observation.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
sottosection.code -> observation.code;
sottosection where observation.statusCode.exists().not() then {
sottosection -> observation.status = 'final' "status";
} "statuscode";
cdaText -> observation.note as note then {
cdaText as t -> note.text = t "reference";
sottosection.author as authors then {
authors.time as time -> note.time = create('dateTime') as value then TSDateTime(time, value) "timeAuthor";
authors.assignedAuthor as assignedAuthor -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'PUT', e9.resource = create('Practitioner') as practitioner then {
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/EsameObiettivo/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;
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 uuid9, e9.fullUrl = append('https://example/Practitioner/', uuid9), request.url = append('Practitioner/', uuid9), note.author = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "autore";
} "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.assignedPerson as person then {
person.name -> practitioner.name;
};
} "assighedAuthor";
};
} "reference";
} "cdaText";
} "condizioneesameObiettivo";
// 3. Terapia Farmacologica all'ingresso Narrativa --------------------------------------------------------------------------------------------------------------
sottosection.code where (code = '42346-7') -> section.code;
sottosection.code as code1 where (code = '42346-7') then {
sottosection.title as t -> section.title = (t.dataString);
sottosection.text as cdaText -> bundle.entry as e10, e10.request = create('BackboneElement') as request, request.method = 'POST', e10.resource = create('MedicationStatement') as medicStatement, medicStatement.id = uuid() as uuid10, e10.fullUrl = append('https://example/MedicationStatement/', uuid10), request.url = 'MedicationStatement', section.entry = create('Reference') as reference, reference.reference = ('https://example/MedicationStatement/' + %medicStatement.id) then {
cdaText -> medicStatement.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
sottosection where medicStatement.statusCode.exists().not() then {
sottosection -> medicStatement.status = 'completed' "status";
} "statuscode";
cdaText -> medicStatement.medication = create('CodeableConcept') as medication then {
cdaText as txt -> medication.text = txt "text";
} "medication";
cdaText -> medicStatement.note as note then {
cdaText as t -> note.text = t "reference";
sottosection.author as authors then {
authors.time as time -> note.time = create('dateTime') as value then TSDateTime(time, value) "timeAuthor";
authors.assignedAuthor as assignedAuthor -> bundle.entry as e11, e11.request = create('BackboneElement') as request, request.method = 'PUT', e11.resource = create('Practitioner') as practitioner then {
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/TerapiaFarmacologicaIngresso/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;
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 uuid11, e11.fullUrl = append('https://example/Practitioner/', uuid11), request.url = append('Practitioner/', uuid11), note.author = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id);
} "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.assignedPerson as person then {
person.name -> practitioner.name;
};
} "assighedAuthor";
};
} "reference";
} "cdaText";
} "condizioneterapiaingresso";
// 4. Allergie
sottosection.code where (code = '48765-2') -> section.code;
sottosection.code as code1 where (code = '48765-2') then {
sottosection.title as t -> section.title = (t.dataString);
// Allergia Narrativa-------------------------------------------------------------------------------------------------------------------------------------------
src where sottosection.entry.exists().not() then {
sottosection.title as t -> section.title = (t.dataString);
sottosection.text as cdaText -> bundle.entry as e8, e8.request = create('BackboneElement') as request, request.method = 'POST', e8.resource = create('AllergyIntolerance') as AllergyIntolerance, AllergyIntolerance.id = uuid() as uuid8, e8.fullUrl = append('https://example/AllergyIntolerance/', uuid8), request.url = 'AllergyIntolerance', section.entry = create('Reference') as reference, reference.reference = ('https://example/AllergyIntolerance/' + %AllergyIntolerance.id) then {
cdaText -> AllergyIntolerance.patient = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
cdaText -> AllergyIntolerance.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
cdaText -> AllergyIntolerance.clinicalStatus = create('CodeableConcept') as status then {
cdaText -> status.coding = create('Coding') as coding then {
cdaText -> coding.code = 'active' "active";
cdaText -> coding.system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical' "system";
cdaText -> coding.display = 'active' "active";
} "coding";
} "clinicalStatus";
cdaText -> AllergyIntolerance.note as note then {
cdaText as t -> note.text = t "reference";
sottosection.author as authors then {
authors.time as time -> note.time = create('dateTime') as value then TSDateTime(time, value) "timeAuthor";
authors.assignedAuthor as assignedAuthor -> bundle.entry as e9, e9.request = create('BackboneElement') as request, request.method = 'PUT', e9.resource = create('Practitioner') as practitioner then {
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/EsameObiettivo/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;
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 uuid9, e9.fullUrl = append('https://example/Practitioner/', uuid9), request.url = append('Practitioner/', uuid9), note.author = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id) "autore";
} "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.assignedPerson as person then {
person.name -> practitioner.name;
};
} "assighedAuthor";
};
} "reference";
} "cdaText";
} "where";
// Allergia Strutturata----------------------------------------------------------------------------------------------------------------------------------------
sottosection.entry as entry1 -> bundle.entry as e12, e12.request = create('BackboneElement') as request, request.method = 'POST', e12.resource = create('AllergyIntolerance') as allergy, allergy.id = uuid() as uuid12, e12.fullUrl = append('https://example/AllergyIntolerance/', uuid12), request.url = 'AllergyIntolerance', section.entry = create('Reference') as reference, reference.reference = ('https://example/AllergyIntolerance/' + %allergy.id) then {
src -> allergy.patient = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
src -> allergy.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
entry1.act as actallint then {
actallint.effectiveTime as effectiveTime -> allergy.onset = create('dateTime') as value then TSDateTime(effectiveTime, value) "onsetDateTime";
actallint where effectiveTime.low.exists() or effectiveTime.high.exists() then {
actallint.effectiveTime as eff -> allergy.onset = create('Period') as period then IVLTSPeriod(eff, period) "onsetPeriod";
} "where";
// mapping note
sottosection.text as cdaText1 -> allergy.note as note then {
cdaText1 as t -> note.text = t "reference";
sottosection.author as authors then {
authors.time as time -> note.time = create('dateTime') as value then TSDateTime(time, value) "timeAuthor";
authors.assignedAuthor as assignedAuthor -> bundle.entry as e13, e13.request = create('BackboneElement') as request, request.method = 'PUT', e13.resource = create('Practitioner') as practitioner then {
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/Allergie/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;
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 uuid13, e13.fullUrl = append('https://example/Practitioner/', uuid13), request.url = append('Practitioner/', uuid13), note.author = create('Reference') as reference, reference.reference = ('https://example/Practitioner/' + %practitioner.id);
} "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.assignedPerson as person then {
person.name -> practitioner.name;
};
} "assighedAuthor";
};
} "cdaText1";
actallint.entryRelationship as entryact then {
entryact.observation as entryobs then {
entryobs.value as code then {
code.code as code1 -> allergy.type = translate(code1, '#AllergyTypeMap', 'code') "type";
code.code as code2 -> allergy.category = translate(code2, '#AllergyCategoryMap', 'code') "category";
} "code";
entryobs.participant as partic then {
partic.participantRole as pratRole then {
pratRole.playingEntity as pratent then {
pratent -> allergy.reaction = create('BackboneElement') as reaction then {
pratent.code -> reaction.substance "subs";
entryobs.entryRelationship as entryobs1 where (typeCode = 'MFST') then {
entryobs1.observation as entobs then {
entobs.effectiveTime as eff then {
eff.low as l -> reaction.onset = create('dateTime') as value then TSDateTime(l, value);
} "eff";
entobs.value -> reaction.manifestation "manifest";
} "entryobservation";
};
} "reaction";
};
};
};
entryobs.entryRelationship as entryobs2 then {
entryobs2.observation as entobs then {
entobs.code as code where (code = 'SEV') then {
entobs.value as value then {
value.code where (value.code = 'M') -> allergy.criticality = 'unable-to-assess' "active";
value.code where (value.code = 'L') -> allergy.criticality = 'low' "active";
value.code where (value.code = 'H') -> allergy.criticality = 'high' "active";
};
} "severity";
} "entryobservation2";
} "entryrelationship2";
entryobs.entryRelationship as entryobs3 then {
entryobs3.observation as entobs then {
entobs.code as code where (code = '33999-4') then {
// entobs.value->allergy.clinicalStatus "cstatus";
entobs -> allergy.clinicalStatus = create('CodeableConcept') as status then {
entobs -> status.coding = create('Coding') as coding then {
entobs.value as value then {
value.code where (value.code = 'LA16666-2') -> coding.code = 'active' "active";
value.code where (value.code = 'LA18632-2') -> coding.code = 'inactive' "active";
value.codeSystem as system -> coding.system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical' "system";
// value->coding.version='ConditionClinicalStatusCodes 4.0.1'"version";
value.displayName as display -> coding.display = cast(display, 'string');
} "value1";
} "coding";
} "clinicalStatus";
} "33999-4";
} "entryobservation3";
} "entryrelationship3";
entryobs.entryRelationship as entryobs4 then {
entryobs4.act as entact then {
entact.text as actext then {
actext.reference as reftxt -> allergy.note = create('BackboneElement') as note then {
reftxt as ref -> note.text = (ref.value) "notxt";
} "notetxt";
} "txtact";
} "entryact1";
} "entryrelationshi4";
} "entryobservation";
} "entryrelationshipact";
} "entryact2";
} "allergy";
} "condizioneallergie";
// 5. Problemi aperti
sottosection.code where (code = '11450-4') -> section.code;
sottosection.code as code1 where (code = '11450-4') then {
sottosection.title as t -> section.title = (t.dataString);
sottosection.text as cdaText -> bundle.entry as e14, e14.request = create('BackboneElement') as request, request.method = 'POST', e14.resource = create('Condition') as condition, condition.id = uuid() as uuid14, e14.fullUrl = append('https://example/Condition/', uuid14), request.url = 'Condition', section.entry = create('Reference') as reference, reference.reference = ('https://example/Condition/' + %condition.id) then {
cdaText -> condition.subject = create('Reference') as reference, reference.reference = ('https://example/Patient/' + %patient.id) "reference";
cdaText -> condition.encounter = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
sottosection.code -> condition.code;
cdaText -> condition.note as note then {
cdaText as t -> note.text = t "reference";
sottosection.author as authors then {
authors.time as time -> note.time = create('dateTime') as value then TSDateTime(time, value) "timeAuthor";
authors.assignedAuthor as assignedAuthor -> bundle.entry as e15, e15.request = create('BackboneElement') as request, request.method = 'PUT', e15.resource = create('Practitioner') as practitioner then {
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/ProblemiAperti/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;
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 uuid15, e15.fullUrl = append('https://example/Practitioner/', uuid15), request.url = append('Practitioner/', uuid15), note.author = 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.assignedPerson as person then {
person.name -> practitioner.name;
};
} "assighedAuthor";
};
} "reference";
} "cdaText";
} "condizioneproblemiaperti";
} "Sectionfhir";
} "Sottosection";
};
}
// ______2._____________ClinicalStatements________________________
group Act(source cda : Act, target pat : Patient, target enc : Encounter, target bundle : Bundle) {
cda.code as code -> enc.extension as extension2 then modeOfArrival(code, extension2);
cda.participant as participant then {
participant -> enc.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 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', enc.participant = create('BackboneElement') as participant1, participant1.individual = create('Reference') as referencepart, referencepart.reference = ('https://example/PractitionerRole/' + %practitionerRole.id) then {
participantRole.code -> practitionerRole.code;
} "participantrole";
};
}
// ______3._____________Extensions_DtType________________________
group modeOfArrival(source src : CE, target ext : Extension) {
src -> ext.url = 'http://hl7.org/fhir/StructureDefinition/encounter-modeOfArrival' "url";
src -> ext.value = create('Coding') as code1 then coding(src, code1) "coding";
}
group coding(source src : CE, target tgt : Coding) {
src.code as code -> tgt.code = cast(code, 'string');
src.codeSystem as system -> tgt.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');
src.displayName as display -> tgt.display = cast(display, 'string');
src.codeSystemVersion as version -> tgt.version = cast(version, 'string');
}
group periodTiming(source effectiveTime : PIVL_TS, target timing : Timing) {
effectiveTime -> timing.repeat as r then {
effectiveTime.period as p -> r.period = (p.value);
effectiveTime.period as p -> r.periodUnit = (p.unit);
} "repeat";
}
</pre>
</div>
</text>
<url value="http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirEdReport"/>
<version value="0.1.0"/>
<name value="cda2fhirEdReport"/>
<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/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/IVL-TS"/>
<mode value="source"/>
</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>
<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"/>
<documentation
value="--------------------------------------------------------------------------------------------"/>
<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="recPat"/>
<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="Modalitaditrasporto"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '11459-5')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="ModalitadiTrasposto"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
<rule>
<name value="Inquadramentoclinico"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '78337-3')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="InquadramentoClinicoIniziale"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
<rule>
<name value="Inquadramentoclinico"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '46239-0')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="MotivoDellaVisita"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
<rule>
<name value="Triage"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '54094-8')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="Triage"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
<rule>
<name value="motivoricovero"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '46240-8')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="ClinicalDocumentSectionEncounter"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
<rule>
<name value="DecorsoOspedaliero"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '8648-8')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="ClinicalDocumentSectionDecorsoOspedaliero"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
<rule>
<name value="Complicazioni"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '55109-3')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="ClinicalDocumentSectionComplicanze"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
<rule>
<name value="Hospitaldischargestudiessummary"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '62387-6')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="ClinicalDocumentSectionConsulenza"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
<rule>
<name value="Accertamenti"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '30954-2')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="ClinicalDocumentSectionAccertamenti"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
<rule>
<name value="Accertamenti"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '8716-3')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="ClinicalDocumentSectionParametriVitali"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
<rule>
<name value="Accertamenti"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '29549-3')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="ClinicalDocumentSectionTerapiaFarmacoInPronto"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
<rule>
<name value="Pianodicuraalladimissione"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '18776-5')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="ClinicalDocumentSectionPianoCuraDimissione"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
<rule>
<name value="Dimissione"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '28574-2')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name value="ClinicalDocumentSectionDimissione"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
<rule>
<name value="TerapiaFarmacologicaDimissione"/>
<source>
<context value="srcSection"/>
<element value="code"/>
<condition value="(code = '75311-1')"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="tgtSection"/>
</target>
<dependent>
<name
value="ClinicalDocumentSectionTerapiaFarmacologicaDimissione"/>
<variable value="cda"/>
<variable value="srcSection"/>
<variable value="patient"/>
<variable value="tgtSection"/>
<variable value="bundle"/>
<variable value="encounter"/>
</dependent>
</rule>
</rule>
</rule>
</rule>
</rule>
</group>
<group>
<name value="ClinicalDocumentSectionComplicanze"/>
<typeMode value="none"/>
<documentation
value="Sezione complicanze--------------------------------------------------------------------------"/>
<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>
<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="entryexists"/>
<source>
<context value="src"/>
<condition value="src.entry.exists()"/>
</source>
<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>
<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="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</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/Observation/' + %observation.id"/>
</parameter>
</target>
<rule>
<name value="act"/>
<source>
<context value="entry1"/>
<element value="observation"/>
<variable value="obs"/>
</source>
<dependent>
<name value="Observation"/>
<variable value="obs"/>
<variable value="patient"/>
<variable value="enc"/>
<variable value="observation"/>
<variable value="bundle"/>
</dependent>
</rule>
<documentation
value="Sezione Strutturata-----------------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
<rule>
<name value="where"/>
<source>
<context value="src"/>
<condition value="src.entry.exists().not()"/>
</source>
<rule>
<name value="cdaText"/>
<source>
<context value="src"/>
<element value="text"/>
<variable value="cdaText"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="Observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="Observation"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid8"/>
<transform value="uuid"/>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid8"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</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/Observation/' + %Observation.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
</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="src"/>
</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/' + %enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="src"/>
<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="statuscode"/>
<source>
<context value="src"/>
<condition value="observation.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="src"/>
</source>
<target>
<context value="Observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="Observation"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<documentation
value="Sezione Narrativa---------------------------------------------------------------------------------------------------------------------------------------------"/>
</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="statuscode"/>
<source>
<context value="obs"/>
<condition value="obs.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</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="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="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="originalText"/>
<source>
<context value="val"/>
<element value="originalText"/>
<variable value="vvv"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="text"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</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>
<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="translation1"/>
<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>
</rule>
</rule>
</rule>
</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="originalText"/>
<source>
<context value="val"/>
<element value="originalText"/>
<variable value="vvv"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="text"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</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>
<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="translation1"/>
<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>
</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="BL"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="create"/>
<parameter>
<valueString value="boolean"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.value"/>
</parameter>
</target>
</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="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="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="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<rule>
<name value="assignedEntity"/>
<source>
<context value="performer"/>
<element value="assignedEntity"/>
<variable value="entity"/>
</source>
<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="uuid1"/>
<transform value="evaluate"/>
<parameter>
<valueString value="r + '-' + ext"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<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/Practitioner/' + %practitioner.id"/>
</parameter>
</target>
</rule>
</rule>
</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>
</rule>
<rule>
<name value="refRange"/>
<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="obsRange"/>
<source>
<context value="refRange"/>
<element value="observationRange"/>
<variable value="obsRange"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="low"/>
<variable value="Low"/>
<transform value="create"/>
<parameter>
<valueString value="SimpleQuantity"/>
</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>
</rule>
</rule>
</group>
<group>
<name value="ClinicalDocumentSectionDecorsoOspedaliero"/>
<typeMode value="none"/>
<documentation
value="------------------------------------------------------------------------------------------------------
Sezione Decorso Ospedaliero----------------------------------------------------------------------------"/>
<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>
<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="OB-note"/>
<source>
<context value="src"/>
</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="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</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/Observation/' + %observation.id"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="src"/>
<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="statuscode"/>
<source>
<context value="src"/>
<condition value="observation.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="src"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
</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="src"/>
</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/' + %enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
<element value="text"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
<rule>
<name value="Auth"/>
<source>
<context value="src"/>
<element value="author"/>
<variable value="auth"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="time"/>
<source>
<context value="auth"/>
<element value="time"/>
<variable value="ti"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="ti"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="assAuth"/>
<source>
<context value="auth"/>
<element value="assignedAuthor"/>
<variable value="assAuth"/>
</source>
<rule>
<name value="meta"/>
<source>
<context value="assAuth"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="assAuth"/>
</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="assAuth"/>
</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="assAuth"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/DecorsoOspedaliero/author"/>
</parameter>
</target>
</rule>
</rule>
<documentation value="meta+identifier"/>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="assAuth"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="note"/>
<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/Practitioner/' + %practitioner.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="2.16.840.1.113883.2.9.4.3.2"/>
<source>
<context value="assAuth"/>
<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="assPers"/>
<source>
<context value="assAuth"/>
<element value="assignedPerson"/>
<variable value="assPers"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="assPers"/>
<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>
</group>
<group>
<name value="ClinicalDocumentSectionEncounter"/>
<typeMode value="none"/>
<documentation
value="--------------------------------------------------------------------------------------------------------
Sezione Encounter---------------------------------------------------------------------------------------"/>
<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="enc1"/>
<type value="Encounter"/>
<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="encounter"/>
<transform value="create"/>
<parameter>
<valueString value="Encounter"/>
</parameter>
</target>
<target>
<context value="encounter"/>
<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/Encounter/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Encounter"/>
</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/Encounter/' + %encounter.id"/>
</parameter>
</target>
<rule>
<name value="refer"/>
<source>
<context value="entry1"/>
</source>
<target>
<context value="encounter"/>
<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/Encounter/' + %enc1.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="refer"/>
<source>
<context value="entry1"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString value="'https://example/Patient/' + %patient.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="status"/>
<source>
<context value="entry1"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="finished"/>
</parameter>
</target>
</rule>
<rule>
<name value="class"/>
<source>
<context value="entry1"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="class"/>
<variable value="cl"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<rule>
<name value="code"/>
<source>
<context value="entry1"/>
</source>
<target>
<context value="cl"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="AMB"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="entry1"/>
</source>
<target>
<context value="cl"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="ambulatory"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="encounter"/>
<source>
<context value="entry1"/>
<element value="encounter"/>
<variable value="enc"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="enc"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="where"/>
<source>
<context value="enc"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="enc"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
<documentation value="effectiveTime=period"/>
</rule>
<rule>
<name value="where"/>
<source>
<context value="enc"/>
<condition
value="effectiveTime.low.exists().not() or effectiveTime.high.exists().not()"/>
</source>
<rule>
<name value="efft"/>
<source>
<context value="enc"/>
<element value="effectiveTime"/>
<variable value="effectivetime1"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<rule>
<name value="val"/>
<source>
<context value="effectivetime1"/>
</source>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="start"/>
<variable value="start"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="effectivetime1"/>
<variable value="start"/>
</dependent>
</rule>
</rule>
<documentation value="effectiveTime = time-stamp"/>
</rule>
<rule>
<name value="participant-ADM"/>
<source>
<context value="enc"/>
<element value="participant"/>
<variable value="part"/>
<condition value="(typeCode != 'LOC')"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="participant"/>
<variable value="patarg"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<rule>
<name value="type"/>
<source>
<context value="part"/>
</source>
<target>
<context value="patarg"/>
<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="time"/>
<source>
<context value="part"/>
<element value="time"/>
<variable value="time1"/>
</source>
<target>
<context value="patarg"/>
<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="ti"/>
</source>
<target>
<context value="patarg"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="ti"/>
<variable value="period"/>
</dependent>
</rule>
<rule>
<name value="partRole"/>
<source>
<context value="part"/>
<element value="participantRole"/>
<variable value="partRole"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="meta"/>
<source>
<context value="partRole"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="partRole"/>
</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="partRole"/>
</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="partRole"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/Encounter/participant"/>
</parameter>
</target>
</rule>
</rule>
<documentation value="modifica meta+identifier"/>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="partRole"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="patarg"/>
<contextType value="variable"/>
<element value="individual"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Practitioner/' + %practitioner.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="2.16.840.1.113883.2.9.4.3.2"/>
<source>
<context value="partRole"/>
<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="playEnt"/>
<source>
<context value="partRole"/>
<element value="playingEntity"/>
<variable value="playEnt"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="playEnt"/>
<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>
<documentation
value="enc.effectiveTime as eff -> encounter.period = create('Period') as period then{"/>
</rule>
<rule>
<name value="participant2"/>
<source>
<context value="enc"/>
<element value="participant"/>
<variable value="part"/>
<condition value="(typeCode = 'LOC')"/>
</source>
<rule>
<name value="location"/>
<source>
<context value="part"/>
<element value="time"/>
<variable value="tim"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="location"/>
<variable value="locat"/>
</target>
<rule>
<name value="time"/>
<source>
<context value="tim"/>
</source>
<target>
<context value="locat"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="tim"/>
<variable value="period"/>
</dependent>
</rule>
<rule>
<name value="time"/>
<source>
<context value="part"/>
<element value="time"/>
<variable value="tim"/>
</source>
<target>
<context value="locat"/>
<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="tim"/>
</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="tim"/>
<variable value="start"/>
</dependent>
</rule>
</rule>
<rule>
<name value="partRole"/>
<source>
<context value="part"/>
<element value="participantRole"/>
<variable value="partRole"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="location"/>
<transform value="create"/>
<parameter>
<valueString value="Location"/>
</parameter>
</target>
<target>
<context value="location"/>
<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/Location/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="meta"/>
<source>
<context value="part"/>
</source>
<target>
<context value="location"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="part"/>
</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="part"/>
</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="part"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/Encounter/participant"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="partRole"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="location"/>
<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="partRole"/>
</source>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Location?identifier="/>
</parameter>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="idasi"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="location"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid"/>
<transform value="evaluate"/>
<parameter>
<valueString value="r + '-' + ext"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Location/"/>
</parameter>
<parameter>
<valueId value="uuid"/>
</parameter>
</target>
<target>
<context value="locat"/>
<contextType value="variable"/>
<element value="location"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Location/' + %location.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="partRole"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="location"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="entryRel-SUBJ"/>
<source>
<context value="enc"/>
<element value="entryRelationship"/>
<variable value="entr"/>
</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="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="reasonReference"/>
<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/' + %observation.id"/>
</parameter>
</target>
<rule>
<name value="act"/>
<source>
<context value="entr"/>
<element value="act"/>
<variable value="act"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="act"/>
<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="reference"/>
<source>
<context value="act"/>
</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="act"/>
</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/' + %enc1.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="statuscode"/>
<source>
<context value="act"/>
<condition value="act.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="act"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="note"/>
<source>
<context value="act"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
<transform value="create"/>
<parameter>
<valueString value="Annotation"/>
</parameter>
</target>
<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="reff"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="reff.value"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="String"/>
<source>
<context value="act"/>
<element value="text"/>
<variable value="tx"/>
</source>
<rule>
<name value="val"/>
<source>
<context value="tx"/>
<element value="reference"/>
<variable value="ref"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="ref.value"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="practitioner"/>
<source>
<context value="act"/>
<element value="author"/>
<variable value="auth"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="notetime"/>
<source>
<context value="auth"/>
<element value="time"/>
<variable value="ti"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="ti"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="assAush"/>
<source>
<context value="auth"/>
<element value="assignedAuthor"/>
<variable value="assAuth"/>
</source>
<rule>
<name value="meta"/>
<source>
<context value="assAuth"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="assAuth"/>
</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="assAuth"/>
</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="assAuth"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/Encounter/author"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="assAuth"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString
value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="note"/>
<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/Practitioner/' + %practitioner.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="2.16.840.1.113883.2.9.4.3.2"/>
<source>
<context value="assAuth"/>
<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="time"/>
<source>
<context value="assAuth"/>
<element value="time"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="t"/>
<variable value="value"/>
</dependent>
<documentation value="fine modifica"/>
</rule>
<rule>
<name value="name"/>
<source>
<context value="assAuth"/>
<element value="assignedPerson"/>
<variable value="assPers"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="assPers"/>
<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>
</group>
<group>
<name value="ClinicalDocumentSectionConsulenza"/>
<typeMode value="none"/>
<documentation
value="--------------------------------------------------------------------------------------------------------
Sezione Consulenza--------------------------------------------------------------------------------------"/>
<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>
<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="entry-exists"/>
<source>
<context value="src"/>
<condition value="src.entry.exists()"/>
</source>
<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>
<rule>
<name value="where"/>
<source>
<context value="src"/>
<condition value="src.entry.exists().not()"/>
</source>
<rule>
<name value="cdaText"/>
<source>
<context value="src"/>
<element value="text"/>
<variable value="cdaText"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="ServiceRequest"/>
<transform value="create"/>
<parameter>
<valueString value="ServiceRequest"/>
</parameter>
</target>
<target>
<context value="ServiceRequest"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid8"/>
<transform value="uuid"/>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/ServiceRequest/"/>
</parameter>
<parameter>
<valueId value="uuid8"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="ServiceRequest"/>
</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/ServiceRequest/' + %ServiceRequest.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
</source>
<target>
<context value="ServiceRequest"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString value="'https://example/Patient/' + %patient.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
</source>
<target>
<context value="ServiceRequest"/>
<contextType value="variable"/>
<element value="encounter"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString value="'https://example/Encounter/' + %enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="status"/>
<source>
<context value="src"/>
</source>
<target>
<context value="ServiceRequest"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="active"/>
</parameter>
</target>
</rule>
<rule>
<name value="intent"/>
<source>
<context value="src"/>
</source>
<target>
<context value="ServiceRequest"/>
<contextType value="variable"/>
<element value="intent"/>
<transform value="copy"/>
<parameter>
<valueString value="order"/>
</parameter>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="ServiceRequest"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<documentation
value="Sezione Narrativa--------------------------------------------------------------------------------------------------------------------------------------------------"/>
</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="serviceRequest"/>
<transform value="create"/>
<parameter>
<valueString value="ServiceRequest"/>
</parameter>
</target>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid1"/>
<transform value="uuid"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/ServiceRequest/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="ServiceRequest"/>
</parameter>
</target>
<target>
<context value="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/ServiceRequest/' + %serviceRequest.id"/>
</parameter>
</target>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="entry1"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString value="'https://example/Patient/' + %patient.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="entry1"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="encounter"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString value="'https://example/Encounter/' + %enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="status"/>
<source>
<context value="entry1"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="active"/>
</parameter>
</target>
</rule>
<rule>
<name value="intent"/>
<source>
<context value="entry1"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="intent"/>
<transform value="copy"/>
<parameter>
<valueString value="order"/>
</parameter>
</target>
</rule>
<rule>
<name value="ACT"/>
<source>
<context value="entry1"/>
<element value="act"/>
<variable value="act"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="act"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="text"/>
<source>
<context value="act"/>
<element value="text"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="t.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="act"/>
<element value="statusCode"/>
<variable value="code"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="evaluate"/>
<parameter>
<valueString value="code.code"/>
</parameter>
</target>
</rule>
<rule>
<name value="performer"/>
<source>
<context value="act"/>
<element value="performer"/>
<variable value="perf"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="time"/>
<source>
<context value="perf"/>
<element value="time"/>
<variable value="time"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="occurrence"/>
<variable value="t"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="time"/>
<variable value="t"/>
</dependent>
</rule>
<rule>
<name value="assEnt"/>
<source>
<context value="perf"/>
<element value="assignedEntity"/>
<variable value="assEnt"/>
</source>
<rule>
<name value="meta"/>
<source>
<context value="assEnt"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="assEnt"/>
</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="assEnt"/>
</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="assEnt"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/Consulenze/performer"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="assEnt"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="serviceRequest"/>
<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/Practitioner/' + %practitioner.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="2.16.840.1.113883.2.9.4.3.2"/>
<source>
<context value="assEnt"/>
<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="assPer"/>
<source>
<context value="assEnt"/>
<element value="assignedPerson"/>
<variable value="assPer"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="assPer"/>
<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>
<name value="participant"/>
<source>
<context value="act"/>
<element value="participant"/>
<variable value="parti"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="time"/>
<source>
<context value="parti"/>
<element value="time"/>
<variable value="time"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="authoredOn"/>
<variable value="t"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="time"/>
<variable value="t"/>
</dependent>
</rule>
<rule>
<name value="partRole"/>
<source>
<context value="parti"/>
<element value="participantRole"/>
<variable value="partRole"/>
</source>
<rule>
<name value="meta"/>
<source>
<context value="partRole"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="partRole"/>
</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="partRole"/>
</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="partRole"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/Consulenze/participant"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="partRole"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="requester"/>
<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="partRole"/>
<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="entity"/>
<source>
<context value="partRole"/>
<element value="playingEntity"/>
<variable value="entity"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="entity"/>
<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>
<documentation
value="Sezione Strutturata--------------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
</group>
<group>
<name value="ClinicalDocumentSectionAccertamenti"/>
<typeMode value="none"/>
<documentation
value="---------------------------------------------------------------------------------------------------------
Sezione Accertamenti--------------------------------------------------------------------------------------"/>
<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>
<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="entryExists"/>
<source>
<context value="src"/>
<condition value="src.entry.exists()"/>
</source>
<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>
<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="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</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/Observation/' + %observation.id"/>
</parameter>
</target>
<rule>
<name value="obs"/>
<source>
<context value="entry1"/>
<element value="organizer"/>
<variable value="obs"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="src"/>
<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="obs"/>
</source>
<dependent>
<name value="ObservationAccertamenti"/>
<variable value="obs"/>
<variable value="patient"/>
<variable value="enc"/>
<variable value="observation"/>
<variable value="bundle"/>
</dependent>
</rule>
</rule>
<documentation
value="Sezione Strutturata---------------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
<rule>
<name value="where"/>
<source>
<context value="src"/>
<condition value="src.entry.exists().not()"/>
</source>
<rule>
<name value="cdaText"/>
<source>
<context value="src"/>
<element value="text"/>
<variable value="cdaText"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="Observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="Observation"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid8"/>
<transform value="uuid"/>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid8"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</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/Observation/' + %Observation.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
</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="src"/>
</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/' + %enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="src"/>
<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="statuscode"/>
<source>
<context value="src"/>
<condition value="observation.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="src"/>
</source>
<target>
<context value="Observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="Observation"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<documentation
value="Sezione Narrativa--------------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
</group>
<group>
<name value="ObservationAccertamenti"/>
<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="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="statuscode"/>
<source>
<context value="obs"/>
<condition value="obs.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</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="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="originalText"/>
<source>
<context value="val"/>
<element value="originalText"/>
<variable value="vvv"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="text"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</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>
<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="qual"/>
<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>
</rule>
</rule>
</rule>
</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="originalText"/>
<source>
<context value="val"/>
<element value="originalText"/>
<variable value="vvv"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="text"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</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>
<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="qual"/>
<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>
</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="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="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="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="refRange"/>
<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="obsRange"/>
<source>
<context value="refRange"/>
<element value="observationRange"/>
<variable value="obsRange"/>
</source>
<target>
<context value="ref"/>
<contextType value="variable"/>
<element value="low"/>
<variable value="Low"/>
<transform value="create"/>
<parameter>
<valueString value="SimpleQuantity"/>
</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>
</rule>
</rule>
<rule>
<name value="perf"/>
<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="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="assEntity"/>
<source>
<context value="performer"/>
<element value="assignedEntity"/>
<variable value="assEntity"/>
</source>
<rule>
<name value="meta"/>
<source>
<context value="assEntity"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="assEntity"/>
</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="assEntity"/>
</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="assEntity"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/Accertamenti/performer"/>
</parameter>
</target>
</rule>
</rule>
<documentation value="inizio modifica identifier+meta"/>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="assEntity"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<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/Practitioner/' + %practitioner.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="2.16.840.1.113883.2.9.4.3.2"/>
<source>
<context value="assEntity"/>
<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="assi"/>
<source>
<context value="assEntity"/>
<element value="assignedPerson"/>
<variable value="assi"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="assi"/>
<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>
<documentation value="fine modifica"/>
</rule>
</rule>
</rule>
<rule>
<name value="participant"/>
<source>
<context value="obs"/>
<element value="participant"/>
<variable value="participant"/>
</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="serviceRequest"/>
<transform value="create"/>
<parameter>
<valueString value="ServiceRequest"/>
</parameter>
</target>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid1"/>
<transform value="uuid"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/ServiceRequest/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="ServiceRequest"/>
</parameter>
</target>
<target>
<context value="ob"/>
<contextType value="variable"/>
<element value="basedOn"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/ServiceRequest/' + %serviceRequest.id"/>
</parameter>
</target>
<rule>
<name value="value2"/>
<source>
<context value="participant"/>
<element value="time"/>
<variable value="t"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="authoredOn"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="t"/>
<variable value="value"/>
</dependent>
<documentation
value="participant.time as t -> serviceRequest.authoredOn = (t.value);"/>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString value="'https://example/Patient/' + %patient.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="encounter"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Encounter/' + %encounter.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="status"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="active"/>
</parameter>
</target>
</rule>
<rule>
<name value="intent"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="intent"/>
<transform value="copy"/>
<parameter>
<valueString value="order"/>
</parameter>
</target>
</rule>
<rule>
<name value="participantRole"/>
<source>
<context value="participant"/>
<element value="participantRole"/>
<variable value="participantRole"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</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/Accertamenti/participant"/>
</parameter>
</target>
</rule>
</rule>
<documentation value="modifica meta+identifier"/>
</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="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="requester"/>
<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="pe"/>
<source>
<context value="participantRole"/>
<element value="playingEntity"/>
<variable value="pe"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="pe"/>
<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>
<documentation value="fine modifica"/>
</rule>
</rule>
</rule>
<rule>
<name value="observation"/>
<source>
<context value="obs"/>
<element value="component"/>
<variable value="comp"/>
</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="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="ob"/>
<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/' + %observation.id"/>
</parameter>
</target>
<rule>
<name value="obs"/>
<source>
<context value="comp"/>
<element value="observation"/>
<variable value="obs"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="obs"/>
<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="statusCode"/>
<source>
<context value="obs"/>
<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="obs"/>
<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="obs"/>
<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="obs"/>
<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="statuscode"/>
<source>
<context value="obs"/>
<condition value="obs.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="obs"/>
</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="obs"/>
</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="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="value"/>
<source>
<context value="obs"/>
<element value="value"/>
<variable value="val"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="val.dataString"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</group>
<group>
<name value="ClinicalDocumentSectionParametriVitali"/>
<typeMode value="none"/>
<documentation
value="-----------------------------------------------------------------------------------------------------------
Sezione ParametriVitali--------------------------------------------------------------------------------------"/>
<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>
<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="entry-exists"/>
<source>
<context value="src"/>
<condition value="src.entry.exists()"/>
</source>
<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>
<rule>
<name value="where"/>
<source>
<context value="src"/>
<condition value="src.entry.exists().not()"/>
</source>
<rule>
<name value="cdaText"/>
<source>
<context value="src"/>
<element value="text"/>
<variable value="cdaText"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="Observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="Observation"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid8"/>
<transform value="uuid"/>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid8"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</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/Observation/' + %Observation.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
</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="src"/>
</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/' + %enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="src"/>
<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="statuscode"/>
<source>
<context value="src"/>
<condition value="observation.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="src"/>
</source>
<target>
<context value="Observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="Observation"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<documentation
value="Sezione Narrativa----------------------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
<rule>
<name value="Observation"/>
<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="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</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/Observation/' + %observation.id"/>
</parameter>
</target>
<rule>
<name value="obs"/>
<source>
<context value="entry1"/>
<element value="organizer"/>
<variable value="org"/>
</source>
<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/' + %enc.id"/>
</parameter>
</target>
</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="statuscode"/>
<source>
<context value="org"/>
<condition value="obs.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="org"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</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="code"/>
<source>
<context value="org"/>
<condition value="org.code.exists().not()"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="src"/>
<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="component"/>
<source>
<context value="org"/>
<element value="component"/>
<variable value="component"/>
</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="observation1"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation1"/>
<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/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</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/' + %observation1.id"/>
</parameter>
</target>
<rule>
<name value="obs"/>
<source>
<context value="component"/>
<element value="observation"/>
<variable value="obs"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="observation1"/>
<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="observation1"/>
<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="code"/>
<source>
<context value="obs"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="observation1"/>
<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="vvv"/>
</source>
<target>
<context value="observation1"/>
<contextType value="variable"/>
<element value="status"/>
<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="observation1"/>
<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="observation1"/>
<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="observation1"/>
<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="observation1"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="partial"/>
</parameter>
</target>
</rule>
<rule>
<name value="statuscode"/>
<source>
<context value="obs"/>
<condition value="obs.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="observation1"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="quant"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="observation1"/>
<contextType value="variable"/>
<element value="value"/>
<variable value="quant"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="value"/>
<source>
<context value="obs"/>
<element value="value"/>
<variable value="v"/>
</source>
<target>
<context value="quant"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="v.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="value"/>
<source>
<context value="obs"/>
<element value="value"/>
<variable value="v"/>
</source>
<target>
<context value="quant"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="evaluate"/>
<parameter>
<valueString value="v.unit"/>
</parameter>
</target>
</rule>
</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="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="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="interpretationCode"/>
<source>
<context value="obs"/>
<element value="interpretationCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="observation1"/>
<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="observation1"/>
<contextType value="variable"/>
<element value="method"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="targetSiteCode"/>
<source>
<context value="obs"/>
<element value="targetSiteCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="observation1"/>
<contextType value="variable"/>
<element value="bodySite"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</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="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="time"/>
<source>
<context value="performer"/>
<element value="time"/>
<variable value="t"/>
</source>
<target>
<context value="observation1"/>
<contextType value="variable"/>
<element value="issued"/>
<variable value="date"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="t"/>
<variable value="date"/>
</dependent>
</rule>
<rule>
<name value="assEntity"/>
<source>
<context value="performer"/>
<element value="assignedEntity"/>
<variable value="assEntity"/>
</source>
<rule>
<name value="meta"/>
<source>
<context value="assEntity"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="assEntity"/>
</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="assEntity"/>
</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="assEntity"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/ParametriVitali/performer"/>
</parameter>
</target>
</rule>
</rule>
<documentation value="inizio modifica meta+ identifier"/>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="assEntity"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="observation1"/>
<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/Practitioner/' + %practitioner.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="2.16.840.1.113883.2.9.4.3.2"/>
<source>
<context value="assEntity"/>
<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="assPerson"/>
<source>
<context value="assEntity"/>
<element value="assignedPerson"/>
<variable value="assPerson"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="assPerson"/>
<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>
<documentation value="fine modifica"/>
</rule>
</rule>
</rule>
<rule>
<name value="parti"/>
<source>
<context value="obs"/>
<element value="participant"/>
<variable value="parti"/>
</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="serviceRequest"/>
<transform value="create"/>
<parameter>
<valueString value="ServiceRequest"/>
</parameter>
</target>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid1"/>
<transform value="uuid"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/ServiceRequest/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="ServiceRequest"/>
</parameter>
</target>
<target>
<context value="observation1"/>
<contextType value="variable"/>
<element value="basedOn"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/ServiceRequest/' + %serviceRequest.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="parti"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Patient/' + %patient.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="parti"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="encounter"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Encounter/' + %enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="status"/>
<source>
<context value="parti"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="active"/>
</parameter>
</target>
</rule>
<rule>
<name value="intent"/>
<source>
<context value="parti"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="intent"/>
<transform value="copy"/>
<parameter>
<valueString value="order"/>
</parameter>
</target>
</rule>
<rule>
<name value="value2"/>
<source>
<context value="parti"/>
<element value="time"/>
<variable value="t"/>
</source>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="authoredOn"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="t"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="partRole"/>
<source>
<context value="parti"/>
<element value="participantRole"/>
<variable value="partRole"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="meta"/>
<source>
<context value="partRole"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="partRole"/>
</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="partRole"/>
</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="partRole"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/ParametriVitali/participant"/>
</parameter>
</target>
</rule>
</rule>
<documentation value="inizio modifica meta + identifier"/>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="partRole"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="serviceRequest"/>
<contextType value="variable"/>
<element value="requester"/>
<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="partRole"/>
<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="name"/>
<source>
<context value="partRole"/>
<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>
<documentation value="fine modifica"/>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<documentation
value="Sezione Strutturata --------------------------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
</group>
<group>
<name value="ClinicalDocumentSectionTerapiaFarmacoInPronto"/>
<typeMode value="none"/>
<documentation
value="-----------------------------------------------------------------------------------------------------------------
Sezione terapia Farma in Pronto----------------------------------------------------------------------------------"/>
<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>
<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="entry-exists"/>
<source>
<context value="src"/>
<condition value="src.entry.exists()"/>
</source>
<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>
<rule>
<name value="where"/>
<source>
<context value="src"/>
<condition value="src.entry.exists().not()"/>
</source>
<rule>
<name value="cdaText"/>
<source>
<context value="src"/>
<element value="text"/>
<variable value="cdaText"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="MedicationAdministration"/>
<transform value="create"/>
<parameter>
<valueString value="MedicationAdministration"/>
</parameter>
</target>
<target>
<context value="MedicationAdministration"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid8"/>
<transform value="uuid"/>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/MedicationAdministration/"/>
</parameter>
<parameter>
<valueId value="uuid8"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="MedicationAdministration"/>
</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/MedicationAdministration/' + %MedicationAdministration.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
</source>
<target>
<context value="MedicationAdministration"/>
<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="src"/>
</source>
<target>
<context value="MedicationAdministration"/>
<contextType value="variable"/>
<element value="context"/>
<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="Period"/>
<source>
<context value="src"/>
</source>
<target>
<context value="MedicationAdministration"/>
<contextType value="variable"/>
<element value="effective"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<rule>
<name value="low"/>
<source>
<context value="src"/>
</source>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="start"/>
<transform value="evaluate"/>
<parameter>
<valueString value="start.now()"/>
</parameter>
</target>
</rule>
<rule>
<name value="high"/>
<source>
<context value="src"/>
</source>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="end"/>
<transform value="evaluate"/>
<parameter>
<valueString value="end.now()"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="statuscode"/>
<source>
<context value="src"/>
<condition value="sub.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="src"/>
</source>
<target>
<context value="MedicationAdministration"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="completed"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="MedicationAdministration"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
<rule>
<name value="medication"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="MedicationAdministration"/>
<contextType value="variable"/>
<element value="medication"/>
<variable value="medication"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="text"/>
<source>
<context value="cdaText"/>
<variable value="txt"/>
</source>
<target>
<context value="medication"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="txt"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<documentation
value="Sezione Narrativa------------------------------------------------------------------------------------------------------------------------------------------------"/>
</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="medAdm"/>
<transform value="create"/>
<parameter>
<valueString value="MedicationAdministration"/>
</parameter>
</target>
<target>
<context value="medAdm"/>
<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/MedicationAdministration/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="MedicationAdministration"/>
</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/MedicationAdministration/' + %medAdm.id"/>
</parameter>
</target>
<target>
<context value="medAdm"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="entry1"/>
</source>
<target>
<context value="medAdm"/>
<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="entry1"/>
</source>
<target>
<context value="medAdm"/>
<contextType value="variable"/>
<element value="context"/>
<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="MedAdm"/>
<source>
<context value="entry1"/>
<element value="substanceAdministration"/>
<variable value="sub"/>
</source>
<rule>
<name value="txx"/>
<source>
<context value="sub"/>
<element value="text"/>
<variable value="tx"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="tx"/>
<element value="reference"/>
<variable value="reff"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="reff.value"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="sub"/>
<element value="statusCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="medAdm"/>
<contextType value="variable"/>
<element value="status"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="effectiveTime"/>
<source>
<context value="sub"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="medAdm"/>
<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>
<documentation
value="sub.effectiveTime: IVL_TS as eff -> medAdm.effective =create('Period') as period then IVLTSPeriod(eff,period); CHECK THIS"/>
</rule>
<rule>
<name value="eff2"/>
<source>
<context value="sub"/>
<type value="PIVL_TS"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="medAdm"/>
<contextType value="variable"/>
<element value="dosage"/>
<variable value="dosage"/>
</target>
<rule>
<name value="ratio"/>
<source>
<context value="eff"/>
</source>
<target>
<context value="dosage"/>
<contextType value="variable"/>
<element value="rate"/>
<variable value="ratio"/>
<transform value="create"/>
<parameter>
<valueString value="Ratio"/>
</parameter>
</target>
<rule>
<name value="num"/>
<source>
<context value="eff"/>
</source>
<target>
<context value="ratio"/>
<contextType value="variable"/>
<element value="numerator"/>
<variable value="num"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="period"/>
<source>
<context value="eff"/>
<element value="period"/>
<variable value="per"/>
</source>
<target>
<context value="num"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="per.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="period"/>
<source>
<context value="eff"/>
<element value="period"/>
<variable value="per"/>
</source>
<target>
<context value="num"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="evaluate"/>
<parameter>
<valueString value="per.unit"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="den"/>
<source>
<context value="eff"/>
</source>
<target>
<context value="ratio"/>
<contextType value="variable"/>
<element value="denominator"/>
<variable value="num"/>
<transform value="create"/>
<parameter>
<valueString value="Quantity"/>
</parameter>
</target>
<rule>
<name value="period"/>
<source>
<context value="eff"/>
<element value="period"/>
<variable value="per"/>
</source>
<target>
<context value="num"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueString value="1"/>
</parameter>
</target>
</rule>
<rule>
<name value="period"/>
<source>
<context value="eff"/>
<element value="period"/>
<variable value="per"/>
</source>
<target>
<context value="num"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="evaluate"/>
<parameter>
<valueString value="per.unit"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="route"/>
<source>
<context value="sub"/>
</source>
<target>
<context value="medAdm"/>
<contextType value="variable"/>
<element value="dosage"/>
<variable value="dosage"/>
</target>
<rule>
<name value="routeCode"/>
<source>
<context value="sub"/>
<element value="routeCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="dosage"/>
<contextType value="variable"/>
<element value="route"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
<rule>
<name value="route"/>
<source>
<context value="sub"/>
</source>
<target>
<context value="medAdm"/>
<contextType value="variable"/>
<element value="dosage"/>
<variable value="dosage"/>
</target>
<rule>
<name value="approachSiteCode"/>
<source>
<context value="sub"/>
<element value="approachSiteCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="dosage"/>
<contextType value="variable"/>
<element value="site"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
<rule>
<name value="medicationRequest"/>
<source>
<context value="sub"/>
</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="medRq"/>
<transform value="create"/>
<parameter>
<valueString value="MedicationRequest"/>
</parameter>
</target>
<target>
<context value="medRq"/>
<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/MedicationRequest/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="MedicationRequest"/>
</parameter>
</target>
<target>
<context value="medAdm"/>
<contextType value="variable"/>
<element value="request"/>
<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/MedicationRequest/' + %medRq.id"/>
</parameter>
</target>
<rule>
<name value="rel"/>
<source>
<context value="sub"/>
<element value="entryRelationship"/>
<variable value="rel"/>
</source>
<rule>
<name value="obs"/>
<source>
<context value="rel"/>
<element value="supply"/>
<variable value="supl"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="dispenseRequest"/>
<variable value="disp"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<rule>
<name value="SimpleQuantity"/>
<source>
<context value="supl"/>
</source>
<target>
<context value="disp"/>
<contextType value="variable"/>
<element value="quantity"/>
<variable value="q"/>
<transform value="create"/>
<parameter>
<valueString value="SimpleQuantity"/>
</parameter>
</target>
<rule>
<name value="fds"/>
<source>
<context value="supl"/>
<element value="quantity"/>
<variable value="qua"/>
</source>
<target>
<context value="q"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="qua.value"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="sub"/>
</source>
<target>
<context value="medRq"/>
<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="sub"/>
</source>
<target>
<context value="medRq"/>
<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="status"/>
<source>
<context value="sub"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="active"/>
</parameter>
</target>
</rule>
<rule>
<name value="intent"/>
<source>
<context value="sub"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="intent"/>
<transform value="copy"/>
<parameter>
<valueString value="order"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="sub"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="medication"/>
<variable value="cod"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="Medi"/>
<source>
<context value="sub"/>
</source>
<target>
<context value="cod"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueString value="medication"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="dose-quantity"/>
<source>
<context value="sub"/>
<element value="doseQuantity"/>
<variable value="quantity"/>
</source>
<rule>
<name value="dosage"/>
<source>
<context value="quantity"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="dosageInstruction"/>
<variable value="dosage"/>
<transform value="create"/>
<parameter>
<valueString value="Dosage"/>
</parameter>
</target>
<rule>
<name value="dos"/>
<source>
<context value="quantity"/>
</source>
<target>
<context value="dosage"/>
<contextType value="variable"/>
<element value="doseAndRate"/>
<variable value="dosRange"/>
</target>
<rule>
<name value="range"/>
<source>
<context value="quantity"/>
</source>
<target>
<context value="dosRange"/>
<contextType value="variable"/>
<element value="dose"/>
<variable value="range"/>
<transform value="create"/>
<parameter>
<valueString value="Range"/>
</parameter>
</target>
<rule>
<name value="low"/>
<source>
<context value="quantity"/>
</source>
<target>
<context value="range"/>
<contextType value="variable"/>
<element value="low"/>
<variable value="quant"/>
<transform value="create"/>
<parameter>
<valueString value="SimpleQuantity"/>
</parameter>
</target>
<rule>
<name value="v1"/>
<source>
<context value="quantity"/>
<element value="low"/>
<variable value="l"/>
</source>
<target>
<context value="quant"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="l.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="v1"/>
<source>
<context value="quantity"/>
<element value="low"/>
<variable value="l"/>
</source>
<target>
<context value="quant"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="evaluate"/>
<parameter>
<valueString value="l.unit"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="high"/>
<source>
<context value="quantity"/>
</source>
<target>
<context value="range"/>
<contextType value="variable"/>
<element value="high"/>
<variable value="quant"/>
<transform value="create"/>
<parameter>
<valueString value="SimpleQuantity"/>
</parameter>
</target>
<rule>
<name value="v1"/>
<source>
<context value="quantity"/>
<element value="high"/>
<variable value="h"/>
</source>
<target>
<context value="quant"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="h.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="v1"/>
<source>
<context value="quantity"/>
<element value="high"/>
<variable value="h"/>
</source>
<target>
<context value="quant"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="evaluate"/>
<parameter>
<valueString value="h.unit"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="Rate-quantity"/>
<source>
<context value="sub"/>
<element value="rateQuantity"/>
<variable value="rate"/>
</source>
<rule>
<name value="dosage"/>
<source>
<context value="rate"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="dosageInstruction"/>
<variable value="dosage"/>
<transform value="create"/>
<parameter>
<valueString value="Dosage"/>
</parameter>
</target>
<rule>
<name value="dos"/>
<source>
<context value="rate"/>
</source>
<target>
<context value="dosage"/>
<contextType value="variable"/>
<element value="doseAndRate"/>
<variable value="dosRange"/>
</target>
<rule>
<name value="range"/>
<source>
<context value="rate"/>
</source>
<target>
<context value="dosRange"/>
<contextType value="variable"/>
<element value="dose"/>
<variable value="range"/>
<transform value="create"/>
<parameter>
<valueString value="Range"/>
</parameter>
</target>
<rule>
<name value="low"/>
<source>
<context value="rate"/>
</source>
<target>
<context value="range"/>
<contextType value="variable"/>
<element value="low"/>
<variable value="quant"/>
<transform value="create"/>
<parameter>
<valueString value="SimpleQuantity"/>
</parameter>
</target>
<rule>
<name value="v1"/>
<source>
<context value="rate"/>
<element value="low"/>
<variable value="l"/>
</source>
<target>
<context value="quant"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="l.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="v1"/>
<source>
<context value="rate"/>
<element value="low"/>
<variable value="l"/>
</source>
<target>
<context value="quant"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="evaluate"/>
<parameter>
<valueString value="l.unit"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="high"/>
<source>
<context value="rate"/>
</source>
<target>
<context value="range"/>
<contextType value="variable"/>
<element value="high"/>
<variable value="quant"/>
<transform value="create"/>
<parameter>
<valueString value="SimpleQuantity"/>
</parameter>
</target>
<rule>
<name value="v1"/>
<source>
<context value="rate"/>
<element value="high"/>
<variable value="h"/>
</source>
<target>
<context value="quant"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="h.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="v1"/>
<source>
<context value="rate"/>
<element value="high"/>
<variable value="h"/>
</source>
<target>
<context value="quant"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="evaluate"/>
<parameter>
<valueString value="h.unit"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="part"/>
<source>
<context value="sub"/>
<element value="participant"/>
<variable value="part"/>
</source>
<rule>
<name value="time"/>
<source>
<context value="part"/>
<element value="time"/>
<variable value="t"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="authoredOn"/>
<variable value="date"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="t"/>
<variable value="date"/>
</dependent>
</rule>
<rule>
<name value="Part"/>
<source>
<context value="part"/>
<element value="participantRole"/>
<variable value="partRole"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="meta"/>
<source>
<context value="partRole"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="partRole"/>
</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="partRole"/>
</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="partRole"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/TerapiaFarmacologicaPS/participant"/>
</parameter>
</target>
</rule>
</rule>
<documentation value="inizio meta+identifier"/>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="partRole"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="requester"/>
<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="partRole"/>
<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="id"/>
<source>
<context value="partRole"/>
<element value="id"/>
<variable value="vvv"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<documentation value="fine modifiche"/>
</rule>
<rule>
<name value="play"/>
<source>
<context value="partRole"/>
<element value="playingEntity"/>
<variable value="play"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="play"/>
<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>
<name value="med"/>
<source>
<context value="sub"/>
</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="med"/>
<transform value="create"/>
<parameter>
<valueString value="Medication"/>
</parameter>
</target>
<target>
<context value="med"/>
<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/Medication/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Medication"/>
</parameter>
</target>
<target>
<context value="medAdm"/>
<contextType value="variable"/>
<element value="medication"/>
<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/Medication/' + %med.id"/>
</parameter>
</target>
<rule>
<name value="unicode"/>
<source>
<context value="sub"/>
<element value="administrationUnitCode"/>
<variable value="adduni"/>
</source>
<rule>
<name value="administrationUnitCode"/>
<source>
<context value="sub"/>
<element value="administrationUnitCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="med"/>
<contextType value="variable"/>
<element value="form"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="consum"/>
<source>
<context value="sub"/>
<element value="consumable"/>
<variable value="consum"/>
</source>
<rule>
<name value="manuMat"/>
<source>
<context value="consum"/>
<element value="manufacturedProduct"/>
<variable value="manuProd"/>
</source>
<rule>
<name value="manuMat"/>
<source>
<context value="manuProd"/>
<element value="manufacturedMaterial"/>
<variable value="manuMt"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="manuMt"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="med"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="entry-R"/>
<source>
<context value="sub"/>
<element value="entryRelationship"/>
<variable value="entryR"/>
</source>
<rule>
<name value="obs"/>
<source>
<context value="entryR"/>
<element value="observation"/>
<variable value="observation"/>
</source>
<rule>
<name value="ingredient"/>
<source>
<context value="observation"/>
<element value="code"/>
<condition value="displayName = 'Grammatura'"/>
</source>
<target>
<context value="med"/>
<contextType value="variable"/>
<element value="ingredient"/>
<variable value="ingredient"/>
</target>
<rule>
<name value="consumable"/>
<source>
<context value="sub"/>
<element value="consumable"/>
<variable value="consumable"/>
</source>
<rule>
<name value="product"/>
<source>
<context value="consumable"/>
<element value="manufacturedProduct"/>
<variable value="manufacturedProduct"/>
</source>
<rule>
<name value="material"/>
<source>
<context value="manufacturedProduct"/>
<element value="manufacturedMaterial"/>
<variable value="manufacturedMaterial"/>
</source>
<rule>
<name value="CE"/>
<source>
<context value="manufacturedMaterial"/>
<element value="code"/>
<variable value="code"/>
</source>
<target>
<context value="ingredient"/>
<contextType value="variable"/>
<element value="item"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<dependent>
<name value="CECodeableConcept"/>
<variable value="code"/>
<variable value="value"/>
</dependent>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="strenght"/>
<source>
<context value="observation"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="ingredient"/>
<contextType value="variable"/>
<element value="strength"/>
<variable value="strength"/>
</target>
<rule>
<name value="numerator"/>
<source>
<context value="value"/>
</source>
<target>
<context value="strength"/>
<contextType value="variable"/>
<element value="numerator"/>
<variable value="numerator"/>
</target>
<rule>
<name value="valueN"/>
<source>
<context value="value"/>
</source>
<target>
<context value="numerator"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.value"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="denominator"/>
<source>
<context value="value"/>
</source>
<target>
<context value="strength"/>
<contextType value="variable"/>
<element value="denominator"/>
<variable value="denominator"/>
</target>
<rule>
<name value="valueD"/>
<source>
<context value="value"/>
</source>
<target>
<context value="denominator"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueInteger value="1"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="quantita"/>
<source>
<context value="observation"/>
<element value="code"/>
<condition
value="displayName = 'Quantità nella Confezione'"/>
</source>
<rule>
<name value="amount"/>
<source>
<context value="observation"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="med"/>
<contextType value="variable"/>
<element value="amount"/>
<variable value="amount"/>
</target>
<rule>
<name value="numerator"/>
<source>
<context value="value"/>
</source>
<target>
<context value="amount"/>
<contextType value="variable"/>
<element value="numerator"/>
<variable value="numerator"/>
</target>
<rule>
<name value="valueN"/>
<source>
<context value="value"/>
</source>
<target>
<context value="numerator"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.value"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="denominator"/>
<source>
<context value="value"/>
</source>
<target>
<context value="amount"/>
<contextType value="variable"/>
<element value="denominator"/>
<variable value="denominator"/>
</target>
<rule>
<name value="valueD"/>
<source>
<context value="value"/>
</source>
<target>
<context value="denominator"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueInteger value="1"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="perform"/>
<source>
<context value="sub"/>
<element value="performer"/>
<variable value="perf"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="preftime"/>
<source>
<context value="perf"/>
</source>
<target>
<context value="medAdm"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="notaa"/>
<source>
<context value="perf"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueString value="performertime"/>
</parameter>
</target>
</rule>
<rule>
<name value="notetime"/>
<source>
<context value="perf"/>
<element value="time"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="t"/>
<variable value="value"/>
</dependent>
</rule>
</rule>
<rule>
<name value="ent"/>
<source>
<context value="perf"/>
<element value="assignedEntity"/>
<variable value="ent"/>
</source>
<rule>
<name value="meta"/>
<source>
<context value="ent"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="ent"/>
</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="ent"/>
</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="ent"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/TerapiaFarmacologicaPS/performer"/>
</parameter>
</target>
</rule>
</rule>
<documentation value="inizio modifica meta+identifier"/>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="ent"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="medAdm"/>
<contextType value="variable"/>
<element value="performer"/>
<variable value="p"/>
</target>
<target>
<context value="p"/>
<contextType value="variable"/>
<element value="actor"/>
<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="ent"/>
<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="assperson"/>
<source>
<context value="ent"/>
<element value="assignedPerson"/>
<variable value="assPerson"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="assPerson"/>
<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>
<documentation value="fine modifica"/>
</rule>
</rule>
</rule>
</rule>
<documentation
value="Sezione Strutturata-------------------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
</group>
<group>
<name value="ClinicalDocumentSectionPianoCuraDimissione"/>
<typeMode value="none"/>
<documentation
value="------------------------------------------------------------------------------------------------------------------
-"/>
<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>
<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="entryident3"/>
<source>
<context value="src"/>
<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="careplan"/>
<transform value="create"/>
<parameter>
<valueString value="CarePlan"/>
</parameter>
</target>
<target>
<context value="careplan"/>
<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/CarePlan/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="CarePlan"/>
</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/CarePlan/' + %careplan.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
</source>
<target>
<context value="careplan"/>
<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="src"/>
</source>
<target>
<context value="careplan"/>
<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="status"/>
<source>
<context value="src"/>
</source>
<target>
<context value="careplan"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="active"/>
</parameter>
</target>
</rule>
<rule>
<name value="intent"/>
<source>
<context value="src"/>
</source>
<target>
<context value="careplan"/>
<contextType value="variable"/>
<element value="intent"/>
<transform value="copy"/>
<parameter>
<valueString value="order"/>
</parameter>
</target>
</rule>
<rule>
<name value="author"/>
<source>
<context value="src"/>
<element value="text"/>
<variable value="cdaText"/>
</source>
<target>
<context value="careplan"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="carenote"/>
</target>
<rule>
<name value="notetxt"/>
<source>
<context value="cdaText"/>
<variable value="t"/>
</source>
<target>
<context value="carenote"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
<rule>
<name value="CFauthor"/>
<source>
<context value="entry1"/>
<element value="author"/>
<variable value="author"/>
</source>
<rule>
<name value="notetime"/>
<source>
<context value="author"/>
<element value="time"/>
<variable value="t"/>
</source>
<target>
<context value="carenote"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="t"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="authpract"/>
<source>
<context value="author"/>
<element value="assignedAuthor"/>
<variable value="assauthor"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="meta"/>
<source>
<context value="assauthor"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="assauthor"/>
</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="assauthor"/>
</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="assauthor"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/PianoCuraDimissione/author"/>
</parameter>
</target>
</rule>
</rule>
<documentation value="inizio modifica meta+identifier"/>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="assauthor"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="carenote"/>
<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/Practitioner/' + %practitioner.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="2.16.840.1.113883.2.9.4.3.2"/>
<source>
<context value="assauthor"/>
<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="namepers"/>
<source>
<context value="assauthor"/>
<element value="assignedPerson"/>
<variable value="pers"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="pers"/>
<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>
<documentation value="fine modifica"/>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="entry1"/>
<source>
<context value="entry1"/>
<element value="entry"/>
<variable value="entry2"/>
</source>
<rule>
<name value="carnote"/>
<source>
<context value="entry2"/>
<element value="act"/>
<variable value="entryact"/>
</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="servicerequest"/>
<transform value="create"/>
<parameter>
<valueString value="ServiceRequest"/>
</parameter>
</target>
<target>
<context value="servicerequest"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid1"/>
<transform value="uuid"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/ServiceRequest/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="ServiceRequest"/>
</parameter>
</target>
<target>
<context value="careplan"/>
<contextType value="variable"/>
<element value="activity"/>
<variable value="activ"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="activ"/>
<contextType value="variable"/>
<element value="reference"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/ServiceRequest/' + %servicerequest.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="entryact"/>
</source>
<target>
<context value="servicerequest"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Patient/' + %patient.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="entryact"/>
</source>
<target>
<context value="servicerequest"/>
<contextType value="variable"/>
<element value="encounter"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString value="'https://example/Encounter/' + %enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="status"/>
<source>
<context value="entryact"/>
</source>
<target>
<context value="servicerequest"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="active"/>
</parameter>
</target>
</rule>
<rule>
<name value="intent"/>
<source>
<context value="entryact"/>
</source>
<target>
<context value="servicerequest"/>
<contextType value="variable"/>
<element value="intent"/>
<transform value="copy"/>
<parameter>
<valueString value="order"/>
</parameter>
</target>
</rule>
<rule>
<name value="entry2"/>
<source>
<context value="entryact"/>
</source>
<target>
<context value="servicerequest"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identif"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<rule>
<name value="jarilemes"/>
<source>
<context value="entryact"/>
<element value="reference"/>
<variable value="actref"/>
</source>
<rule>
<name value="actref"/>
<source>
<context value="actref"/>
<element value="externalAct"/>
<variable value="extact"/>
</source>
<rule>
<name value="extact"/>
<source>
<context value="extact"/>
</source>
<target>
<context value="servicerequest"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identif3"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<rule>
<name value="idnetn"/>
<source>
<context value="extact"/>
<element value="id"/>
<variable value="id"/>
</source>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identif3"/>
<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="identif3"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identif3"/>
<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>
</rule>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="entryact"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="servicerequest"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="entryact"/>
<element value="statusCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="servicerequest"/>
<contextType value="variable"/>
<element value="status"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="servReq"/>
<source>
<context value="entryact"/>
<element value="author"/>
<variable value="actauthor"/>
</source>
<rule>
<name value="time"/>
<source>
<context value="actauthor"/>
<element value="time"/>
<variable value="t"/>
</source>
<target>
<context value="servicerequest"/>
<contextType value="variable"/>
<element value="authoredOn"/>
<variable value="date"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="t"/>
<variable value="date"/>
</dependent>
</rule>
<rule>
<name value="author"/>
<source>
<context value="actauthor"/>
<element value="assignedAuthor"/>
<variable value="assauthor"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="meta"/>
<source>
<context value="assauthor"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="assauthor"/>
</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="assauthor"/>
</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="assauthor"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/PianoCuraDimissione/author"/>
</parameter>
</target>
</rule>
</rule>
<documentation value="inizio modifica identifier"/>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="assauthor"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="servicerequest"/>
<contextType value="variable"/>
<element value="requester"/>
<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="assauthor"/>
<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="namepers"/>
<source>
<context value="assauthor"/>
<element value="assignedPerson"/>
<variable value="pers"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="pers"/>
<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>
<documentation value="fine modifica"/>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</group>
<group>
<name value="ClinicalDocumentSectionDimissione"/>
<typeMode value="none"/>
<documentation
value="-------Dimissione------------------------------------------------------------------------------------------------------"/>
<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>
<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="entry1"/>
<source>
<context value="src"/>
<element value="entry"/>
<variable value="entry1"/>
</source>
<rule>
<name value="act"/>
<source>
<context value="entry1"/>
<element value="act"/>
<variable value="act"/>
</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="encountert"/>
<transform value="create"/>
<parameter>
<valueString value="Encounter"/>
</parameter>
</target>
<target>
<context value="encountert"/>
<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/Encounter/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Encounter"/>
</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/Encounter/' + %encountert.id"/>
</parameter>
</target>
<rule>
<name value="status"/>
<source>
<context value="act"/>
</source>
<target>
<context value="encountert"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="finished"/>
</parameter>
</target>
</rule>
<rule>
<name value="class"/>
<source>
<context value="act"/>
</source>
<target>
<context value="encountert"/>
<contextType value="variable"/>
<element value="class"/>
<variable value="cl"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<rule>
<name value="code"/>
<source>
<context value="act"/>
</source>
<target>
<context value="cl"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="AMB"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="act"/>
</source>
<target>
<context value="cl"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="ambulatory"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="refenc"/>
<source>
<context value="act"/>
</source>
<target>
<context value="encountert"/>
<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/Encounter/' + enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="refpatient"/>
<source>
<context value="act"/>
</source>
<target>
<context value="encountert"/>
<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="code"/>
<source>
<context value="act"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="encountert"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="where"/>
<source>
<context value="act"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="act"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="encountert"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
</rule>
<rule>
<name value="where"/>
<source>
<context value="act"/>
<condition
value="effectiveTime.low.exists().not() or effectiveTime.high.exists().not()"/>
</source>
<rule>
<name value="efft"/>
<source>
<context value="act"/>
<element value="effectiveTime"/>
<variable value="effectivetime1"/>
</source>
<target>
<context value="encountert"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<rule>
<name value="val"/>
<source>
<context value="effectivetime1"/>
</source>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="start"/>
<variable value="start"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="effectivetime1"/>
<variable value="start"/>
</dependent>
</rule>
</rule>
<documentation value="effectiveTime = time-stamp"/>
</rule>
<rule>
<name value="erformer"/>
<source>
<context value="act"/>
<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="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="ass"/>
<source>
<context value="performer"/>
<element value="assignedEntity"/>
<variable value="assEnty"/>
</source>
<rule>
<name value="meta"/>
<source>
<context value="assEnty"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="assEnty"/>
</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="assEnty"/>
</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="assEnty"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/Dimissione/performer"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="assEnty"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="perf"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid2"/>
<transform value="evaluate"/>
<parameter>
<valueString value="r + '-' + ext"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="encountert"/>
<contextType value="variable"/>
<element value="participant"/>
<variable value="perf"/>
</target>
<rule>
<name value="period"/>
<source>
<context value="performer"/>
</source>
<target>
<context value="perf"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<rule>
<name value="time"/>
<source>
<context value="performer"/>
<element value="time"/>
<variable value="time"/>
</source>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="start"/>
<variable value="start"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="time"/>
<variable value="start"/>
</dependent>
</rule>
</rule>
<rule>
<name value="aut"/>
<source>
<context value="performer"/>
</source>
<target>
<context value="perf"/>
<contextType value="variable"/>
<element value="individual"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Practitioner/' + %practitioner.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="2.16.840.1.113883.2.9.4.3.2"/>
<source>
<context value="assEnty"/>
<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="assPer"/>
<source>
<context value="assEnty"/>
<element value="assignedPerson"/>
<variable value="assPers"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="assPers"/>
<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>
<documentation
value="performer.time as ti -> note.time = (ti.value);"/>
</rule>
</rule>
<rule>
<name value="entriRel"/>
<source>
<context value="act"/>
<element value="entryRelationship"/>
<variable value="entriRel"/>
</source>
<rule>
<name value="enc"/>
<source>
<context value="entriRel"/>
<element value="encounter"/>
<variable value="enc1"/>
</source>
<rule>
<name value="enc1"/>
<source>
<context value="enc1"/>
</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="encountert1"/>
<transform value="create"/>
<parameter>
<valueString value="Encounter"/>
</parameter>
</target>
<target>
<context value="encountert1"/>
<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/Encounter/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Encounter"/>
</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/Encounter/' + %encountert1.id"/>
</parameter>
</target>
<target>
<context value="encountert1"/>
<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/Encounter/' + encountert.id"/>
</parameter>
</target>
<rule>
<name value="status"/>
<source>
<context value="enc1"/>
</source>
<target>
<context value="encountert1"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="finished"/>
</parameter>
</target>
</rule>
<rule>
<name value="class"/>
<source>
<context value="enc1"/>
</source>
<target>
<context value="encountert1"/>
<contextType value="variable"/>
<element value="class"/>
<variable value="cl"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<rule>
<name value="code"/>
<source>
<context value="enc1"/>
</source>
<target>
<context value="cl"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="AMB"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="enc1"/>
</source>
<target>
<context value="cl"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="ambulatory"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="refpatient"/>
<source>
<context value="enc1"/>
</source>
<target>
<context value="encountert1"/>
<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="id"/>
<source>
<context value="enc1"/>
<element value="id"/>
<variable value="vvv"/>
</source>
<target>
<context value="encountert1"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="enc1"/>
</source>
<target>
<context value="encountert1"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="ti"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="coding"/>
<source>
<context value="enc1"/>
</source>
<target>
<context value="ti"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="cod"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<rule>
<name value="code"/>
<source>
<context value="enc1"/>
<element value="code"/>
<variable value="c"/>
</source>
<target>
<context value="cod"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="evaluate"/>
<parameter>
<valueString value="c.code"/>
</parameter>
</target>
</rule>
<rule>
<name value="syst"/>
<source>
<context value="enc1"/>
<element value="code"/>
<variable value="c"/>
</source>
<rule>
<name value="system"/>
<source>
<context value="c"/>
<element value="codeSystem"/>
<variable value="s"/>
</source>
<target>
<context value="cod"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="s"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="dispaly"/>
<source>
<context value="enc1"/>
<element value="code"/>
<variable value="c"/>
</source>
<target>
<context value="cod"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="evaluate"/>
<parameter>
<valueString value="c.displayName"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="text"/>
<source>
<context value="enc1"/>
<element value="text"/>
<variable value="tx"/>
</source>
<rule>
<name value="val"/>
<source>
<context value="tx"/>
<element value="reference"/>
<variable value="ref"/>
</source>
<target>
<context value="ti"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="ref.value"/>
</parameter>
</target>
</rule>
</rule>
<documentation value="enc1.code -> encountert1.type;"/>
</rule>
<rule>
<name value="where"/>
<source>
<context value="enc1"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="enc1"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="encountert1"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
</rule>
<rule>
<name value="where"/>
<source>
<context value="enc1"/>
<condition
value="effectiveTime.low.exists().not() or effectiveTime.high.exists().not()"/>
</source>
<rule>
<name value="efft"/>
<source>
<context value="enc1"/>
<element value="effectiveTime"/>
<variable value="effectivetime1"/>
</source>
<target>
<context value="encountert1"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<rule>
<name value="val"/>
<source>
<context value="effectivetime1"/>
</source>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="start"/>
<variable value="start"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="effectivetime1"/>
<variable value="start"/>
</dependent>
</rule>
</rule>
<documentation value="effectiveTime = time-stamp"/>
</rule>
<rule>
<name value="Location"/>
<source>
<context value="enc1"/>
<element value="participant"/>
<variable value="part"/>
<condition value="(typeCode = 'LOC')"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="location"/>
<transform value="create"/>
<parameter>
<valueString value="Location"/>
</parameter>
</target>
<target>
<context value="location"/>
<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/Location/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Location/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="meta"/>
<source>
<context value="part"/>
</source>
<target>
<context value="location"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="part"/>
</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="part"/>
</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="part"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/Dimissione/participant"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="location1"/>
<source>
<context value="part"/>
<element value="time"/>
<variable value="tim"/>
</source>
<target>
<context value="encountert1"/>
<contextType value="variable"/>
<element value="location"/>
<variable value="locat"/>
</target>
<rule>
<name value="time"/>
<source>
<context value="tim"/>
</source>
<target>
<context value="locat"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="tim"/>
<variable value="period"/>
</dependent>
</rule>
<rule>
<name value="time"/>
<source>
<context value="part"/>
<element value="time"/>
<variable value="tim"/>
</source>
<target>
<context value="locat"/>
<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="tim"/>
</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="tim"/>
<variable value="start"/>
</dependent>
</rule>
</rule>
<rule>
<name value="partRole"/>
<source>
<context value="part"/>
<element value="participantRole"/>
<variable value="partRole"/>
</source>
<rule>
<name value="identifier"/>
<source>
<context value="partRole"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="location"/>
<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="partRole"/>
</source>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Location?identifier="/>
</parameter>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="idasi"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="location"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid"/>
<transform value="evaluate"/>
<parameter>
<valueString value="r + '-' + ext"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Location/"/>
</parameter>
<parameter>
<valueId value="uuid"/>
</parameter>
</target>
<target>
<context value="locat"/>
<contextType value="variable"/>
<element value="location"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Location/' + %location.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="partRole"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="location"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<documentation
value="partRole.id -> location.identifier;"/>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="entryrel2"/>
<source>
<context value="enc1"/>
<element value="entryRelationship"/>
<variable value="entryrel2"/>
</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="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="encountert1"/>
<contextType value="variable"/>
<element value="reasonReference"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Observation/' + %observation.id"/>
</parameter>
</target>
<rule>
<name value="obs"/>
<source>
<context value="entryrel2"/>
<element value="observation"/>
<variable value="obs"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="obs"/>
</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="obs"/>
</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/' + %encountert1.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="obs"/>
<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="statusCode"/>
<source>
<context value="obs"/>
<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="obs"/>
<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="obs"/>
<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="obs"/>
<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="notpresent"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
<rule>
<name value="value2"/>
<source>
<context value="obs"/>
<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="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="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="value"/>
<source>
<context value="obs"/>
<type value="INT"/>
<element value="value"/>
<variable value="int"/>
</source>
<target>
<context value="observation"/>
<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="observation"/>
<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="observation"/>
<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="observation"/>
<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="observation"/>
<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="observation"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="create"/>
<parameter>
<valueString value="string"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.dataString"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
<documentation
value="Encounter Post dimissione---------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
<rule>
<name value="entri-act"/>
<source>
<context value="act"/>
<element value="entryRelationship"/>
<variable value="entriRel2"/>
</source>
<rule>
<name value="a"/>
<source>
<context value="entriRel2"/>
<element value="act"/>
<variable value="a"/>
</source>
<rule>
<name value="act"/>
<source>
<context value="a"/>
</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="encountert2"/>
<transform value="create"/>
<parameter>
<valueString value="Encounter"/>
</parameter>
</target>
<target>
<context value="encountert2"/>
<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/Encounter/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Encounter"/>
</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/Encounter/' + encountert2.id"/>
</parameter>
</target>
<target>
<context value="encountert2"/>
<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/Encounter/' + encountert.id"/>
</parameter>
</target>
<rule>
<name value="status"/>
<source>
<context value="a"/>
</source>
<target>
<context value="encountert2"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="finished"/>
</parameter>
</target>
</rule>
<rule>
<name value="class"/>
<source>
<context value="a"/>
</source>
<target>
<context value="encountert2"/>
<contextType value="variable"/>
<element value="class"/>
<variable value="cl"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<rule>
<name value="code"/>
<source>
<context value="a"/>
</source>
<target>
<context value="cl"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="AMB"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="a"/>
</source>
<target>
<context value="cl"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="ambulatory"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="refpatient"/>
<source>
<context value="a"/>
</source>
<target>
<context value="encountert2"/>
<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="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="encountert2"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="eff"/>
<variable value="period"/>
</dependent>
</rule>
</rule>
<rule>
<name value="where"/>
<source>
<context value="a"/>
<condition
value="effectiveTime.low.exists().not() or effectiveTime.high.exists().not()"/>
</source>
<rule>
<name value="efft"/>
<source>
<context value="a"/>
<element value="effectiveTime"/>
<variable value="effectivetime1"/>
</source>
<target>
<context value="encountert2"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<rule>
<name value="val"/>
<source>
<context value="effectivetime1"/>
</source>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="start"/>
<variable value="start"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="effectivetime1"/>
<variable value="start"/>
</dependent>
</rule>
</rule>
<documentation value="effectiveTime = time-stamp"/>
</rule>
<rule>
<name value="loc"/>
<source>
<context value="a"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="location"/>
<transform value="create"/>
<parameter>
<valueString value="Location"/>
</parameter>
</target>
<target>
<context value="location"/>
<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/Location/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Location/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="text"/>
<source>
<context value="a"/>
<element value="text"/>
<variable value="tx"/>
</source>
<rule>
<name value="dfs"/>
<source>
<context value="tx"/>
<element value="reference"/>
<variable value="ref"/>
</source>
<target>
<context value="location"/>
<contextType value="variable"/>
<element value="description"/>
<transform value="evaluate"/>
<parameter>
<valueString value="ref.value"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="Location"/>
<source>
<context value="a"/>
<element value="participant"/>
<variable value="part"/>
</source>
<rule>
<name value="meta"/>
<source>
<context value="part"/>
</source>
<target>
<context value="location"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="part"/>
</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="part"/>
</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="part"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/Dimissione/act"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="loc2"/>
<source>
<context value="part"/>
<element value="time"/>
<variable value="tim"/>
</source>
<target>
<context value="encountert2"/>
<contextType value="variable"/>
<element value="location"/>
<variable value="locat"/>
</target>
<rule>
<name value="time"/>
<source>
<context value="tim"/>
</source>
<target>
<context value="locat"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="tim"/>
<variable value="period"/>
</dependent>
</rule>
<rule>
<name value="time"/>
<source>
<context value="part"/>
<element value="time"/>
<variable value="tim"/>
</source>
<target>
<context value="locat"/>
<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="tim"/>
</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="tim"/>
<variable value="start"/>
</dependent>
</rule>
</rule>
<rule>
<name value="partRole"/>
<source>
<context value="part"/>
<element value="participantRole"/>
<variable value="partRole"/>
</source>
<rule>
<name value="identifier"/>
<source>
<context value="partRole"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="location"/>
<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="partRole"/>
</source>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Location?identifier="/>
</parameter>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="idasi"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="location"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid"/>
<transform value="evaluate"/>
<parameter>
<valueString value="r + '-' + ext"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString
value="https://example/Location/"/>
</parameter>
<parameter>
<valueId value="uuid"/>
</parameter>
</target>
<target>
<context value="locat"/>
<contextType value="variable"/>
<element value="location"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Location/' + %location.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="partRole"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="location"/>
<contextType value="variable"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<documentation
value="partRole.id -> location.identifier;"/>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="entryrel2"/>
<source>
<context value="a"/>
<element value="entryRelationship"/>
<variable value="entryrel2"/>
</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="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="encountert2"/>
<contextType value="variable"/>
<element value="reasonReference"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Observation/' + %observation.id"/>
</parameter>
</target>
<rule>
<name value="obs"/>
<source>
<context value="entryrel2"/>
<element value="observation"/>
<variable value="obs"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="obs"/>
</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="obs"/>
</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/' + %encountert2.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="obs"/>
<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="statusCode"/>
<source>
<context value="obs"/>
<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="obs"/>
<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="obs"/>
<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="obs"/>
<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="notpresent"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
<rule>
<name value="value2"/>
<source>
<context value="obs"/>
<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="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="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="value"/>
<source>
<context value="obs"/>
<type value="INT"/>
<element value="value"/>
<variable value="int"/>
</source>
<target>
<context value="observation"/>
<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="observation"/>
<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="observation"/>
<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="observation"/>
<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="observation"/>
<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="observation"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="create"/>
<parameter>
<valueString value="string"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.dataString"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
<documentation
value="Trasferimento post dimissione-------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
<rule>
<name value="entryrel2"/>
<source>
<context value="act"/>
<element value="entryRelationship"/>
<variable value="entryrel2"/>
</source>
<rule>
<name value="obs"/>
<source>
<context value="entryrel2"/>
<element value="observation"/>
<variable value="obs"/>
</source>
<rule>
<name value="222"/>
<source>
<context value="obs"/>
<element value="code"/>
<variable value="code"/>
<condition value="(code = '29308-4')"/>
</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="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="encountert"/>
<contextType value="variable"/>
<element value="reasonReference"/>
<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/' + %observation.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="obs"/>
</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="obs"/>
</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/' + %encountert.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="obs"/>
<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="statusCode"/>
<source>
<context value="obs"/>
<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="obs"/>
<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="obs"/>
<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="obs"/>
<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="status"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
<documentation
value="obs where obs.statusCode.exists().not() then {"/>
</rule>
<rule>
<name value="value2"/>
<source>
<context value="obs"/>
<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>
<documentation value="}"statuscode";"/>
</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="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="val"/>
<source>
<context value="obs"/>
<element value="value"/>
<variable value="val"/>
</source>
<rule>
<name value="coding"/>
<source>
<context value="val"/>
</source>
<target>
<context value="observation"/>
<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="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="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>
</rule>
<documentation
value="--------------Diagnosi alla dimissione-------------------------------------------------------------"/>
</rule>
<rule>
<name value="3"/>
<source>
<context value="act"/>
<element value="entryRelationship"/>
<variable value="entriRel3"/>
</source>
<rule>
<name value="x"/>
<source>
<context value="entriRel3"/>
<element value="observation"/>
<variable value="obs2"/>
</source>
<rule>
<name value="act"/>
<source>
<context value="obs2"/>
<element value="code"/>
<variable value="code"/>
</source>
<rule>
<name value="entry-obs1"/>
<source>
<context value="code"/>
<element value="code"/>
<condition value="(code.code = '11302-7')"/>
</source>
<rule>
<name value="hospital"/>
<source>
<context value="obs2"/>
</source>
<target>
<context value="encountert"/>
<contextType value="variable"/>
<element value="hospitalization"/>
<variable value="hospital"/>
</target>
<rule>
<name value="value"/>
<source>
<context value="obs2"/>
<element value="value"/>
<variable value="vvv"/>
</source>
<target>
<context value="hospital"/>
<contextType value="variable"/>
<element value="dischargeDisposition"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
<documentation value="--------Esito----------------------------"/>
</rule>
</rule>
</rule>
<rule>
<name value="entry"/>
<source>
<context value="src"/>
<element value="entry"/>
<variable value="entry1"/>
</source>
<rule>
<name value="obs"/>
<source>
<context value="entry1"/>
<element value="observation"/>
<variable value="obs"/>
</source>
<rule>
<name value="obstarg"/>
<source>
<context value="obs"/>
</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="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</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/Observation/' + %observation.id"/>
</parameter>
</target>
<rule>
<name value="value"/>
<source>
<context value="obs"/>
<element value="value"/>
<variable value="val"/>
<condition value="('xsi:type' = 'BL')"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="val.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="act"/>
<source>
<context value="obs"/>
</source>
<dependent>
<name value="Observation"/>
<variable value="obs"/>
<variable value="patient"/>
<variable value="enc"/>
<variable value="observation"/>
<variable value="bundle"/>
</dependent>
</rule>
</rule>
</rule>
</rule>
</group>
<group>
<name value="ClinicalDocumentSectionTerapiaFarmacologicaDimissione"/>
<typeMode value="none"/>
<documentation
value="-----------------------------------------------------------------------------------------------------------------------
------------------------------TerapiaFarmacologicaDimissione-----------------------------------------------------------------------------------------"/>
<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>
<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="text"/>
<source>
<context value="src"/>
<condition value="src.entry.exists().not()"/>
</source>
<rule>
<name value="note"/>
<source>
<context value="src"/>
<element value="text"/>
<variable value="cdaText"/>
</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="medRq"/>
<transform value="create"/>
<parameter>
<valueString value="MedicationRequest"/>
</parameter>
</target>
<target>
<context value="medRq"/>
<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/MedicationRequest/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="MedicationRequest"/>
</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/MedicationRequest/' + %medRq.id"/>
</parameter>
</target>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
<transform value="create"/>
<parameter>
<valueString value="Annotation"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="cdaText"/>
</parameter>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="medRq"/>
<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="cdaText"/>
</source>
<target>
<context value="medRq"/>
<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="status"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="active"/>
</parameter>
</target>
</rule>
<rule>
<name value="intent"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="intent"/>
<transform value="copy"/>
<parameter>
<valueString value="order"/>
</parameter>
</target>
</rule>
<rule>
<name value="auth"/>
<source>
<context value="src"/>
<element value="author"/>
<variable value="auth"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="time"/>
<source>
<context value="auth"/>
<element value="time"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="t"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="assAuth"/>
<source>
<context value="auth"/>
<element value="assignedAuthor"/>
<variable value="assAuth"/>
</source>
<rule>
<name value="meta"/>
<source>
<context value="assAuth"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="assAuth"/>
</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="assAuth"/>
</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="assAuth"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/TerapiaFarmacologicaDimissione/author"/>
</parameter>
</target>
</rule>
</rule>
<documentation value="assAuth.time -> note.time;"/>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="assAuth"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="note"/>
<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/Practitioner/' + %practitioner.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="2.16.840.1.113883.2.9.4.3.2"/>
<source>
<context value="assAuth"/>
<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="assPers"/>
<source>
<context value="assAuth"/>
<element value="assignedPerson"/>
<variable value="asspers"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="asspers"/>
<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>
<name value="medicationesiste"/>
<source>
<context value="src"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="medication"/>
<variable value="medication"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="text"/>
<source>
<context value="src"/>
<element value="text"/>
<variable value="txt"/>
</source>
<target>
<context value="medication"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="txt"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<documentation
value="Sezione Narrativa------------------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
<rule>
<name value="sezioneesiste"/>
<source>
<context value="src"/>
<condition value="src.entry.exists()"/>
</source>
<rule>
<name value="medication"/>
<source>
<context value="src"/>
</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="medRq"/>
<transform value="create"/>
<parameter>
<valueString value="MedicationRequest"/>
</parameter>
</target>
<target>
<context value="medRq"/>
<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/MedicationRequest/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="MedicationRequest"/>
</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/MedicationRequest/' + %medRq.id"/>
</parameter>
</target>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
<transform value="create"/>
<parameter>
<valueString value="Annotation"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
<element value="text"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
</source>
<target>
<context value="medRq"/>
<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="src"/>
</source>
<target>
<context value="medRq"/>
<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="status"/>
<source>
<context value="src"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="active"/>
</parameter>
</target>
</rule>
<rule>
<name value="intent"/>
<source>
<context value="src"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="intent"/>
<transform value="copy"/>
<parameter>
<valueString value="order"/>
</parameter>
</target>
</rule>
<rule>
<name value="auth"/>
<source>
<context value="src"/>
<element value="author"/>
<variable value="auth"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="time"/>
<source>
<context value="auth"/>
<element value="time"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="t"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="assAuth"/>
<source>
<context value="auth"/>
<element value="assignedAuthor"/>
<variable value="assAuth"/>
</source>
<rule>
<name value="meta"/>
<source>
<context value="assAuth"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="assAuth"/>
</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="assAuth"/>
</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="assAuth"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/TerapiaFarmacologicaDimissione/author"/>
</parameter>
</target>
</rule>
</rule>
<documentation value="assAuth.time -> note.time;"/>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="assAuth"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="note"/>
<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/Practitioner/' + %practitioner.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="2.16.840.1.113883.2.9.4.3.2"/>
<source>
<context value="assAuth"/>
<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="assPers"/>
<source>
<context value="assAuth"/>
<element value="assignedPerson"/>
<variable value="asspers"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="asspers"/>
<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>
<name value="entry"/>
<source>
<context value="src"/>
<element value="entry"/>
<variable value="entry1"/>
</source>
<rule>
<name value="sub"/>
<source>
<context value="entry1"/>
<element value="substanceAdministration"/>
<variable value="sub"/>
</source>
<rule>
<name value="statusCode"/>
<source>
<context value="sub"/>
<element value="statusCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="status"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="dosage"/>
<source>
<context value="sub"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="dosageInstruction"/>
<variable value="dosage"/>
<transform value="create"/>
<parameter>
<valueString value="Dosage"/>
</parameter>
</target>
<rule>
<name value="timing"/>
<source>
<context value="sub"/>
</source>
<target>
<context value="dosage"/>
<contextType value="variable"/>
<element value="timing"/>
<variable value="tim"/>
<transform value="create"/>
<parameter>
<valueString value="Timing"/>
</parameter>
</target>
<rule>
<name value="repeat"/>
<source>
<context value="sub"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="tim"/>
<contextType value="variable"/>
<element value="repeat"/>
<variable value="repeat"/>
</target>
<rule>
<name value="boundsperiod"/>
<source>
<context value="eff"/>
</source>
<target>
<context value="repeat"/>
<contextType value="variable"/>
<element value="bounds"/>
<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>
</rule>
<rule>
<name value="eff"/>
<source>
<context value="sub"/>
<type value="PIVL_TS"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="dosageInstruction"/>
<variable value="dosage"/>
<transform value="create"/>
<parameter>
<valueString value="Dosage"/>
</parameter>
</target>
<rule>
<name value="cod"/>
<source>
<context value="eff"/>
</source>
<target>
<context value="dosage"/>
<contextType value="variable"/>
<element value="timing"/>
<variable value="timing"/>
<transform value="create"/>
<parameter>
<valueString value="Timing"/>
</parameter>
</target>
<dependent>
<name value="periodTiming"/>
<variable value="eff"/>
<variable value="timing"/>
</dependent>
</rule>
</rule>
<rule>
<name value="dosage"/>
<source>
<context value="sub"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="dosageInstruction"/>
<variable value="dosage"/>
<transform value="create"/>
<parameter>
<valueString value="Dosage"/>
</parameter>
</target>
<rule>
<name value="routeCode"/>
<source>
<context value="sub"/>
<element value="routeCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="dosage"/>
<contextType value="variable"/>
<element value="route"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
<rule>
<name value="dosage"/>
<source>
<context value="sub"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="dosageInstruction"/>
<variable value="dosage"/>
<transform value="create"/>
<parameter>
<valueString value="Dosage"/>
</parameter>
</target>
<rule>
<name value="approachSiteCode"/>
<source>
<context value="sub"/>
<element value="approachSiteCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="dosage"/>
<contextType value="variable"/>
<element value="site"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
<rule>
<name value="doseQuant"/>
<source>
<context value="sub"/>
<element value="doseQuantity"/>
<variable value="doseQuant"/>
</source>
<rule>
<name value="Dosage"/>
<source>
<context value="doseQuant"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="dosageInstruction"/>
<variable value="dosageInstruction"/>
<transform value="create"/>
<parameter>
<valueString value="Dosage"/>
</parameter>
</target>
<rule>
<name value="ot"/>
<source>
<context value="doseQuant"/>
<element value="originalText"/>
<variable value="ot"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="ot"/>
<element value="reference"/>
<variable value="vvv"/>
</source>
<target>
<context value="dosageInstruction"/>
<contextType value="variable"/>
<element value="text"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
<rule>
<name value="dosageRate"/>
<source>
<context value="doseQuant"/>
</source>
<target>
<context value="dosageInstruction"/>
<contextType value="variable"/>
<element value="doseAndRate"/>
<variable value="dosageRate"/>
</target>
<rule>
<name value="d"/>
<source>
<context value="doseQuant"/>
</source>
<target>
<context value="dosageRate"/>
<contextType value="variable"/>
<element value="dose"/>
<variable value="d"/>
<transform value="create"/>
<parameter>
<valueString value="Range"/>
</parameter>
</target>
<rule>
<name value="low"/>
<source>
<context value="doseQuant"/>
</source>
<target>
<context value="d"/>
<contextType value="variable"/>
<element value="low"/>
<variable value="l"/>
<transform value="create"/>
<parameter>
<valueString value="SimpleQuantity"/>
</parameter>
</target>
<rule>
<name value="low"/>
<source>
<context value="doseQuant"/>
<element value="low"/>
<variable value="lo"/>
</source>
<target>
<context value="l"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="lo.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="low"/>
<source>
<context value="doseQuant"/>
<element value="low"/>
<variable value="lo"/>
</source>
<target>
<context value="l"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="evaluate"/>
<parameter>
<valueString value="lo.unit"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="low"/>
<source>
<context value="doseQuant"/>
</source>
<target>
<context value="d"/>
<contextType value="variable"/>
<element value="high"/>
<variable value="h"/>
<transform value="create"/>
<parameter>
<valueString value="SimpleQuantity"/>
</parameter>
</target>
<rule>
<name value="high"/>
<source>
<context value="doseQuant"/>
<element value="high"/>
<variable value="hi"/>
</source>
<target>
<context value="h"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="hi.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="high"/>
<source>
<context value="doseQuant"/>
<element value="high"/>
<variable value="hi"/>
</source>
<target>
<context value="h"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="evaluate"/>
<parameter>
<valueString value="hi.unit"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="dosageRate"/>
<source>
<context value="sub"/>
<element value="rateQuantity"/>
<variable value="rateQuantity"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="dosageInstruction"/>
<variable value="dosageInstruction1"/>
<transform value="create"/>
<parameter>
<valueString value="Dosage"/>
</parameter>
</target>
<rule>
<name value="ot"/>
<source>
<context value="rateQuantity"/>
<element value="originalText"/>
<variable value="ot"/>
</source>
<rule>
<name value="reference"/>
<source>
<context value="ot"/>
<element value="reference"/>
<variable value="vvv"/>
</source>
<target>
<context value="dosageInstruction1"/>
<contextType value="variable"/>
<element value="text"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
<rule>
<name value="qualcosa"/>
<source>
<context value="rateQuantity"/>
</source>
<target>
<context value="dosageInstruction1"/>
<contextType value="variable"/>
<element value="doseAndRate"/>
<variable value="dosageRate"/>
</target>
<rule>
<name value="d"/>
<source>
<context value="rateQuantity"/>
</source>
<target>
<context value="dosageRate"/>
<contextType value="variable"/>
<element value="rate"/>
<variable value="d"/>
<transform value="create"/>
<parameter>
<valueString value="Range"/>
</parameter>
</target>
<rule>
<name value="low"/>
<source>
<context value="rateQuantity"/>
</source>
<target>
<context value="d"/>
<contextType value="variable"/>
<element value="low"/>
<variable value="l"/>
<transform value="create"/>
<parameter>
<valueString value="SimpleQuantity"/>
</parameter>
</target>
<rule>
<name value="low"/>
<source>
<context value="rateQuantity"/>
<element value="low"/>
<variable value="lo"/>
</source>
<target>
<context value="l"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="lo.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="low"/>
<source>
<context value="rateQuantity"/>
<element value="low"/>
<variable value="lo"/>
</source>
<target>
<context value="l"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="evaluate"/>
<parameter>
<valueString value="lo.unit"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="low"/>
<source>
<context value="rateQuantity"/>
</source>
<target>
<context value="d"/>
<contextType value="variable"/>
<element value="high"/>
<variable value="h"/>
<transform value="create"/>
<parameter>
<valueString value="SimpleQuantity"/>
</parameter>
</target>
<rule>
<name value="high"/>
<source>
<context value="rateQuantity"/>
<element value="high"/>
<variable value="hi"/>
</source>
<target>
<context value="h"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="hi.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="high"/>
<source>
<context value="rateQuantity"/>
<element value="high"/>
<variable value="hi"/>
</source>
<target>
<context value="h"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="evaluate"/>
<parameter>
<valueString value="hi.unit"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="admnistrationUnicode"/>
<source>
<context value="sub"/>
</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="medication"/>
<transform value="create"/>
<parameter>
<valueString value="Medication"/>
</parameter>
</target>
<target>
<context value="medication"/>
<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/Medication/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Medication"/>
</parameter>
</target>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="medication"/>
<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/Medication/' + %medication.id"/>
</parameter>
</target>
<rule>
<name value="administrationUnitCode"/>
<source>
<context value="sub"/>
<element value="administrationUnitCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="medication"/>
<contextType value="variable"/>
<element value="form"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="cons"/>
<source>
<context value="sub"/>
<element value="consumable"/>
<variable value="cons"/>
</source>
<rule>
<name value="manumat"/>
<source>
<context value="cons"/>
<element value="manufacturedProduct"/>
<variable value="manuprod"/>
</source>
<rule>
<name value="manuFact"/>
<source>
<context value="manuprod"/>
<element value="manufacturedMaterial"/>
<variable value="manufact"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="manufact"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="medication"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="entryR"/>
<source>
<context value="sub"/>
<element value="entryRelationship"/>
<variable value="entryR"/>
</source>
<rule>
<name value="obs"/>
<source>
<context value="entryR"/>
<element value="observation"/>
<variable value="observation"/>
</source>
<rule>
<name value="ingredient"/>
<source>
<context value="observation"/>
<element value="code"/>
<condition value="displayName = 'Grammatura'"/>
</source>
<target>
<context value="medication"/>
<contextType value="variable"/>
<element value="ingredient"/>
<variable value="ingredient"/>
</target>
<rule>
<name value="consumable"/>
<source>
<context value="sub"/>
<element value="consumable"/>
<variable value="consumable"/>
</source>
<rule>
<name value="product"/>
<source>
<context value="consumable"/>
<element value="manufacturedProduct"/>
<variable value="manufacturedProduct"/>
</source>
<rule>
<name value="material"/>
<source>
<context value="manufacturedProduct"/>
<element value="manufacturedMaterial"/>
<variable value="manufacturedMaterial"/>
</source>
<rule>
<name value="CE"/>
<source>
<context value="manufacturedMaterial"/>
<element value="code"/>
<variable value="code"/>
</source>
<target>
<context value="ingredient"/>
<contextType value="variable"/>
<element value="item"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<dependent>
<name value="CECodeableConcept"/>
<variable value="code"/>
<variable value="value"/>
</dependent>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="strenght"/>
<source>
<context value="observation"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="ingredient"/>
<contextType value="variable"/>
<element value="strength"/>
<variable value="strength"/>
</target>
<rule>
<name value="numerator"/>
<source>
<context value="value"/>
</source>
<target>
<context value="strength"/>
<contextType value="variable"/>
<element value="numerator"/>
<variable value="numerator"/>
</target>
<rule>
<name value="valueN"/>
<source>
<context value="value"/>
</source>
<target>
<context value="numerator"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.value"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="denominator"/>
<source>
<context value="value"/>
</source>
<target>
<context value="strength"/>
<contextType value="variable"/>
<element value="denominator"/>
<variable value="denominator"/>
</target>
<rule>
<name value="valueD"/>
<source>
<context value="value"/>
</source>
<target>
<context value="denominator"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueInteger value="1"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="quantita"/>
<source>
<context value="observation"/>
<element value="code"/>
<condition
value="displayName = 'Quantità nella Confezione'"/>
</source>
<rule>
<name value="amount"/>
<source>
<context value="observation"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="medication"/>
<contextType value="variable"/>
<element value="amount"/>
<variable value="amount"/>
</target>
<rule>
<name value="numerator"/>
<source>
<context value="value"/>
</source>
<target>
<context value="amount"/>
<contextType value="variable"/>
<element value="numerator"/>
<variable value="numerator"/>
</target>
<rule>
<name value="valueN"/>
<source>
<context value="value"/>
</source>
<target>
<context value="numerator"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.value"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="denominator"/>
<source>
<context value="value"/>
</source>
<target>
<context value="amount"/>
<contextType value="variable"/>
<element value="denominator"/>
<variable value="denominator"/>
</target>
<rule>
<name value="valueD"/>
<source>
<context value="value"/>
</source>
<target>
<context value="denominator"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueInteger value="1"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="participant"/>
<source>
<context value="sub"/>
<element value="participant"/>
<variable value="part"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e1"/>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="participant"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<target>
<context value="participant"/>
<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/Participant/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Participant/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<rule>
<name value="authoredOn"/>
<source>
<context value="part"/>
<element value="time"/>
<variable value="t"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="authoredOn"/>
<variable value="date"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="t"/>
<variable value="date"/>
</dependent>
</rule>
<rule>
<name value="partRole"/>
<source>
<context value="part"/>
<element value="participantRole"/>
<variable value="partRole"/>
</source>
<rule>
<name value="meta"/>
<source>
<context value="partRole"/>
</source>
<target>
<context value="participant"/>
<contextType value="variable"/>
<element value="meta"/>
<variable value="meta"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="partRole"/>
</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="partRole"/>
</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="partRole"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString
value="ClinicalDocument/body/TerapiaFarmacologicaDimissione/participant"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="identifier"/>
<source>
<context value="partRole"/>
<element value="id"/>
<variable value="id"/>
</source>
<target>
<context value="participant"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<rule>
<name value="root1"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="translate"/>
<parameter>
<valueId value="r"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/special-oid2uri"/>
</parameter>
<parameter>
<valueString value="uri"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="aut"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="participant"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid2"/>
<transform value="evaluate"/>
<parameter>
<valueString value="r + '-' + ext"/>
</parameter>
</target>
<target>
<context value="e1"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString
value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="requester"/>
<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/' + %participant.id"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="2.16.840.1.113883.2.9.4.3.2"/>
<source>
<context value="partRole"/>
<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="playent"/>
<source>
<context value="partRole"/>
<element value="playingEntity"/>
<variable value="playent"/>
</source>
<rule>
<name value="name"/>
<source>
<context value="playent"/>
<element value="name"/>
<variable value="vvv"/>
</source>
<target>
<context value="participant"/>
<contextType value="variable"/>
<element value="name"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="ref"/>
<source>
<context value="sub"/>
<element value="reference"/>
<variable value="ref"/>
</source>
<rule>
<name value="external"/>
<source>
<context value="ref"/>
<element value="externalAct"/>
<variable value="external"/>
</source>
<rule>
<name value="id"/>
<source>
<context value="external"/>
<element value="id"/>
<variable value="vvv"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="med"/>
<source>
<context value="sub"/>
<element value="entryRelationship"/>
<variable value="entryRelationship"/>
</source>
<rule>
<name value="sub"/>
<source>
<context value="entryRelationship"/>
<element value="supply"/>
<variable value="sup"/>
</source>
<target>
<context value="medRq"/>
<contextType value="variable"/>
<element value="dispenseRequest"/>
<variable value="dispreq"/>
</target>
<rule>
<name value="quantity"/>
<source>
<context value="sup"/>
</source>
<target>
<context value="dispreq"/>
<contextType value="variable"/>
<element value="quantity"/>
<variable value="quantity"/>
<transform value="create"/>
<parameter>
<valueString value="SimpleQuantity"/>
</parameter>
</target>
<rule>
<name value="quantity"/>
<source>
<context value="sup"/>
<element value="quantity"/>
<variable value="q"/>
</source>
<target>
<context value="quantity"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="q.value"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<documentation
value="Sezione Strutturata------------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
</group>
<group>
<name value="ModalitadiTrasposto"/>
<typeMode value="none"/>
<documentation
value="-----------------------------------------------------------------------------------------------------------------------
______1._____________Sections________________________"/>
<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>
<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>
<rule>
<name value="entry1"/>
<source>
<context value="src"/>
<element value="entry"/>
<variable value="entry1"/>
</source>
<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/Encounter/' + %enc.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="enc"/>
<variable value="bundle"/>
</dependent>
</rule>
</rule>
</rule>
</group>
<group>
<name value="MotivoDellaVisita"/>
<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>
<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="entry"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e2"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/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="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/Observation/' + %observation.id"/>
</parameter>
</target>
<rule>
<name value="observation"/>
<source>
<context value="entry"/>
<element value="observation"/>
<variable value="obs"/>
</source>
<dependent>
<name value="Observation"/>
<variable value="obs"/>
<variable value="patient"/>
<variable value="enc"/>
<variable value="observation"/>
<variable value="bundle"/>
</dependent>
</rule>
</rule>
</group>
<group>
<name value="Triage"/>
<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>
<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="entry"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e2"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/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="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/Observation/' + %observation.id"/>
</parameter>
</target>
<rule>
<name value="observation"/>
<source>
<context value="entry"/>
<element value="observation"/>
<variable value="obs"/>
</source>
<dependent>
<name value="Observation"/>
<variable value="obs"/>
<variable value="patient"/>
<variable value="enc"/>
<variable value="observation"/>
<variable value="bundle"/>
</dependent>
</rule>
</rule>
</group>
<group>
<name value="InquadramentoClinicoIniziale"/>
<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>
<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="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="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</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/Observation/' + %observation.id"/>
</parameter>
</target>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="text"/>
<variable value="fhirText"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="src"/>
<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="statuscode"/>
<source>
<context value="src"/>
<condition value="observation.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="src"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
</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="src"/>
</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/' + %enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="Author"/>
<source>
<context value="src"/>
<element value="author"/>
<variable value="author"/>
</source>
<rule>
<name value="practitioner"/>
<source>
<context value="author"/>
</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="assignedAuthor"/>
<source>
<context value="author"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</source>
<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/InquadramentoClinicoIniziale/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="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="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="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid2"/>
</parameter>
</target>
<target>
<context value="note"/>
<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/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="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>
</rule>
</rule>
<rule>
<name value="time"/>
<source>
<context value="author"/>
<element value="time"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="t"/>
<variable value="value"/>
</dependent>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="component"/>
<source>
<context value="src"/>
<element value="component"/>
<variable value="component"/>
</source>
<rule>
<name value="Sottosection"/>
<source>
<context value="component"/>
<element value="section"/>
<variable value="sottosection"/>
</source>
<rule>
<name value="Sectionfhir"/>
<source>
<context value="sottosection"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="section"/>
</target>
<rule>
<name value="code"/>
<source>
<context value="sottosection"/>
<element value="code"/>
<variable value="vvv"/>
<condition value="(code = '11329-0')"/>
</source>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<documentation
value="1. Anamnesi Narrativa-------------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
<rule>
<name value="11329-0"/>
<source>
<context value="sottosection"/>
<element value="code"/>
<variable value="code1"/>
<condition value="(code = '11329-0')"/>
</source>
<rule>
<name value="where"/>
<source>
<context value="src"/>
<condition value="sottosection.entry.exists().not()"/>
</source>
<rule>
<name value="title"/>
<source>
<context value="sottosection"/>
<element value="title"/>
<variable value="t"/>
</source>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="title"/>
<transform value="evaluate"/>
<parameter>
<valueString value="t.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="cdaText"/>
<source>
<context value="sottosection"/>
<element value="text"/>
<variable value="cdaText"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid8"/>
<transform value="uuid"/>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid8"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="section"/>
<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/Observation/' + %observation.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</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="cdaText"/>
</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/' + %enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="sottosection"/>
<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="statuscode"/>
<source>
<context value="src"/>
<condition value="observation.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="src"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
<rule>
<name value="author"/>
<source>
<context value="sottosection"/>
<element value="author"/>
<variable value="authors"/>
</source>
<rule>
<name value="timeAuthor"/>
<source>
<context value="authors"/>
<element value="time"/>
<variable value="time"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="time"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="assighedAuthor"/>
<source>
<context value="authors"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</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="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<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/EsameObiettivo/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="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="autore"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid9"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid9"/>
</parameter>
</target>
<target>
<context value="note"/>
<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/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="assignedPerson"/>
<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>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="subsection1"/>
<source>
<context value="sottosection"/>
<element value="entry"/>
<variable value="entry1"/>
</source>
<rule>
<name value="entryobservation1"/>
<source>
<context value="entry1"/>
<element value="observation"/>
<variable value="obs"/>
</source>
<rule>
<name value="89261-2"/>
<source>
<context value="obs"/>
<element value="code"/>
<condition value="(code = '75326-9')"/>
</source>
<rule>
<name value="condition"/>
<source>
<context value="obs"/>
</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="condition"/>
<transform value="create"/>
<parameter>
<valueString value="Condition"/>
</parameter>
</target>
<target>
<context value="condition"/>
<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/Condition/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Condition"/>
</parameter>
</target>
<target>
<context value="section"/>
<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/Condition/' + %condition.id"/>
</parameter>
</target>
<rule>
<name value="code"/>
<source>
<context value="obs"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="category"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="obs"/>
</source>
<target>
<context value="condition"/>
<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="condition"/>
<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="status"/>
<source>
<context value="obs"/>
<element value="statusCode"/>
<variable value="status"/>
<condition value="(code = 'completed')"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="verificationStatus"/>
<variable value="status2"/>
</target>
<rule>
<name value="st3"/>
<source>
<context value="status"/>
</source>
<target>
<context value="status2"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="status3"/>
</target>
<rule>
<name value="finald"/>
<source>
<context value="status"/>
</source>
<target>
<context value="status3"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="confirmed"/>
</parameter>
</target>
</rule>
<rule>
<name value="system"/>
<source>
<context value="status"/>
</source>
<target>
<context value="status3"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="cdaText1"/>
<source>
<context value="sottosection"/>
<element value="text"/>
<variable value="cdaText1"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText1"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
<rule>
<name value="author"/>
<source>
<context value="sottosection"/>
<element value="author"/>
<variable value="authors"/>
</source>
<rule>
<name value="timeAuthor"/>
<source>
<context value="authors"/>
<element value="time"/>
<variable value="time"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="time"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="assighedAuthor"/>
<source>
<context value="authors"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</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="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<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/Anamnesi/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="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid5"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid5"/>
</parameter>
</target>
<target>
<context value="note"/>
<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/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="assignedPerson"/>
<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>
</rule>
</rule>
<documentation value="blocco Narrativo"/>
</rule>
<rule>
<name value="effectivetime1"/>
<source>
<context value="obs"/>
<element value="effectiveTime"/>
<variable value="effective1"/>
</source>
<rule>
<name value="ef"/>
<source>
<context value="effective1"/>
<condition
value="effective1.low.exists() or effective1.high.exists()"/>
</source>
<rule>
<name value="onsetperiod"/>
<source>
<context value="effective1"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="onset"/>
<variable value="periodonset"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<dependent>
<name value="IVLTSPeriod"/>
<variable value="effective1"/>
<variable value="periodonset"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="onsetDateTime"/>
<source>
<context value="obs"/>
<element value="effectiveTime"/>
<variable value="effectiveTime"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="onset"/>
<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="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="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="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="Value"/>
<source>
<context value="obs"/>
<type value="CD"/>
<element value="value"/>
<variable value="val"/>
</source>
<rule>
<name value="Ce"/>
<source>
<context value="val"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="ce"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="originalText"/>
<source>
<context value="val"/>
<element value="originalText"/>
<variable value="vvv"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="text"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="coding"/>
<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>
</rule>
</rule>
<rule>
<name value="EntryRelationship1"/>
<source>
<context value="obs"/>
<element value="entryRelationship"/>
<variable value="entriRel"/>
</source>
<rule>
<name value="evidence"/>
<source>
<context value="entriRel"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="evidence"/>
<variable value="evidence"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<rule>
<name value="Observation2"/>
<source>
<context value="entriRel"/>
<element value="observation"/>
<variable value="observation2"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="observation2"/>
<element value="code"/>
<variable value="code"/>
</source>
<rule>
<name value="whereDecorsoClinico"/>
<source>
<context value="code"/>
<element value="code"/>
<condition value="(code.code = '89261-2')"/>
</source>
<rule>
<name value="obser"/>
<source>
<context value="obs"/>
</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="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<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/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid1"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="ref"/>
<source>
<context value="entriRel"/>
</source>
<target>
<context value="evidence"/>
<contextType value="variable"/>
<element value="detail"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Observation/' + %observation.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="observation2"/>
<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="statuscode"/>
<source>
<context value="observation2"/>
<condition
value="observation.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="observation2"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="Annontation"/>
<source>
<context value="observation2"/>
<element value="text"/>
<variable value="text"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
<transform value="create"/>
<parameter>
<valueString value="Annotation"/>
</parameter>
</target>
<rule>
<name value="val"/>
<source>
<context value="text"/>
<element value="reference"/>
<variable value="ref"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="ref.value"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="obs"/>
</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="obs"/>
</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/' + %enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="statusCode"/>
<source>
<context value="observation2"/>
<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="observation2"/>
<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="observation2"/>
<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="observation2"/>
<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="value"/>
<source>
<context value="observation2"/>
<type value="INT"/>
<element value="value"/>
<variable value="int"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="int.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="boolean"/>
<source>
<context value="observation2"/>
<type value="BL"/>
<element value="value"/>
<variable value="boolean"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="boolean.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="value"/>
<source>
<context value="observation2"/>
<type value="ST"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="create"/>
<parameter>
<valueString value="string"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="evaluate"/>
<parameter>
<valueString value="value.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="value2"/>
<source>
<context value="observation2"/>
<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="observation2"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="effectiveTime"/>
<source>
<context value="observation2"/>
<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="valueQuantity"/>
<source>
<context value="observation2"/>
<type value="PQ"/>
<element value="value"/>
<variable value="val"/>
</source>
<rule>
<name value="quantity"/>
<source>
<context value="val"/>
</source>
<target>
<context value="observation"/>
<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="observation2"/>
<type value="CE"/>
<element value="value"/>
<variable value="val"/>
</source>
<rule>
<name value="Ce"/>
<source>
<context value="val"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="value"/>
<variable value="ce"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="originalText"/>
<source>
<context value="val"/>
<element value="originalText"/>
<variable value="vvv"/>
</source>
<target>
<context value="ce"/>
<contextType value="variable"/>
<element value="text"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="coding"/>
<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>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="entryrelationshipstatus"/>
<source>
<context value="obs"/>
<element value="entryRelationship"/>
<variable value="entriRel"/>
</source>
<rule>
<name value="observationstatus"/>
<source>
<context value="entriRel"/>
<element value="observation"/>
<variable value="observation2"/>
</source>
<rule>
<name value="codestatus"/>
<source>
<context value="observation2"/>
<element value="code"/>
<variable value="code"/>
</source>
<rule>
<name value="whereDecorsoClinico"/>
<source>
<context value="code"/>
<element value="code"/>
<condition value="(code.code = '33999-4')"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="observation2"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="clinicalStatus"/>
<variable value="status"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="textstat"/>
<source>
<context value="observation2"/>
<element value="text"/>
<variable value="text"/>
</source>
<rule>
<name value="statref"/>
<source>
<context value="text"/>
<element value="reference"/>
<variable value="refstat"/>
</source>
<target>
<context value="status"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="refstat.value"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="coding"/>
<source>
<context value="observation2"/>
</source>
<target>
<context value="status"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<rule>
<name value="value1"/>
<source>
<context value="observation2"/>
<element value="value"/>
<variable value="value"/>
</source>
<rule>
<name value="active"/>
<source>
<context value="value"/>
<element value="code"/>
<condition
value="(value.code = 'LA16666-2')"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="active"/>
</parameter>
</target>
</rule>
<rule>
<name value="inactive"/>
<source>
<context value="value"/>
<element value="code"/>
<condition
value="(value.code = 'LA18632-2')"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="inactive"/>
</parameter>
</target>
</rule>
<rule>
<name value="system"/>
<source>
<context value="value"/>
<element value="codeSystem"/>
<variable value="system"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
</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>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="observation1"/>
<source>
<context value="entry1"/>
<element value="organizer"/>
<variable value="organizer"/>
</source>
<rule>
<name value="10157-6"/>
<source>
<context value="organizer"/>
<element value="code"/>
<condition value="(code = '10157-6')"/>
</source>
<rule>
<name value="organizer"/>
<source>
<context value="organizer"/>
</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="FamilyMemberHistory"/>
<transform value="create"/>
<parameter>
<valueString value="FamilyMemberHistory"/>
</parameter>
</target>
<target>
<context value="FamilyMemberHistory"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid5"/>
<transform value="uuid"/>
</target>
<target>
<context value="e4"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString
value="https://example/FamilyMemberHistory/"/>
</parameter>
<parameter>
<valueId value="uuid5"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="FamilyMemberHistory"/>
</parameter>
</target>
<target>
<context value="section"/>
<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/FamilyMemberHistory/' + %FamilyMemberHistory.id"/>
</parameter>
</target>
<rule>
<name value="effective"/>
<source>
<context value="organizer"/>
<element value="effectiveTime"/>
<variable value="effective"/>
</source>
<rule>
<name value="date"/>
<source>
<context value="effective"/>
<element value="value"/>
<variable value="eff"/>
</source>
<target>
<context value="FamilyMemberHistory"/>
<contextType value="variable"/>
<element value="date"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="eff"/>
<variable value="value"/>
</dependent>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="organizer"/>
</source>
<target>
<context value="FamilyMemberHistory"/>
<contextType value="variable"/>
<element value="patient"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Patient/' + %patient.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="subject"/>
<source>
<context value="organizer"/>
<element value="subject"/>
<variable value="subject"/>
</source>
<rule>
<name value="relatedSubject"/>
<source>
<context value="subject"/>
<element value="relatedSubject"/>
<variable value="relatedSubject"/>
</source>
<rule>
<name value="relationship"/>
<source>
<context value="relatedSubject"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="FamilyMemberHistory"/>
<contextType value="variable"/>
<element value="relationship"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="subject1"/>
<source>
<context value="relatedSubject"/>
<element value="subject"/>
<variable value="subject"/>
</source>
<target>
<context value="FamilyMemberHistory"/>
<contextType value="variable"/>
<element value="sex"/>
<variable value="sex"/>
</target>
<rule>
<name value="coding"/>
<source>
<context value="subject"/>
<element value="administrativeGenderCode"/>
<variable value="administrativeGenderCode"/>
</source>
<target>
<context value="sex"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
</target>
<rule>
<name value="gender"/>
<source>
<context value="administrativeGenderCode"/>
<element value="code"/>
<variable value="code"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="translate"/>
<parameter>
<valueId value="code"/>
</parameter>
<parameter>
<valueString value="#AdministrativeGender"/>
</parameter>
<parameter>
<valueString value="code"/>
</parameter>
</target>
</rule>
<rule>
<name value="system"/>
<source>
<context value="administrativeGenderCode"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://hl7.org/fhir/administrative-gender"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="cdaText1"/>
<source>
<context value="sottosection"/>
<element value="text"/>
<variable value="cdaText1"/>
</source>
<target>
<context value="FamilyMemberHistory"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText1"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
<rule>
<name value="author"/>
<source>
<context value="sottosection"/>
<element value="author"/>
<variable value="authors"/>
</source>
<rule>
<name value="timeAuthor"/>
<source>
<context value="authors"/>
<element value="time"/>
<variable value="time"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="time"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="assighedAuthor"/>
<source>
<context value="authors"/>
<element value="assignedAuthor"/>
<variable 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="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/Anamnesi/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="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="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="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid7"/>
</parameter>
</target>
<target>
<context value="note"/>
<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/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="assignedPerson"/>
<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>
</rule>
</rule>
<documentation value="blocco Narrativo"/>
</rule>
<rule>
<name value="component"/>
<source>
<context value="organizer"/>
<element value="component"/>
<variable value="component"/>
</source>
<target>
<context value="FamilyMemberHistory"/>
<contextType value="variable"/>
<element value="condition"/>
<variable value="condition"/>
</target>
<rule>
<name value="observationCondition"/>
<source>
<context value="component"/>
<element value="observation"/>
<variable value="observation"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="observation"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="observation"/>
<element value="text"/>
<variable value="text"/>
</source>
<target>
<context value="FamilyMemberHistory"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="value"/>
<source>
<context value="text"/>
<element value="reference"/>
<variable 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>
<name value="statusCode"/>
<source>
<context value="observation"/>
<element value="statusCode"/>
<variable value="vvv"/>
</source>
<target>
<context value="FamilyMemberHistory"/>
<contextType value="variable"/>
<element value="status"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="codeable"/>
<source>
<context value="observation"/>
<element value="value"/>
<variable value="vvv"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="outcome"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="EntryRel"/>
<source>
<context value="observation"/>
<element value="entryRelationship"/>
<variable value="entryRelationship"/>
</source>
<rule>
<name value="obser"/>
<source>
<context value="entryRelationship"/>
<element value="observation"/>
<variable value="obsservation1"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="obsservation1"/>
<element value="code"/>
<variable value="code"/>
</source>
<rule>
<name value="insorgenza"/>
<source>
<context value="code"/>
<element value="code"/>
<condition value="(code.code = '35267-4')"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="obsservation1"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="onset"/>
<variable value="Age"/>
<transform value="create"/>
<parameter>
<valueString value="Age"/>
</parameter>
</target>
<rule>
<name value="age"/>
<source>
<context value="value"/>
<element value="value"/>
<variable value="valueAge"/>
</source>
<target>
<context value="Age"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="valueAge"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="value"/>
<element value="unit"/>
<variable value="unit"/>
</source>
<target>
<context value="Age"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueId value="unit"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="value"/>
<element value="unit"/>
<variable value="unit"/>
</source>
<target>
<context value="Age"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="unit"/>
</parameter>
</target>
</rule>
<rule>
<name value="system"/>
<source>
<context value="value"/>
</source>
<target>
<context value="Age"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://unitsofmeasure.org"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="obsservation1"/>
<element value="code"/>
<variable value="code"/>
</source>
<rule>
<name value="deceased"/>
<source>
<context value="code"/>
<element value="code"/>
<condition value="(code.code = '39016-1')"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="obsservation1"/>
<element value="value"/>
<variable value="value"/>
</source>
<target>
<context value="FamilyMemberHistory"/>
<contextType value="variable"/>
<element value="deceased"/>
<variable value="Age"/>
<transform value="create"/>
<parameter>
<valueString value="Age"/>
</parameter>
</target>
<rule>
<name value="age"/>
<source>
<context value="value"/>
<element value="value"/>
<variable value="valueAge"/>
</source>
<target>
<context value="Age"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="valueAge"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="value"/>
<element value="unit"/>
<variable value="unit"/>
</source>
<target>
<context value="Age"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueId value="unit"/>
</parameter>
</target>
</rule>
<rule>
<name value="unit"/>
<source>
<context value="value"/>
<element value="unit"/>
<variable value="unit"/>
</source>
<target>
<context value="Age"/>
<contextType value="variable"/>
<element value="unit"/>
<transform value="copy"/>
<parameter>
<valueId value="unit"/>
</parameter>
</target>
</rule>
<rule>
<name value="system"/>
<source>
<context value="value"/>
</source>
<target>
<context value="Age"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://unitsofmeasure.org"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="cont"/>
<source>
<context value="observation"/>
<condition
value="observation.effectiveTime.exists()"/>
</source>
<rule>
<name value="effttemp"/>
<source>
<context value="observation"/>
<element value="effectiveTime"/>
<variable value="effectiveTime"/>
</source>
<target>
<context value="FamilyMemberHistory"/>
<contextType value="variable"/>
<element value="condition"/>
<variable value="condition"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<rule>
<name value="efft"/>
<source>
<context value="effectiveTime"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="onset"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<rule>
<name value="val"/>
<source>
<context value="effectiveTime"/>
</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="effectiveTime"/>
<variable value="start"/>
</dependent>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="observation"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="codeable"/>
<source>
<context value="observation"/>
<element value="value"/>
<variable value="vvv"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="outcome"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<documentation
value="Anamnesi Familiare---------------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
<documentation
value="Anamnesi Strutturata-----------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="sottosection"/>
<element value="code"/>
<variable value="vvv"/>
<condition value="(code = '29545-1')"/>
</source>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<documentation
value="2. Esame Obiettivo Narrativa-----------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
<rule>
<name value="condizioneesameObiettivo"/>
<source>
<context value="sottosection"/>
<element value="code"/>
<variable value="code1"/>
<condition value="(code = '29545-1')"/>
</source>
<rule>
<name value="title"/>
<source>
<context value="sottosection"/>
<element value="title"/>
<variable value="t"/>
</source>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="title"/>
<transform value="evaluate"/>
<parameter>
<valueString value="t.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="cdaText"/>
<source>
<context value="sottosection"/>
<element value="text"/>
<variable value="cdaText"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid8"/>
<transform value="uuid"/>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/Observation/"/>
</parameter>
<parameter>
<valueId value="uuid8"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<target>
<context value="section"/>
<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/Observation/' + %observation.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</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="cdaText"/>
</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/' + %enc.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="code"/>
<source>
<context value="sottosection"/>
<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="statuscode"/>
<source>
<context value="sottosection"/>
<condition value="observation.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="sottosection"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
<rule>
<name value="author"/>
<source>
<context value="sottosection"/>
<element value="author"/>
<variable value="authors"/>
</source>
<rule>
<name value="timeAuthor"/>
<source>
<context value="authors"/>
<element value="time"/>
<variable value="time"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="time"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="assighedAuthor"/>
<source>
<context value="authors"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</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="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<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/EsameObiettivo/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="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="autore"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid9"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid9"/>
</parameter>
</target>
<target>
<context value="note"/>
<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/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="assignedPerson"/>
<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>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="sottosection"/>
<element value="code"/>
<variable value="vvv"/>
<condition value="(code = '42346-7')"/>
</source>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<documentation
value="3. Terapia Farmacologica all'ingresso Narrativa --------------------------------------------------------------------------------------------------------------"/>
</rule>
<rule>
<name value="condizioneterapiaingresso"/>
<source>
<context value="sottosection"/>
<element value="code"/>
<variable value="code1"/>
<condition value="(code = '42346-7')"/>
</source>
<rule>
<name value="title"/>
<source>
<context value="sottosection"/>
<element value="title"/>
<variable value="t"/>
</source>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="title"/>
<transform value="evaluate"/>
<parameter>
<valueString value="t.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="cdaText"/>
<source>
<context value="sottosection"/>
<element value="text"/>
<variable value="cdaText"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e10"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="medicStatement"/>
<transform value="create"/>
<parameter>
<valueString value="MedicationStatement"/>
</parameter>
</target>
<target>
<context value="medicStatement"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid10"/>
<transform value="uuid"/>
</target>
<target>
<context value="e10"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/MedicationStatement/"/>
</parameter>
<parameter>
<valueId value="uuid10"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="MedicationStatement"/>
</parameter>
</target>
<target>
<context value="section"/>
<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/MedicationStatement/' + %medicStatement.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="medicStatement"/>
<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="statuscode"/>
<source>
<context value="sottosection"/>
<condition
value="medicStatement.statusCode.exists().not()"/>
</source>
<rule>
<name value="status"/>
<source>
<context value="sottosection"/>
</source>
<target>
<context value="medicStatement"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="completed"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="medication"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="medicStatement"/>
<contextType value="variable"/>
<element value="medication"/>
<variable value="medication"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="text"/>
<source>
<context value="cdaText"/>
<variable value="txt"/>
</source>
<target>
<context value="medication"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="txt"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="medicStatement"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
<rule>
<name value="author"/>
<source>
<context value="sottosection"/>
<element value="author"/>
<variable value="authors"/>
</source>
<rule>
<name value="timeAuthor"/>
<source>
<context value="authors"/>
<element value="time"/>
<variable value="time"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="time"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="assighedAuthor"/>
<source>
<context value="authors"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</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="PUT"/>
</parameter>
</target>
<target>
<context value="e11"/>
<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="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/TerapiaFarmacologicaIngresso/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="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid11"/>
<transform value="evaluate"/>
<parameter>
<valueString value="r + '-' + ext"/>
</parameter>
</target>
<target>
<context value="e11"/>
<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="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid11"/>
</parameter>
</target>
<target>
<context value="note"/>
<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/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="assignedPerson"/>
<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>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="sottosection"/>
<element value="code"/>
<variable value="vvv"/>
<condition value="(code = '48765-2')"/>
</source>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<documentation value="4. Allergie"/>
</rule>
<rule>
<name value="condizioneallergie"/>
<source>
<context value="sottosection"/>
<element value="code"/>
<variable value="code1"/>
<condition value="(code = '48765-2')"/>
</source>
<rule>
<name value="title"/>
<source>
<context value="sottosection"/>
<element value="title"/>
<variable value="t"/>
</source>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="title"/>
<transform value="evaluate"/>
<parameter>
<valueString value="t.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="where"/>
<source>
<context value="src"/>
<condition value="sottosection.entry.exists().not()"/>
</source>
<rule>
<name value="title"/>
<source>
<context value="sottosection"/>
<element value="title"/>
<variable value="t"/>
</source>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="title"/>
<transform value="evaluate"/>
<parameter>
<valueString value="t.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="cdaText"/>
<source>
<context value="sottosection"/>
<element value="text"/>
<variable value="cdaText"/>
</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="POST"/>
</parameter>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="AllergyIntolerance"/>
<transform value="create"/>
<parameter>
<valueString value="AllergyIntolerance"/>
</parameter>
</target>
<target>
<context value="AllergyIntolerance"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid8"/>
<transform value="uuid"/>
</target>
<target>
<context value="e8"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="https://example/AllergyIntolerance/"/>
</parameter>
<parameter>
<valueId value="uuid8"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="AllergyIntolerance"/>
</parameter>
</target>
<target>
<context value="section"/>
<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/AllergyIntolerance/' + %AllergyIntolerance.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="AllergyIntolerance"/>
<contextType value="variable"/>
<element value="patient"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Patient/' + %patient.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="AllergyIntolerance"/>
<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="clinicalStatus"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="AllergyIntolerance"/>
<contextType value="variable"/>
<element value="clinicalStatus"/>
<variable value="status"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="coding"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="status"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<rule>
<name value="active"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="active"/>
</parameter>
</target>
</rule>
<rule>
<name value="system"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"/>
</parameter>
</target>
</rule>
<rule>
<name value="active"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="active"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="AllergyIntolerance"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
<rule>
<name value="author"/>
<source>
<context value="sottosection"/>
<element value="author"/>
<variable value="authors"/>
</source>
<rule>
<name value="timeAuthor"/>
<source>
<context value="authors"/>
<element value="time"/>
<variable value="time"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="time"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="assighedAuthor"/>
<source>
<context value="authors"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</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="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<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/EsameObiettivo/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="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="autore"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<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/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid9"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid9"/>
</parameter>
</target>
<target>
<context value="note"/>
<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/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="assignedPerson"/>
<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>
</rule>
</rule>
</rule>
</rule>
<documentation
value="Allergia Narrativa-------------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
<rule>
<name value="allergy"/>
<source>
<context value="sottosection"/>
<element value="entry"/>
<variable value="entry1"/>
</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="allergy"/>
<transform value="create"/>
<parameter>
<valueString value="AllergyIntolerance"/>
</parameter>
</target>
<target>
<context value="allergy"/>
<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/AllergyIntolerance/"/>
</parameter>
<parameter>
<valueId value="uuid12"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="AllergyIntolerance"/>
</parameter>
</target>
<target>
<context value="section"/>
<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/AllergyIntolerance/' + %allergy.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
</source>
<target>
<context value="allergy"/>
<contextType value="variable"/>
<element value="patient"/>
<variable value="reference"/>
<transform value="create"/>
<parameter>
<valueString value="Reference"/>
</parameter>
</target>
<target>
<context value="reference"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="evaluate"/>
<parameter>
<valueString
value="'https://example/Patient/' + %patient.id"/>
</parameter>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="src"/>
</source>
<target>
<context value="allergy"/>
<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="entryact2"/>
<source>
<context value="entry1"/>
<element value="act"/>
<variable value="actallint"/>
</source>
<rule>
<name value="onsetDateTime"/>
<source>
<context value="actallint"/>
<element value="effectiveTime"/>
<variable value="effectiveTime"/>
</source>
<target>
<context value="allergy"/>
<contextType value="variable"/>
<element value="onset"/>
<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="actallint"/>
<condition
value="effectiveTime.low.exists() or effectiveTime.high.exists()"/>
</source>
<rule>
<name value="onsetPeriod"/>
<source>
<context value="actallint"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<target>
<context value="allergy"/>
<contextType value="variable"/>
<element value="onset"/>
<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="cdaText1"/>
<source>
<context value="sottosection"/>
<element value="text"/>
<variable value="cdaText1"/>
</source>
<target>
<context value="allergy"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText1"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
<rule>
<name value="author"/>
<source>
<context value="sottosection"/>
<element value="author"/>
<variable value="authors"/>
</source>
<rule>
<name value="timeAuthor"/>
<source>
<context value="authors"/>
<element value="time"/>
<variable value="time"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="time"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="assighedAuthor"/>
<source>
<context value="authors"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</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="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/Allergie/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="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid13"/>
<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="uuid13"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid13"/>
</parameter>
</target>
<target>
<context value="note"/>
<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/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="assignedPerson"/>
<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>
</rule>
</rule>
<documentation value="mapping note"/>
</rule>
<rule>
<name value="entryrelationshipact"/>
<source>
<context value="actallint"/>
<element value="entryRelationship"/>
<variable value="entryact"/>
</source>
<rule>
<name value="entryobservation"/>
<source>
<context value="entryact"/>
<element value="observation"/>
<variable value="entryobs"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="entryobs"/>
<element value="value"/>
<variable value="code"/>
</source>
<rule>
<name value="type"/>
<source>
<context value="code"/>
<element value="code"/>
<variable value="code1"/>
</source>
<target>
<context value="allergy"/>
<contextType value="variable"/>
<element value="type"/>
<transform value="translate"/>
<parameter>
<valueId value="code1"/>
</parameter>
<parameter>
<valueString value="#AllergyTypeMap"/>
</parameter>
<parameter>
<valueString value="code"/>
</parameter>
</target>
</rule>
<rule>
<name value="category"/>
<source>
<context value="code"/>
<element value="code"/>
<variable value="code2"/>
</source>
<target>
<context value="allergy"/>
<contextType value="variable"/>
<element value="category"/>
<transform value="translate"/>
<parameter>
<valueId value="code2"/>
</parameter>
<parameter>
<valueString value="#AllergyCategoryMap"/>
</parameter>
<parameter>
<valueString value="code"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="participant"/>
<source>
<context value="entryobs"/>
<element value="participant"/>
<variable value="partic"/>
</source>
<rule>
<name value="participantRole"/>
<source>
<context value="partic"/>
<element value="participantRole"/>
<variable value="pratRole"/>
</source>
<rule>
<name value="playingEntity"/>
<source>
<context value="pratRole"/>
<element value="playingEntity"/>
<variable value="pratent"/>
</source>
<rule>
<name value="reaction"/>
<source>
<context value="pratent"/>
</source>
<target>
<context value="allergy"/>
<contextType value="variable"/>
<element value="reaction"/>
<variable value="reaction"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<rule>
<name value="subs"/>
<source>
<context value="pratent"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="reaction"/>
<contextType value="variable"/>
<element value="substance"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="entryRelationship"/>
<source>
<context value="entryobs"/>
<element value="entryRelationship"/>
<variable value="entryobs1"/>
<condition value="(typeCode = 'MFST')"/>
</source>
<rule>
<name value="entryobservation"/>
<source>
<context value="entryobs1"/>
<element value="observation"/>
<variable value="entobs"/>
</source>
<rule>
<name value="eff"/>
<source>
<context value="entobs"/>
<element value="effectiveTime"/>
<variable value="eff"/>
</source>
<rule>
<name value="low"/>
<source>
<context value="eff"/>
<element value="low"/>
<variable value="l"/>
</source>
<target>
<context value="reaction"/>
<contextType value="variable"/>
<element value="onset"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="l"/>
<variable value="value"/>
</dependent>
</rule>
</rule>
<rule>
<name value="manifest"/>
<source>
<context value="entobs"/>
<element value="value"/>
<variable value="vvv"/>
</source>
<target>
<context value="reaction"/>
<contextType value="variable"/>
<element value="manifestation"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="entryrelationship2"/>
<source>
<context value="entryobs"/>
<element value="entryRelationship"/>
<variable value="entryobs2"/>
</source>
<rule>
<name value="entryobservation2"/>
<source>
<context value="entryobs2"/>
<element value="observation"/>
<variable value="entobs"/>
</source>
<rule>
<name value="severity"/>
<source>
<context value="entobs"/>
<element value="code"/>
<variable value="code"/>
<condition value="(code = 'SEV')"/>
</source>
<rule>
<name value="value"/>
<source>
<context value="entobs"/>
<element value="value"/>
<variable value="value"/>
</source>
<rule>
<name value="active"/>
<source>
<context value="value"/>
<element value="code"/>
<condition value="(value.code = 'M')"/>
</source>
<target>
<context value="allergy"/>
<contextType value="variable"/>
<element value="criticality"/>
<transform value="copy"/>
<parameter>
<valueString value="unable-to-assess"/>
</parameter>
</target>
</rule>
<rule>
<name value="active"/>
<source>
<context value="value"/>
<element value="code"/>
<condition value="(value.code = 'L')"/>
</source>
<target>
<context value="allergy"/>
<contextType value="variable"/>
<element value="criticality"/>
<transform value="copy"/>
<parameter>
<valueString value="low"/>
</parameter>
</target>
</rule>
<rule>
<name value="active"/>
<source>
<context value="value"/>
<element value="code"/>
<condition value="(value.code = 'H')"/>
</source>
<target>
<context value="allergy"/>
<contextType value="variable"/>
<element value="criticality"/>
<transform value="copy"/>
<parameter>
<valueString value="high"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="entryrelationship3"/>
<source>
<context value="entryobs"/>
<element value="entryRelationship"/>
<variable value="entryobs3"/>
</source>
<rule>
<name value="entryobservation3"/>
<source>
<context value="entryobs3"/>
<element value="observation"/>
<variable value="entobs"/>
</source>
<rule>
<name value="33999-4"/>
<source>
<context value="entobs"/>
<element value="code"/>
<variable value="code"/>
<condition value="(code = '33999-4')"/>
</source>
<rule>
<name value="clinicalStatus"/>
<source>
<context value="entobs"/>
</source>
<target>
<context value="allergy"/>
<contextType value="variable"/>
<element value="clinicalStatus"/>
<variable value="status"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<rule>
<name value="coding"/>
<source>
<context value="entobs"/>
</source>
<target>
<context value="status"/>
<contextType value="variable"/>
<element value="coding"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<rule>
<name value="value1"/>
<source>
<context value="entobs"/>
<element value="value"/>
<variable value="value"/>
</source>
<rule>
<name value="active"/>
<source>
<context value="value"/>
<element value="code"/>
<condition
value="(value.code = 'LA16666-2')"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="active"/>
</parameter>
</target>
</rule>
<rule>
<name value="active"/>
<source>
<context value="value"/>
<element value="code"/>
<condition
value="(value.code = 'LA18632-2')"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="inactive"/>
</parameter>
</target>
</rule>
<rule>
<name value="system"/>
<source>
<context value="value"/>
<element value="codeSystem"/>
<variable value="system"/>
</source>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"/>
</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>
<documentation
value="value->coding.version='ConditionClinicalStatusCodes 4.0.1'"version";"/>
</rule>
</rule>
</rule>
<documentation
value="entobs.value->allergy.clinicalStatus "cstatus";"/>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="entryrelationshi4"/>
<source>
<context value="entryobs"/>
<element value="entryRelationship"/>
<variable value="entryobs4"/>
</source>
<rule>
<name value="entryact1"/>
<source>
<context value="entryobs4"/>
<element value="act"/>
<variable value="entact"/>
</source>
<rule>
<name value="txtact"/>
<source>
<context value="entact"/>
<element value="text"/>
<variable value="actext"/>
</source>
<rule>
<name value="notetxt"/>
<source>
<context value="actext"/>
<element value="reference"/>
<variable value="reftxt"/>
</source>
<target>
<context value="allergy"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<rule>
<name value="notxt"/>
<source>
<context value="reftxt"/>
<variable value="ref"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="evaluate"/>
<parameter>
<valueString value="ref.value"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<documentation
value="Allergia Strutturata----------------------------------------------------------------------------------------------------------------------------------------"/>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="sottosection"/>
<element value="code"/>
<variable value="vvv"/>
<condition value="(code = '11450-4')"/>
</source>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<documentation value="5. Problemi aperti"/>
</rule>
<rule>
<name value="condizioneproblemiaperti"/>
<source>
<context value="sottosection"/>
<element value="code"/>
<variable value="code1"/>
<condition value="(code = '11450-4')"/>
</source>
<rule>
<name value="title"/>
<source>
<context value="sottosection"/>
<element value="title"/>
<variable value="t"/>
</source>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="title"/>
<transform value="evaluate"/>
<parameter>
<valueString value="t.dataString"/>
</parameter>
</target>
</rule>
<rule>
<name value="cdaText"/>
<source>
<context value="sottosection"/>
<element value="text"/>
<variable value="cdaText"/>
</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="condition"/>
<transform value="create"/>
<parameter>
<valueString value="Condition"/>
</parameter>
</target>
<target>
<context value="condition"/>
<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/Condition/"/>
</parameter>
<parameter>
<valueId value="uuid14"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString value="Condition"/>
</parameter>
</target>
<target>
<context value="section"/>
<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/Condition/' + %condition.id"/>
</parameter>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="condition"/>
<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="cdaText"/>
</source>
<target>
<context value="condition"/>
<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="code"/>
<source>
<context value="sottosection"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
</rule>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<rule>
<name value="reference"/>
<source>
<context value="cdaText"/>
<variable value="t"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="t"/>
</parameter>
</target>
</rule>
<rule>
<name value="author"/>
<source>
<context value="sottosection"/>
<element value="author"/>
<variable value="authors"/>
</source>
<rule>
<name value="timeAuthor"/>
<source>
<context value="authors"/>
<element value="time"/>
<variable value="time"/>
</source>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="dateTime"/>
</parameter>
</target>
<dependent>
<name value="TSDateTime"/>
<variable value="time"/>
<variable value="value"/>
</dependent>
</rule>
<rule>
<name value="assighedAuthor"/>
<source>
<context value="authors"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="e15"/>
</target>
<target>
<context value="e15"/>
<contextType value="variable"/>
<element value="request"/>
<variable value="request"/>
<transform value="create"/>
<parameter>
<valueString value="BackboneElement"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="method"/>
<transform value="copy"/>
<parameter>
<valueString value="PUT"/>
</parameter>
</target>
<target>
<context value="e15"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<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/ProblemiAperti/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="extension"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="ext"/>
</parameter>
</target>
</rule>
<rule>
<name value="assigningAuthorityName"/>
<source>
<context value="id"/>
<element value="assigningAuthorityName"/>
<variable value="s"/>
</source>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="assigner"/>
<variable value="a"/>
</target>
<target>
<context value="a"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="r"/>
<source>
<context value="id"/>
<element value="root"/>
<variable value="r"/>
</source>
<rule>
<name value="aut"/>
<source>
<context value="id"/>
<element value="extension"/>
<variable value="ext"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="uuid15"/>
<transform value="evaluate"/>
<parameter>
<valueString value="r + '-' + ext"/>
</parameter>
</target>
<target>
<context value="e15"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString
value="https://example/Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid15"/>
</parameter>
</target>
<target>
<context value="request"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="uuid15"/>
</parameter>
</target>
<target>
<context value="note"/>
<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/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="assignedPerson"/>
<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>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
</rule>
<documentation value="START sottosections"/>
</rule>
</group>
<group>
<name value="Act"/>
<typeMode value="none"/>
<documentation
value="______2._____________ClinicalStatements________________________"/>
<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="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="code"/>
</source>
<target>
<context value="enc"/>
<contextType value="variable"/>
<element value="extension"/>
<variable value="extension2"/>
</target>
<dependent>
<name value="modeOfArrival"/>
<variable value="code"/>
<variable value="extension2"/>
</dependent>
</rule>
<rule>
<name value="participant"/>
<source>
<context value="cda"/>
<element value="participant"/>
<variable value="participant"/>
</source>
<rule>
<name value="fhirParticipant"/>
<source>
<context value="participant"/>
</source>
<target>
<context value="enc"/>
<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="participantrole"/>
<source>
<context value="participant"/>
<element value="participantRole"/>
<variable value="participantRole"/>
</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="enc"/>
<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/PractitionerRole/' + %practitionerRole.id"/>
</parameter>
</target>
<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>
</rule>
</group>
<group>
<name value="modeOfArrival"/>
<typeMode value="none"/>
<documentation
value="______3._____________Extensions_DtType________________________"/>
<input>
<name value="src"/>
<type value="CE"/>
<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/encounter-modeOfArrival"/>
</parameter>
</target>
</rule>
<rule>
<name value="coding"/>
<source>
<context value="src"/>
</source>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="value"/>
<variable value="code1"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<dependent>
<name value="coding"/>
<variable value="src"/>
<variable value="code1"/>
</dependent>
</rule>
</group>
<group>
<name value="coding"/>
<typeMode value="none"/>
<input>
<name value="src"/>
<type value="CE"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="Coding"/>
<mode value="target"/>
</input>
<rule>
<name value="code"/>
<source>
<context value="src"/>
<element value="code"/>
<variable value="code"/>
</source>
<target>
<context value="tgt"/>
<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="src"/>
<element value="codeSystem"/>
<variable value="system"/>
</source>
<target>
<context value="tgt"/>
<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="src"/>
<element value="displayName"/>
<variable value="display"/>
</source>
<target>
<context value="tgt"/>
<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="src"/>
<element value="codeSystemVersion"/>
<variable value="version"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="version"/>
<transform value="cast"/>
<parameter>
<valueId value="version"/>
</parameter>
<parameter>
<valueString value="string"/>
</parameter>
</target>
</rule>
</group>
<group>
<name value="periodTiming"/>
<typeMode value="none"/>
<input>
<name value="effectiveTime"/>
<type value="PIVL_TS"/>
<mode value="source"/>
</input>
<input>
<name value="timing"/>
<type value="Timing"/>
<mode value="target"/>
</input>
<rule>
<name value="repeat"/>
<source>
<context value="effectiveTime"/>
</source>
<target>
<context value="timing"/>
<contextType value="variable"/>
<element value="repeat"/>
<variable value="r"/>
</target>
<rule>
<name value="period"/>
<source>
<context value="effectiveTime"/>
<element value="period"/>
<variable value="p"/>
</source>
<target>
<context value="r"/>
<contextType value="variable"/>
<element value="period"/>
<transform value="evaluate"/>
<parameter>
<valueString value="p.value"/>
</parameter>
</target>
</rule>
<rule>
<name value="period"/>
<source>
<context value="effectiveTime"/>
<element value="period"/>
<variable value="p"/>
</source>
<target>
<context value="r"/>
<contextType value="variable"/>
<element value="periodUnit"/>
<transform value="evaluate"/>
<parameter>
<valueString value="p.unit"/>
</parameter>
</target>
</rule>
</rule>
</group>
</StructureMap>