Structure Definitions/Profiles
Structure Definition
A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.
The StructureDefinition resource describes a structure - a set of data element definitions, and their associated rules of usage. These structure definitions are used to describe both the content defined in the FHIR specification itself - Resources, data types, the underlying infrastructural types, and also are used to describe how these structures are used in implementations. This allows the definitions of the structures to be shared and published through repositories of structure definitions, compared with each other, and used as the basis for code, report and UI generation. For more information on Structure Definitions, see https://www.hl7.org/fhir/structuredefinition.html.
Profiling FHIR
A profile is defined as a A set of constraints on a resource represented as a structure definition with kind = constraint
The base FHIR specification describes a set of base resources, frameworks and APIs that are used in many different contexts in healthcare. However, there is wide variability between jurisdictions and across the healthcare ecosystem around practices, requirements, regulations, education and what actions are feasible and/or beneficial.
For this reason, the FHIR specification is a "platform specification" - it creates a common platform or foundation on which a variety of different solutions are implemented. As a consequence, this specification usually requires further adaptation to particular contexts of use. Typically, these adaptations specify:
- Rules about which resource elements are or are not used, and what additional elements are added that are not part of the base specification
- Rules about which API features are used, and how
- Rules about which terminologies are used in particular elements
- Descriptions of how the Resource elements and API features map to local requirements and/or implementations
Note that because of the nature of the healthcare ecosystem, there may be multiple overlapping sets of adaptations - by healthcare domain, by country, by institution, and/or by vendor/implementation. For more information on FHIR Profiles, please visit https://www.hl7.org/fhir/profiling.html.
Note: Trifolia-on-FHIR (ToF) forces users to create structurally correct FHIR but does not enforce that the content of the resources meet the requirements of all business rules in FHIR. An example of this, is that the structure of an Extension may be correct, but slices within the Extension may not be correct. Over time, as FHIR continues to mature and those business rules are solidified, ToF will be updated to enforce them.
Creating/Editing Profiles in Trifolia on FHIR
- Select Browse/Edit > Profiles/Extensions.
- Click the blue “+” icon in the top-right of the screen to create a new profile or the edit icon to edit an existing profile.
- Indicate the URL for the profile. The beginning of the URL should match the IG’s URL (e.g., http://test.com/fhir/structuredefinition/my-profile if the IG is http://test.com/fhir/implementationguide/test-ig).
- Verify the ID matches the end of the URL. This should auto-populate when you enter the URL
(e.g., “my-profile” for the above URL example) - Specify/update a name and title, which the published IG will display.
- Add/update the “type” of resource this profile constrains (e.g., “Patient”).
- You may want to build your profile based on another profile. Specify/update a “Base Profile” that exists in the system.
- Click “Save.”
- Click the “Elements” tab.
- Select an element to constrain or update
- Click “Constrain Element” in the right panel for new elements, or click on the element to update an existing element.
- Re-define the element in the right panel to specify the difference between the element and the base definition.
- Repeat for all constraints.
- Define a description for the profile, which the published IG will display to the reader.
- Save the profile.
Extensions
All extensions used in resources require a formal published definition that can be used by application developers or the applications themselves, to help integrate extensions into the healthcare process they support.
Every extension in a resource refers directly to its definition, which is made available as a StructureDefinition. A resource can be profiled to specify where particular extensions are required or expected.
For more information on creating/incorporating extensions into existing resources, please visit the “Defining Extensions” page at https://www.hl7.org/fhir/defining-extensions.html