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

opal pathway templates do not take episode id and patient id #1537

Open
3 tasks
fredkingham opened this issue Jun 14, 2018 · 2 comments
Open
3 tasks

opal pathway templates do not take episode id and patient id #1537

fredkingham opened this issue Jun 14, 2018 · 2 comments

Comments

@fredkingham
Copy link
Contributor

fredkingham commented Jun 14, 2018

The template view should have the same access to episode and patient id as the api, however at the moment only the api views receive the patient id and episode id.

The template view url
https://github.com/openhealthcare/opal/blob/v0.11.0/opal/core/pathway/urls.py#L15

Whereas their are options to pass patient and episode to the pathway
https://github.com/openhealthcare/opal/blob/v0.11.0/opal/core/pathway/urls.py#L35

  • Change this so that the template logic has access to these variables where they are available

pathway.get_steps. Takes in optional arguments for patient and episode
https://github.com/openhealthcare/opal/blob/v0.11.0/opal/core/pathway/pathways.py#L124

but when we call it, these arguments are not always passed in. https://github.com/openhealthcare/opal/blob/v0.11.0/opal/core/pathway/pathways.py#L64
https://github.com/openhealthcare/opal/blob/v0.11.0/opal/core/pathway/templates/pathway/templates/page_pathway.html#L4
https://github.com/openhealthcare/opal/blob/v0.11.0/opal/core/pathway/templates/pathway/templates/wizard_pathway.html#L13

yet in some cases they are passed in
https://github.com/openhealthcare/opal/blob/v0.11.0/opal/core/pathway/pathways.py#L144

  • Then when we call get_steps we should do this in the view and pass episode_id and patient_id, then pass steps to the wizard/page pathways which should then use the new template context variable.

  • Make sure other calls to get_steps also have the patient_id and episode_id in them.

@davidmiller
Copy link
Member

I'm not sure I understand this at all ?
get_steps is only called in places that have access to a patient/episode object if they exist?
This ticket doesn't explain why that's related to template views?

I don't think you've explained the problem benefit here?
I definitely couldn't pick this up and implement it :(

@fredkingham
Copy link
Contributor Author

edited, let me know if you think this is clearer.

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

No branches or pull requests

2 participants