-
Notifications
You must be signed in to change notification settings - Fork 3
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
Renal handover #738
Renal handover #738
Conversation
…the display logic
…ne so that it looks better when copied into Word
… any quotation marks that may be in the advice
…priate location that matches the timeline
…to the renal handover view as requested a long with some unit tests
…cid-rfh into renal-handover
aba97ff
to
e6ce5f4
Compare
7e519cd
to
48b19e5
Compare
… the handover list
48b19e5
to
134ee50
Compare
@@ -31,10 +31,14 @@ <h1 > | |||
{% endfor %} | |||
</ul> | |||
</div> | |||
<a ng-show="currentTag === 'renal'" href="/letters/#{% url 'renal_handover' %}" target="_blank" class="btn btn-secondary pull-left left-offset-10"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this has a hard coded href component and a url
tag ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a consequence of the back and forward of the letters plugin, it is a bit weird...
The theory is that we want it rendered within the angular context to give us access to our angular filters e.g. markdown. I'd rather not accidentally have 2 different markdown renderers. Also the copy and paste directive.
I agree though its a bit awks!
@@ -18,6 +18,11 @@ | |||
url(r'stories/$', views.TemplateView.as_view(template_name='stories.html')), | |||
url(r'elcid/v0.1/', include(api.elcid_router.urls)), | |||
url(r'labtest/v0.1/', include(api.lab_test_router.urls)), | |||
url( | |||
r'^elcid/renal_handover', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're prefixing urls with the name of the application now ? ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed this is to namespace the views in terms of the service that's using them.
Definitely true that using elcid as a sometime synonym for infection_service is not idea.
expected, sorted(wards, key=views.ward_sort_key) | ||
) | ||
|
||
def test_grouping(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this actually testing ? Can we have a comment / docstring / method name ?
patient here is... | ||
their name | ||
their hospital number | ||
their unit/ward |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually 'their ward/bed' - stealing the terminology makes the docstring confusing...
elcid/views.py
Outdated
patient__episode=episode | ||
).get() | ||
microbiology_inputs = models.MicrobiologyInput.objects.filter( | ||
episode__patient__episode=episode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this definitely right ?
Does it not then put us back in the same episodic advice situation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we do give me inner join on patient then inner join on the episode table again which is basically expected, but as discussed, let just get the patient and that can save lots of joins.
SELECT "elcid_microbiologyinput"."id", "elcid_microbiologyinput"."created", "elcid_microbiologyinput"."updated", "elcid_microbiologyinput"."created_by_id", "elcid_microbiologyinput"."updated_by_id", "elcid_microbiologyinput"."consistency_token", "elcid_microbiologyinput"."episode_id", "elcid_microbiologyinput"."when", "elcid_microbiologyinput"."initials", "elcid_microbiologyinput"."infection_control", "elcid_microbiologyinput"."clinical_discussion", "elcid_microbiologyinput"."agreed_plan", "elcid_microbiologyinput"."discussed_with", "elcid_microbiologyinput"."clinical_advice_given", "elcid_microbiologyinput"."infection_control_advice_given", "elcid_microbiologyinput"."change_in_antibiotic_prescription", "elcid_microbiologyinput"."referred_to_opat", "elcid_microbiologyinput"."white_cell_count", "elcid_microbiologyinput"."c_reactive_protein", "elcid_microbiologyinput"."maximum_temperature", "elcid_microbiologyinput"."liver_function_fk_id", "elcid_microbiologyinput"."liver_function_ft", "elcid_microbiologyinput"."reason_for_interaction_fk_id", "elcid_microbiologyinput"."reason_for_interaction_ft", "elcid_microbiologyinput"."renal_function_fk_id", "elcid_microbiologyinput"."renal_function_ft" FROM
"elcid_microbiologyinput" INNER JOIN "opal_episode" ON ("elcid_microbiologyinput"."episode_id" = "opal_episode"."id") INNER JOIN "opal_patient" ON ("opal_episode"."patient_id" = "opal_patient"."id") INNER JOIN "opal_episode" T4 ON ("opal_patient"."id" = T4."patient_id") WHERE T4."id" = 12 ORDER BY "elcid_microbiologyinput"."when" DESC; args=(12,)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we actually have episode.patient_id so we can remove the join with no actual cost. updated.
…can just look up clinical advice with the patient id to save on a join. Adds a comment to explain what we are doing with the clinical advice
No description provided.