sIRB RNI Information
When the sIRB moves an RNI they downloaded from IRB Exchange around in the workflow, they need to upload information about the sIRB RNI to the IRB Exchange.
What's Involved
- Add a method to create JSON representing a sIRB RNI's data for upload to the IRB Exchange.
- Add a method to upload sIRB RNI information to the IRB Exchange.
- Modifying the method called by the global state transition post-processing script to upload updates.
Create sIRB RNI Information JSON
_IRBSubmission.toExternalRniJson Method Example
/** Converts the relevant data for an external RNI into JSON for upload to the IRB Exchange.
@param mss (_IRBSubmission) The related study
@returns {{JSON}}
**/
function toExternalRniJson(mss)
{
var jsonObj = {};
// Set scalar data
jsonObj.status = this.getQualifiedAttribute("status.ID");
jsonObj.studyPoRef = mss + "";
jsonObj.poRef = this + "";
return JSON.stringify(jsonObj, null, null);
}
Upload sIRB RNI Information to IRB Exchange
_IRBSubmission.uploadExternalRniToExchange Method Example
/** sends the externally reviewed rni info to IRB Exchange for the pSite to download
**/
function uploadExternalRniToExchange()
{
var isExchangeEnabled = _IRBSettings.getIRBSettings().getQualifiedAttribute("customAttributes.isIRBExchangeEnabled");
var createdByPSite = this.getQualifiedAttribute("customAttributes.reportableNewInformation.customAttributes.createdByPSite");
if(isExchangeEnabled == true && createdByPSite == true){
var accountName = this.getQualifiedAttribute("customAttributes.IRB.customAttributes.iRBExchangeAccountName");
if(accountName != null){
var exchangeClient = ClickIRBUtils.getExchangeClient(accountName);
var mss = this.getQualifiedAttribute("customAttributes.reportableNewInformation.customAttributes.relatedStudies").elements.item(1);
var containerRef = IrbExchangeReference.GetEntityForPoRef(mss + "", exchangeClient + "");
if(containerRef != null){
exchangeClient.SaveSirbRni(this.toExternalRniJson(mss));
}
}
}
}
Technical notes about this method example:
- sIRB RNI information is uploaded to the IRB Exchange if the RNI was downloaded from the IRB Exchange. This is done via the method call
IrbExchange.SaveSirbRni
.
Place Trigger to Upload sIRB RNI Information to IRB Exchange
_IRBSubmission.onGlobalStateTransition Method Snippet Example
// External RNI always uplaod to exchange on state transition
this.uploadExternalRniToExchange();