Subject listing when automatically shared

16 views
Skip to first unread message

official xnat acqi

unread,
Oct 27, 2025, 9:07:44 PM (10 days ago) Oct 27
to xnat_discussion
Hi All. I'm just posting again as this issue wasn't resolved the first time.
We have an issue whereby subjects in center-specific projects are displayed with their "label" field, but when automatically shared into a central project get listed there using their "subject_ID" field. Automated sharing is via the event service. This has caused confusion when study investigators have to review images in the central project. If manually shared however, they get displayed in the central project via their "label" field. Does anyone know how to correct this so they are displayed via "label" when automatically shared? I am a relative XNAT novice .. so be gentle with me!
Many thanks
Martin

Mohana Ramaratnam

unread,
Oct 28, 2025, 5:56:37 AM (10 days ago) Oct 28
to xnat_di...@googlegroups.com
Hello Martin,

Could you provide more details on how the event service has been configured to auto-share?

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/de7b7396-3ddf-43cb-b714-8c4b8c0a3b3bn%40googlegroups.com.

official xnat acqi

unread,
Oct 29, 2025, 2:28:54 AM (9 days ago) Oct 29
to xnat_discussion
Thanks Mohana. Before you responded I managed to identify the command that is executed - see script below. I am currently trying to work out how to access "run_python_autoshare.sh" on our server. 

Martin


{
  "name": "auto-share-session",
  "description": "Share a subject and session into the central project.",
  "version": "auto_share",
  "image": "randomid0987/perth_xnat:auto_share",
  "type": "docker",
  "command-line": "sh run_python_autoshare.sh [SESSION_ID] [PROJECT_ID] [CENTRAL_P_ID]",
  "override-entrypoint": false,
  "mounts": [],
  "environment-variables": {
    "XNAT_READER": "xnat_reader",
    "DOCKER_GATEWAY": "172.17.0.1",
    "XNAT_READERP": "xnat"
  },
  "ports": {},
  "inputs": [
    {
      "name": "PROJECT_ID",
      "description": "Project ID",
      "type": "string",
      "required": true,
      "replacement-key": "[PROJECT_ID]",
      "select-values": []
    },
    {
      "name": "SESSION_ID",
      "description": "SESSION ID",
      "type": "string",
      "required": true,
      "replacement-key": "[SESSION_ID]",
      "select-values": []
    },
    {
      "name": "central-project-id",
      "description": "Central Project ID (used if data shared into central project)",
      "type": "string",
      "default-value": "",
      "required": false,
      "replacement-key": "[CENTRAL_P_ID]",
      "select-values": []
    }
  ],
  "outputs": [],
  "xnat": [
    {
      "name": "auto-share",
      "description": "Share session from satellite project into central project",
      "contexts": [
        "xnat:imageSessionData"
      ],
      "external-inputs": [
        {
          "name": "session",
          "description": "session",
          "type": "Session",
          "required": true,
          "load-children": true
        }
      ],
      "derived-inputs": [
        {
          "name": "session-id",
          "description": "session ID",
          "type": "string",
          "required": true,
          "provides-value-for-command-input": "SESSION_ID",
          "load-children": true,
          "derived-from-wrapper-input": "session",
          "derived-from-xnat-object-property": "id",
          "multiple": false
        },
        {
          "name": "project-id",
          "description": "project ID",
          "type": "string",
          "required": true,
          "provides-value-for-command-input": "PROJECT_ID",
          "load-children": true,
          "derived-from-wrapper-input": "session",
          "derived-from-xnat-object-property": "project-id",
          "multiple": false
        }
      ],
      "output-handlers": []
    }
  ],
  "container-labels": {},
  "generic-resources": {},
  "ulimits": {},
  "secrets": []
}

Mohana Ramaratnam

unread,
Oct 29, 2025, 5:05:07 AM (9 days ago) Oct 29
to xnat_di...@googlegroups.com
Hi Martin,

Its the script in the container which is setting the session id rather than a label. 

So, you would have to:

1. Fix the script and recreate the docker image

2. Fix the existing data in the database



Regards,
Mohana Ramaratnam,

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

official xnat acqi

unread,
Oct 31, 2025, 1:45:47 AM (7 days ago) Oct 31
to xnat_discussion
Many thanks Mohana. Recreating the docker image is outside my expertise .. but I'm getting it attended to. 
Martin

Reply all
Reply to author
Forward
0 new messages