beda-software / fhir-py

FHIR Client for python
MIT License
168 stars 31 forks source link

Added documentation for get with parameter id #64

Closed BSVogler closed 3 years ago

BSVogler commented 3 years ago

I spent a lot of time to find the proper way how to access a resource by id without using the searchset. The documentation change makes this more clear.

BSVogler commented 3 years ago

The last time travis build was broken because some license was missing.

mkizesov commented 3 years ago

Thank you for the PR, @BSVogler !

id parameter in get() method was deprecated a while ago https://github.com/beda-software/fhir-py/blob/master/fhirpy/base/lib.py#L163 The best way to get a particular resource without using searchset is to use reference:

patient = await client.reference('Patient', 'patient_id').to_resource()

However, I understand that this is not obvious for the users and maybe we should un-deprecate get() with id parameter to leave a possibility to make this kind of request /Patient/123 instead of /Patient?id=123

@ruscoder what do you think?

mkizesov commented 3 years ago

Added info about getting resource by id to docs. Thanks!