Extending Projects/Subjects/Sessions with Custom Metadata

75 views
Skip to first unread message

Ashley Teraishi

unread,
May 5, 2025, 5:38:21 PM5/5/25
to xnat_discussion

I’m working with XNAT v1.9.1.1 (build 158) on Ubuntu 24.04.2 LTS and would like to extend the system by capturing additional metadata on existing entities. Below are examples of the kinds of metadata and their subfields that I’d like to track (this is not an exhaustive list):

  • Projects
    • IRB number
  • Subjects
    • Medication(s) (subfields: name, dose, start date, etc.)
    • Diagnosis (subfields: primary diagnosis, tumor type, tumor grade, etc.)
  • Imaging Sessions
    • RANO results (input options: CR, PR, SD, PD)
    • Study Timepoint (input options: baseline, on treatment, end of treatment, etc.)
Initially, I created custom data types via a plugin, using the XNAT Template Sample plugin as a reference, but these only spawn new “experiment” entities rather than augmenting the built-in Project, Subject, or Session objects.

My questions are:
  1. Is it possible for a plugin to inject these example fields directly into existing Project, Subject, and Session records, without creating separate experiment records, similarly to how custom forms work in the web UI?
  2. If not, would you recommend using XNAT’s custom forms mechanism instead of custom data types/plugins for this use case?
Any best-practice guidance, configuration tips, or example code snippets would be greatly appreciated.

Thank you for your help!

Mohana Ramaratnam

unread,
May 6, 2025, 1:23:58 AM5/6/25
to xnat_di...@googlegroups.com
Hi Ashley,

I would use custom forms over plugin as time to deploy is reduced. 

Regards,
Mohana Ramaratnam,

 moh...@xnatworks.io
 xnatworks.io | Find us on LinkedIn


--
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 visit https://groups.google.com/d/msgid/xnat_discussion/13950cfa-d575-4d6b-a8a5-2f2169361ca6n%40googlegroups.com.

Ashley Teraishi

unread,
May 9, 2025, 9:32:20 AM5/9/25
to xnat_discussion
Hi Mohana,

Thank you for the recommendation to use custom forms, that’s very helpful.

Just to clarify, is it ever possible to achieve the same result using a plugin? Specifically, can a plugin be designed to inject additional metadata fields directly into existing Project, Subject, and Session records, without creating a new experiment type, similar to how custom forms work in the web UI? I’m asking in case there are advanced approaches or less common patterns I might have missed in the documentation.

Thanks again for your time and insight!

Best,
Ashley Teraishi
Message has been deleted

roman....@gmail.com

unread,
Jul 16, 2025, 9:31:25 AM7/16/25
to xnat_discussion
Very interesting question. I am facing the same question here. Is there any document discussing this?
Best, 
Sandro
Reply all
Reply to author
Forward
0 new messages