lifeomic / phc-sdk-py

The phc-sdk-py is a developer kit for interfacing with the PHC API on Python 3.8 and above.
https://lifeomic.github.io/phc-sdk-py/index.html
MIT License
1 stars 2 forks source link

When `tag` appears in `meta`, it adds `tag_` as prefix to other `meta` attributes. #159

Open jonathanbranam opened 3 years ago

jonathanbranam commented 3 years ago

This occurs with the frequently used meta.lastUpdated field. If this is changed, it will break any code that currently uses the name meta_tag_lastUpated.*.

E.g.

generic_codeable_to_dict({
    'tag': [
        {
                "system": "http://lifeomic.com/fhir/group",
                "code": "group-code-id",
            },        
    ],
    'other': 'ok',
})
>>> 
{'tag_other': 'ok',
 'tag_system__lifeomic.com/fhir/group__code': 'group-code-id'}

Code references:

https://github.com/lifeomic/phc-sdk-py/blob/4aeee26c457b325152e4570d10524f22ba6c971f/phc/easy/codeable.py#L94-L98

https://github.com/lifeomic/phc-sdk-py/blob/06382005eebbb65ac847c25bdbed708fe02d31a8/tests/test_codeable.py#L54

HL7 FHIR Resources docs. See Meta.lastUpdated and Meta.tag: