This page is part of the FHIR Specification (v0.01: Historical Archive Draft). The current version which supercedes this version is 4.0.1. For a full list of available versions, see the Directory of published versions 
This document outlines the steps involved in developing a resource for FHIR. It covers both the technical steps required to produce a resource, and the governance over the process.
The first step is to get approval for the resource. Each resource that exists must first be approved by the FHIR governance committee (for now, the governance committee is the MnM project team, but eventually this will be a TSC sub-committee). A proposal to the committee must consider the following things:
Generally, the governance committee is looking for stability, for proof that the committee has thought through the implications of the multiple frameworks that FHIR supports, and to prevent the same content being modeled in different ways for no good reason. The committee is also responsible for ongoing QA of resources, and can withdraw permission to publish a non-normative resource, or reassign the ownership of a resource.
Once approval has been gained, the committee can build the resource definition
The following tools are required to develop resources for FHIR:
In addition to these tooling prerequisites, to develop a resource, you will need a subversion username and password, and a resource name.
To define a resource, 4 different things must be built:
You are now ready to start developing the actual resource content across the 4 source files. Note that you can leave all but the steps 1-3 to the governance committee if you are happy to leave drafting resource content until after you have approval for the resource. You cannot check in changes to publish.ini/sidebar.htm until approval for the resource has been granted.
The master definitions of the resource are found in the .csv file. This contains a series of columns that define the content of the resource.
| Element | The full path of the element (defines the element - see below) |
| Card. | Minimum and maximum Cardinality. Elements that have a max cardinality > 1 should still have a singular name. Note that the usual cardinality combinations are 0..1, 1..1, 0..* and 1..*. Other values for both the lower and upper limit are allowed, but should be based on genuine limits, not arbitrary conformance-type limits. |
| Conf. | Conformance (see Control Codes). conformance which is tightly tied to the cardinality. Note that an element with a 0..1 cardinality shouldn't be mandatory, while an element with 0..* cardinality may be optional, conditional, or mandatory |
| Type | [Conditional] The type of a data element - may be from the data types, or
a Resource reference, a Narrative (though this
is unusual). A type must be assigned if the element has no children defined, else a type must not be assigned Multiple types can be indicated, seperated by a "|". If more than one type is listed, the element name must terminate with "[x]". If the type is Resource, one or more resource types must be listed as a parameter, or "Any" for any kind of resource. |
| Concept Domain | [Conditional] For types of code, Coding, or CodeableConcept, a concept domain must be defined. Concept domains may be bound as part of the FHIR specification - see below |
| Must Understand | [Optional] Whether a receiving application must understand the element (note that must understand isn't quite the same as must support - if an application understands the element by insisting on one fixed value, this is acceptable) |
| Short Name | The definition used for the resource in the XML definitions - limited in length by the available space in the definitions |
| Definition | Formal definition for the meaning of the element. This must follow definition good practices – See below. |
| Requirements | [Optional] Underlying requirements that this element is defined to meet |
| Comments | [Optional] Additional user focused comments - clarifications, explanation of how to use the element, notes on how not to use it. |
| Condition | [Conditional] if the conformance code is "Conditional", this specifies what the condition is |
| RIM Mapping | RIM mapping for the element. See below |
| v2 Mapping | [Optional] where this element comes from in v2 messages. Multiple mappings may be provided |
| To Do | [Optional] Committee notes to implementers about future things that are planned (published) |
| Committee Notes | [Optional] Private committee notes - not published |
The most important column is the first one, which defines the structure of the resource. The first row of the first column defines the formal title of the resource used throughout the FHIR build process. Every row from then on must start with [Title]. The second row is always [Title].id, which is the master identifier of the resource that never changes. From there on, the values of the rows take the form of [Title].x.y where the dotted notation indicates structural containment. For instance, [Title].id is the id element in the resource [Title], and [Title].section.name is a name element inside the section element of the [Title] resource element. A path can never be used without defining it first. So [Title].element.name can only be used after [Title].element. The last two elements in a resource are always [Title].extensions and [Title].text, as defined in the template.
Names used for resource elements must follow the following rules and guidelines:
Elements should be ordered roughly in terms of importance, with related concepts grouped together.
The base spreadsheet only has columns for mapping to the RIM and v2. Many other mappings can be done, but will be found in other spreadsheets (details to be provided).
In all but a few rare circumstances, elements with a data type of code, coding, and codeableConcept should have a concept domain assigned. This provides a hook for the terminology methodology and implementation tools. Any concept domain defined must be entered in /terminologies/concept- domains.csv, along with a definition and binding information. The binding information should be filled out according to this table:
| Concept Domain | The name of the concept domain as used in the resource definitions |
| Definition | A formal definition for the concept domain, following good definition practices. See below |
| Binding Type & Binding | The type of binding defined in FHIR. Possible values:
|
Todo: methdology + grammar
A core tenant of FHIR is that resources should be simple, stable, and easy to use. Generally, the following guidelines apply to defining resources:
A key part of the design process is that the resources should the define the data elements that everyone needs, and leave the rest of the data elements to extensions - the committee can define and publish extensions. The point of committees defining extensions is that uncommonly encountered use cases can be kept in extensions, and all implementers are not forced to deal with them (this is a big part of the perceived implementation difficulty associated with HL7 standards). Therefore one significant part of the process of building a resource is deciding what elements to put in the resource, and what to put in extensions. Data elements are candidates for being in the base resource if:
Extensions are a legitimate way for committees to define content. While committees should not define extensions that must be understood, there is no reason for committees not to define extensions. Note that in FHIR, ballot comments that something is in an extension and not a model can be ruled out of scope or non-persuasive if substantial evidence is not provided that the above criteria are met. Committees may subsequently elevate extensions to full resource content (implementation implications of this are discussed in the standard). It is expected that most, if not all, useful implementation profiles will include the use of extensions.
Changing cardinality is significant to implementers. The following guidelines apply:
todo: put something here from vocabulary. Specifically, we’re looking for: short, non-tautological using broadly understood terms, with examples (usually 3-4, unless it’s bound or something simple like a date). Definitions must clearly distinguish an element from other elements, including extension elements.
The following table defines the data types available, and provides some notes concerning their use.
| Type | Description | Usage |
|---|---|---|
| string | A simple string (=v3 ST) | Should be known to be short, and no prospect of containing paragraphs or structure or formatting |
| Narrative | xhtml structure | Don't use except where it appears in all resources |
| Attachment | Multimedia Attachment (=v3 ED) | For complex narrative that may have paragraphs, structure, or formatting, or not be text based at all (image, video etc) |
| code | A simple code (~v3 CS) | Simple code where the list is defined by the FHIR infrastructure, the resource definition, or by some fixed external reference (usually ISO or W3C) |
| Coding | A defined code (~v3 CV) | A direct reference to a concept in a terminology. Use where the content model is managing the issue of text equivalence, and translations across multiple fields directly |
| CodeableConcept | A full concept (~v3 CD) | Use for a simple equivalent of CD/CE |
| Choice | A choice from a questionnare | a code from a code/description list, where there is no formal terminology underlying the list |
| dateTime | a fixed instant(=v3 TS) | System times, always known to the second |
| humanDate | a date with variable precision(=v3 TS) | Year, Year + month, Year + month + date, or a dateTime - use for any dates taht might come from humans |
| Schedule | A set of times (~v3 GTS) | For specifying a schedule (a tamed GTS) |
| integer | A simple integer (=v3 INT) | only a simple integer - for structural values only (like query result count) |
| Quantity | A measured/measurable amount (~v3 PQ/CO/MO/IVL) | Use where there is a value with human units, that may be coded. It may be possible to use a more specific variant: |
| Duration | An amount of time (~v3 PQ) | Fixes to units of time coded in UCUM |
| Count | A simple count (~v3 PQ/INT) | Fixes the quantity to a simple count of whole numbers |
| Money | A currency amount (~v3 MO) | Fixes units to a currency |
| Interval() | An interval (=v3 IVL/URG) | A range (low + high). If an element can be either a fixed interval or a duration, allow both types. Usual types parameters can be Quantity or humanDate, but integer, decimal, and dateTime can also be used |
| Ratio | numerator/denominator (=v3 RTO) | Same usage as v3 ratio. Usually just used as a choice of possible data type on observations |
| uri | A uri (~v3 URL) | A uri. (urn or URL). Usually used in the data types, not in resources |
| id | A simple id | This is not properly scoped. It's used where the scope implicitly implies the meaning - resource ids, or internal references. No use in general resource content |
| Identifier | A known identifier (~v3 II) | An identifier. Same scope as II |
| HumanId | A human assigned identifier (see v3 identifier pattern) (=v2 CX) | In addition to the actual Id, has a type, a period, and an assigner. Use for human assigned identifiers |
| Resource() | A reference to another resource | You can specify one or more resource types in the parameter (or "Any") |
| HumanName | A human assigned name (=v3 EN) | use as for v3 EN / v2 XPN / XON |
| Address | A postal address (=v3 AD) | Use as for v3 AD / v2 XAD |
| Contact | Contact details (=v3 TEL) | Use as for v3 TEL / v2 XTN |
In addition to these data types, there's a few other legal data types that are not expected to be used anywhere in a resource.
The information defined in the .csv file will all appear in the specification but are all specific to an element, and some are only published in the formal definitions. To help the user with implementation, a set of concise additional notes is found under each resource definition. These notes may discuss how to use a resource, why it doesn't contain things, the relationship between fields, etc. these notes are defined by editing [name].htm
In addition, [name].htm contains further usage notes, and any custom transactions that must defined for the resource.
The final part of building a resource is to hand edit an example. The data in the example should illustrate aspects of building and using the resource and is a useful way of double checking the resource definitions. Ideally it should be appropriate from a business/clinical perspective. However, fully exercising the resource is more important.
Resources may also have specific message events defined for them. For now, this is done in source/messaging.htm.
This is an old version of FHIR retained for archive purposes. Do not use for anything else
Implementers are welcome to experiment with the content defined here, but should note that the contents are subject to change without prior notice.
© HL7.org 2011 - 2012. FHIR v0.01 generated on Mon, May 14, 2012 09:48+1000.