client-py icon indicating copy to clipboard operation
client-py copied to clipboard

Updated the create method to work for Bundle transactions

Open mhalagan opened this issue 7 years ago • 1 comments
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.

mhalagan avatar Jul 23 '18 19:07 mhalagan

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.

p2 avatar Jul 23 '18 19:07 p2