Building an Information model.

As described in the previous post, an Information model is used to capture the data requirements for a use case in a structured way, using the FHIR datatypes, but not aligned with the core FHIR resource types. This means that you can’t create an instance of this model – it’s just for analysis – but it will inform the development of the real FHIR artifacts.

Start clinFHIR and set the servers to an R3 capable server. The defaults are HAPI public test server for conformance and data, and Ontoserver for terminology. The models you create will be saved to the conformance server. Of course, if you are doing this for a real project, you might want to use a server that is under your control – for example an instance of a HAPI server as described here. (Use the ‘Add Server’ link to the upper right in the clinFHIR launch page, and then select it as the conformance server).

Then, select the Logical modeler from the launch page. After it loads, create a new model by clicking on the ‘New Model’ link to the upper left. The screen image below shows a new model being created – remember to click the ‘Check’ button as the model name must be unique on the Conformance server. The model name must be a single word (no spaces), and a valid FHIR id – for example the underscore is not allowed. Note the Base Resource is empty.

1 newIM.png

You’ll then be placed in the Designer view, with just the model name as a root. You might want to click the ‘Hide Selector’ link in the navbar to maximize the screen real estate you have.

To add an element to the model, select the parent element (eg the root to start with) then the ‘Add element’ link that appears in the right hand pane (make sure that the ‘Element’ tab is displayed). The element edit dialog is shown:

2 edit element.png

The layout should be self explanatory. Some notes:

  • Make sure the item name is a single word, and unique under the parent element.
  • The datatype defaults to a string – change it to whatever is appropriate for this element. If you select a coded datatype (CodeableConcept is the usual one), then a link will appear below it that allows you to select the ValueSet (if it exists). There’s a lot of value (sorry) in identifying the ValueSets as early as possible as this helps the whole model ‘make sense’ to a clinician.
  • The ‘eye’ icon to the right of the selected datatype will display the description of that datatype from the FHIR specification in a separate browser tab.
  • The ‘fixed value’ entry is really just for documentation, but useful when part of an element should be a given value. Quite commonly this is for the ‘system’ property of an Identifier – when you want to specify that the identifier value should come from a specific registry such as a Nation/Regional Identifier.
  • For an information model, the mapping path is usually not useful. However, if you’re building a model that represents some existing artifact – such as a v2 message – then it can be useful to record where this particular element comes from. It is much more important in the resource models (as we will see in the next post).

Click the Save button when done.

And, really that’s all there is to it. You can add any number of elements (remember to select the parent first), move elements up and down, edit and delete them. When moving an element, it only works ‘under’ the parent – you can’t move it to a different parent (yet).

Remember to save the model frequently (it’s not automatic) – the app seems quite stable, but you never know.

Here’s a screen shot of part of the Information Model we discussed in the previous post

3 IM sample - designer.png

Once you’ve created the model (remember that you can change it any time of course), there are a number of different ways of viewing it.

Here’s the ‘Table’ tab:

4 IM sample - table.png

This view presents the same data in a table rather than a tree, with children being indented below their parents. You can still select – and edit – any element in the model. (And note that I hid the selector here – the table needs all the space it can get, especially for more complex models. You can also hide the Detail pane for full screen review).

The analysis tab has a number of views for ‘specialty’ purposes – not all will be useful in all models. The coded tab shown below is one that is almost always useful:

5 analysis - coded.png

It shows only those elements that have a coded datatype, and the ValueSet that is associated with it. Any elements where the ValueSet is not specified (all of them in this example) are going to need further work.

The mindmap tab can also be useful:

6 analysis - mindmap.png

But it does get quiet cluttered with large models. You can zoom/move in the graph, and select any element to see/edit the details on the right.

The doc (Documentation) tab is markdown text generated from the description and comments for each element (currently, you do need to click the ‘Update’ link to generate it – I must fix that):

7 MD text.png

If you enter markdown formatted text as description or comments, then the format will be reflected here (note that the word ‘uniquely’ under ReportIdentifiers is italic)

It can serve as the basis for more comprehensive documentation, or even better make the documentation in the model comprehensive. You can copy the text from the MD text tab.

So that’s about it for creating an Information Model. In the next post we’ll consider creating the resource models.

About David Hay
I'm an independent contractor working with a number of Organizations in the health IT space. I'm an HL7 Fellow, Chair Emeritus of HL7 New Zealand and a co-chair of the FHIR Management Group. I have a keen interest in health IT, especially health interoperability with HL7 and the FHIR standard. I'm the author of a FHIR training and design tool - clinFHIR - which is sponsored by InterSystems Ltd.

One Response to Building an Information model.

  1. Pingback: Creating a resources model | Hay on FHIR

Leave a Reply

%d bloggers like this: