CH ALIS (R4)
0.2.0 - CI build

Publish Box goes here

: Alis43ToBundle - TTL Representation

Raw ttl | Download


@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:StructureMap;
  fhir:nodeRole fhir:treeRoot;
  fhir:Resource.id [ fhir:value "Alis43ToBundle"];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ];
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n      <pre>map &quot;http://fhir.ch/ig/ch-alis/StructureMap/Alis43ToBundle&quot; = &quot;Alis43ToBundle&quot;\n\n// Convert ALIS43 XML to a Bundle according to the CH ALIS implmementation guide,\n// 2020-12-03 by Oliver Egger, copyright ahdis ag, Apache License,\n// FHIR: http://hl7.org/fhir/r4/.\n// ISSUE7: what are the URL's oid's we have to define.\n\nconceptmap &quot;serviceMap&quot; {\n  prefix s = &quot;http://fhir.ch/ig/ch-alis&quot;\n  prefix t = &quot;http://hl7.org/fhir&quot;\n\n  s:TARMED == t:&quot;urn:oid:2.16.756.5.30.1.129.1.4&quot;\n  s:ICD10 == t:&quot;urn:oid:2.16.756.5.30.1.126.3.2&quot;\n}\n\nconceptmap &quot;gender&quot; {\n  prefix s = &quot;http://fhir.ch/ig/ch-alis&quot;\n  prefix t = &quot;http://hl7.org/fhir/ValueSet/administrative-gender&quot;\n\n  s:M == t:male\n  s:F == t:female\n}\n\nuses &quot;http://fhir.ch/ig/ch-alis/StructureDefinition/Header&quot; alias Header as source\nuses &quot;http://fhir.ch/ig/ch-alis/StructureDefinition/Visit&quot; alias Visit as source\nuses &quot;http://fhir.ch/ig/ch-alis/StructureDefinition/Service&quot; alias Service as source\nuses &quot;http://fhir.ch/ig/ch-alis/StructureDefinition/PersonV40&quot; alias PersonV40 as source\nuses &quot;http://fhir.ch/ig/ch-alis/StructureDefinition/ParameterV40&quot; alias ParameterV40 as source\nuses &quot;http://fhir.ch/ig/ch-alis/StructureDefinition/DiagGroup&quot; alias DiagGroup as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; alias Bundle as target\nuses &quot;http://hl7.org/fhir/StructureDefinition/ChargeItem&quot; alias ChargeItem as target\nuses &quot;http://hl7.org/fhir/StructureDefinition/Extension&quot; alias Extension as target\nuses &quot;http://hl7.org/fhir/StructureDefinition/MessageHeader&quot; alias MessageHeader as target\nuses &quot;http://hl7.org/fhir/StructureDefinition/BackboneElement&quot; alias BackboneElement as target\nuses &quot;http://hl7.org/fhir/StructureDefinition/HumanName&quot; alias HumanName as target\nuses &quot;http://hl7.org/fhir/StructureDefinition/Condition&quot; alias Condition as target\nuses &quot;http://hl7.org/fhir/StructureDefinition/Encounter&quot; alias Encounter as target\n\ngroup Alis43ToBundle(source header : Header, target bundle : Bundle) {\n  header -&gt;  bundle.entry as e,  e.resource = create('MessageHeader') as messageHeader,  messageHeader.id = uuid() as uuid,  e.fullUrl = append('urn:uuid:', uuid),  bundle.entry as e2,  e2.resource = create('Bundle') as transactionBundle,  transactionBundle.id = uuid() as uuid2,  e2.fullUrl = append('urn:uuid:', uuid2),  messageHeader.focus = create('Reference') as reference,  reference.type = 'Bundle',  reference.reference = append('urn:uuid:', uuid2) then {\n    header then Alis43ToMessageHeader(header, messageHeader) &quot;messageHeader&quot;;\n    header then Alis43ToBundleTransaction(header, transactionBundle) &quot;bundleTransaction&quot;;\n  } &quot;bundle&quot;;\n  header -&gt; bundle.type = 'message' &quot;type&quot;;\n  header.FileCreationDate as fileCreationDate then {\n    fileCreationDate as date -&gt; bundle.timestamp = date &quot;date&quot;;\n  };\n}\n\ngroup Alis43ToMessageHeader(source header : Header, target messageHeader : MessageHeader) {\n  // ISSUE1: should be link to a MessageDefinition or a code?\n  header -&gt;  messageHeader.event = create('uri') as value,  value.value = 'http://fhir.ch/ig/ch-alis-43' &quot;eventUri&quot;;\n  // ISSUE2: MessageControlID cannot be id of entry, needs to be either fullUrl oder uuid, need to map this to an identifier\n  header -&gt; messageHeader.source as source then {\n    header.SoftwareReleaseNumber as version -&gt; source.version = (%version.data) &quot;version&quot;;\n    // ISSUE3: &quot; : &quot;urn:SendingApplication:SendingFacility:SendingServiceCode&quot; -&gt; add urn: in example/docu\n    header -&gt; source.endpoint = ('urn:' + %header.SendingApplication.data + ':' + %header.SendingFacility.data + ':' + %header.SendingServiceCode.data) &quot;endpoint&quot;;\n  } &quot;source&quot;;\n  header -&gt; messageHeader.destination as destination then {\n    // ISSUE4: &quot; : &quot;urn:ReceivingApplication, ReceivingFacility, ReceivingServiceCode&quot; -&gt; add urn: in example/docu\n    header -&gt; destination.endpoint = ('urn:' + %header.ReceivingApplication.data + ':' + %header.ReceivingFacility.data + ':' + %header.ReceivingServiceCode.data) &quot;endpoint&quot;;\n  } &quot;destination&quot;;\n}\n\ngroup Alis43ToBundleTransaction(source header : Header, target transactionBundle : Bundle) {\n  header -&gt; transactionBundle.type = 'transaction' &quot;transaction&quot;;\n  header.Visit as visit then {\n    visit.Service as service -&gt;  transactionBundle.entry as e,  e.resource = create('ChargeItem') as chargeItem then ServiceToChargeItem(service, visit, chargeItem, e) &quot;ServiceToChargeItem&quot;;\n  };\n}\n\ngroup ServiceToChargeItem(source service : Service, source visit : Visit, target chargeItem : ChargeItem, target entry) {\n  service.ItemNumber as itemNumber -&gt;  chargeItem.id = (itemNumber.data.lower()) as uuid,  entry.fullUrl = append('urn:uuid:', uuid) &quot;11 Laufnummer (ItemNumber)&quot;;\n  service -&gt;  chargeItem.contained = create('Patient') as patient,  patient.id = 'pat' as containedid,  chargeItem.subject = create('Reference') as ref,  ref.reference = ('#' + %containedid) then ServiceToPatient(service, visit, patient) &quot;patient&quot;;\n  visit -&gt;  chargeItem.contained = create('Encounter') as encounter,  encounter.id = 'enc' as containedid,  chargeItem.context = create('Reference') as ref,  ref.reference = ('#' + %containedid) then VisitToEncounter(visit, encounter) &quot;VisitToEncounter&quot;;\n  visit.DiagGroup as diaggroup -&gt;  chargeItem.contained = create('Condition') as cond,  cond.id = 'cond' as containedid then DiagGroupToCondition(diaggroup, cond) &quot;DiagGroupToCondition&quot;;\n  service where (service.Transaction.exists() = false) -&gt;  entry.request as request,  request.method = 'POST',  request.url = 'ChargeItem' &quot;POSTDEFAULT&quot;;\n  service.Transaction where (service.Transaction = 'insert') -&gt;  entry.request as request,  request.method = 'POST',  request.url = 'ChargeItem' &quot;POST&quot;;\n  service.Transaction where (service.Transaction = 'update') -&gt;  entry.request as request,  request.method = 'PUT',  request.url = 'ChargeItem' &quot;UPDATE&quot;;\n  service.Transaction where (service.Transaction = 'delete') -&gt;  entry.request as request,  request.method = 'DELETE',  request.url = 'ChargeItem' &quot;DELETE&quot;;\n  service.SessionID as sessionID -&gt;  chargeItem.extension as extension,  extension.url = 'http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-sessionid',  extension.value = create('string') as value,  value.value = (sessionID.data) &quot;2 Sitzung (SessionID)&quot;;\n  service.OrderID as orderID -&gt;  chargeItem.extension as extension,  extension.url = 'http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-orderid',  extension.value = create('string') as value,  value.value = (orderID.data) &quot;3 Auftragsnummer (OrderID)&quot;;\n  service.Form as form -&gt;  chargeItem.extension as extension,  extension.url = 'http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-form',  extension.value = create('string') as value,  value.value = (form.data) &quot;7 Formularbezeichnung (Form)&quot;;\n  service.ParameterV40 as parameterV40 -&gt;  chargeItem.extension as extension,  extension.url = 'http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-parameterv40' then ParameterV40ToExtension(parameterV40, extension) &quot;4 ParamterV40 (ParameterV40)&quot;;\n  service -&gt; chargeItem.status = 'billable' &quot;billable&quot;;\n  service.RefItemNumber as refItemNumber then {\n    refItemNumber.data as data -&gt;  chargeItem.partOf = create('Reference') as ref,  ref.reference = ('urn:uuid:' + %data.lower()),  ref.type = 'ChargeItem' &quot;12 Referenz zu Hauptleistung (RefItemNumber)&quot;;\n  };\n  service.ServiceItem as serviceItem then {\n    serviceItem.data as data -&gt;  chargeItem.code = create('CodeableConcept') as cc,  cc.coding = create('Coding') as coding,  coding.code = data then {\n      service.ServiceType as serviceType then {\n        serviceType.data as data -&gt; coding.system = translate(data, '#serviceMap', 'code') &quot;5 Katalog (ServiceType)&quot;;\n      } &quot;servicType&quot;;\n    } &quot;6 Tarifposition (ServiceItem)&quot;;\n  } &quot;6 Tarifposition&quot;;\n  service.ServiceDate as serviceData -&gt;  chargeItem.occurrence = create('dateTime') as occurrence,  occurrence.value = (serviceData.data) &quot;1 Leistungsdatum (ServiceDate)&quot;;\n  service.PersonV40 as personV40 -&gt; chargeItem.performer = create('BackboneElement') as performer then PersonV40ToPerformer(personV40, performer) &quot;15 PersonV40 (PersonV40)&quot;;\n  service.ProviderID as providerID -&gt;  chargeItem.performingOrganization = create('Reference') as reference,  reference.display = (providerID.data) &quot;9 Erbringende Organization (ProviderID)&quot;;\n  service.ReferrerID as referrerID -&gt;  chargeItem.costCenter = create('Reference') as reference,  reference.display = (referrerID.data) &quot;4 Auftraggebende Kostenstelle (ReferrerID)&quot;;\n  service.Quantity as quantity -&gt;  chargeItem.quantity = create('Quantity') as q,  q.value as value,  value.value = (quantity.data) &quot;13 Anzahl (Quantity) &quot;;\n  service.EnteredBy as enteredBy -&gt;  chargeItem.enterer = create('Reference') as reference,  reference.display = (enteredBy.data) &quot;10 Erfasser (EnteredBy)&quot;;\n  service.EnteredDateTime as enteredDateTime -&gt;  chargeItem.enteredDate = create('dateTime') as enteredDate,  enteredDate.value = (enteredDateTime.data) &quot;8 Erfassungsdatum (EnteredDateTime)&quot;;\n}\n\ngroup PersonV40ToPerformer(source personV40 : PersonV40, target performer : BackboneElement) {\n  personV40.PersonTyp as personTyp -&gt; performer.function = cc('http://fhir.ch/ig/ch-alis/CodeSystem/ch-alis-persontyp', personTyp) &quot;1 PersonTyp (PersonTyp)&quot;;\n  personV40.PersonID as personId -&gt;  performer.actor = create('Reference') as reference,  reference.display = (personId.data) &quot; PersonID (PersonID)&quot;;\n}\n\ngroup ParameterV40ToExtension(source parameterV40 : ParameterV40, target extension : Extension) {\n  parameterV40.ParamTyp as paramTyp -&gt; extension.extension as extInner then InnerExtensionParamTyp(paramTyp, extInner);\n  parameterV40.ParamValue as paramValue then {\n    paramValue.data as data -&gt; extension.extension as extInner then InnerExtensionParamValue(data, extInner);\n  };\n}\n\ngroup InnerExtensionParamTyp(source src, target ext : Extension) {\n  src -&gt; ext.url = 'ParamTyp' &quot;url&quot;;\n  src -&gt;  ext.value = create('CodeableConcept') as cc,  cc.text as text,  text.value = src &quot;string&quot;;\n}\n\ngroup InnerExtensionParamValue(source src, target ext : Extension) {\n  src -&gt; ext.url = 'ParamValue' &quot;url&quot;;\n  src -&gt;  ext.value = create('string') as string,  string.value = src &quot;string&quot;;\n}\n\ngroup ServiceToPatientName(source visit : Visit, target name : HumanName) {\n  visit.PatientName as patientName then {\n    patientName.data as data -&gt; name.family = data &quot;Name (PatientName) -&quot;;\n  } &quot;patientName&quot;;\n  visit.PatientGivenName as patientGivenName then {\n    patientGivenName.data as data -&gt; name.given = data &quot;Vorname (PatientGivenName) -&quot;;\n  } &quot;patientGivenName&quot;;\n}\n\ngroup ServiceToPatient(source service : Service, source visit : Visit, target patient : Patient) {\n  visit.PatientID as patientID then {\n    patientID.data as patId -&gt;  patient.identifier = create('Identifier') as identifier,  identifier.value as value,  value.value = patId,  identifier.type as type,  type.coding = cc('http://terminology.hl7.org/CodeSystem/v2-0203', 'MR') &quot;PID (PatientID)&quot;;\n  } &quot;patientID&quot;;\n  // &lt;!-- 2.2 Patient.PID (PatientID) --&gt;\n  visit where (visit.PatientName or visit.PatientGivenName) -&gt; patient.name as name then ServiceToPatientName(visit, name) &quot;ServiceToPatient&quot;;\n  visit.PatientGender as gender then {\n    gender.data as v -&gt; patient.gender = translate(v, '#gender', 'code') &quot;gender&quot;;\n  } &quot;Geschlecht (PatientGender)&quot;;\n  visit.PatientBirthDate as birthDate then {\n    birthDate.data as v -&gt; patient.birthDate = v &quot;birthDate&quot;;\n  } &quot;GebDatum (PatientBirthDate)&quot;;\n}\n\ngroup DiagGroupToCondition(source diagGroup : DiagGroup, target cond : Condition) {\n  diagGroup -&gt;  cond.subject = create('Reference') as ref,  ref.reference = '#pat' &quot;containedpatient&quot;;\n  diagGroup.DiagCode as data -&gt;  cond.code = create('CodeableConcept') as cc,  cc.coding = create('Coding') as coding,  coding.code = data then {\n    diagGroup.DiagCatType as diagCatType then {\n      diagCatType.data as data -&gt; coding.system = translate(data, '#serviceMap', 'code') &quot;3 Katalogtyp (DiagCatType)&quot;;\n    } &quot;serviceType&quot;;\n  } &quot;1 Diagnosecode (DiagCode)&quot;;\n}\n\ngroup TerminationToExtension(source visit : Visit, target ext : Extension) {\n  visit.TerminationVisit as visit then {\n    visit.data as data -&gt;  ext.extension as ext1,  ext1.url = 'TerminationVisit',  ext1.value = create('date') as date,  date.value = data &quot;7 Fall Abschluss (TerminationVisit)&quot;;\n  };\n  visit.TerminationReason as visit then {\n    visit.data as data -&gt;  ext.extension as ext1,  ext1.url = 'TerminationReason',  ext1.value = create('string') as string,  string.value = data &quot;8 Fall Abschlussgrund (TerminationReason)&quot;;\n  } &quot;TerminationVisit&quot;;\n}\n\ngroup VisitToEncounter(source visit : Visit, target encounter : Encounter) {\n  visit where (visit.TerminationVisit or visit.TerminationReason) -&gt;  encounter.extension as ext,  ext.url = 'http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-termination' then TerminationToExtension(visit, ext) &quot;TerminationToExtension&quot;;\n  visit.VisitNumber as visitNumber then {\n    // ISSUE9: what to do with falldomain? &lt;system value=&quot;http://www.example.ch/fallnummerdomain&quot;/&gt;\n    visitNumber.data as data -&gt;  encounter.identifier = create('Identifier') as identifier,  identifier.value as value,  value.value = data,  identifier.type as type,  type.coding = cc('http://terminology.hl7.org/CodeSystem/v2-0203', 'VN') &quot;1 Fall (VisitNumber)&quot;;\n  } &quot;encounterID&quot;;\n  visit -&gt; encounter.status = 'finished' &quot;Finished&quot;;\n  visit -&gt; encounter.class = cc('http://terminology.hl7.org/CodeSystem/v3-ActCode', 'IMP') &quot;inpatient encounter&quot;;\n  visit -&gt;  encounter.subject = create('Reference') as ref,  ref.reference = '#pat' &quot;subject&quot;;\n  visit.DiagGroup as diaggroup -&gt;  encounter.diagnosis as diag,  diag.condition = create('Reference') as ref,  ref.reference = '#cond' then {\n    diaggroup.DiagType as diagType -&gt;  diag.use as use,  use.text = (%diagType.data) &quot;2 Diagnosetyp (DiagType)&quot;;\n  } &quot;9 DiagnoseGruppe (DiagGroup)&quot;;\n}\n\n</pre>\n    </div>"
  ];
  fhir:DomainResource.contained [
     a fhir:ConceptMap;
     fhir:index 0;
     fhir:Resource.id [ fhir:value "serviceMap" ];
     fhir:ConceptMap.status [ fhir:value "draft" ];
     fhir:ConceptMap.group [
       fhir:index 0;
       fhir:ConceptMap.group.source [ fhir:value "http://fhir.ch/ig/ch-alis" ];
       fhir:ConceptMap.group.target [ fhir:value "http://hl7.org/fhir" ];
       fhir:ConceptMap.group.element [
         fhir:index 0;
         fhir:ConceptMap.group.element.code [ fhir:value "TARMED" ];
         fhir:ConceptMap.group.element.target [
           fhir:index 0;
           fhir:ConceptMap.group.element.target.code [ fhir:value "urn:oid:2.16.756.5.30.1.129.1.4" ];
           fhir:ConceptMap.group.element.target.equivalence [ fhir:value "equivalent" ]         ]       ], [
         fhir:index 1;
         fhir:ConceptMap.group.element.code [ fhir:value "ICD10" ];
         fhir:ConceptMap.group.element.target [
           fhir:index 0;
           fhir:ConceptMap.group.element.target.code [ fhir:value "urn:oid:2.16.756.5.30.1.126.3.2" ];
           fhir:ConceptMap.group.element.target.equivalence [ fhir:value "equivalent" ]         ]       ]     ]
  ], [
     a fhir:ConceptMap;
     fhir:index 1;
     fhir:Resource.id [ fhir:value "gender" ];
     fhir:ConceptMap.status [ fhir:value "draft" ];
     fhir:ConceptMap.group [
       fhir:index 0;
       fhir:ConceptMap.group.source [ fhir:value "http://fhir.ch/ig/ch-alis" ];
       fhir:ConceptMap.group.target [ fhir:value "http://hl7.org/fhir/ValueSet/administrative-gender" ];
       fhir:ConceptMap.group.element [
         fhir:index 0;
         fhir:ConceptMap.group.element.code [ fhir:value "M" ];
         fhir:ConceptMap.group.element.target [
           fhir:index 0;
           fhir:ConceptMap.group.element.target.code [ fhir:value "male" ];
           fhir:ConceptMap.group.element.target.equivalence [ fhir:value "equivalent" ]         ]       ], [
         fhir:index 1;
         fhir:ConceptMap.group.element.code [ fhir:value "F" ];
         fhir:ConceptMap.group.element.target [
           fhir:index 0;
           fhir:ConceptMap.group.element.target.code [ fhir:value "female" ];
           fhir:ConceptMap.group.element.target.equivalence [ fhir:value "equivalent" ]         ]       ]     ]
  ];
  fhir:DomainResource.extension [
     fhir:index 0;
     fhir:Extension.url [ fhir:value "http://fhir.ch/reference" ];
     fhir:Extension.valueReference [
       fhir:Reference.reference [ fhir:value "#serviceMap" ]     ]
  ], [
     fhir:index 1;
     fhir:Extension.url [ fhir:value "http://fhir.ch/reference" ];
     fhir:Extension.valueReference [
       fhir:Reference.reference [ fhir:value "#gender" ]     ]
  ];
  fhir:StructureMap.url [ fhir:value "http://fhir.ch/ig/ch-alis/StructureMap/Alis43ToBundle"];
  fhir:StructureMap.version [ fhir:value "0.2.0"];
  fhir:StructureMap.name [ fhir:value "Alis43ToBundle"];
  fhir:StructureMap.status [ fhir:value "draft"];
  fhir:StructureMap.date [ fhir:value "2021-02-06T16:28:56+01:00"^^xsd:dateTime];
  fhir:StructureMap.publisher [ fhir:value "ALIS-Connect"];
  fhir:StructureMap.contact [
     fhir:index 0;
     fhir:ContactDetail.name [ fhir:value "ALIS-Connect" ];
     fhir:ContactDetail.telecom [
       fhir:index 0;
       fhir:ContactPoint.system [ fhir:value "url" ];
       fhir:ContactPoint.value [ fhir:value "https://www.alis-connect.ch/" ]     ]
  ];
  fhir:StructureMap.description [ fhir:value "Convert ALIS43 XML to a Bundle according to the CH ALIS implmementation guide, 2020-12-03 by Oliver Egger, copyright ahdis ag, Apache License, FHIR: http://hl7.org/fhir/r4/. ISSUE7: what are the URL's oid's we have to define."];
  fhir:StructureMap.jurisdiction [
     fhir:index 0;
     fhir:CodeableConcept.coding [
       fhir:index 0;
       fhir:Coding.system [ fhir:value "urn:iso:std:iso:3166" ];
       fhir:Coding.code [ fhir:value "CH" ]     ]
  ];
  fhir:StructureMap.copyright [ fhir:value "CC-BY-SA-4.0"];
  fhir:StructureMap.structure [
     fhir:index 0;
     fhir:StructureMap.structure.url [
       fhir:value "http://fhir.ch/ig/ch-alis/StructureDefinition/Header";
       fhir:link <http://fhir.ch/ig/ch-alis/StructureDefinition/Header>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "Header" ]
  ], [
     fhir:index 1;
     fhir:StructureMap.structure.url [
       fhir:value "http://fhir.ch/ig/ch-alis/StructureDefinition/Visit";
       fhir:link <http://fhir.ch/ig/ch-alis/StructureDefinition/Visit>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "Visit" ]
  ], [
     fhir:index 2;
     fhir:StructureMap.structure.url [
       fhir:value "http://fhir.ch/ig/ch-alis/StructureDefinition/Service";
       fhir:link <http://fhir.ch/ig/ch-alis/StructureDefinition/Service>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "Service" ]
  ], [
     fhir:index 3;
     fhir:StructureMap.structure.url [
       fhir:value "http://fhir.ch/ig/ch-alis/StructureDefinition/PersonV40";
       fhir:link <http://fhir.ch/ig/ch-alis/StructureDefinition/PersonV40>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "PersonV40" ]
  ], [
     fhir:index 4;
     fhir:StructureMap.structure.url [
       fhir:value "http://fhir.ch/ig/ch-alis/StructureDefinition/ParameterV40";
       fhir:link <http://fhir.ch/ig/ch-alis/StructureDefinition/ParameterV40>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "ParameterV40" ]
  ], [
     fhir:index 5;
     fhir:StructureMap.structure.url [
       fhir:value "http://fhir.ch/ig/ch-alis/StructureDefinition/DiagGroup";
       fhir:link <http://fhir.ch/ig/ch-alis/StructureDefinition/DiagGroup>     ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ];
     fhir:StructureMap.structure.alias [ fhir:value "DiagGroup" ]
  ], [
     fhir:index 6;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Bundle";
       fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle>     ];
     fhir:StructureMap.structure.mode [ fhir:value "target" ];
     fhir:StructureMap.structure.alias [ fhir:value "Bundle" ]
  ], [
     fhir:index 7;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/ChargeItem";
       fhir:link <http://hl7.org/fhir/StructureDefinition/ChargeItem>     ];
     fhir:StructureMap.structure.mode [ fhir:value "target" ];
     fhir:StructureMap.structure.alias [ fhir:value "ChargeItem" ]
  ], [
     fhir:index 8;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Extension";
       fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>     ];
     fhir:StructureMap.structure.mode [ fhir:value "target" ];
     fhir:StructureMap.structure.alias [ fhir:value "Extension" ]
  ], [
     fhir:index 9;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/MessageHeader";
       fhir:link <http://hl7.org/fhir/StructureDefinition/MessageHeader>     ];
     fhir:StructureMap.structure.mode [ fhir:value "target" ];
     fhir:StructureMap.structure.alias [ fhir:value "MessageHeader" ]
  ], [
     fhir:index 10;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/BackboneElement";
       fhir:link <http://hl7.org/fhir/StructureDefinition/BackboneElement>     ];
     fhir:StructureMap.structure.mode [ fhir:value "target" ];
     fhir:StructureMap.structure.alias [ fhir:value "BackboneElement" ]
  ], [
     fhir:index 11;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/HumanName";
       fhir:link <http://hl7.org/fhir/StructureDefinition/HumanName>     ];
     fhir:StructureMap.structure.mode [ fhir:value "target" ];
     fhir:StructureMap.structure.alias [ fhir:value "HumanName" ]
  ], [
     fhir:index 12;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Condition";
       fhir:link <http://hl7.org/fhir/StructureDefinition/Condition>     ];
     fhir:StructureMap.structure.mode [ fhir:value "target" ];
     fhir:StructureMap.structure.alias [ fhir:value "Condition" ]
  ], [
     fhir:index 13;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Encounter";
       fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter>     ];
     fhir:StructureMap.structure.mode [ fhir:value "target" ];
     fhir:StructureMap.structure.alias [ fhir:value "Encounter" ]
  ];
  fhir:StructureMap.group [
     fhir:index 0;
     fhir:StructureMap.group.name [ fhir:value "Alis43ToBundle" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "header" ];
       fhir:StructureMap.group.input.type [ fhir:value "Header" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "bundle" ];
       fhir:StructureMap.group.input.type [ fhir:value "Bundle" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "bundle" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "header" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "e" ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "e" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "messageHeader" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "MessageHeader" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "messageHeader" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "uuid" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]       ], [
         fhir:index 3;
         fhir:StructureMap.group.rule.target.context [ fhir:value "e" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "fullUrl" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "append" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "uuid" ]         ]       ], [
         fhir:index 4;
         fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "e2" ]       ], [
         fhir:index 5;
         fhir:StructureMap.group.rule.target.context [ fhir:value "e2" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "transactionBundle" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Bundle" ]         ]       ], [
         fhir:index 6;
         fhir:StructureMap.group.rule.target.context [ fhir:value "transactionBundle" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "uuid2" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]       ], [
         fhir:index 7;
         fhir:StructureMap.group.rule.target.context [ fhir:value "e2" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "fullUrl" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "append" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "uuid2" ]         ]       ], [
         fhir:index 8;
         fhir:StructureMap.group.rule.target.context [ fhir:value "messageHeader" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "focus" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]         ]       ], [
         fhir:index 9;
         fhir:StructureMap.group.rule.target.context [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "type" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Bundle" ]         ]       ], [
         fhir:index 10;
         fhir:StructureMap.group.rule.target.context [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "append" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "uuid2" ]         ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "messageHeader" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "header" ]         ];
         fhir:StructureMap.group.rule.dependent [
           fhir:index 0;
           fhir:StructureMap.group.rule.dependent.name [ fhir:value "Alis43ToMessageHeader" ];
           fhir:StructureMap.group.rule.dependent.variable [
             fhir:value "header";
             fhir:index 0           ], [
             fhir:value "messageHeader";
             fhir:index 1           ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.name [ fhir:value "bundleTransaction" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "header" ]         ];
         fhir:StructureMap.group.rule.dependent [
           fhir:index 0;
           fhir:StructureMap.group.rule.dependent.name [ fhir:value "Alis43ToBundleTransaction" ];
           fhir:StructureMap.group.rule.dependent.variable [
             fhir:value "header";
             fhir:index 0           ], [
             fhir:value "transactionBundle";
             fhir:index 1           ]         ]       ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "type" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "header" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "type" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "message" ]         ]       ]     ], [
       fhir:index 2;
       fhir:StructureMap.group.rule.name [ fhir:value "FileCreationDate" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "header" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "FileCreationDate" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "fileCreationDate" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "date" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "fileCreationDate" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "date" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "timestamp" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "date" ]           ]         ]       ]     ]
  ], [
     fhir:index 1;
     fhir:StructureMap.group.name [ fhir:value "Alis43ToMessageHeader" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "header" ];
       fhir:StructureMap.group.input.type [ fhir:value "Header" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "messageHeader" ];
       fhir:StructureMap.group.input.type [ fhir:value "MessageHeader" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "eventUri" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "header" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "messageHeader" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "event" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "uri" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://fhir.ch/ig/ch-alis-43" ]         ]       ];
       fhir:StructureMap.group.rule.documentation [ fhir:value "ISSUE1: should be link to a MessageDefinition or a code?" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "source" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "header" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "messageHeader" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "source" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "source" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "version" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "header" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "SoftwareReleaseNumber" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "version" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "source" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "version" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%version.data" ]           ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.name [ fhir:value "endpoint" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "header" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "source" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "endpoint" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'urn:' + %header.SendingApplication.data + ':' + %header.SendingFacility.data + ':' + %header.SendingServiceCode.data" ]           ]         ];
         fhir:StructureMap.group.rule.documentation [ fhir:value "ISSUE3: \" : \"urn:SendingApplication:SendingFacility:SendingServiceCode\" -> add urn: in example/docu" ]       ];
       fhir:StructureMap.group.rule.documentation [ fhir:value "ISSUE2: MessageControlID cannot be id of entry, needs to be either fullUrl oder uuid, need to map this to an identifier" ]     ], [
       fhir:index 2;
       fhir:StructureMap.group.rule.name [ fhir:value "destination" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "header" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "messageHeader" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "destination" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "destination" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "endpoint" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "header" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "destination" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "endpoint" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'urn:' + %header.ReceivingApplication.data + ':' + %header.ReceivingFacility.data + ':' + %header.ReceivingServiceCode.data" ]           ]         ];
         fhir:StructureMap.group.rule.documentation [ fhir:value "ISSUE4: \" : \"urn:ReceivingApplication, ReceivingFacility, ReceivingServiceCode\" -> add urn: in example/docu" ]       ]     ]
  ], [
     fhir:index 2;
     fhir:StructureMap.group.name [ fhir:value "Alis43ToBundleTransaction" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "header" ];
       fhir:StructureMap.group.input.type [ fhir:value "Header" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "transactionBundle" ];
       fhir:StructureMap.group.input.type [ fhir:value "Bundle" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "transaction" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "header" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "transactionBundle" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "type" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "transaction" ]         ]       ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "Visit" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "header" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "Visit" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "visit" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "ServiceToChargeItem" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "Service" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "service" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "transactionBundle" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "e" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.context [ fhir:value "e" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "chargeItem" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "ChargeItem" ]           ]         ];
         fhir:StructureMap.group.rule.dependent [
           fhir:index 0;
           fhir:StructureMap.group.rule.dependent.name [ fhir:value "ServiceToChargeItem" ];
           fhir:StructureMap.group.rule.dependent.variable [
             fhir:value "service";
             fhir:index 0           ], [
             fhir:value "visit";
             fhir:index 1           ], [
             fhir:value "chargeItem";
             fhir:index 2           ], [
             fhir:value "e";
             fhir:index 3           ]         ]       ]     ]
  ], [
     fhir:index 3;
     fhir:StructureMap.group.name [ fhir:value "ServiceToChargeItem" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "service" ];
       fhir:StructureMap.group.input.type [ fhir:value "Service" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "visit" ];
       fhir:StructureMap.group.input.type [ fhir:value "Visit" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 2;
       fhir:StructureMap.group.input.name [ fhir:value "chargeItem" ];
       fhir:StructureMap.group.input.type [ fhir:value "ChargeItem" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ], [
       fhir:index 3;
       fhir:StructureMap.group.input.name [ fhir:value "entry" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "3.11 Laufnummer (ItemNumber)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "ItemNumber" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "itemNumber" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "uuid" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "itemNumber.data.lower()" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "entry" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "fullUrl" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "append" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "uuid" ]         ]       ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "patient" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "contained" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "patient" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "patient" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "containedid" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "pat" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]         ]       ], [
         fhir:index 3;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'#' + %containedid" ]         ]       ];
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "ServiceToPatient" ];
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "service";
           fhir:index 0         ], [
           fhir:value "visit";
           fhir:index 1         ], [
           fhir:value "patient";
           fhir:index 2         ]       ]     ], [
       fhir:index 2;
       fhir:StructureMap.group.rule.name [ fhir:value "VisitToEncounter" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "contained" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "encounter" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Encounter" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "encounter" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "containedid" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "enc" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "context" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]         ]       ], [
         fhir:index 3;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'#' + %containedid" ]         ]       ];
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "VisitToEncounter" ];
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "visit";
           fhir:index 0         ], [
           fhir:value "encounter";
           fhir:index 1         ]       ]     ], [
       fhir:index 3;
       fhir:StructureMap.group.rule.name [ fhir:value "DiagGroupToCondition" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "DiagGroup" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "diaggroup" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "contained" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "cond" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Condition" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "cond" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "containedid" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "cond" ]         ]       ];
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "DiagGroupToCondition" ];
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "diaggroup";
           fhir:index 0         ], [
           fhir:value "cond";
           fhir:index 1         ]       ]     ], [
       fhir:index 4;
       fhir:StructureMap.group.rule.name [ fhir:value "POSTDEFAULT" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.condition [ fhir:value "(service.Transaction.exists() = false)" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "entry" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "request" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "request" ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "request" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "method" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "POST" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "request" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "url" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "ChargeItem" ]         ]       ]     ], [
       fhir:index 5;
       fhir:StructureMap.group.rule.name [ fhir:value "POST" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "Transaction" ];
         fhir:StructureMap.group.rule.source.condition [ fhir:value "(service.Transaction = 'insert')" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "entry" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "request" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "request" ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "request" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "method" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "POST" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "request" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "url" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "ChargeItem" ]         ]       ]     ], [
       fhir:index 6;
       fhir:StructureMap.group.rule.name [ fhir:value "UPDATE" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "Transaction" ];
         fhir:StructureMap.group.rule.source.condition [ fhir:value "(service.Transaction = 'update')" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "entry" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "request" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "request" ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "request" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "method" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "PUT" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "request" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "url" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "ChargeItem" ]         ]       ]     ], [
       fhir:index 7;
       fhir:StructureMap.group.rule.name [ fhir:value "DELETE" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "Transaction" ];
         fhir:StructureMap.group.rule.source.condition [ fhir:value "(service.Transaction = 'delete')" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "entry" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "request" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "request" ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "request" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "method" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "DELETE" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "request" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "url" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "ChargeItem" ]         ]       ]     ], [
       fhir:index 8;
       fhir:StructureMap.group.rule.name [ fhir:value "3.2 Sitzung (SessionID)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "SessionID" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "sessionID" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "extension" ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "url" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-sessionid" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "string" ]         ]       ], [
         fhir:index 3;
         fhir:StructureMap.group.rule.target.context [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "sessionID.data" ]         ]       ]     ], [
       fhir:index 9;
       fhir:StructureMap.group.rule.name [ fhir:value "3.3 Auftragsnummer (OrderID)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "OrderID" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "orderID" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "extension" ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "url" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-orderid" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "string" ]         ]       ], [
         fhir:index 3;
         fhir:StructureMap.group.rule.target.context [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "orderID.data" ]         ]       ]     ], [
       fhir:index 10;
       fhir:StructureMap.group.rule.name [ fhir:value "3.7 Formularbezeichnung (Form)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "Form" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "form" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "extension" ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "url" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-form" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "string" ]         ]       ], [
         fhir:index 3;
         fhir:StructureMap.group.rule.target.context [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "form.data" ]         ]       ]     ], [
       fhir:index 11;
       fhir:StructureMap.group.rule.name [ fhir:value "4 ParamterV40 (ParameterV40)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "ParameterV40" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "parameterV40" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "extension" ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "url" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-parameterv40" ]         ]       ];
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "ParameterV40ToExtension" ];
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "parameterV40";
           fhir:index 0         ], [
           fhir:value "extension";
           fhir:index 1         ]       ]     ], [
       fhir:index 12;
       fhir:StructureMap.group.rule.name [ fhir:value "billable" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "status" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "billable" ]         ]       ]     ], [
       fhir:index 13;
       fhir:StructureMap.group.rule.name [ fhir:value "RefItemNumber" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "RefItemNumber" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "refItemNumber" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "3.12 Referenz zu Hauptleistung (RefItemNumber)" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "refItemNumber" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "data" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "data" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "partOf" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]           ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'urn:uuid:' + %data.lower()" ]           ]         ], [
           fhir:index 2;
           fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "type" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "ChargeItem" ]           ]         ]       ]     ], [
       fhir:index 14;
       fhir:StructureMap.group.rule.name [ fhir:value "3.6 Tarifposition" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "ServiceItem" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "serviceItem" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "3.6 Tarifposition (ServiceItem)" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "serviceItem" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "data" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "data" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "code" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ]           ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Coding" ]           ]         ], [
           fhir:index 2;
           fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "code" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "data" ]           ]         ];
         fhir:StructureMap.group.rule.rule [
           fhir:index 0;
           fhir:StructureMap.group.rule.name [ fhir:value "servicType" ];
           fhir:StructureMap.group.rule.source [
             fhir:index 0;
             fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
             fhir:StructureMap.group.rule.source.element [ fhir:value "ServiceType" ];
             fhir:StructureMap.group.rule.source.variable [ fhir:value "serviceType" ]           ];
           fhir:StructureMap.group.rule.rule [
             fhir:index 0;
             fhir:StructureMap.group.rule.name [ fhir:value "3.5 Katalog (ServiceType)" ];
             fhir:StructureMap.group.rule.source [
               fhir:index 0;
               fhir:StructureMap.group.rule.source.context [ fhir:value "serviceType" ];
               fhir:StructureMap.group.rule.source.element [ fhir:value "data" ];
               fhir:StructureMap.group.rule.source.variable [ fhir:value "data" ]             ];
             fhir:StructureMap.group.rule.target [
               fhir:index 0;
               fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ];
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
               fhir:StructureMap.group.rule.target.element [ fhir:value "system" ];
               fhir:StructureMap.group.rule.target.transform [ fhir:value "translate" ];
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "data" ]               ], [
                 fhir:index 1;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "#serviceMap" ]               ], [
                 fhir:index 2;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "code" ]               ]             ]           ]         ]       ]     ], [
       fhir:index 15;
       fhir:StructureMap.group.rule.name [ fhir:value "3.1 Leistungsdatum (ServiceDate)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "ServiceDate" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "serviceData" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "occurrence" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "occurrence" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "dateTime" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "occurrence" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "serviceData.data" ]         ]       ]     ], [
       fhir:index 16;
       fhir:StructureMap.group.rule.name [ fhir:value "3.15 PersonV40 (PersonV40)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "PersonV40" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "personV40" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "performer" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "performer" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "BackboneElement" ]         ]       ];
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "PersonV40ToPerformer" ];
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "personV40";
           fhir:index 0         ], [
           fhir:value "performer";
           fhir:index 1         ]       ]     ], [
       fhir:index 17;
       fhir:StructureMap.group.rule.name [ fhir:value "3.9 Erbringende Organization (ProviderID)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "ProviderID" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "providerID" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "performingOrganization" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "display" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "providerID.data" ]         ]       ]     ], [
       fhir:index 18;
       fhir:StructureMap.group.rule.name [ fhir:value "3.4 Auftraggebende Kostenstelle (ReferrerID)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "ReferrerID" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "referrerID" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "costCenter" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "display" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "referrerID.data" ]         ]       ]     ], [
       fhir:index 19;
       fhir:StructureMap.group.rule.name [ fhir:value "3.13 Anzahl (Quantity) " ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "Quantity" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "quantity" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "quantity" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "q" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Quantity" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "q" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "value" ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "quantity.data" ]         ]       ]     ], [
       fhir:index 20;
       fhir:StructureMap.group.rule.name [ fhir:value "3.10 Erfasser (EnteredBy)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "EnteredBy" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "enteredBy" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "enterer" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "display" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "enteredBy.data" ]         ]       ]     ], [
       fhir:index 21;
       fhir:StructureMap.group.rule.name [ fhir:value "3.8 Erfassungsdatum (EnteredDateTime)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "service" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "EnteredDateTime" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "enteredDateTime" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "chargeItem" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "enteredDate" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "enteredDate" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "dateTime" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "enteredDate" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "enteredDateTime.data" ]         ]       ]     ]
  ], [
     fhir:index 4;
     fhir:StructureMap.group.name [ fhir:value "PersonV40ToPerformer" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "personV40" ];
       fhir:StructureMap.group.input.type [ fhir:value "PersonV40" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "performer" ];
       fhir:StructureMap.group.input.type [ fhir:value "BackboneElement" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "3.15.1 PersonTyp (PersonTyp)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "personV40" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "PersonTyp" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "personTyp" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "performer" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "function" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "cc" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://fhir.ch/ig/ch-alis/CodeSystem/ch-alis-persontyp" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "personTyp" ]         ]       ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "3.15.2. PersonID (PersonID)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "personV40" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "PersonID" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "personId" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "performer" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "actor" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "display" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "personId.data" ]         ]       ]     ]
  ], [
     fhir:index 5;
     fhir:StructureMap.group.name [ fhir:value "ParameterV40ToExtension" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "parameterV40" ];
       fhir:StructureMap.group.input.type [ fhir:value "ParameterV40" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "extension" ];
       fhir:StructureMap.group.input.type [ fhir:value "Extension" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "ParamTyp" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "parameterV40" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "ParamTyp" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "paramTyp" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "extInner" ]       ];
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "InnerExtensionParamTyp" ];
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "paramTyp";
           fhir:index 0         ], [
           fhir:value "extInner";
           fhir:index 1         ]       ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "ParamValue" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "parameterV40" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "ParamValue" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "paramValue" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "data" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "paramValue" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "data" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "data" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "extension" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "extInner" ]         ];
         fhir:StructureMap.group.rule.dependent [
           fhir:index 0;
           fhir:StructureMap.group.rule.dependent.name [ fhir:value "InnerExtensionParamValue" ];
           fhir:StructureMap.group.rule.dependent.variable [
             fhir:value "data";
             fhir:index 0           ], [
             fhir:value "extInner";
             fhir:index 1           ]         ]       ]     ]
  ], [
     fhir:index 6;
     fhir:StructureMap.group.name [ fhir:value "InnerExtensionParamTyp" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "src" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "ext" ];
       fhir:StructureMap.group.input.type [ fhir:value "Extension" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "url" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "src" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ext" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "url" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "ParamTyp" ]         ]       ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "string" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "src" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ext" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "text" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "text" ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "text" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "src" ]         ]       ]     ]
  ], [
     fhir:index 7;
     fhir:StructureMap.group.name [ fhir:value "InnerExtensionParamValue" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "src" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "ext" ];
       fhir:StructureMap.group.input.type [ fhir:value "Extension" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "url" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "src" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ext" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "url" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "ParamValue" ]         ]       ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "string" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "src" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ext" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "string" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "string" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "string" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "src" ]         ]       ]     ]
  ], [
     fhir:index 8;
     fhir:StructureMap.group.name [ fhir:value "ServiceToPatientName" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "visit" ];
       fhir:StructureMap.group.input.type [ fhir:value "Visit" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "name" ];
       fhir:StructureMap.group.input.type [ fhir:value "HumanName" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "patientName" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "PatientName" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "patientName" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "2.3 Patient.Name (PatientName) -" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "patientName" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "data" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "data" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "name" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "family" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "data" ]           ]         ]       ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "patientGivenName" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "PatientGivenName" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "patientGivenName" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "2.4 Patient.Vorname (PatientGivenName) -" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "patientGivenName" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "data" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "data" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "name" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "given" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "data" ]           ]         ]       ]     ]
  ], [
     fhir:index 9;
     fhir:StructureMap.group.name [ fhir:value "ServiceToPatient" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "service" ];
       fhir:StructureMap.group.input.type [ fhir:value "Service" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "visit" ];
       fhir:StructureMap.group.input.type [ fhir:value "Visit" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 2;
       fhir:StructureMap.group.input.name [ fhir:value "patient" ];
       fhir:StructureMap.group.input.type [ fhir:value "Patient" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "patientID" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "PatientID" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "patientID" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "2.2 Patient.PID (PatientID)" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "patientID" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "data" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "patId" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "patient" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Identifier" ]           ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "value" ]         ], [
           fhir:index 2;
           fhir:StructureMap.group.rule.target.context [ fhir:value "value" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "patId" ]           ]         ], [
           fhir:index 3;
           fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "type" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "type" ]         ], [
           fhir:index 4;
           fhir:StructureMap.group.rule.target.context [ fhir:value "type" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "cc" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/v2-0203" ]           ], [
             fhir:index 1;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "MR" ]           ]         ]       ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "ServiceToPatient" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
         fhir:StructureMap.group.rule.source.condition [ fhir:value "(visit.PatientName or visit.PatientGivenName)" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "patient" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "name" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "name" ]       ];
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "ServiceToPatientName" ];
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "visit";
           fhir:index 0         ], [
           fhir:value "name";
           fhir:index 1         ]       ];
       fhir:StructureMap.group.rule.documentation [ fhir:value "<!-- 2.2 Patient.PID (PatientID) -->" ]     ], [
       fhir:index 2;
       fhir:StructureMap.group.rule.name [ fhir:value "2.6 Patient.Geschlecht (PatientGender)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "PatientGender" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "gender" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "gender" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "gender" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "data" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "v" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "patient" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "gender" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "translate" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "v" ]           ], [
             fhir:index 1;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "#gender" ]           ], [
             fhir:index 2;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "code" ]           ]         ]       ]     ], [
       fhir:index 3;
       fhir:StructureMap.group.rule.name [ fhir:value "2.5 Patient.GebDatum (PatientBirthDate)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "PatientBirthDate" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "birthDate" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "birthDate" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "birthDate" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "data" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "v" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "patient" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "birthDate" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "v" ]           ]         ]       ]     ]
  ], [
     fhir:index 10;
     fhir:StructureMap.group.name [ fhir:value "DiagGroupToCondition" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "diagGroup" ];
       fhir:StructureMap.group.input.type [ fhir:value "DiagGroup" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "cond" ];
       fhir:StructureMap.group.input.type [ fhir:value "Condition" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "containedpatient" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "diagGroup" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "cond" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "#pat" ]         ]       ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "2.9.1 Diagnosecode (DiagCode)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "diagGroup" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "DiagCode" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "data" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "cond" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "code" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Coding" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "code" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "data" ]         ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "serviceType" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "diagGroup" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "DiagCatType" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "diagCatType" ]         ];
         fhir:StructureMap.group.rule.rule [
           fhir:index 0;
           fhir:StructureMap.group.rule.name [ fhir:value "2.9.3 Katalogtyp (DiagCatType)" ];
           fhir:StructureMap.group.rule.source [
             fhir:index 0;
             fhir:StructureMap.group.rule.source.context [ fhir:value "diagCatType" ];
             fhir:StructureMap.group.rule.source.element [ fhir:value "data" ];
             fhir:StructureMap.group.rule.source.variable [ fhir:value "data" ]           ];
           fhir:StructureMap.group.rule.target [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ];
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
             fhir:StructureMap.group.rule.target.element [ fhir:value "system" ];
             fhir:StructureMap.group.rule.target.transform [ fhir:value "translate" ];
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "data" ]             ], [
               fhir:index 1;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "#serviceMap" ]             ], [
               fhir:index 2;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "code" ]             ]           ]         ]       ]     ]
  ], [
     fhir:index 11;
     fhir:StructureMap.group.name [ fhir:value "TerminationToExtension" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "visit" ];
       fhir:StructureMap.group.input.type [ fhir:value "Visit" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "ext" ];
       fhir:StructureMap.group.input.type [ fhir:value "Extension" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "TerminationVisit" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "TerminationVisit" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "visit" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "2.7 Fall Abschluss (TerminationVisit)" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "data" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "data" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "ext" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "ext1" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.context [ fhir:value "ext1" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "url" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "TerminationVisit" ]           ]         ], [
           fhir:index 2;
           fhir:StructureMap.group.rule.target.context [ fhir:value "ext1" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "date" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "date" ]           ]         ], [
           fhir:index 3;
           fhir:StructureMap.group.rule.target.context [ fhir:value "date" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "data" ]           ]         ]       ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "TerminationVisit" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "TerminationReason" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "visit" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "2.8 Fall Abschlussgrund (TerminationReason)" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "data" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "data" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "ext" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "ext1" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.context [ fhir:value "ext1" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "url" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "TerminationReason" ]           ]         ], [
           fhir:index 2;
           fhir:StructureMap.group.rule.target.context [ fhir:value "ext1" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "string" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "string" ]           ]         ], [
           fhir:index 3;
           fhir:StructureMap.group.rule.target.context [ fhir:value "string" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "data" ]           ]         ]       ]     ]
  ], [
     fhir:index 12;
     fhir:StructureMap.group.name [ fhir:value "VisitToEncounter" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "visit" ];
       fhir:StructureMap.group.input.type [ fhir:value "Visit" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "encounter" ];
       fhir:StructureMap.group.input.type [ fhir:value "Encounter" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "TerminationToExtension" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
         fhir:StructureMap.group.rule.source.condition [ fhir:value "(visit.TerminationVisit or visit.TerminationReason)" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "encounter" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "ext" ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ext" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "url" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://fhir.ch/ig/ch-alis/StructureDefinition/ch-alis-ext-termination" ]         ]       ];
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "TerminationToExtension" ];
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "visit";
           fhir:index 0         ], [
           fhir:value "ext";
           fhir:index 1         ]       ]     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "encounterID" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "VisitNumber" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "visitNumber" ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "2.1 Fall (VisitNumber)" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "visitNumber" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "data" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "data" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "encounter" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Identifier" ]           ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "value" ]         ], [
           fhir:index 2;
           fhir:StructureMap.group.rule.target.context [ fhir:value "value" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "value" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "data" ]           ]         ], [
           fhir:index 3;
           fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "type" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "type" ]         ], [
           fhir:index 4;
           fhir:StructureMap.group.rule.target.context [ fhir:value "type" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "cc" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/v2-0203" ]           ], [
             fhir:index 1;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "VN" ]           ]         ];
         fhir:StructureMap.group.rule.documentation [ fhir:value "ISSUE9: what to do with falldomain? <system value=\"http://www.example.ch/fallnummerdomain\"/>" ]       ]     ], [
       fhir:index 2;
       fhir:StructureMap.group.rule.name [ fhir:value "Finished" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "encounter" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "status" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "finished" ]         ]       ]     ], [
       fhir:index 3;
       fhir:StructureMap.group.rule.name [ fhir:value "inpatient encounter" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "encounter" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "class" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "cc" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/v3-ActCode" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "IMP" ]         ]       ]     ], [
       fhir:index 4;
       fhir:StructureMap.group.rule.name [ fhir:value "subject" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "encounter" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]         ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "#pat" ]         ]       ]     ], [
       fhir:index 5;
       fhir:StructureMap.group.rule.name [ fhir:value "2.9 DiagnoseGruppe (DiagGroup)" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "visit" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "DiagGroup" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "diaggroup" ]       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "encounter" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "diagnosis" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "diag" ]       ], [
         fhir:index 1;
         fhir:StructureMap.group.rule.target.context [ fhir:value "diag" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "condition" ];
         fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]         ]       ], [
         fhir:index 2;
         fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "#cond" ]         ]       ];
       fhir:StructureMap.group.rule.rule [
         fhir:index 0;
         fhir:StructureMap.group.rule.name [ fhir:value "2.9.2 Diagnosetyp (DiagType)" ];
         fhir:StructureMap.group.rule.source [
           fhir:index 0;
           fhir:StructureMap.group.rule.source.context [ fhir:value "diaggroup" ];
           fhir:StructureMap.group.rule.source.element [ fhir:value "DiagType" ];
           fhir:StructureMap.group.rule.source.variable [ fhir:value "diagType" ]         ];
         fhir:StructureMap.group.rule.target [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.context [ fhir:value "diag" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "use" ];
           fhir:StructureMap.group.rule.target.variable [ fhir:value "use" ]         ], [
           fhir:index 1;
           fhir:StructureMap.group.rule.target.context [ fhir:value "use" ];
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
           fhir:StructureMap.group.rule.target.element [ fhir:value "text" ];
           fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%diagType.data" ]           ]         ]       ]     ]
  ].

# - ontology header ------------------------------------------------------------

 a owl:Ontology;
  owl:imports fhir:fhir.ttl.