|
One of the most powerful features of the Team
Chart Concept is its use of Computed User
Defined Fields . The user does not enter a Computed Field
; it is "computed" by the Team
Chart Concept based on the values of other fields
in the system. Computed Fields are a natural for Risk Factor Analysis,
among other things.
Computed Fields consist of one or more conditions
and then for each condition a value must be given (or computed).
If a Computed Field has more than one condition, each condition
is evaluated (True or False) from the first condition to the last
condition. The first condition evaluated that returns True has its
associated value (numeric or text) assigned to the value of the
Computed Field.
For example, here is a Computed Field used to
define part of a Risk Factor based on the Patient's sex, age and
weight.
Sample
Risk Factor Computed Field :
If
(Patient->Sex = "M" AND Patient->Age > 50) THEN 9 / Patient->Weight
If
(Patient->Sex = "M" AND Patient->Age > 30) THEN 7 / Patient->Weight
If
(Patient->Sex = "M" AND Patient->Age > 18) THEN 5 / Patient->Weight
If
(Patient->Sex = "F" AND Patient->Age > 50) THEN 10 / Patient->Weight
If
(Patient->Sex = "F" AND Patient->Age > 30) THEN 8 / Patient->Weight
If
(Patient->Sex = "F" AND Patient->Age > 18) THEN 7.5 /Patient->Weight
If
(TRUE) THEN 5 / Patient->Weight
The above Computed Field contains 7 conditions.
The Team Chart Concept
will evaluate the 7 conditions, starting at the top, and for the
first condition that is true, the value appearing after the 'THEN'
will be assigned to the Risk Factor Computed Field . If the patient
was a 35 year-old male, the value assigned would be 7 divided by
the patient's weight.. If the patient was a 19 year-old female,
the value assigned would be 7.5 divided by the patient's weight.
If the patient was a 12 year old male, the value assigned would
be 5 divided by the patient's weight.
Notice that in this computed
field, the last condition will always be true (if all previous conditions
fail).
If no conditions evaluate to true, a empty value (null)
is returned, which may be assumed to be zero for numeric fields.
It is always good practice to ensure that a value is always returned.
In the above example, Patient Demographic information
was used to build the computed field. You can also use other fields
in the User Defined Record. You can even have one computed field
base its values on another Computed Field. Every time a user enters
a value for a non-computed field in a User Defined Timeline Entry
, all of the computed fields are recalculated, in the order that
they appear in the User Defined Record.
To see an example of a Framingham Risk Factor routine
that uses computed fields, click here.
To see an example of a Renal Failure Risk Factor routine
that uses computed fields, click here.
|