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
http://www.trialdatasolutions.com/tds/howto/itemsfromotherevents.jsp 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.)
$.noConflict();
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
$.ajax({
type: "GET",
url: urlComplete,
dataType: "xml",
success: parseXML
});
// analyse the response
function parseXML(xml){
// loop through the nodes called ItemData ...
$(xml).find("ItemData").each(function(){
// ... 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){
fieldPID.val(OtherValue);
fieldPID.change();
};
}
})
***
Is there anything needs to be changed in context to OpenClinica 3.1.4 Community Edition.
Please suggest
Thanks and Regards
Manoj
Comments
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
myserver:8080/OpenClinica/rest/clinicaldata/xml/view/S_P_SAFEPV/SS_MYSSOID/SE_SCREENING_382/*
If you get an error, try an asterisk instead of SE_SCREENING_382
Kind regards,
Gerben Rienk
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
http://125.22.91.147:8080/OpenClinica/rest/clinicaldata/xml/view/S_P_SAFEPV/SS_101/SE_SCREENING_382/*
I get error Page not found
When i type
http://125.22.91.147:8080/OpenClinica/rest/clinicaldata/xml/view/S_P_SAFEPV/SS_101/*/*
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.
Regards
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
What are the steps
I have been running live study in it and don't want to disturb it
Is it easy to upgrade
Thanks
Regards
Manoj
I will be grateful to you.
Thanks and Regards
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