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: R4B to R5

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

CapabilityStatementTransformsR4BtoR5

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

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

imports "http://hl7.org/fhir/StructureMap/*4Bto5"

group CapabilityStatement(source src : CapabilityStatementR4B, target tgt : CapabilityStatementR5) 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/CapabilityStatementB.status-R4BtoR5', '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/CapabilityStatementB.kind-R4BtoR5', '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/CapabilityStatementB.rest.mode-R4BtoR5', 'code');
  src.documentation -> tgt.documentation;
  src.security as s -> tgt.security as t then CapabilityStatementRestSecurity(s, t);
  src.resource as s where s.type != 'CatalogEntry' -> 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/types4bto5', '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/CapabilityStatementB.rest.resource.versioning-R4BtoR5', '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/CapabilityStatementB.rest.resource.conditionalRead-R4BtoR5', 'code');
  src.conditionalUpdate -> tgt.conditionalUpdate;
  src.conditionalDelete as v -> tgt.conditionalDelete = translate(v, 'http://hl7.org/fhir/ConceptMap/CapabilityStatementB.rest.resource.conditionalDelete-R4BtoR5', 'code');
  src.referencePolicy as v -> tgt.referencePolicy = translate(v, 'http://hl7.org/fhir/ConceptMap/CapabilityStatementB.rest.resource.referencePolicy-R4BtoR5', '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/CapabilityStatementB.rest.resource.searchParam.type-R4BtoR5', '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/CapabilityStatementB.messaging.supportedMessage.mode-R4BtoR5', '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/CapabilityStatementB.document.mode-R4BtoR5', 'code');
  src.documentation -> tgt.documentation;
  src.profile -> tgt.profile;
}