Can't set DOB or gender

8 views
Skip to first unread message

Ben Wagner

unread,
Nov 15, 2021, 5:06:45 PM11/15/21
to xnat_discussion
Hi XNAT gurus,
  Any idea as to why I can't set DOB or gender through web UI?  I'm getting the following in the turbine log:

org.nrg.xft.exception.FieldNotFoundException: Field not found: 'xnat:subjectdata/demographics[@xsi:type=xnat:demographicdata]/dob'

org.nrg.xft.exception.FieldNotFoundException: Field not found: 'xnat:subjectdata/demographics[@xsi:type=xnat:demographicdata]/gender'

I'm not seeing anything else in other logs.  Calls from PyXNAT to attempt setting the same fields are also not producing expected results (and not errors).

version 1.8.3, build: 5

Ben

Herrick, Rick

unread,
Nov 15, 2021, 7:21:43 PM11/15/21
to xnat_di...@googlegroups.com

I have no issue setting those fields or any other fields in xnat:demographicsData from the UI or from pyxnat. I’d guess there’s an issue with another data type in one of your plugins that’s disrupting XNAT’s parsing of the data types on start-up and causing it to fail to load xnat:demographicsData properly. Try creating a dev instance of XNAT with 1.8.3 and your plugins and see if anything suspicious appears in the logs on start-up. Then try creating a project and subject and setting a demographics attribute value:

 

# curl --user admin:admin --cookie cookies.txt --cookie-jar cookies.txt --insecure --request PUT 'https://xnatdev.xnat.org/data/projects/Project1?secondary_ID=Project%201&label=Project%201&accessibility=private'

# curl --cookie cookies.txt --cookie-jar cookies.txt --insecure --request PUT 'https://xnatdev.xnat.org/data/projects/Project1/subjects/Project1_01'

XNAT_S00006%

# curl --cookie cookies.txt --cookie-jar cookies.txt --insecure 'https://xnatdev.xnat.org/data/projects/Project1/subjects/Project1_01?format=json'

{"items":[{"children":[],"meta":{"create_event_id":86,"xsi:type":"xnat:subjectData","isHistory":false,"start_date":"Mon Nov 15 18:18:00 CST 2021"},"data_fields":{"project":"Project1","ID":"XNAT_S00006","label":"Project1_01"}}]}%

# curl --cookie cookies.txt --cookie-jar cookies.txt --insecure --request PUT 'https://xnatdev.xnat.org/data/projects/Project1/subjects/Project1_01?xsiType=xnat%3AsubjectData&xnat%3AsubjectData/demographics%5B%40xsi%3Atype%3Dxnat%3AdemographicData%5D/gender=male'

XNAT_S00006%

# curl --cookie cookies.txt --cookie-jar cookies.txt --insecure 'https://xnatdev.xnat.org/data/projects/Project1/subjects/Project1_01?format=json'

{"items":[{"children":[{"field":"demographics","items":[{"children":[],"meta":{"create_event_id":87,"xsi:type":"xnat:demographicData","isHistory":false,"start_date":"Mon Nov 15 18:18:56 CST 2021"},"data_fields":{"xnat_abstractDemographicData_id":4,"gender":"male","xnat_abstractdemographicdata_id":4}}]}],"meta":{"create_event_id":87,"xsi:type":"xnat:subjectData","isHistory":false,"start_date":"Mon Nov 15 18:18:56 CST 2021"},"data_fields":{"project":"Project1","ID":"XNAT_S00006","label":"Project1_01"}}]}%

 

-- 

Rick Herrick

XNAT Architect/Developer

Computational Imaging Laboratory

Washington University School of Medicine

 

 

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Ben Wagner <thewa...@gmail.com>
Date: Monday, November 15, 2021 at 4:06 PM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] Can't set DOB or gender

* External Email - Caution *

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/b81bbe1e-d1b2-43e5-81f0-121860d8d0c8n%40googlegroups.com.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Ben Wagner

unread,
Nov 16, 2021, 10:11:25 AM11/16/21
to xnat_discussion
Hi Rick,
  Plugins have been stable.  Guess I should have given more detail.  I was working on a pyxnat script to upload some variables and what was work stopped.  So I tried setting manually through the UI.  To add another wrinkle, I can set gender/DOB in another project on the same instance.  A bit more testing is if I create the subject in the UI in the problem project, life is good.  It's the subjects created with pyxnat.  I'm suspecting as I didn't do a subject.create() on them something internally didn't get created right.

Ben


Ben Wagner

unread,
Nov 16, 2021, 10:21:24 AM11/16/21
to xnat_discussion
Alright, just confirmed it was user error.  I did a subject.attrs.mset which created the subject, but something in the call must have either been incorrect or a subject.create was required beforehand.  Either way, quickest solution is just to do the subject.create().

Ben
Reply all
Reply to author
Forward
0 new messages