Skip to content

Instantly share code, notes, and snippets.

@cknaap
Last active January 31, 2018 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cknaap/2806aa313bdae8fe0f82e89788b07f92 to your computer and use it in GitHub Desktop.
Save cknaap/2806aa313bdae8fe0f82e89788b07f92 to your computer and use it in GitHub Desktop.
Evaluation of :missing modifier and default values in FHIR Elements

Trying to answer FHIR-I tracker items 13224, 13339 and 13348 the working group suggested to outline all possible combinations and work out their meaning.

The general rules we came to during the Mon Q2 session at WGM Jan 2018 were:

  1. An element with a default value is considered to have that value if element is not present
  2. An element without an element.value but with element.extension.count > 0 is NOT missing
  3. An element with a default value is never a match for a search with modifier :missing=true, and IS a match for :missing=false
  4. SUBSETTED and REDACTED tags:
    • SUBSETTED meaning: Elements have been withheld from the response in accordance with the clients request.
    • REDACTED meaning: Elements MAY have been withheld from the response and the client should not make assumptions about defaults (but server may act on the redacted value in the search)
    • Both tags could apply to the same response.
  5. "Meaning when missing" applies when an element is missing: so there's no element.value, no default and no element.extension. The meaning when missing is not computable and can not be expected to be regarded in searches and invariants.

Proposal: 6. If the minimum cardinality > 0, a default value is not relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment