Starting OpenClinica 3.1.4, there will be restful access to OpenClinica’s ODM metadata and print CRFs. The metadata can be obtained in json/xml formats, once the user is logged into the system.The printing of a CRF without any data will also be accessible via restful url.

These rest based urls do not yet support OAUTH yet and the user needs to be logged into OpenClinica.

 

The urls will be of the following format:

/host/{WEB-APP_CONTEXT}/rest/metadata/{format}/{mode}/ODM_XML_PATH.

As of 3.1.4, OpenClinica supports formats:html/xml/json

mode:view/print

The mode should be ‘print’ if the user intends to view a printed CRF,

ODM_XML_PATH: Consists of typically 3 variables. {STUDY_OID}/{STUDY_EVENT_OID}/{FORM_VERSION_OID}

All the 3 variables are study OID,studyevent oid and form oid which are generated by OpenClinica and are unique across the system. They can be substituted by a * in order to mention a generic or include all as explained below.

 

For printing CRFs that do not belong to any study and/or are used in multiple events:

ODM_XML_PATH: */*/FORM_VERSION_OID

For printing crfs/viewing the json or xml of  all of the study(The ODM in json and xml formats brings the whole ODM metadata even though we put a form_version_OID. This filtering at XML level will be worked on in near future.):

ODM_XML_PATH:STUDY_OID/*/FORM_VERSION_OID

 

Examples: To obtain the ODM of the entire study the following would be the restful path:

/host/{WEB_APP}/rest/metadata/xml/view/STUDYOID/*/*

 

To obtain the printed view of a CRF that belongs to a particular event in a study:

 /host/{WEB_APP}/rest/metadata/html/print/STUDYOID/STUDYEVENTOID/FORMVERSIONOID

 ————————

Starting OpenClinica 3.2, there will be restful access to OpenClinica’s ODM clinical Data for populated print CRFs. The Clinical Data can be obtained in json/xml formats, once the user is logged into the system.The printing of a CRF with populated data will also be accessible via restful url.

The urls will be of the following format:

/host/{WEB-APP_CONTEXT}/rest/clinicaldata/{format}/{mode}/ODM_XML_PATH.

formats:html/xml/json

mode:view/print               The mode should be ‘print’ and the format should be ‘html’ if the user intends to view a printed CRF,

For Clinical Data the ODM_XML_PATH: Consists of typically 4 variables. {STUDY_OID}/{Study_Subject_OID}/{STUDY_EVENT_OID}/{FORM_VERSION_OID}   plus parameters for additional options.

All the 4 variables are STUDY_OID , Study_Subject_OID , STUDY_EVENT_OID , FORM_VERSION_OID  are generated by OpenClinica and are unique across the system. They can be substituted by an * in order to mention a generic or include all as explained below.

For printing CRFs for All Subjects per Study :    ODM_XML_PATH: /Study_oid/*/*/*

For printing CRFs for One Subject per Study :    ODM_XML_PATH: /Study_oid/Study_Subject_OID/*/*

For printing CRFs for One Subject and One event:    ODM_XML_PATH: /Study_oid/Study_Subject_OID/Study_Event_OID/*

For printing an Event CRF :    ODM_XML_PATH: /Study_OID/Study_Subject_OID/Study_Event_OID%5B1%5D/Form_Version_OID

%5B1%5E : Represents the Study Event Repeat #in brackets. [1]

%5B is the URL Escape code for Left Square Brackets and %5D is the URL Escape code for Right Square Brackets

 

Additional parameters will be needed to include Audit Logs and Discrepancy Notes and to filter Item or event status.

Add the following parameter ‘?includeAudits=y‘ (case sensitive) to the end of your URL to include all the Audit Log for SubjectData, StudyEventData, FormData and ItemData attributes that exist (not null)

Add the following parameter ‘?includeDNs=y‘ (case sensitive) to the end of your URL to include all the Discrepancy Note for SubjectData, StudyEventData, FormData and ItemData attributes that exist (not null)

The OC extension attributes and ItemData values will be always be incuded in the output whether  parameters are added to the end of the URL or not. The OC extension attributes include for SubjectData, StudyEventData, FormData entities.