Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the create method to work for Bundle transactions #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mhalagan
Copy link

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.

@p2
Copy link
Member

p2 commented Jul 23, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants