Open tmitanitky opened 1 year ago
The list preserves the order of the properties as they are in the spec IIRC.
Thanks.
FHIR JSON representation saids
Properties can appear in any order.
FHIR XML representations saids
Elements must always appear in the order documented.
They are not consistent. I propose to keep an .elementProperty method that returns an ordered list and to add a method called .elementPropertyDict that returns an unordered dictionary.
I believe the method has advantage for easy access to an specific element of a resource without knowing the order of elements.
Hi,
Is there any reason that
fhirclient.models.fhirabstractbase.FHIRAbstractBase.elementProperties()
returnslist
but notdictionary
? As the order of elements has no special meaning in FHIR, there seems to be no necessity to uselist
and there are some advantages for `using ``dictionary```.If it returns
dictionary
, we can easily access information of an specific element of a resource:(As it could be a breaking change, new function such as
*.elementPropertiesDictionary()
might be preferred.)How do you think about this??
Thanks.