Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Adds functionality for
last_consultation_admitted_bed_type_list
in discharge patient filters #2204Adds functionality for
last_consultation_admitted_bed_type_list
in discharge patient filters #2204Changes from all commits
7ae7872
383dba5
105980e
370332d
3ab9e09
00f81f0
e663efc
4da837d
9c6f4e6
a97d281
25aabbb
27d115c
49e7bd6
a18cd40
c517d34
7e12e98
743d7f8
ea9b637
f4221ff
3ca7f47
5514ce9
5bb8b4b
6bbc84b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check failure on line 46 in care/facility/admin.py
GitHub Actions / Lint Code Base
Ruff (RUF012)
Check failure on line 47 in care/facility/admin.py
GitHub Actions / Lint Code Base
Ruff (RUF012)
Check failure on line 56 in care/facility/admin.py
GitHub Actions / Lint Code Base
Ruff (ARG002)
Check failure on line 56 in care/facility/admin.py
GitHub Actions / Lint Code Base
Ruff (ARG002)
Check failure on line 58 in care/facility/admin.py
GitHub Actions / Lint Code Base
Ruff (C417)
Check failure on line 60 in care/facility/admin.py
GitHub Actions / Lint Code Base
Ruff (ARG002)
Check failure on line 69 in care/facility/admin.py
GitHub Actions / Lint Code Base
Ruff (ERA001)
Check failure on line 70 in care/facility/admin.py
GitHub Actions / Lint Code Base
Ruff (ERA001)
Check failure on line 73 in care/facility/admin.py
GitHub Actions / Lint Code Base
Ruff (ERA001)
Check failure on line 74 in care/facility/admin.py
GitHub Actions / Lint Code Base
Ruff (ERA001)
Check warning on line 645 in care/facility/api/viewsets/patient.py
Codecov / codecov/patch
care/facility/api/viewsets/patient.py#L645
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.
@shivankacker This seems like a pretty complex query. Can you add a simple comment about what this filter does?
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.
@anroopak I have added some documentation for the filter, please have a look
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.
You dont need to explicitly specify it as a subquery, it should automatically understand that its a subquery.
ids = Something.objects.values_list('id', flat=True)
SomethingElse.objects.filter(something_id__in=ids)
Will only have one query.
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.
But will it not be required to use OuterRef?