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.

oc web services identify required elements to create subject

I'm trying to create a new subject using oc web services. But, my study configuration doesn't require date of birth and gender. When I tried to manually create a new study subject from openclinica website, it also asked me Study Event and it is a required value. When I tried to use web services, I got the error "Element must not be null" which is not very useful. I followed this example to use web service: https://docs.openclinica.com/3.1/technical-documents/openclinica-web-services-guide/studysubject-web-service, but it doesn't show how to add a study event from openclinica web service. I tried to use a studyeventOID element, but I'm still getting the same error. How can I know what element am I missing or which elements are required to create a new subject?

Merry Christmas and Happy New Year.

Comments

  • toskriptoskrip Posts: 253 ✭✭
    Hi,

    there is a couple of known issues with create study subject web service:
    - Secondary ID field (secondary label) is ignored
    - if your study is configured to autogenerate StudySubjectID you still have to provide label property as empty string
    - gender property always mandatory (regardless of study configuration)

    best

    Tomas
  • toskriptoskrip Posts: 253 ✭✭
    and I forgot to mention, for event scheduling you have to use the event web service...
    see here:


    T
  • agthumoeagthumoe Posts: 14
    my studySubjectID is not auto generated and I provided a custom ID for it. I've also tried adding gender as well, still doesn't work and keep getting error "Element must not be null.".
    If you look at the following pic, you will see I need to provide Study Event just to create a new subject.

  • agthumoeagthumoe Posts: 14

  • agthumoeagthumoe Posts: 14
    image
    is there any problem without providing study event to create a new subject from web services.
  • agthumoeagthumoe Posts: 14
    and all the events are already created, I just need to import new subjects. But as you can see, I need to provide study event. I'm not sure how to provide study event from studySubject web service.
  • toskriptoskrip Posts: 253 ✭✭
    You are mixing two things. First of all study event is only required when you are creating subject directly in OC. If you use a subject creation web service I can guarantee you that it is not necessary.

    The other thing is that it is not about adding an event (all the events defined for study will be automatically available for subject) it is about scheduling event in order to be able to do data entry.

    I think something is wrong with you SOAP XML. If you are providing all required parameters + gender than I guess that header is not correct (where the authentication is done).

    Check out the log file of OpenClinica-ws in Tomcat. It will tell you more details why the execution of web service was not sucessfull. Also try to post the complete SOAP XML which you are sending so I can have a look at it (maybe I will see an error in it directly).

    T


  • agthumoeagthumoe Posts: 14
    BIG THANKS BRO, solved it. You saved my Christmas day ;)
This discussion has been closed.