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.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/SN6PR02MB5118D996A2FF6E0FFD148F2DBD999%40SN6PR02MB5118.namprd02.prod.outlook.com.