How to handle null values in resources?


#1

Hi,

in some occasion - for example for lab results - our database does not have all values; can I pass it an empty string or an ‘NA’ or a NULL?


#2

Observation has a dataAbsentReason for that purpose. For most resources, elements are optional so you can just exclude the element you don’t have. If there are elements you don’t have a value for with minOccurs=1, it’s probably best to raise the issue on chat.fhir.org to get element-specific guidance.