Current Build
FHIR Infrastructure Work GroupMaturity Level: N/ABallot Status: Informative

In addition to a list of all differences between DSTU 3 and STU 4, this specification also provides transforms between R3 and R4 for most resources that were in R3. These transforms are expressed using the FHIR Mapping Language, and both serve as formal documentation of the relationship between the resource structures in R3 and R4, and can also be used to convert between the formats automatically.

The following table summarizes the state of the R3:R4 maps for each resource type.

Note the following:

  • Transforms are tested using the following method:
    1. For each example resource in the R3 release of the FHIR specification that has a transform to R4
    2. apply the transform to R4
    3. validate against the R4 specification
    4. apply the reverse transform back to R3
    5. compare the outcome with the original resource - ideally, it should be identical
  • All transforms should execute - that is, they should be able to take any R3 resource, represent the content in R4, and then generate an R3 representation for the same content. Note, though, that in a few cases, the differences between R3 and R4 designs are so significant that not all examples can be successfully transformed at all.
  • For some resources, the differences in design between R3 and R4 are sufficiently great that the R3 examples cannot reproduce the same output after conversion to R4 and then back to R3. For example, the R4 resource may have a different set of status codes with imperfect maps
  • For some resources, the information available in the R3 examples is not enough to generate valid R4 resources, and so the resources generate R4 validation errors. (e.g. R3 resources missing an element that is required in R4)
  • The transform scripts are only tested to the degree that R3 provided example data
  • The Bundle tests include the large distribution files (all valuesets, structure definitions, etc.) and so generate large numbers of validation errors
  • For all these reasons, the maps provided in the specification are not authoritative; they are provided to help implementers who need to convert between the R2 and R3 format, but additional revision may be required in an implementation specific context. The FHIR Wiki tracks ongoing work to provide improved transforms, and other transformation options
  • These maps are not yet updated to use the version specific extensions
Resource # Tests % Execute OK % RoundTrip Ok % R4 Valid R4 Error Count
Account2000
ActivityDefinition9000
AdverseEvent1000
AllergyIntolerance310000
Appointment3000
AppointmentResponse210000
AuditEvent8000
Basic33300
Binary2000
BiologicallyDerivedProductNo r2:r3 maps available
BodyStructureNo r2:r3 maps available
Bundle2810000
CapabilityStatement98800
CarePlan11000
CareTeam1000
ChargeItem1000
ChargeItemDefinitionNo r2:r3 maps available
Claim167500
ClaimResponse1000
ClinicalImpression110000
CodeSystem410000
Communication3000
CommunicationRequest2000
CompartmentDefinition610000
Composition110000
ConceptMap410000
Condition12000
Consent1210000
Contract7000
Coverage4000
CoverageEligibilityRequestNo r2:r3 maps available
CoverageEligibilityResponseNo r2:r3 maps available
DetectedIssue4000
Device98800
DeviceComponent2000
DeviceDefinitionNo r2:r3 maps available
DeviceMetric1000
DeviceRequest2000
DeviceUseStatement110000
DiagnosticReport144200
DocumentManifest2000
DocumentReference1000
Encounter109000
Endpoint310000
EnrollmentRequest1000
EnrollmentResponse1000
EntryDefinitionNo r2:r3 maps available
EpisodeOfCare110000
EventDefinitionNo r2:r3 maps available
ExampleScenarioNo r2:r3 maps available
ExplanationOfBenefit1000
FamilyMemberHistory2000
Flag2000
Goal210000
GraphDefinition110000
Group210000
GuidanceResponse1000
HealthcareService1000
ImagingStudy2000
Immunization310000
ImmunizationEvaluationNo r2:r3 maps available
ImmunizationRecommendation1000
ImplementationGuide1000
InsurancePlanNo r2:r3 maps available
InvoiceNo r2:r3 maps available
ItemInstanceNo r2:r3 maps available
Library11000
Linkage110000
List9000
Location6000
Measure6000
MeasureReport3000
Media4000
Medication233000
MedicationAdministration14000
MedicationDispense313500
MedicationKnowledgeNo r2:r3 maps available
MedicationRequest363300
MedicationStatement75700
MedicinalProductNo r2:r3 maps available
MedicinalProductAuthorizationNo r2:r3 maps available
MedicinalProductClinicalsNo r2:r3 maps available
MedicinalProductDeviceSpecNo r2:r3 maps available
MedicinalProductIngredientNo r2:r3 maps available
MedicinalProductManufacturedNo r2:r3 maps available
MedicinalProductPackagedNo r2:r3 maps available
MedicinalProductPharmaceuticalNo r2:r3 maps available
MessageDefinition3000
MessageHeader1000
NamingSystem310000
NutritionOrder13000
Observation487000
ObservationDefinitionNo r2:r3 maps available
OperationDefinition371800
OperationOutcome610000
Organization119000
OrganizationRoleNo r2:r3 maps available
Patient168700
PaymentNotice110000
PaymentReconciliation1000
Person510000
PlanDefinition116300
Practitioner1410000
PractitionerRole110000
Procedure15000
ProcessRequest910000
ProcessResponse3000
Provenance5000
Questionnaire6000
QuestionnaireResponse58000
RelatedPerson4000
RequestGroup2000
ResearchStudy1000
ResearchSubject1000
RiskAssessment4000
Schedule3000
SearchParameter310000
Sequence1610000
ServiceRequestNo r2:r3 maps available
Slot4000
Specimen45000
SpecimenDefinitionNo r2:r3 maps available
StructureDefinition2063200
StructureMap210000
Subscription210000
Substance68300
SubstancePolymerNo r2:r3 maps available
SubstanceReferenceInformationNo r2:r3 maps available
SubstanceSpecificationNo r2:r3 maps available
SupplyDelivery2000
SupplyRequest1000
Task6000
TerminologyCapabilitiesNo r2:r3 maps available
TestReport110000
TestScript710000
UserSessionNo r2:r3 maps available
ValueSet88700
VerificationResultNo r2:r3 maps available
VisionPrescription2000