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 https://openclinica.com/insight-webinar

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.

How to handle events overlapping for a particular questionnaire and a single patient?

2»

Comments

  • lulzimfazlijalulzimfazlija Posts: 14
    @GerbenRienk I could not get any response from the endpoint you have shown, are these web services SOAP WSDL?

    I am trying this directly on the web browser: https://www.mydomain:8443/OpenClinica/rest/clinicaldata/xml/view/S_PROSPER1/SS_KS1014/*/* nothing showing up.

    Normally other web services are something like this:
    https://www.mydomain:8443/OpenClinica-ws/ws/data/v1/dataWsdl.wsdl

    Thanks,
  • GerbenRienkGerbenRienk Posts: 772 ✭✭✭
    This is a REST-webservice and you must first login.
  • lulzimfazlijalulzimfazlija Posts: 14
    Are there such endpoint for SOAP Web Service, as I have already chosed to work with SOAP Web Service, due I had trouble authentication accessing Rest API.

    Thanks
  • lulzimfazlijalulzimfazlija Posts: 14
    also I am getting this error after login:
    Oops! An error has occurred

    This can be for a number of reasons, which may or may not have to do with the OpenClinica application. If there are any system messages above this text, please copy and paste them into the Report Issue Form.
  • GerbenRienkGerbenRienk Posts: 772 ✭✭✭
    Hi,
    Can you try the following:
    - take any subject in your study and click on the magnifier icon in the right column of the subjectmatrix
    - you are now in the ViewStudySubject form
    - click on Subject Case Book
    - select CDISC ODM XML or JSON
    - click button Open
    Kind regards,
    Gerben Rienk
  • lulzimfazlijalulzimfazlija Posts: 14
    edited June 2017
    thnx @GerbenRienk for you answers. I think I should also see how Rest Api Auth how
    it works... as I had difficulties to manage working that, I think I should somehow add username and the password encoded into headers when calling this endpoint.

    thnx
  • GerbenRienkGerbenRienk Posts: 772 ✭✭✭
    edited June 2017
    In what language will you use the rest-call?
    In VB it would be something like
    Set objREST = CreateObject("MSXML2.XMLHTTP.6.0")
    strURL = "https://www.mydomain:8443/OpenClinica/j_spring_security_check?j_username=" & UName & "&j_password=" & PWord
    objREST.Open "POST", strURL, False
    objREST.send

    strURL = "https://www.mydomain:8443/OpenClinica/"
    strURL = strURL & "rest/clinicaldata/xml/view/" & StudyOID & "/" & StudySubjectID & "/*/*"

    'calling REST'
    objREST.Open "GET", strURL, False

    'send request to the REST url'
    objREST.send

    'the responsetext must be transformed'
    strClinicalDataXML = objREST.responseText
    etc.
    Or in python something like:
    import requests
    import xml.etree.ElementTree as ET

    # config is a dict with credentials and urls, etc.
    login_url = config['baseUrlRest'] + '/j_spring_security_check'
    login_action = {'action':'submit'}
    login_payload = {
    'j_username': config['userName'],
    'j_password': config['password'],
    'submit':"Login"
    }
    mySession = requests.Session()
    mySession.post(login_url,params=login_action,data=login_payload)
    cd_url = config['baseUrlRest'] + '/rest/clinicaldata/xml/view/' + config['studyOid'] + '/'
    cd_url = cd_url + self._studysubjectid + '/*/*'
    print(cd_url)
    clinical_data = mySession.get(cd_url)
    etc.
    Hope this helps,
    Kind regards,
    Gerben Rienk
  • lulzimfazlijalulzimfazlija Posts: 14
    In javascript, but thnx this is already helpful!
Sign In or Register to comment.