Populating a Custom Field mid-study Answered
An issue came up recently that we had overlooked with our personalized messages. We ask for a participant’s preferred name, but we’re using first name in our personalized messages. I know we can edit the message to use the preferred name custom field, but how would we handle participant’s that may not have a preferred name?
I’m thinking for new enrollees we could fill the preferred name custom field with their first name when we invite them to the study. That will make sure it isn’t empty while still giving them the option to put their preferred name when we ask them (we ask just prior to the consent).
How can we handle this for participants that are already enrolled? I’m not sure how many don’t have a preferred name. If it is a small number, we should be able to just manually add it to their profile, correct? Is there another method if it is a large number of participants?
Comments
3 comments
For new participants, instead of manually adding a new column and populating the preferred name custom field when you send out invitations, I might recommend automating this process by creating an auto-submitting Web View step in the Consent survey with the following properties:
Posting a template below.
For existing participants, I recommend using the Add/Invite Participants CSV entry to update participants' custom fields in bulk.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta charset="utf-8" />
<meta name="theme-color" content="#ffffff" />
<style>
body {
height: 95%;
position: relative;
font-family: Helvetica, Arial, sans-serif;
font-size: 1.2em;
text-align: center;
}
#message {
display: none;
padding-top: 80px;
}
#spinner {
border: 5px solid #f3f3f3;
border-top: 5px solid #366DBC;
border-radius: 50%;
width: 30px;
height: 30px;
animation: spin 1s linear infinite;
margin: 0 auto;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
<div id="spinner"></div>
<div id="log"></div>
<script type="text/javascript">
function getAnswer(stepIdentifier, resultIdentifier) {
if ( !window.taskResult ) return null;
resultIdentifier = resultIdentifier || stepIdentifier;
var stepResult = window.taskResult.StepResults.find(function(stepResult) {
return stepResult.Identifier === stepIdentifier;
});
if ( !stepResult ) return [];
var questionResult = stepResult.QuestionResults.find(function(questionResult) {
return questionResult.Identifier === resultIdentifier;
});
if ( !questionResult ) return [];
var answer = [questionResult.Answer];
if ( questionResult.Choices )
{
answer = questionResult.Choices;
}
if ( questionResult.Result )
{
answer = [questionResult.Result];
}
return answer;
}
function getName() {
if(!window.taskResult) { return null; }
var name = getAnswer("Demographics", "PreferredName");
return(name);
}
setTimeout(function(){submit();}, 200);
function submit(){
var name = getName();
window.webkit.messageHandlers.ResearchKit.postMessage(name);
}
</script>
</body>
</html>
Hello,
We will be implementing a new dashboard for our MGI study in the coming months. We will need to enter the MRN numbers, a nine-digit medical record number, to each and all participants previously enrolled in RKS (about 4,000). I am wondering if rather than doing this individually, would it be possible to give the RKS team a list of all ST#’s (participant identifiers) and the corresponding MRN#’s to add to RKS? Thanks for your advice!
Please sign in to leave a comment.