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
feat(#8877): Look up users from their
facility_id
orcontact_id
#8928feat(#8877): Look up users from their
facility_id
orcontact_id
#8928Changes from 22 commits
4b3a3a1
5819151
a007db9
14281f6
c6ac0f3
5684089
a993c0f
fd18a9c
d117a49
e93c001
f78e568
0beaf25
039f0cb
f2cfda3
48030f1
3fba6d8
f08a34c
4b0bf8a
3d5455c
4ddab32
b0ddc30
c319cad
cd0dff7
a9967a1
0e4b82a
5a605d1
7d44261
61cb17b
06f15c8
6ae5c45
4dbe6b1
ab09351
1c0a1cb
8a703cd
16c39e3
42fc2f4
bab9d56
fa55975
302730f
0165b84
08d24bc
4667bec
3ce0587
9703957
6a4cfd9
13475b6
03ab927
5729789
11994ae
b32fcf0
6f720ea
9c6ed2e
febf3cc
0ea6ac1
a8acee8
6902ddd
348afc8
f99cd6d
5325724
a7fbff1
2671032
2c5f740
903a636
d420d48
3b75cca
fe7cf0c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 a little worried by this change. This will mean that all clients (users' phones) will need to index this massive view again due to this change that only gets used on the server side.
I find it hard to see a context where we would need this change on the client. I think it makes more sense to put this new view code in
_design/medic
somehow.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.
Good catch there. I don't see any existing view in
_design/medic
we could piggyback off of so we'd have to make a new view.The way I see it, I could either duplicate the
medic-client/doc_by_type
code to amedic/doc_by_type
view and pop the changes there (and potentially redirect all themedic-client/doc_by_type
queries in API to this view) or make a specific view named likemedic/user_settings_by_facility_and_contact
that would look like this:I'm leaning towards the first option and duplicate the view and re-map API queries from the client view to have a distinct API-only
doc_by_type
view so that we can make changes to it without forcing clients to index it again.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.
IMHO, we probably only want to do the first option if it would mean that we could avoid having to build the
medic-client/doc_by_type
on the server at all. Otherwise, having bothmedic-client/doc_by_type
andmedic/doc_by_type
would mean a non-trivial addition to the disk space being used on the server. Do we support having views on the server that do not get warmed?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 think the best deal would be to:
I can't think of any legitimate reason for not storing the contact_id on the _users doc. We already know we need to keep the _users doc and the user-settings doc in sync to prevent all sorts of weirdness in the app.