FHIR Release 3 (STU)

This page is part of the FHIR Specification (v3.0.2: STU 3). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

FHIR Infrastructure Work GroupMaturity Level: N/ABallot Status: InformativeCompartments: Not linked to any defined compartments

R2 : R3 Converson maps for OperationDefinition.

Functional status for this map: 18 tests that all execute ok. 1 fail round-trip testing and all r3 resources are valid. (see documentation)

map "http://hl7.org/fhir/StructureMap/OperationDefinition2to3" = "R2 to R3 Conversions for OperationDefinition"

uses "http://hl7.org/fhir/DSTU2/StructureDefinition/OperationDefinition" alias OperationDefinitionR2 as source
uses "http://hl7.org/fhir/StructureDefinition/OperationDefinition" alias OperationDefinition as target

imports "http://hl7.org/fhir/StructureMap/*2to3"

group for type+types  OperationDefinition extends DomainResource
  input src : OperationDefinitionR2 as source
  input tgt : OperationDefinition as target

  "OperationDefinition-url" : for src.url make tgt.url
  "OperationDefinition-version" : for src.version make tgt.version
  "OperationDefinition-name" : for src.name make tgt.name
  "OperationDefinition-status" : for src.status make tgt.status
  "OperationDefinition-kind" : for src.kind make tgt.kind
  "OperationDefinition-experimental" : for src.experimental make tgt.experimental
  "OperationDefinition-date" : for src.date make tgt.date
  "OperationDefinition-publisher" : for src.publisher make tgt.publisher
  "OperationDefinition-contact" : for src.contact as vs0 make tgt.contact as vt0 then opdContact(vs0, vt0)
  "OperationDefinition-idempotent" : for src.idempotent make tgt.idempotent
  "OperationDefinition-code" : for src.code make tgt.code
  "OperationDefinition-comment" : for src.notes make tgt.comment
  "OperationDefinition-requirements" : for src.requirements make tgt.purpose
  "OperationDefinition-description" : for src.description make tgt.description
  "OperationDefinition-base" : for src.base make tgt.base
  "OperationDefinition-system" : for src.system make tgt.system
  "OperationDefinition-type1" : for src.type make tgt.resource
  "OperationDefinition-type2" : for src where type.exists() make tgt.type = true
  "OperationDefinition-type2" : for src where type.empty() make tgt.type = false
  "OperationDefinition-instance" : for src.instance make tgt.instance
  "OperationDefinition-parameter" : for src.parameter as vs0 make tgt.parameter as vt0 then opParam(vs0, vt0)
endgroup

group opdContact extends Element
  input src as source
  input tgt as target

  "OperationDefinition.contact-name" : for src.name make tgt.name
  "OperationDefinition.contact-telecom" : for src.telecom make tgt.telecom
endgroup

group opParam extends BackboneElement
  input src as source
  input tgt as target

  "OperationDefinition.parameter-name" : for src.name make tgt.name
  "OperationDefinition.parameter-use" : for src.use make tgt.use
  "OperationDefinition.parameter-min" : for src.min make tgt.min
  "OperationDefinition.parameter-max" : for src.max make tgt.max
  "OperationDefinition.parameter-documentation" : for src.documentation make tgt.documentation
  "OperationDefinition.parameter-type1" : for src.type as v where ($this in ('number' | 'date' | 'string' | 'token' | 'reference' | 'composite' | 'quantity' | 'uri')).not() make tgt.type = v
  "OperationDefinition.parameter-type2" : for src.type as v where ($this in ('number' | 'date' | 'string' | 'token' | 'reference' | 'composite' | 'quantity' | 'uri')) make tgt.searchType = v, tgt.type = 'string'
  "OperationDefinition.parameter-profile" : for src.profile make tgt.profile
  "OperationDefinition.parameter-part" : for src.part as ps0 make tgt.part as pt0 then opPart(ps0, pt0)
endgroup

group opPart extends BackboneElement
  input src as source
  input tgt as target

  "OperationDefinition.parameter-part-name" : for src.name make tgt.name
  "OperationDefinition.parameter-part-use" : for src.use make tgt.use
  "OperationDefinition.parameter-part-min" : for src.min make tgt.min
  "OperationDefinition.parameter-part-max" : for src.max make tgt.max
  "OperationDefinition.parameter-part-documentation" : for src.documentation make tgt.documentation
  "OperationDefinition.parameter-part-type" : for src.type make tgt.type
  "OperationDefinition.parameter-part-profile" : for src.profile make tgt.profile
  "OperationDefinition.parameter-part-part" : for src.part as psrc make tgt.part as ptgt then opPart(psrc, ptgt)
endgroup
map "http://hl7.org/fhir/StructureMap/OperationDefinition3to2" = "R3 to R2 Conversion for OperationDefinition"

uses "http://hl7.org/fhir/StructureDefinition/OperationDefinition" alias OperationDefinition as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/OperationDefinition" alias OperationDefinitionR2 as target

imports "http://hl7.org/fhir/StructureMap/*3to2"

group for type+types  OperationDefinition extends DomainResource
  input src : OperationDefinition as source
  input tgt : OperationDefinitionR2 as target

  "OperationDefinition-url" : for src.url make tgt.url
  "OperationDefinition-version" : for src.version make tgt.version
  "OperationDefinition-name" : for src.name make tgt.name
  "OperationDefinition-status" : for src.status make tgt.status
  "OperationDefinition-kind" : for src.kind make tgt.kind
  "OperationDefinition-experimental" : for src.experimental make tgt.experimental
  "OperationDefinition-publisher" : for src.publisher make tgt.publisher
  "OperationDefinition-contact" : for src.contact as vs0 make tgt.contact as vt0 then opdContact(vs0, vt0)
  "OperationDefinition-date" : for src.date make tgt.date
  "OperationDefinition-requirements" : for src.purpose make tgt.requirements
  "OperationDefinition-description" : for src.description make tgt.description
  "OperationDefinition-idempotent" : for src.idempotent make tgt.idempotent
  "OperationDefinition-code" : for src.code make tgt.code
  "OperationDefinition-notes" : for src.comment make tgt.notes
  "OperationDefinition-base" : for src.base make tgt.base
  "OperationDefinition-system" : for src.system make tgt.system
  "OperationDefinition-type" : for src.resource make tgt.type
  "OperationDefinition-instance" : for src.instance make tgt.instance
  "OperationDefinition-parameter" : for src.parameter as vs0 make tgt.parameter as vt0 then opdParameter(vs0, vt0) 
endgroup

group opdContact extends Element
  input src as source
  input tgt as target

  "OperationDefinition.contact-name" : for src.name make tgt.name
  "OperationDefinition.contact-telecom" : for src.telecom make tgt.telecom
endgroup

group opdParameter extends BackboneElement
  input src as source
  input tgt as target

  "OperationDefinition.parameter-name" : for src.name make tgt.name
  "OperationDefinition.parameter-use" : for src.use make tgt.use
  "OperationDefinition.parameter-min" : for src.min make tgt.min
  "OperationDefinition.parameter-max" : for src.max make tgt.max
  "OperationDefinition.parameter-documentation" : for src.documentation make tgt.documentation
  "OperationDefinition.parameter-type" : for src.type where src.searchType.empty() make tgt.type
  "OperationDefinition.parameter-type" : for src.searchType make tgt.type
  "OperationDefinition.parameter-profile" : for src.profile make tgt.profile
  "OperationDefinition.parameter-part" : for src.part as ps0 make tgt.part as pt0 then opdPart(ps0, pt0)
endgroup  
  
group opdPart extends BackboneElement
  input src as source
  input tgt as target

  "OperationDefinition.parameter-part-name" : for src.name make tgt.name
  "OperationDefinition.parameter-part-use" : for src.use make tgt.use
  "OperationDefinition.parameter-part-min" : for src.min make tgt.min
  "OperationDefinition.parameter-part-max" : for src.max make tgt.max
  "OperationDefinition.parameter-part-documentation" : for src.documentation make tgt.documentation
  "OperationDefinition.parameter-part-type" : for src.type make tgt.type
  "OperationDefinition.parameter-part-profile" : for src.profile make tgt.profile
  "OperationDefinition.parameter-part-part" : for src.part as psrc make tgt.part as ptgt then opdPart(psrc, ptgt)
endgroup