User Tools

Site Tools


en:manuals:ehr:tokenmanager

Token engine

Introduction

The token engine makes it easier to insert recorded data (such as the name of the patient, the email of the healthcare provider or any widget's data from the current chart) or system data (today's date) into an html or text content. It is used inside the html templates to design elegant print-outs, pdf or html files. The equivalent in a typical word processor software is called “form field” or “input field”. Whether you want to create a clinical letter chart or a lab test prescription chart, the token engine is available to simplify your task.

Anatomy of tokens

In its simplest form, a token looks like this:

  {{~User.Contact.Mail~}}

If the user entered his email, this token will output the current user email. If this information doesn't not exist, the token will output an empty string.

A token can include optional text before and after its value:

  {{ optional text ~Name.of.token~ option text }}

If the value exists, both text snippets will be displayed along with the token value. If the value doesn't exist, nothing will be displayed.

Tokens can be nested:

   {{{{~Patient.Insurance.SocialNumberOwnerName~}} ~Patient.Insurance.SocialNumber~}}

If the patient's social security number is available, the token will display the name of the owner of the social security number before it (if this data exists).

Examples

Token Value Result
{{~Patient.Identity.Name~}} Kirk Kirk
{{ optional text ~Patient.Identity.Name~}} Kirk optional text Kirk
{{ optional text ~Patient.Identity.Name~}} Nul Nul
{{~Patient.Identity.Name~ optional text }} Kirk Kirk optional text
{{~Patient.Identity.Name~}} Kirk Kirk
{{~Patient.Identity.Name~}} Nul Nul
{{<br/>With HTML markup<br/>~Patient.Identity.Name~}} Kirk <br/>With HTML markup<br/>Kirk
{{With line breaks\n~Patient.Identity.Name~}} Kirk With lign breaks\nKirk
{{{{~Patient.Identity.Title~ }}~Patient.Identity.Name~{{ ~Patient.Identity.FirstName~ }}}} Kirk Captain Kirk Tiberius

You can see real tokens in action in the code of charts (global_resources/forms), inside the html templates (*.html files inside the html folder of each chart).

Available tokens

For developers: tokens can be found in the file /plugins/coreplugin/constants_tokensandsettings.h Please check modifications to constants_tokenandsettings.h regularly and modify documentation accordingly.

User tokens

Token Comment
{{~User.Age.DateOfBirth~}} Date of birth
{{~User.Age.FullAge~}} Full age: years, months, days
{{~User.Age.YearsOld~}} Age in years
{{~User.Identity.FullName~}} Full name (title + last name + first name)
{{~User.Identity.Title~}} Title
{{~User.Identity.UsualName~}} Last name
{{~User.Identity.OtherNames~}} Other name
{{~User.Identity.FirstName~}} First name
{{~User.Professional.Specialties~}} Specialties
{{~User.Professional.Identifiants~}} Professional identifiers
{{~User.Professional.Qualifications~}} Professional skills
{{~User.Contact.Mail~}} Email
{{~User.Contact.Tel1~}} Phone number 1
{{~User.Contact.Tel2~}} Phone number 2
{{~User.Contact.Tel3~}} Phone number 3
{{~User.Contact.Fax~}} Fax
{{~User.Contact.FullAddress~}} Full address (text)
{{~User.Contact.FullContact~}} Full contact details (text)
{{~User.Contact.FullAddress.Html~}} Full address (HTML)
{{~User.Contact.FullContact.Html~}} Full contact details (HTML)
{{~User.Contact.Street~}} Address : Street
{{~User.Contact.Zipcode~}} Address : zip code
{{~User.Contact.City~}} Address : City
{{~User.Contact.State~}} Address : State
{{~User.Contact.Country~}} Address : Country
2014/03/17 12:25

Patient tokens

  • Tokens related to the patient
Token Meaning
{{~Patient.Age.DateOfBirth~}} Date of birth
{{~Patient.Age.FullAge~}} Age
{{~Patient.Age.YearsOld~}} Age in years
{{~Patient.Age.DateOfDeath~}} Date of Death
{{~Patient.Identity.FullName~}} Full Name (titles, last names, first names)
{{~Patient.Identity.Title~}} Title
{{~Patient.Identity.UsualName~}} Common Last name
{{~Patient.Identity.OtherNames~}} Other last names
{{~Patient.Identity.FirstName~}} First name(s)
{{~Patient.Contact.Mail~}} Email
{{~Patient.Contact.Tels~}} Phone number
{{~Patient.Contact.Fax~}} Fax
{{~Patient.Contact.MobilePhone~}} Mobile Phone number
{{~Patient.Address.FullAddress~}} Full address in plain text
{{~Patient.Address.FullContact~}} Full contact details in plain text
{{~Patient.Address.FullAddress.Html~}} Full address in HTML
{{~Patient.Address.FullContact.Html~}} Full contact details in HTML
{{~Patient.Address.Street~}} Address : Street
{{~Patient.Address.Zipcode~}} Address : Zip code
{{~Patient.Address.City~}} Address : City
{{~Patient.Address.State~}} Address : State
{{~Patient.Address.Country~}} Address : Country
{{~Patient.Insurance.SocialNumber~}} Social security number (1)
{{~Patient.Insurance.SocialNumber2~}} Social security number (2)
{{~Patient.Insurance.SocialNumber3~}} Social security number (3)
{{~Patient.Insurance.SocialNumber4~}} Social security number (4)
{{~Patient.Insurance.SocialNumbers~}} Social security numbers (all)
{{~Patient.Insurance.SocialNumberOwnerName~}} Social security number (Name of owner)
{{~Patient.Insurance.SocialNumberOwnerAddress~}} Social security number (Address of owner)
{{~Patient.Metrics.WeightInGrams~}} Weight in grams
{{~Patient.Metrics.HeightInCentimeters~}} Height in centimeters
{{~Patient.Biology.CreatininClearanceInMlMin~}} Creatinin clearance in milliliter per minute
{{~Patient.Biology.CreatininClearance~}} Creatinin clearance (units not defined)
{{~Patient.Drugs.ChronicTherapeutics.xml~}} Long-term medication (FreeDiams XML prescription)
{{~Patient.Drugs.ChronicTherapeutics.html~}} Long-term medication (HTML)
2014/03/17 12:25
  • Tokens related to the print process
    • [[DOCUMENTTITLE]] : Title of the document (ex: Prescription, Patient file…)
    • [[DATE]] : Date of printing
2014/03/17 12:25

Drugs and prescription tokens

Etiquettes Représentation
{{~Prescription.Drug.brandname~}} Proprietary name or INN
{{~Prescription.Protocol.Quantity.Full~}} Complete order
{{~Prescription.Protocol.Quantity.From~}} minimum prescribed dose
{{~Prescription.Protocol.Quantity.to~}} maximum prescribed dose
{{~Prescription.Protocol.Quantity.Scheme~}} pharmaceutical formulation (tab, capsule, powder)
{{~Prescription.Protocol.Meal~}} relation with food or meal
{{~Prescription.Protocol.Period.Full~}} frequency and interval of time (take one tab –> [one time per day])
{{~Prescription.Protocol.Period.Value~}} frequency (take one tab –> [one] time per day)
{{~Prescription.Protocol.Period.Scheme~}} interval of time (take one tab –> one time per [day])
{{~Prescription.Protocol.Duration.Full~}} full duration
{{~Prescription.Protocol.Duration.From~}} minimum prescribed duration “from”
{{~Prescription.Protocol.Duration.To~}} maximum prescribed duration “to”
{{~Prescription.Protocol.Duration.Scheme~}} duration scheme
{{~Prescription.Protocol.Route~}} route of administration
{{~Prescription.Protocol.DailyScheme.Distributed~}} distribution of intake during the day (1 tab in the morning, 2 tabs in the evening)
{{~Prescription.Protocol.DailyScheme.Repeated~}} time of administration (single repeated dose): 1 tab: morning, noon, evening
{{~Prescription.Protocol.Quantity.MinInterval.Full~}} Minimum time interval between doses: complete text
{{~Prescription.Protocol.Quantity.MinInterval.Value~}} Minimum time interval between doses: value
{{~Prescription.Protocol.Quantity.MinInterval.Scheme~}} Minimum time interval between doses: unit
{{~Prescription.Protocol.Refill~}} Number of refills
{{~Prescription.Protocol.Note~}} Note
2014/03/17 12:25

Form tokens

You can access the label and the data of any widget (item) inside the form (record or chart):

  {{~Form.Label.Unique.Identifier.Of.Item~}}
  {{~Form.Data.Unique.Identifier.Of.Item~}}
  

The unique identifier of the item it the full name of the item.

Example: clinical letter

{{{{~Form.Label.Subforms::Generic::Clinical::Letter::Carbon::Copy::Group~}} <!--will extract the current label associated with the item (with current translation--><li>~Form.Data.Print.Subforms::Generic::Clinical::Letter::CC1::LineEdit~</li>}}
{{<li>~Form.Data.Print.Subforms::Generic::Clinical::Letter::CC2::LineEdit~</li>}}<!--will extract the printable data of the form item uuid "Subforms::Generic::Clinical::Letter::CC2::LineEdit"-->
{{<li>~Form.Data.Print.Subforms::Generic::Clinical::Letter::CC3::LineEdit~</li>}}
2016/10/15 03:55 · Jérôme Pinguet
2014/03/17 12:25
en/manuals/ehr/tokenmanager.txt · Last modified: 2016/10/15 03:23 by Jérôme Pinguet