The code block below illustrates how one might use # and // as comments in your logic and calculations.
# Text can be put here to explain what the logic/calculation does and why.
if ([field1] = '1' and [field2] > 7,
// This comment can explain what the next line does.
[score] * [factor],
// Return '0' if the condition is False.
0
)
Working …
0% means
50% means
100% means
This value you provided is not a number. Please try again.
This value you provided is not an integer. Please try again.
The value entered is not a valid Vanderbilt Medical Record Number (i.e. 4- to 9-digit number, excluding leading zeros). Please try again.
The value you provided must be within the suggested range
The value you provided is outside the suggested range
This value is admissible, but you may wish to double check it.
The value entered must be a time value in the following format HH:MM within the range 00:00-23:59 (e.g., 04:32 or 23:19).
This field must be a 5 or 9 digit U.S. ZIP Code (like 94043). Please re-enter it now.
This field must be a 10 digit U.S. phone number (like 415 555 1212). Please re-enter it now.
This field must be a valid email address (like joe@user.com). Please re-enter it now.
The value you provided could not be validated because it does not follow the expected format. Please try again.
This module will allow you to set up custom links (similar to project bookmarks) that appear at the bottom of the Applications list of EVERY project's left-hand menu (see example screenshot to the right). These links point to websites outside of REDCap (i.e. reside on a different server on the web), as well as to other REDCap projects. You may set various settings for each link, such as defining the label for how it appears on the left-hand menu, whether or not the link opens a new window/tab in your web browser. By default, these Custom Application Links will appear for ALL users in ALL projects. However, you may set them to only display for particular users, and you may also exclude it from some projects so that it will not appear for those projects.
You may add a new bookmark
at the bottom of this page. You simply need to provide a label and a web address (URL). If you want to merely take the user to the target website, using the Simple Link option should be enough. You can create links to existing REDCap projects by selecting the REDCap Project link type. It will bring up a list of all projects, after which you will be able to choose one to create the link to it. You may also utilize more advanced capabilities if you use the Advanced Link option, which additionally sends extra information (e.g., user and project info) from REDCap to the target website as a means of verifying the identify of the REDCap user on that external site. (Tell me more about the Advanced Link option)
EXAMPLE: Below displays how the Custom Application Links would appear on a project's menu.
EXAMPLE: Below displays how the Custom Application Links would appear on a project's menu.
Summary
The Advanced Link option provides more capabilities than the Simple Link option. The Simple Link merely takes the user to the target website in an anonymous fashion, so the site cannot discern who is visiting it. Not only does the Advanced Link take the user to the target website, but it sends information to that website that can then be used for verifying the identity of the user. NOTE: Some technical knowledge (e.g., web development/programming skills) is required in order to utilize the Advanced Link option, and it requires that you (or your team/associates/colleagues) be the managers or developers of that external site in order to properly utilize this service. Details are listed below.
How to verify the identity of the REDCap user via an Advanced Link
When a user clicks on an Advanced Link, it is not a typical HTML web link, but it is actually an HTML web form that uses the POST method to send an HTTP POST request to the target external website. When the link is clicked, the POST request submits a single field named 'authkey' to the external website. The authkey is an undecipherable, encrypted string of text that will then be used by the external website for identifying the user using the steps below.
Steps required for programmers/developers:
1) The authkey from REDCap is received by the external website via an HTTP POST request immediately after the user clicks the external link on the left-hand project menu.
2) The external site will then need to send the authkey back to REDCap via a POST request to the REDCap API at the URL provided below. This will then allow REDCap to evaluate who the user is and if their session in REDCap is still active. In the API request to REDCap, only two POST parameters need to be sent: 'authkey' and 'format'. The 'authkey' parameter will be the value of the authkey originally received from REDCap. The 'format' parameter allows you specify the format of the response data that is returned from the API request: 'csv' (default), 'json', or 'xml'. This API request must be sent to this exact URL: https://chi-redcap.dshs.texas.gov/redcap/api/. (NOTE: This API request does NOT require the use of an API token, which is typically required for most API requests.)
3) After sending the API request to REDCap, REDCap will return the following information in the format that was specified: 'username' (the username of the user who clicked the link), 'project_id' (the id number of the REDCap project that the user is coming from), 'data_access_group_name' (the name of the data access group that the user is in, if in a group), 'data_access_group_id' (the id number of the data access group that the user is in, if in a group), and 'callback_url' (URL of the REDCap project from which the user came). If the API request is not formatted correctly or if the user's session is no longer active in REDCap, then REDCap will return a failed response of '0'.
4) The values returned from the API response (e.g., username) can then by used by the external website for a variety of different purposes, such as verifying the user's identify in order to implement certain user permissions on the external site. This will all need to be handled dynamically by the external site and thus assumes that the developer of the website has designed the site to follow the appropriate course of action that the developer's script dictates based upon the values received from the API response. Once the site successfully receives the API response with all the user info and project info, the site can then do what it will with that information for whatever purpose it sees fit.
Additional information for programmers/developers:
• The REDCap API is language agnostic, so it does not matter in which programming language that the external website has been written when making the API request. All that is required is that the POST request to the API be formatted properly. (NOTE: This API request does NOT require the use of an API token, which is typically required for most API requests.)
• If any of the steps listed above seems daunting or makes little sense to you, then utilizing the Advanced Link option may not be a viable option for you. If you still wish to go forward with implementing it, you may need to consider hiring a web developer who can write the script for the external site in order to accomplish the steps above for utilizing the Advanced Link option.
Link #
Link Label
Link URL / Destination
Link Type
User Access
Opens new window
Append record info to URL
Append project ID to URL
Delete
Enter the label for the link as it is seen on the left-hand menu
Enter the web address (URL) for the link
(e.g., http://www.mysite.com/mypage.html)
Listed below are all the REDCap projects in either production or development status to which you currently have access. Select a project to which you wish to create a link. Note: Since you are an Administrator, you are able to select a project belonging to any of the users in this project, whereas normally users can only view their own projects.
The REDCap projects of *all* users in this project:
WARNING: Please note that selecting this option will append the record name (and if a longitudinal project, the unique event name also) to the URL of the target link. If the record names for this project are an identifier (i.e. PHI), such as social security number or medical record number, you should probably not utilize this feature, especially if you are not involved in the management or development of the website to which you are sending this record information. This is merely a warning to ensure that you are protecting any private information that might exist in the record names in your project so that you are not sending them to a third-party website unknowingly. If this is okay, then press the Save button below.
Summary
This option is useful to advanced users who want to pass on extra information to the bookmarks's destination website (most likely because they manage/develop that particular website and want to use the information passed in some particular way). When this option is checked off for a given bookmark link, it will append certain information onto the link URL already specified if the link is clicked on the left-hand menu while the user is currently viewing a record on a data collection instrument. The information appended is specific to the record being viewed at that moment, and thus allows one to pass that record info onto the target website. If the user clicks the bookmark link and is NOT on a data collection form, then nothing will get appended to the URL. A good example use case for this functionality is if someone has developed a website that is able to display reports for records and thus can display the report for a single record if that record name is explicitly provided (i.e. via the URL query string).
Exactly what information is appended to the URL?
When viewing a record on a data collection instrument, one or two pieces of information will be appended to the URL: the name of the record being viewed and (if a longitudinal project) the unique event name of the current event. The following will be added to the query string of the URL: record=RECORDNAME&event=UNIQUEEVENTNAME
, in which RECORDNAME and UNIQUEEVENTNAME will be replaced with the current record and event being viewed at that time. For classic, non-longitudinal projects, it would only include the record name. The unique event name for longitudinal projects is the same as can be found on the Define My Events page.
Examples (assumes the user is viewing a data collection form):
1.) If the URL defined is http://www.mysite.com/mypage/ and the current record name is "CAF1023" (classic project): http://www.mysite.com/mypage/?record=CAF1023
2.) If the URL defined is http://www.mysite.com/mypage.php?otherparameter=42 and the current record name is "CAF1023"
and the unique event name for the current event is "event1_arm1" (longitudinal project): http://www.mysite.com/mypage.php?otherparameter=42&record=CAF1023&event=event1_arm1
The option to append a REDCap project's project ID automatically onto the link's URL can be useful in certain cases. The project ID can be found in the URL's query string as the 'pid' numerical value for any given REDCap project while accessing that project. The project ID is how REDCap recognizes one project from another. Thus it could be used by any external webpages in the same way to differentiate the project from which a user is coming in order to cater to multiple REDCap projects individually using the same webpage for all such projects. The following will be added to the query string of the URL: pid=PROJECTID
For example, if the URL defined is http://www.mysite.com/mypage/, then the resulting URL after the value is appended would be the following: http://www.mysite.com/mypage/?pid=749