Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ECMAP -Key and Match Field

Status
Not open for further replies.

tomallred

IS-IT--Management
Sep 5, 2003
9
0
0
US
Hi,

I am trying to create an outbound map flow for an input flat file. Since the records are out of sequence, I have to opt the Multiple file option. But when I try to generate the map now, it says that keyfield and match field are required.

My question is, what do you mean by key field and match field ? How can I create these fields ? What if there is no field that I can match one record type with another ? Is there any online help that would help me understand better ?

Any help would be greatly appreciated!

Thanks
Tom.
 
I'm not sure what you mean when you say the records are "out of sequence", but I can address your question.

How do you know one record is a different type than another record?

If they are different records because of different values that are in the same field on each record, well, that's your record type field. For example, I have a file where one record has an "H" in a certain column to denote a header record and another record has an "L" to denote a line record. So, in my map, I have one record definition where I flagged that field under field properties/options as RECORD-TYPE="H"; then I copied that same record definition, gave it a different name, and changed the field properties on the same field to RECORD-TYPE="L". Per se, I do not have any fields defined as "Key" fields, just "record type" fields, but when I generate the map with the "Multiple Files" option, it will generate just fine.
If they are different records because of different fields -that is, in record A, it's data in the field in column 6, but in record B, it's the data in the field in column 12 - well, then I have nothing to suggest but you massage the file, putting in some kind of record type prefix on each record, before it hits the mapper.

I hope my explanation helped a little.

 
Hi Coulter,

Thanks for the reply. What I meant by saying " out of sequence" is, the order of the EDI message expected is not in sequence with the input file.

I tried the way you mentioned, by just specifying the Record Type in the Field/Options tab. But when I try generating the Map with the Multiple file option checked, I get error messages like

"Flow Table: Level 100
Current Record has blank field: (Record Name)"

Flow Table: Level 105
Current Record has blank field: (Record Name)"

Flow Table: Level 110
Current Record has blank field: (Record Name)

............ "

How do I solve this issue ? I was assuming that this error was due to the fact that key field and match field was not specified in the Outbound MapFlow/Properties screen.


I look forward to your answer.

Thanks

Tom
 
Tom,
I just had a brainstorm, so see if this helps.

Double-click on each flow level to bring up it's properties.
On your header or highest level, you should have in the Records box, Current, what input record is your header (select it from your list of records). Then off to the right of that, for Key field, you should probably have a "+" which means (according to the User Reference pg 370 for version 2.9) that you have no key field that is common to all records and so the software will automatically append keys to the records so they are processed correctly. Parent record will be grayed out because it doesn't apply.
On each level below that, you will have Current Record box filled in with the type of record that should cause the flow break and it's parent record type (probably the header record you just looked at). Off to right of both of these should be a "+" again.
Each level's record information will be like this, only differing in Current Record name and, maybe, the Parent Record name.
Try that and let me know how it works.
 
Coulter,


I tried giving a + in the key and match field where applicable, and when I after running the map, the EDI View displays only the transaction header and trailer statements.

Probably one thing that I didn't make it clear in my question is, I do have one field that is common in all my different type of records. But even if I specify this field as the key field and match field, I see only the transaction header and trailer in the EDI View. No details are displayed.

The map flow that was generated was automatic. I haven't made any adjustments to any values.

Is my problem clear now Coulter ?

Thanks

Tom

 
Tom,
No, that doesn't make it clearer, unfortunately. So I'll backup and ask some basic questions to see if something rings a bell.
Is this common field the same value on all the records or does it have different values for each of the different types of records?
Is the file going to produce 1 transaction or multiple transactions? If multiple transactions, What information in the record do you break on so the map knows to start a new transaction?
Also you said the map flow was generated automatically. Well, what do you see when you look at flow? What levels are between header and trailer, and what is their relationship?
I know, I know, a lot of basic questions. It's just that I have learned from experience that if you make a mistake setting up a map initially - file and record definitions and flow are the worst culprits - you'll have a headache and a half down the road and, sometimes, it's easier to start the map from scratch again correctly than get it corrected after it's setup.
 
Coulter,

To answer your questions,

1. The common field has different values on the different type of records.
2. The file produces multiple transaction. Since the file contains Claim Information, whenever a Provider ID changes, a new transaction is created.
3. I am not clear what you meant by asking " what do I see when you look at flow."
4. The levels have a parent/child/sibling relationship.

When you say " mistake during setting up map initially", what exactly do you mean ? What kind of mistake do you think would normally happen ? Probably, this might be where I am caught.

As far as what I have done is, I mapped the flat file fields to the EDI Fields. Then I tried creating the map flow. I have not made any change to the levels or the depth or the loop. Neither have I made any change to the automatically created flow. I presume, ECMAP does the adjustments automatically.

Does this help Coulter ?

Thanks
Tom


 
Tom,
I'm running out of things to suggest, but I'll give you some things to look at, some potential gotchas.
On your flow diagram, is Options at the top set to Multiple files?
Referring to your answer to question 2, is it on every record?
If that's not the same as your Trading Partner ID, I'm guessing you need to define that field in your record structure as a key field. Then on the header level of your flow you would note it as the key field. Every level under the header you would note the child record's field that will be same as the header as the Key field and then for match field would be the field that's on the header record.
If it's the same as your Trading Partner ID, then you just flag the field in the record definition as just that, then use the "+" on the flow properties' key and match fields.

Referring to your answer to question 3, I was trying to get at the general parent/child/sibling structure. If it's a complicated structure, then I would double-check that the levels and their associated segments are logically assigned. That repeating levels are flagged as that; ditto for mandatory segments. Also, anything that belongs to the header is on a level under the header (Parent level would be header level). Anything for detail you would probably have as a child of one of the children of the header or the header itself. For looping levels, Next level would be the same level. For one-time only levels, Next level would be next logical level down except for the summary level when the next logical level is Header level. Additionally, Break level could be a parent level or the next level down depending on what you want the map to do when there are no more records of that type are found, when the I/O rule for that level fails.
I'd like to give you hard and fast rules for flow, but it all depends on the situation and what you want to happen. Early on, many of the problems I had, I had with flow, so I sympathise. I have never had ECMap generate a flow that I didn't have to tinker with except, perhaps, for compliance maps where it had to test everything. I also tinker with levels and flow before I generate the map; adding a new level in later never seemed to work right.
Well, this is a long-winded answer, but it's just that I can't pinpoint what your problem is. If I'm no help, try Sybase; they'll ask you to send them your map, but they're good at diagnosis usually.
 
Coulter,

1. I have checked the Multiple File Option in the Flow Diagram.

2. Provider ID field is not present in every record. Whenever the Provider ID changes, a new transaction has to be created. Do you think, this field is a good candidate for the key field ? In all the records, I have a field called REC-TYPE which has different values for each type of record. I was using this field as the keyfield/match field.


3. Provider ID is not the same as the Trading Partner ID.
4. I have only one Input Physical File. This file contains multiple type records.

5. Do I ever have to manipulate with the Depth and Level of segments ? Do I ever require to change their default values ?


Coulter, is there something that I am missing ?

Thanks

Tom


 
Tom,

Since Provider ID is not on every record, then you can't match against it. So on your Header level, the key field has to be "+" and every child level, the key and match fields have to "+" also.
Record type doesn't come in to flow; it's just set in record definition so the software can distinguish between the different records and you can give them different names.
Since Provider ID isn't the Trading Partner, then how does it know to start a new transaction? Is it just a matter of when it hits a particular record, start a new transaction? Do it do that for you? I'm sorry, but all my mapping experience has been where Trading Partner ID either occurred on the outbound file or I was able to derive it from envelope information on inbound files. So I'm not sure I can help with that.

Do you ever have to manipulate depth and level of segments, I'd guess that you would. I'm not sure what you mean by depth, but I'm guessing it has to do with nesting and what segments occur within other segments, like attached comments modifying a detail line. Some of these segments may need their own level, especially if there is looping or any fancy logic associated with the segment, and some don't, they can be mapped within another level. The automatically generated flow never got it right for me. For example, I know that I need to do some extra logic around N1 segments, so I create a level for it and I make sure the flow handles it appropriately, from it's parent to it's sibling or child.

I don't think you can trust that all the levels you need are created and that the flow handled them all perfectly. You need to check it.

 
Coulter,

My input file contains the first record as the header record followed by multiple detail records. It then repeats with the first multiple detail record. There is no more header record. The first multiple detail record contains the Provider ID.

Hence, in the whole file, there is only one record ( the header record) that contains the Trading Partner ID ( Receiver ID).

My task is to create ST - SE envelope for each new Provider.

Does it sound better now Coulter?

Thanks

Tom
 
Tom,
It's coming clearer, but I have another question that you might have already answered, but I'll ask anyway. Are there multiple detail records per Provider or just one record for each Provider? Does your file look like this

header
- provider A detail record
- another detail record
- provider B detail record
- another detail record
- another detail record
...

or like this

header
- provider A detail record
- provider B detail record
...

If it's the first option, does the first detail record for a provider look different than the subsequent ones (i.e. different record type) for the same provider?


I'm going home now, but I'll check tomorrow for your answer and, maybe, my brain will be working better.
 
Coulter,

It's good to know that things are becoming clearer!

There are multiple detail records per provider and they look different for the same provider.

A part of the data is given below

AA0401m 1 (Header Record)
BA0AL 0000SHD105 (Provider 1)
BA1AL 0000 P
CA0 03245IN01059 TONY
DA001 03245IN01059 D 10
EA0 03245IN01059 N
EA1 03245IN01059
FA001 03245IN01059
FB001 03245IN01059
FA002 03245IN01059
FB002 03245IN01059
XA0 03245IN01059 0101020400000
YA0 0000
BA0AL 0000SHD105 (Provider 2)
BA1AL 0000 P
CA0 03248IN01748 MICHALLE
DA001 03248IN01748 D 10
EA0 03248IN01748 N
EA1 03248IN01748
FA001 03248IN01748
FB001 03248IN01748
FA002 03248IN01748
FB002 03248IN01748
FA003 03248IN01748
FB003 03248IN01748
XA0 03248IN01748 0101020600000
CA0 03245IN06799 JOHN
DA001 03245IN06799 D 10
EA0 03245IN06799 N
EA1 03245IN06799
FA001 03245IN06799
FB001 03245IN06799
FA002 03245IN06799
FB002 03245IN06799
XA0 03245IN06799 010102040000
XA0 03245IN06799 0101020400000
YA0 0000
ZA0ZZ 645995164

Does this help Coulter ?

Tom

 
Tom,
Yes, it helps. I do need to warn you that while I work in healthcare, the only EDI mapping I've done pertains to purchasing, invoicing, and electronic payments; claims I have no clue about.
So the first 3 bytes, I'm guessing, is how you tell what record type it is, correct? So the BA0 record needs to drive the start of a transaction, but they've all got to go within 1 envelope, which the AA0 record is used for.
Ok, I assume you've indicated in your record definition for the AA0 record which field is the Trading Partner, correct? That will drive the end and start of the ISA and GS envelopes.
Then, there is some beggining X12 segment that occurs at the top of the transaction, usually just below the ST. You are probably mapping from your BA0 record to that beginning segment, correct? If you are, that should drive the end and start of a ST transaction, but it should have caused that beginning segment to display as well.
I recall you said your problem is that it's creating only the ST and SE segments. Is that true? Are they still putting them within one ISA and GS envelope?
Tom, if you think it would help to take this thread offline, go ahead and email me directly at
coultevl@healthall.com. It would allow us to exchange samples. If you don't want to, that's OK.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top