Import CRF Data via WebService

Hi there,

i take a look through many pages and documentations. I´m new in this section of WebServices and the using of SOAP. I still test the OpenClinica WS function to read Study List or create an Subject or an Event. This was all fine and i get this to work well. But now my question is the following. I want to import CRF Data via SOAP Webservice to OpenClinica. I can´t find any documentaion with example about this step. Is it possible? May i found out that OC added the UpsertOn tag and OpenClinica:Status clause at version 3.6. But there no more information in the technical documentaion of OpenClinica.

Is there a way for me to import Data of an exsisting CRF, my target is to update an table of an CRF via Webservice. Because this table was updated in an external application of the study and i have to update the data in OpenClinica. I hope any body can give me a Idea or anything else at the moment a don´t get a step to my target :s . Thanks in advance!

Best Holger
«1

Comments

  • lindsay.stevenslindsay.stevens Posts: 388 ✭✭
    via Email
    All the SOAP methods are documented on the technical docs site - did you
    see this page?

    https://docs.openclinica.com/3.1/technical-documents/openclinica-web-services-guide/data-web-service

    There are existing SOAP client implementations in a few languages already
    which you could use / extend (java, python, php).
  • yogiyogi Posts: 22
    edited October 2016
    Hi Lindsay,
    thanks for your reply. Yes i see this page but for me there not enough information. I´m sorry but this is such a big field of many many informations i had to understand, i wish there were an example. So in this page the interessting information ends with:
    ##<ODM ....
    ## .....
    ##
    ## </ODM>

    I understand how i connect via SOAP and i can read informations from OpenClinica..

    ok..did this mean i can completly insert an odm xml of an subject in there? Or there are some restrictions? How can i adress a special study - subject - event - crf? It seems like a blanc template. since 3.6 it supports upset commads, where i know wich commands are supported and which not..hmm
  • lindsay.stevenslindsay.stevens Posts: 388 ✭✭
    via Email
    Yes you just put your ODM in there, like the description for data import
    via the UI on this page:

    https://docs.openclinica.com/3.1/openclinica-user-guide/submit-data-module-overview/import-data

    The only trick is that the subject and event must exist already. There are
    separate webservices for that.

    Also note that like the UI data import, it trusts that you are providing
    valid data. For example providing a number for a date field will be
    accepted and inserted (unless this behaviour was changed recently, that is).
  • yogiyogi Posts: 22
    ok, thanks i will try this. Sounds quiet easly. Hope i will get it :D

    One question by the way, at first i will try to import an completly crf. But do you think it is also possible to update only one Section in an CRF or an Table. May be an easy question for an pro :#
  • lindsay.stevenslindsay.stevens Posts: 388 ✭✭
    via Email
    Yes it's possible. Just leave out the ODM pieces you don't want to insert
    data for. They will be created in the database since they're part of the
    CRF, but will have no value and therefore not appear in an extract (this is
    mainly so that the audit trail can log that you imported some data but
    provided nothing for them).

    I'm pretty sure import doesn't affect item visibility, so if you have
    hidden items shown by showaction rules, these rules must be triggered
    manually via data entry view.

    The other factor is that ODM data representation is by
    site/subject/event/crf/itemgroup/item, so it is up to your app to know
    which items appear on which sections.
  • Hi Holger,

    The ODM structure may look scary at the beginning, but it is quite straightforward.
    The subject casebook menu helped me understanding how an ODM xml should look like. Just go to OpenClinica, select a subject with data in the Subject Matrix, click on the magnifying glass (View), click on the subject casebook menu and select ODM XML. That will display the ODM xml for the selected subject.

    Basically the xml has got Study nodes (with the study + site metadata) and ClinicalData nodes. The latter is important for you.
    To import data against an item in OC you have to have an ODM xml something like this:




    Hope this helps!

    Regards,
    Csaba


  • yogiyogi Posts: 22
    Thank you this helps me! :)
    I created an ODM xml and i can sucessfully import this with the internal import functions from Openclinica. If i try this with SOAP i get the messege "Your XML is not well-formed."

    Are there any diffrences?

    Take a look in to my code, can you help me to say whats wrong this were so greate:


    <odm><![CDATA[
    <ODM xmlns="http://www.cdisc.org/ns/odm/v1.3" xmlns:OpenClinica="http://www.openclinica.org/ns/odm_ext_v130/v3.1">
    <ClinicalData StudyOID="S_ZKSJ0101_4805" MetaDataVersionOID="null">
    <UpsertON NotStarted="true" DataEntryStarted="true" DataEntryComplete="true"/>
    <SubjectData SubjectKey="SS_TRDE0100_8348" OpenClinica:StudySubjectID="TR-DE-01-002" OpenClinica:Status="available" OpenClinica:Sex="null" OpenClinica:EnrollmentDate="2016-10-24">
    <StudyEventData StudyEventOID="SE_TARC" OpenClinica:StartDate="2016-10-24" OpenClinica:Status="data entry started" StudyEventRepeatKey="1">
    <FormData FormOID="F_TEST_TARC1_02" OpenClinica:Version="0.2" OpenClinica:Status="initial data entry">
    <ItemGroupData ItemGroupOID="IG_TEST__UNGROUPED_6071" ItemGroupRepeatKey="1" TransactionType="Insert">
    <ItemData ItemOID="I_TEST__TARC_ASS_D" Value="2016-10-24"/>
    <ItemData ItemOID="I_TEST__TARC_ASS_N" Value="0001"/>
    </ItemGroupData>
    </FormData>
    </StudyEventData>
    <StudyEventData StudyEventOID="SE_TARC" OpenClinica:StartDate="2016-10-24" OpenClinica:Status="data entry started" StudyEventRepeatKey="2">
    <FormData FormOID="F_TEST_TARC1_02" OpenClinica:Version="0.2" OpenClinica:Status="initial data entry">
    <ItemGroupData ItemGroupOID="IG_TEST__UNGROUPED_6071" ItemGroupRepeatKey="1" TransactionType="Insert">
    <ItemData ItemOID="I_TEST__TARC_ASS_D" Value="2016-10-24"/>
    <ItemData ItemOID="I_TEST__TARC_ASS_N" Value="0001"/>
    </ItemGroupData>
    </FormData>
    </StudyEventData>
    </SubjectData>
    </ClinicalData>
    </ODM>]]>
    </odm>
  • GerbenRienkGerbenRienk Posts: 705 ✭✭✭
    edited November 2016
    Hi Holger,
    The above example has one ODM-tag-pair too many. And with my imports I always leave out the openclinica extensions, so in your case that would be:



    Hope this helps,
    Gerben Rienk
  • yogiyogi Posts: 22
    Hi Gerben,
    Thanks for reply and your help. Yes your are right, thanks! there are one odm Tag too many. But it still the same Problem. To find out if it where a Problem by my XML Information or if it´s an ordanary Problem of the Problem of the complete script. Can you take a look to this:




    I read your how to on your page to SoapUI an Openclinica. I try to Import These with SoapUI. Connection seems fine. But i still get the error, XML is not well formated. For me it will helpfull if i know that the command was alright and is the Problem may be the items in the XML or ist still the command in the script wrong to push the XML to openclinica.

    Best Holger
  • toskriptoskrip Posts: 240 ✭✭
    Hey Holger,

    lets split your problem and analyse it in more systematic way. Very likely there are only a couple possible sources of errors with data import:
    - your ODM XML is not well formed
    - you have an issue with SOAP services
    - the user does not have permission to import data for certain Study/Site

    in order to find out if your ODM is well formed, you should try to import it first via the web interface of OpenClinica. Can you try this? Once you are sure that ODM is valid (OC accepts it). Than you can try it with SOAP services.

    best

    Tomas
Sign In or Register to comment.