-
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
dataservice family relationship filtering by participant ID returns relationships that don't include the given participant #463
Comments
You could probably get what you want with this query: |
@dankolbman It does filter though, as evidenced by getting |
Hm I see. It looks like |
Yea I remember this was intentional, but it is a little confusing. We had requests for getting back all the family relationships for a participant and its family members. So this filter returns relationships for the participant and the participant's family members - https://github.com/kids-first/kf-api-dataservice/blob/f4805a7b17f3b8b80c1daa938e897dcd9434610f/dataservice/api/family_relationship/models.py#L87 |
shouldn't that use a family id, then? |
https://kf-api-dataservice.kidsfirstdrc.org/family-relationships?participant_id=PT_43KBFVQ3&limit=1
returns (neither participant matches the requested one)
{
_links: {
self: "/family-relationships"
},
_status: {
code: 200,
message: "success"
},
limit: 1,
results: [
{
_links: {
collection: "/family-relationships",
participant1: "/participants/PT_F76RVQ1J",
participant2: "/participants/PT_9A61PCYB",
self: "/family-relationships/FR_N23TR0NB"
},
created_at: "2018-06-12T14:51:15.589638+00:00",
external_id: null,
kf_id: "FR_N23TR0NB",
modified_at: "2018-06-12T14:51:15.589643+00:00",
participant1_to_participant2_relation: "Mother",
participant2_to_participant1_relation: "Child",
source_text_notes: null,
visible: true
}
],
total: 2
}
The text was updated successfully, but these errors were encountered: