hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2.05k stars 1.33k forks source link

Organization.getActive should return True on value not set #5500

Open sysMATGS opened 1 year ago

sysMATGS commented 1 year ago

Describe the bug From the description on https://hl7.org/fhir/R4/organization-definitions.html#Organization.active , it states that missing value should generally be interpereted as being "true". However, the getter operation for the field returns "false" on value being null. You are still able to use isMissing when making search with the field, but if you are working on the java Objects without having searched them, it's not possible to distinguish active = null from active = false.

Expected behavior If the intended behaviour is that active = null should be interpreted as active = true, then I would expect that it is also reflected in the getter operation.

Screenshots image

Environment (please complete the following information):

MartinBernstorff commented 1 week ago

We encountered this same problem today. Would propose deprecating getActive in favor of a new method, isActive, which returns true on null.