Get an XML file when a patient event is completed

kristiakkristiak Posts: 1,251 ✭✭✭
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.

Comments

  • GerbenRienkGerbenRienk Posts: 750 ✭✭✭
    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,251 ✭✭✭
    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

    Krister
  • GerbenRienkGerbenRienk Posts: 750 ✭✭✭
    edited May 25
    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 oli_test.py. 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, https://github.com/lindsay-stevens/limesurveyrc2api and to Tomas, https://github.com/toskrip/open-clinica-scripts
    Furthermore I used a library called ZEEP, http://docs.python-zeep.org/en/master/
    Kind regards,
    Gerben Rienk
    oli.zip 21.8K
  • kristiakkristiak Posts: 1,251 ✭✭✭
    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

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