Reportable New Information Action Plan
When the sIRB reviews a reportable new information submission downloaded from the IRB Exchange, they may require an action plan to be completed. In this scenario, the action plan information needs to be uploaded to the IRB Exchange.
What's Involved
- Adding a method to create JSON representing the action plan information for upload to the IRB Exchange.
- Adding a method to upload the action plan JSON to the IRB Exchange.
- Adding a method to parse the JSON representing the action plan information and set it on the reportable new information submission on download from the IRB Exchange.
- Modifying the Assign Responsible Party activity to upload updates to the IRB Exchange.
Create Action Plan JSON
_IRBSubmission.toRniActionPlanJson Method Example
/** Converts the relevant data for an RNI into JSON for upload to the IRB Exchange.
*
* @param mss (_IRBSubmission) The related study
*
* @returns {{JSON}}
*/
function toRniActionPlanJson(mss) {
var jsonObj = {};
// Set scalar data
jsonObj.description = this.getQualifiedAttribute("customAttributes.reportableNewInformation.customAttributes.requiredAction");
jsonObj.studyPoRef = mss + "";
jsonObj.poRef = this + "";
// Set responsible party
var rpObj = {};
rpObj.firstName = this.getQualifiedAttribute("customAttributes.reportableNewInformation.customAttributes.responsibleParty.firstName");
rpObj.lastName = this.getQualifiedAttribute("customAttributes.reportableNewInformation.customAttributes.responsibleParty.lastName");
rpObj.email = this.getQualifiedAttribute("customAttributes.reportableNewInformation.customAttributes.responsibleParty.contactInformation.emailPreferred.emailAddress");
rpObj.poRef = this.getQualifiedAttribute("customAttributes.reportableNewInformation.customAttributes.responsibleParty") + "";
jsonObj.responsibleParty = rpObj;
// Set determination
jsonObj.determinationIds = getSelectionSetIds(this, "customAttributes.reportableNewInformation.customAttributes.rniDetermination", "ID");
return JSON.stringify(jsonObj, null, null);
}
Upload Action Plan to IRB Exchange
_IRBSubmission.uploadRniActionPlanToExchange Method Example
/** Upload or update MSS to IRB Exchange.
*/
function uploadRniActionPlanToExchange() {
var isExchangeEnabled = _IRBSettings.getIRBSettings().getQualifiedAttribute("customAttributes.isIRBExchangeEnabled");
if(isExchangeEnabled == true) {
var accountName = this.getQualifiedAttribute("customAttributes.IRB.customAttributes.iRBExchangeAccountName");
if(accountName != null) {
var exchangeClient = ClickIRBUtils.getExchangeClient(accountName);
// Add or update the study to the Exchange
var mss = this.getQualifiedAttribute("customAttributes.reportableNewInformation.customAttributes.relatedStudies").elements().item(1);
var containerRef = IrbExchangeReference.GetEntityForPoRef(mss + "", exchangeClient + "");
if (containerRef != null) {
exchangeClient.SaveReportableNewInformationActionPlan(this.toRniActionPlanJson(mss));
}
}
}
}
Technical note about this method example:
- Method
IrbExchange.SaveReportableNewInformationActionPlan
is called to upload the action plan information to the IRB Exchange.
Parse the Action Plan JSON
_IRBSubmission.setFromRniActionPlanJson Method Example
/** Takes JSON from the IRB Exchange for an RNI action plan and sets the data onto the appropriate external RNI.
*
* @param mss (_IRBSubmission) The related study
* @param exchangeClient (IrbExchange) Handle to the etype to run operations on against the Exchange
* @param activity (Activity) The activity being executed as part of the update from Exchange
**/
function setFromRniActionPlanJson(mss, exchangeClient, activity) {
// If there's no action plan, then do nothing
var rniActionPlanJsonStr = exchangeClient.GetRniActionPlan(mss, this);
if (rniActionPlanJsonStr == null) {
return;
}
var rniActionPlanJson = JSON.parse(rniActionPlanJsonStr, null);
// Get the responsible party and create the Person for them if needed
var isSubscribedToProfileData = ClickIntegrationUtils.IsStoreSubscribedToPublication("ProfileData");
var rp = getMatchedPersonFromExchangeData(rniActionPlanJson.responsibleParty.email, rniActionPlanJson.responsibleParty.firstName, rniActionPlanJson.responsibleParty.lastName, mss.company, null, isSubscribedToProfileData, this, "customAttributes.reportableNewInformation.customAttributes.responsibleParty");
if(rp != null) {
setAttributeAndChangeCheck(this, rp, "customAttributes.reportableNewInformation.customAttributes.responsibleParty", activity, false);
}
// Set scalar data
setAttributeAndChangeCheck(this, rniActionPlanJson.description, "customAttributes.reportableNewInformation.customAttributes.requiredAction", activity, false);
this.setQualifiedAttribute("customAttributes.reportableNewInformation.customAttributes.actionRequired", true);
// Set the action plan description into the originalRequiredAction attribute for data consistency
if(this.getQualifiedAttribute("customAttributes.reportableNewInformation.customAttributes.originalRequiredAction") == null) {
this.setQualifiedAttribute("customAttributes.reportableNewInformation.customAttributes.originalRequiredAction", rniActionPlanJson.description);
}
// Set determinations
setSelectionSetFromJson("_rniDetermination", this, "customAttributes.reportableNewInformation.customAttributes.rniDetermination", rniActionPlanJson.determinationIds, "ID", activity);
// Update inbox contacts
var inboxContact = this.getQualifiedAttribute("status.customAttributes.inboxContacts");
if (inboxContact !== null) {
this.updateContacts(inboxContact);
}
// Update security
this.updateRNIReadersEditors();
}
Technical note about this method example:
- Method
IrbExchange.GetRniActionPlan
is called to get the action plan from the IRB Exchange.
Assign Responsible Party
The post-processing script should be modified to upload the updated action plan data to the IRB Exchange if the reportable new information submission was downloaded from the IRB Exchange.
Assign Responsible Party Post-Processing Script Snippet Example
// If RNI downloaded from Exchange and there is an action plan, upload that to Exchange
var createdByPsite = targetEntity.getQualifiedAttribute("customAttributes.reportableNewInformation.customAttributes.createdByPSite");
var actionPlan = targetEntity.getQualifiedAttribute("customAttributes.reportableNewInformation.customAttributes.requiredAction");
if(createdByPsite == true && actionPlan != "" && actionPlan != null) {
targetEntity.uploadRniActionPlanToExchange();
}
Technical notes about this script snippet example:
- The updates are uploaded if the reportable new information submission was downloaded from the IRB Exchange and there is an action plan set.
- The
_IRBSubmission.uploadRniActionPlanToExchange
method is called to trigger the update to the IRB Exchange.