HL7 Question: If a v3 datatype has a nullFlavor, what other properties can have a value?
May 16, 2011All the v3 data types include an attribute “nullFlavor. If it has a value, it indicates that the value is either missing, incomplete, or somehow invalid with regard to the rules associated with the use code. A common question is whether, if a data type has a nullFlavor (i.e. there is a nullFlavor attribute) (also commonly referred to as the value “being null”, which can be somewhat confusing), what other properties can have a value?
The answer (except for a couple of cases discussed below) is that the other properties can have any value that is valid in the underlying data types specification. Note that the properties can be non-null, though usually it makes sense for them to be null. (I’ve seen some other statements that disagree with this, but they are wrong. Let me know if you see them anywhere.)
For the CD data type, if the nullFlavor is “OTH” then a codeSystem has to be supplied (or in R2, a codeSystem or a valueSet). There’s also a set of logical rules about nullFlavors on IVL and the relationships between Low, High, and Middle.