Site icon Hay on FHIR

Logical models in FHIR

So one of the capabilities that has been added to FHIR reasonably recently is the capability to use the conformance infrastructure (like StructureDefinitions, ValueSets etc) to produce logical models – rather than defining resource types and such like.

The purpose of the logical model is to gather requirements from clinicians and other folk that can subsequently feed into the design process for profiles and Implementation Guides. While it’s possible to create profiles directly during this process (and one of the goals of clinFHIR is to support this) – there’s no doubting that it does require some understanding of FHIR and the structure/purpose of the existing resource types, so the Logical Model ‘bridges the gap’ by documenting the requirements in a computable fashion without placing any constraints on the model structure.

Because it is computable, it makes the task of generating the formal profiles that much simpler (and recall that a single Logical model may result in multiple profiles – in fact it’s closer to an Implementation Guide) – and also enables the creation of specialized tools like the clinFHIR Logical Modeler that this post describes to create the model in the first place. It also makes it simpler to generate examples, which are both helpful for understanding the domain, but also for testing the model.

So the overall flow from requirement to Implementation Guide would be as follows:

  1. Build the Logical Model. This requires significant interaction with the clinical and business community – multiple meetings and refinement of the model, but should require minimal knowledge of FHIR (though a certain amount is needed – like an understanding of the datatypes). An output of this stage would be the Logical Model and the ValueSets required (or at least their identification)
  2. Generate the Implementation Guide that has all the FHIR artifacts such as Profiles and the ones generated in the first step (e.g. ValueSets). This step will require better understanding of FHIR – but at the ‘business’ level rather than deep technical level so should be well within the capabilities of Business Analysts and motivated clinicians.

With that background, let’s take a look at the new  clinFHIR Logical Modeler.

(Currently it will only work against Grahames STU-3 server (as it uses some of the newest conformance resource change) so if you select that server as the conformance server, you’ll find a link to the modeler in the ‘gear’ menu.)

When the modeler loads, it will read all existing models from the server and present them in the list. Selecting one of them will display the main screen:

(This model is the openEHR Blood Pressure archetype adapted (mostly) to the logical model structure).

There are 3 main panes:

Most of the action is in the editing pane, which has 5 tabs:

Here’s what the MindMap looks like:

And here’s the Table:

As described above, the Details tab has 2 main parts.

At the top are details about the overall model. This has 2 tabs:

 

Below this is the details of the selected element. It also has 2 parts:

Note that the action links will work for the different views in the Editing pane (Designer, Mind Map & Table) – and all views will be updated in real time with edits as they occur.

Here’s the new and edit element screen:

 

The ‘eye’ icon to the right of the dataType dropdown will show the details of that datatype in the spec.

If you make a change to the model, a ‘Save’ button will appear in the Designer tab. Clicking that will save a new version of the model, but you can carry on editing. As you can always revert to a previous version, this means you can do ‘what if’ changes, and then easily revert. If there are errors during saving, then an error tab will appear in the Editing pane. More advanced users can use that to fix errors. It is suggested that you save frequently.

To create a new model, click the ‘New Model’ link in the left pane and the model details screen is displayed:

Enter a name for the model – it needs to be a single word and not too long, then click the ‘Check button’. ClinFHIR will make sure that there isn’t already a model with that name – if there is you’ll get a warning, if not then the Save button will appear and you can enter the remaining information and save.

So there’s probably a few more things to do before this becomes a useful tool.

But it’s a start.

Exit mobile version