FHIR Cross-Version Mapping Pack
0.1.0 - Ballot for Release 5.1.0 International flag

FHIR Cross-Version Mapping Pack, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-cross-version/ and changes regularly. See the Directory of published versions

StructureMap: CapabilityStatement Transforms: R5 to R4B

Official URL: http://hl7.org/fhir/StructureMap/CapabilityStatement5to4B Version: 0.1.0
Standards status: Draft Maturity Level: 1 Computable Name: CapabilityStatement5to4B

CapabilityStatementTransformsR5toR4B

/// url = 'http://hl7.org/fhir/StructureMap/CapabilityStatement5to4B'
/// name = 'CapabilityStatement5to4B'
/// title = 'CapabilityStatement Transforms: R5 to R4B'
/// status = 'active'

uses "http://hl7.org/fhir/5.0/CapabilityStatement" alias CapabilityStatementR5 as source
uses "http://hl7.org/fhir/4.0/CapabilityStatement" alias CapabilityStatementR4B as target

imports "http://hl7.org/fhir/StructureMap/*5to4B"

group CapabilityStatement(source src : CapabilityStatementR5, target tgt : CapabilityStatementR4B) extends DomainResource <<type+>> {
  src.url -> tgt.url;
  src.version -> tgt.version;
  src.name -> tgt.name;
  src.title -> tgt.title;
  src.status as v -> tgt.status = translate(v, 'http://hl7.org/fhir/ConceptMap/CapabilityStatement.status-R5toR4', 'code');
  src.experimental -> tgt.experimental;
  src.date -> tgt.date;
  src.publisher -> tgt.publisher;
  src.contact -> tgt.contact;
  src.description -> tgt.description;
  src.useContext -> tgt.useContext;
  src.jurisdiction -> tgt.jurisdiction;
  src.purpose -> tgt.purpose;
  src.copyright -> tgt.copyright;
  src.kind as v -> tgt.kind = translate(v, 'http://hl7.org/fhir/ConceptMap/CapabilityStatement.kind-R5toR4', 'code');
  src.instantiates -> tgt.instantiates;
  src.imports -> tgt.imports;
  src.software as s -> tgt.software as t then CapabilityStatementSoftware(s, t);
  src.implementation as s -> tgt.implementation as t then CapabilityStatementImplementation(s, t);
  src.fhirVersion -> tgt.fhirVersion;
  src.format -> tgt.format;
  src.patchFormat -> tgt.patchFormat;
  src.implementationGuide -> tgt.implementationGuide;
  src.rest as s -> tgt.rest as t then CapabilityStatementRest(s, t);
  src.messaging as s -> tgt.messaging as t then CapabilityStatementMessaging(s, t);
  src.document as s -> tgt.document as t then CapabilityStatementDocument(s, t);
}

group CapabilityStatementSoftware(source src, target tgt) extends BackboneElement {
  src.name -> tgt.name;
  src.version -> tgt.version;
  src.releaseDate -> tgt.releaseDate;
}

group CapabilityStatementImplementation(source src, target tgt) extends BackboneElement {
  src.description -> tgt.description;
  src.url -> tgt.url;
  src.custodian -> tgt.custodian;
}

group CapabilityStatementRest(source src, target tgt) extends BackboneElement {
  src.mode as v -> tgt.mode = translate(v, 'http://hl7.org/fhir/ConceptMap/CapabilityStatement.rest.mode-R5toR4', 'code');
  src.documentation -> tgt.documentation;
  src.security as s -> tgt.security as t then CapabilityStatementRestSecurity(s, t);
  src.resource as s -> tgt.resource as t then CapabilityStatementRestResource(s, t);
  src.interaction as s -> tgt.interaction as t then CapabilityStatementRestInteraction(s, t);
  src.compartment -> tgt.compartment;
}

group CapabilityStatementRestSecurity(source src, target tgt) extends BackboneElement {
  src.cors -> tgt.cors;
  src.service -> tgt.service;
  src.description -> tgt.description;
}

group CapabilityStatementRestResource(source src, target tgt) extends BackboneElement {
  src.type as v -> tgt.type = translate(v, 'http://hl7.org/fhir/cross-version/types5to4b', 'code');
  src.profile -> tgt.profile;
  src.supportedProfile -> tgt.supportedProfile;
  src.documentation -> tgt.documentation;
  src.interaction as s -> tgt.interaction as t then CapabilityStatementRestResourceInteraction(s, t);
  src.versioning as v -> tgt.versioning = translate(v, 'http://hl7.org/fhir/ConceptMap/CapabilityStatement.rest.resource.versioning-R5toR4', 'code');
  src.readHistory -> tgt.readHistory;
  src.updateCreate -> tgt.updateCreate;
  src.conditionalCreate -> tgt.conditionalCreate;
  src.conditionalRead as v -> tgt.conditionalRead = translate(v, 'http://hl7.org/fhir/ConceptMap/CapabilityStatement.rest.resource.conditionalRead-R5toR4', 'code');
  src.conditionalUpdate -> tgt.conditionalUpdate;
  src.conditionalDelete as v -> tgt.conditionalDelete = translate(v, 'http://hl7.org/fhir/ConceptMap/CapabilityStatement.rest.resource.conditionalDelete-R5toR4', 'code');
  src.referencePolicy as v -> tgt.referencePolicy = translate(v, 'http://hl7.org/fhir/ConceptMap/CapabilityStatement.rest.resource.referencePolicy-R5toR4', 'code');
  src.searchInclude -> tgt.searchInclude;
  src.searchRevInclude -> tgt.searchRevInclude;
  src.searchParam as s -> tgt.searchParam as t then CapabilityStatementRestResourceSearchParam(s, t);
  src.operation as s -> tgt.operation as t then CapabilityStatementRestResourceOperation(s, t);
}

group CapabilityStatementRestResourceInteraction(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.documentation -> tgt.documentation;
}

group CapabilityStatementRestResourceSearchParam(source src, target tgt) extends BackboneElement {
  src.name -> tgt.name;
  src.definition -> tgt.definition;
  src.type as v -> tgt.type = translate(v, 'http://hl7.org/fhir/ConceptMap/CapabilityStatement.rest.resource.searchParam.type-R5toR4', 'code');
  src.documentation -> tgt.documentation;
}

group CapabilityStatementRestResourceOperation(source src, target tgt) extends BackboneElement {
  src.name -> tgt.name;
  src.definition -> tgt.definition;
  src.documentation -> tgt.documentation;
}

group CapabilityStatementRestInteraction(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.documentation -> tgt.documentation;
}

group CapabilityStatementMessaging(source src, target tgt) extends BackboneElement {
  src.endpoint as s -> tgt.endpoint as t then CapabilityStatementMessagingEndpoint(s, t);
  src.reliableCache -> tgt.reliableCache;
  src.documentation -> tgt.documentation;
  src.supportedMessage as s -> tgt.supportedMessage as t then CapabilityStatementMessagingSupportedMessage(s, t);
}

group CapabilityStatementMessagingEndpoint(source src, target tgt) extends BackboneElement {
  src.protocol -> tgt.protocol;
  src.address -> tgt.address;
}

group CapabilityStatementMessagingSupportedMessage(source src, target tgt) extends BackboneElement {
  src.mode as v -> tgt.mode = translate(v, 'http://hl7.org/fhir/ConceptMap/CapabilityStatement.messaging.supportedMessage.mode-R5toR4', 'code');
  src.definition -> tgt.definition;
}

group CapabilityStatementDocument(source src, target tgt) extends BackboneElement {
  src.mode as v -> tgt.mode = translate(v, 'http://hl7.org/fhir/ConceptMap/CapabilityStatement.document.mode-R5toR4', 'code');
  src.documentation -> tgt.documentation;
  src.profile -> tgt.profile;
}