Class Name: HL7DataFieldDef
Scope: Public - Restricted - Child Class of HL7DefinitionData - > HL7DataSegmentDef - No public constructor.
This class contains the structure of a specific ordinal HL7 Field within a HL7 Segment (HL7DataSegmentDef) contained in the HL7DefinitionData "grandparent" object.
If we think of a HL7 Message structure as: Messages are made up of Segments (HL7DataSegmentDef) which are made up of Fields (HL7DataFieldDef). The Field object really is just a "container" of sorts for a HL7DataTypeDef instance (the HL7DataType property).
So why is the HL7DataFieldDef class even necessary?
Question: So why is the Field class even necessary? Shouldn't the HL7 Message structure be: Messages are made up of Segments which are made up of HL7DataTypeDefs?
Answer: Because HL7DataTypeDefs are generic types of data while the HL7DataFieldDef has context. Thus Field #7 of the PID segment is the "Patient Date of Birth" as opposed to just "Date Time Value". It also allows you to do data validation on HL7 messages more logically. Example: In most HL7 definitions the HL7DataTypeDef for "Patient Name" is the same as the one for "Mother's Maiden Name", and you might reasonably want to insist that in every message you receive that the Last Name (Component #1 of the HL7DataTypeDef) in the "Patient Name" field is REQUIRED, while the Last Name in the "Mother's Maiden Name" field is purely optional.
|
What is a "No Nulls" Class? It means that we have gone to great lengths so that there no exceptions thrown or null values returned on accessor methods. You really have to try and break it (please don't though).
But how does it work in practice? It means in this class if you want to access Component #12000 (HL7DataTypeCompnentDef object) of of a Field object instance you can do it by calling HL7DataType.Component(12000). Now there are NOT 12000 components in ANY HL7 data type, there are typically no more than 15 or 20 depending on which version of HL7 you're using. But this class WILL return a real HL7DataTypeComponentDef object to you rather than Null. It will be an empty object and the IsDefined property will be False.
|
Data Type Properties
Integer ComponentCount - The value from the NumberOfComponents property in HL7DataType below. String DataTypeName - The name of the data type XPN, PN, ST, NM, etc (from HL7DataType below). String DataTypeDescription - The description of the Data Type (from HL7DataType below).
HL7DataTypeDef HL7DataType - The HL7 Data Type of the field. All of the properties above are just values echoed from this object instance. Field Properties
String Description - The description of the field
Integer FieldNumber - The ordinal position of this field object in the parent HL7DataSegmentDef instance.
Boolean IsDefined - Is the field part of the EasyHL7 Vendor Definition loaded into the parent HL7DefinitionData class object.
String Notes - Any user notes.
String SegmentName - The SegmentName property from the parent HL7DataSegmentDef instance.
|
String ComponentDescription(Integer) Parameter 1: Integer - componentNumber. The ordinal position within the HL7DataFieldDef.HL7DataType of the component you wish the description for. Valid values are between 1 and HL7DataType.NumberOfComponents. Invalid values will return an "Undefined String Data" description.
HL7DataFieldDef Copy() - Returns a copy of this object instance.
|
