CDA-FHIR-Maps (R4)
0.3.0 - DSTU 1
This page is part of the CDA-FHIR-Maps (R4) (v0.3.0: DSTU 1) based on FHIR R4. . For a full list of available versions, see the Directory of published versions
<StructureMap xmlns="http://hl7.org/fhir">
<id value="BundleToCda"/>
<meta>
<versionId value="3"/>
<lastUpdated value="2022-01-11T22:14:50.980+01:00"/>
</meta>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>map "http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCda" = "BundleToCda"
// CDA document
// 2020-01-16 Oliver Egger, copyright ahdis ag, Apache License
// CDA: http://build.fhir.org/ig/ahdis/cda-core-2.0/branches/master/index.html
// FHIR: http://hl7.org/fhir/r4/
uses "http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument" alias ClinicalDocument as target
uses "http://hl7.org/fhir/cda/StructureDefinition/Author" alias Author as target
uses "http://hl7.org/fhir/cda/StructureDefinition/RecordTarget" alias RecordTarget as target
uses "http://hl7.org/fhir/cda/StructureDefinition/Custodian" alias Custodian as target
uses "http://hl7.org/fhir/cda/StructureDefinition/Organization" alias CdaOrganization as target
uses "http://hl7.org/fhir/cda/StructureDefinition/LegalAuthenticator" alias LegalAuthenticator as target
uses "http://hl7.org/fhir/cda/StructureDefinition/Section" alias CdaSection as target
uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as source
uses "http://hl7.org/fhir/StructureDefinition/Composition" alias Composition as source
uses "http://hl7.org/fhir/StructureDefinition/Practitioner" alias Practitioner as source
uses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as source
uses "http://hl7.org/fhir/StructureDefinition/Organization" alias Organization as source
uses "http://hl7.org/fhir/StructureDefinition/BackboneElement" alias BackboneElement as source
imports "http://fhir.ch/ig/cda-fhir-maps/StructureMap/FhirToCdaTypes"
group BundleToCda(source bundle : Bundle, target cda : ClinicalDocument) {
bundle -> cda.recordTarget as recordTarget, cda.author as author then BundleToClinicalDocument(bundle, recordTarget, author, cda) "bundle";
}
group BundleToClinicalDocument(source bundle : Bundle, target recordTarget : RecordTarget, target author : Author, target cda : ClinicalDocument) {
bundle -> cda.typeId as typeId then {
bundle -> typeId.root = '2.16.840.1.113883.1.3' "root";
bundle -> typeId.extension = 'POCD_HD000040' "extension";
} "typeId";
bundle.identifier as identifier -> cda.id as id then IdentifierII(identifier, id) "id";
bundle.timestamp as timestamp -> cda.effectiveTime as effectiveTime then InstantTS(timestamp, effectiveTime) "effectiveTime";
bundle.entry as entry then {
entry.resource as resource where $this.ofType(FHIR.Composition) then CompositionClinicalDocument(bundle, resource, recordTarget, author, cda);
};
}
// _________________________ Section Level Templates _________________________
group SectionCdaSection(source bundle : Bundle, source section : BackboneElement, target cdasection : CdaSection) {
section.extension as extension where $this.url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-sectionid' -> cdasection.id as id then {
extension.valueIdentifier as valueIdentifier then IdentifierII(valueIdentifier, id) "IdentifierII";
} "valueIdentifier";
section as section where $this.extension.where(url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-sectionid').exists() = false -> cdasection.id as id then {
bundle.identifier as identifier -> cdasection.id as id then IdentifierII(identifier, id) "setId";
} "sectionid";
section.code as code then {
code.coding as coding where $this.system = 'http://loinc.org' -> cdasection.code as cdacode then CodingCE(coding, cdacode) "codingsection";
};
section.title as title -> cdasection.title as cdatitle, cdatitle.data = title;
section.text as text then {
text.div as div -> cdasection.text = div;
};
}
// _________________________ Entry Level Templates ________________________
// _________________________ Header Level Templates _________________________
group CompositionClinicalDocument(source bundle : Bundle, source composition : Composition, target recordTarget : RecordTarget, target author : Author, target cda : ClinicalDocument) {
composition.type as type then {
type.coding as coding where $this.system = 'http://loinc.org' -> cda.code as code share docCode then CodingCE(coding, code) "code";
};
composition.title as title -> cda.title as t then {
title -> t.data = title "titleInner";
};
composition.confidentiality as conf -> cda.confidentialityCode as cdaconf then {
conf -> cdaconf.code = conf "conf";
conf -> cdaconf.codeSystem = '2.16.840.1.113883.5.25' "codeSystem";
} "confidentialityCode";
composition.language as language -> cda.languageCode as languageCode, languageCode.code = language "languageCode";
bundle.entry as entry then {
entry.fullUrl where ($this in %composition.subject.reference) and $this.startsWith('urn:uuid') then {
entry.resource : Patient as patient then PatientRecordTarget(patient, bundle, recordTarget) "patient";
} "uuid";
entry.resource as patient where ('Patient' + '/' + $this.id) in %composition.subject.reference then PatientRecordTarget(patient, bundle, recordTarget) "patient";
entry.fullUrl where ($this in %composition.custodian.reference) and $this.startsWith('urn:uuid') then {
entry.resource : Organization as organization -> cda.custodian as custodian then OrganizationCustodian(organization, custodian) "custodian";
} "uuid";
entry.resource as organization where ('Organization' + '/' + $this.id) in %composition.custodian.reference -> cda.custodian as custodian then OrganizationCustodian(organization, custodian) "custodian";
entry.fullUrl where ($this in %composition.author.reference) and $this.startsWith('urn:uuid') then {
entry.resource : Practitioner as practitioner then PractitionerAuthor(bundle, composition, practitioner, author) "author";
} "uuid";
entry.resource as practitioner where ('Practitioner' + '/' + $this.id) in %composition.author.reference then PractitionerAuthor(bundle, composition, practitioner, author) "author";
entry.fullUrl where ($this in %composition.attester.party.reference) and $this.startsWith('urn:uuid') then {
entry.resource : Practitioner as practitioner -> cda.legalAuthenticator as legalAuthenticator then PractitionerLegalAuthenticator(bundle, composition, practitioner, legalAuthenticator) "legalAuthenticator";
} "uuid";
entry.resource as practitioner where ('Practitioner' + '/' + $this.id) in %composition.attester.party.reference -> cda.legalAuthenticator as legalAuthenticator then PractitionerLegalAuthenticator(bundle, composition, practitioner, legalAuthenticator) "legalAuthenticator";
} "patient";
// source.date -> tgt.effectiveTime "effectiveTime";
composition.section as section where $this.code.exists() = false -> cda.component as component then {
section -> component.contextConductionInd = true "contextConductionInd";
section -> component.structuredBody as structuredBody, structuredBody.component as component, component.section as cdasection then SectionCdaSection(bundle, section, cdasection) "cdasection";
};
}
group PatientRecordTarget(source src : Patient, source bundle : Bundle, target tgt : RecordTarget) {
src -> tgt.patientRole as patientRole then {
src.identifier as identifier -> patientRole.id as id then IdentifierII(identifier, id);
src.address as address -> patientRole.addr as ad then AddressAD(address, ad);
src -> patientRole.patient as patient then {
src.name as humanname -> patient.name as en then HumanNameEN(humanname, en);
src.birthDate as birthDate -> patient.birthTime as birthTime then DateTS(birthDate, birthTime);
src.gender as v log $this -> patient.administrativeGenderCode as adminGender then {
v -> adminGender.code = translate(v, 'http://hl7.org/fhir/ConceptMap/cm-administrative-gender-v3', 'code') "gender";
v -> adminGender.codeSystem = '2.16.840.1.113883.5.1' "codeSytem";
v -> adminGender.codeSystemName = 'HL7 AdministrativeGender' "codeSystemName";
v as v where $this = 'male' -> adminGender.displayName = 'Male' "male";
v as v where $this = 'female' -> adminGender.displayName = 'Female' "female";
v as v where $this = 'other' -> adminGender.displayName = 'Undifferentiated' "other";
};
} "patient";
src.telecom as telecom -> patientRole.telecom as tel then ContactPointTEL(telecom, tel);
src.managingOrganization as managingOrganization then {
bundle.entry as entry then {
entry.fullUrl where ($this in %managingOrganization.reference) and $this.startsWith('urn:uuid') -> patientRole.providerOrganization as providerOrganization then Organization2CdaOrganization(managingOrganization, providerOrganization) "providerOrganization";
entry.resource as organization where ('Organization' + '/' + $this.id) in %managingOrganization.reference -> patientRole.providerOrganization as providerOrganization then Organization2CdaOrganization(managingOrganization, providerOrganization) "providerOrganization";
};
};
} "patientRole";
}
group PractitionerAuthor(source bundle : Bundle, source composition : Composition, source src : Practitioner, target tgt : Author) {
composition.author as srcauthor then {
srcauthor.extension as extensionTime where $this.url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-time' then {
extensionTime.valueDateTime as valueDateTime -> tgt.time as time then DateTimeTS(valueDateTime, time) "DateTime";
} "extensionTime";
} "srcAuthor";
bundle.timestamp as valueDateTime where composition.author.extension.where(url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-time').empty() -> tgt.time as time then DateTimeTS(valueDateTime, time) "DateTimeBundle";
src -> tgt.assignedAuthor as assignedAuthor then {
src.identifier as identifier -> assignedAuthor.id as id then IdentifierII(identifier, id) "id";
src.telecom first as telecom -> assignedAuthor.telecom as tel then ContactPointTEL(telecom, tel);
src.address as address -> assignedAuthor.addr as ad then AddressAD(address, ad);
src.name as name -> assignedAuthor.assignedPerson as assignedPerson, assignedPerson.name as en then HumanNameEN(name, en);
bundle.entry as entry then {
entry.fullUrl where ($this in %composition.author.reference) and $this.startsWith('urn:uuid') then {
entry.resource : Organization as organization -> assignedAuthor.representedOrganization as cdaorganization then Organization2CdaOrganization(organization, cdaorganization) "organization";
} "uuid";
entry.resource as organization where ('Organization' + '/' + $this.id) in %composition.author.reference -> assignedAuthor.representedOrganization as cdaorganization then Organization2CdaOrganization(organization, cdaorganization) "organization";
} "patient";
} "assignedAuthor";
}
group OrganizationCustodian(source src : Organization, target tgt : Custodian) {
src -> tgt.assignedCustodian as assignedCustodian then {
src -> assignedCustodian.representedCustodianOrganization as representedCustodianOrganization then Organization2CdaOrganizationCustodian(src, representedCustodianOrganization) "representedCustodianOrganization";
} "assignedCustodian";
}
group Organization2CdaOrganizationCustodian(source src : Organization, target tgt : CdaOrganization) {
src.identifier as identifier -> tgt.id as id then IdentifierII(identifier, id) "id";
src.name as name -> tgt.name as orgname, orgname.other = name;
src.address as address -> tgt.addr as ad then AddressAD(address, ad);
// target telecom is 0..1
src.telecom first as telecom -> tgt.telecom as tel then ContactPointTEL(telecom, tel);
}
group Organization2CdaOrganization(source src : Organization, target tgt : CdaOrganization) {
src.identifier as identifier -> tgt.id as id then IdentifierII(identifier, id) "id";
src.name as name -> tgt.name as orgname, orgname.other = name;
src.address as address -> tgt.addr as ad then AddressAD(address, ad);
src.telecom as telecom -> tgt.telecom as tel then ContactPointTEL(telecom, tel);
}
group PractitionerLegalAuthenticator(source bundle : Bundle, source composition : Composition, source src : Practitioner, target tgt : LegalAuthenticator) {
src -> tgt.templateId as templateId, templateId.root = '2.16.756.5.30.1.1.10.2.5' "templateId";
composition.attester as attester then {
attester.time as srcTime -> tgt.time as time then InstantTS(srcTime, time) "timestamp";
} "time";
// src -> tgt.signatureCode = 'S' "S";
src -> tgt.signatureCode as signatureCode, signatureCode.code = 'S' "signature";
src -> tgt.assignedEntity as assignedEntity then {
src.identifier as identifier -> assignedEntity.id as id then IdentifierII(identifier, id);
src.name as name -> assignedEntity.assignedPerson as assignedPerson, assignedPerson.name as en then HumanNameEN(name, en);
} "assignedEntity";
}
</pre>
</div>
</text>
<url value="http://fhir.ch/ig/cda-fhir-maps/StructureMap/BundleToCda"/>
<version value="0.3.0"/>
<name value="BundleToCda"/>
<status value="draft"/>
<date value="2022-02-11T11:14:39+01:00"/>
<publisher value="ahdis"/>
<contact>
<name value="ahdis"/>
<telecom>
<system value="url"/>
<value value="http://www.ahdis.ch/"/>
</telecom>
</contact>
<description
value="
CDA document
2020-01-16 Oliver Egger, copyright ahdis ag, Apache License
CDA: http://build.fhir.org/ig/ahdis/cda-core-2.0/branches/master/index.html
FHIR: http://hl7.org/fhir/r4/
"/>
<copyright value="CC-BY-SA-4.0"/>
<structure>
<url value="http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument"/>
<mode value="target"/>
<alias value="ClinicalDocument"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/cda/StructureDefinition/Author"/>
<mode value="target"/>
<alias value="Author"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/cda/StructureDefinition/RecordTarget"/>
<mode value="target"/>
<alias value="RecordTarget"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/cda/StructureDefinition/Custodian"/>
<mode value="target"/>
<alias value="Custodian"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/cda/StructureDefinition/Organization"/>
<mode value="target"/>
<alias value="CdaOrganization"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/cda/StructureDefinition/LegalAuthenticator"/>
<mode value="target"/>
<alias value="LegalAuthenticator"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/cda/StructureDefinition/Section"/>
<mode value="target"/>
<alias value="CdaSection"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
<mode value="source"/>
<alias value="Bundle"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/StructureDefinition/Composition"/>
<mode value="source"/>
<alias value="Composition"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
<mode value="source"/>
<alias value="Practitioner"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<mode value="source"/>
<alias value="Patient"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/StructureDefinition/Organization"/>
<mode value="source"/>
<alias value="Organization"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/StructureDefinition/BackboneElement"/>
<mode value="source"/>
<alias value="BackboneElement"/>
</structure>
<import value="http://fhir.ch/ig/cda-fhir-maps/StructureMap/FhirToCdaTypes"/>
<group>
<name value="BundleToCda"/>
<typeMode value="none"/>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="source"/>
</input>
<input>
<name value="cda"/>
<type value="ClinicalDocument"/>
<mode value="target"/>
</input>
<rule>
<name value="bundle"/>
<source>
<context value="bundle"/>
</source>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="recordTarget"/>
<variable value="recordTarget"/>
</target>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="author"/>
<variable value="author"/>
</target>
<dependent>
<name value="BundleToClinicalDocument"/>
<variable value="bundle"/>
<variable value="recordTarget"/>
<variable value="author"/>
<variable value="cda"/>
</dependent>
</rule>
</group>
<group>
<name value="BundleToClinicalDocument"/>
<typeMode value="none"/>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="source"/>
</input>
<input>
<name value="recordTarget"/>
<type value="RecordTarget"/>
<mode value="target"/>
</input>
<input>
<name value="author"/>
<type value="Author"/>
<mode value="target"/>
</input>
<input>
<name value="cda"/>
<type value="ClinicalDocument"/>
<mode value="target"/>
</input>
<rule>
<name value="typeId"/>
<source>
<context value="bundle"/>
</source>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="typeId"/>
<variable value="typeId"/>
</target>
<rule>
<name value="root"/>
<source>
<context value="bundle"/>
</source>
<target>
<context value="typeId"/>
<contextType value="variable"/>
<element value="root"/>
<transform value="copy"/>
<parameter>
<valueString value="2.16.840.1.113883.1.3"/>
</parameter>
</target>
</rule>
<rule>
<name value="extension"/>
<source>
<context value="bundle"/>
</source>
<target>
<context value="typeId"/>
<contextType value="variable"/>
<element value="extension"/>
<transform value="copy"/>
<parameter>
<valueString value="POCD_HD000040"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="id"/>
<source>
<context value="bundle"/>
<element value="identifier"/>
<variable value="identifier"/>
</source>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="id"/>
</target>
<dependent>
<name value="IdentifierII"/>
<variable value="identifier"/>
<variable value="id"/>
</dependent>
</rule>
<rule>
<name value="effectiveTime"/>
<source>
<context value="bundle"/>
<element value="timestamp"/>
<variable value="timestamp"/>
</source>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="effectiveTime"/>
<variable value="effectiveTime"/>
</target>
<dependent>
<name value="InstantTS"/>
<variable value="timestamp"/>
<variable value="effectiveTime"/>
</dependent>
</rule>
<rule>
<name value="entry"/>
<source>
<context value="bundle"/>
<element value="entry"/>
<variable value="entry"/>
</source>
<rule>
<name value="resource"/>
<source>
<context value="entry"/>
<element value="resource"/>
<variable value="resource"/>
<condition value="$this.ofType(FHIR.Composition)"/>
</source>
<dependent>
<name value="CompositionClinicalDocument"/>
<variable value="bundle"/>
<variable value="resource"/>
<variable value="recordTarget"/>
<variable value="author"/>
<variable value="cda"/>
</dependent>
</rule>
</rule>
</group>
<group>
<name value="SectionCdaSection"/>
<typeMode value="none"/>
<documentation
value="_________________________ Section Level Templates _________________________"/>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="source"/>
</input>
<input>
<name value="section"/>
<type value="BackboneElement"/>
<mode value="source"/>
</input>
<input>
<name value="cdasection"/>
<type value="CdaSection"/>
<mode value="target"/>
</input>
<rule>
<name value="valueIdentifier"/>
<source>
<context value="section"/>
<element value="extension"/>
<variable value="extension"/>
<condition
value="$this.url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-sectionid'"/>
</source>
<target>
<context value="cdasection"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="id"/>
</target>
<rule>
<name value="IdentifierII"/>
<source>
<context value="extension"/>
<element value="valueIdentifier"/>
<variable value="valueIdentifier"/>
</source>
<dependent>
<name value="IdentifierII"/>
<variable value="valueIdentifier"/>
<variable value="id"/>
</dependent>
</rule>
</rule>
<rule>
<name value="sectionid"/>
<source>
<context value="section"/>
<variable value="section"/>
<condition
value="$this.extension.where(url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-sectionid').exists() = false"/>
</source>
<target>
<context value="cdasection"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="id"/>
</target>
<rule>
<name value="setId"/>
<source>
<context value="bundle"/>
<element value="identifier"/>
<variable value="identifier"/>
</source>
<target>
<context value="cdasection"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="id"/>
</target>
<dependent>
<name value="IdentifierII"/>
<variable value="identifier"/>
<variable value="id"/>
</dependent>
</rule>
</rule>
<rule>
<name value="code"/>
<source>
<context value="section"/>
<element value="code"/>
<variable value="code"/>
</source>
<rule>
<name value="codingsection"/>
<source>
<context value="code"/>
<element value="coding"/>
<variable value="coding"/>
<condition value="$this.system = 'http://loinc.org'"/>
</source>
<target>
<context value="cdasection"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="cdacode"/>
</target>
<dependent>
<name value="CodingCE"/>
<variable value="coding"/>
<variable value="cdacode"/>
</dependent>
</rule>
</rule>
<rule>
<name value="title"/>
<source>
<context value="section"/>
<element value="title"/>
<variable value="title"/>
</source>
<target>
<context value="cdasection"/>
<contextType value="variable"/>
<element value="title"/>
<variable value="cdatitle"/>
</target>
<target>
<context value="cdatitle"/>
<contextType value="variable"/>
<element value="data"/>
<transform value="copy"/>
<parameter>
<valueId value="title"/>
</parameter>
</target>
</rule>
<rule>
<name value="text"/>
<source>
<context value="section"/>
<element value="text"/>
<variable value="text"/>
</source>
<rule>
<name value="div"/>
<source>
<context value="text"/>
<element value="div"/>
<variable value="div"/>
</source>
<target>
<context value="cdasection"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="div"/>
</parameter>
</target>
</rule>
</rule>
</group>
<group>
<name value="CompositionClinicalDocument"/>
<typeMode value="none"/>
<documentation
value="_________________________ Entry Level Templates ________________________
_________________________ Header Level Templates _________________________"/>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="source"/>
</input>
<input>
<name value="composition"/>
<type value="Composition"/>
<mode value="source"/>
</input>
<input>
<name value="recordTarget"/>
<type value="RecordTarget"/>
<mode value="target"/>
</input>
<input>
<name value="author"/>
<type value="Author"/>
<mode value="target"/>
</input>
<input>
<name value="cda"/>
<type value="ClinicalDocument"/>
<mode value="target"/>
</input>
<rule>
<name value="type"/>
<source>
<context value="composition"/>
<element value="type"/>
<variable value="type"/>
</source>
<rule>
<name value="code"/>
<source>
<context value="type"/>
<element value="coding"/>
<variable value="coding"/>
<condition value="$this.system = 'http://loinc.org'"/>
</source>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="code"/>
<listMode value="share"/>
<listRuleId value="docCode"/>
</target>
<dependent>
<name value="CodingCE"/>
<variable value="coding"/>
<variable value="code"/>
</dependent>
</rule>
</rule>
<rule>
<name value="title"/>
<source>
<context value="composition"/>
<element value="title"/>
<variable value="title"/>
</source>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="title"/>
<variable value="t"/>
</target>
<rule>
<name value="titleInner"/>
<source>
<context value="title"/>
</source>
<target>
<context value="t"/>
<contextType value="variable"/>
<element value="data"/>
<transform value="copy"/>
<parameter>
<valueId value="title"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="confidentialityCode"/>
<source>
<context value="composition"/>
<element value="confidentiality"/>
<variable value="conf"/>
</source>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="confidentialityCode"/>
<variable value="cdaconf"/>
</target>
<rule>
<name value="conf"/>
<source>
<context value="conf"/>
</source>
<target>
<context value="cdaconf"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueId value="conf"/>
</parameter>
</target>
</rule>
<rule>
<name value="codeSystem"/>
<source>
<context value="conf"/>
</source>
<target>
<context value="cdaconf"/>
<contextType value="variable"/>
<element value="codeSystem"/>
<transform value="copy"/>
<parameter>
<valueString value="2.16.840.1.113883.5.25"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="languageCode"/>
<source>
<context value="composition"/>
<element value="language"/>
<variable value="language"/>
</source>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="languageCode"/>
<variable value="languageCode"/>
</target>
<target>
<context value="languageCode"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueId value="language"/>
</parameter>
</target>
</rule>
<rule>
<name value="patient"/>
<source>
<context value="bundle"/>
<element value="entry"/>
<variable value="entry"/>
</source>
<rule>
<name value="uuid"/>
<source>
<context value="entry"/>
<element value="fullUrl"/>
<condition
value="($this in %composition.subject.reference) and $this.startsWith('urn:uuid')"/>
</source>
<rule>
<name value="patient"/>
<source>
<context value="entry"/>
<type value="Patient"/>
<element value="resource"/>
<variable value="patient"/>
</source>
<dependent>
<name value="PatientRecordTarget"/>
<variable value="patient"/>
<variable value="bundle"/>
<variable value="recordTarget"/>
</dependent>
</rule>
</rule>
<rule>
<name value="patient"/>
<source>
<context value="entry"/>
<element value="resource"/>
<variable value="patient"/>
<condition
value="('Patient' + '/' + $this.id) in %composition.subject.reference"/>
</source>
<dependent>
<name value="PatientRecordTarget"/>
<variable value="patient"/>
<variable value="bundle"/>
<variable value="recordTarget"/>
</dependent>
</rule>
<rule>
<name value="uuid"/>
<source>
<context value="entry"/>
<element value="fullUrl"/>
<condition
value="($this in %composition.custodian.reference) and $this.startsWith('urn:uuid')"/>
</source>
<rule>
<name value="custodian"/>
<source>
<context value="entry"/>
<type value="Organization"/>
<element value="resource"/>
<variable value="organization"/>
</source>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="custodian"/>
<variable value="custodian"/>
</target>
<dependent>
<name value="OrganizationCustodian"/>
<variable value="organization"/>
<variable value="custodian"/>
</dependent>
</rule>
</rule>
<rule>
<name value="custodian"/>
<source>
<context value="entry"/>
<element value="resource"/>
<variable value="organization"/>
<condition
value="('Organization' + '/' + $this.id) in %composition.custodian.reference"/>
</source>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="custodian"/>
<variable value="custodian"/>
</target>
<dependent>
<name value="OrganizationCustodian"/>
<variable value="organization"/>
<variable value="custodian"/>
</dependent>
</rule>
<rule>
<name value="uuid"/>
<source>
<context value="entry"/>
<element value="fullUrl"/>
<condition
value="($this in %composition.author.reference) and $this.startsWith('urn:uuid')"/>
</source>
<rule>
<name value="author"/>
<source>
<context value="entry"/>
<type value="Practitioner"/>
<element value="resource"/>
<variable value="practitioner"/>
</source>
<dependent>
<name value="PractitionerAuthor"/>
<variable value="bundle"/>
<variable value="composition"/>
<variable value="practitioner"/>
<variable value="author"/>
</dependent>
</rule>
</rule>
<rule>
<name value="author"/>
<source>
<context value="entry"/>
<element value="resource"/>
<variable value="practitioner"/>
<condition
value="('Practitioner' + '/' + $this.id) in %composition.author.reference"/>
</source>
<dependent>
<name value="PractitionerAuthor"/>
<variable value="bundle"/>
<variable value="composition"/>
<variable value="practitioner"/>
<variable value="author"/>
</dependent>
</rule>
<rule>
<name value="uuid"/>
<source>
<context value="entry"/>
<element value="fullUrl"/>
<condition
value="($this in %composition.attester.party.reference) and $this.startsWith('urn:uuid')"/>
</source>
<rule>
<name value="legalAuthenticator"/>
<source>
<context value="entry"/>
<type value="Practitioner"/>
<element value="resource"/>
<variable value="practitioner"/>
</source>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="legalAuthenticator"/>
<variable value="legalAuthenticator"/>
</target>
<dependent>
<name value="PractitionerLegalAuthenticator"/>
<variable value="bundle"/>
<variable value="composition"/>
<variable value="practitioner"/>
<variable value="legalAuthenticator"/>
</dependent>
</rule>
</rule>
<rule>
<name value="legalAuthenticator"/>
<source>
<context value="entry"/>
<element value="resource"/>
<variable value="practitioner"/>
<condition
value="('Practitioner' + '/' + $this.id) in %composition.attester.party.reference"/>
</source>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="legalAuthenticator"/>
<variable value="legalAuthenticator"/>
</target>
<dependent>
<name value="PractitionerLegalAuthenticator"/>
<variable value="bundle"/>
<variable value="composition"/>
<variable value="practitioner"/>
<variable value="legalAuthenticator"/>
</dependent>
</rule>
</rule>
<rule>
<name value="section"/>
<source>
<context value="composition"/>
<element value="section"/>
<variable value="section"/>
<condition value="$this.code.exists() = false"/>
</source>
<target>
<context value="cda"/>
<contextType value="variable"/>
<element value="component"/>
<variable value="component"/>
</target>
<rule>
<name value="contextConductionInd"/>
<source>
<context value="section"/>
</source>
<target>
<context value="component"/>
<contextType value="variable"/>
<element value="contextConductionInd"/>
<transform value="copy"/>
<parameter>
<valueBoolean value="true"/>
</parameter>
</target>
</rule>
<rule>
<name value="cdasection"/>
<source>
<context value="section"/>
</source>
<target>
<context value="component"/>
<contextType value="variable"/>
<element value="structuredBody"/>
<variable value="structuredBody"/>
</target>
<target>
<context value="structuredBody"/>
<contextType value="variable"/>
<element value="component"/>
<variable value="component"/>
</target>
<target>
<context value="component"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="cdasection"/>
</target>
<dependent>
<name value="SectionCdaSection"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="cdasection"/>
</dependent>
</rule>
<documentation
value="source.date -> tgt.effectiveTime "effectiveTime";"/>
</rule>
</group>
<group>
<name value="PatientRecordTarget"/>
<typeMode value="none"/>
<input>
<name value="src"/>
<type value="Patient"/>
<mode value="source"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="RecordTarget"/>
<mode value="target"/>
</input>
<rule>
<name value="patientRole"/>
<source>
<context value="src"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="patientRole"/>
<variable value="patientRole"/>
</target>
<rule>
<name value="identifier"/>
<source>
<context value="src"/>
<element value="identifier"/>
<variable value="identifier"/>
</source>
<target>
<context value="patientRole"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="id"/>
</target>
<dependent>
<name value="IdentifierII"/>
<variable value="identifier"/>
<variable value="id"/>
</dependent>
</rule>
<rule>
<name value="address"/>
<source>
<context value="src"/>
<element value="address"/>
<variable value="address"/>
</source>
<target>
<context value="patientRole"/>
<contextType value="variable"/>
<element value="addr"/>
<variable value="ad"/>
</target>
<dependent>
<name value="AddressAD"/>
<variable value="address"/>
<variable value="ad"/>
</dependent>
</rule>
<rule>
<name value="patient"/>
<source>
<context value="src"/>
</source>
<target>
<context value="patientRole"/>
<contextType value="variable"/>
<element value="patient"/>
<variable value="patient"/>
</target>
<rule>
<name value="name"/>
<source>
<context value="src"/>
<element value="name"/>
<variable value="humanname"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="name"/>
<variable value="en"/>
</target>
<dependent>
<name value="HumanNameEN"/>
<variable value="humanname"/>
<variable value="en"/>
</dependent>
</rule>
<rule>
<name value="birthDate"/>
<source>
<context value="src"/>
<element value="birthDate"/>
<variable value="birthDate"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="birthTime"/>
<variable value="birthTime"/>
</target>
<dependent>
<name value="DateTS"/>
<variable value="birthDate"/>
<variable value="birthTime"/>
</dependent>
</rule>
<rule>
<name value="gender"/>
<source>
<context value="src"/>
<element value="gender"/>
<variable value="v"/>
<logMessage value="$this"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="administrativeGenderCode"/>
<variable value="adminGender"/>
</target>
<rule>
<name value="gender"/>
<source>
<context value="v"/>
</source>
<target>
<context value="adminGender"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="translate"/>
<parameter>
<valueId value="v"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/cm-administrative-gender-v3"/>
</parameter>
<parameter>
<valueString value="code"/>
</parameter>
</target>
</rule>
<rule>
<name value="codeSytem"/>
<source>
<context value="v"/>
</source>
<target>
<context value="adminGender"/>
<contextType value="variable"/>
<element value="codeSystem"/>
<transform value="copy"/>
<parameter>
<valueString value="2.16.840.1.113883.5.1"/>
</parameter>
</target>
</rule>
<rule>
<name value="codeSystemName"/>
<source>
<context value="v"/>
</source>
<target>
<context value="adminGender"/>
<contextType value="variable"/>
<element value="codeSystemName"/>
<transform value="copy"/>
<parameter>
<valueString value="HL7 AdministrativeGender"/>
</parameter>
</target>
</rule>
<rule>
<name value="male"/>
<source>
<context value="v"/>
<variable value="v"/>
<condition value="$this = 'male'"/>
</source>
<target>
<context value="adminGender"/>
<contextType value="variable"/>
<element value="displayName"/>
<transform value="copy"/>
<parameter>
<valueString value="Male"/>
</parameter>
</target>
</rule>
<rule>
<name value="female"/>
<source>
<context value="v"/>
<variable value="v"/>
<condition value="$this = 'female'"/>
</source>
<target>
<context value="adminGender"/>
<contextType value="variable"/>
<element value="displayName"/>
<transform value="copy"/>
<parameter>
<valueString value="Female"/>
</parameter>
</target>
</rule>
<rule>
<name value="other"/>
<source>
<context value="v"/>
<variable value="v"/>
<condition value="$this = 'other'"/>
</source>
<target>
<context value="adminGender"/>
<contextType value="variable"/>
<element value="displayName"/>
<transform value="copy"/>
<parameter>
<valueString value="Undifferentiated"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="telecom"/>
<source>
<context value="src"/>
<element value="telecom"/>
<variable value="telecom"/>
</source>
<target>
<context value="patientRole"/>
<contextType value="variable"/>
<element value="telecom"/>
<variable value="tel"/>
</target>
<dependent>
<name value="ContactPointTEL"/>
<variable value="telecom"/>
<variable value="tel"/>
</dependent>
</rule>
<rule>
<name value="managingOrganization"/>
<source>
<context value="src"/>
<element value="managingOrganization"/>
<variable value="managingOrganization"/>
</source>
<rule>
<name value="entry"/>
<source>
<context value="bundle"/>
<element value="entry"/>
<variable value="entry"/>
</source>
<rule>
<name value="providerOrganization"/>
<source>
<context value="entry"/>
<element value="fullUrl"/>
<condition
value="($this in %managingOrganization.reference) and $this.startsWith('urn:uuid')"/>
</source>
<target>
<context value="patientRole"/>
<contextType value="variable"/>
<element value="providerOrganization"/>
<variable value="providerOrganization"/>
</target>
<dependent>
<name value="Organization2CdaOrganization"/>
<variable value="managingOrganization"/>
<variable value="providerOrganization"/>
</dependent>
</rule>
<rule>
<name value="providerOrganization"/>
<source>
<context value="entry"/>
<element value="resource"/>
<variable value="organization"/>
<condition
value="('Organization' + '/' + $this.id) in %managingOrganization.reference"/>
</source>
<target>
<context value="patientRole"/>
<contextType value="variable"/>
<element value="providerOrganization"/>
<variable value="providerOrganization"/>
</target>
<dependent>
<name value="Organization2CdaOrganization"/>
<variable value="managingOrganization"/>
<variable value="providerOrganization"/>
</dependent>
</rule>
</rule>
</rule>
</rule>
</group>
<group>
<name value="PractitionerAuthor"/>
<typeMode value="none"/>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="source"/>
</input>
<input>
<name value="composition"/>
<type value="Composition"/>
<mode value="source"/>
</input>
<input>
<name value="src"/>
<type value="Practitioner"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="Author"/>
<mode value="target"/>
</input>
<rule>
<name value="srcAuthor"/>
<source>
<context value="composition"/>
<element value="author"/>
<variable value="srcauthor"/>
</source>
<rule>
<name value="extensionTime"/>
<source>
<context value="srcauthor"/>
<element value="extension"/>
<variable value="extensionTime"/>
<condition
value="$this.url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-time'"/>
</source>
<rule>
<name value="DateTime"/>
<source>
<context value="extensionTime"/>
<element value="valueDateTime"/>
<variable value="valueDateTime"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="time"/>
</target>
<dependent>
<name value="DateTimeTS"/>
<variable value="valueDateTime"/>
<variable value="time"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="DateTimeBundle"/>
<source>
<context value="bundle"/>
<element value="timestamp"/>
<variable value="valueDateTime"/>
<condition
value="composition.author.extension.where(url = 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-ext-epr-time').empty()"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="time"/>
</target>
<dependent>
<name value="DateTimeTS"/>
<variable value="valueDateTime"/>
<variable value="time"/>
</dependent>
</rule>
<rule>
<name value="assignedAuthor"/>
<source>
<context value="src"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="assignedAuthor"/>
<variable value="assignedAuthor"/>
</target>
<rule>
<name value="id"/>
<source>
<context value="src"/>
<element value="identifier"/>
<variable value="identifier"/>
</source>
<target>
<context value="assignedAuthor"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="id"/>
</target>
<dependent>
<name value="IdentifierII"/>
<variable value="identifier"/>
<variable value="id"/>
</dependent>
</rule>
<rule>
<name value="telecom"/>
<source>
<context value="src"/>
<element value="telecom"/>
<listMode value="first"/>
<variable value="telecom"/>
</source>
<target>
<context value="assignedAuthor"/>
<contextType value="variable"/>
<element value="telecom"/>
<variable value="tel"/>
</target>
<dependent>
<name value="ContactPointTEL"/>
<variable value="telecom"/>
<variable value="tel"/>
</dependent>
</rule>
<rule>
<name value="address"/>
<source>
<context value="src"/>
<element value="address"/>
<variable value="address"/>
</source>
<target>
<context value="assignedAuthor"/>
<contextType value="variable"/>
<element value="addr"/>
<variable value="ad"/>
</target>
<dependent>
<name value="AddressAD"/>
<variable value="address"/>
<variable value="ad"/>
</dependent>
</rule>
<rule>
<name value="name"/>
<source>
<context value="src"/>
<element value="name"/>
<variable value="name"/>
</source>
<target>
<context value="assignedAuthor"/>
<contextType value="variable"/>
<element value="assignedPerson"/>
<variable value="assignedPerson"/>
</target>
<target>
<context value="assignedPerson"/>
<contextType value="variable"/>
<element value="name"/>
<variable value="en"/>
</target>
<dependent>
<name value="HumanNameEN"/>
<variable value="name"/>
<variable value="en"/>
</dependent>
</rule>
<rule>
<name value="patient"/>
<source>
<context value="bundle"/>
<element value="entry"/>
<variable value="entry"/>
</source>
<rule>
<name value="uuid"/>
<source>
<context value="entry"/>
<element value="fullUrl"/>
<condition
value="($this in %composition.author.reference) and $this.startsWith('urn:uuid')"/>
</source>
<rule>
<name value="organization"/>
<source>
<context value="entry"/>
<type value="Organization"/>
<element value="resource"/>
<variable value="organization"/>
</source>
<target>
<context value="assignedAuthor"/>
<contextType value="variable"/>
<element value="representedOrganization"/>
<variable value="cdaorganization"/>
</target>
<dependent>
<name value="Organization2CdaOrganization"/>
<variable value="organization"/>
<variable value="cdaorganization"/>
</dependent>
</rule>
</rule>
<rule>
<name value="organization"/>
<source>
<context value="entry"/>
<element value="resource"/>
<variable value="organization"/>
<condition
value="('Organization' + '/' + $this.id) in %composition.author.reference"/>
</source>
<target>
<context value="assignedAuthor"/>
<contextType value="variable"/>
<element value="representedOrganization"/>
<variable value="cdaorganization"/>
</target>
<dependent>
<name value="Organization2CdaOrganization"/>
<variable value="organization"/>
<variable value="cdaorganization"/>
</dependent>
</rule>
</rule>
</rule>
</group>
<group>
<name value="OrganizationCustodian"/>
<typeMode value="none"/>
<input>
<name value="src"/>
<type value="Organization"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="Custodian"/>
<mode value="target"/>
</input>
<rule>
<name value="assignedCustodian"/>
<source>
<context value="src"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="assignedCustodian"/>
<variable value="assignedCustodian"/>
</target>
<rule>
<name value="representedCustodianOrganization"/>
<source>
<context value="src"/>
</source>
<target>
<context value="assignedCustodian"/>
<contextType value="variable"/>
<element value="representedCustodianOrganization"/>
<variable value="representedCustodianOrganization"/>
</target>
<dependent>
<name value="Organization2CdaOrganizationCustodian"/>
<variable value="src"/>
<variable value="representedCustodianOrganization"/>
</dependent>
</rule>
</rule>
</group>
<group>
<name value="Organization2CdaOrganizationCustodian"/>
<typeMode value="none"/>
<input>
<name value="src"/>
<type value="Organization"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="CdaOrganization"/>
<mode value="target"/>
</input>
<rule>
<name value="id"/>
<source>
<context value="src"/>
<element value="identifier"/>
<variable value="identifier"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="id"/>
</target>
<dependent>
<name value="IdentifierII"/>
<variable value="identifier"/>
<variable value="id"/>
</dependent>
</rule>
<rule>
<name value="name"/>
<source>
<context value="src"/>
<element value="name"/>
<variable value="name"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="name"/>
<variable value="orgname"/>
</target>
<target>
<context value="orgname"/>
<contextType value="variable"/>
<element value="other"/>
<transform value="copy"/>
<parameter>
<valueId value="name"/>
</parameter>
</target>
</rule>
<rule>
<name value="address"/>
<source>
<context value="src"/>
<element value="address"/>
<variable value="address"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="addr"/>
<variable value="ad"/>
</target>
<dependent>
<name value="AddressAD"/>
<variable value="address"/>
<variable value="ad"/>
</dependent>
</rule>
<rule>
<name value="telecom"/>
<source>
<context value="src"/>
<element value="telecom"/>
<listMode value="first"/>
<variable value="telecom"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="telecom"/>
<variable value="tel"/>
</target>
<dependent>
<name value="ContactPointTEL"/>
<variable value="telecom"/>
<variable value="tel"/>
</dependent>
<documentation value="target telecom is 0..1"/>
</rule>
</group>
<group>
<name value="Organization2CdaOrganization"/>
<typeMode value="none"/>
<input>
<name value="src"/>
<type value="Organization"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="CdaOrganization"/>
<mode value="target"/>
</input>
<rule>
<name value="id"/>
<source>
<context value="src"/>
<element value="identifier"/>
<variable value="identifier"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="id"/>
</target>
<dependent>
<name value="IdentifierII"/>
<variable value="identifier"/>
<variable value="id"/>
</dependent>
</rule>
<rule>
<name value="name"/>
<source>
<context value="src"/>
<element value="name"/>
<variable value="name"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="name"/>
<variable value="orgname"/>
</target>
<target>
<context value="orgname"/>
<contextType value="variable"/>
<element value="other"/>
<transform value="copy"/>
<parameter>
<valueId value="name"/>
</parameter>
</target>
</rule>
<rule>
<name value="address"/>
<source>
<context value="src"/>
<element value="address"/>
<variable value="address"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="addr"/>
<variable value="ad"/>
</target>
<dependent>
<name value="AddressAD"/>
<variable value="address"/>
<variable value="ad"/>
</dependent>
</rule>
<rule>
<name value="telecom"/>
<source>
<context value="src"/>
<element value="telecom"/>
<variable value="telecom"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="telecom"/>
<variable value="tel"/>
</target>
<dependent>
<name value="ContactPointTEL"/>
<variable value="telecom"/>
<variable value="tel"/>
</dependent>
</rule>
</group>
<group>
<name value="PractitionerLegalAuthenticator"/>
<typeMode value="none"/>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="source"/>
</input>
<input>
<name value="composition"/>
<type value="Composition"/>
<mode value="source"/>
</input>
<input>
<name value="src"/>
<type value="Practitioner"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="LegalAuthenticator"/>
<mode value="target"/>
</input>
<rule>
<name value="templateId"/>
<source>
<context value="src"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="templateId"/>
<variable value="templateId"/>
</target>
<target>
<context value="templateId"/>
<contextType value="variable"/>
<element value="root"/>
<transform value="copy"/>
<parameter>
<valueString value="2.16.756.5.30.1.1.10.2.5"/>
</parameter>
</target>
</rule>
<rule>
<name value="time"/>
<source>
<context value="composition"/>
<element value="attester"/>
<variable value="attester"/>
</source>
<rule>
<name value="timestamp"/>
<source>
<context value="attester"/>
<element value="time"/>
<variable value="srcTime"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="time"/>
<variable value="time"/>
</target>
<dependent>
<name value="InstantTS"/>
<variable value="srcTime"/>
<variable value="time"/>
</dependent>
</rule>
</rule>
<rule>
<name value="signature"/>
<source>
<context value="src"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="signatureCode"/>
<variable value="signatureCode"/>
</target>
<target>
<context value="signatureCode"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="S"/>
</parameter>
</target>
<documentation
value="src -> tgt.signatureCode = 'S' "S";"/>
</rule>
<rule>
<name value="assignedEntity"/>
<source>
<context value="src"/>
</source>
<target>
<context value="tgt"/>
<contextType value="variable"/>
<element value="assignedEntity"/>
<variable value="assignedEntity"/>
</target>
<rule>
<name value="identifier"/>
<source>
<context value="src"/>
<element value="identifier"/>
<variable value="identifier"/>
</source>
<target>
<context value="assignedEntity"/>
<contextType value="variable"/>
<element value="id"/>
<variable value="id"/>
</target>
<dependent>
<name value="IdentifierII"/>
<variable value="identifier"/>
<variable value="id"/>
</dependent>
</rule>
<rule>
<name value="name"/>
<source>
<context value="src"/>
<element value="name"/>
<variable value="name"/>
</source>
<target>
<context value="assignedEntity"/>
<contextType value="variable"/>
<element value="assignedPerson"/>
<variable value="assignedPerson"/>
</target>
<target>
<context value="assignedPerson"/>
<contextType value="variable"/>
<element value="name"/>
<variable value="en"/>
</target>
<dependent>
<name value="HumanNameEN"/>
<variable value="name"/>
<variable value="en"/>
</dependent>
</rule>
</rule>
</group>
</StructureMap>