4 Replies Latest reply: May 15, 2014 9:58 AM by Steve Kearley RSS

    Appending Trap Question

    Steve Kearley

      Sorry for the length of this post   tongue.gif[/img] 

       

      I am dealing with 3 specific reports in a bunch of files full of reports.  Not possible to separate out the actual reports-that I know of--so I need Monarch to do this work.  And the sequence of reports is not always consistent, except for Reports B, C, & D below.

       

      Report A:  Example header "Transaction Analysis for 1- John Doe, M.D."  I am successfully extracting charging data by provider and have built the traps, fields, and also filters to pull this data. 

       

      Report B: Page header says "Transaction Summary by Location" and starts with a new page number, or in other words, Page: 1.  This report is typically one page long.  Don't think I've seen it longer at all.

       

      Report C: sample header "Transaction Analysis for 1- Main Office"  This report runs for several pages and starts with Page: 1.   And it immediately follows Report B, but could be anywhere in the file in relation to Report A.  Obviously, I mention it following Report B because I was trying append that "unique" header to the report that followed, then filter it out.  As you can see, the headers for A & C are too similar.  And no, there is no existing master listing of docs for Report A (This is a new client and stuff is a mess,) I am working on a master list numbers and names, but thought if I could get the append to work, I'd learn something new!

       

      Hey, just noticed something--There is a 4th report:

      Report D:  header - "Transaction Analysis for All Locations"  starting with Page: 1.

       

      I guess what I am wondering is if I can make a trap that gets the Header from Report B and appends it to the detail lines in Report C--then gets filtered out.  But the trap would have to start with the Header of report B and stop with the Header of D.  Or perhaps could stop with the second occurrence of Page: 1??

       

      Also, I am using a 4 line Page Header trap to get the proper header detail added on all reports.

        • Appending Trap Question
          Grant Perkins

          Steve,

           

          Do you think these files are generated as a single report or are separate reports which the client has amalgamated into a single file?

           

          My guess would be that this is a single 'report run' where the output is produced with various summary/subtotal levels.

           

          So you might see a section A with details at the lowest level. Then a section B that groups and summarizes all the records for section A. Then, MAYBE, another 'section A' followed by its own section B. The section grouping will be a data driven code if I am guessing well.

           

          At some point that will lead to another summary/subtotal level (Report section C) and so on. There may then be more sections A and B and possibly a few C's as well.

           

          D is probably the Grand total for the whole report.

           

          If that sounds plausible you might really be wanting to extract detail at the 'A' level, append a code for section 'B' to allow subgrouping. Also C section code (though it sound like this may  not apply here).

           

          Problem. 'Appends' are looking for data ABOVE the detail (in principle) rather than below it. So there may be some manipulation required to achive the result.

           

          It is also possible the the A level detail is not required and the detail level could start at B.

           

          Or that 'C' is a repeat of the transactions in A but is not grouped by individual M.D. (or whatever). In which case D is probably similar.

           

          Whatever the reality, gathering the information at the lowest required level should allow the summaries to be produced at the higher levels (if you see what I am getting at).

           

          On the other hand if I have totally misunderstood the requirement, apologies. Forget anything I said. But you may need a multi stage process to get the effect that you seek.

           

          Best regards,

           

          Grant

           

          Originally posted by Steve Kearley:

          Sorry for the length of this post    tongue.gif[/img]  

           

          I am dealing with 3 specific reports in a bunch of files full of reports.  Not possible to separate out the actual reports-that I know of--so I need Monarch to do this work.  And the sequence of reports is not always consistent, except for Reports B, C, & D below.

           

          Report A:  Example header "Transaction Analysis for 1- John Doe, M.D."  I am successfully extracting charging data by provider and have built the traps, fields, and also filters to pull this data. 

           

          Report B: Page header says "Transaction Summary by Location" and starts with a new page number, or in other words, Page: 1.  This report is typically one page long.  Don't think I've seen it longer at all.

           

          Report C: sample header "Transaction Analysis for 1- Main Office"  This report runs for several pages and starts with Page: 1.   And it immediately follows Report B, but could be anywhere in the file in relation to Report A.  Obviously, I mention it following Report B because I was trying append that "unique" header to the report that followed, then filter it out.  As you can see, the headers for A & C are too similar.  And no, there is no existing master listing of docs for Report A (This is a new client and stuff is a mess,) I am working on a master list numbers and names, but thought if I could get the append to work, I'd learn something new!

           

          Hey, just noticed something--There is a 4th report:

          Report D:  header - "Transaction Analysis for All Locations"  starting with Page: 1.

           

          I guess what I am wondering is if I can make a trap that gets the Header from Report B and appends it to the detail lines in Report C--then gets filtered out.  But the trap would have to start with the Header of report B and stop with the Header of D.  Or perhaps could stop with the second occurrence of Page: 1??

           

          Also, I am using a 4 line Page Header trap to get the proper header detail added on all reports. /b[/quote]

          • Appending Trap Question
            Steve Kearley

            Grant,

            One question came to mind when I was going over your reply and trying to change some things.  I was using a 4 line Page header trap on line 1.  Given what you said about appends, I decided to try and do a one line Page header trap, and then append fields from a 3 line append trap.  The trouble is that the append trap still needed to trap on the same thing that the Page Header trap did, and it never worked.  I could append trap on the words "Transaction Analysis for " but these words are placed differently on the same line, depending on the length of the name of physician, etc.  Make sense?  Don't know of a way to do a multi-line APPNED trap on on words that aren't in the same position.

             

            Not sure how these reports are generated--as a single or separate reports.  I'd say separate because the order of the reports by location sometimes varies, but there is various levels of detail and summary. 

             

            I think you have understood the setup.  Its just that it looks like distinguishing characteristics of say a change from production by site vs. production by doc is just non-descript.  Your "reminder" to me of what Appends do kind of refocused my efforts.  But I got stuck because I guess I was trying to use an append and page header trap on the same line (although not the same fields--don't understand this???)

             

            Looks like I will need a multi-stage process or some kind of mapping table to filter the data properly.

            • Appending Trap Question
              Grant Perkins

              Steve,

               

              Page Headers demand exclusivity! You can't share the line or so I have found. I don't often use Headers or footers, I have been lucky with appends!

               

              You could try multiple appends, one per line.

               

              Do you have V6 Pro (or V7?)

               

              If so you could look at using a floating trap for your variable sub-title line if horizontal location is the issue. If vertical location is the problem it becomes a little more interesting!!

               

              I may have some saved reports of a similar nature. Will try to dig them out BUT it will be a day or so before I have access to my V6 or V7 installations again. Happy to look at your files if there are no issues about security and confidentiality. Your call on that.

               

              Grant

               

               

              Originally posted by Steve Kearley:

              Grant,

              One question came to mind when I was going over your reply and trying to change some things.  I was using a 4 line Page header trap on line 1.  Given what you said about appends, I decided to try and do a one line Page header trap, and then append fields from a 3 line append trap.  The trouble is that the append trap still needed to trap on the same thing that the Page Header trap did, and it never worked.  I could append trap on the words "Transaction Analysis for " but these words are placed differently on the same line, depending on the length of the name of physician, etc.  Make sense?  Don't know of a way to do a multi-line APPNED trap on on words that aren't in the same position.

               

              Not sure how these reports are generated--as a single or separate reports.  I'd say separate because the order of the reports by location sometimes varies, but there is various levels of detail and summary. 

               

              I think you have understood the setup.  Its just that it looks like distinguishing characteristics of say a change from production by site vs. production by doc is just non-descript.  Your "reminder" to me of what Appends do kind of refocused my efforts.  But I got stuck because I guess I was trying to use an append and page header trap on the same line (although not the same fields--don't understand this???)

               

              Looks like I will need a multi-stage process or some kind of mapping table to filter the data properly. /b[/quote]

              • Appending Trap Question
                Steve Kearley

                Maybe I can send you part of the files and go from there.  I am using Monarch 6.01.

                 

                I hear you about Page Headers--think I am learning that one.  But again, in trying to do multiple appends, and this data would have to append to detail BELOW it, or else append to the Pager Header above it, I don't have any success trapping the separate stuff.  Let me see if I can send you something in the next few hours and you can take a look when you can.

                 

                Guess I need to start from scratch and really see what I can do with a floating trap.

                 

                Thanks for your help

                Steve