cda2fhirPs
type: StructureMap
node role: treeRoot
id:
  v: cda2fhirPs
text:
  status:
    v: generated
  div: map "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirPs" = "cda2fhirPs" 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/StructureDefinition/SimpleQuan…
url:
  v: http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirPs
version:
  v: 0.1.0
name:
  v: cda2fhirPs
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: finished
  source:
    context:
      v: cda
  target:
    context:
      v: encounter
    context type:
      v: variable
    element:
      v: status
    transform:
      v: copy
    parameter:
      value: string
        v: finished
rule:
  name:
    v: coding
  source:
    context:
      v: cda
  target:
    context:
      v: encounter
    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: cda
    target:
      context:
        v: coding
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
      parameter:
        value: string
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()
  documentation:
    v: cda.effectiveTime -> bundle.timestamp;
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: diagnostic
  source:
    context:
      v: cda

string
v: summary

v: component

v: component

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
    source:
      context:
        v: component
      element:
        v: section
      variable:
        v: srcSection
    rule:
      name:
        v: code

v: srcSection

v: code

v: composition

v: variable

v: section

v: tgtSection

v: ClinicalDocumentSection

v: cda

v: srcSection

v: patient

v: tgtSection

v: bundle

v: encounter

v: composition

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: composition
  type:
    v: Composition
  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: entry
  source:
    context:
      v: src
    element:
      v: entry
    variable:
      v: entry
  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
    rule:
      name:
        v: narrativeText
  rule:
    name:
      v: entryObs
    source:
      context:
        v: src
      element:
        v: code
      condition:
        v: (code = '30954-2')
    rule:
      name:
        v: diagnostic
    documentation:
      v: sezioni che sono strutturate
  rule:
    name:
      v: entryObs
    source:
      context:
        v: src
      element:
        v: code
      condition:
        v: (code = '29762-2') or (code = '10162-6')
    rule:
      name:
        v: obs1
  rule:
    name:
      v: organizer
    source:
      context:
        v: src
      element:
        v: code
      condition:
        v: (code = '8716-3') or (code = '47420-5')
    rule:
      name:
        v: obs2
    rule:
      name:
        v: obs2
  rule:
    name:
      v: listaDeiProblemi
    source:
      context:
        v: src
      element:
        v: code
      condition:
        v: code = '11450-4'
    rule:
      name:
        v: condition
  rule:
    name:
      v: entryAct
    source:
      context:
        v: src
      element:
        v: code
      condition:
        v: (code = '48765-2')
    rule:
      name:
        v: allergy
  rule:
    name:
      v: terapia

v: cdaText

v: fhirText

v: variable

v: status

v: copy

value: string
  v: generated

v: cdaText

v: t

v: fhirText

v: variable

v: div

v: copy

value: id
  v: t

v: entry

v: organizer

v: organizer

v: bundle

v: variable

v: entry

v: e0

v: e0

v: variable

v: request

v: request

v: create

value: string
  v: BackboneElement

v: request

v: variable

v: method

v: copy

value: string
  v: POST

v: e0

v: variable

v: resource

v: dia

v: create

value: string
  v: DiagnosticReport

v: dia

v: variable

v: id

v: uuid0

v: uuid

v: e0

v: variable

v: fullUrl

v: append

value: id
  v: uuid0

v: request

v: variable

v: url

v: copy

value: string
  v: DiagnosticReport

v: tgt

v: variable

v: entry

v: reference

v: create

value: string
  v: Reference

v: reference

v: variable

v: reference

v: evaluate

value: string
  v: 'https://example/DiagnosticReport/' + %dia.id

v: DiagnosticReportFunction

v: organizer

v: patient

v: enc

v: dia

v: bundle

v: entry

v: observation

v: observation

v: bundle

v: variable

v: entry

v: e1

v: e1

v: variable

v: request

v: request

v: create

value: string
  v: BackboneElement

v: request

v: variable

v: method

v: copy

value: string
  v: POST

v: e1

v: variable

v: resource

v: obs1

v: create

value: string
  v: Observation

v: obs1

v: variable

v: id

v: uuid1

v: uuid

v: e1

v: variable

v: fullUrl

v: append

value: id
  v: uuid1

v: request

v: variable

v: url

v: copy

value: string
  v: Observation

v: tgt

v: variable

v: entry

v: reference

v: create

value: string
  v: Reference

v: reference

v: variable

v: reference

v: evaluate

value: string
  v: 'https://example/Observation/' + %obs1.id

v: Observation

v: observation

v: patient

v: enc

v: obs1

v: bundle

v: entry

v: organizer

v: organizer

v: bundle

v: variable

v: entry

v: e2

v: e2

v: variable

v: request

v: request

v: create

value: string
  v: BackboneElement

v: request

v: variable

v: method

v: copy

value: string
  v: POST

v: e2

v: variable

v: resource

v: obs2

v: create

value: string
  v: Observation

v: obs2

v: variable

v: id

v: uuid2

v: uuid

v: e2

v: variable

v: fullUrl

v: append

value: id
  v: uuid2

v: request

v: variable

v: url

v: copy

value: string
  v: Observation

v: tgt

v: variable

v: entry

v: reference

v: create

value: string
  v: Reference

v: reference

v: variable

v: reference

v: evaluate

value: string
  v: 'https://example/Observation/' + %obs2.id

v: ObservationOrganizer

v: src

v: organizer

v: patient

v: enc

v: obs2

v: bundle

v: entry

v: observation

v: organizer

v: bundle

v: variable

v: entry

v: e2

v: e2

v: variable

v: request

v: request

v: create

value: string
  v: BackboneElement

v: request

v: variable

v: method

v: copy

value: string
  v: POST

v: e2

v: variable

v: resource

v: obs2

v: create

value: string
  v: Observation

v: obs2

v: variable

v: id

v: uuid2

v: uuid

v: e2

v: variable

v: fullUrl

v: append

value: id
  v: uuid2

v: request

v: variable

v: url

v: copy

value: string
  v: Observation

v: tgt

v: variable

v: entry

v: reference

v: create

value: string
  v: Reference

v: reference

v: variable

v: reference

v: evaluate

value: string
  v: 'https://example/Observation/' + %obs2.id

v: ObservationOrganizer

v: src

v: organizer

v: patient

v: enc

v: obs2

v: bundle

v: entry

v: act

v: act

v: bundle

v: variable

v: entry

v: e3

v: e3

v: variable

v: request

v: request

v: create

value: string
  v: BackboneElement

v: request

v: variable

v: method

v: copy

value: string
  v: POST

v: e3

v: variable

v: resource

v: condition

v: create

value: string
  v: Condition

v: condition

v: variable

v: id

v: uuid3

v: uuid

v: e3

v: variable

v: fullUrl

v: append

value: id
  v: uuid3

v: request

v: variable

v: url

v: copy

value: string
  v: Condition

v: tgt

v: variable

v: entry

v: reference

v: create

value: string
  v: Reference

v: reference

v: variable

v: reference

v: evaluate

value: string
  v: 'https://example/Condition/' + %condition.id

v: ConditionFunction

v: act

v: condition

v: patient

v: enc

v: bundle

v: entry

v: act

v: act

v: bundle

v: variable

v: entry

v: e5

v: e5

v: variable

v: request

v: request

v: create

value: string
  v: BackboneElement

v: request

v: variable

v: method

v: copy

value: string
  v: POST

v: e5

v: variable

v: resource

v: allergy

v: create

value: string
  v: AllergyIntolerance

v: allergy

v: variable

v: id

v: uuid5

v: uuid

v: e5

v: variable

v: fullUrl

v: append

value: id
  v: uuid5

v: request

v: variable

v: url

v: copy

value: string
  v: AllergyIntolerance

v: tgt

v: variable

v: entry

v: reference

v: create

value: string
  v: Reference

v: reference

v: variable

v: reference

v: evaluate

value: string
  v: 'https://example/AllergyIntolerance/' + %allergy.id

v: allergyFunction

v: act

v: allergy

v: patient

v: enc

context:
  v: src
element:
  v: code
condition:
  v: code = '10160-0'

name:
  v: TerapiaFarmacologica
source:
  context:
    v: entry
  element:
    v: substanceAdministration
  variable:
    v: subAdmin
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: e6
target:
  context:
    v: e6
  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: e6
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: medicationstatement
  transform:
    v: create
  parameter:
    value: string
      v: MedicationStatement
target:
  context:
    v: medicationstatement
  context type:
    v: variable
  element:
    v: id
  variable:
    v: uuid6
  transform:
    v: uuid
target:
  context:
    v: e6
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value: string
      v: https://example/MedicationStatement/
  parameter:
    value: id
      v: uuid6
target:
  context:
    v: request
  context type:
    v: variable
  element:
    v: url
  transform:
    v: copy
  parameter:
    value: string
      v: MedicationStatement
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/MedicationStatement/' + %medicationstatement.id
dependent:
  name:
    v: MedicationStatement
  variable:
    v: subAdmin
  variable:
    v: medicationstatement
  variable:
    v: patient
  variable:
    v: enc
  variable:
    v: bundle

name:
  v: vacc
source:
  context:
    v: src
  element:
    v: code
  condition:
    v: code = '11369-6'
rule:
  name:
    v: immunization
  source:
    context:
      v: entry
    element:
      v: substanceAdministration
    variable:
      v: subVACC
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: e7
  target:
    context:
      v: e7
    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: e7
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: immunization
    transform:
      v: create
    parameter:
      value: string
        v: Immunization
  target:
    context:
      v: immunization
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid7
    transform:
      v: uuid
  target:
    context:
      v: e7
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: string
        v: https://example/Immunization/
    parameter:
      value: id
        v: uuid7
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value: string
        v: Immunization
  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/Immunization/' + %immunization.id
  dependent:
    name:
      v: Immunization
    variable:
      v: subVACC
    variable:
      v: patient
    variable:
      v: enc
    variable:
      v: immunization
    variable:
      v: bundle

name:
  v: family
source:
  context:
    v: src
  element:
    v: code
  condition:
    v: code = '10157-6'
rule:
  name:
    v: family
  source:
    context:
      v: entry
    element:
      v: organizer
    variable:
      v: organizer
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: e12
  target:
    context:
      v: e12
    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: e12
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: familyMember
    transform:
      v: create
    parameter:
      value: string
        v: FamilyMemberHistory
  target:
    context:
      v: familyMember
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid12
    transform:
      v: uuid
  target:
    context:
      v: e12
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: string
        v: https://example/FamilyMemberHistory/
    parameter:
      value: id
        v: uuid12
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value: string
        v: FamilyMemberHistory
  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/FamilyMemberHistory/' + %familyMember.id
  dependent:
    name:
      v: FamilyMemberFunction
    variable:
      v: organizer
    variable:
      v: familyMember
    variable:
      v: patient

name:
  v: impianti
source:
  context:
    v: src
  element:
    v: code
  condition:
    v: code = '46264-8'
rule:
  name:
    v: protesi
  source:
    context:
      v: entry
    element:
      v: supply
    variable:
      v: supply
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: e8
  target:
    context:
      v: e8
    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: e8
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: procedure
    transform:
      v: create
    parameter:
      value: string
        v: Procedure
  target:
    context:
      v: procedure
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid8
    transform:
      v: uuid
  target:
    context:
      v: e8
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: string
        v: https://example/Procedure/
    parameter:
      value: id
        v: uuid8
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value: string
        v: Procedure
  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/Procedure/' + %procedure.id
  dependent:
    name:
      v: Procedure
    variable:
      v: supply
    variable:
      v: patient
    variable:
      v: enc
    variable:
      v: procedure
    variable:
      v: bundle

name:
  v: trattamentiProcedure
source:
  context:
    v: src
  element:
    v: code
  condition:
    v: code = '47519-4'
rule:
  name:
    v: tratt
  source:
    context:
      v: entry
    element:
      v: procedure
    variable:
      v: procedure
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: e9
  target:
    context:
      v: e9
    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: e9
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: procedure2
    transform:
      v: create
    parameter:
      value: string
        v: Procedure
  target:
    context:
      v: procedure2
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid9
    transform:
      v: uuid
  target:
    context:
      v: e9
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: string
        v: https://example/Procedure/
    parameter:
      value: id
        v: uuid9
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value: string
        v: Procedure
  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/Procedure/' + %procedure2.id
  dependent:
    name:
      v: Procedure
    variable:
      v: procedure
    variable:
      v: patient
    variable:
      v: enc
    variable:
      v: procedure2
    variable:
      v: bundle

name:
  v: visiteRicoveri
source:
  context:
    v: src
  element:
    v: code
  condition:
    v: code = '46240-8'
rule:
  name:
    v: encounter
  source:
    context:
      v: entry
    element:
      v: encounter
    variable:
      v: encounter
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: e9
  target:
    context:
      v: e9
    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: e9
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: encounterF
    transform:
      v: create
    parameter:
      value: string
        v: Encounter
  target:
    context:
      v: encounterF
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid9
    transform:
      v: uuid
  target:
    context:
      v: e9
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: string
        v: https://example/Encounter/
    parameter:
      value: id
        v: uuid9
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value: string
        v: Encounter
  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/Encounter/' + %encounterF.id
  dependent:
    name:
      v: EncounterFunction
    variable:
      v: encounter
    variable:
      v: patient
    variable:
      v: enc
    variable:
      v: encounterF
    variable:
      v: bundle
  documentation:
    v: entry.encounter as encounter -> enc then{

name:
  v: esenzioni
source:
  context:
    v: src
  element:
    v: code
  condition:
    v: code = '57827-8'
rule:
  name:
    v: esen
  source:
    context:
      v: entry
    element:
      v: act
    variable:
      v: act
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: e13
  target:
    context:
      v: e13
    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: e13
    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: uuid13
    transform:
      v: uuid
  target:
    context:
      v: e13
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: string
        v: https://example/Coverage/
    parameter:
      value: id
        v: uuid13
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value: string
        v: Coverage
  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/Coverage/' + %coverage.id
  dependent:
    name:
      v: Coverage
    variable:
      v: act
    variable:
      v: patient
    variable:
      v: enc
    variable:
      v: coverage
    variable:
      v: bundle

name:
  v: retiPatologia
source:
  context:
    v: src
  element:
    v: code
  condition:
    v: code = 'PSSIT99'
rule:
  name:
    v: OrgAffiliation
  source:
    context:
      v: entry
    element:
      v: act
    variable:
      v: act
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: e14
  target:
    context:
      v: e14
    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: e14
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: affiliation
    transform:
      v: create
    parameter:
      value: string
        v: OrganizationAffiliation
  target:
    context:
      v: affiliation
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid14
    transform:
      v: uuid
  target:
    context:
      v: e14
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: string
        v: https://example/OrganizationAffiliation/
    parameter:
      value: id
        v: uuid14
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value: string
        v: OrganizationAffiliation
  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/OrganizationAffiliation/' + %affiliation.id
  dependent:
    name:
      v: OrganizationAffiliation
    variable:
      v: act
    variable:
      v: patient
    variable:
      v: enc
    variable:
      v: affiliation
    variable:
      v: bundle

name:
  v: esiste
source:
  context:
    v: src
  condition:
    v: src.entry.exists()
rule:
  name:
    v: raccoglitore
  source:
    context:
      v: src
    element:
      v: code
    condition:
      v: code = '18776-5'
  rule:
    name:
      v: pianiCura
    source:
      context:
        v: src
    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
    target:
      context:
        v: request
      context type:
        v: variable
      element:
        v: method
      transform:
        v: copy
      parameter:
        value: string
    target:
      context:
        v: e11
      context type:
        v: variable
      element:
        v: resource
      variable:
        v: careplan
      transform:
        v: create
      parameter:
        value: string
    target:
      context:
        v: careplan
      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
      parameter:
        value: id
    target:
      context:
        v: request
      context type:
        v: variable
      element:
        v: url
      transform:
        v: copy
      parameter:
        value: string
    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: prestazioni

string
v: BackboneElement

string
v: POST

string
v: CarePlan

id
v: uuid11

string
v: CarePlan

string
v: Reference

string
v: 'https://example/CarePlan/' + %careplan.id

v: src

v: entry

v: entry

v: CarePlanFunction

v: entry

v: careplan

v: patient

v: enc

v: bundle

name:
  v: code
source:
  context:
    v: src
  condition:
    v: src.entry.exists().not()
rule:
  name:
    v: familyraccoglitore
  source:
    context:
      v: src
    element:
      v: code
    condition:
      v: code = '10157-6'
  rule:
    name:
      v: family
    source:
      context:
        v: src
      element:
        v: text
      variable:
        v: text
    target:
      context:
        v: bundle
      context type:
        v: variable
      element:
        v: entry
      variable:
        v: e12
    target:
      context:
        v: e12
      context type:
        v: variable
      element:
        v: request
      variable:
        v: request
      transform:
        v: create
      parameter:
        value: string
    target:
      context:
        v: request
      context type:
        v: variable
      element:
        v: method
      transform:
        v: copy
      parameter:
        value: string
    target:
      context:
        v: e12
      context type:
        v: variable
      element:
        v: resource
      variable:
        v: familyMember
      transform:
        v: create
      parameter:
        value: string
    target:
      context:
        v: familyMember
      context type:
        v: variable
      element:
        v: id
      variable:
        v: uuid12
      transform:
        v: uuid
    target:
      context:
        v: e12
      context type:
        v: variable
      element:
        v: fullUrl
      transform:
        v: append
      parameter:
        value: string
      parameter:
        value: id
    target:
      context:
        v: request
      context type:
        v: variable
      element:
        v: url
      transform:
        v: copy
      parameter:
        value: string
    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: reference
    rule:
      name:
        v: statusS
    rule:
      name:
        v: reference
    rule:
      name:
        v: medication
  documentation:
    v: Anmanesi Familiare narrativa
rule:
  name:
    v: raccoglitore
  source:
    context:
      v: src
    element:
      v: code
    condition:
      v: code = '18776-5'
  rule:
    name:
      v: pianiCura
    source:
      context:
        v: src
      element:
        v: text
      variable:
        v: text
    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
    target:
      context:
        v: request
      context type:
        v: variable
      element:
        v: method
      transform:
        v: copy
      parameter:
        value: string
    target:
      context:
        v: e11
      context type:
        v: variable

string
v: BackboneElement

string
v: POST

string
v: FamilyMemberHistory

id
v: uuid12

string
v: FamilyMemberHistory

string
v: Reference

string
v: 'https://example/FamilyMemberHistory/' + %familyMember.id

v: src

v: familyMember

v: variable

v: patient

v: reference

v: create

value: string
  v: Reference

v: reference

v: variable

v: reference

v: evaluate

value: string
  v: 'https://example/Patient/' + %patient.id

v: src

v: familyMember

v: variable

v: status

v: copy

value: string
  v: health-unknown

v: text

v: familyMember

v: variable

v: note

v: note

v: reference

context:
  v: text
variable:
  v: t

context:
  v: note
context type:
  v: variable
element:
  v: text
transform:
  v: copy
parameter:
  value: id
    v: t

v: text

v: familyMember

v: variable

v: relationship

v: relation

v: create

value: string
  v: CodeableConcept

v: text

context:
  v: text
variable:
  v: txt

context:
  v: relation
context type:
  v: variable
element:
  v: text
transform:
  v: copy
parameter:
  value: id
    v: txt

string
v: BackboneElement

string
v: POST

v: resource

v: careplan

v: create

value: string
  v: CarePlan

context:
  v: careplan
context type:
  v: variable
element:
  v: id
variable:
  v: uuid11
transform:
  v: uuid

context:
  v: e11
context type:
  v: variable
element:
  v: fullUrl
transform:
  v: append
parameter:
  value: string
    v: https://example/CarePlan/
parameter:
  value: id
    v: uuid11

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

context:
  v: tgt
context type:
  v: variable
element:
  v: entry
variable:
  v: reference
transform:
  v: create
parameter:
  value: string
    v: Reference

context:
  v: reference
context type:
  v: variable
element:
  v: reference
transform:
  v: evaluate
parameter:
  value: string
    v: 'https://example/CarePlan/' + %careplan.id

name:
  v: reference
source:
  context:
    v: src
target:
  context:
    v: careplan
  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: status
source:
  context:
    v: src
target:
  context:
    v: careplan
  context type:
    v: variable
  element:
    v: status
  transform:
    v: copy
  parameter:
    value: string
      v: active
documentation:
  v: src-> careplan.encounter=create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";

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

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

v: Piano di cura narrativa

name:
  v: narrative
source:
  context:
    v: src
  element:
    v: code
  condition:
    v: (code = '30954-2') or (code = '29762-2') or (code = '8716-3') or (code = '47420-5') or (code = '42348-3')
rule:
  name:
    v: txtsec
  source:
    context:
      v: src
    element:
      v: text
    variable:
      v: text
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: e13
  target:
    context:
      v: e13
    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: e13
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: obs1
    transform:
      v: create
    parameter:
      value: string
        v: Observation
  target:
    context:
      v: obs1
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid13
    transform:
      v: uuid
  target:
    context:
      v: e13
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: string
        v: https://example/Observation/
    parameter:
      value: id
        v: uuid13
  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/' + %obs1.id
  rule:
    name:
      v: reference
    source:
      context:
        v: src
    target:
      context:
        v: obs1
      context type:
        v: variable
      element:
        v: subject
      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: obsst
    source:
      context:
        v: src
    target:
      context:
        v: obs1
      context type:
        v: variable
      element:
        v: status
      transform:
        v: copy
      parameter:
        value: string
    documentation:
      v: src -> obs1.encounter=create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %enc.id) "reference";
  rule:
    name:
      v: obscde
    source:
      context:
        v: src
      element:
        v: code
      variable:
        v: vvv
    target:
      context:
        v: obs1
      context type:
        v: variable
      element:
        v: code
      variable:
        v: vvv
      transform:
        v: create

string
v: Reference

string
v: 'https://example/Patient/' + %patient.id

string
v: preliminary

name:
  v: statusS
source:
  context:
    v: src
target:
  context:
    v: obs1
  context type:
    v: variable
  element:
    v: status
  transform:
    v: copy
  parameter:
    value: string
      v: final

name:
  v: narrative
source:
  context:
    v: text
target:
  context:
    v: obs1
  context type:
    v: variable
  element:
    v: note
  variable:
    v: note
rule:
  name:
    v: note
  source:
    context:
      v: text
    variable:
      v: t
  target:
    context:
      v: note
    context type:
      v: variable
    element:
      v: text
    variable:
      v: textNote
    transform:
      v: create
    parameter:
      value: string
        v: string
  dependent:
    name:
      v: EDstring
    variable:
      v: t
    variable:
      v: textNote

v: sezioni che sono narrative

name:
  v: component
source:
  context:
    v: src
  element:
    v: component
  variable:
    v: component
rule:
  name:
    v: section
  source:
    context:
      v: component
    element:
      v: section
    variable:
      v: sec
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: section
    variable:
      v: tgtSection
  dependent:
    name:
      v: ClinicalDocumentSection
    variable:
      v: cda
    variable:
      v: sec
    variable:
      v: patient
    variable:
      v: tgtSection
    variable:
      v: bundle
    variable:
      v: enc
    variable:
      v: dReport

name:
  v: Procedure
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: cdaElement
  mode:
    v: source
input:
  name:
    v: patient
  type:
    v: Patient
  mode:
    v: target
input:
  name:
    v: encounter
  type:
    v: Encounter
  mode:
    v: target
input:
  name:
    v: tgt
  type:
    v: Procedure
  mode:
    v: target
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: tx
  source:
    context:
      v: src
    element:
      v: text
    variable:
      v: tx
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: note
    variable:
      v: note
  rule:
    name:
      v: r
    source:
      context:
        v: tx
      element:
        v: reference
      variable:
        v: reff
    target:
      context:
        v: note
      context type:
        v: variable
      element:
        v: text
      transform:
        v: evaluate
      parameter:
        value: string
  documentation:
    v: toASK
rule:
  name:
    v: ref
  source:
    context:
      v: src
    element:
      v: templateId
    condition:
      v: root = '2.16.840.1.113883.2.9.10.1.4.3.10.3'
  rule:
    name:
      v: effectiveTime
    source:
      context:
        v: src
      element:
        v: effectiveTime
      variable:
        v: effectiveTime
    target:
      context:
        v: tgt
      context type:
        v: variable
      element:
        v: performed
      transform:
        v: evaluate
      parameter:
        value: string
  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: reference
  source:
    context:
      v: src
  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: 'https://example/Patient/' + %patient.id
rule:
  name:
    v: status
  source:
    context:
      v: src
    element:
      v: statusCode
    variable:
      v: s
  rule:
    name:
      v: codeS
    source:
      context:
        v: s
      element:
        v: code
      variable:
        v: cos
    target:
      context:
        v: tgt
      context type:
        v: variable
      element:
        v: status
      transform:
        v: translate
      parameter:
        value: id
      parameter:
        value: string
      parameter:
        value: string
  documentation:
    v: src -> tgt.encounter=create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";

string
v: reff.value

string
v: effectiveTime.value

id
v: cos

string
v: #EventStatus

string
v: code

name:
  v: status2
source:
  context:
    v: src
  condition:
    v: statusCode.exists().not()
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: status
  transform:
    v: copy
  parameter:
    value: string
      v: unknown

name:
  v: presenzaProtesiImpianto
source:
  context:
    v: src
  element:
    v: templateId
  condition:
    v: root = '2.16.840.1.113883.2.9.10.1.4.3.9.1'
rule:
  name:
    v: device
  source:
    context:
      v: src
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: e1
  target:
    context:
      v: e1
    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: e1
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: deviceRes
    transform:
      v: create
    parameter:
      value: string
        v: Device
  target:
    context:
      v: deviceRes
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuid1
    transform:
      v: uuid
  target:
    context:
      v: e1
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: string
        v: https://example/Device/
    parameter:
      value: id
        v: uuid1
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value: string
        v: Device
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: usedReference
    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/Device/' + %deviceRes.id
  rule:
    name:
      v: reference
    source:
      context:
        v: src
    target:
      context:
        v: deviceRes
      context type:
        v: variable
      element:
        v: patient
      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: code
    source:
      context:
        v: src
      element:
        v: code
      variable:
        v: vvv
    target:
      context:
        v: deviceRes
      context type:
        v: variable
      element:
        v: type
      variable:
        v: vvv
      transform:
        v: create
rule:
  name:
    v: value1
  source:
    context:
      v: src
    element:
      v: effectiveTime
    variable:
      v: effectiveTime
    condition:
      v: (value.exists())
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: performed
    variable:
      v: value
    transform:
      v: create

string
v: Reference

string
v: 'https://example/Patient/' + %patient.id

value: string
  v: dateTime

name:
  v: TSDateTime
variable:
  v: effectiveTime
variable:
  v: value

name:
  v: valuePeriod
source:
  context:
    v: src
  element:
    v: effectiveTime
  variable:
    v: effectiveTime
  condition:
    v: (low.exists())
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: performed
  variable:
    v: value
  transform:
    v: create
  parameter:
    value: string
      v: Period
dependent:
  name:
    v: IVLTSPeriod
  variable:
    v: effectiveTime
  variable:
    v: value

name:
  v: assenza
source:
  context:
    v: src
  element:
    v: templateId
  condition:
    v: root = '2.16.840.1.113883.2.9.10.1.4.3.9.2'
rule:
  name:
    v: note
  source:
    context:
      v: src
    element:
      v: code
    variable:
      v: code
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: note
    variable:
      v: note
  rule:
    name:
      v: text
    source:
      context:
        v: code
      element:
        v: displayName
      variable:
        v: displayName
    target:
      context:
        v: note
      context type:
        v: variable
      element:
        v: text
      transform:
        v: evaluate
      parameter:
        value: string

string
v: displayName

name:
  v: procedureTrattamenti
source:
  context:
    v: src
  element:
    v: templateId
  condition:
    v: root = '2.16.840.1.113883.2.9.10.1.4.3.11.1'
rule:
  name:
    v: id
  source:
    context:
      v: src
    element:
      v: id
    variable:
      v: vvv
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: vvv
    transform:
      v: create
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: value1
  source:
    context:
      v: src
    element:
      v: effectiveTime
    variable:
      v: effectiveTime
    condition:
      v: (value.exists())
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: performed
    variable:
      v: value
    transform:
      v: create
    parameter:
      value: string
        v: dateTime
  dependent:
    name:
      v: TSDateTime
    variable:
      v: effectiveTime
    variable:
      v: value
rule:
  name:
    v: valuePeriod
  source:
    context:
      v: src
    element:
      v: effectiveTime
    variable:
      v: effectiveTime
    condition:
      v: (low.exists())
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: performed
    variable:
      v: value
    transform:
      v: create
    parameter:
      value: string
        v: Period
  dependent:
    name:
      v: IVLTSPeriod
    variable:
      v: effectiveTime
    variable:
      v: value
rule:
  name:
    v: entryRelProcedure
  source:
    context:
      v: src
    element:
      v: entryRelationship
    variable:
      v: entryR
  rule:
    name:
      v: observation
    source:
      context:
        v: entryR
      element:
        v: observation
      variable:
        v: observation
    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
      variable:
        v: request
      transform:
        v: create
      parameter:
        value: string
    target:
      context:
        v: request
      context type:
        v: variable
      element:
        v: method
      transform:
        v: copy
      parameter:
        value: string
    target:
      context:
        v: e3
      context type:
        v: variable
      element:
        v: resource
      variable:
        v: obs1
      transform:
        v: create
      parameter:
        value: string
    target:
      context:
        v: obs1
      context type:
        v: variable
      element:
        v: id
      variable:
        v: uuid3
      transform:
        v: uuid
    target:
      context:
        v: e3
      context type:
        v: variable
      element:
        v: fullUrl
      transform:
        v: append

string
v: BackboneElement

string
v: POST

string
v: Observation

value: id
  v: uuid3

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

context:
  v: tgt
context type:
  v: variable
element:
  v: reasonReference
variable:
  v: reference
transform:
  v: create
parameter:
  value: string
    v: Reference

context:
  v: reference
context type:
  v: variable
element:
  v: reference
transform:
  v: evaluate
parameter:
  value: string
    v: 'https://example/Observation/' + %obs1.id

name:
  v: Observation
variable:
  v: observation
variable:
  v: patient
variable:
  v: encounter
variable:
  v: obs1
variable:
  v: bundle

name:
  v: Observation
type mode:
  v: none
input:
  name:
    v: cda
  mode:
    v: source
input:
  name:
    v: patient
  type:
    v: Patient
  mode:
    v: target
input:
  name:
    v: encounter
  type:
    v: Encounter
  mode:
    v: target
input:
  name:
    v: ob
  type:
    v: Observation
  mode:
    v: target
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: reference
  source:
    context:
      v: cda
  target:
    context:
      v: ob
    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: id
  source:
    context:
      v: cda
    element:
      v: id
    variable:
      v: vvv
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: vvv
    transform:
      v: create
  documentation:
    v: cda-> ob.encounter=create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
rule:
  name:
    v: code
  source:
    context:
      v: cda
    element:
      v: code
    variable:
      v: vvv
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: code
    variable:
      v: vvv
    transform:
      v: create
rule:
  name:
    v: Stats
  source:
    context:
      v: cda
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: status
    transform:
      v: copy
    parameter:
      value: string
        v: final
rule:
  name:
    v: value
  source:
    context:
      v: cda
    type:
      v: ST
    element:
      v: value
    variable:
      v: st
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: value
    transform:
      v: create
    parameter:
      value: string
        v: string
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: value
    transform:
      v: evaluate
    parameter:
      value: string
        v: st.dataString
  documentation:
    v: value datatype
rule:
  name:
    v: boolean
  source:
    context:
      v: cda
    type:
      v: BL
    element:
      v: value
    variable:
      v: boolean
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: value
    transform:
      v: evaluate
    parameter:
      value: string
        v: boolean.value
rule:
  name:
    v: intval
  source:
    context:
      v: cda
    type:
      v: INT
    element:
      v: value

v: int

context:
  v: ob
context type:
  v: variable
element:
  v: value
transform:
  v: evaluate
parameter:
  value: string
    v: int.value

name:
  v: val
source:
  context:
    v: cda
  type:
    v: CE
  element:
    v: value
  variable:
    v: val
rule:
  name:
    v: coding
  source:
    context:
      v: val
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: value
    variable:
      v: ce
    transform:
      v: create
    parameter:
      value: string
        v: CodeableConcept
  rule:
    name:
      v: originalText
    source:
      context:
        v: val
      element:
        v: originalText
      variable:
        v: originalText
    rule:
      name:
        v: reference
  rule:
    name:
      v: code
    source:
      context:
        v: val
    target:
      context:
        v: ce
      context type:
        v: variable
      element:
        v: coding
      variable:
        v: coding
    rule:
      name:
        v: code
    rule:
      name:
        v: codeSystem
    rule:
      name:
        v: displayName
  rule:
    name:
      v: translation
    source:
      context:
        v: val
      element:
        v: translation
      variable:
        v: translation
    target:
      context:
        v: ce
      context type:
        v: variable
      element:
        v: coding
      variable:
        v: coding
    rule:
      name:
        v: code
    rule:
      name:
        v: codeSystem
    rule:
      name:
        v: displayName
    rule:
      name:
        v: qualifier

v: originalText

v: reference

v: reference

v: ce

v: variable

v: text

v: evaluate

value: string
  v: reference.value

v: val

v: code

v: code

v: coding

v: variable

v: code

v: cast

value: id
  v: code

value: string
  v: string

v: val

v: codeSystem

v: system

v: coding

v: variable

v: system

v: translate

value: id
  v: system

value: string
  v: uri

v: val

v: displayName

v: display

v: coding

v: variable

v: display

v: cast

value: id
  v: display

value: string
  v: string

v: translation

v: code

v: code

v: coding

v: variable

v: code

v: cast

value: id
  v: code

value: string
  v: string

v: translation

v: codeSystem

v: system

v: coding

v: variable

v: system

v: translate

value: id
  v: system

value: string
  v: uri

v: translation

v: displayName

v: display

v: coding

v: variable

v: display

v: cast

value: id
  v: display

value: string
  v: string

v: translation

v: qualifier

v: qualifier

v: value

context:
  v: qualifier
element:
  v: value
variable:
  v: value

context:
  v: ce
context type:
  v: variable
element:
  v: coding
variable:
  v: coding

name:
  v: code
source:
  context:
    v: value
  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

name:
  v: codeSystem
source:
  context:
    v: value
  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

name:
  v: displayName
source:
  context:
    v: value
  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

name:
  v: val
source:
  context:
    v: cda
  type:
    v: CD
  element:
    v: value
  variable:
    v: val
rule:
  name:
    v: coding
  source:
    context:
      v: val
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: value
    variable:
      v: ce
    transform:
      v: create
    parameter:
      value: string
        v: CodeableConcept
  rule:
    name:
      v: originalText
    source:
      context:
        v: val
      element:
        v: originalText
      variable:
        v: originalText
    rule:
      name:
        v: reference
  rule:
    name:
      v: code
    source:
      context:
        v: val
    target:
      context:
        v: ce
      context type:
        v: variable
      element:
        v: coding
      variable:
        v: coding
    rule:
      name:
        v: code
    rule:
      name:
        v: codeSystem
    rule:
      name:
        v: displayName
  rule:
    name:
      v: translation
    source:
      context:
        v: val
      element:
        v: translation
      variable:
        v: translation
    target:
      context:
        v: ce
      context type:
        v: variable
      element:
        v: coding
      variable:
        v: coding
    rule:
      name:
        v: code
    rule:
      name:
        v: codeSystem
    rule:
      name:
        v: displayName
    rule:
      name:
        v: qualifier

v: originalText

v: reference

v: reference

v: ce

v: variable

v: text

v: evaluate

value: string
  v: reference.value

v: val

v: code

v: code

v: coding

v: variable

v: code

v: cast

value: id
  v: code

value: string
  v: string

v: val

v: codeSystem

v: system

v: coding

v: variable

v: system

v: translate

value: id
  v: system

value: string
  v: uri

v: val

v: displayName

v: display

v: coding

v: variable

v: display

v: cast

value: id
  v: display

value: string
  v: string

v: translation

v: code

v: code

v: coding

v: variable

v: code

v: cast

value: id
  v: code

value: string
  v: string

v: translation

v: codeSystem

v: system

v: coding

v: variable

v: system

v: translate

value: id
  v: system

value: string
  v: uri

v: translation

v: displayName

v: display

v: coding

v: variable

v: display

v: cast

value: id
  v: display

value: string
  v: string

v: translation

v: qualifier

v: qualifier

v: value

context:
  v: qualifier
element:
  v: value
variable:
  v: value

context:
  v: ce
context type:
  v: variable
element:
  v: coding
variable:
  v: coding

name:
  v: code
source:
  context:
    v: value
  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

name:
  v: codeSystem
source:
  context:
    v: value
  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

name:
  v: displayName
source:
  context:
    v: value
  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

name:
  v: valueQuantity
source:
  context:
    v: cda
  type:
    v: PQ
  element:
    v: value
  variable:
    v: val
rule:
  name:
    v: quantity
  source:
    context:
      v: val
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: value
    variable:
      v: quantity
    transform:
      v: create
    parameter:
      value: string
        v: Quantity
  rule:
    name:
      v: value
    source:
      context:
        v: val
      element:
        v: value
      variable:
        v: value
    target:
      context:
        v: quantity
      context type:
        v: variable
      element:
        v: value
      transform:
        v: copy
      parameter:
        value: id
  rule:
    name:
      v: unit
    source:
      context:
        v: val
      element:
        v: unit
      variable:
        v: unit
    target:
      context:
        v: quantity
      context type:
        v: variable
      element:
        v: unit
      transform:
        v: copy
      parameter:
        value: id

id
v: value

id
v: unit

name:
  v: value1
source:
  context:
    v: cda
  element:
    v: effectiveTime
  variable:
    v: effectiveTime
  condition:
    v: (value.exists())
target:
  context:
    v: ob
  context type:
    v: variable
  element:
    v: effective
  variable:
    v: value
  transform:
    v: create
  parameter:
    value: string
      v: dateTime
dependent:
  name:
    v: TSDateTime
  variable:
    v: effectiveTime
  variable:
    v: value

name:
  v: valuePeriod
source:
  context:
    v: cda
  element:
    v: effectiveTime
  variable:
    v: effectiveTime
  condition:
    v: (low.exists())
target:
  context:
    v: ob
  context type:
    v: variable
  element:
    v: effective
  variable:
    v: value
  transform:
    v: create
  parameter:
    value: string
      v: Period
dependent:
  name:
    v: IVLTSPeriod
  variable:
    v: effectiveTime
  variable:
    v: value

name:
  v: note
source:
  context:
    v: cda
  element:
    v: text
  variable:
    v: text
target:
  context:
    v: ob
  context type:
    v: variable
  element:
    v: note
  variable:
    v: note
rule:
  name:
    v: text
  source:
    context:
      v: text
    element:
      v: reference
    variable:
      v: reference
  target:
    context:
      v: note
    context type:
      v: variable
    element:
      v: text
    transform:
      v: evaluate
    parameter:
      value: string
        v: reference.value

name:
  v: status
source:
  context:
    v: cda
  element:
    v: statusCode
  variable:
    v: s
rule:
  name:
    v: codeS
  source:
    context:
      v: s
    element:
      v: code
    variable:
      v: cos
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: status
    transform:
      v: translate
    parameter:
      value: id
        v: cos
    parameter:
      value: string
        v: #OBSstatus
    parameter:
      value: string
        v: code

name:
  v: methodCode
source:
  context:
    v: cda
  element:
    v: methodCode
  variable:
    v: vvv
target:
  context:
    v: ob
  context type:
    v: variable
  element:
    v: method
  variable:
    v: vvv
  transform:
    v: create
documentation:
  v: toASK è giusto siano invertiti?

name:
  v: interpretationCode
source:
  context:
    v: cda
  element:
    v: interpretationCode
  variable:
    v: vvv
target:
  context:
    v: ob
  context type:
    v: variable
  element:
    v: interpretation
  variable:
    v: vvv
  transform:
    v: create

name:
  v: targetSiteCode
source:
  context:
    v: cda
  element:
    v: targetSiteCode
  variable:
    v: vvv
target:
  context:
    v: ob
  context type:
    v: variable
  element:
    v: bodySite
  variable:
    v: vvv
  transform:
    v: create

name:
  v: regrange
source:
  context:
    v: cda
  element:
    v: referenceRange
  variable:
    v: refrange
rule:
  name:
    v: obsrange
  source:
    context:
      v: refrange
    element:
      v: observationRange
    variable:
      v: obsrange
  rule:
    name:
      v: refFhir
    source:
      context:
        v: obsrange
      element:
        v: value
      variable:
        v: val
    target:
      context:
        v: ob
      context type:
        v: variable
      element:
        v: referenceRange
      variable:
        v: refrangeFH
      transform:
        v: create
      parameter:
        value: string
    rule:
      name:
        v: de
    rule:
      name:
        v: de
documentation:
  v: added

string
v: BackboneElement

v: val

v: refrangeFH

v: variable

v: low

v: lowfhir

v: create

value: string
  v: SimpleQuantity

v: val

context:
  v: val
element:
  v: low
variable:
  v: l

context:
  v: lowfhir
context type:
  v: variable
element:
  v: value
transform:
  v: evaluate
parameter:
  value: string
    v: l.value

v: val

context:
  v: val
element:
  v: low
variable:
  v: l

context:
  v: lowfhir
context type:
  v: variable
element:
  v: unit
transform:
  v: evaluate
parameter:
  value: string
    v: l.unit

v: val

v: refrangeFH

v: variable

v: high

v: highfhir

v: create

value: string
  v: SimpleQuantity

v: val

context:
  v: val
element:
  v: high
variable:
  v: h

context:
  v: highfhir
context type:
  v: variable
element:
  v: value
transform:
  v: evaluate
parameter:
  value: string
    v: h.value

v: val

context:
  v: val
element:
  v: high
variable:
  v: h

context:
  v: highfhir
context type:
  v: variable
element:
  v: unit
transform:
  v: evaluate
parameter:
  value: string
    v: h.unit

name:
  v: ObservationOrganizer
type mode:
  v: none
input:
  name:
    v: section
  type:
    v: section
  mode:
    v: source
input:
  name:
    v: cda
  type:
    v: organizer
  mode:
    v: source
input:
  name:
    v: patient
  type:
    v: Patient
  mode:
    v: target
input:
  name:
    v: encounter
  type:
    v: Encounter
  mode:
    v: target
input:
  name:
    v: ob
  type:
    v: Observation
  mode:
    v: target
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: reference
  source:
    context:
      v: cda
  target:
    context:
      v: ob
    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: id
  source:
    context:
      v: cda
    element:
      v: id
    variable:
      v: vvv
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: vvv
    transform:
      v: create
  documentation:
    v: cda-> ob.encounter=create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
rule:
  name:
    v: code
  source:
    context:
      v: section
    element:
      v: code
    variable:
      v: vvv
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: code
    variable:
      v: vvv
    transform:
      v: create
rule:
  name:
    v: Stats
  source:
    context:
      v: cda
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: status
    transform:
      v: copy
    parameter:
      value: string
        v: final
rule:
  name:
    v: value1
  source:
    context:
      v: cda
    element:
      v: effectiveTime
    variable:
      v: effectiveTime
    condition:
      v: (value.exists())
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: effective
    variable:
      v: value
    transform:
      v: create
    parameter:
      value: string
        v: dateTime
  dependent:
    name:
      v: TSDateTime
    variable:
      v: effectiveTime
    variable:
      v: value
rule:
  name:
    v: valuePeriod
  source:
    context:
      v: cda
    element:
      v: effectiveTime
    variable:
      v: effectiveTime
    condition:
      v: (low.exists())
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: effective
    variable:
      v: value
    transform:
      v: create
    parameter:
      value: string
        v: Period
  dependent:
    name:
      v: IVLTSPeriod

v: effectiveTime

v: value

name:
  v: note
source:
  context:
    v: cda
  element:
    v: text
  variable:
    v: text
target:
  context:
    v: ob
  context type:
    v: variable
  element:
    v: note
  variable:
    v: note
rule:
  name:
    v: text
  source:
    context:
      v: text
    element:
      v: reference
    variable:
      v: reference
  target:
    context:
      v: note
    context type:
      v: variable
    element:
      v: text
    transform:
      v: evaluate
    parameter:
      value: string
        v: reference.value

name:
  v: status
source:
  context:
    v: cda
  element:
    v: statusCode
  variable:
    v: s
rule:
  name:
    v: codeS
  source:
    context:
      v: s
    element:
      v: code
    variable:
      v: cos
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: status
    transform:
      v: translate
    parameter:
      value: id
        v: cos
    parameter:
      value: string
        v: #OBSstatus
    parameter:
      value: string
        v: code

name:
  v: component
source:
  context:
    v: cda
  element:
    v: component
  variable:
    v: component
rule:
  name:
    v: hasMember
  source:
    context:
      v: component
    element:
      v: observation
    variable:
      v: observation
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: ei
  target:
    context:
      v: ei
    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: ei
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: obsi
    transform:
      v: create
    parameter:
      value: string
        v: Observation
  target:
    context:
      v: obsi
    context type:
      v: variable
    element:
      v: id
    variable:
      v: uuidi
    transform:
      v: uuid
  target:
    context:
      v: ei
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value: string
        v: https://example/Observation/
    parameter:
      value: id
        v: uuidi
  target:
    context:
      v: request
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value: string
        v: Observation
  target:
    context:
      v: ob
    context type:
      v: variable
    element:
      v: hasMember
    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/' + %obsi.id
  dependent:
    name:
      v: Observation
    variable:
      v: observation
    variable:
      v: patient
    variable:
      v: encounter
    variable:
      v: obsi
    variable:
      v: bundle

name:
  v: Coverage
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: act
  mode:
    v: source
input:
  name:
    v: patient
  type:
    v: Patient
  mode:
    v: target
input:
  name:
    v: encounter
  type:
    v: Encounter
  mode:
    v: target
input:
  name:
    v: tgt
  type:
    v: Coverage
  mode:
    v: target
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: reference
  source:
    context:
      v: src
  target:
    context:
      v: tgt
    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: tgt
    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: id
  source:
    context:
      v: src
    element:
      v: id
    variable:
      v: id
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: idf
  rule:
    name:
      v: ID
    source:
      context:
        v: id
    target:
      context:
        v: idf
      context type:
        v: variable
      element:
        v: value
      transform:
        v: evaluate
      parameter:
        value: string
rule:
  name:
    v: code
  source:
    context:
      v: src
    element:
      v: code
    variable:
      v: vvv
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: type
    variable:
      v: vvv
    transform:
      v: create
rule:
  name:
    v: sc
  source:
    context:
      v: src
    element:
      v: statusCode
    variable:
      v: statusCode
  rule:
    name:
      v: status
    source:
      context:
        v: statusCode
      element:
        v: code
      variable:
        v: s
    target:
      context:
        v: tgt
      context type:
        v: variable
      element:
        v: status
      transform:
        v: translate
      parameter:
        value: id
      parameter:
        value: string
      parameter:
        value: string
rule:
  name:
    v: statusAbsent
  source:
    context:
      v: src
    condition:
      v: statusCode.exists().not()

string
v: id.root

id
v: s

string
v: #FinancialStatus

string
v: code

context:
  v: tgt
context type:
  v: variable
element:
  v: status
transform:
  v: copy
parameter:
  value: string
    v: active

name:
  v: value1
source:
  context:
    v: src
  element:
    v: effectiveTime
  variable:
    v: effectiveTime
  condition:
    v: (value.exists())
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: period
  variable:
    v: value
  transform:
    v: create
  parameter:
    value: string
      v: dateTime
dependent:
  name:
    v: TSDateTime
  variable:
    v: effectiveTime
  variable:
    v: value
documentation:
  v: src.effectiveTime as effectiveTime -> tgt.period as period then{

name:
  v: valuePeriod
source:
  context:
    v: src
  element:
    v: effectiveTime
  variable:
    v: effectiveTime
  condition:
    v: (low.exists())
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: period
  variable:
    v: value
  transform:
    v: create
  parameter:
    value: string
      v: Period
dependent:
  name:
    v: IVLTSPeriod
  variable:
    v: effectiveTime
  variable:
    v: value

name:
  v: entryr
source:
  context:
    v: src
  element:
    v: entryRelationship
  variable:
    v: entryRelationship
rule:
  name:
    v: QUI
  source:
    context:
      v: entryRelationship
    element:
      v: act
    variable:
      v: ac
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: class
    variable:
      v: class
  rule:
    name:
      v: ref
    source:
      context:
        v: ac
      element:
        v: text
      variable:
        v: text
    target:
      context:
        v: class
      context type:
        v: variable
      element:
        v: type
      variable:
        v: type
    rule:
      name:
        v: value
  rule:
    name:
      v: note
    source:
      context:
        v: ac
    target:
      context:
        v: class
      context type:
        v: variable
      element:
        v: value
      transform:
        v: copy
      parameter:
        value: string

v: text

v: reference

v: reference

v: type

v: variable

v: text

v: evaluate

value: string
  v: reference.value

string
v: commenti

name:
  v: allergyFunction
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: cdaElement
  mode:
    v: source
input:
  name:
    v: tgt
  type:
    v: AllergyIntolerance
  mode:
    v: target
input:
  name:
    v: patient
  type:
    v: Patient
  mode:
    v: target
input:
  name:
    v: encounter
  type:
    v: Encounter
  mode:
    v: target
rule:
  name:
    v: reference
  source:
    context:
      v: src
  target:
    context:
      v: tgt
    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: efftime
  source:
    context:
      v: src
    element:
      v: effectiveTime
    variable:
      v: effTime
  rule:
    name:
      v: value
    source:
      context:
        v: effTime
      element:
        v: low
      variable:
        v: l
    target:
      context:
        v: tgt
      context type:
        v: variable
      element:
        v: recordedDate
      variable:
        v: r
    dependent:
      name:
        v: TSDateTime
      variable:
        v: l
      variable:
        v: r
  documentation:
    v: src -> tgt.encounter=create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
rule:
  name:
    v: entryrelationship
  source:
    context:
      v: src
    element:
      v: entryRelationship
    variable:
      v: entryRelationship1
  rule:
    name:
      v: observation
    source:
      context:
        v: entryRelationship1
      element:
        v: observation
      variable:
        v: observation1
    rule:
      name:
        v: id
    rule:
      name:
        v: Noallergy
    rule:
      name:
        v: value1
    rule:
      name:
        v: valuePeriod
    rule:
      name:
        v: code
    rule:
      name:
        v: value
      documentation:
        v: toASK qui dovrei fare un controllo sul code
    rule:
      name:
        v: participant
    rule:
      name:
        v: entryR2
    rule:
      name:
        v: entryR3
    rule:
      name:
        v: entryR4

v: observation1

v: id

v: vvv

v: tgt

v: variable

v: identifier

v: vvv

v: create

v: observation1

v: templateId

v: root = '2.16.840.1.113883.2.9.10.1.4.3.1.4'

v: tgt

v: variable

v: code

v: code

v: code

context:
  v: observation1

context:
  v: code
context type:
  v: variable
element:
  v: coding
variable:
  v: coding

name:
  v: code
source:
  context:
    v: observation1
target:
  context:
    v: coding
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value: string
      v: No known allergy

v: value1

context:
  v: src
element:
  v: effectiveTime
variable:
  v: effectiveTime
condition:
  v: (value.exists())

context:
  v: tgt
context type:
  v: variable
element:
  v: onset
variable:
  v: value
transform:
  v: create
parameter:
  value: string
    v: dateTime

name:
  v: TSDateTime
variable:
  v: effectiveTime
variable:
  v: value

v: valuePeriod

context:
  v: src
element:
  v: effectiveTime
variable:
  v: effectiveTime

context:
  v: tgt
context type:
  v: variable
element:
  v: onset
variable:
  v: value
transform:
  v: create
parameter:
  value: string
    v: Period

name:
  v: IVLTSPeriod
variable:
  v: effectiveTime
variable:
  v: value

v: observation1

v: effectiveTime

v: effectiveTime

v: (value.exists())

v: tgt

v: variable

v: onset

v: value

v: create

value: string
  v: dateTime

v: TSDateTime

v: effectiveTime

v: value

v: observation1

v: effectiveTime

v: effectiveTime

v: tgt

v: variable

v: onset

v: value

v: create

value: string
  v: Period

v: IVLTSPeriod

v: effectiveTime

v: value

v: observation1

v: value

v: code

v: type

context:
  v: code
element:
  v: code
variable:
  v: code1

context:
  v: tgt
context type:
  v: variable
element:
  v: type
transform:
  v: translate
parameter:
  value: id
    v: code1
parameter:
  value: string
    v: #AllergyTypeMap
parameter:
  value: string
    v: code

v: category

context:
  v: code
element:
  v: code
variable:
  v: code1

context:
  v: tgt
context type:
  v: variable
element:
  v: category
transform:
  v: translate
parameter:
  value: id
    v: code1
parameter:
  value: string
    v: #AllergyCategoryMap
parameter:
  value: string
    v: code

v: observation1

v: value

v: vvv

v: tgt

v: variable

v: code

v: vvv

v: create

v: observation1

v: participant

v: participant

v: tgt

v: variable

v: reaction

v: reaction

v: entryR2

context:
  v: observation1
element:
  v: entryRelationship
variable:
  v: entryRelationship2
condition:
  v: (typeCode = 'MFST')

name:
  v: observ2
source:
  context:
    v: entryRelationship2
  element:
    v: observation
  variable:
    v: observation2
rule:
  name:
    v: manifestation
  source:
    context:
      v: observation2
    element:
      v: value
    variable:
      v: vvv
  target:
    context:
      v: reaction
    context type:
      v: variable
    element:
      v: manifestation
    variable:
      v: vvv
    transform:
      v: create
rule:
  name:
    v: manifestation
  source:
    context:
      v: observation2
    element:
      v: code
    variable:
      v: vvv
  target:
    context:
      v: reaction
    context type:
      v: variable
    element:
      v: manifestation
    variable:
      v: vvv
    transform:
      v: create
rule:
  name:
    v: tx
  source:
    context:
      v: observation2
    element:
      v: text
    variable:
      v: tx
  rule:
    name:
      v: tx
    source:
      context:
        v: tx
      element:
        v: reference
      variable:
        v: reff
    target:
      context:
        v: reaction
      context type:
        v: variable
      element:
        v: description
      transform:
        v: evaluate
      parameter:
        value: string
rule:
  name:
    v: low
  source:
    context:
      v: observation2
    element:
      v: effectiveTime
    variable:
      v: effectiveTime
  rule:
    name:
      v: valuePeriodLow
    source:
      context:
        v: effectiveTime
      element:
        v: low
      variable:
        v: low
    target:
      context:
        v: reaction
      context type:
        v: variable
      element:
        v: onset
      variable:
        v: value
      transform:
        v: create
      parameter:
        value: string
    dependent:
      name:
        v: TSDateTime
      variable:
        v: low
      variable:
        v: value
  rule:
    name:
      v: valuePeriodHigh
    source:
      context:
        v: effectiveTime
      element:
        v: high
      variable:
        v: high
    target:
      context:
        v: tgt
      context type:
        v: variable
      element:
        v: lastOccurrence
      variable:
        v: value
      transform:
        v: create
      parameter:
        value: string
    dependent:
      name:
        v: TSDateTime
      variable:
        v: high
      variable:
        v: value

string
v: reff.value

string
v: dateTime

string
v: dateTime

v: participantRole

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

name:
  v: playingEntity
source:
  context:
    v: participantRole
  element:
    v: playingEntity
  variable:
    v: playingEntity
rule:
  name:
    v: reaction
  source:
    context:
      v: playingEntity
    element:
      v: code
    variable:
      v: vvv
  target:
    context:
      v: reaction
    context type:
      v: variable
    element:
      v: substance
    variable:
      v: vvv
    transform:
      v: create

v: observation1

v: entryRelationship

v: entryRelationship2

v: (typeCode = 'MFST')

v: observ2

context:
  v: entryRelationship2
element:
  v: observation
variable:
  v: observation2
condition:
  v: observation1.participant.exists().not()

context:
  v: tgt
context type:
  v: variable
element:
  v: reaction
variable:
  v: reaction

name:
  v: manifestation
source:
  context:
    v: observation2
  element:
    v: value
  variable:
    v: vvv
target:
  context:
    v: reaction
  context type:
    v: variable
  element:
    v: manifestation
  variable:
    v: vvv
  transform:
    v: create

name:
  v: tx
source:
  context:
    v: observation2
  element:
    v: text
  variable:
    v: tx
rule:
  name:
    v: tx
  source:
    context:
      v: tx
    element:
      v: reference
    variable:
      v: reff
  target:
    context:
      v: reaction
    context type:
      v: variable
    element:
      v: description
    transform:
      v: evaluate
    parameter:
      value: string
        v: reff.value

name:
  v: low
source:
  context:
    v: observation2
  element:
    v: effectiveTime
  variable:
    v: effectiveTime
rule:
  name:
    v: valuePeriodLow
  source:
    context:
      v: effectiveTime
    element:
      v: low
    variable:
      v: low
  target:
    context:
      v: reaction
    context type:
      v: variable
    element:
      v: onset
    variable:
      v: value
    transform:
      v: create
    parameter:
      value: string
        v: dateTime
  dependent:
    name:
      v: TSDateTime
    variable:
      v: low
    variable:
      v: value

v: observation1

v: entryRelationship

v: entryRelationship3

v: (typeCode = 'SUBJ')

v: observ3

context:
  v: entryRelationship3
element:
  v: observation
variable:
  v: observation3

name:
  v: criticality
source:
  context:
    v: observation3
  element:
    v: value
  variable:
    v: value
rule:
  name:
    v: value
  source:
    context:
      v: value
    element:
      v: code
    variable:
      v: c
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: criticality
    transform:
      v: translate
    parameter:
      value: id
        v: c
    parameter:
      value: string
        v: #CricalityMap
    parameter:
      value: string
        v: code

v: act

context:
  v: entryRelationship3
element:
  v: act
variable:
  v: act

context:
  v: tgt
context type:
  v: variable
element:
  v: note
variable:
  v: note

name:
  v: note
source:
  context:
    v: act
  element:
    v: text
  variable:
    v: text
rule:
  name:
    v: reference
  source:
    context:
      v: text
    element:
      v: reference
    variable:
      v: reference
  target:
    context:
      v: note
    context type:
      v: variable
    element:
      v: text
    transform:
      v: evaluate
    parameter:
      value: string
        v: reference.value

v: observation1

v: entryRelationship

v: entryRelationship4

v: (typeCode = 'REFR')

v: observ4

context:
  v: entryRelationship4
element:
  v: observation
variable:
  v: observation4

name:
  v: clinicalStatus
source:
  context:
    v: observation4
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: clinicalStatus
  variable:
    v: clinicalStatus
rule:
  name:
    v: value
  source:
    context:
      v: observation4
    element:
      v: value
    variable:
      v: value
  rule:
    name:
      v: coding
    source:
      context:
        v: value
      variable:
        v: valu
    target:
      context:
        v: clinicalStatus
      context type:
        v: variable
      element:
        v: coding
      variable:
        v: coding
      transform:
        v: create
      parameter:
        value: string
    rule:
      name:
        v: code
    rule:
      name:
        v: code
    rule:
      name:
        v: code
    rule:
      name:
        v: system
    rule:
      name:
        v: display
rule:
  name:
    v: tx
  source:
    context:
      v: observation4
    element:
      v: text
    variable:
      v: tx
  rule:
    name:
      v: reference
    source:
      context:
        v: tx
      element:
        v: reference
      variable:
        v: ref
    target:
      context:
        v: clinicalStatus
      context type:
        v: variable
      element:
        v: text
      transform:
        v: evaluate
      parameter:
        value: string

string
v: Coding

v: valu

v: (code = 'LA9041-0')

v: coding

v: variable

v: code

v: copy

value: string
  v: resolved

v: valu

v: (code = 'LA18632-2')

v: coding

v: variable

v: code

v: copy

value: string
  v: inactive

v: valu

v: (code = 'LA16666-2')

v: coding

v: variable

v: code

v: copy

value: string
  v: active

v: valu

v: coding

v: variable

v: system

v: copy

v: valu

v: displayName

v: display

v: coding

v: variable

v: display

v: cast

value: id
  v: display

value: string
  v: string

string
v: ref.value

name:
  v: MedicationStatement
type mode:
  v: none
input:
  name:
    v: src
  type:
    v: substanceAdministration
  mode:
    v: source
input:
  name:
    v: tgt
  type:
    v: MedicationStatement
  mode:
    v: target
input:
  name:
    v: patient
  type:
    v: Patient
  mode:
    v: target
input:
  name:
    v: encounter
  type:
    v: Encounter
  mode:
    v: target
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
rule:
  name:
    v: reference
  source:
    context:
      v: src
  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: 'https://example/Patient/' + %patient.id
rule:
  name:
    v: status
  source:
    context:
      v: src
    element:
      v: statusCode
    variable:
      v: vvv
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: status
    variable:
      v: vvv
    transform:
      v: create
  documentation:
    v: src -> tgt.context = create('Reference') as reference, reference.reference = ('https://example/Encounter/' + %encounter.id) "reference";
rule:
  name:
    v: id
  source:
    context:
      v: src
    element:
      v: id
    variable:
      v: vvv
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: identifier
    variable:
      v: vvv
    transform:
      v: create
rule:
  name:
    v: note
  source:
    context:
      v: src
    element:
      v: text
    variable:
      v: text
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: note
    variable:
      v: note
  rule:
    name:
      v: text
    source:
      context:
        v: text
      element:
        v: reference
      variable:
        v: reference
    target:
      context:
        v: note
      context type:
        v: variable
      element:
        v: text
      transform:
        v: evaluate
      parameter:
        value: string
rule:
  name:
    v: value1
  source:
    context:
      v: src
    element:
      v: effectiveTime
    variable:
      v: eff
    condition:
      v: (value.exists())
  target:
    context:
      v: tgt
    context type:
      v: variable
    element:
      v: effective
    variable:
      v: value
    transform:
      v: create
    parameter:
      value: string
        v: dateTime
  dependent:
    name:
      v: TSDateTime
    variable:
      v: eff
    variable:
      v: value
rule:
  name:
    v: valuePeriod
  source:
    context:
      v: src
    type:
      v: IVL_TS
    element:
      v: effectiveTime
    variable:
      v: eff
  target:
    context:
      v: tgt

string
v: reference.value

v: variable

v: effective

v: value

v: create

value: string
  v: Period

name:
  v: IVLTSPeriod
variable:
  v: eff
variable:
  v: value

name:
  v: dos
source:
  context:
    v: src
target:
  context:
    v: tgt
  context type:
    v: variable
  element:
    v: dosage
  variable:
    v: dosage
  transform:
    v: create
  parameter:
    value: string
      v: Dosage
rule:
  name:
    v: eff
  source:
    context:
      v: src
    type:
      v: PIVL_TS
    element:
      v: effectiveTime
    variable:
      v: eff
  rule:
    name:
      v: cod
    source:
      context:
        v: eff
    target:
      context:
        v: dosage
      context type:
        v: variable
      element:
        v: timing
      variable:
        v: timing
      transform:
        v: create
      parameter:
        value: string
    dependent:
      name:
        v: periodTiming
      variable:
        v: eff
      variable:
        v: timing
rule:
  name:
    v: route
  source:
    context:
      v: src
    condition:
      v: (src.doseQuantity.exists() or src.rateQuantity.exists() or src.routeCode.exists() or src.approachSiteCode.exists())
  rule:
    name:
      v: doseQuantity
    source:
      context:
        v: src
      element:
        v: doseQuantity
      variable:
        v: doseQuant
    rule:
      name:
        v: ot

string
v: Timing