CdaToBundle
type: StructureMap
node role: treeRoot
id:
  v: CdaToBundle
text:
  status:
    v: generated
  div:
    v: Narratif généré : StructureMap CdaToBundle #xD; map "https://interop.esante.gouv.fr/ig/fhir/mappingcdafhir/StructureMap/CdaToBundle" = "CdaToBundle"#xD; #xD; // Mapping de CDA vers FHIR Bundle (A partir des sources de Oliver Egger)#xD; #xD; uses "http://hl7.org/cda/stds/core/StructureDefinition/ClinicalDocument" alias ClinicalDocument as source#xD; uses "http://hl7.org/cda/stds/core/StructureDefinition/AssignedAuthor" alias AssignedAuthor as source#xD; uses "http://hl7.org/cda/stds/core/StructureDefinition/AssignedEntity" alias AssignedEntity as source#xD; uses "http://hl7.org/cda/stds/core/StructureDefinition/CustodianOrganization" alias CustodianOrganization as source#xD; uses "http://hl7.org/cda/stds/core/StructureDefinition/Section" alias Section as source#xD; uses "http://hl7.org/cda/stds/core/StructureDefinition/PatientRole" alias PatientRole as source#xD; uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target#xD; uses "http://hl7.org/fhir/StructureDefinition/Composition" alias Composition as target#xD; uses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as target#xD; uses "http://hl7.org/fhir/StructureDefinition/Person" alias Person as target#xD; uses "http://hl7.org/fhir/StructureDefinition/Practitioner" alias Practitioner as target#xD; uses "http://hl7.org/fhir/StructureDefinition/Organization" alias Organization as target#xD; #xD; imports "https://interop.esante.gouv.fr/ig/fhir/mappingcdafhir/StructureMap/CdaToFHIRTypes"#xD; #xD; // _________________________ Document Level Template _________________________#xD; group CdaToBundle(source cda : ClinicalDocument, target bundle : Bundle) {#xD; cda -> bundle.entry as e, e.resource = create('Composition') as composition, composition.id = uuid() as uuid, e.fullUrl = append('urn:uuid:', uuid), bundle.entry as e2, e2.resource = create('Patient') as patient, patient.id = uuid() as uuid2, e2.fullUrl = append('urn:uuid:', uuid2) then {#xD; cda then ClinicalDocumentToBundle(cda, pa…
url:
  v: https://interop.esante.gouv.fr/ig/fhir/mappingcdafhir/StructureMap/CdaToBundle
  l: CdaToBundle
version:
  v: 0.1.0
name:
  v: CdaToBundle
title:
  v: Mapping de CDA vers FHIR Bundle (A partir des sources de Oliver Egger)
status:
  v: draft
date:
  v: 2025-11-07T10:30:30+00:00
publisher:
  v: Agence du Numérique en Santé (ANS) - 2-10 Rue d'Oradour-sur-Glane, 75015 Paris
contact:
  name:
    v: Agence du Numérique en Santé (ANS) - 2-10 Rue d'Oradour-sur-Glane, 75015 Paris
  telecom:
    system:
      v: url
    value:
      v: https://esante.gouv.fr
description:
  v: Mapping de CDA vers FHIR Bundle (A partir des sources de Oliver Egger)
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
      l: 3166
    code:
      v: FR
    display:
      v: FRANCE
structure:
  url:
    v: http://hl7.org/cda/stds/core/StructureDefinition/ClinicalDocument
    l: ClinicalDocument
  mode:
    v: source
  alias:
    v: ClinicalDocument
structure:
  url:
    v: http://hl7.org/cda/stds/core/StructureDefinition/AssignedAuthor
    l: AssignedAuthor
  mode:
    v: source
  alias:
    v: AssignedAuthor
structure:
  url:
    v: http://hl7.org/cda/stds/core/StructureDefinition/AssignedEntity
    l: AssignedEntity
  mode:
    v: source
  alias:
    v: AssignedEntity
structure:
  url:
    v: http://hl7.org/cda/stds/core/StructureDefinition/CustodianOrganization
    l: CustodianOrganization
  mode:
    v: source
  alias:
    v: CustodianOrganization
structure:
  url:
    v: http://hl7.org/cda/stds/core/StructureDefinition/Section
    l: Section
  mode:
    v: source
  alias:
    v: Section
structure:
  url:
    v: http://hl7.org/cda/stds/core/StructureDefinition/PatientRole
    l: PatientRole
  mode:
    v: source
  alias:
    v: PatientRole
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Bundle
    l: Bundle
  mode:
    v: target
  alias:
    v: Bundle
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Composition
    l: Composition
  mode:
    v: target
  alias:
    v: Composition
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Patient
    l: Patient
  mode:
    v: target
  alias:
    v: Patient
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Person
    l: Person
  mode:
    v: target
  alias:
    v: Person
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner
    l: Practitioner
  mode:
    v: target
  alias:
    v: Practitioner
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Organization
    l: Organization
  mode:
    v: target
  alias:
    v: Organization
import:
  v: https://interop.esante.gouv.fr/ig/fhir/mappingcdafhir/StructureMap/CdaToFHIRTypes
  l: CdaToFHIRTypes
group:
  name:
    v: CdaToBundle
  type mode:
    v: none
  documentation:
    v: _________________________ Document Level Template _________________________
  input:
    name:
      v: cda
    type:
      v: ClinicalDocument
    mode:
      v: source
  input:
    name:
      v: bundle
    type:
      v: Bundle
    mode:
      v: target
  rule:
    name:
      v: ClinicalDocumentToBody
    source:
      context:
        v: cda
    target:
      context:
        v: bundle
      context type:
        v: variable
      element:
        v: entry
      variable:
        v: e
    target:
      context:
        v: e
      context type:
        v: variable
      element:
        v: resource
      variable:
        v: composition
      transform:
        v: create
      parameter:
        value: String
    target:
      context:
        v: composition
      context type:
        v: variable
      element:
        v: id
      variable:
        v: uuid
      transform:
        v: uuid

String
v: Composition

context:
  v: e
context type:
  v: variable
element:
  v: fullUrl
transform:
  v: append
parameter:
  value: String
    v: urn:uuid:
parameter:
  value: Id
    v: uuid

context:
  v: bundle
context type:
  v: variable
element:
  v: entry
variable:
  v: e2

context:
  v: e2
context type:
  v: variable
element:
  v: resource
variable:
  v: patient
transform:
  v: create
parameter:
  value: String
    v: Patient

context:
  v: patient
context type:
  v: variable
element:
  v: id
variable:
  v: uuid2
transform:
  v: uuid

context:
  v: e2
context type:
  v: variable
element:
  v: fullUrl
transform:
  v: append
parameter:
  value: String
    v: urn:uuid:
parameter:
  value: Id
    v: uuid2

name:
  v: cdatobundle
source:
  context:
    v: cda
dependent:
  name:
    v: ClinicalDocumentToBundle
  variable:
    v: cda
  variable:
    v: patient
  variable:
    v: composition
  variable:
    v: bundle

name:
  v: ClinicalDocumentToBundle
type mode:
  v: none
input:
  name:
    v: cda
  type:
    v: ClinicalDocument
  mode:
    v: source
input:
  name:
    v: patient
  type:
    v: Patient
  mode:
    v: target
input:
  name:
    v: composition
  type:
    v: Composition
  mode:
    v: target
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: id
  source:
    context:
      v: cda
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: id
    transform:
      v: uuid
rule:
  name:
    v: identifier
  source:
    context:
      v: cda
    element:
      v: id
    variable:
      v: cdaId
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: identifier
  rule:
    name:
      v: system
    source:
      context:
        v: cdaId
      element:
        v: root
      variable:
        v: root
      condition:
        v: cdaId.extension.exists()
    target:
      context:
        v: identifier
      context type:
        v: variable
      element:
        v: system
      transform:
        v: translate
      parameter:
        value: Id
      parameter:
        value: String
      parameter:
        value: String
  rule:
    name:
      v: value
    source:
      context:
        v: cdaId
      element:
        v: extension
      variable:
        v: extension
    target:
      context:
        v: identifier
      context type:
        v: variable
      element:
        v: value
      transform:
        v: copy
      parameter:
        value: Id
  rule:
    name:
      v: systemOid
    source:
      context:
        v: cdaId
      element:
        v: root
      variable:
        v: root
      condition:
        v: cdaId.extension.empty()
    target:
      context:
        v: identifier
      context type:
        v: variable
      element:
        v: system
      transform:
        v: copy
      parameter:
        value: String
  rule:
    name:
      v: valueOid
    source:
      context:
        v: cdaId
      element:
        v: root
      variable:
        v: root
      condition:
        v: cdaId.extension.empty()
    target:
      context:
        v: identifier
      context type:
        v: variable
      element:
        v: value
      transform:
        v: append
      parameter:
        value: String
      parameter:
        value: Id
rule:
  name:
    v: type
  source:
    context:
      v: cda
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: type
    transform:
      v: copy
    parameter:
      value: String
        v: document
rule:
  name:
    v: timestamp
  source:
    context:
      v: cda
    element:
      v: effectiveTime
    variable:
      v: effectiveTime
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: timestamp
    variable:
      v: timestamp
    transform:
      v: create
    parameter:
      value: String
        v: instant

Id
v: root

String
v: #oid2uri

String
v: uri

Id
v: extension

String
v: urn:ietf:rfc:3986

String
v: urn:oid:

Id
v: root

name:
  v: TSInstant
variable:
  v: effectiveTime
variable:
  v: timestamp

name:
  v: composition
source:
  context:
    v: cda
dependent:
  name:
    v: ClinicalDocumentComposition
  variable:
    v: cda
  variable:
    v: composition
  variable:
    v: patient
  variable:
    v: bundle

name:
  v: cdaComponent
source:
  context:
    v: cda
  element:
    v: component
  variable:
    v: cdaComponent
rule:
  name:
    v: body
  source:
    context:
      v: cdaComponent
    element:
      v: structuredBody
    variable:
      v: body
  rule:
    name:
      v: bodyComponent
    source:
      context:
        v: body
      element:
        v: component
      variable:
        v: bodyComponent
    rule:
      name:
        v: section

v: bodyComponent

v: section

v: srcSection

v: $this.code.empty()

v: composition

v: variable

v: section

v: tgtSection

v: ClinicalDocumentSection

v: cda

v: srcSection

v: patient

v: tgtSection

v: bundle

name:
  v: ClinicalDocumentSection
type mode:
  v: none
documentation:
  v: // _________________________ Section Level Templates _________________________
input:
  name:
    v: cda
  type:
    v: ClinicalDocument
  mode:
    v: source
input:
  name:
    v: src
  type:
    v: Section
  mode:
    v: source
input:
  name:
    v: patient
  type:
    v: Patient
  mode:
    v: source
input:
  name:
    v: tgt
  mode:
    v: target
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: title
  source:
    context:
      v: src
    element:
      v: title
    variable:
      v: t
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: title
    transform:
      v: evaluate
    parameter:
      value: String
        v: t.xmlText
rule:
  name:
    v: code
  source:
    context:
      v: src
    element:
      v: code
    variable:
      v: srcCode
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: Id
        v: srcCode
rule:
  name:
    v: cdaText
  source:
    context:
      v: src
    element:
      v: text
    variable:
      v: cdaText
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: text
    variable:
      v: fhirText
  rule:
    name:
      v: narrativeStatus
    source:
      context:
        v: cdaText
    target:
      context:
        v: fhirText
      context type:
        v: variable
      element:
        v: status
      transform:
        v: copy
      parameter:
        value: String
  rule:
    name:
      v: narrativeText
    source:
      context:
        v: cdaText
      variable:
        v: t
    target:
      context:
        v: fhirText
      context type:
        v: variable
      element:
        v: div
      transform:
        v: copy
      parameter:
        value: Id
rule:
  name:
    v: section
  source:
    context:
      v: src
    element:
      v: section
    variable:
      v: srcSection
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: section
    variable:
      v: tgtSection
  dependent:
    name:
      v: ClinicalDocumentSection
    variable:
      v: cda
    variable:
      v: srcSection
    variable:
      v: patient
    variable:
      v: tgtSection
    variable:
      v: bundle

String
v: generated

Id
v: t

name:
  v: ClinicalDocumentComposition
type mode:
  v: none
documentation:
  v: _________________________ Entry Level Templates ________________________ _________________________ Header Level Templates _________________________
input:
  name:
    v: src
  type:
    v: ClinicalDocument
  mode:
    v: source
input:
  name:
    v: tgt
  type:
    v: Composition
  mode:
    v: target
input:
  name:
    v: patientResource
  type:
    v: Patient
  mode:
    v: target
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: languageCode
  source:
    context:
      v: src
    element:
      v: languageCode
    variable:
      v: languageCode
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: language
    variable:
      v: code
    transform:
      v: create
    parameter:
      value: String
        v: code
  dependent:
    name:
      v: CSCode
    variable:
      v: languageCode
    variable:
      v: code
rule:
  name:
    v: identifier
  source:
    context:
      v: src
    element:
      v: id
    variable:
      v: id
    condition:
      v: src.setId.exists().not()
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: identifier
    transform:
      v: create
    parameter:
      value: String
        v: Identifier
  dependent:
    name:
      v: II
    variable:
      v: id
    variable:
      v: identifier
rule:
  name:
    v: setIdentifier
  source:
    context:
      v: src
    element:
      v: setId
    variable:
      v: setId
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: identifier
    transform:
      v: create
    parameter:
      value: String
        v: Identifier
  dependent:
    name:
      v: II
    variable:
      v: setId
    variable:
      v: identifier
rule:
  name:
    v: status
  source:
    context:
      v: src
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: status
    transform:
      v: copy
    parameter:
      value: String
        v: final
rule:
  name:
    v: code
  source:
    context:
      v: src
    element:
      v: code
    variable:
      v: srcCode
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: type
    variable:
      v: cc
    transform:
      v: create
    parameter:
      value: String
        v: CodeableConcept
  dependent:
    name:
      v: CDCodeableConcept
    variable:
      v: srcCode
    variable:
      v: cc
rule:
  name:
    v: title
  source:
    context:
      v: src
    element:
      v: title
    variable:
      v: t
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: title
    transform:
      v: evaluate
    parameter:
      value: String
        v: t.xmlText

name:
  v: patientRole
source:
  context:
    v: src
  element:
    v: recordTarget
  variable:
    v: recordTarget
rule:
  name:
    v: subject
  source:
    context:
      v: recordTarget
    element:
      v: patientRole
    variable:
      v: patient
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: subject
    variable:
      v: reference
    transform:
      v: create
    parameter:
      value: String
        v: Reference
  target:
    context:
      v: reference
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: evaluate
    parameter:
      value: String
        v: 'urn:uuid:' + %patientResource.id
  dependent:
    name:
      v: ClinicalDocumentPatientRole
    variable:
      v: patient
    variable:
      v: patientResource
    variable:
      v: bundle

name:
  v: encompassingEncounter
source:
  context:
    v: src
  element:
    v: componentOf
  variable:
    v: comp
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e
target:
  context:
    v: e
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: encounter
  transform:
    v: create
  parameter:
    value: String
      v: Encounter
target:
  context:
    v: encounter
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuid
  transform:
    v: uuid
target:
  context:
    v: e
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: String
      v: urn:uuid:
  parameter:
    value: Id
      v: uuid
rule:
  name:
    v: srcEncounter
  source:
    context:
      v: comp
    element:
      v: encompassingEncounter
    variable:
      v: srcEnc
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: encounter
    variable:
      v: reference
    transform:
      v: create
    parameter:
      value: String
        v: Reference
  target:
    context:
      v: reference
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: evaluate
    parameter:
      value: String
        v: 'urn:uuid:' + %encounter.id
  dependent:
    name:
      v: ClinicalDocumentEncounter
    variable:
      v: srcEnc
    variable:
      v: bundle
    variable:
      v: encounter

name:
  v: compositionDate
source:
  context:
    v: src
  element:
    v: effectiveTime
  variable:
    v: effectiveTime
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: date
  variable:
    v: date
  transform:
    v: create
  parameter:
    value: String
      v: dateTime
dependent:
  name:
    v: TSDateTime
  variable:
    v: effectiveTime
  variable:
    v: date

name:
  v: srcAuthor
source:
  context:
    v: src
  element:
    v: author
  variable:
    v: srcAuthor
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e
target:
  context:
    v: e
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: practitioner
  transform:
    v: create
  parameter:
    value: String
      v: Practitioner
target:
  context:
    v: practitioner
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuid2
  transform:
    v: uuid
target:
  context:
    v: e
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: String
      v: urn:uuid:
  parameter:
    value: Id
      v: uuid2
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: eRole
target:
  context:
    v: eRole
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: practitionerRole
  transform:
    v: create
  parameter:
    value: String
      v: PractitionerRole
target:
  context:
    v: practitionerRole
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuidRole
  transform:
    v: uuid
target:
  context:
    v: eRole
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: String
      v: urn:uuid:
  parameter:
    value: Id
      v: uuidRole
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: author
  variable:
    v: reference
  transform:
    v: create
  parameter:
    value: String
      v: Reference
target:
  context:
    v: reference
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: evaluate
  parameter:
    value: String
      v: 'urn:uuid:' + %practitionerRole.id
rule:
  name:
    v: practitionerMeta
  source:
    context:
      v: srcAuthor
  target:
    context:
      v: practitioner
    context type:
      v: variable
    element:
      v: meta
    variable:
      v: meta
    transform:
      v: create
    parameter:
      value: String
        v: Meta
  rule:
    name:
      v: practitionerProfile
    source:
      context:
        v: srcAuthor
    target:
      context:
        v: meta
      context type:
        v: variable
      element:
        v: profile
      transform:
        v: copy
      parameter:
        value: String
rule:
  name:
    v: practitionerRoleMeta
  source:
    context:
      v: srcAuthor
  target:
    context:
      v: practitionerRole
    context type:
      v: variable
    element:
      v: meta
    variable:
      v: metaRole
    transform:
      v: create
    parameter:
      value: String
        v: Meta
  rule:
    name:
      v: practitionerRoleProfile
    source:
      context:
        v: srcAuthor
    target:
      context:
        v: metaRole
      context type:
        v: variable
      element:
        v: profile

v: copy

name:
  v: practitionerRef
source:
  context:
    v: srcAuthor
target:
  context:
    v: practitionerRole
  context type:
    v: variable
  element:
    v: practitioner
  variable:
    v: refPract
  transform:
    v: create
  parameter:
    value: String
      v: Reference
target:
  context:
    v: refPract
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: evaluate
  parameter:
    value: String
      v: 'urn:uuid:' + %practitioner.id

name:
  v: author
source:
  context:
    v: srcAuthor
  element:
    v: assignedAuthor
  variable:
    v: assignedAuthor
rule:
  name:
    v: identifier
  source:
    context:
      v: assignedAuthor
    element:
      v: id
    variable:
      v: id
  target:
    context:
      v: practitioner
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: identifier
    transform:
      v: create
    parameter:
      value: String
        v: Identifier
  rule:
    name:
      v: baseIdentifier
    source:
      context:
        v: id
    target:
      context:
        v: identifier
      context type:
        v: variable
    dependent:
      name:
        v: II
      variable:
        v: id
      variable:
        v: identifier
  rule:
    name:
      v: idNatPs
    source:
      context:
        v: id
      condition:
        v: root = '1.2.250.1.71.4.2.1'
    target:
      context:
        v: identifier
      context type:
        v: variable
      element:
        v: type
      variable:
        v: type
      transform:
        v: create
      parameter:
        value: String
    rule:
      name:
        v: coding
rule:
  name:
    v: addr
  source:
    context:
      v: assignedAuthor
    element:
      v: addr
    variable:
      v: addr
  target:
    context:
      v: practitioner
    context type:
      v: variable
    element:
      v: address
    variable:
      v: address
    transform:
      v: create
    parameter:
      value: String
        v: Address
  dependent:
    name:
      v: ADAddress
    variable:
      v: addr
    variable:
      v: address
rule:
  name:
    v: telecom
  source:
    context:
      v: assignedAuthor
    element:
      v: telecom
    variable:
      v: tlc
  target:
    context:
      v: practitioner
    context type:
      v: variable
    element:
      v: telecom
    variable:
      v: contactPoint
    transform:
      v: create
    parameter:
      value: String
        v: ContactPoint
  dependent:
    name:
      v: TELContactPoint
    variable:
      v: tlc
    variable:
      v: contactPoint
rule:
  name:
    v: name
  source:
    context:
      v: assignedAuthor
    element:
      v: assignedPerson
    variable:
      v: assPerson
  rule:
    name:
      v: name
    source:
      context:
        v: assPerson
      element:
        v: name
      variable:
        v: pName
    target:
      context:
        v: practitioner
      context type:
        v: variable
      element:
        v: name
      variable:
        v: humanName
      transform:
        v: create
      parameter:
        value: String
    dependent:
      name:
        v: ENHumanName
      variable:
        v: pName
      variable:
        v: humanName
rule:
  name:
    v: roleCode
  source:
    context:
      v: assignedAuthor
    element:
      v: code
    variable:
      v: roleCode
  target:
    context:
      v: practitionerRole
    context type:
      v: variable
    element:
      v: code
    variable:
      v: cc
    transform:
      v: create
    parameter:
      value: String
        v: CodeableConcept

String
v: CodeableConcept

v: id

v: type

v: variable

v: coding

v: coding

v: create

value: String
  v: Coding

v: system

context:
  v: id

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value: String
    v: https://hl7.fr/ig/fhir/core/CodeSystem/fr-core-cs-v2-0203

v: code

context:
  v: id

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value: String
    v: IDNPS

String
v: HumanName

name:
  v: CDCodeableConcept
variable:
  v: roleCode
variable:
  v: cc

name:
  v: savoirFaire
source:
  context:
    v: assignedAuthor
  element:
    v: code
  variable:
    v: roleCode
  condition:
    v: code.contains('/')
target:
  context:
    v: practitioner
  context type:
    v: variable
  element:
    v: qualification
  variable:
    v: qualification
rule:
  name:
    v: qualCode
  source:
    context:
      v: roleCode
  target:
    context:
      v: qualification
    context type:
      v: variable
    element:
      v: code
    variable:
      v: qualCode
    transform:
      v: create
    parameter:
      value: String
        v: CodeableConcept
  rule:
    name:
      v: coding
    source:
      context:
        v: roleCode
      element:
        v: code
      variable:
        v: fullCode
    target:
      context:
        v: qualCode
      context type:
        v: variable
      element:
        v: coding
      variable:
        v: coding
      transform:
        v: create
      parameter:
        value: String
    rule:
      name:
        v: savoirFaireCode
    rule:
      name:
        v: systemSavoirFaire
    rule:
      name:
        v: display

String
v: Coding

v: fullCode

v: coding

v: variable

v: code

v: evaluate

value: String
  v: %fullCode.substring(%fullCode.indexOf('/') + 1)

v: fullCode

v: coding

v: variable

v: system

v: copy

v: roleCode

v: displayName

v: display

v: coding

v: variable

v: display

v: copy

value: Id
  v: display

name:
  v: profession
source:
  context:
    v: assignedAuthor
  element:
    v: code
  variable:
    v: roleCode
  condition:
    v: code.contains('/') and code.contains('_')
target:
  context:
    v: practitioner
  context type:
    v: variable
  element:
    v: qualification
  variable:
    v: qualification
rule:
  name:
    v: qualCode
  source:
    context:
      v: roleCode
  target:
    context:
      v: qualification
    context type:
      v: variable
    element:
      v: code
    variable:
      v: qualCode
    transform:
      v: create
    parameter:
      value: String
        v: CodeableConcept
  rule:
    name:
      v: coding
    source:
      context:
        v: roleCode
      element:
        v: code
      variable:
        v: fullCode
    target:
      context:
        v: qualCode
      context type:
        v: variable
      element:
        v: coding
      variable:
        v: coding
      transform:
        v: create
      parameter:
        value: String
    rule:
      name:
        v: professionCode
    rule:
      name:
        v: systemProfession
    rule:
      name:
        v: displayMedecin

String
v: Coding

v: fullCode

v: coding

v: variable

v: code

v: evaluate

value: String
  v: %fullCode.substring(%fullCode.indexOf('_') + 1).substring(0, %fullCode.substring(%fullCode.indexOf('_') + 1).indexOf('/'))

v: fullCode

v: coding

v: variable

v: system

v: copy

v: fullCode

v: %fullCode.substring(%fullCode.indexOf('_') + 1).substring(0, %fullCode.substring(%fullCode.indexOf('_') + 1).indexOf('/')) = '10'

v: coding

v: variable

v: display

v: copy

value: String
  v: Médecin

name:
  v: representedOrganization
source:
  context:
    v: assignedAuthor
  element:
    v: representedOrganization
  variable:
    v: srcOrg
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e2
target:
  context:
    v: e2
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: organization
  transform:
    v: create
  parameter:
    value: String
      v: Organization
target:
  context:
    v: organization
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuid3
  transform:
    v: uuid
target:
  context:
    v: e2
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: String
      v: urn:uuid:
  parameter:
    value: Id
      v: uuid3
target:
  context:
    v: practitionerRole
  context type:
    v: variable
  element:
    v: organization
  variable:
    v: refOrg
  transform:
    v: create
  parameter:
    value: String
      v: Reference
target:
  context:
    v: refOrg
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: evaluate
  parameter:
    value: String
      v: 'urn:uuid:' + %organization.id
dependent:
  name:
    v: ClinicalDocumentOrganization
  variable:
    v: srcOrg
  variable:
    v: organization

name:
  v: informant
source:
  context:
    v: src
  element:
    v: informant
  variable:
    v: srcInformant
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e
target:
  context:
    v: e
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: relatedPerson
  transform:
    v: create
  parameter:
    value: String
      v: RelatedPerson
target:
  context:
    v: relatedPerson
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuidRelated
  transform:
    v: uuid
target:
  context:
    v: e
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: String
      v: urn:uuid:
  parameter:
    value: Id
      v: uuidRelated
rule:
  name:
    v: relatedEntity
  source:
    context:
      v: srcInformant
    element:
      v: relatedEntity
    variable:
      v: relatedEntity
  rule:
    name:
      v: patientRef
    source:
      context:
        v: relatedEntity
    target:
      context:
        v: relatedPerson
      context type:
        v: variable
      element:
        v: patient
      variable:
        v: patientRef
      transform:
        v: create
      parameter:
        value: String
    target:
      context:
        v: patientRef
      context type:
        v: variable
      element:
        v: reference
      transform:
        v: evaluate
      parameter:
        value: String
  rule:
    name:
      v: relationship
    source:
      context:
        v: relatedEntity
      element:
        v: code
      variable:
        v: relationCode
    target:
      context:
        v: relatedPerson
      context type:
        v: variable
      element:
        v: relationship
      variable:
        v: cc
      transform:
        v: create
      parameter:
        value: String
    dependent:
      name:
        v: CDCodeableConcept
      variable:
        v: relationCode
      variable:
        v: cc
  rule:
    name:
      v: address
    source:
      context:
        v: relatedEntity
      element:
        v: addr
      variable:
        v: addr
    target:
      context:
        v: relatedPerson
      context type:
        v: variable
      element:
        v: address
      variable:
        v: address
      transform:
        v: create
      parameter:
        value: String
    dependent:
      name:
        v: ADAddress
      variable:
        v: addr
      variable:
        v: address
  rule:
    name:
      v: telecom
    source:
      context:
        v: relatedEntity
      element:
        v: telecom
      variable:
        v: tlc
    target:
      context:
        v: relatedPerson
      context type:
        v: variable
      element:
        v: telecom
      variable:
        v: contactPoint
      transform:
        v: create
      parameter:
        value: String
    dependent:
      name:
        v: TELContactPoint
      variable:
        v: tlc
      variable:
        v: contactPoint
  rule:
    name:
      v: relatedPersonName
    source:
      context:
        v: relatedEntity
      element:
        v: relatedPerson
      variable:
        v: relPerson
    rule:
      name:
        v: name

String
v: Reference

String
v: 'urn:uuid:' + %patientResource.id

String
v: CodeableConcept

String
v: Address

String
v: ContactPoint

v: relPerson

v: name

v: pName

v: relatedPerson

v: variable

v: name

v: humanName

v: create

value: String
  v: HumanName

v: ENHumanName

v: pName

v: humanName

name:
  v: confidentialityCode
source:
  context:
    v: src
  element:
    v: confidentialityCode
  variable:
    v: confCode
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: confidentiality
  variable:
    v: code
  transform:
    v: create
  parameter:
    value: String
      v: code
dependent:
  name:
    v: CSCode
  variable:
    v: confCode
  variable:
    v: code

name:
  v: legalAuth
source:
  context:
    v: src
  element:
    v: legalAuthenticator
  variable:
    v: legalAuth
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e
target:
  context:
    v: e
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: practitioner
  transform:
    v: create
  parameter:
    value: String
      v: Practitioner
target:
  context:
    v: practitioner
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuid2
  transform:
    v: uuid
target:
  context:
    v: e
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: String
      v: urn:uuid:
  parameter:
    value: Id
      v: uuid2
rule:
  name:
    v: attester
  source:
    context:
      v: legalAuth
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: attester
    variable:
      v: attester
  rule:
    name:
      v: mode
    source:
      context:
        v: legalAuth
    target:
      context:
        v: attester
      context type:
        v: variable
      element:
        v: mode
      transform:
        v: copy
      parameter:
        value: String
  rule:
    name:
      v: time
    source:
      context:
        v: legalAuth
      element:
        v: time
      variable:
        v: time
    target:
      context:
        v: attester
      context type:
        v: variable
      element:
        v: time
      variable:
        v: dt
      transform:
        v: create
      parameter:
        value: String
    dependent:
      name:
        v: TSDateTime
      variable:
        v: time
      variable:
        v: dt
  rule:
    name:
      v: entity
    source:
      context:
        v: legalAuth
      element:
        v: assignedEntity
      variable:
        v: entity
    target:
      context:
        v: attester
      context type:
        v: variable
      element:
        v: party
      variable:
        v: reference
      transform:
        v: create
      parameter:
        value: String
    target:
      context:
        v: reference
      context type:
        v: variable
      element:
        v: reference
      transform:
        v: evaluate
      parameter:
        value: String
    dependent:
      name:
        v: ClinicalDocumentEntityPractitioner
      variable:
        v: entity
      variable:
        v: practitioner

String
v: legal

String
v: dateTime

String
v: Reference

String
v: 'urn:uuid:' + %practitioner.id

name:
  v: auth
source:
  context:
    v: src
  element:
    v: authenticator
  variable:
    v: auth
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e
target:
  context:
    v: e
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: practitioner
  transform:
    v: create
  parameter:
    value: String
      v: Practitioner
target:
  context:
    v: practitioner
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuid2
  transform:
    v: uuid
target:
  context:
    v: e
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: String
      v: urn:uuid:
  parameter:
    value: Id
      v: uuid2
rule:
  name:
    v: attester
  source:
    context:
      v: auth
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: attester
    variable:
      v: attester
  rule:
    name:
      v: mode
    source:
      context:
        v: auth
    target:
      context:
        v: attester
      context type:
        v: variable
      element:
        v: mode
      transform:
        v: copy
      parameter:
        value: String
  rule:
    name:
      v: time
    source:
      context:
        v: auth
      element:
        v: time
      variable:
        v: time
    target:
      context:
        v: attester
      context type:
        v: variable
      element:
        v: time
      variable:
        v: dt
      transform:
        v: create
      parameter:
        value: String
    dependent:
      name:
        v: TSDateTime
      variable:
        v: time
      variable:
        v: dt
  rule:
    name:
      v: entity
    source:
      context:
        v: auth
      element:
        v: assignedEntity
      variable:
        v: entity
    target:
      context:
        v: attester
      context type:
        v: variable
      element:
        v: party
      variable:
        v: reference
      transform:
        v: create
      parameter:
        value: String
    target:
      context:
        v: reference
      context type:
        v: variable
      element:
        v: reference
      transform:
        v: evaluate
      parameter:
        value: String
    dependent:
      name:
        v: ClinicalDocumentEntityPractitioner
      variable:
        v: entity
      variable:
        v: practitioner

String
v: official

String
v: dateTime

String
v: Reference

String
v: 'urn:uuid:' + %practitioner.id

name:
  v: cust
source:
  context:
    v: src
  element:
    v: custodian
  variable:
    v: custodian
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e
rule:
  name:
    v: custodian
  source:
    context:
      v: custodian
    element:
      v: assignedCustodian
    variable:
      v: assignedCustodian
  target:
    context:
      v: e
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: organization
    transform:
      v: create
    parameter:
      value: String
        v: Organization
  target:
    context:
      v: organization
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid3
    transform:
      v: uuid
  target:
    context:
      v: e
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: String
        v: urn:uuid:
    parameter:
      value: Id
        v: uuid3
  rule:
    name:
      v: assignedCustodian
    source:
      context:
        v: assignedCustodian
      element:
        v: representedCustodianOrganization
      variable:
        v: srcOrg
    target:
      context:
        v: tgt
      context type:
        v: variable
      element:
        v: custodian
      variable:
        v: reference
      transform:
        v: create
      parameter:
        value: String
    target:
      context:
        v: reference
      context type:
        v: variable
      element:
        v: reference
      transform:
        v: evaluate
      parameter:
        value: String
    dependent:
      name:
        v: ClinicalDocumentOrganization
      variable:
        v: srcOrg
      variable:
        v: organization

String
v: Reference

String
v: 'urn:uuid:' + %organization.id

name:
  v: documentationOf
source:
  context:
    v: src
  element:
    v: documentationOf
  variable:
    v: docOf
rule:
  name:
    v: docOf
  source:
    context:
      v: docOf
    element:
      v: serviceEvent
    variable:
      v: serviceEvent
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: event
    variable:
      v: event
  rule:
    name:
      v: eventCode
    source:
      context:
        v: serviceEvent
      element:
        v: code
      variable:
        v: eventCode
    target:
      context:
        v: event
      context type:
        v: variable
      element:
        v: code
      variable:
        v: cc
      transform:
        v: create
      parameter:
        value: String
    dependent:
      name:
        v: CDCodeableConcept
      variable:
        v: eventCode
      variable:
        v: cc
  rule:
    name:
      v: eventTime
    source:
      context:
        v: serviceEvent
      element:
        v: effectiveTime
      variable:
        v: effectivetime
    target:
      context:
        v: event
      context type:
        v: variable
      element:
        v: period
      variable:
        v: period
      transform:
        v: create
      parameter:
        value: String
    dependent:
      name:
        v: IVLTSPeriod
      variable:
        v: effectivetime
      variable:
        v: period
    documentation:
      v: performerType: for src.performer.typeCode ...

String
v: CodeableConcept

String
v: Period

name:
  v: relatedDoc
source:
  context:
    v: src
  element:
    v: relatedDocument
  variable:
    v: relatedDoc
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: relatesTo
  variable:
    v: relates
rule:
  name:
    v: typeCode
  source:
    context:
      v: relatedDoc
    element:
      v: typeCode
    variable:
      v: typeCode
  target:
    context:
      v: relates
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: Id
        v: typeCode
rule:
  name:
    v: parentDoc
  source:
    context:
      v: relatedDoc
    element:
      v: parentDocument
    variable:
      v: parentDoc
  rule:
    name:
      v: setId
    source:
      context:
        v: parentDoc
      element:
        v: setId
      variable:
        v: sid
    target:
      context:
        v: relates
      context type:
        v: variable
      element:
        v: targetIdentifier
      transform:
        v: copy
      parameter:
        value: Id

Id
v: sid

name:
  v: ClinicalDocumentEntityPractitioner
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: AssignedEntity
  mode:
    v: source
input:
  name:
    v: tgt
  type:
    v: Practitioner
  mode:
    v: target
rule:
  name:
    v: meta
  source:
    context:
      v: src
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: meta
    variable:
      v: meta
    transform:
      v: create
    parameter:
      value: String
        v: Meta
  rule:
    name:
      v: profile
    source:
      context:
        v: src
    target:
      context:
        v: meta
      context type:
        v: variable
      element:
        v: profile
      transform:
        v: copy
      parameter:
        value: String
rule:
  name:
    v: identifier
  source:
    context:
      v: src
    element:
      v: id
    variable:
      v: srcId
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: identifier
    transform:
      v: create
    parameter:
      value: String
        v: Identifier
  rule:
    name:
      v: baseIdentifier
    source:
      context:
        v: srcId
    target:
      context:
        v: identifier
      context type:
        v: variable
    dependent:
      name:
        v: II
      variable:
        v: srcId
      variable:
        v: identifier
  rule:
    name:
      v: idNatPs
    source:
      context:
        v: srcId
      condition:
        v: root = '1.2.250.1.71.4.2.1'
    target:
      context:
        v: identifier
      context type:
        v: variable
      element:
        v: type
      variable:
        v: type
      transform:
        v: create
      parameter:
        value: String
    rule:
      name:
        v: coding
rule:
  name:
    v: addr
  source:
    context:
      v: src
    element:
      v: addr
    variable:
      v: srcAddr
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: address
    variable:
      v: address
    transform:
      v: create
    parameter:
      value: String
        v: Address
  dependent:
    name:
      v: ADAddress
    variable:
      v: srcAddr
    variable:
      v: address
rule:
  name:
    v: telecom
  source:
    context:
      v: src
    element:
      v: telecom
    variable:
      v: srcTelecom
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: telecom
    variable:
      v: contactPoint
    transform:
      v: create
    parameter:
      value: String
        v: ContactPoint
  dependent:
    name:
      v: TELContactPoint
    variable:
      v: srcTelecom
    variable:
      v: contactPoint
rule:
  name:
    v: name
  source:
    context:
      v: src
    element:
      v: assignedPerson
    variable:
      v: person
  rule:
    name:
      v: name
    source:
      context:
        v: person
      element:
        v: name
      variable:
        v: pName

String
v: CodeableConcept

v: srcId

v: type

v: variable

v: coding

v: coding

v: create

value: String
  v: Coding

v: system

context:
  v: srcId

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value: String
    v: https://hl7.fr/ig/fhir/core/CodeSystem/fr-core-cs-v2-0203

v: code

context:
  v: srcId

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value: String
    v: IDNPS

context:
  v: tgt
context type:
  v: variable
element:
  v: name
variable:
  v: humanName
transform:
  v: create
parameter:
  value: String
    v: HumanName

name:
  v: ENHumanName
variable:
  v: pName
variable:
  v: humanName

name:
  v: ClinicalDocumentOrganization
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: CustodianOrganization
  mode:
    v: source
input:
  name:
    v: tgt
  type:
    v: Organization
  mode:
    v: target
rule:
  name:
    v: meta
  source:
    context:
      v: src
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: meta
    variable:
      v: meta
    transform:
      v: create
    parameter:
      value: String
        v: Meta
  rule:
    name:
      v: profile
    source:
      context:
        v: src
    target:
      context:
        v: meta
      context type:
        v: variable
      element:
        v: profile
      transform:
        v: copy
      parameter:
        value: String
rule:
  name:
    v: id
  source:
    context:
      v: src
    element:
      v: id
    variable:
      v: srcId
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: identifier
    transform:
      v: create
    parameter:
      value: String
        v: Identifier
  dependent:
    name:
      v: II
    variable:
      v: srcId
    variable:
      v: identifier
rule:
  name:
    v: name
  source:
    context:
      v: src
    element:
      v: name
    variable:
      v: v
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: name
    transform:
      v: evaluate
    parameter:
      value: String
        v: v.other
rule:
  name:
    v: telecom
  source:
    context:
      v: src
    element:
      v: telecom
    variable:
      v: srcTelecom
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: telecom
    variable:
      v: contactPoint
    transform:
      v: create
    parameter:
      value: String
        v: ContactPoint
  dependent:
    name:
      v: TELContactPoint
    variable:
      v: srcTelecom
    variable:
      v: contactPoint
rule:
  name:
    v: addr
  source:
    context:
      v: src
    element:
      v: addr
    variable:
      v: srcAddr
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: address
    variable:
      v: address
    transform:
      v: create
    parameter:
      value: String
        v: Address
  dependent:
    name:
      v: ADAddress
    variable:
      v: srcAddr
    variable:
      v: address

name:
  v: ClinicalDocumentPatientRole
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: PatientRole
  mode:
    v: source
input:
  name:
    v: tgt
  type:
    v: Patient
  mode:
    v: target
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: id
  source:
    context:
      v: src
    element:
      v: id
    variable:
      v: id
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: identifier
    transform:
      v: create
    parameter:
      value: String
        v: Identifier
  dependent:
    name:
      v: setFrPatientIdentifier
    variable:
      v: id
    variable:
      v: identifier
rule:
  name:
    v: addr
  source:
    context:
      v: src
    element:
      v: addr
    variable:
      v: srcAddr
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: address
    variable:
      v: address
    transform:
      v: create
    parameter:
      value: String
        v: Address
  dependent:
    name:
      v: ADAddress
    variable:
      v: srcAddr
    variable:
      v: address
rule:
  name:
    v: telecom
  source:
    context:
      v: src
    element:
      v: telecom
    variable:
      v: srcTelecom
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: telecom
    variable:
      v: contactPoint
    transform:
      v: create
    parameter:
      value: String
        v: ContactPoint
  dependent:
    name:
      v: TELContactPoint
    variable:
      v: srcTelecom
    variable:
      v: contactPoint
rule:
  name:
    v: patientrole
  source:
    context:
      v: src
    element:
      v: patient
    variable:
      v: patient
  rule:
    name:
      v: name
    source:
      context:
        v: patient
      element:
        v: name
      variable:
        v: patientName
    target:
      context:
        v: tgt
      context type:
        v: variable
      element:
        v: name
      variable:
        v: humanName
      transform:
        v: create
      parameter:
        value: String
    dependent:
      name:
        v: ENHumanName
      variable:
        v: patientName
      variable:
        v: humanName
  rule:
    name:
      v: gender
    source:
      context:
        v: patient
      element:
        v: administrativeGenderCode
      variable:
        v: gender
    rule:
      name:
        v: gender
  rule:
    name:
      v: birthDate
    source:
      context:
        v: patient
      element:
        v: birthTime
      variable:
        v: birthTime
    target:
      context:
        v: tgt
      context type:
        v: variable
      element:
        v: birthDate
      variable:
        v: date
      transform:
        v: create
      parameter:
        value: String
    dependent:
      name:
        v: TSDate
      variable:
        v: birthTime
      variable:
        v: date

String
v: HumanName

v: gender

v: code

v: v

v: tgt

v: variable

v: gender

v: translate

value: Id
  v: v

value: String
  v: code

String
v: date

name:
  v: deceasedBL
source:
  context:
    v: patient
  element:
    v: deceasedInd
  variable:
    v: indicator
  condition:
    v: patient.deceasedTime.empty()
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: deceased
  variable:
    v: bool
  transform:
    v: create
  parameter:
    value: String
      v: boolean
dependent:
  name:
    v: boolean
  variable:
    v: indicator
  variable:
    v: bool

name:
  v: deceasedTime
source:
  context:
    v: patient
  element:
    v: deceasedTime
  variable:
    v: dTime
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: deceased
  transform:
    v: copy
  parameter:
    value: Id
      v: dTime

name:
  v: maritalStatus
source:
  context:
    v: patient
  element:
    v: maritalStatusCode
  variable:
    v: mStatus
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: maritalStatus
  transform:
    v: copy
  parameter:
    value: Id
      v: mStatus

name:
  v: language
source:
  context:
    v: patient
  element:
    v: languageCommunication
  variable:
    v: language
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: communication
  variable:
    v: communication
rule:
  name:
    v: communication
  source:
    context:
      v: language
    element:
      v: languageCode
    variable:
      v: lCode
  target:
    context:
      v: communication
    context type:
      v: variable
    element:
      v: language
    transform:
      v: copy
    parameter:
      value: Id
        v: lCode
  documentation:
    v: preference: for language.preferenceInd make communication.preferred

name:
  v: organization
source:
  context:
    v: src
  element:
    v: providerOrganization
  variable:
    v: org
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e
target:
  context:
    v: e
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: organization
  transform:
    v: create
  parameter:
    value: String
      v: Organization
target:
  context:
    v: organization
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuid3
  transform:
    v: uuid
target:
  context:
    v: e
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: String
      v: urn:uuid:
  parameter:
    value: Id
      v: uuid3
rule:
  name:
    v: reference
  source:
    context:
      v: org
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: managingOrganization
    variable:
      v: reference
    transform:
      v: create
    parameter:
      value: String
        v: Reference
  target:
    context:
      v: reference
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: evaluate
    parameter:
      value: String
        v: 'urn:uuid:' + %organization.id
rule:
  name:
    v: id
  source:
    context:
      v: org
    element:
      v: id
    variable:
      v: orgId
  target:
    context:
      v: organization
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: identifier
    transform:
      v: create
    parameter:
      value: String
        v: Identifier
  dependent:
    name:
      v: II
    variable:
      v: orgId
    variable:
      v: identifier
rule:
  name:
    v: name
  source:
    context:
      v: org
    element:
      v: name
    variable:
      v: v
  target:
    context:
      v: organization
    context type:
      v: variable
    element:
      v: name
    transform:
      v: evaluate
    parameter:
      value: String
        v: v.other
rule:
  name:
    v: telecom
  source:
    context:
      v: org
    element:
      v: telecom
    variable:
      v: orgTel
  target:
    context:
      v: organization
    context type:
      v: variable
    element:
      v: telecom
    variable:
      v: contactPoint
    transform:
      v: create
    parameter:
      value: String
        v: ContactPoint
  dependent:
    name:
      v: TELContactPoint
    variable:
      v: orgTel
    variable:
      v: contactPoint
rule:
  name:
    v: addr
  source:
    context:
      v: org
    element:
      v: addr
    variable:
      v: orgAddr
  target:
    context:
      v: organization
    context type:
      v: variable
    element:
      v: address
    variable:
      v: address
    transform:
      v: create
    parameter:
      value: String
        v: Address
  dependent:
    name:
      v: ADAddress
    variable:
      v: orgAddr

v: address

name:
  v: setFrPatientIdentifier
type mode:
  v: none
input:
  name:
    v: id
  type:
    v: II
  mode:
    v: source
input:
  name:
    v: identifier
  type:
    v: Identifier
  mode:
    v: target
rule:
  name:
    v: identifierType
  source:
    context:
      v: id
  target:
    context:
      v: identifier
    context type:
      v: variable
  target:
    context:
      v: identifier
    context type:
      v: variable
    element:
      v: type
    variable:
      v: type
  target:
    context:
      v: type
    context type:
      v: variable
    element:
      v: coding
    variable:
      v: coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    variable:
      v: system
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    variable:
      v: code
  rule:
    name:
      v: system
    source:
      context:
        v: id
      condition:
        v: (id.root = '1.2.250.1.213.1.4.8')
    target:
      context:
        v: system
      context type:
        v: variable
      element:
        v: value
      transform:
        v: copy
      parameter:
        value: String
  rule:
    name:
      v: code
    source:
      context:
        v: id
      condition:
        v: (id.root = '1.2.250.1.213.1.4.8')
    target:
      context:
        v: code
      context type:
        v: variable
      element:
        v: value
      transform:
        v: copy
      parameter:
        value: String
  rule:
    name:
      v: system
    source:
      context:
        v: id
      condition:
        v: (id.root = '1.2.3.4.5.6.7.8.9.10')
    target:
      context:
        v: system
      context type:
        v: variable
      element:
        v: value
      transform:
        v: copy
      parameter:
        value: String
  rule:
    name:
      v: code
    source:
      context:
        v: id
      condition:
        v: (id.root = '1.2.3.4.5.6.7.8.9.10')
    target:
      context:
        v: code
      context type:
        v: variable
      element:
        v: value
      transform:
        v: copy
      parameter:
        value: String
rule:
  name:
    v: extension
  source:
    context:
      v: id
    element:
      v: extension
    variable:
      v: extension
  target:
    context:
      v: identifier
    context type:
      v: variable
    element:
      v: value
    variable:
      v: value
  target:
    context:
      v: value
    context type:
      v: variable
    element:
      v: value
    transform:
      v: copy
    parameter:
      value: Id
        v: extension
rule:
  name:
    v: root
  source:
    context:
      v: id
    element:
      v: root
    variable:
      v: root
  target:
    context:
      v: identifier
    context type:
      v: variable
    element:
      v: system
    variable:
      v: system
  target:
    context:
      v: system
    context type:
      v: variable
    element:
      v: value
    transform:
      v: append
    parameter:
      value: String
        v: urn:oid:

String
v: INS-NIR

String
v: PI

value: Id
  v: root

name:
  v: ClinicalDocumentEncounter
type mode:
  v: none
documentation:
  v: Fin modification NR Etat initial src -> tgt.identifier as identifier then { src.id as id -> identifier.type as type, type.coding as coding, coding.system as system, coding.code as code then { src -> system.value = 'http://terminology.hl7.org/CodeSystem/v2-0203' "system"; src -> code.value = 'MR' "code"; id.extension as extension -> identifier.value as value, value.value = extension "extension"; id.root as root -> identifier.system as system, system.value = append('urn:oid:', root) "root"; } "id"; } "identifier"; Fin état initial
input:
  name:
    v: src
  type:
    v: EncompassingEncounter
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
input:
  name:
    v: tgt
  type:
    v: Encounter
  mode:
    v: target
rule:
  name:
    v: id
  source:
    context:
      v: src
    element:
      v: id
    variable:
      v: Id
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: identifier
    transform:
      v: create
    parameter:
      value: String
        v: Identifier
  dependent:
    name:
      v: II
    variable:
      v: Id
    variable:
      v: identifier
rule:
  name:
    v: status
  source:
    context:
      v: src
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: status
    transform:
      v: copy
    parameter:
      value: String
        v: finished
rule:
  name:
    v: class
  source:
    context:
      v: src
    element:
      v: code
    variable:
      v: srcCode
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: class
    variable:
      v: coding
    transform:
      v: create
    parameter:
      value: String
        v: Coding
  rule:
    name:
      v: code
    source:
      context:
        v: srcCode
      element:
        v: code
      variable:
        v: code
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: code
      transform:
        v: cast
      parameter:
        value: Id
      parameter:
        value: String
  rule:
    name:
      v: codeSystem
    source:
      context:
        v: srcCode
      element:
        v: codeSystem
      variable:
        v: system
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: system
      transform:
        v: translate
      parameter:
        value: Id
      parameter:
        value: String
      parameter:
        value: String
  rule:
    name:
      v: displayName
    source:
      context:
        v: srcCode
      element:
        v: displayName
      variable:
        v: display
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: display
      transform:
        v: cast
      parameter:
        value: Id
      parameter:
        value: String
rule:
  name:
    v: code
  source:
    context:
      v: src
    element:
      v: code
    variable:
      v: srcCode
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: type
    variable:
      v: cc
    transform:
      v: create
    parameter:
      value: String
        v: CodeableConcept
  dependent:
    name:
      v: CDCodeableConcept
    variable:
      v: srcCode
    variable:
      v: cc

Id
v: code

String
v: string

Id
v: system

String
v: uri

Id
v: display

String
v: string

name:
  v: effectiveTime
source:
  context:
    v: src
  element:
    v: effectiveTime
  variable:
    v: effTime
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: period
  variable:
    v: period
  transform:
    v: create
  parameter:
    value: String
      v: Period
dependent:
  name:
    v: IVLTSPeriod
  variable:
    v: effTime
  variable:
    v: period

name:
  v: hospitalization
source:
  context:
    v: src
  condition:
    v: admissionReferralSourceCode.exists() or dischargeDispositionCode.exists()
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: hospitalization
  variable:
    v: hosp
rule:
  name:
    v: adminReferral
  source:
    context:
      v: src
    element:
      v: admissionReferralSourceCode
    variable:
      v: admRef
  target:
    context:
      v: hosp
    context type:
      v: variable
    element:
      v: admitSource
    variable:
      v: cc
    transform:
      v: create
    parameter:
      value: String
        v: CodeableConcept
  dependent:
    name:
      v: CDCodeableConcept
    variable:
      v: admRef
    variable:
      v: cc
rule:
  name:
    v: discDisposition
  source:
    context:
      v: src
    element:
      v: dischargeDispositionCode
    variable:
      v: discDispo
  target:
    context:
      v: hosp
    context type:
      v: variable
    element:
      v: dischargeDisposition
    variable:
      v: cc
    transform:
      v: create
    parameter:
      value: String
        v: CodeableConcept
  dependent:
    name:
      v: CDCodeableConcept
    variable:
      v: discDispo
    variable:
      v: cc

name:
  v: participant
source:
  context:
    v: src
  element:
    v: encounterParticipant
  variable:
    v: srcPart
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: participant
  variable:
    v: tgtPart
rule:
  name:
    v: typeCode
  source:
    context:
      v: srcPart
    element:
      v: typeCode
    variable:
      v: code
  target:
    context:
      v: tgtPart
    context type:
      v: variable
    element:
      v: type
    transform:
      v: cc
    parameter:
      value: String
        v: http://terminology.hl7.org/CodeSystem/v3-ParticipationType
    parameter:
      value: Id
        v: code
rule:
  name:
    v: time
  source:
    context:
      v: srcPart
    element:
      v: time
    variable:
      v: srcTime
  target:
    context:
      v: tgtPart
    context type:
      v: variable
    element:
      v: period
    variable:
      v: period
    transform:
      v: create
    parameter:
      value: String
        v: Period
  dependent:
    name:
      v: IVLTSPeriod
    variable:
      v: srcTime
    variable:
      v: period
rule:
  name:
    v: entity
  source:
    context:
      v: srcPart
    element:
      v: assignedEntity
    variable:
      v: entity
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: e
  target:
    context:
      v: e
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: practitioner
    transform:
      v: create
    parameter:
      value: String
        v: Practitioner
  target:
    context:
      v: practitioner
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid2
    transform:
      v: uuid
  target:
    context:
      v: e
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: String
        v: urn:uuid:
    parameter:
      value: Id
        v: uuid2
  rule:
    name:
      v: entry
    source:
      context:
        v: entity
    target:
      context:
        v: tgtPart
      context type:
        v: variable
      element:
        v: individual
      variable:
        v: reference
      transform:
        v: create
      parameter:
        value: String
    target:
      context:
        v: reference
      context type:
        v: variable
      element:
        v: reference
      transform:
        v: evaluate
      parameter:
        value: String
    dependent:
      name:
        v: ClinicalDocumentEntityPractitioner
      variable:
        v: entity
      variable:
        v: practitioner

String
v: Reference

String
v: 'urn:uuid:' + %practitioner.id

name:
  v: location
source:
  context:
    v: src
  element:
    v: location
  variable:
    v: srcLocation
rule:
  name:
    v: facility
  source:
    context:
      v: srcLocation
    element:
      v: healthCareFacility
    variable:
      v: facility
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: e
  target:
    context:
      v: e
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: location
    transform:
      v: create
    parameter:
      value: String
        v: Location
  target:
    context:
      v: location
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid2
    transform:
      v: uuid
  target:
    context:
      v: e
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: String
        v: urn:uuid:
    parameter:
      value: Id
        v: uuid2
  rule:
    name:
      v: facLocation
    source:
      context:
        v: facility
    target:
      context:
        v: tgt
      context type:
        v: variable
      element:
        v: location
      variable:
        v: tgtLocation
    target:
      context:
        v: tgtLocation
      context type:
        v: variable
      element:
        v: location
      variable:
        v: reference
      transform:
        v: create
      parameter:
        value: String
    target:
      context:
        v: reference
      context type:
        v: variable
      element:
        v: reference
      transform:
        v: evaluate
      parameter:
        value: String
    dependent:
      name:
        v: ClinicalDocumentLocation
      variable:
        v: facility
      variable:
        v: bundle
      variable:
        v: location

String
v: Reference

String
v: 'urn:uuid:' + %location.id

name:
  v: ClinicalDocumentLocation
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: HealthCareFacility
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
input:
  name:
    v: tgt
  type:
    v: Location
  mode:
    v: target
rule:
  name:
    v: id
  source:
    context:
      v: src
    element:
      v: id
    variable:
      v: srcIdentifier
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: identifier
    transform:
      v: create
    parameter:
      value: String
        v: Identifier
  dependent:
    name:
      v: II
    variable:
      v: srcIdentifier
    variable:
      v: identifier
rule:
  name:
    v: locationType
  source:
    context:
      v: src
    element:
      v: code
    variable:
      v: srcCode
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: type
    variable:
      v: cc
    transform:
      v: create
    parameter:
      value: String
        v: CodeableConcept
  rule:
    name:
      v: coding
    source:
      context:
        v: srcCode
      element:
        v: code
      variable:
        v: code
    target:
      context:
        v: cc
      context type:
        v: variable
      element:
        v: coding
      variable:
        v: coding
      transform:
        v: create
      parameter:
        value: String
    rule:
      name:
        v: code
    rule:
      name:
        v: system
    rule:
      name:
        v: display
rule:
  name:
    v: location
  source:
    context:
      v: src
    element:
      v: location
    variable:
      v: location
  rule:
    name:
      v: addr
    source:
      context:
        v: location
      element:
        v: addr
      variable:
        v: locAddr
    target:
      context:
        v: tgt
      context type:
        v: variable
      element:
        v: address
      variable:
        v: address
      transform:
        v: create
      parameter:
        value: String
    dependent:
      name:
        v: ADAddress
      variable:
        v: locAddr
      variable:
        v: address
  rule:
    name:
      v: org
    source:
      context:
        v: location
      element:
        v: serviceProviderOrganization
      variable:
        v: srcOrg
    target:
      context:
        v: bundle
      context type:
        v: variable
      element:
        v: entry
      variable:
        v: e
    target:
      context:
        v: e
      context type:
        v: variable
      element:
        v: resource
      variable:
        v: organization
      transform:
        v: create
      parameter:
        value: String
    target:
      context:
        v: organization
      context type:
        v: variable
      element:
        v: id
      variable:
        v: uuid3
      transform:
        v: uuid
    target:
      context:
        v: e
      context type:
        v: variable
      element:
        v: fullUrl
      transform:
        v: append

String
v: Coding

v: code

v: coding

v: variable

v: code

v: copy

value: Id
  v: code

v: code

v: coding

v: variable

v: system

v: copy

v: srcCode

v: displayName

v: display

v: coding

v: variable

v: display

v: copy

value: Id
  v: display

String
v: Address

String
v: Organization

value: String
  v: urn:uuid:

value: Id
  v: uuid3

name:
  v: organization
source:
  context:
    v: srcOrg
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: managingOrganization
  variable:
    v: reference
  transform:
    v: create
  parameter:
    value: String
      v: Reference
target:
  context:
    v: reference
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: evaluate
  parameter:
    value: String
      v: 'urn:uuid:' + %organization.id
dependent:
  name:
    v: ClinicalDocumentOrganization
  variable:
    v: srcOrg
  variable:
    v: organization

v: place names are usually stored with no parts

name:
  v: NarrativeLink
type mode:
  v: none
documentation:
  v: _________________________ Template Type not specified ___________________
input:
  name:
    v: url
  mode:
    v: source
input:
  name:
    v: ext
  type:
    v: Extension
  mode:
    v: target
rule:
  name:
    v: url
  source:
    context:
      v: url
  target:
    context:
      v: ext
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value: String
        v: http://hl7.org/fhir/StructureDefinition/narrativeLink
rule:
  name:
    v: value
  source:
    context:
      v: url
  target:
    context:
      v: ext
    context type:
      v: variable
    element:
      v: value
    variable:
      v: value
    transform:
      v: create
    parameter:
      value: String
        v: url
  target:
    context:
      v: value
    context type:
      v: variable
    element:
      v: value
    transform:
      v: copy
    parameter:
      value: Id
        v: url