Eform Default Values
From CaisisWiki
(Difference between revisions)
(→Eform Default Values (v6.x)) |
(→Default Values (v6.x)) |
||
Line 1: | Line 1: | ||
==Default Values (v6.x)== | ==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. | ||
+ | |||
+ | ==== SourceTable ==== | ||
+ | The name of the table which triggers a default value event. | ||
+ | ==== SourceField ==== | ||
+ | The name of the field which triggers a default value event (no field == all table fields). | ||
+ | ==== SourceRecordId ==== | ||
+ | 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. | ||
+ | |||
+ | ===Examples=== | ||
+ | In the following example, the LabTest date gets populated with the Encounter date, and the LabTest field gets populated with "PSA" when the user enters a chief complaint. | ||
+ | |||
+ | <LabTests RecordId="1"> | ||
+ | <LabDate DefaultValueSourceTable="Encounters" DefaultValueSourceField="EncDate" DefaultValueSourceRecordId="1" ></LabDate> | ||
+ | <LabDateText DefaultValueSourceTable="Encounters" DefaultValueSourceField="EncDateText" DefaultValueSourceRecordId="1" ></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> |
Revision as of 20:26, 26 June 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.
SourceTable
The name of the table which triggers a default value event.
SourceField
The name of the field which triggers a default value event (no field == all table fields).
SourceRecordId
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.
Examples
In the following example, the LabTest date gets populated with the Encounter date, and the LabTest field gets populated with "PSA" when the user enters a chief complaint.
<LabTests RecordId="1"> <LabDate DefaultValueSourceTable="Encounters" DefaultValueSourceField="EncDate" DefaultValueSourceRecordId="1" ></LabDate> <LabDateText DefaultValueSourceTable="Encounters" DefaultValueSourceField="EncDateText" DefaultValueSourceRecordId="1" ></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>