/// url = 'http://hl7.org/fhir/StructureMap/CapabilityStatement3to2' /// name = 'CapabilityStatement3to2' /// title = 'CapabilityStatement Transforms: R3 to R2' /// status = 'active' uses "http://hl7.org/fhir/3.0/CapabilityStatement" alias CapabilityStatement as source uses "http://hl7.org/fhir/1.0/Conformance" alias ConformanceR2 as target imports "http://hl7.org/fhir/StructureMap/*3to2" group CapabilityStatement(source src : CapabilityStatement, target tgt : ConformanceR2) extends DomainResource <<type+>> { src.url -> tgt.url "conf-url"; src.version -> tgt.version "conf-version"; src.name -> tgt.name "conf-name"; src.status -> tgt.status "conf-status"; src.experimental -> tgt.experimental "conf-experimental"; src.publisher -> tgt.publisher "conf-publisher"; src.contact as vs -> tgt.contact as vt then contact(vs, vt) "conf-contact"; src.date -> tgt.date "conf-date"; src.description -> tgt.description "conf-description"; src.purpose -> tgt.requirements "conf-requirements"; src.copyright -> tgt.copyright "conf-copyright"; src.kind -> tgt.kind "conf-kind"; src.software as vs -> tgt.software as vt then software(vs, vt) "conf-software"; src.implementation as vs -> tgt.implementation as vt then implementation(vs, vt) "conf-implementation"; src.fhirVersion -> tgt.fhirVersion "conf-fhirVersion"; src.acceptUnknown -> tgt.acceptUnknown "conf-acceptUnknown"; src.format -> tgt.format "conf-format"; src.profile -> tgt.profile "conf-profile "; src.rest as vs -> tgt.rest as vt then rest(vs, vt) "conf-rest"; src.messaging as vs -> tgt.messaging as vt then messaging(vs, vt) "conf-messaging"; src.document as vs -> tgt.document as vt then document(vs, vt) "conf-document"; } group contact(source src, target tgt) extends Element { src.name -> tgt.name "conf-name"; src.telecom -> tgt.telecom "conf-telecom"; } group software(source src, target tgt) extends BackboneElement { src.name -> tgt.name "conf-name"; src.version -> tgt.version "conf-version"; src.releaseDate -> tgt.releaseDate "conf-releaseDate"; } group implementation(source src, target tgt) extends BackboneElement { src.description -> tgt.description "conf-description"; src.url -> tgt.url "conf-url"; } group rest(source src, target tgt) extends BackboneElement { src.mode -> tgt.mode "conf-mode"; src.documentation -> tgt.documentation "conf-documentation"; src.security as vs -> tgt.security as vt then security(vs, vt) "conf-security"; src.resource as vs -> tgt.resource as vt then resource(vs, vt) "conf-resource"; src.interaction as vs where (($this = 'batch') or ($this = 'transaction')).not() -> tgt.interaction as vt then interaction(vs, vt) "conf-interaction"; src where src.interaction.where($this = 'transaction').exists() and src.interaction.where($this = 'batch').exists() -> tgt.transactionMode = 'both' "conf-transactionMode-1"; src where src.interaction.where($this = 'transaction').exists() and src.interaction.where($this = 'batch').empty() -> tgt.transactionMode = 'transaction' "conf-transactionMode-2"; src where src.interaction.where($this = 'transaction').empty() and src.interaction.where($this = 'batch').exists() -> tgt.transactionMode = 'batch' "conf-transactionMode-3"; src where src.interaction.where($this = 'transaction').empty() and src.interaction.where($this = 'batch').empty() -> tgt.transactionMode = 'none' "conf-transactionMode-4"; src.searchParam as vs -> tgt.searchParam as vt then searchParam(vs, vt) "conf-searchParam"; src.operation as vs -> tgt.operation as vt then operation(vs, vt) "conf-operation"; src.compartment -> tgt.compartment "conf-compartment"; } group security(source src, target tgt) extends BackboneElement { src.cors -> tgt.cors "conf-cors"; src.service -> tgt.service "conf-service"; src.description -> tgt.description "conf-description"; src.certificate as vs -> tgt.certificate as vt then certificate(vs, vt) "conf-certificate"; } group certificate(source src, target tgt) extends BackboneElement { src.type -> tgt.type "conf-type"; src.blob -> tgt.blob "conf-blob"; } group resource(source src, target tgt) extends BackboneElement { src.type where $this != 'CapabilityStatement' -> tgt.type "conf-type2"; src.type where $this = 'CapabilityStatement' -> tgt.type = 'Conformance' "conf-type3"; src.profile -> tgt.profile "conf-profile"; src.documentation -> tgt.documentation "conf-documentation"; src.interaction as vs -> tgt.interaction as vt then interaction(vs, vt) "conf-interaction"; src.versioning -> tgt.versioning "conf-versioning"; src.readHistory -> tgt.readHistory "conf-readHistory"; src.updateCreate -> tgt.updateCreate "conf-updateCreate"; src.conditionalCreate -> tgt.conditionalCreate "conf-conditionalCreate"; src.conditionalRead -> tgt.conditionalRead "conf-conditionalRead"; src.conditionalUpdate -> tgt.conditionalUpdate "conf-conditionalUpdate"; src.conditionalDelete -> tgt.conditionalDelete "conf-conditionalDelete"; src.searchInclude -> tgt.searchInclude "conf-searchInclude"; src.searchRevInclude -> tgt.searchRevInclude "conf-searchRevInclude"; src.searchParam as vs -> tgt.searchParam as vt then searchParam(vs, vt) "conf-searchParam"; } group interaction(source src, target tgt) extends BackboneElement { src.code -> tgt.code "conf-code"; src.documentation -> tgt.documentation "conf-documentation"; } group searchParam(source src, target tgt) extends BackboneElement { src.name -> tgt.name "conf-name"; src.definition -> tgt.definition "conf-definition"; src.type -> tgt.type "conf-type4"; src.documentation -> tgt.documentation "conf-documentation"; } group operation(source src, target tgt) extends BackboneElement { src.name -> tgt.name "conf-name"; src.definition -> tgt.definition "conf-definition"; } group messaging(source src, target tgt) extends BackboneElement { src.endpoint as vs -> tgt.endpoint as vt then endpoint(vs, vt) "conf-endpoint"; src.reliableCache -> tgt.reliableCache "conf-reliableCache"; src.documentation -> tgt.documentation "conf-documentation"; src.event as vs -> tgt.event as vt then event(vs, vt) "conf-event"; } group endpoint(source src, target tgt) extends BackboneElement { src.protocol -> tgt.protocol "conf-protocol"; src.address -> tgt.address "conf-address"; } group event(source src, target tgt) extends BackboneElement { src.code -> tgt.code "conf-code"; src.category -> tgt.category "conf-category"; src.mode -> tgt.mode "conf-mode"; src.focus -> tgt.focus "conf-focus"; src.request -> tgt.request "conf-request"; src.response -> tgt.response "conf-response"; src.documentation -> tgt.documentation "conf-documentation"; } group document(source src, target tgt) extends BackboneElement { src.mode -> tgt.mode "conf-mode"; src.documentation -> tgt.documentation "conf-documentation"; src.profile -> tgt.profile "conf-profile"; }
CapabilityStatement Transforms: R3 to R2
(($this = 'batch') or ($this = 'transaction')).not()
src.interaction.where($this = 'transaction').exists() and src.interaction.where($this = 'batch').exists()
src.interaction.where($this = 'transaction').exists() and src.interaction.where($this = 'batch').empty()
src.interaction.where($this = 'transaction').empty() and src.interaction.where($this = 'batch').exists()
src.interaction.where($this = 'transaction').empty() and src.interaction.where($this = 'batch').empty()