conversion agent libraries - sap · category. for example, ... conversion agent libraries 1....

26
SAP Conversion Agent by Itemfield Conversion Agent Libraries Version 4

Upload: buinhu

Post on 03-Jul-2018

238 views

Category:

Documents


0 download

TRANSCRIPT

SAP Conversion Agent byItemfield

Conversion Agent Libraries

Version 4

Legal Notice

Conversion Agent Libraries

Copyright © 2006 Itemfield Inc. All rights reserved.

Itemfield may have patents, patent applications, trademarks, copyrights, or other intellectual propertyrights covering subject matter in this document. Except as expressly provided in any written licenseagreement from Itemfield, the furnishing of this document does not give you any license to thesepatents, trademarks, copyrights, or other intellectual property.

The information in this document is subject to change without notice. Complying with all applicablecopyright laws is the responsibility of the user. No part of this document may be reproduced ortransmitted in any form or by any means, electronic or mechanical, for any purpose, without theexpress written permission of Itemfield Inc.

SAP AGhttp://www.sap.com

Publication Information:

Version: 4Date: September 2006

Conversion Agent Libraries Contents

i

Contents

1. Overview ...........................................................................................1What are Libraries? ............................................................................................................................... 1

2. Library Installation............................................................................1System Requirements ........................................................................................................................... 1Version Compatibility of Libraries .......................................................................................................... 1Where to Install...................................................................................................................................... 2Installation Procedure............................................................................................................................ 2

3. Using the Libraries ...........................................................................3Creating a Library Project ......................................................................................................................3Adding Library Files to an Existing Project ............................................................................................ 4Working with Library Projects ................................................................................................................ 4

Identifying the Startup Component.................................................................................................. 4Testing a Parser .............................................................................................................................. 5Testing a Serializer .......................................................................................................................... 7Understanding the IntelliScript ........................................................................................................ 7Editing Library Components ............................................................................................................ 8

Upgrading Library Versions ................................................................................................................... 9Deploying a Project as a Conversion Agent Service ............................................................................. 9

4. Descriptions of the Libraries .........................................................10AL3 Library .......................................................................................................................................... 10

AL3 Message Structure ................................................................................................................. 10XML of an AL3 Message ...............................................................................................................11

EDI Libraries........................................................................................................................................11EDI-X12 Validation ........................................................................................................................ 12EDI Message Structure ................................................................................................................. 13XML of an EDI Message ...............................................................................................................14

HIPAA Library ...................................................................................................................................... 14HIPAA Message Structure ............................................................................................................15XML of an HIPAA Message...........................................................................................................16

HL7 Library .......................................................................................................................................... 16HL7 Message Structure ................................................................................................................. 16XML of an HL7 Message...............................................................................................................17

Conversion Agent Libraries Contents

ii

SWIFT ................................................................................................................................................. 18SWIFT Message Structure ............................................................................................................18XML of a SWIFT Message ............................................................................................................19

Index....................................................................................................20

Conversion Agent Libraries 1. Overview

1

Overview

Conversion Agent libraries offer out-of-the-box transformation components whichare engineered for use with a variety of industry standards, such as HL7, EDI, AL3,and more.

Each industry-standard library contains a large number of predefined components(parsers, serializers, and XSD schemas), designed for use with industry standardand specific application messages. You can use these components to facilitate yourdata-transformation projects from industry standards to and from XML.

Library components can be valuable tools, which facilitate your work withConversion Agent. They offer the following advantages:

Saving time, because you can use predefined library components, rather thandesigning and implementing the components yourself

A standard implementation approach, which helps ensure consistency amongyour applications

Robust construction, supporting all the options and syntactic intricaciesunique to each industry-standard

This book describes how you can use the libraries and their components.

What are Libraries?

A library is a folder, which contains a family of fully configured Conversion Agentcomponents. Normally, a library contains parsers, serializers, and XSD schemas.As you create a project, you can import a library component (like a parser) insteadof building your own from scratch. You can use a library component as-is, or youcan modify it to meet your needs.

Each library is designed to work with a particular industry-standard. For example,the HL7 library contains project components for each of the message types or datastructures available in the HL7 messaging standard, which is used in medicalinformation systems.

The subfolders of the library folder contain Conversion Agent projects, whichdefine the parsers, serializers, etc. The projects are organized in subfolders bycategory. For example, the HL7 library contains folders called

Admission Discharge and Transfer MessagesAncillary Data Reporting

1

Conversion Agent Libraries 1. Overview

2

Control Section

and so forth. The Admission Discharge and Transfer Messages folder, in turn,contains subfolders for specific types of HL7 messages, such as

ADT_A01_Admit_a_PatientADT_A02_Transfer_a_Patient

The subfolders at the lowest level of nesting typically contain two ConversionAgent CMW project files—one for the parser and one for the serializer—and theassociated TGP script files and XSD schemas. You should not attempt to run thecomponents directly from the library folders. Instead, you should use ConversionAgent Studio to create projects in your workspace, and import the librarycomponents into them.

Conversion Agent Libraries 2. Library Installation

1

Library Installation

The libraries are supplied with the Conversion Agent setup. This section providesinstallation instructions.

Additional libraries or library components may be available for independent installation.For information, please contact SAP support.

System Requirements

The libraries require the following amount of hard-disk storage:

Library Approximate sizeon disk (MB)

AL3 9

EDI-AAR 8

EDIFACT 1780

EDI-UCS_and_WINS 7

EDI-VCS 11

EDI-X12 84

HIPAA 4

HL7 96

SWIFT 61

Version Compatibility of Libraries

We recommend that you use the libraries supplied with your current ConversionAgent version. This ensures that you have the most up-to-date copy of each library

2

Conversion Agent Libraries 2. Library Installation

2

component, which has been tested with the current Conversion Agent Engineversion.

On occasion, you may deliberately wish to use an older library version. You can dothis for compatibility with existing applications, which use components from theolder library. Conversion Agent Studio supports importing components from olderlibrary versions. As needed, the Studio upgrades the internal code of thecomponents for compatibility with the current Conversion Agent version, whilepreserving the data-transformation logic of older library version. For a discussionof the upgrade process and its limitations, see the chapter on Upgrading ConversionAgent Projects in the Conversion Agent Administrator's Guide.

Where to Install

You should install the libraries in your development environment, on theMicrosoft Windows computer where you run Conversion Agent Studio. You needthe libraries there, to create projects that use the library components. After youconfigure a project, you can deploy it as a service to a production environment thatruns Conversion Agent Engine.

You do not need to install the libraries on computers that run Conversion AgentEngine without the Studio. The deployed services, which run in the Engine, do notaccess the libraries at runtime. The services access only the copies of the librarycomponents, which you have imported into your projects.

Installation Procedure

To install the libraries, run the Conversion Agent setup. The setup prompts forwhich libraries and other Conversion Agent components to install. For detailedinstallation instructions, see the Conversion Agent Administrator's Guide.

The libraries are installed in the libraries folder of the Conversion Agentinstallation folder, by default:

c:\Program Files\SAP\ConversionAgent\libraries

Conversion Agent Libraries 3. Using the Libraries

3

Using the Libraries

You can use the components provided by the libraries in your Conversion Agentprojects. This chapter explains the procedures for doing this.

Creating a Library Project

You can create a new project that uses a library component such as a parser or aserializer. To do this:

1. In Conversion Agent Studio, select File > New> Project. This displays the NewProject wizard.

2. In the left pane of the wizard, select Conversion Agent. In the right pane,select Library Project.

3. On the next wizard page, enter a project name and specify a storage location.The default location is the Conversion Agent Studio workspace folder.

4. On the Select Message page, expand the tree to display the library name, thelibrary version, and the specific message or data structure you require.

For example, for a project that parses HL7, version 2.3, ADT_A01 messages,expand the tree to display:

HL7\2_3\Admission Discharge and Transfer Messages\ADT_A01_Admit_a_Patient

5. Select the specific parser or serializer component that you want to use in theproject. For example, select:

ADT_A01_Admit_a_Patient_Parser

6. Verify that you have chosen the correct component, and click Finish.

Conversion Agent Studio imports the library components, such as the CMW, TGP,and XSD files, to a new project. The Conversion Agent Explorer view displays thelist of existing projects.

3

Conversion Agent Libraries 3. Using the Libraries

4

Adding Library Files to an Existing Project

Optionally, you can incorporate library components in an existing ConversionAgent project, rather than create a new project. To do this, we recommend thefollowing procedure:

1. Create a new library project that contains the component to be added (seeCreating a Library Project above).

2. In the Conversion Agent Explorer:

a. Expand the existing project, to which you want to add the librarycomponent.

b. To add a parser or serializer, right-click the Scripts node and choose AddFile. To add an XSD Schema, right-click the XSD node instead.

c. Browse to the newly-created library project, select the TGP script file or theXSD file that you want to add, and click Open. Conversion Agent Studiocopies the file to the existing project.

3. Repeat step 2 for any additional TGP or XSD files that you want to add.

Please note that there may be dependencies between the files. For example, aTGP file that defines a main parser typically requires an XSD file, whichdefines the XML schema of the parser output. In addition, it may requireanother TGP file that defines secondary parsers.

If you are not sure exactly which TGP or XSD files are required for a particularcomponent, it is safest to add all of them. Unused TGP or XSD files have noeffect on your project.

4. You may then delete the new library project, if you don't need it for otherpurposes.

Working with Library Projects

You can display, edit, and test library projects in Conversion Agent Studio, in thesame way as other Conversion Agent projects. For instructions, see Getting Startedwith Conversion Agent and the Conversion Agent Studio User's Guide.

The following are some hints on operations that you may wish to perform.

Identifying the Startup Component

Library projects typically have a complex structure, with numerous componentsdefined at the top level and nested levels of the IntelliScript script. This is requiredto support the complexity that can arise in the industry-standard messages that thecomponents process.

Each project has a startup component, which is the main component that ConversionAgent activates when you run the project. You can identify the startup component

Conversion Agent Libraries 3. Using the Libraries

5

by opening the Run > Run command. The Choose Startup Component dialog boxdisplays the name of the startup component.

If for any reason you need to change the startup component, you can do thefollowing:

1. Open the TGP script file in the IntelliScript editor.

2. Right-click the desired component and select Set as Startup Component.

Testing a Parser

You can test the parser operation on a source document in the following ways.

Method 1: Running the Parser on an Example Source Document

1. Open the TGP script file of the project in an IntelliScript editor.

2. Identify the startup component, as described above (see Identifying the StartupComponent. Above).

3. Find the definition of the startup component in the IntelliScript. In mostlibrary projects, it is the first component in the TGP file.

4. Expand the IntelliScript tree, and edit the example_source property of thecomponent. Assign it a value of LocalFile.

5. Nested within the LocalFile component, browse to the desired sourcedocument. For example, to test an HL7 ADT_A01 parser, browse to a file thatcontains an ADT_A01 message.

6. The document is displayed in the example pane of the IntelliScript editor.

If the example pane isn't visible, choose IntelliScript > Both on the menu. If thedocument isn't displayed, right-click the parser name in the IntelliScript, andchoose Open Example Source.

7. Optionally, use the IntelliScript > Mark Example command to highlight thedata that the parser finds in the document.

If the document conforms to the industry-standard message structure, then thelibrary parser should find all the data in the document. Therefore, the MarkExample command should highlight the entire document.

If the document's structure has been customized, portions of it may not behighlighted. You should consider editing the parser to process the customstructure (see Editing Library Components below).

Note: For an explanation of the color coding, see the book Conversion AgentStudio in Eclipse.

8. Use the Run > Run command to activate the parser.

9. The Events view displays a log of the operation. To interpret the log, see thechapter on Running and Testing Projects in the Conversion Agent Studio User'sGuide.

Conversion Agent Libraries 3. Using the Libraries

6

10. To view the parser output, double-click the Results/Output.xml file in theConversion Agent Explorer.

The library parsers are configured in a way that does not require an example sourcedocument. When you finish testing, you can remove the example source if you wish.Leaving the example source has no effect on the library data transformation at runtime.

Assigning the example_source property of a parser

Output of a parser

Method 2: Displaying the Parser Results Graphically1. Open the TGP script file of the project in an IntelliScript editor.

2. Click IntelliScript > Test Document and navigate to a source document. Forexample, to test an HL7 ADT_A01 parser, browse to a file that contains anADT_A01 message.

3. The document is displayed in the example pane of the IntelliScript editor. Usethe IntelliScript > Mark Example command to highlight the anchors that theparser finds in it.

Conversion Agent Libraries 3. Using the Libraries

7

A parser and test document, with the anchors highlighted

Testing a Serializer

To test a serializer, run the project. At the prompt, select the desired input XMLdocument.

Of course, the XML must conform to the XSD schema that is defined in the project.An easy way to generate an XML document conforming to the schema is to create alibrary parser project, and run it on a source document. The output of the parser isan XML document, which you can use as the test input of the serializer.

Understanding the IntelliScript

If you need to edit or troubleshoot the IntelliScript script, here are some tips thatcan help you understand its configuration.

For a parser:

1. Open the parser in an IntelliScript editor.

2. Display an example source document in the example pane of the IntelliScripteditor, and run the IntelliScript > Mark Example command (see Testing aParser above).

3. Right-click one of the highlighted anchors, and choose View Instance.

Conversion Agent Studio highlights the portion of the IntelliScript that definesthe anchor.

4. Right-click one of the anchors in the IntelliScript, and choose View Marking.

Conversion Agent Studio highlights the anchor in the test document.

For a parser or a serializer:

1. Open the parser or serializer in an IntelliScript editor.

2. Run the parser or serializer on a source document (see Testing a Parser orTesting a Serializer).

3. In the Events view, expand the Execution node of the event log.

4. Double-click one of the events, for example, a Marker event.

5. Conversion Agent Studio highlights the anchor or component that caused theevent, in both the IntelliScript pane and the example pane.

Conversion Agent Libraries 3. Using the Libraries

8

Editing Library Components

After you import a library component, you can use it as-is, or you can edit it tomeet your requirements. Editing the copy of a component that you import to aproject has no effect on the original component, which exists in the library.

Here are some examples of editing operations, which you can perform on librarycomponents.

Changing a Field from Optional to MandatoryA messaging standard may define a particular field as optional. In yourapplications, you may require that the field be present.

To support this, you can edit the library components, changing the designation ofthe corresponding anchor from optional to mandatory. If you do this, and an inputlacks the anchor, Conversion Agent reports an failure. (This does not necessarilystop the processing of the rest of input; for an explanation, see Running and TestingProjects in the Conversion Agent Studio User's Guide.)

Conversely, a standard may consider a field to be mandatory, but yourapplications may permit it to be missing. In the library components, you canchange the corresponding anchor from mandatory to optional. If an input lacks theanchor, Conversion Agent does not report a failure.

To change an anchor from optional to mandatory, or vice versa:

1. Open the library component in an IntelliScript editor.

2. Identify the anchor that corresponds to the message field (see Understandingthe IntelliScript above).

3. Click the >> icon next to the component name to display its advancedproperties.

4. Edit the optional property of the component.

Editing the optional property of an anchor

Editing a Field DelimiterFor a parser, the input data fields can be defined by delimiters such as spaces,commas, or tabs, or by other means such as positional offsets. To modify the data

Conversion Agent Libraries 3. Using the Libraries

9

fields or the delimiters between them, you can edit the following locations of theparser configuration:

The format property of the parser (see Formats in the Conversion Agent StudioUser's Guide)

The anchors, which refer to specific locations in the input document (seeAnchors in the Conversion Agent Studio User's Guide).

Adding a SegmentSome messaging standards, such as HL7 or EDI, group data fields into units suchas segments. You may wish to modify a library component to support a customsegment.

One way to do this is by identifying a portion of the IntelliScript that processes asimilar segment. Copy and paste the IntelliScript components, and edit as required.You should edit the XSD schema to support your new definition.

Using a Proprietary XML Schema

You may need to transform an industry-standard message to a proprietary XMLschema, which differs from the library schema. You can do this by using a libraryparser to transform the message to the library schema. Then, configure a mapperthat transforms the XML to the proprietary schema (see Mappers in the ConversionAgent Studio User's Guide).

Documenting Your Editing

We highly recommend that you document any editing you perform on the librarycomponents. The documentation may be essential if you later update the librarycomponent and need to reproduce your editing.

Upgrading Library Versions

After you import a library component to a project, there is no link between theproject and the library. If you install a new version of the library, the project is notautomatically updated.

If you wish to update the project, you should re-import the component. Youshould test the project for any differences in behavior.

Deploying a Project as a Conversion Agent Service

When you finish testing, you can deploy the project as a Conversion Agent service,which runs in Conversion Agent Engine.

For instructions, see Deploying Conversion Agent Services in the Conversion AgentStudio User's Guide. For information on running the services, see the ConversionAgent Engine Developer's Guide.

Conversion Agent Libraries 4. Descriptions of the Libraries

10

Descriptions of the Libraries

This chapter briefly describes the libraries that are available for use withConversion Agent.

AL3 Library

AL3 is a messaging standard that is used in the insurance industry. AL3 wasdeveloped and is maintained by the Association for Cooperative OperationsResearch and Development (ACORD), which is a nonprofit insurance association.Typical AL3 messages handle the transmission of insurance-related items, such aspolicies and claims.

AL3 is based on the EDI standard. For more information, see:

http://www.acord.org/standards/al3.aspx

AL3 Message Structure

The following illustrates a segment of a typical AL3 message, which deals withwatercraft insurance.

1MHG176 IBM716ESTEDL ??????????????????231225 AFW50270000010406111100051 702004061111000512TRG212 70 3P PBOAT FMG0001040611 040511 PCH20040611200405112TCG1352TAG212 00003278 P06260822WTRP PRODUCER2ACI200 Stephen F. Newman, Inc.1600 Delaware Avenue, Suite 999 Seneca NY14999168371685633875BIS172 B10001 P Ester W. Powell??????????????????????????????00003278??????????????????????9BIS168 B10001 3672 Almond driveHopatka NY14888 71660901665ISI183 B200015BISB10001 ?? ?????????? ????????????????5SNG117 B200015BISB10001 01DECJane W. Fieldstone??1???????????????????

4

Conversion Agent Libraries 4. Descriptions of the Libraries

11

5BPI285 F100015BISB10001 P06260822 ??????????FISH 040511050511

AL3 has a positional format which requires that all data, even if missing, berepresented. The use of question marks, displayed in the above message, is aconvention for representing missing data.

XML of an AL3 Message

The following is the beginning of the AL3 structure of the message shown above,after it has been parsed by a Conversion Agent library component.

EDI Libraries

EDI (Electronic Data Interchange) is a standard format for exchanging businessdata between trading partners, firms doing business and exchanging informationover data networks such as the Internet.

An EDI message contains a string of data elements, each of which represents asingular fact, such as a price, product model number, and so forth, separated by adelimiter. The entire string is called a data segment. One or more data segmentsframed by a header and trailer form a transaction set, which is the EDI unit oftransmission (equivalent to a message). A transaction set often consists of whatwould usually be contained in a business form, such as:

A purchase order

An invoice

A customer balance statement

Conversion Agent Libraries 4. Descriptions of the Libraries

12

Conversion Agent provides libraries such as the following, which support EDI-based messaging standards. The largest library is for EDIFACT, which is an EDIstandard maintained by the United Nations. Some of the other libraries are forEDI-based standards used in specific industries.

EDI-AARLibrary supporting the EDI standard of the American Association ofRailroads. For information, see:

http://www.ismrif.org/infostnd/ediguide.html

EDIFACTLibrary supporting the international EDI standard maintained by the UnitedNations. For information, see:

http://www.unece.org/trade/untdid/welcome.htm

EDI-UCS_and_WINSLibrary supporting the UCS (Uniform Communication Standard) and WINS(Warehouse Information Network Standard), which are used in the groceryand warehouse industries, respectively. For information, see:

http://www.uc-council.org/ean_ucc_system/stnds_and_tech/ucs.html

EDI-VICSLibrary supporting the VICS (Voluntary Interindustry Commerce Solutions)standard, used in the retail industry. For information, see:

http://www.vics.org/home

EDI-X12Library supporting X12 EDI, which is a US standard for business transactions.For information, see:

http://www.x12.org

The AL3 and HIPAA standards, described elsewhere in this chapter, are also EDI-basedmessaging standards. We have listed them separately for convenience of reference, becausethe library names do not begin with EDI.

EDI-X12 Validation

The EDI-X12 library contains two versions of the library directories, which supportdifferent levels of input validation.

Library Directories with Validations

The library directories whose names end with the suffix _with_validationsprovide schemas and parsers that validate their input against the X12 EDIstandard.

Validation errors do not cause a parser to fail. Instead, the parser labels its XMLoutput with an error-code attribute, which has the value specified in the standard.

Conversion Agent Libraries 4. Descriptions of the Libraries

13

For example, if a mandatory field is missing, both the field and the segmentcontaining it are labeled with error codes. The output may look like this:

<LX segErrorCd="8"><R01 errorCd="6">01.1</R01>

</LX>

EDI-X12 AcknowledgmentsThe X12 EDI standard provides for acknowledgments (known as EDI 997acknowledgments), which confirm the receipt and validity of an EDI transaction.

If you use the _with_validations library components, you can configure a datatransformation to generate the acknowledgments automatically. To do this, thetransformation can run a predefined parser on the XML output of the librarytransformation. The output of this parser is the acknowledgment, including asummary of the validation errors.

For more information, please contact SAP support.

Other Library Directories

The other EDI-X12 library directories, whose names lack the _with_validationssuffix, provide a lesser degree of validation.

For example, the schemas define all fields as optional. Nevertheless, the parserscheck for mandatory data.

The parsers implement this by means of the optional anchor property. If a field ismandatory according to the X12 EDI standard, the optional property of thecorresponding anchor is deselected. If a mandatory field is missing, this causes theparser to fail, and it does not generate XML output. The error is reported in theevent log.

EDI Message Structure

The following illustrates a Vessel Content Details transaction, which is a typicalX12 EDI transaction. The structure contains segments and fields at various levels ofnesting. We have introduced line breaks to improve the clarity a little.

ST*109*0001~B4*15*0*2*19960515*1424*Statu*Equi*Equipment*D*XXXX*Location Identifier*A*3~N9*01*Reference Identification*Free-form Description*19960515*1424*01*01^Reference Identification^01^Reference Identification^01^Reference Identification~Q2*X*XX*19960515*19960515*19960515*10045*21392*A*Flight/Voy*01*Reference Identification*B*Vessel Name*10691*B*E~V9*AAD*Event*19960515*1424*City Name*XX*XX*001*XXXXXX*25946*Tr*Free-Form Message*01*25878*XXXXXX*717*437*272*2457*12935~R4*1*A*Location Identifier*Port Name*XX*Terminal Name*Pier*XX~DTM*001*19960515*1424*01*CC*Date Time Period~V9*AAD*Event*19960515*1424*City Name*XX*XX*001*XXXXXX*4685*Tr*Free-Form Message*01*13647*XXXXXX*813*605*52*20035*12104~N9*01*Reference Identification*Free-form Description*19960515*1424*01*01^Reference Identification^01^Reference Identification^

Conversion Agent Libraries 4. Descriptions of the Libraries

14

01^Reference Identification~SG*2*001*XX*19960515*1424*01~SE*11*0001~

Some of the other EDI-based standards have rather different message appearances,but all share the segment-field-delimiter structure.

XML of an EDI Message

The following is the beginning of the XML structure of the message shown above,after it has been parsed by a Conversion Agent library component.

HIPAA Library

HIPAA is a messaging standard for administrative and financial health-caretransactions. Its purpose is to simplify the movement of health-care transactions byproviding a uniform standard to replace the hundreds of message formats thatpreviously existed.

HIPAA is based on the X12 EDI standard. For more information, see:

http://aspe.hhs.gov/admnsimp/faqtx.htm

http://www.hipaa.org

Conversion Agent Libraries 4. Descriptions of the Libraries

15

HIPAA Message Structure

The following illustrates the Benefit Enrollment and Maintenance transaction,which is a typical HIPAA transaction. It is used by a sponsor of the insurancecoverage, to provide initial benefit enrollment information to payers, and to updatethe information as needed.

ISA*00**00**ZZ*EDI0021*ZZ*54828*032403*1253*U*00405*000000905*1*T*:GS*BE*EDI0021*54828*20030324*1253*5*X*004050X125~ST*834*26608~BGN*00*26608*20021226*1200*ES*2~N1*P5*UES CORP*FI*111222333~N1*IN*UNITED HEALTHCARE*FI*777888999~INS*Y*18*021*28*A***FT~REF*0F*851027461~REF*1L*199301~DTP*356*D8*20021219~NM1*IL*1*CANOE*NANCY*A*MRS.*I*99*99999999~PER*IP**HP*4104038790*WP*4104035500*EX*5684~N3*9999 ROSE VILLAGE*FIRST FLOOR~N4*FLOWERS*ND*999995*CY*WHEELING~DMG*D8*19740801*F*M~HD*021**PPO*PLAN COVERAGE DESCRIPTION*ESP~DTP*348*D8*20021219~SE*16*26608~ST*834*26608~BGN*00*26608*20021226*1200*ES*2~N1*P5*UES CORP*FI*111222333~N1*IN*UNITED HEALTHCARE*FI*777888999~INS*N*01*021*28*A***FT~REF*0F*948047150~REF*1L*199301~

HIPAA messages consist of various segments, where each segment begins with anidentifying code. Some of the identifying codes contained in this message are:

Identifying Code Description

ISA Interchange Control header

GS Functional Group Header segment

ST Header segment

BGN Beginning segment

N1 Sponsor name

SE Trailer segment

Conversion Agent Libraries 4. Descriptions of the Libraries

16

XML of an HIPAA Message

The following is the beginning of the XML structure of the message shown above,after it has been parsed by a Conversion Agent library component.

HL7 Library

HL7 is a messaging standard for the health services industry. It is used world-widein hospital and medical information systems.

Conversion Agent currently supports HL7 version 2.3

For a brief explanation of the HL7 standard, see the tutorial on Defining an HL7Parser in Getting Started with Conversion Agent. For detailed information, see theHealth Level 7 web site, http://www.hl7.org.

HL7 Message Structure

The following illustrates a Patient Admission Message, a typical HL7 message. Wehave introduced line breaks and empty lines for readability.

MSH|^~\&|ADT1|MCM|FINGER|MCM|198808181126|SECURITY|ADT^A01|MSG00001|P|2.3.1

EVN|A01|198808181123

PID|1||PATID1234^5^M11^ADT1^MR^MCM~123456789^^^USSSA^SS||SMITH^WILLIAM^A^III||19610615|M||C|1200 N ELM STREET^^JERUSALEM^TN^99999?1020|GL|(999)999?1212|(999)999?3333||S||PATID12345001^2^M10^ADT1^AN^A|123456789|987654^NC

Conversion Agent Libraries 4. Descriptions of the Libraries

17

NK1|1|SMITH^OREGANO^K|WI^WIFE||||NK^NEXT OF KIN

PV1|1|I|2000^2012^01||||004777^CASTRO^FRANK^J.|||SUR||||ADM|A0

The message is composed of segments, which are separated by line breaks. Eachsegment has a three-character label, such as MSH (message header) or PID (patientidentification). Each segment contains a predefined hierarchy of fields and sub-fields, which are delimited by the characters immediately following the MSHdesignator (|^~\&).

For example, the patient's name (Smith^William^A) follows the PID label by five |delimiters. The last and first names (Smith and William) are separated by a ^delimiter.

The message type is specified by a field in the MSH segment. In the above example,the message type is ADT, subtype A01, which is an Admit a Patientmessage.

XML of an HL7 Message

The following is the beginning of the XML structure of the message shown above,after it has been parsed by a Conversion Agent library component.

Conversion Agent Libraries 4. Descriptions of the Libraries

18

SWIFT

SWIFT is a messaging standard for the financial industry.

Some examples of SWIFT messages are:

Request for Transfer

Request for Stop Payment of a Cheque

Direct Debit and Request for Debit Transfer Message

Multiple Interbank Funds Transfer

For more information, see:

http://www.swift.com/

SWIFT Message Structure

The following illustrates a Request for Transfer message, which is a typical SWIFTtransaction.

{1:F01DEUTDEFFEDIX0317000005}{2:I101ABCDEFGHIJKAU1020}{4::20:Sender Ref Dom01:21R:Customer Ref:28D:1/1:50L:Instructing Party:50H:/00190020974010046074DB SPAIN:30:030120:21:REFF21-1:32B:EUR1,00:57D:/ES999999999Madrid:59:/64930056505DB SpainBarcelona:70:First payment11:71A:OUR:21:REFF21-2:32B:EUR2,00:57D:/E999999999Madrid:59:/64930056506DB SpainBarcelona:70:Second payment2:71A:OUR

Conversion Agent Libraries 4. Descriptions of the Libraries

19

XML of a SWIFT Message

The following is the beginning of the XML structure of the message shown above,after it has been parsed by a Conversion Agent library component.

Conversion Agent Libraries Index

20

Index

A

AARlibrary, 12

AL3library, 10

C

Conversion Agent servicelibrary projects, 9

D

delimitersin library components, 9

E

EDIlibraries, 11

EDI-AARlibrary, 12

EDIFACTlibrary, 12

EDI-UCS_and_WINSlibrary, 12

EDI-VICSlibrary, 12

EDI-X12library, 12validation, 12

H

HIPAAlibrary, 14

HL7library, 16

L

librariesadding components to projects, 4Conversion Agent, 1editing components, 8installation, 1system requirements, 1

upgrading versions, 9version compatibility, 2

library projectcreating, 3

O

optional fieldin library components, 8

P

parsertesting library, 5

S

segmentsin library components, 9

serializertesting library, 7

startup componentin library projects, 4

SWIFTlibrary, 18

system requirementslibraries, 1

U

UCSlibrary, 12

V

VICSlibrary, 12

W

WINSlibrary, 12

X

X12 EDIlibrary, 12