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

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


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


    There are existing SOAP client implementations in a few languages already
    which you could use / extend (java, python, php).
  • yogiyogi Posts: 25
    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:
    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: 404 ✭✭✭
    via Email
    Yes you just put your ODM in there, like the description for data import
    via the UI on this page:


    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: 25
    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: 404 ✭✭✭
    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.
  • Csaba.HalmagyiCsaba.Halmagyi Posts: 54 ✭✭
    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!


  • yogiyogi Posts: 25
    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:

  • GerbenRienkGerbenRienk Posts: 833 ✭✭✭
    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: 25
    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: 279 ✭✭✭
    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.


Sign In or Register to comment.