Hello Guillermo,
Basically the answer is no, you can't have data from one project displayed within another. It's a good idea for an external module though!
There is an external module for "Cross Project Piping", which I thought would do what you need, but reading the docs for it it looks like it copies data from a field in a source project to a field with the same name in the destination project. I'm not sure whether the destination value will get changed if you update the value in the source project. I suspect not. Perhaps that might still be useful to you.
Regards,
Luke
Luke Stevens
Data Management Coordinator
Clinical Epidemiology & Biostatistics (CEBU)
Murdoch Children's Research Institute
The Royal Children's Hospital, 50 Flemington Road
Parkville, Victoria 3052 Australia
T +61 3 9345 6552
E luke.s...@mcri.edu.au
W mcri.edu.au
--
You received this message because you are subscribed to the Google Groups "redcap open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
redcap_open...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/redcap_open/f4469c41-10bb-4686...@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.
This e-mail and any attachments to it (the "Communication") are, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Murdoch Children’s Research Institute (MCRI) ABN 21 006 566 972 or any of its related entities. MCRI does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication.
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/1204771908DBB640AD9AF36882AB528101E66480F4%40MITSMXMBX02V.mcri.edu.au.
I think the first question is whether Guillermo actually wants the data from the source project to be copied into the destination project, or whether he prefers it just _displayed_.
If the former, then yes, some process that migrates data across from source to destination would be required – either an external process using API calls or a custom REDCap module would be fine, depending on what is easier for whoever has to create it.
If the latter, then I would use the JavaScript injector module to include a function that does an API call to the source project to read the data for the corresponding record, and just displays the results on the page as required.
FWIW, here's an example of an in-survey function that looks up a survey link from another project (a partially completed survey corresponding to a record matching some code entered).
Luke
(function($, window, document, token) {
var recordLinks = {};
var url = "https://redcap.mcri.edu.au/api/";
var lookupCode = function() {
var code = $('input[name=findcode').val();
if (code==='') {
alert('Enter the code to find.'); return false;
}
var recordRequestData = {
token: token,
content: "record",
format: "json",
fields: "record_id",
filterLogic: "[uniquecode]='"+code+"' and [survey_complete]<>'2'"
};
$.post( url, recordRequestData, function( data ) {
if (data && data.length>0) {
//console.log(data);
var rec = data[0].record_id;
var link = recordLinks[rec];
$('#result').html('<a href="'+link+'" target="_blank">'+link+'</a>');
} else {
$('#result').html("An incomplete survey with the unique code \"<span style='font-family:monospace !important;color:gray;'>"+code+"</span>\" was not found.");
}
});
};
var linksRequestData = {
token: token,
content: "participantList",
format: "json",
instrument: "survey",
event: ""
};
$.post( url, linksRequestData, function( data ) {
if (data && data.length>0) {
data.forEach(function(thisPt) {
if (thisPt.record!=='') {
recordLinks[thisPt.record] = thisPt.survey_link;
}
});
//console.log(recordLinks);
$('#lookupBtn')
.click(function() {
lookupCode()
})
.prop('disabled', false);
$('#result').html("");
}
});
}(window.jQuery, window, document, token));
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/CANCyrojKksaUKMZE%3Dyf4xcr4BwyHGH6%3DjpAMPXAZgd4_OS5Dzg%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to redca...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/f4469c41-10bb-4686-aa5b-73ea6c32b3d2@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This e-mail and any attachments to it (the "Communication") are, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Murdoch Children’s Research Institute (MCRI) ABN 21 006 566 972 or any of its related entities. MCRI does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication.
--
You received this message because you are subscribed to the Google Groups "redcap open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redca...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/1204771908DBB640AD9AF36882AB528101E66480F4%40MITSMXMBX02V.mcri.edu.au.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "redcap open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redca...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "redcap open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redcap_open...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/06a425d7-c1c7-4e3d-84fb-b8a48ce7d1fbn%40googlegroups.com.