FHIR Chat · Empty references · implementers

Stream: implementers

Topic: Empty references


view this post on Zulip Josh Mandel (Jun 13 2016 at 18:58):

http://hl7-fhir.github.io/references.html seems to suggest it's valid to have a Reference with neither .display nor .reference present. Should we specify a constraint to prevent this, or is there a use case (like, extensions-only references)?

view this post on Zulip Abbie Watson (Jun 13 2016 at 19:04):

It would be great to have some clarity on empty strings and null values in Reference objects as well. We've been running into some confusion with this in our schema definitions (we use the SimpleSchema from Meteor) when we initialize an object. Say we want to generate a QuestionnaireResponse, that hasn't been filled out yet and are implementing form-building workflow. We may know the author of a response is {display: "Jane Tech, reference: "12345"} but the subject hasn't been selected yet. So, does the subject reference stay empty? Do we put empty strings in as placeholders? Null values as placeholders? etc.

Or a more specific use case might be an admin looking at a tech's partially completed resource.

view this post on Zulip Josh Mandel (Jun 13 2016 at 19:13):

In those cases it's also worth saying that the reference itself could be omitted (vs. present and empty).

view this post on Zulip Lloyd McKenzie (Jun 13 2016 at 21:13):

I have a situation where I use an extension to specify a business identifier. While "display" could be present, my client sees that element as noise and would rather not include it.

view this post on Zulip Grahame Grieve (Jun 13 2016 at 23:36):

firstly: in json, objects must always have properties, and string properties can never be just an empty string

view this post on Zulip Grahame Grieve (Jun 13 2016 at 23:37):

this is documented in the json page.

view this post on Zulip Grahame Grieve (Jun 13 2016 at 23:37):

there's a similar rule for XML

view this post on Zulip Grahame Grieve (Jun 13 2016 at 23:37):

both display and reference are optional, but the element cannot be empty

view this post on Zulip Erich Schulz (Jun 14 2016 at 00:55):

and that missing quote wont help much

view this post on Zulip Michelle (Moseman) Miller (Jun 14 2016 at 12:46):

FWIW, we have a use case that may result in the display populated, but not the reference. This can happen when we track things more generically than the FHIR resource types (e.g. a subset of appointment participants where resource type isn't known).

view this post on Zulip Brian Postlethwaite (Jun 14 2016 at 13:02):

Don't you mean the location of the FHIR resource isn't known (or not required)

view this post on Zulip Michelle (Moseman) Miller (Jun 14 2016 at 17:02):

For some appointment participants, we don't know whether the resource is a location (e.g. room) or practitioner role (e.g. any nurse on duty). For other participants (e.g. named practitioners, patient, device), we will know the appropriate FHIR resource to use.

view this post on Zulip Abbie Watson (Jun 14 2016 at 21:25):

Objects must alway having properties and no empty strings is consistent with how SimpleSchema works. And given the problems we've had with Reference object fields being required, I'm leaning towards setting them as optional in our schema definitions.

view this post on Zulip Abbie Watson (Jun 14 2016 at 21:30):

So, put another way: reference fields should/could be optional, but cannot be empty.


Last updated: Apr 12 2022 at 19:14 UTC