Using Keywords to Automatically Insert Content

Keywords allow you to insert a piece of data from the patient object (usually from the EMR) into a caption, to prepopulate a field, or as part of a note. To see a list of available keywords, simply type @ and the menu will appear in the editor. A full list of options is also included in the chart below.

To indicate a keyword, just add "@" to the beginning. For example, "Dear @ptPreferredOrFirstName," will render as "Dear Jacob,".

You can also access keyword values in a script with the ScriptUtil.getKeyword() function, like "ScriptUtil.getKeyword('@ptName')". This is particularly useful for tablet rules, since a rule can access most of the patients information via this function. For example, you can show a COPD assessment questionnaire if the patient has COPD in their problem list or past medical history like this:

ScriptUtil.getKeyword('@ptHas.copd') == 'Y'

Keywords can be very useful in conjunction with EMRFields to allow patient to update their profile automatically. For example, by setting the default text of a text field to "@ptPreferredName" and setting the EMRField mapping on the same item to "preferredName", the initial value will be the patient's preferred name in the EMR and any changes will be applied to the preferred name field in the EMR.

Note that not all keywords work for all EMRs.

Some keywords accept suffixes, which should be added after a trailing period. For example, @ptHnExpiryDate.yyyysmmsdd will show the date as 2015/06/21.

Keyword (preface with '@') Description
date The current date
time The current time
site The name of the site. Not available on tablet.
ptTitle The patient's title (e.g. "Dr.")
ptSuffix The patient's suffix, if any, e.g. "Jr."
ptName The patient's full name 
ptPreferredName The preferred name of the patient, if set. For simple display purposes, consider using ptPreferredOrFirstName.
ptPreferredOrFirstName The patient's preferred name, if set, or the first name if no preferred name is available. Useful for salutations.
ptSex Either "M" or "F"
ptIsMale True if male
ptIsFemale True if female
ptHnVC The HN verification code.
ptHnExpiryDate The HN expiry date.
ptHn The patient's health number.
ptAge The patient's age in years.
ptHisHer Either "his" or "her" depending on pt sex
ptHisHer.cap Either "His" or "Her" (capitalized) depending on pt sex
ptHeShe Either "he" or "she" depending on pt sex 
ptHeShe.cap Either "He" or "She" (capitalized) depending on pt sex
ptHimHer Either "him" or "her" depending on pt sex
ptMaleFemale Either "male" or "female" depending on pt sex
ptManWoman Either "man" or "woman" depending on pt sex
ptFamilyDoc The patient's family doc, as per patient record
ptClinicDoc The patient's clinic doc, e.g. could be specialist
ptComments Any comments that have been typed into the demographics section of the patient chart. (PSS only)
ptCppOneLine A section of the patient profile ("CPP") flatted to a single line, delimited by semi-colon. E.g. ptCppOneLine.prob might yield "dm2; chf"

A section of the patient profile ("CPP") with one line per item. E.g. ptCpp.prob might yield



ptFullCpp The entire patient profile, with each section heading in uppercase.
ptCheckIfHas Either "Y" or "" depending on whether the patient has the condition, e.g. @ptCheckIfHas('dm2')
ptRxFriendly A patient-friendly version of one of the patient's medications. Use a suffix to indicate which med, e.g. @ptRxFriendly.0 would be the first med on file.
ptHas Either "Y" or "N" depending on whether the patient has the condition, e.g. @ptHas('dm2'). Also checks past medical history if available.

Provides the latest lab result/vital for a particular measurement. E.g.:


Supported vitals include ht, wt, bp, cr, egfr, a1c, oceanvital. 

ptExternalRef The patient's reference in the EMR, e.g. the patient ID
ptNextApptDate A textual description of the patient's next upcoming appointment date and time, or "(not available)". Note: Most EMR interfaces (other than PSS), as well as the tablet, do not populate this field.
ptPreferredPharmacy The preferred pharmacy for the patient. (PSS only)
user.properName The proper name of the current user. This is limited to secure message and web questionnaire invitations (e.g. "A message from Dr. John Smith") and cannot be used in eForms or rules.
providerName The name of the patient's provider for their scheduled appointment.


Learn More 

1. Getting Started with eForms 8. Multi-Page eForms
2. Creating a New Form & Understanding Form Structure 9. Action Menu - eForm Properties
3. General Tab - Adding eForm Items & Item Types 10. Action Menu - eForm Actions
4. Menu Choice Tab - Editing Menu Choices 11. Editing an Existing Form
5. Note Formatting Tab - Note Formatting for Items 12. Helpful eForm & Note Formatting Tips
6. Scripting and More Tab - The Basics 13. Formatting Clinical Notes that Appear with Completed eForms or Sections
7. Adding a Section - Overview  


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request