We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Multi-subject REST queries: duplicate data returned


I am attempting to retrieve ODM clinical data records (in XML format) for all subjects in a given study using a REST request with the following ODM_XML_PATH pattern: /Study_oid/*/*/* (as documented here: https://docs.openclinica.com/3.1/technical-documents/openclinica-restful-urls/restful-url-access-openclinica-metadata-and-print-r).

The full URL pattern is /{host}/{web_app_context}/rest/clinicaldata/xml/view/{Study_oid}/*/*/*

However, it seems that, in the returned result, all the StudyEventData nodes inside any given SubjectData node are copies of the StudyEventData nodes from the first subject in the result. This means that only the first SubjectData node contains the correct ODM clinical data; all others erroneously contain copies of the first subject's data.

This is happening for all REST requests, JSON or XML, where more than one SubjectData is returned.

Is this a known issue?



  • lindsay.stevenslindsay.stevens Posts: 404 ✭✭✭
    via Email
    Yes, have a look at [1]. It might be fixed in version 3.6 [2] but I'm not

    [1] https://




    [2] https://docs.openclinica.com/release-notes/release-notes-openclinica-3.6
  • Csaba.HalmagyiCsaba.Halmagyi Posts: 54 ✭✭
    Hi Richard,

    Yes, it is a known issue. Already reported a few versions ago, hopefully it will be fixed soon.

    My (not too elegant) solution was:
    - fetch all subject oids
    - call the rest services for the subjects one by one


  • GerbenRienkGerbenRienk Posts: 809 ✭✭✭
    In oc3.6 the wildcard for StudySubject works flawlessly! That and the statusparameter for import via webservices were for me two reasons to be cheerful.
  • Richard WelshRichard Welsh Posts: 13
    Thanks everyone for your responses! (Maybe I should have scoured the forum discussions and release notes more thoroughly before posting!)

    Anyway, I look forward to trying it out in 3.6.

    @Csaba, yes, I had considered that workaround but our studies contain several thousand subjects so it would be very inefficient.

  • kkrumliankkrumlian Posts: 25
    Hey guys,

    Yes we did fix this in 3.6. A followup question, how are you using this API? What are you integrating with? Are you using the XML or JSON outputs?

  • Csaba.HalmagyiCsaba.Halmagyi Posts: 54 ✭✭
    Hi Krikor,

    We use both but I prefer the JSON format personally. :) Just upgraded our systems to 3.5, looking forward to install 3.6.


  • Richard WelshRichard Welsh Posts: 13
    @kkrumlian, we are investigating using the API to do two things:
    (a) synchronise some data-collection-status information with our own internal administrative systems, and
    (b) maybe generate some on-the-fly, study-wide or site-wide reports straight from the ODM clinical data by transforming the XML using XSLT.

    I know JSON is more "trendy" than XML these days, but I still prefer XML because I'm a big fan of XSLT and I think it is very powerful transformational language (that is underused in my opinion).
This discussion has been closed.