client-py
client-py copied to clipboard
Updated the create method to work for Bundle transactions
trafficstars
Updated the create method to work for creating Bundle transactions. The below code was added to the fhirabstractresource.py file.
base_url = self.relativeBase()
if(self.resource_type == "Bundle"
and self.type == "transaction"):
base_url = None
After running generate_models.sh all the models were updated. Let me know if you'd like me to make a pull request with only the changes made to the fhirabstractresource.py file.
Indeed, it's probably better to not include the regeneration, just copy fhirabstractresource.py into the models directory.
I think the cleaner approach would be to add a createURL() method which returns either relativeBase() or just the base_url (with your Bundle/transaction logic), then use this createURL() in the create method.