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

rest/clinicaldata/xml/view/

Hi

I have been messing around with the XML data links that are given as part of the subject casebook functionality, where the link given is in the form: rest/clinicaldata/xml/view/studyoid/subjectoid/eventoid/*

The eventoid can be replaced with a * to output all events for the given subject which works well.
This led me to believe I could do the same with subjectoid to output all information across subjects for the study specified. This appears to work; all study events and info are included in the metadata section of the file, in addition subjectdata is included for all subjects in the clinicaldata section.
However, each of the subjects' data appears identical in the output, this is not the case on the database. I have included extracts of three separate subject's data below. The study includes 50 subjects, the remaining 47 are identical. The demographic information for all 50 subjects clearly shouldn't be identical (and isn't on the screens and created data sets) so looks to be an issue with the displayed data in this format.

<SubjectData SubjectKey="SS_03_2148" OpenClinica:StudySubjectID="03" OpenClinica:Status="signed" OpenClinica:Sex="null" OpenClinica:EnrollmentDate="2014-12-01">
            <StudyEventData StudyEventOID="SE_DAY0_6477" OpenClinica:StartDate="2014-12-01" OpenClinica:EndDate="2014-12-01" OpenClinica:Status="signed" StudyEventRepeatKey="1">
                <FormData FormOID="F_HVT082DAY0AP_1" OpenClinica:Version="1" OpenClinica:InterviewerName="AlanR" OpenClinica:InterviewDate="2014-12-01" OpenClinica:Status="data entry complete">
                    <ItemGroupData ItemGroupOID="IG_HVT08_VOLDETS_4144" ItemGroupRepeatKey="1" TransactionType="Insert">
                        <ItemData ItemOID="I_HVT08_GENDER_1788" Value="1"/>
                        <ItemData ItemOID="I_HVT08_AGE_3318" Value="43"/>
                        <ItemData ItemOID="I_HVT08_ELIG_4803" Value="1"/>
                        <ItemData ItemOID="I_HVT08_TOA_2418" Value="11:30"/>
                        <ItemData ItemOID="I_HVT08_DOA_9457" Value="2014-12-01"/>
                        <ItemData ItemOID="I_HVT08_VOLNO_5459" Value="24"/>
                    </ItemGroupData>

<SubjectData SubjectKey="SS_06_8091" OpenClinica:StudySubjectID="06" OpenClinica:Status="signed" OpenClinica:Sex="null"
...
                    <ItemGroupData ItemGroupOID="IG_HVT08_VOLDETS_4144" ItemGroupRepeatKey="1" TransactionType="Insert">
                        <ItemData ItemOID="I_HVT08_GENDER_1788" Value="1"/>
                        <ItemData ItemOID="I_HVT08_AGE_3318" Value="43"/>
                        <ItemData ItemOID="I_HVT08_ELIG_4803" Value="1"/>
                        <ItemData ItemOID="I_HVT08_TOA_2418" Value="11:30"/>
                        <ItemData ItemOID="I_HVT08_DOA_9457" Value="2014-12-01"/>
                        <ItemData ItemOID="I_HVT08_VOLNO_5459" Value="24"/>
                    </ItemGroupData>

<SubjectData SubjectKey="SS_07_3265" OpenClinica:StudySubjectID="07" OpenClinica:Status="signed" OpenClinica:Sex="null"
...
                    <ItemGroupData ItemGroupOID="IG_HVT08_VOLDETS_4144" ItemGroupRepeatKey="1" TransactionType="Insert">
                        <ItemData ItemOID="I_HVT08_GENDER_1788" Value="1"/>
                        <ItemData ItemOID="I_HVT08_AGE_3318" Value="43"/>
                        <ItemData ItemOID="I_HVT08_ELIG_4803" Value="1"/>
                        <ItemData ItemOID="I_HVT08_TOA_2418" Value="11:30"/>
                        <ItemData ItemOID="I_HVT08_DOA_9457" Value="2014-12-01"/>
                        <ItemData ItemOID="I_HVT08_VOLNO_5459" Value="24"/>
                    </ItemGroupData>

Does anyone else have this issue?

Comments

  • toskriptoskrip Posts: 272 ✭✭✭
    Hi,

    you have to be careful with */*/* syntax in Restful URLs. Officially it is not supported yet. The query executes but it is not giving the correct results. I can replicated this behaviour on my machines with both XML and JSON result types.

    Personally I started to use Restful URLs in my applications but I use it only to obtain study metadata and/or events and subject details. I do not recommend to use it to access medical information stored in CRFs. Gerben was also reporting some problems regarding to accessing information for Repeating groups via Restful URLs (if I remember it correctly).

    best

    Tomas
  • GerbenRienkGerbenRienk Posts: 814 ✭✭✭
    Tomas is correct, see
    in which Alicia states that a wildcard for StudySubject is not yet implemented.
    Kind regards,
    Gerben Rienk
  • agoodwinagoodwin Posts: 131 admin
    via Email
    Hi all,

    I am not yet aware of any issue with REST for grouped items. Has an issue
    come up?

    Thanks,
    Alicia

    On Wed, Dec 10, 2014 at 11:40 AM, GerbenRienk <[email protected]
  • Gerben - thanks for the reference.

    Alicia - the example I gave was using grouped items
  • toskriptoskrip Posts: 272 ✭✭✭
    Not sure whether it was grouped items or something else. I only recall that Gerben has some problems there before....

    The other issue which is still open and a little bit bothering is this one:

    I need REST services not to be dependent on OC active study (because I usually implement study browsing functionality in a client which is using the services). I don't know exactly what is happening there but I had observed that when I have active study site from multicentre study than the REST services works for all multicentre studies within the system but I cannot call them monocentre studies. I have to go back to OC change active study to one of our monocentre study and than it works...

    Tomas
  • Is there a timescale on when this functionality will be introduced?

    I can make do with the XML dataset export but it would be nice just to just parse the link without having to manually download and extract the export first
  • toskriptoskrip Posts: 272 ✭✭✭
    Just a suggestion what could work if you really need this feature now. Theoretically you can iterate over study subject list and use /subject/*/* for each subject and aggregate the results. Keep in mind that this can result in many URL calls so you will feel the performance difference.

    Tomas
  • True, I did try that but even on a small 50 patient study the performance wasn't acceptable. Each individual subject XML was 3MB, with the bulk of the content being the metadata which is identical between files.
This discussion has been closed.