FHIR Release 3 (STU) 4
This page is part of the FHIR Specification (v3.0.2: STU 3). The current version which supercedes this version is 4.0.1 . For a full list of available versions, see the Directory of published versions
FHIR Infrastructure Work Group Maturity Level : N/A Ballot Standards Status : Informative Security Category : Not Classified Compartments : Patient , Practitioner , RelatedPerson

R2 : R3 Converson : R4 Conversion maps for Basic.

Functional status for this map: 4 3 tests that all execute ok. All tests pass round-trip testing and 1 all r3 resources are invalid (3 errors). valid. ( see documentation)

map "http://hl7.org/fhir/StructureMap/Basic2to3" = "R2 to R3 Conversions for Basic"
map "http://hl7.org/fhir/StructureMap/Basic3to4" = "R3 to R4 Conversions for Basic"
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Basic" alias BasicR2 as source

uses "http://hl7.org/fhir/3.0/StructureDefinition/Basic" alias BasicR3 as source

uses "http://hl7.org/fhir/StructureDefinition/Basic" alias Basic as target
imports "http://hl7.org/fhir/StructureMap/*2to3"
group for type+types  Basic extends DomainResource
  input src : BasicR2 as source
  input tgt : Basic as target

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

  "Basic-identifier" : for src.identifier make tgt.identifier
  "Basic-code" : for src.code make tgt.code
  "Basic-subject" : for src.subject make tgt.subject
  "Basic-created" : for src.created make tgt.created
  "Basic-author" : for src.author make tgt.author

group Basic(source src : BasicR3, target tgt : Basic) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.code -> tgt.code;
  src.subject -> tgt.subject;
  src.created -> tgt.created;
  src.author -> tgt.author;
}

endgroup

map "http://hl7.org/fhir/StructureMap/Basic3to2" = "R3 to R2 Conversion for Basic"
map "http://hl7.org/fhir/StructureMap/Basic4to3" = "R4 to R3 Conversion for Basic"
uses "http://hl7.org/fhir/StructureDefinition/Basic" alias Basic as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Basic" alias BasicR2 as target
imports "http://hl7.org/fhir/StructureMap/*3to2"

uses "http://hl7.org/fhir/3.0/StructureDefinition/Basic" alias BasicR3 as target

group for type+types  Basic extends DomainResource
  input src : Basic as source
  input tgt : BasicR2 as target

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

  "Basic-identifier" : for src.identifier make tgt.identifier
  "Basic-code" : for src.code make tgt.code
  "Basic-subject" : for src.subject make tgt.subject
  "Basic-created" : for src.created make tgt.created
  "Basic-author" : for src.author make tgt.author

group Basic(source src : Basic, target tgt : BasicR3) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.code -> tgt.code;
  src.subject -> tgt.subject;
  src.created -> tgt.created;
  src.author -> tgt.author;
}

endgroup

basic-adverseevent-example ERROR @ Basic.extension[1]: The extension http://hl7.org/fhir/StructureDefinition/qicore-adverseevent-cause is unknown, and not allowed here (src = InstanceValidator) ERROR @ Basic.extension[2]: The extension http://hl7.org/fhir/StructureDefinition/qicore-adverseevent-type is unknown, and not allowed here (src = InstanceValidator) ERROR @ Basic.extension[3]: The extension http://hl7.org/fhir/StructureDefinition/qicore-adverseevent-period is unknown, and not allowed here (src = InstanceValidator) <p>No validation errors - all conversions are clean</p>