How vendor definitions impact the Schema Engine
<< Click to Display Table of Contents >> Navigation: Database Schemas > HL7 Vendor Definitions > How vendor definitions impact the Schema Engine |
Brief Overview: Understanding what the HL7 Vendor definition is, what it contains and how it affects the way that your Schema Engine works is important. It does require a basic understanding of what HL7 is and how it works. HL7 messages are made up of HL7 message segments. HL7 message segments are made up of HL7 fields, and the contents of an HL7 field is determined by its HL7 data type. HL7 also has many different "versions". At the time of this writing about 99% of all HL7 interfaces worldwide use HL7 versions in the 2.2 to 2.6 range. Of all of those interfaces about 80% of HL7 interfaces worldwide still use HL7 version 2.3. It's also important to know that by and large EVERY HL7 version in 2.xx is a superset of the prior version. So version 2.3 is actually version 2.2 + more, version 2.4 is actually version 2.3 + more, and so on.
This is an important thing to understand because it means that the only thing that truly differentiates the different versions of HL7 is, in large part, the physical data that the message contains. So knowing that it means that you can create an HL7 message using say the HL7 Version 2.2 definition and as long as it doesn't contain any data elements which are both specific to AND required by HL7 versions 2.3 and 2.4 you could simply place "2.3", "2.3.1" or "2.4" in the "Version" field of the MSH segment (MSH Field 12) of the message and send it to a trading partner who was expecting a version 2.3, 2.3.1, 2.4 message from you and they would be none the wiser.
Creating Schema Tables: When you create your database schema profiles (see Database Schemas) you select which HL7 Vendor/Version you wish to use as the basis for that schema. When you then use the Schema Engine to generate your schema tables (see Creating Schema Tables) it will analyze the HL7 Vendor you chose to determine which segment data tables need to be created as well as which columns go into those tables.
To examine this further let's look at how the Schema Engine would generate ONE particular part of ONE particular segment data table in an extract from a segment report created by the UltraPort Schema Browser. In this example we're looking at the Patient Name field in the PID segment data table from a schema generated using the Default version 2.3 vendor definition that ships with the schema engine.
In HL7 Version 2.3 the Patient Name field (field #5) of the PID segment is an HL7 Data Type XPN (extended person's name). The XPN data type in version 2.3 is made of 7 different components (see below).
HL7 Data Type: XPN - Extended person name (7 Components)
Category: Demographics
Component 1[ST] family name (last name)
Component 2[ST] given name (first name)
Component 3[ST] middle initial or name
Component 4[ST] suffix (jr, sr, etc)
Component 5[ST] prefix (Mr, Mrs, Dr etc)
Component 6[ST] degree (MD, PHD etc)
Component 7[ID] name type code
When the Schema Engine generated the segment data tables it created 7 columns in the PID segment table (PID_F5_C1 through PID_F5_C7) see below.
============================================================
HL7 Field #5 [XPN] Patient Name
[PID_F5_C1] [ST] family name (last name)
[PID_F5_C2] [ST] given name (first name)
[PID_F5_C3] [ST] middle initial or name
[PID_F5_C4] [ST] suffix (jr, sr, etc)
[PID_F5_C5] [ST] prefix (Mr, Mrs, Dr etc)
[PID_F5_C6] [ST] degree (MD, PHD etc)
[PID_F5_C7] [ID] name type code
============================================================
If you have a trading partner who is either sending me HL7 messages or needs me to send them HL7 messages which contain MORE than this you can manipulate the Schema Engine by altering the vendor definition accordingly.
Problem Scenario: A trading partner has customized their HL7 Version 2.3 specification and added an extra component to ONLY the patient's name. They have added an 8th component "Hair Color" and you need to be able to both receive HL7 messages from them AND produce HL7 messages to send to them which will include this 8th component.
Solution: You need to change your vendor definition. IMPORTANT NOTE: If you need to change your vendor definitions we STRONGLY recommend that you do not change any of the "Default" definitions which ship with the Schema Engine, but rather create your own (see Vendor Definitions). You need to create a NEW HL7 data type. Your first instinct might be to just edit the XPN data type and add the 8th component, but if you did that then the Schema Engine would generate the _C8 column for EVERY HL7 field which is a data type XPN (and there are lots of them). To create a new data type:
Step 1: Select View / Edit HL7 Data Types from the 'Tools' menu of the Vendor Manager window.
Step 2. This opens up the HL7 Data Types Window select New Data Type from the 'File' menu to open the New Data Type window and select 'Clone an Existing Data Type' from the 'File' menu and choose XPN from the popup window. Now you have an exact copy of the XPN data type to start with just type in your own name (example uses ZPN), description, instructions, etc and move on to step 3.
Step 3: Click the 'Add Component' button to add component #8 Hair color and then click 'Save Changes' and return back to the vendor manager main window. You have now created a custom data type called ZPN which is an exact copy of XPN except that it has 8 components instead of 7. All that's left to do is assign that data type to the Patient's name field of the PID segment. To get to the Patient Name field of the PID segment click the HL7 Segments button on the Vendor Manager main window to bring up the segments list. In the segments list scroll down to the PID segment and select 'Properties' (make sure that 'Allow Updates' is checked) to open up the PID segment list. In the segment list scroll down to field #5 and again select 'Properties' to open up the Add/Edit HL7 field window.
Step 4: Next to the HL7 Data Type click the 'Click to Change' button and select your new ZPN data type from the data types list and then click 'Save Changes'.
Step 5: Now you are completely done. You can now have the Schema Engine create your schema tables and you will notice that they're now quite different than the example at the top of the page. See below.
HL7 Data Type: ZPN - Custom Patient Name (8 Components)
Category: Demographics
Component 1[ST] family name (last name)
Component 2[ST] given name (first name)
Component 3[ST] middle initial or name
Component 4[ST] suffix (jr, sr, etc)
Component 5[ST] prefix (Mr, Mrs, Dr etc)
Component 6[ST] degree (MD, PHD etc)
Component 7[ID] name type code
Component 8[ST] hair color
When the Schema Engine generated the segment data tables it created 7 columns in the PID segment table (PID_F5_C1 through PID_F5_C7) see below.
============================================================
HL7 Field #5 [ZPN] Custom Patient Name
[PID_F5_C1] [ST] family name (last name)
[PID_F5_C2] [ST] given name (first name)
[PID_F5_C3] [ST] middle initial or name
[PID_F5_C4] [ST] suffix (jr, sr, etc)
[PID_F5_C5] [ST] prefix (Mr, Mrs, Dr etc)
[PID_F5_C6] [ST] degree (MD, PHD etc)
[PID_F5_C7] [ID] name type code
[PID_F5_C8] [ST] name type code
============================================================