FHIR Chat · Cardinality and empty value attribute · implementers

Stream: implementers

Topic: Cardinality and empty value attribute


view this post on Zulip David Moorhouse (Jul 17 2019 at 03:32):

Should an xml node in a resource pass validation - where the Profile specifies a minimum cardinality of 1, and the node has a value attribute that is empty ?

E.g. a snippet from a resource - apart from the min cardinality, no other constraint exists on this node
<?xml version="1.0" encoding="UTF-8"?>
<MedicationDispense xmlns="http://hl7.org/fhir">
<status value=""/>
<!-- other parts of the resource -->
</MedicationDispense>

view this post on Zulip Richard Townley-O'Neill (Jul 17 2019 at 03:51):

No.

view this post on Zulip Richard Townley-O'Neill (Jul 17 2019 at 03:52):

MedicationDispense.status has a required binding and "" is not one of the permitted values.
Also codes (and strings) have a minimum length of 1. See http://build.fhir.org/datatypes.html#code

view this post on Zulip Richard Townley-O'Neill (Jul 17 2019 at 03:55):

I think that all attributes have a minimum length of 1.

view this post on Zulip David Moorhouse (Jul 17 2019 at 04:23):

Thx for the reply.. I think I've also found the answer by digging further through the FHIR website ...
"Attributes cannot be empty. Either they are absent, or they are present with at least one character of non-whitespace content"
from https://www.hl7.org/fhir/xml.html

Cheers


Last updated: Apr 12 2022 at 19:14 UTC