Entering Data

In the previous page we had a look at the page where we can create a new resource instance from a resource definition. We got to the point where we were about to enter data, so let’s pick up the story from there.

To actually enter the data for a specific resource element, you click on the datatype in the navigator. In most cases you’ll get a data entry form that displays the options for that datatype on the right pane which is pretty self explanatory in most cases, but there are a couple that are worth a more detailed discussion.

 

Resource Reference

If the datatype is a resource reference, then you’ll see an arrow (-->) followed by the resource type – all in green. Some resource types (like Observation or CarePlan) are linked to a patient, and some (like Organization or Practitioner) are not.

  • If the resource type is linked to a patient, then selecting it will display a  dropdown of all the existing resources of that type for the current patient, allowing you to select the one you want.
  • If it is not, then you will get a link that allows you to search for a specific resource of that type (it makes more sense when you try it!)

 

Selecting a Resource already created for a patient


Searching for a resource not associated with a patient

Coded datatypes

If the datatype is one that is coded (code, coding or codeableConcept), then you’ll see a text box into which you can enter a search string. After a brief delay, clinFHIR will query the terminology server and return all of the matching concepts from the valueSet that is bound to that element.

you do need to be a bit patient here, as it can take a couple of seconds for the terminology server to process the request and return the filtered subset of concepts.

In some cases – when the app knows that the valueSet is small, then all the options are displayed as radio buttons. This most often occurs with code data types.

 

Selecting a coded value from a large valueset

Selecting from a small valueset

We’ll talk more about binding valueSets when we discuss profiling, but basically the valueSet that is ‘bound’ to the element contains the list of permissible options for that element. With a profile, we can change the contents of the ValueSet, and hence the options available. If the item you want is not in the valueSet, then you can enter the item as text (though it will no longer be computable of course).

Coded elements have another neat feature: there is a hyperlink called ‘Explore ValueSet’ along side where the search text is entered. Clicking that link allows you to view the ValueSet – and make queries against it to see what it contains.

 

Adding the data to the resource

With the exception of resource references, after you enter the data in the template you need to click the ‘Save’ button to actually to add it to the resource. When you do this, the element will be updated, and the resource that you are building will be displayed in the right pane (in JSON format). This is a great way to see what the FHIR resource actually looks like. The element in the navigator will also have a tick against it – useful as you can see at a glance what you’ve entered so far.