smart-on-fhir / client-py

Python SMART on FHIR client
http://docs.smarthealthit.org
Other
591 stars 211 forks source link

Parse and Handle Incorrectly Labeled Responses from DSTU 2 API Endpoints #124

Open mc962 opened 2 years ago

mc962 commented 2 years ago

Summary

We're trying to use this library to interact with the vendor's API for retrieving Contracts from the vendor's DSTU2 endpoint. In particular, we are using the Contract.where() method to search for Contracts for a particular Patient.

I'm dealing with what seems to be incorrect responses being returned from the vendor's API for the Contract resource. In particular, the subType key in the response seems to be getting returned as subtype by the vendor's API. This predictably leads to a message like Superfluous entry "subtype" in data for <Contract object>, because presumably this library thinks that there is an extra unnecessary subtype key that should not be there, instead of subType as expected by the library/specification.

Questions