Please join your peers on either March 26 (8pm GMT) or March 28 (8am GMT) to watch as user extraordinaire and forum legend @"lindsay.stevens" demonstrates OpenClinica Insight.

See preview and register at

Insight makes it easy to ask questions of ALL of your clinical and operational data and visualize answers via interactive reports and dashboards. The idea is simple, but the results are powerful: ask your questions, choose your visualizations, then return often for updated, interactive results that link you to all of the underlying data.

Get an XML file when a patient event is completed

kristiakkristiak Posts: 1,281 ✭✭✭
Is it possible to get an XML file by e-mail each time an EVENT has been completed by a patient and how would you do that. Another possible solution would be if you could use WEB services to read the same thing from the database,
i.e. the visit date when a patient completes an event.


  • GerbenRienkGerbenRienk Posts: 772 ✭✭✭
    Hi Krister,
    I don't have a ready-made solution for you, but I have implemented something similar in python.
    A script scans with a SOAP-call if any new events have been scheduled. Then it uses a rest-call to get the StudySubjectOID. Then this SSOID is used to create a LimeSurvey-token, but that is of no importance for you.
    What is important is that with the same rest-call you can request the status of the Event. However there is quite some workload involved in that, so that would be a script to run overnight. If you are (or anyone else is) interested I can mail it. I hope to upload it to github shortly.
    Kind regards,
    Gerben Rienk
  • kristiakkristiak Posts: 1,281 ✭✭✭
    Hi Gerben.
    Of course you would have a solution. It would be great if you could mail the solution and I will share it with our WEB service "specialist".
    Kind regards

  • GerbenRienkGerbenRienk Posts: 772 ✭✭✭
    edited May 2017
    Hi Krister,
    Please find attached the python 3.6 code for OLI, acronym for OpenClinica-LimeSurvey-Interface.
    The idea is to cycle through a number of activities, all in I tried to put enough comments in there for a programmer to understand what's going on.
    All parameters are in oli.config, such as usernames and passwords, urls, etc.
    I'm afraid that "real python programmers" won't find this pythonesque enough, but it could be a start for others. At least it was for me ;-)
    I will work on another version on GitHub, so others can copy and/or fork more easily.
    And as always: I owe a lot to Lindsay, and to Tomas,
    Furthermore I used a library called ZEEP,
    Kind regards,
    Gerben Rienk 21.8K
  • kristiakkristiak Posts: 1,281 ✭✭✭
    That's great Gerben, thank you ever so much. I'm not sure that our "Phyton" guy is a real Python expert either but I'm sure he will enjoy working on this.

    I will let you know how it goes.

    Best regards

  • lynnhansenlynnhansen Posts: 1
    edited August 2017
    Thanx a lot Gerben. You have helped me too with this problem
Sign In or Register to comment.