This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

Null Association

From HL7Wiki
Revision as of 09:25, 11 May 2007 by Charliemccay (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Rene:

What would the XML look like in case of a 'null association'? I don't know of a way in which the ITS supports this.

<class>
       <association nullFlavor='NI' xsi:nil='true'/>
       ...
</class>

Grahame:

There is no concept of a null association, but there is the concept of an association to a null object. So the XML would look like this:


<class>
       <association nullFlavor='NI'/>
</class>

So, there is no ...: if the object is null there can be no elements (though attributes such as classCode and moodCode could be appropriate) And xsi:nil would not be appropriate, though this is a matter of interpretation

Where there is a problem is the difference between a list of null associations and a null list of associations.

Charlie:

The interpretation that the XML SIG took when asked about this in the past was that xsi:nil could and should be used for null associations -- and there was pushback that required nillable to be put back into the schemas -- it had been removed for some releases in 2004/5 (from memory - dates need checking). I think that the question may also be addressing whether associative classes can be null -- and that is an MnM question that it would be useful to get clarity on. The point that I am making here is that when nullFlavor is used, xsi:nil can also be used, as indicated by xsi:nillable in the schemas.