cda2fhirSpecPrescription
type: StructureMap
node role: treeRoot
id:
  v: cda2fhirSpecPrescription
text:
  status:
    v: generated
  div: map "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirSpecPrescription" = "cda2fhirSpecPrescription" uses "http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument" alias ClinicalDocument as source uses "http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor" alias AssignedAuthor as queried uses "http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity" alias AssignedEntity as queried uses "http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity" alias AssociatedEntity as queried uses "http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization" alias CustodianOrganization as queried uses "http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf" alias OrganizationPartOf as queried uses "http://hl7.org/fhir/cda/StructureDefinition/Organization" alias rapresentedOrganization as queried uses "http://hl7.org/fhir/cda/StructureDefinition/Section" alias Section as queried uses "http://hl7.org/fhir/cda/StructureDefinition/PatientRole" alias PatientRole as queried uses "http://hl7.org/fhir/cda/StructureDefinition/AD" alias AD as source uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target uses "http://hl7.org/fhir/StructureDefinition/Composition" alias Composition as produced uses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as produced uses "http://hl7.org/fhir/StructureDefinition/Encounter" alias Encounter as produced uses "http://hl7.org/fhir/StructureDefinition/Person" alias Patient as produced uses "http://hl7.org/fhir/StructureDefinition/List" alias List as produced uses "http://hl7.org/fhir/StructureDefinition/Practitioner" alias Practitioner as produced uses "http://hl7.org/fhir/StructureDefinition/Organization" alias Organization as produced uses "http://hl7.org/fhir/cda/StructureDefinition/Act" alias Act as produced uses "http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ" alias IVL_PQ as source uses "http://hl7.org/fhir/cda/StructureDefinition/PQ" alias PQ as source uses "http://hl7.org/fhir/St…
url:
  v: http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirSpecPrescription
version:
  v: 0.1.0
name:
  v: cda2fhirSpecPrescription
status:
  v: draft
date:
  v: 2025-10-01T07:14:02+00:00
publisher:
  v: HL7 Italy
contact:
  name:
    v: HL7 Italy
  telecom:
    system:
      v: url
    value:
      v: http://hl7.it
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
    code:
      v: IT
    display:
      v: Italy
structure:
  url:
    v: http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument
    link: http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument
  mode:
    v: source
  alias:
    v: ClinicalDocument
structure:
  url:
    v: http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor
    link: http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor
  mode:
    v: queried
  alias:
    v: AssignedAuthor
structure:
  url:
    v: http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity
    link: http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity
  mode:
    v: queried
  alias:
    v: AssignedEntity
structure:
  url:
    v: http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity
    link: http://hl7.org/fhir/cda/StructureDefinition/AssociatedEntity
  mode:
    v: queried
  alias:
    v: AssociatedEntity
structure:
  url:
    v: http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization
    link: http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization
  mode:
    v: queried
  alias:
    v: CustodianOrganization
structure:
  url:
    v: http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf
    link: http://hl7.org/fhir/cda/StructureDefinition/OrganizationPartOf
  mode:
    v: queried
  alias:
    v: OrganizationPartOf
structure:
  url:
    v: http://hl7.org/fhir/cda/StructureDefinition/Organization
    link: http://hl7.org/fhir/cda/StructureDefinition/Organization
  mode:
    v: queried
  alias:
    v: rapresentedOrganization
structure:
  url:
    v: http://hl7.org/fhir/cda/StructureDefinition/Section
    link: http://hl7.org/fhir/cda/StructureDefinition/Section
  mode:
    v: queried
  alias:
    v: Section
structure:
  url:
    v: http://hl7.org/fhir/cda/StructureDefinition/PatientRole
    link: http://hl7.org/fhir/cda/StructureDefinition/PatientRole
  mode:
    v: queried
  alias:
    v: PatientRole
structure:
  url:
    v: http://hl7.org/fhir/cda/StructureDefinition/AD
    link: http://hl7.org/fhir/cda/StructureDefinition/AD
  mode:
    v: source
  alias:
    v: AD
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Bundle
    link: http://hl7.org/fhir/StructureDefinition/Bundle
  mode:
    v: target
  alias:
    v: Bundle
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Composition
    link: http://hl7.org/fhir/StructureDefinition/Composition
  mode:
    v: produced
  alias:
    v: Composition
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Patient
    link: http://hl7.org/fhir/StructureDefinition/Patient
  mode:
    v: produced
  alias:
    v: Patient
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Encounter
    link: http://hl7.org/fhir/StructureDefinition/Encounter
  mode:
    v: produced
  alias:
    v: Encounter
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Person
    link: http://hl7.org/fhir/StructureDefinition/Person
  mode:
    v: produced
  alias:
    v: Patient
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/List
    link: http://hl7.org/fhir/StructureDefinition/List
  mode:
    v: produced
  alias:
    v: List
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner
    link: http://hl7.org/fhir/StructureDefinition/Practitioner
  mode:
    v: produced
  alias:
    v: Practitioner
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Organization
    link: http://hl7.org/fhir/StructureDefinition/Organization
  mode:
    v: produced
  alias:
    v: Organization
structure:
  url:
    v: http://hl7.org/fhir/cda/StructureDefinition/Act
    link: http://hl7.org/fhir/cda/StructureDefinition/Act
  mode:
    v: produced
  alias:
    v: Act
structure:
  url:
    v: http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ
    link: http://hl7.org/fhir/cda/StructureDefinition/IVL-PQ
  mode:
    v: source
  alias:
    v: IVL_PQ
structure:
  url:
    v: http://hl7.org/fhir/cda/StructureDefinition/PQ
    link: http://hl7.org/fhir/cda/StructureDefinition/PQ
  mode:
    v: source

v: PQ

url:
  v: http://hl7.org/fhir/StructureDefinition/SimpleQuantity
  link: http://hl7.org/fhir/StructureDefinition/SimpleQuantity
mode:
  v: target
alias:
  v: SimpleQuantity

name:
  v: CdaToBundle
type mode:
  v: none
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: request
    variable:
      v: request
    transform:
      v: create
    parameter:
      value: string
        v: BackboneElement
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: method
    transform:
      v: copy
    parameter:
      value: string
        v: POST
  target:
    context:
      v: e
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: composition
    transform:
      v: create
    parameter:
      value: string
        v: Composition
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid1
    transform:
      v: uuid
  target:
    context:
      v: e
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: string
        v: https://example/Composition/
    parameter:
      value: id
        v: uuid1
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value: string
        v: Composition
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: e2
  target:
    context:
      v: e2
    context type:
      v: variable
    element:
      v: request
    variable:
      v: requestPAT
    transform:
      v: create
    parameter:
      value: string
        v: BackboneElement
  target:
    context:
      v: requestPAT
    context type:
      v: variable
    element:
      v: method
    transform:
      v: copy
    parameter:
      value: string
        v: PUT
  target:
    context:
      v: e2
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: patient
    transform:
      v: create
    parameter:
      value: string
        v: Patient
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid2
    transform:
      v: uuid
  target:
    context:
      v: e2
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: string
        v: https://example/Patient/
    parameter:
      value: id
        v: uuid2
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: e3
  target:
    context:
      v: e3
    context type:
      v: variable
    element:
      v: request

v: request

v: create

value: string
  v: BackboneElement

context:
  v: request
context type:
  v: variable
element:
  v: method
transform:
  v: copy
parameter:
  value: string
    v: POST

context:
  v: e3
context type:
  v: variable
element:
  v: resource
variable:
  v: encounter
transform:
  v: create
parameter:
  value: string
    v: Encounter

context:
  v: encounter
context type:
  v: variable
element:
  v: id
variable:
  v: uuid3
transform:
  v: uuid

context:
  v: e3
context type:
  v: variable
element:
  v: fullUrl
transform:
  v: append
parameter:
  value: string
    v: https://example/Encounter/
parameter:
  value: id
    v: uuid3

context:
  v: request
context type:
  v: variable
element:
  v: url
transform:
  v: copy
parameter:
  value: string
    v: Encounter

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

context:
  v: e4
context type:
  v: variable
element:
  v: request
variable:
  v: request
transform:
  v: create
parameter:
  value: string
    v: BackboneElement

context:
  v: request
context type:
  v: variable
element:
  v: method
transform:
  v: copy
parameter:
  value: string
    v: POST

context:
  v: e4
context type:
  v: variable
element:
  v: resource
variable:
  v: DocumentReference
transform:
  v: create
parameter:
  value: string
    v: DocumentReference

context:
  v: DocumentReference
context type:
  v: variable
element:
  v: id
variable:
  v: uuid4
transform:
  v: uuid

context:
  v: e4
context type:
  v: variable
element:
  v: fullUrl
transform:
  v: append
parameter:
  value: string
    v: https://example/DocumentReference/
parameter:
  value: id
    v: uuid4

context:
  v: request
context type:
  v: variable
element:
  v: url
transform:
  v: copy
parameter:
  value: string
    v: DocumentReference

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

name:
  v: patient
source:
  context:
    v: cda
  element:
    v: recordTarget
  variable:
    v: recordTarget
rule:
  name:
    v: recPat
  source:
    context:
      v: recordTarget
    element:
      v: patientRole
    variable:
      v: patient
  rule:
    name:
      v: idfr
    source:
      context:
        v: patient
      element:
        v: id
      variable:
        v: id
    target:
      context:
        v: patient
      context type:
        v: variable
      element:
        v: identifier
      variable:
        v: identifier
    rule:
      name:
        v: root1
    rule:
      name:
        v: value
    rule:
      name:
        v: assigningAuthorityName
  rule:
    name:
      v: ext
    source:
      context:
        v: patient
      element:
        v: id
      variable:
        v: id
      condition:
        v: (root = '2.16.840.1.113883.2.9.4.3.2') or (root = '2.16.840.1.113883.2.9.4.3.7') or (root = '2.16.840.1.113883.2.9.4.3.3') or (root = '2.16.840.1.113883.2.9.4.3.17') or (root = '2.16.840.1.113883.2.9.4.3.18') or (root = '2.16.840.1.113883.2.9.2.10.4.1.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1.1') or (root = '2.16.840.1.113883.2.9.2.170.4.1.1') or (root = '2.16.840.1.113883.2.9.2.180.4.1.1') or (root = '2.16.840.1.113883.2.9.2.190.4.1.1') or (root = '2.16.840.1.113883.2.9.2.200.4.1.1') or (root = '2.16.840.1.113883.2.9.2.10.4.1') or (root = '2.16.840.1.113883.2.9.2.20.4.1') or (root = '2.16.840.1.113883.2.9.2.30.4.1') or (root = '2.16.840.1.113883.2.9.2.41.4.1') or (root = '2.16.840.1.113883.2.9.2.42.4.1') or (root = '2.16.840.1.113883.2.9.2.50.4.1') or (root = '2.16.840.1.113883.2.9.2.60.4.1') or (root = '2.16.840.1.113883.2.9.2.70.4.1') or (root = '2.16.840.1.113883.2.9.2.80.4.1') or (root = '2.16.840.1.113883.2.9.2.90.4.1') or (root = '2.16.840.1.113883.2.9.2.100.4.1') or (root = '2.16.840.1.113883.2.9.2.110.4.1') or (root = '2.16.840.1.113883.2.9.2.120.4.1') or (root = '2.16.840.1.113883.2.9.2.130.4.1') or (root = '2.16.840.1.113883.2.9.2.140.4.1') or (root = '2.16.840.1.113883.2.9.2.150.4.1') or (root = '2.16.840.1.113883.2.9.2.160.4.1') or (root = '2.16.840.…
    rule:
      name:
        v: UUID

v: id

v: root

v: r

v: identifier

v: variable

v: system

v: translate

value: id
  v: r

value: string
  v: uri

v: id

v: extension

v: ext1

v: identifier

v: variable

v: value

v: copy

value: id
  v: ext1

v: id

v: assigningAuthorityName

v: s

v: identifier

v: variable

v: assigner

v: a

v: a

v: variable

v: display

v: copy

value: id
  v: s

v: id

v: extension

v: ext

v: requestPAT

v: variable

v: url

v: append

value: string
  v: Patient?identifier=

value: id
  v: ext

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: encounter
  type:
    v: Encounter
  mode:
    v: target
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
input:
  name:
    v: DocumentReference
  type:
    v: DocumentReference
  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: vvv
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: vvv
    transform:
      v: create
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: transaction
rule:
  name:
    v: date
  source:
    context:
      v: cda
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: timestamp
    transform:
      v: evaluate
    parameter:
      value: string
        v: timestamp.now()
rule:
  name:
    v: composition
  source:
    context:
      v: cda
  dependent:
    name:
      v: ClinicalDocumentComposition
    variable:
      v: cda
    variable:
      v: composition
    variable:
      v: patient
    variable:
      v: encounter
    variable:
      v: bundle
    variable:
      v: DocumentReference
rule:
  name:
    v: ServiceRequest
  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: request
    variable:
      v: request
    transform:
      v: create
    parameter:
      value: string
        v: BackboneElement
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: method
    transform:
      v: copy
    parameter:
      value: string
        v: POST
  target:
    context:
      v: e
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: ServiceRequest
    transform:
      v: create
    parameter:
      value: string
        v: ServiceRequest
  target:
    context:
      v: ServiceRequest
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid1

v: uuid

context:
  v: e
context type:
  v: variable
element:
  v: fullUrl
transform:
  v: append
parameter:
  value: string
    v: https://example/ServiceRequest/
parameter:
  value: id
    v: uuid1

context:
  v: request
context type:
  v: variable
element:
  v: url
transform:
  v: copy
parameter:
  value: string
    v: ServiceRequest

name:
  v: intent
source:
  context:
    v: cda
target:
  context:
    v: ServiceRequest
  context type:
    v: variable
  element:
    v: intent
  transform:
    v: copy
  parameter:
    value: string
      v: order

name:
  v: stats
source:
  context:
    v: cda
target:
  context:
    v: ServiceRequest
  context type:
    v: variable
  element:
    v: status
  transform:
    v: copy
  parameter:
    value: string
      v: unknown

name:
  v: reference
source:
  context:
    v: cda
target:
  context:
    v: ServiceRequest
  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: 'https://example/Patient/' + %patient.id

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

v: component

v: section

v: srcSection

v: code

context:
  v: srcSection
element:
  v: code

context:
  v: composition
context type:
  v: variable
element:
  v: section
variable:
  v: tgtSection

name:
  v: ClinicalDocumentSection
variable:
  v: cda
variable:
  v: srcSection
variable:
  v: patient
variable:
  v: tgtSection
variable:
  v: bundle
variable:
  v: encounter
variable:
  v: ServiceRequest

name:
  v: ClinicalDocumentSection
type mode:
  v: none
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: target
input:
  name:
    v: tgt
  mode:
    v: target
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
input:
  name:
    v: enc
  type:
    v: Encounter
  mode:
    v: target
input:
  name:
    v: ServiceRequest
  type:
    v: ServiceRequest
  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.dataString
rule:
  name:
    v: code
  source:
    context:
      v: src
    element:
      v: code
    variable:
      v: vvv
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: code
    variable:
      v: vvv
    transform:
      v: create
rule:
  name:
    v: Note
  source:
    context:
      v: src
    element:
      v: code
    variable:
      v: code
    condition:
      v: (code = '48767-8') or (code = '51851-4') or (code = '57827-8') or (code = '57828-6')
  rule:
    name:
      v: reference
    source:
      context:
        v: src
    target:
      context:
        v: tgt
      context type:
        v: variable
      element:
        v: entry
      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
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
  documentation:
    v: src.entry as entry then{
rule:
  name:
    v: Esenzioni
  source:
    context:
      v: src
    element:
      v: code
    variable:
      v: code

string
v: Reference

string
v: 'https://example/ServiceRequest/' + %ServiceRequest.id

string
v: generated

id
v: t

v: (code = '57827-8')

name:
  v: id
source:
  context:
    v: src
  element:
    v: id
  variable:
    v: vvv
target:
  context:
    v: ServiceRequest
  context type:
    v: variable
  element:
    v: identifier
  variable:
    v: vvv
  transform:
    v: create

name:
  v: entry
source:
  context:
    v: src
  element:
    v: entry
  variable:
    v: entry
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e11
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: request
  variable:
    v: request
  transform:
    v: create
  parameter:
    value: string
      v: BackboneElement
target:
  context:
    v: request
  context type:
    v: variable
  element:
    v: method
  transform:
    v: copy
  parameter:
    value: string
      v: POST
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: Coverage
  transform:
    v: create
  parameter:
    value: string
      v: Coverage
target:
  context:
    v: Coverage
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuid11
  transform:
    v: uuid
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: string
      v: https://example/Coverage/
  parameter:
    value: id
      v: uuid11
target:
  context:
    v: request
  context type:
    v: variable
  element:
    v: url
  transform:
    v: copy
  parameter:
    value: string
      v: Coverage
target:
  context:
    v: ServiceRequest
  context type:
    v: variable
  element:
    v: insurance
  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: 'https://example/Coverage/' + %Coverage.id
rule:
  name:
    v: reference
  source:
    context:
      v: src
  target:
    context:
      v: Coverage
    context type:
      v: variable
    element:
      v: beneficiary
    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: 'https://example/Patient/' + %patient.id
rule:
  name:
    v: reference
  source:
    context:
      v: src
  target:
    context:
      v: Coverage
    context type:
      v: variable
    element:
      v: payor
    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: 'https://example/Patient/' + %patient.id
rule:
  name:
    v: statusAbsent
  source:
    context:
      v: src
    condition:
      v: statusCode.exists().not()
  target:
    context:
      v: Coverage
    context type:
      v: variable
    element:
      v: status
    transform:
      v: copy

value: string
  v: active

name:
  v: act
source:
  context:
    v: entry
  element:
    v: act
  variable:
    v: act
rule:
  name:
    v: code
  source:
    context:
      v: act
    element:
      v: code
    variable:
      v: vvv
  target:
    context:
      v: Coverage
    context type:
      v: variable
    element:
      v: type
    variable:
      v: vvv
    transform:
      v: create

v: --------------Sezione Esenzioni------------------------------------------------------------------------------------------------------------------------------------

name:
  v: Esenzioni
source:
  context:
    v: src
  element:
    v: code
  variable:
    v: code
  condition:
    v: (code = '57828-6')
rule:
  name:
    v: entry
  source:
    context:
      v: src
    element:
      v: entry
    variable:
      v: entry
  rule:
    name:
      v: Observation
    source:
      context:
        v: entry
      element:
        v: observation
      variable:
        v: observation
    rule:
      name:
        v: code
    rule:
      name:
        v: priorityCode
      documentation:
        v: observation.priorityCode->ServiceRequest.priority"priority";
    rule:
      name:
        v: value
    rule:
      name:
        v: Location
    rule:
      name:
        v: entryrelationshipCondition
      documentation:
        v: ----------------codice Patologia------------------------------------------------------------------------------------------------------------------------------------
    rule:
      name:
        v: entryRelationship
      documentation:
        v: ---------Tipo di Visita---------------------------------------------------------------------------------------------------------------------------------
    rule:
      name:
        v: entryRelationship
      documentation:
        v: ------------Nota esplicita--------------------------------------------------------------------------------------------------------------------------------------------
    rule:
      name:
        v: Act
    rule:
      name:
        v: Act
      documentation:
        v: -----Sedute-----------------------------------------------------------------------------------------------------------------------------------------------
documentation:
  v: -------------Sezione Prescrizioni-------------------------------------------------------------------------------------------------------------------------------------

v: observation

v: code

v: vvv

v: ServiceRequest

v: variable

v: code

v: vvv

v: create

v: observation

v: priorityCode

v: priorityCode

v: priority

context:
  v: priorityCode
element:
  v: code
variable:
  v: v

context:
  v: ServiceRequest
context type:
  v: variable
element:
  v: priority
transform:
  v: translate
parameter:
  value: id
    v: v
parameter:
  value: string
    v: #priority
parameter:
  value: string
    v: code

v: observation

v: repeatNumber

v: repeatNumber

v: ServiceRequest

v: variable

v: quantity

v: Ratio

v: create

value: string
  v: Quantity

v: value

context:
  v: repeatNumber
element:
  v: value
variable:
  v: value

context:
  v: Ratio
context type:
  v: variable
element:
  v: value
transform:
  v: copy
parameter:
  value: id
    v: value

v: observation

v: participant

v: participant

v: PartROle

context:
  v: participant
element:
  v: participantRole
variable:
  v: partRol

name:
  v: ScopingEntity
source:
  context:
    v: partRol
  element:
    v: scopingEntity
  variable:
    v: scopingEntity
rule:
  name:
    v: code
  source:
    context:
      v: scopingEntity
    element:
      v: code
    variable:
      v: vvv
  target:
    context:
      v: ServiceRequest
    context type:
      v: variable
    element:
      v: locationCode
    variable:
      v: vvv
    transform:
      v: create

v: observation

v: entryRelationship

v: entryRelationship

v: act

context:
  v: entryRelationship
element:
  v: act
variable:
  v: act

name:
  v: Condition
source:
  context:
    v: act
  element:
    v: templateId
  variable:
    v: temid
  condition:
    v: (root = '2.16.840.1.113883.3.1937.777.63.10.275')
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e11
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: request
  variable:
    v: request
  transform:
    v: create
  parameter:
    value: string
      v: BackboneElement
target:
  context:
    v: request
  context type:
    v: variable
  element:
    v: method
  transform:
    v: copy
  parameter:
    value: string
      v: POST
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: Condition
  transform:
    v: create
  parameter:
    value: string
      v: Condition
target:
  context:
    v: Condition
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuid11
  transform:
    v: uuid
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: string
      v: https://example/Condition/
  parameter:
    value: id
      v: uuid11
target:
  context:
    v: request
  context type:
    v: variable
  element:
    v: url
  transform:
    v: copy
  parameter:
    value: string
      v: Condition
target:
  context:
    v: ServiceRequest
  context type:
    v: variable
  element:
    v: reasonReference
  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: 'https://example/Condition/' + %Condition.id
rule:
  name:
    v: reference
  source:
    context:
      v: act
  target:
    context:
      v: Condition
    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: 'https://example/Patient/' + %patient.id
rule:
  name:
    v: reference
  source:
    context:
      v: act
  target:
    context:
      v: Condition
    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: 'https://example/Encounter/' + %enc.id
rule:
  name:
    v: status
  source:
    context:
      v: act
  target:
    context:
      v: Condition
    context type:
      v: variable
    element:
      v: clinicalStatus
    variable:
      v: status2

name:
  v: st3
source:
  context:
    v: act
target:
  context:
    v: status2
  context type:
    v: variable
  element:
    v: coding
  variable:
    v: status3
rule:
  name:
    v: finald
  source:
    context:
      v: act
  target:
    context:
      v: status3
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value: string
        v: unknown
rule:
  name:
    v: system
  source:
    context:
      v: act
  target:
    context:
      v: status3
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value: string
        v: http://terminology.hl7.org/CodeSystem/condition-clinical

name:
  v: code
source:
  context:
    v: act
  element:
    v: code
  variable:
    v: vvv
target:
  context:
    v: Condition
  context type:
    v: variable
  element:
    v: code
  variable:
    v: vvv
  transform:
    v: create

v: observation

v: entryRelationship

v: entryRelationship

v: Act

context:
  v: entryRelationship
element:
  v: encounter
variable:
  v: encounter

name:
  v: templateId
source:
  context:
    v: encounter
  element:
    v: templateId
  variable:
    v: temid
  condition:
    v: (root = '2.16.840.1.113883.3.1937.777.63.10.276')
rule:
  name:
    v: encounter
  source:
    context:
      v: encounter
  target:
    context:
      v: ServiceRequest
    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: 'https://example/Encounter/' + %enc.id
  rule:
    name:
      v: Act
    source:
      context:
        v: observation
      element:
        v: entryRelationship
      variable:
        v: entryRelationship
    rule:
      name:
        v: templateId

v: entryRelationship

v: encounter

v: encounter1

v: reference

context:
  v: encounter1
element:
  v: templateId
variable:
  v: temid
condition:
  v: (root = '2.16.840.1.113883.3.1937.777.63.10.281')

name:
  v: class
source:
  context:
    v: encounter1
  element:
    v: code
  variable:
    v: code1
target:
  context:
    v: enc
  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: code1
    element:
      v: code
    variable:
      v: code
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: cast
    parameter:
      value: id
        v: code
    parameter:
      value: string
        v: string
rule:
  name:
    v: codeSystem
  source:
    context:
      v: code1
    element:
      v: codeSystem
    variable:
      v: system
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: translate
    parameter:
      value: id
        v: system
    parameter:
      value: string
        v: http://hl7.org/fhir/ConceptMap/special-oid2uri
    parameter:
      value: string
        v: uri
rule:
  name:
    v: displayName
  source:
    context:
      v: code1
    element:
      v: displayName
    variable:
      v: display
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: display
    transform:
      v: cast
    parameter:
      value: id
        v: display
    parameter:
      value: string
        v: string
documentation:
  v: encounter1.code -> enc.class;

v: observation

v: entryRelationship

v: entryRelationship

v: Act

context:
  v: entryRelationship
element:
  v: act
variable:
  v: act

name:
  v: templateId
source:
  context:
    v: act
  element:
    v: templateId
  variable:
    v: temid
  condition:
    v: (root = '2.16.840.1.113883.3.1937.777.63.10.274')
rule:
  name:
    v: reference
  source:
    context:
      v: act
    element:
      v: text
    variable:
      v: text
  target:
    context:
      v: ServiceRequest
    context type:
      v: variable
    element:
      v: note
    variable:
      v: note
  rule:
    name:
      v: tcx
    source:
      context:
        v: text
      element:
        v: reference
      variable:
        v: t
    rule:
      name:
        v: reference

v: t

v: value

v: l

v: note

v: variable

v: text

v: copy

value: id
  v: l

v: observation

v: entryRelationship

v: entryRelationship

v: templateId

context:
  v: entryRelationship
element:
  v: act
variable:
  v: act

name:
  v: reference
source:
  context:
    v: act
  element:
    v: templateId
  variable:
    v: temid
  condition:
    v: (root = '2.16.840.1.113883.3.1937.777.63.10.278')
rule:
  name:
    v: code
  source:
    context:
      v: act
    element:
      v: code
    variable:
      v: vvv
  target:
    context:
      v: ServiceRequest
    context type:
      v: variable
    element:
      v: reasonCode
    variable:
      v: vvv
    transform:
      v: create

v: observation

v: entryRelationship

v: entryRelationship

v: templateId

context:
  v: entryRelationship
element:
  v: observation
variable:
  v: observation

name:
  v: Timing
source:
  context:
    v: observation
  element:
    v: templateId
  variable:
    v: temid
  condition:
    v: (root = '2.16.840.1.113883.3.1937.777.63.10.277')
rule:
  name:
    v: Count
  source:
    context:
      v: observation
    element:
      v: repeatNumber
    variable:
      v: repeatNumber
  target:
    context:
      v: ServiceRequest
    context type:
      v: variable
    element:
      v: occurrence
    variable:
      v: Timing
    transform:
      v: create
    parameter:
      value: string
        v: Timing
  rule:
    name:
      v: event
    source:
      context:
        v: repeatNumber
    target:
      context:
        v: Timing
      context type:
        v: variable
      element:
        v: repeat
      variable:
        v: repeat
    rule:
      name:
        v: count

v: repeatNumber

v: value

v: value

v: repeat

v: variable

v: count

v: copy

value: id
  v: value

name:
  v: Annotazioni
source:
  context:
    v: src
  element:
    v: code
  variable:
    v: code
  condition:
    v: (code = '48767-8')
rule:
  name:
    v: entry
  source:
    context:
      v: src
    element:
      v: entry
    variable:
      v: entry
  rule:
    name:
      v: act
    source:
      context:
        v: entry
      element:
        v: act
      variable:
        v: act
    rule:
      name:
        v: reference
documentation:
  v: ------------Sezione Annotazioni-----------------------------------------------------------------------------------------------------------------------------------------

v: act

v: text

v: text

v: ServiceRequest

v: variable

v: note

v: note

v: tcx

context:
  v: text
element:
  v: reference
variable:
  v: t

name:
  v: reference
source:
  context:
    v: t
  element:
    v: value
  variable:
    v: l
target:
  context:
    v: note
  context type:
    v: variable
  element:
    v: text
  transform:
    v: copy
  parameter:
    value: id
      v: l

name:
  v: MessaggioRegionale
source:
  context:
    v: src
  element:
    v: code
  variable:
    v: code
  condition:
    v: (code = '51851-4')
rule:
  name:
    v: reference
  source:
    context:
      v: src
    element:
      v: text
    variable:
      v: cdaText
  target:
    context:
      v: ServiceRequest
    context type:
      v: variable
    element:
      v: note
    variable:
      v: note
  rule:
    name:
      v: tcx
    source:
      context:
        v: cdaText
      variable:
        v: text
    rule:
      name:
        v: reference
documentation:
  v: ----------Sezione Messaggio Regionale-----------------------------------------------------------------------------------------------------------------------------------

v: text

v: l

v: note

v: variable

v: text

v: copy

value: id
  v: l

name:
  v: ParametriVitali
source:
  context:
    v: src
  element:
    v: code
  variable:
    v: code
  condition:
    v: (code = '8716-3')
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e11
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: request
  variable:
    v: request
  transform:
    v: create
  parameter:
    value: string
      v: BackboneElement
target:
  context:
    v: request
  context type:
    v: variable
  element:
    v: method
  transform:
    v: copy
  parameter:
    value: string
      v: POST
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: Observation
  transform:
    v: create
  parameter:
    value: string
      v: Observation
target:
  context:
    v: Observation
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuid11
  transform:
    v: uuid
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: string
      v: https://example/Observation/
  parameter:
    value: id
      v: uuid11
target:
  context:
    v: request
  context type:
    v: variable
  element:
    v: url
  transform:
    v: copy
  parameter:
    value: string
      v: Observation
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: entry
  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: 'https://example/Observation/' + %Observation.id
rule:
  name:
    v: reference
  source:
    context:
      v: src
  target:
    context:
      v: Observation
    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: 'https://example/Patient/' + %patient.id
rule:
  name:
    v: reference
  source:
    context:
      v: src
  target:
    context:
      v: Observation
    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: 'https://example/Encounter/' + %enc.id
rule:
  name:
    v: code
  source:
    context:
      v: src
    element:
      v: code
    variable:
      v: vvv
  target:
    context:
      v: Observation
    context type:
      v: variable

v: code

v: vvv

v: create

name:
  v: statuscode
source:
  context:
    v: src
  condition:
    v: Observation.statusCode.exists().not()
rule:
  name:
    v: status
  source:
    context:
      v: src
  target:
    context:
      v: Observation
    context type:
      v: variable
    element:
      v: status
    transform:
      v: copy
    parameter:
      value: string
        v: final

name:
  v: reference
source:
  context:
    v: src
  element:
    v: text
  variable:
    v: cdaText
target:
  context:
    v: Observation
  context type:
    v: variable
  element:
    v: note
  variable:
    v: note
rule:
  name:
    v: reference
  source:
    context:
      v: cdaText
    variable:
      v: t
  target:
    context:
      v: note
    context type:
      v: variable
    element:
      v: text
    transform:
      v: copy
    parameter:
      value: id
        v: t

v: -------Sezione Parametri Vitali---------------------------------------------------------------------------------------------------------------------------------------

name:
  v: Allergie
source:
  context:
    v: src
  element:
    v: code
  variable:
    v: code
  condition:
    v: (code = '48765-2')
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e11
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: request
  variable:
    v: request
  transform:
    v: create
  parameter:
    value: string
      v: BackboneElement
target:
  context:
    v: request
  context type:
    v: variable
  element:
    v: method
  transform:
    v: copy
  parameter:
    value: string
      v: POST
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: AllergyIntolerance
  transform:
    v: create
  parameter:
    value: string
      v: AllergyIntolerance
target:
  context:
    v: AllergyIntolerance
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuid11
  transform:
    v: uuid
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: string
      v: https://example/AllergyIntolerance/
  parameter:
    value: id
      v: uuid11
target:
  context:
    v: request
  context type:
    v: variable
  element:
    v: url
  transform:
    v: copy
  parameter:
    value: string
      v: AllergyIntolerance
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: entry
  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: 'https://example/AllergyIntolerance/' + %AllergyIntolerance.id
rule:
  name:
    v: reference
  source:
    context:
      v: src
  target:
    context:
      v: AllergyIntolerance
    context type:
      v: variable
    element:
      v: patient
    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: 'https://example/Patient/' + %patient.id
rule:
  name:
    v: allergy
  source:
    context:
      v: src
  target:
    context:
      v: AllergyIntolerance
    context type:
      v: variable
    element:
      v: clinicalStatus
    variable:
      v: status
    transform:
      v: create
    parameter:
      value: string
        v: CodeableConcept
  rule:
    name:
      v: text
    source:
      context:
        v: src
    target:
      context:
        v: status
      context type:
        v: variable
      element:
        v: text
      transform:
        v: copy
      parameter:
        value: string
  rule:
    name:
      v: coding
    source:
      context:
        v: src
    target:
      context:
        v: status
      context type:
        v: variable

string
v: string

v: coding

v: coding

v: create

value: string
  v: Coding

name:
  v: active
source:
  context:
    v: src
target:
  context:
    v: coding
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value: string
      v: active

name:
  v: system
source:
  context:
    v: src
target:
  context:
    v: coding
  context type:
    v: variable
  element:
    v: system
  transform:
    v: copy
  parameter:
    value: string
      v: http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical

name:
  v: reference
source:
  context:
    v: src
  element:
    v: text
  variable:
    v: cdaText
target:
  context:
    v: AllergyIntolerance
  context type:
    v: variable
  element:
    v: note
  variable:
    v: note
rule:
  name:
    v: reference
  source:
    context:
      v: cdaText
    variable:
      v: t
  target:
    context:
      v: note
    context type:
      v: variable
    element:
      v: text
    transform:
      v: copy
    parameter:
      value: id
        v: t

v: -------Sezione Allergie------------------------------------------------------------------------------------------------------------------------------------------------

name:
  v: StatoFunzionale
source:
  context:
    v: src
  element:
    v: code
  variable:
    v: code
  condition:
    v: (code = '47420-5')
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e11
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: request
  variable:
    v: request
  transform:
    v: create
  parameter:
    value: string
      v: BackboneElement
target:
  context:
    v: request
  context type:
    v: variable
  element:
    v: method
  transform:
    v: copy
  parameter:
    value: string
      v: POST
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: Observation
  transform:
    v: create
  parameter:
    value: string
      v: Observation
target:
  context:
    v: Observation
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuid11
  transform:
    v: uuid
target:
  context:
    v: e11
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: string
      v: https://example/Observation/
  parameter:
    value: id
      v: uuid11
target:
  context:
    v: request
  context type:
    v: variable
  element:
    v: url
  transform:
    v: copy
  parameter:
    value: string
      v: Observation
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: entry
  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: 'https://example/Observation/' + %Observation.id
rule:
  name:
    v: reference
  source:
    context:
      v: src
  target:
    context:
      v: Observation
    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: 'https://example/Patient/' + %patient.id
rule:
  name:
    v: reference
  source:
    context:
      v: src
  target:
    context:
      v: Observation
    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: 'https://example/Encounter/' + %enc.id
rule:
  name:
    v: code
  source:
    context:
      v: src
    element:
      v: code
    variable:
      v: vvv
  target:
    context:
      v: Observation
    context type:
      v: variable

v: code

v: vvv

v: create

name:
  v: statuscode
source:
  context:
    v: src
  condition:
    v: Observation.statusCode.exists().not()
rule:
  name:
    v: status
  source:
    context:
      v: src
  target:
    context:
      v: Observation
    context type:
      v: variable
    element:
      v: status
    transform:
      v: copy
    parameter:
      value: string
        v: final

name:
  v: reference
source:
  context:
    v: src
  element:
    v: text
  variable:
    v: cdaText
target:
  context:
    v: Observation
  context type:
    v: variable
  element:
    v: note
  variable:
    v: note
rule:
  name:
    v: reference
  source:
    context:
      v: cdaText
    variable:
      v: t
  target:
    context:
      v: note
    context type:
      v: variable
    element:
      v: text
    transform:
      v: copy
    parameter:
      value: id
        v: t

v: ------Sezione Stato Funzionale------------------------------------------------------------------------------------------------------------------------------------------