We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Showing Items in baseline form header from Screening Events

Dear Developers.

Greetings to all of you !!

I have two CRFs screening and baseline.

In Screening, i collect some information including Patient ID, Patient Initials, Date of randomization and Randomization Arm.

These four information i want to show in baseline form header.

To do that i took help from trialdatasolutions.com and read the java script. See link


But that does not work in my OpenClnica 3.1.4 Community Edition. According to instructions, i changed all OIDs in java script wherever required.

This is the java script i have written in my baseline CRF but that does not work.

(As recorded in Event Screening.)

jQuery(document).ready(function($) {
// define the field to write the value in
var fieldPID = $("#PIDFromScreening").parent().parent().find("input");
fieldPID.attr("readonly", true);
// let the urlStart end with the OID of your Study
var urlStart = "rest/clinicaldata/xml/view/S_P_SAFEPV/";
// use for urlTail the StudyEventOID
var urlTail = "/SE_SCREENING_382/*";
// put here the OID of the Item you want to display
var itemOID = "I_SCREE_PID";
// now we can compose the url for the REST-request
var urlComplete = urlStart + "${studySubjectOID}" + urlTail;
// make the request
type: "GET",
url: urlComplete,
dataType: "xml",
success: parseXML
// analyse the response
function parseXML(xml){
// loop through the nodes called ItemData ...
// ... and look for the one with the OID that was set above ...
if($(this).attr("itemOID") == itemOID){
// and store the value
OtherValue = $(this).attr("Value");
// write the value, if it is not there already
if (fieldPID.val() != OtherValue){


Is there anything needs to be changed in context to OpenClinica 3.1.4 Community Edition.

Please suggest
Thanks and Regards


  • GerbenRienkGerbenRienk Posts: 838 ✭✭✭
    Hi Manoj,
    Could you try to manually enter the url in your browser, to check if you didn't make any mistakes? Just take a StudySubject that you know the OID of, like
    If you get an error, try an asterisk instead of SE_SCREENING_382
    Kind regards,
    Gerben Rienk
  • Manoj SoniManoj Soni Posts: 163
    Dear Sir

    Many many Thanks for the help

    I am sure i did not make mistake in writing the revised java script based on your java script provided in trialdatasolutions.com

    I have OpenClinica 3.1.4 Community Edition running.

    When i type*

    I get error Page not found

    When i type*/*

    I get the same error page not found.

    Please login to my server and help with the issue.

    Login name: tester
    Password: [email protected]

    I am trying to get the Pid entered in Screening Event in to Baseline Event's pid_s item.

    CRF name: Baseline_safepvt , Version 7 is final CRF plugged to Baseline Event.

    You may see study oid, study event oid now.

    Please help.
  • GerbenRienkGerbenRienk Posts: 838 ✭✭✭
    Hi Manoj,
    I'm afraid that the construction with the rest service is not available in your version of openclinica 3.1.4.
    Are you in a position to upgrade?
    Kind regards,
    Gerben Rienk
  • Manoj SoniManoj Soni Posts: 163
    via Email
    Which version should I upgrade

    What are the steps

    I have been running live study in it and don't want to disturb it

    Is it easy to upgrade

  • Manoj SoniManoj Soni Posts: 163
    However if you can help me out in getting out using openclincia 3.1.4,

    I will be grateful to you.

    Thanks and Regards
  • GerbenRienkGerbenRienk Posts: 838 ✭✭✭
    Hi Manoj.
    Yes it is possible to upgrade, but in your case I would consider creating a new OpenClinica instance and start using that for new studies.
    Maybe you are curently working with tomcat6, but you can use tomcat6 and tomcat7 on the same server, see http://www.trialdatasolutions.com/tds/howto/tomcat6and7.jsp
    Kind regards,
    Gerben Rienk
Sign In or Register to comment.