Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h3. Adding different types of

...

In order to add

...

Define this data

...

Give it a column label (eg)

...

And add it to your template like this

...

Full Name

...

Preferred Name

...

patientName

...

 data

|| {color:#333333}In order to add{color} || {color:#333333}Define this data{color} || {color:#333333}Give it a column label (eg){color} || {color:#333333}And add it to your template like this{color} ||
| Full Name | {color:#333333}[Preferred Name|Person Data Definitions]{color} | patientName | <b>Full Name:</b>  $data.patientName

...

 |
| Full Name (Last, First)

...

Preferred Name

...

patientName

 | {color:#333333}[Preferred Name|Person Data Definitions]{color} | patientName | <b>Name:</b> $data.patientName.familyName, $data.patientName.givenName

...

 |
| Age (years)

...

Age

...

age

 | {color:#333333}[Age|Person Data Definitions]{color} | age | <b>Age:</b> $data.age years old

...

 |
| Age (years and months)

...

Age

...

age

 | {color:#333333}[Age|Person Data Definitions]{color} | age | <b>Age:</b> $data.age.fullYears years $data.age.fullMonthsSinceLastBirthday months old

...

Birthdate

...

Birthdate

...

birthdate

 |
| Birthdate | {color:#333333}[Birthdate|Person Data Definitions]{color} | birthdate | <b>Birthdate:</b> <%= util.format(data.birthdate, "dd/MMM/yyyy") %>

...

Gender

...

Gender

...

gender

 |
| Gender | {color:#333333}[Gender|Person Data Definitions]{color} | gender | <b>Gender:</b>

...

 \\
<%= msg.translate(data.gender == "M" ? "Patient.gender.male" : "Patient.gender.female") %>

...

Address

...

Preferred Address

...

address

 |
| Address | {color:#333333}[Preferred Address|Person Data Definitions]{color} | address | <b>Address:</b>  $data.address.address1, $data.address.cityVillage

...

 |
| First Encounter of Type(s)

...

Encounters For Patient

...

firstXyzEncounter

...

 | {color:#333333}[Encounters For Patient|Patient Data Definitions]{color} | firstXyzEncounter | First XYZ Encounter occurred \\
on $\{util.format(data.firstScheduledVisit.encounterDatetime, "dd/MMM/yyyy")} at $data.firstScheduledVisit.location.name

...

 |
| Most Recent

...

Obs For Person

...

lastWeight

...

 Weight | {color:#333333}[Obs For Person|Person Data Definitions]{color} | lastWeight | Most recent weight: \\
$data.lastWeight.valueNumeric ($\{util.format(data.lastWeight.obsDatetime, "dd/MMM/yyyy")})

...

 |
| Obs Active

...

 

...

obs

...

 List | | obs | Active observations: \\
<ol> \\
<% activeItems = util.sort(data.obs.activeItems, "obsDatetime desc")

...

 \\
for(item in activeItems)

...

 \{ \\
%> \\
<li>$item.valueCoded.name <small><i>$\{util.format(item.obsDatetime, "dd-MMM-yyyy")}</i></small></li>

...

 \\
<%

...

 }&nbsp;%> \\
</ol> |
| Three Most Recent Weights\\ | [Obs For Person|../../../../../../../../../../display/docs/Person+Data+Definitions] | weights\\ | <% &nbsp;&nbsp; &nbsp;\\
 &nbsp;&nbsp; &nbsp;obsList = data.weights;\\
 &nbsp;&nbsp; &nbsp;obsList = util.sort(obsList, "obsDatetime desc");&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\\
 &nbsp;&nbsp; &nbsp;for (obs in obsList) {\\
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;println obs.valueNumeric&nbsp; + '&nbsp; (' + util.format(obs.obsDatetime, 'dd/MMM/yyyy') + ')';\\
 &nbsp;&nbsp; &nbsp;}\\
 %> |