Create a derived profile based on a profile in the package

For an imaginary use case you want to reuse a set of profile, however, your system mandates that some elements are always present. To make sure only the required elements are processed and to provide documantation for implementation (derived) profile can be created.

Packages make it very easy to reuse profiles. A whole versioned set of profiles for further authoring can be obtained by downloading a package. Package dependencies ensure that the used profiles do not need to be included in your own project/package.

This exercise demonstrates how to create a derived profile based on a profile in the acme.base.r4 4.0.0 package.

Prerequisites
  • Forge for FHIR R4 (free for non-commercial use)
  • Some knowledge of FHIR Conformance Resources and profiling

1. Install acme.base.r4 4.0.1

  • Open Forge for R4
  • Open a profile folder in Forge (use your working directory for example)

2020-06-05 14_41_20-Forge 24.2 for R4

  • Go to the dependencies tab
  • Go to Simplifier icon
  • Search for acme.base.r4
  • Install version 4.0.1 by selecting it and clicking on ‘Add’

2020-06-10 18_03_31-Window

2. Create a derived profile

All the profiles in the installed packages are now available in Forge. This makes creating a derived profile easy.

Create a derived profile of ACMEbaseObservationLab

  • Select your profile folder
  • Go to the project tab
  • Navigate to the acme.base.r4 4.0.1 package
  • Select the ACMEbaseObservationLab profile
  • Right mouse click, and select New Derived Profile
  • Provide a name and a canonical of your liking. Click OK to create your own derived profile!
    • If Forge pop-ups a FHIR version warning: select Continue with 4.0.1

2020-06-05 15_13_10-Forge 24.2 for R4

3. Add constraints

We are now entering the FHIR profiling domain. Let's add some constraints to the profile to make it suitable for our imaginary FHIR implementation. The following steps show how to profile three different types of constraints. These are adjusting the cardinality of an element, constraining the type of an element and requiring the use of codes from a bound ValueSet by adjusting the ValueSet binding strength. Happy profiling!

  • Make Observation.value[x] mandatory and constrain Observation.value[x] to a Quantity DataType
    • Go to your derived profile and select Element Tree
    • Select Observation.value[x], set the cardinality 1..1 in the Element Properties screen on the right.
    • Next, only check Quantity under Types

2020-06-05 15_32_48-Forge 24.2 for R4

  • Change the ValueSet binding on Observation.interpretation
    • Select interpretation in the Element Tree
    • Change the Strenght under Valueset binding from extensible to required. This enforces the use of a code from the bound ValueSet.

2020-06-10 18_18_14-Window

  • Save profile to your working directory.

You have now created your own profile!