Eform Default Values

From CaisisWiki

(Difference between revisions)
Jump to: navigation, search
(Examples)
(Default Values (v6.x))
Line 4: Line 4:
Each XML node requiring a default value requires specialized attribute to set the rules for cascading and setting default values automatically.
Each XML node requiring a default value requires specialized attribute to set the rules for cascading and setting default values automatically.
-
==== SourceTable ====
+
==== DefaultSource ====
 +
The source record which triggers the default event. In the form "TableName.FieldName,RecordId", i.e., "Encounters.EncDateText,1"
 +
==== DefaultValueSourceTable (deprecated) ====
The name of the table which triggers a default value event.
The name of the table which triggers a default value event.
-
==== SourceField ====
+
==== DefaultValueSourceField (deprecated) ====
The name of the field which triggers a default value event (no field == all table fields).
The name of the field which triggers a default value event (no field == all table fields).
-
==== SourceRecordId ====
+
==== DefaultValueSourceRecordId (deprecated) ====
The RecordId of the source table.
The RecordId of the source table.
==== DefaultValue ====
==== DefaultValue ====

Revision as of 19:54, 21 August 2012

Contents

Default Values (v6.x)

Attributes

Each XML node requiring a default value requires specialized attribute to set the rules for cascading and setting default values automatically.

DefaultSource

The source record which triggers the default event. In the form "TableName.FieldName,RecordId", i.e., "Encounters.EncDateText,1"

DefaultValueSourceTable (deprecated)

The name of the table which triggers a default value event.

DefaultValueSourceField (deprecated)

The name of the field which triggers a default value event (no field == all table fields).

DefaultValueSourceRecordId (deprecated)

The RecordId of the source table.

DefaultValue

A static default value. If none set, use Source value.

TargetTable

The current xml node's table.

TargetField

The current xml node's field.

TargetRecord

The current xml node's RecordId.

RequireSiblings

True or false if the field requires a sibling value before setting the DefaultValue.

TriggerSiblings

True or false if the field's siblings will activate the DefaultValue.

Examples

Static Value

In the following example, the LabTest field will default to "PSA" and the LabQuality will default to "STD" when a value is entered for any field in the LabTest record.

   <LabTests RecordId="1">
       <LabDate></LabDate>
       <LabDateText></LabDateText>
       <LabTest NotNull="True" DefaultValue="PSA"></LabTest>
       <LabResult></LabResult>
       <LabUnits></LabUnits>
       <LabQuality DefaultValue="STD"></LabQuality>
   </LabTests>

Trigger Static Value

In the following example LabTest field gets populated with "PSA" and the LabQuality field get populated with "STD" when the user enters a chief complaint.

   <LabTests RecordId="1">
       <LabDate></LabDate>
       <LabDateText></LabDateText>
       <LabTest NotNull="True" DefaultValueSourceTable="Encounters" DefaultValueSourceField="EncChiefComplaint" DefaultValueSourceRecordId="1" DefaultValue="PSA"></LabTest>
       <LabResult></LabResult>
       <LabUnits></LabUnits>
       <LabQuality DefaultValueSourceTable="Encounters" DefaultValueSourceField="EncChiefComplaint"  DefaultValueSourceRecordId="1"  DefaultValue="STD"></LabQuality>
   </LabTests>

Copy Dynamic Value (activate source)

In the following example, the LabTest date (LabDate) gets populated with the Encounter date (EncDate) when the user selected an Encounter date.

   <LabTests RecordId="1">
       <LabDate DefaultValueSourceTable="Encounters" DefaultValueSourceField="EncDate"  DefaultValueSourceRecordId="1" ></LabDate>
       <LabDateText DefaultValueSourceTable="Encounters" DefaultValueSourceField="EncDateText"  DefaultValueSourceRecordId="1" ></LabDateText>
       <LabTest NotNull="True"></LabTest>
       <LabResult></LabResult>
       <LabUnits></LabUnits>
       <LabQuality></LabQuality>
   </LabTests>

Copy Dynamic Value (activate sibling)

In the following example, the LabTest date (LabDate) gets populated with the Encounter date (EncDate) ONLY when a field in the LabTest record has a value.

   <LabTests RecordId="1">
       <LabDate DefaultValueSourceTable="Encounters" DefaultValueSourceField="EncDate"  DefaultValueSourceRecordId="1" TriggerSibling="True></LabDate>
       <LabDateText DefaultValueSourceTable="Encounters" DefaultValueSourceField="EncDateText"  DefaultValueSourceRecordId="1" TriggerSibling="True"></LabDateText>
       <LabTest NotNull="True"></LabTest>
       <LabResult></LabResult>
       <LabUnits></LabUnits>
       <LabQuality></LabQuality>
   </LabTests>
Personal tools