How the C0 Columns are implemented
<< Click to Display Table of Contents >> Navigation: »No topics above this level« How the C0 Columns are implemented |
See Also: Handling Special Fields
In your database schema segment data tables you will note that for every HL7 field there is a C0 column. For instance in the <prefix>_Segment_PID_A table HL7 field 5 (the patient name) has the normal component value columns:
•PID_F5_C1 (Component 1, the last name)
•PID_F5_C2 (Component 2, the first name)
•PID_F5_C3 (Component 3, the middle name)
•etc., etc.
There is also a C0 column (PID_F5_C0) which is defined as a 'Text' SQL data type (allownulls = True). There is a C0 column defined for every HL7 data field. The C0 columns are used for special situations where the normal UltraPort Schema table structure is inadequate. It is used differently for processing INBOUND HL7 messages than OUTBOUND HL7 messages.
When importing HL7 messages the inbound processor will ALWAYS assign a value of NULL to the C0 columns unless one of the following conditions apply: 1.The HL7 field being imported contains an HL7 REPEATING field 2.The HL7 field being imported contains a component value which has SUB-COMPONENT data values 3.The HL7 field being imported contains a component value which is too large to fit into the appropriate database column (Applicable only if enabled in the Data Truncation section of the schema profile)
IF one of these conditions apply then the RAW HL7 value for the entire field will be placed in the C0 column and only the first instance/truncated value will be placed in the appropriate database schema columns.
IMPLICATION: Any process which extracts data from the schema tables should insure that they check the C0 column on those fields which they need to extract and which might meet one of the conditions listed above for values. That extraction process will have to manually parse the raw HL7 data itself.
For more information see Handling Special HL7 Fields
|
When you create HL7 messages in the schema tables you should be mindful of whether you need to create any HL7 Repeating Fields or if you have any individual components which will have sub component values. If you are NOT SURE whether you need to do this or not, don't worry too much about it. The general rule with HL7 is "If you don't know what it is, the odds are that you don't need it".
If you DO need to create a repeating field or subcomponent value, etc. Then that is where you need to use the C0 column. You should: 1.Place the FIRST VALUE instance only in the regular component data columns (.._C1, .._C2, etc.) 2.Construct a RAW HL7 value with the entire HL7 field and place that in the appropriate C0 column for that field. 3.Make sure that you ONLY do this for fields which meet this criteria, all other C0 columns should contain no value
When EXPORTING HL7 messages the outbound processor assembles the HL7 messages from the segment data tables. If it encounters a C0 column in that table that IS NOT EMPTY then it will use the value in the C0 column to populate the HL7 message field, otherwise it assembles the HL7 field from the individual component data columns (.._C1, .._C2, etc.)
For more information see: Handling Special HL7 Fields and HL7 Escape Rules |