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 appear 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'
Copy Rule

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

Available on Tablet

Available on Ocean Online Available on Ocean Reminders

 Known EMR Limitations (if any)

date The current date  Y  Y  Y  
time The current time  Y  Y  Y  
site The name of the site.   N  Y  Y  
ptTitle The patient's title (e.g. "Dr.")  Y Y Y  
ptSuffix The patient's suffix, if any, e.g. "Jr." Y Y Y  
ptName The patient's full name  Y Y Y  
ptSurname  The patient's surname / last name. Y Y Y  
ptFirstName The patient's first name.  Y Y Y  
ptPreferredName The preferred name of the patient, if set. For simple display purposes, consider using ptPreferredOrFirstName. Y Y Y  
ptPreferredOrFirstName The patient's preferred name, if set, or the first name if no preferred name is available. Useful for salutations. Y Y Y  
ptSecondName The patient's middle/second name. Y Y Y  
ptSecondNameInitials The patient's 'middle initial', i.e. the first letter of the second/middle name. Y Y Y  
ptAddress1 The first line of the patient's main (mailing) address. Y Y Y  
ptAddress2 The second line of the patient's main (mailing) address. Y Y Y  
ptCity The city of the patient's main (mailing) address. Y Y Y  
ptProvince The province of the patient's main (mailing) address. Y Y Y  
ptCountry The country of the patient's main (mailing) address. Y Y Y  
ptPostal The postal code of the patient's main (mailing) address. Y Y Y  
ptAddr2Line1 The first line of the patient's second (e.g. residence) address. Y Y Y  
ptAddr2Line2 The second line of the patient's second (e.g. residence) address. Y Y Y  
ptAddr2City The city of the patient's second (e.g. residence) address. Y Y Y  
ptAddr2Province The province of the patient's second (e.g. residence) address. Y Y Y  
ptAddr2Country The country of the patient's second (e.g. residence) address. Y Y Y  
ptAddr2Postal The postal code of the patient's second (e.g. residence) address. Y Y Y  
ptBirthDate Patient's birth date. Y Y Y  
ptApproxAgeInDays The patient's approximate age, measured as the number of days as an integer. Y Y Y  
ptHomePhone The home phone number of the patient.  Y Y Y  
ptBusinessPhone Business phone number of the patient. Y Y Y  
ptBusinessExt The extension of the patient's business phone number (if it is optionally specified separately from the business phone) Y Y Y  
ptMobilePhone The mobile/cell phone number of the patient. Y Y Y  
ptEmail The patient's main email address. Y Y Y  
ptSex Either "M" or "F" Y Y Y  
ptIsMale True if male Y Y Y  
ptIsFemale True if female Y Y Y  
ptHnVC The health number verification code (for ON health numbers). Y Y Y  
ptHnProv The HN province. Y Y Y  
ptHnExpiryDate The HN expiry date. Y Y Y  
ptHn The patient's health number (HN). Y Y Y  
ptAge The patient's age in years. Y Y Y  
ptHisHer Either "his" or "her" depending on pt sex Y Y Y  
ptHisHer.cap Either "His" or "Her" (capitalized) depending on pt sex Y Y Y  
ptHeShe Either "he" or "she" depending on pt sex Y Y Y  
ptHeShe.cap Either "He" or "She" (capitalized) depending on pt sex Y Y Y  
ptHimHer Either "him" or "her" depending on pt sex Y Y Y  
ptMaleFemale Either "male" or "female" depending on pt sex Y Y Y  
ptManWoman Either "man" or "woman" depending on pt sex Y Y Y  
ptFamilyDoc The patient's family doc, as per patient record Y Y Y  
ptClinicDoc The patient's clinic doc (e.g. could be specialist) Y Y Y  
ptComments Any comments that have been typed into the demographics section of the patient chart Y Y Y 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"

Y Y Y PSS Only
ptCpp

A section of the patient profile ("CPP") with one line per item.

e.g. @ptCpp.prob might yield:

"dm2

chf"

Some other common CPP fields include: ptCpp.pmhx (past medical history), ptCpp.fhx (family history), ptCpp.rx (medications)

Y Y Y PSS Only
ptFullCpp The entire patient profile, with each section heading in uppercase. Y Y Y PSS Only
ptCheckIfHas Either "Y" or "" depending on whether the patient has the condition, e.g. @ptCheckIfHas('dm2') Y Y Y  
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. Y Y Y  
ptHas Either "Y" or "N" depending on whether the patient has the condition, e.g. @ptHas('dm2'). Also checks past medical history if available. Y Y Y  
ptLatestVal

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

@ptLatestVal.a1c

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

 Y

Y Y  
ptEmergencyContactPhone The phone number of the emergency contact / next of kin (requires special '@' delimiter in PSS Next of kin field) Y Y Y PSS Only
ptEmergencyContactRelationship The relationship of the patient to the emergency contact / next of kin (requires special '@' delimiter in PSS Next of kin field)  Y Y Y PSS Only
ptEmergencyContactIsPoA  Y/N whether the emergency contact/next of kin has POA (requires special '@' delimiter in PSS Next of kin field) Y Y Y PSS Only
ptEmergencyContact  The patient's emergency contact / next of kin. Y Y Y  
ptCustom

An EMR's custom demographic field, as specified by the keyword's suffix. Note that the field is stripped of non-alphanumeric characters; spaces and dashes are converted to underscores.

e.g. "ptCustom.my_field" for a custom demographic field named "My Field"

e.g. "ptCustom.phq_9" for a custom demographic field named "PHQ-9"

N Y N Accuro Only
ptExternalRef The patient's reference in the EMR, e.g. the patient ID Y Y Y  
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. 

N Y* N

*Deprecated. Use "apptDate" instead.

 
apptDate A textual description of the patient's next upcoming appointment date.  N Y Y Not supported in OSCAR
apptTime A textual description of the patient's next upcoming appointment time.  N Y Y Not supported in OSCAR
ptPreferredPharmacy The preferred pharmacy for the patient. Y Y Y PSS Only 
user.properName

The proper name of the current user.

N Y* N *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. Y Y Y  

 

Have more questions? Submit a request