Populating a Custom Field mid-study Answered

Thejas Suvarna

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?

0

Comments

3 comments

  • Comment author
    Thejas Suvarna
    • Official comment

    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 WebView 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>
  • Comment author
    Thejas Suvarna
    • Edited

    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!

    0
  • Comment author
    Thejas Suvarna
    This is actually something you can do on your own with our Update Existing Participants functionality!
     
    First, you will need to create a custom field for the project and name it MRN. Once that is created, you can go into the Add/Invite Participants tab in your Project. There you can upload csv files, yours will just have two columns: ParticipantIdentifier and MRN.  Make sure you click the "Update Existing Participants" checkbox in the Preview and Send Invites pop-up before submitting (you can also uncheck the enable enrolling and send invitation checkboxes). 
     
    I believe the max you can upload at once is 1500 participants though, so you will likely have to do this in 3 separate csv files. 
     
    Please take a look at those user guide articles and let me know if you have any questions! Trying it out on a test project or on only a couple of participants at first is also helpful!
    0

Please sign in to leave a comment.