Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

Adding different types of data

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

<b>Full Name:</b> $data.patientName

Full Name (Last, First)

Preferred Name

patientName

<b>Name:</b> $data.patientName.familyName, $data.patientName.givenName

Age (years)

Age

age

<b>Age:</b> $data.age years old

Age (years and months)

Age

age

<b>Age:</b> $data.age.fullYears years $data.age.fullMonthsSinceLastBirthday months old

Birthdate

Birthdate

birthdate

<b>Birthdate:</b> <%= util.format(data.birthdate, "dd/MMM/yyyy") %>

Gender

Gender

gender

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

Address

Preferred Address

address

<b>Address:</b> $data.address.address1, $data.address.cityVillage

First Encounter of Type(s)

Encounters For Patient

firstXyzEncounter

First XYZ Encounter occurred
on $

Unknown macro: {util.format(data.firstScheduledVisit.encounterDatetime, "dd/MMM/yyyy")}

at $data.firstScheduledVisit.location.name

Most Recent Weight

Obs For Person

lastWeight

Most recent weight:
$data.lastWeight.valueNumeric (${util.format(data.lastWeight.obsDatetime, "dd/MMM/yyyy")})

Obs Active List

 

obs

<%  activeItemsa = util.sort(data.obs.activeItems, "obsDatetime desc")
Active observations:
<ol>
<% 
activeItems = util.sort(data.obs.activeItems, "obsDatetime desc")
for(item in activeItems)

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

%>
</ol>

  • No labels