Creating a resource
- David hay
Owned by David hay
From the ‘Core resource definitions’ drop down, select the ‘Condition’ resource type. You’ll get a display that looks like this:
There’s a lot to see!
The builder is essentially divided into two panels – left and right. You can thing of the right pane as a ‘navigator’ as you are building the resource.
- At the top is a ‘breadcrumb’ that tells you where you are in the resource. This becomes useful as you start to create ‘child’ elements within the resource. The globe icon to the left will display the current specification of this resource type in a separate browser tab – useful when you have a question about a particular resource element.
- To the right of the breadcrumb is a red exclamation mark. This indicates that clinFHIR has detected a quality issue with the resource. Clicking on it will display the details – for example a coded element in the resource that doesn’t have a valueSet bound to it to describe the possible values. You can ignore this (though it is interesting) unless you are a member of the HL7 committee that is responsible for the resource – in which case you should fix it! Clicking the icon again will hide the details – it’s a toggle.
- Next is a list of all the elements within the resource. This list is in a fixed space in the browser, so you may need to scroll it to see the complete list. The list is actually a table which has the following columns: (à todo inset !! ß)
- The element name – actually the ‘path’ of the element within the resource from the top of the resource (technically, we call this the root). If the element is required then it will be coloured red – otherwise black. Clicking on the element name will display the definition of the element in the right pane. Under the hood, even the base resources in FHIR are described using a profile (it’s called ‘eating your own dogfood) and this lets you examine the technical minutiae of the definition if you are so inclined.
- The next column is the ‘multiplicity’ of the element – how many are allowed within a single resource instance. There is a minimum and maximum separated by 2 dots (this is standard UML modelling notation if you’re interested), but basically if the first number is 0 it’s optional – if it’s 1 then it’s required. The second number will either be 1 (you can only have one) or * (as many as you like).
- The third column is where it really gets interesting, as these are the permitted datatypes for this element. FHIR permits any element to have more than one datatype, and the ones defined for this element will be listed here. Clicking on the datatype will display a data entry form in the right pane – this is where you can actually enter the information. This described in a separate page.