<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Britt DeVries on Medium]]></title>
        <description><![CDATA[Stories by Britt DeVries on Medium]]></description>
        <link>https://medium.com/@brittdev31?source=rss-c4685ef46045------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*PqjkS1gMtnQ1WEJw</url>
            <title>Stories by Britt DeVries on Medium</title>
            <link>https://medium.com/@brittdev31?source=rss-c4685ef46045------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 01:10:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@brittdev31/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Creating REDCap Data Dictionaries Using ChatGPT 4.0]]></title>
            <link>https://medium.com/@brittdev31/creating-redcap-data-dictionaries-using-chatgpt-4-0-1a67c5a934f4?source=rss-c4685ef46045------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a67c5a934f4</guid>
            <category><![CDATA[surveys]]></category>
            <category><![CDATA[redcap]]></category>
            <category><![CDATA[data-dictionary]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Britt DeVries]]></dc:creator>
            <pubDate>Sat, 23 Nov 2024 17:26:18 GMT</pubDate>
            <atom:updated>2024-11-23T17:26:18.753Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://chatgpt.com/share/6737ab9e-11c4-8006-9c75-4154599c1757">ChatGPT 4.0 Prompt &amp; Output</a> | <a href="https://github.com/brittdev31/redcap_gpt_medium">GitHub Repository</a></p><p>Research Electronic Data Capture (REDCap) is a powerful tool for data collection, management, and security in research and beyond. However, unlike JotForm or Google Forms, REDCap has a steeper learning curve and is mostly inaccessible to those outside of academia or the nonprofit sector without a paid license. This online platform meets the Health Insurance Portability and Accountability Act (HIPAA) standards for protecting the privacy and security of health information, making it a popular option for Clinical Trial Research and the storage of sensitive patient data. Those who have built REDCap projects for their own research team or company (or perhaps worse, for someone else’s), know that it is a tedious, time-consuming task. With the ability to upload documents to LLMs such as ChatGPT (OpenAI, 2023), REDCap administrators now have the ability to construct survey instruments–and entire projects–within minutes.</p><p>With a few simple prompts, ChatGPT can transform a blank, <a href="https://github.com/brittdev31/redcap_gpt_medium/blob/main/data_dictionary.csv">template data dictionary</a>, to a fully functional <a href="https://github.com/brittdev31/redcap_gpt_medium/blob/main/PHQ9_REDCapProjectTesting.pdf">REDCap instrument</a>. You can view the saved, unaltered conversation with ChatGPT <a href="https://chatgpt.com/share/6737ab9e-11c4-8006-9c75-4154599c1757">here</a> and the input/output files <a href="https://github.com/brittdev31/redcap_gpt_medium">here</a> — let’s take a closer look!</p><h3><strong>Patient Health Questionnaire (PHQ-9)</strong></h3><p>For demonstration purposes, I’ve selected the 9-item Patient Health Questionnaire (PHQ-9) — a self-report instrument widely used in healthcare and clinical research settings. No permission is required to reproduce, translate, display or distribute the measure. <a href="https://www.apa.org/depression-guideline/patient-health-questionnaire.pdf">An example</a> provided on the American Psychological Association (APA) website is shown below. It may be obvious but, the PHQ-9 is used to assess depression severity — with higher total scores indicating more pronounced depressive symptomatology.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*RB20lz9f1SitWTBAjKBtMg.png" /><figcaption>Kroenke K, Spitzer RL, Williams JB. (2001). The PHQ-9: validity of a brief depression severity measure. J Gen Intern Med. doi: 10.1046/j.1525–1497.2001.016009606.x.</figcaption></figure><h3><strong>REDCap Data Dictionary</strong></h3><p>REDCap data dictionaries are .CSV files that include a header with standardized variable names that REDCap can recognize but are otherwise empty. Administrators can fill in a blank data dictionary template and upload it to a REDCap project to create/modify data collection instruments. Every REDCap project has its own data dictionary which defines the parameters of the data collection instrument(s) hosted within. This is not the only way to make/edit instruments in REDCap and most would agree that utilizing the data dictionary is less user- and beginner-friendly than the survey builder options on REDCap’s native graphical user interface (GUI). REDCap’s point-and-click, drag-and-drop functionality for survey building is fairly straight forward for basic instruments.</p><h3>ChatGPT Prompting</h3><p>When working with ChatGPT, there is a lot of conversation around prompt engineering. This to me is as simple as asking for what you want clearly and effectively — not so different from daily conversation. I’ve pasted my initial prompt below. There is certainly other language that would get the job done, and I recognize that many have put forward formulaic prompt templates for use cases such as this one.</p><blockquote>“i’m going to provide you with two different documents. the first is a template .csv that i would like completed in order to upload survey instruments to the REDCap platform. this is equivalent to a data dictionary with question (‘Field Label’), question type (‘Field Type’), instrument name/title (‘Form Name’), etc. the second is a survey in PDF. can you take the relevant information from the survey document and fill in the .csv data dictionary for upload to REDCap?”</blockquote><p>ChatGPT first identifies and lists the variable names included in the otherwise blank Data Dictionary — again, these are universal across REDCap projects. It then proceeds to “<em>extract information from the Patient Health Questionnaire (PHQ-9) and complete the template with this structure.</em>” Notice how it was able to identify the instrument name without being given that information. The output is shown below (also available <a href="https://github.com/brittdev31/redcap_gpt_medium/blob/main/phq9_redcap_data_dictionary.csv">here</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l7QLWmCOjgxa9IpTCL8zZA.png" /><figcaption>phq9_redcap_data_dictionary.csv</figcaption></figure><p>This is already excellent. It left out the section at the very bottom where we calculate the PHQ-9 Total Score, but this seems reasonable given that it is a format catered to scoring on paper. We can easily prompt to have this calculation completed and added to the Data Dictionary — see output <a href="https://github.com/brittdev31/redcap_gpt_medium/blob/main/PHQ9_REDCap_DataDictionary_Updated.csv">here</a>.</p><blockquote>“perfect. can you add an additional field called a ‘Calculated Field’ that calculates the sum of items 1–9 for the PHQ-9 Total Score?”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nLyjvMS4PDlR6N3FjciUvg.png" /><figcaption>PHQ9_REDCap_DataDictionary_Updated.csv</figcaption></figure><p>Impressive. Next, we want to add a field for Record Number (i.e. Participant ID) so we know who the data belongs to. This is the first default field in every REDCap project. Again, this can be prompted with a simple request — output <a href="https://github.com/brittdev31/redcap_gpt_medium/blob/main/PHQ9_REDCap_DataDictionary_Final.csv">here</a>.</p><blockquote>“awesome. can you make the very first variable in the dictionary a text field and call it ‘record_number’?”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pCqWdWU6VdgXKcPr3QvsQg.png" /><figcaption>PHQ9_REDCap_DataDictionary_Final.csv</figcaption></figure><p>We now have a complete Data Dictionary, ready to upload into a blank REDCap Project. Upon doing so, we have created a new instrument in our project and it looks to function exactly as expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U5bLiCBNbPfBAS_nVu9Hwg.png" /></figure><h3>Conclusion</h3><p>I’ve included the REDCap Codebook, Data Dictionary, Instrument PDF, and project XML (as well as the behind the scenes Python code) for further evaluation.</p><p><a href="https://chatgpt.com/share/6737ab9e-11c4-8006-9c75-4154599c1757">ChatGPT 4.0 Prompt &amp; Output</a> | <a href="https://github.com/brittdev31/redcap_gpt_medium">GitHub Repository</a></p><p>Note: I left the file names as provided so as to not alter <em>any</em> of the input/output.</p><p>Hopefully others can benefit from this feature of ChatGPT 4.0 in their REDCap project builds. The PHQ-9 is simple and widely used, so I’d love to see how it handles (and how you prompt) more complex, obscure measures.</p><p><strong>Happy REDCap-ing!</strong></p><h3>Citations</h3><blockquote>REDCap (Research Electronic Data Capture) is a secure, web-based software platform designed to support data capture for research studies, providing 1) an intuitive interface for validated data capture; 2) audit trails for tracking data manipulation and export procedures; 3) automated export procedures for seamless data downloads to common statistical packages; and 4) procedures for data integration and interoperability with external sources.</blockquote><p>1PA Harris, R Taylor, R Thielke, J Payne, N Gonzalez, JG. Conde, Research electronic data capture (REDCap) — A metadata-driven methodology and workflow process for providing translational research informatics support, <em>J Biomed Inform. 2009 Apr;42(2):377–81.</em></p><p>2PA Harris, R Taylor, BL Minor, V Elliott, M Fernandez, L O’Neal, L McLeod, G Delacqua, F Delacqua, J Kirby, SN Duda, REDCap Consortium, The REDCap consortium: Building an international community of software partners, <em>J Biomed Inform. 2019 May 9 [doi: 10.1016/j.jbi.2019.103208]</em></p><p>OpenAI. (2023). <em>ChatGPT</em> (Version 4o) [Large language model]. <a href="https://chat.openai.com/chat">https://chat.openai.com/chat</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a67c5a934f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>