5 Replies Latest reply: May 15, 2014 9:56 AM by Steve Caiels RSS

    How to extract some duplicate data in a report

    Ali _

      Hi

       

      I have a multi set of data contained within a single report and I am trying to separate out two sets of data. The problem is that when trying to trap one of the data elements (the VISION line shown below) the only way I can see of doing it traps data from the two separate components of the report.

      Is there a way of setting something in Monarch that will allow me to identify a header row of one section and that this will then only trap data from within that section of the report?

       

       

      The report looks something like this:

       

      Pre-School Examination (Header).

       

      VISION         NORMAL --> Line I want to trap

       

       

      Other Examination (Header)

       

       

      VISION         GOOD  -->  Line I want to exclude

       

      The lines are not fixed in a specific position beneath the header (and do not always appear at all)

       

      Thanks

       

      Ali

        • How to extract some duplicate data in a report
          Data Kruncher

          Hi Ali.

           

          To solve your problem, you'll want to create an append trap for the VISION type. Let's call this field VisionType.

           

          Once you have a field which reads either VISION GOOD or VISION NORMAL on each record, you need to create a filter to exclude the VISION GOOD. Go to the Table window and create a new filter which named "Excludes Good". The filter should be: VisionType<>'VISION GOOD'

           

          Close the filter dialog box, and your dataset will now not include GOOD records.

           

          Please let us know if you need more assistance.

           

          Regards,

          Kruncher

          • How to extract some duplicate data in a report
            Grant Perkins

            Hi Ali,

             

            I assume that the detail lines you are try to trap don't actually start with "VISION       GOOD" and "VISION       NORMAL" sio that you are unable to use the words Good or Normal as part of the trap.

             

            Is there absolutely no other identifier unique to the individual lines?  If not then you seem to need a solution like Data Kruncher has suggested though I am slight worried the filter solution relies upon the same identifier that a trap would do - or so it seems to me.

             

            Can you update us if that is not the case?

             

            Have fun.

             

             

            Grant

             

            Originally posted by Ali:

            Hi

             

            I have a multi set of data contained within a single report and I am trying to separate out two sets of data. The problem is that when trying to trap one of the data elements (the VISION line shown below) the only way I can see of doing it traps data from the two separate components of the report.

            Is there a way of setting something in Monarch that will allow me to identify a header row of one section and that this will then only trap data from within that section of the report?

             

             

            The report looks something like this:

             

            Pre-School Examination (Header).

             

            VISION         NORMAL --> Line I want to trap

             

             

            Other Examination (Header)

             

             

            VISION         GOOD  -->  Line I want to exclude

             

            The lines are not fixed in a specific position beneath the header (and do not always appear at all)

             

            Thanks

             

            Ali /b[/quote]

            • How to extract some duplicate data in a report
              Ali _

              Thanks for your quick response. The problem is that within the detail line (starting with the keyword 'VISION') , I have a result which could be anything (eg, 'Good', 'Normal', 'Satisfactory' etc). So I am trying to pick up this result.

              Unfortunately, the VISION keyword appears in several subsets of the data. So if I use VISION as my identification for a detail line trap, I might get back one VISION result which equates to one dataset and a second which equates to a completely different data set:

              So if I am trapping  a patient identifier from Pre-School Examination Header, I might get back the following result:

               

              Pat ID 123 (from Pre School Exam Header)

              VISION NORMAL (from Pre School Exam Detail line)

              VISION GOOD (from Other Examination Detail line)

               

              and the second result (GOOD) could equate to any detail line in the report, not necessarily to a Pat ID 123.

               

              I was just thinking I might be able to identify something in the header or perhaps a footer record that says 'Don't trap any more VISION lines'

               

              Ali

              • How to extract some duplicate data in a report
                Grant Perkins

                Ali,

                 

                I'm not at all sure I understand the problem yet so please check my understanding.

                 

                You have a report in multiple sections. Each section nas a heading and then some detail lines which all begin with VISION if you are interested in them.

                 

                The detail lines can relate to different things ( eg NORMAL or SHORT or whatever)and would normally be grouped into separate sections, each with their own header, reviewing the example in your initial post on this.

                 

                So if you create the VISION lines as your detail lines, trapping the template on VISION, you wold get both VISION     NORMAL and VISION      GOOD lines.

                 

                Or you could set the trap to VISION     NORMAL and only get those lines picked.

                 

                You can further define an append header to go with the detail lines. The data from that might relate to "Pre-School Examination" or "Other Examination", etc.

                 

                In theory the NORMAL and GOOD would have DIFFERENT HEADERS (????) but for some reason this is not always the case.

                 

                Now, if there is no header to a "GOOD" detail, other than the one above the last NORMAL record, how is that the case? Or, if it is allowable, why is it a problem? If the record had a genuine relationship with with the header how does that change your problem?

                 

                On the face of it it appears that you could select only the detail records you want by specifying "Normal" in the trap.

                 

                Alternatively you could select all likely detail records and then filter after selection.

                 

                I could see that it maybe be possible that a missing header would give odd results - or a header which was not recognised by the trap defined for it. But then I would be looking for a reason why the header was not selected, that being the only reason I can think of for a any wrong association based on your description.

                 

                To summarise, I have come to believe that the problem may stem from non-selection of a 'new' header append template so the detail lines are automatically associated with the most previously selected append section.

                 

                Is that about right? And if so what can be done to make shre the headers can be suitable ansd sensibly defined as part of the model?

                 

                On the other hand I could well be quite wrong - so please let me have some feedback. If you can release a sample of the file and tell me what you need from it I will have a go at producing a model for it.

                 

                If that is a possibility I will email you  (I assume that is available via your your profile in the forum) so that you have my mail address and can send the report onward as a mail attachment.

                 

                All the best,

                 

                 

                Grant

                 

                 

                Originally posted by Ali:

                Thanks for your quick response. The problem is that within the detail line (starting with the keyword 'VISION') , I have a result which could be anything (eg, 'Good', 'Normal', 'Satisfactory' etc). So I am trying to pick up this result.

                Unfortunately, the VISION keyword appears in several subsets of the data. So if I use VISION as my identification for a detail line trap, I might get back one VISION result which equates to one dataset and a second which equates to a completely different data set:

                So if I am trapping  a patient identifier from Pre-School Examination Header, I might get back the following result:

                 

                Pat ID 123 (from Pre School Exam Header)

                VISION NORMAL (from Pre School Exam Detail line)

                VISION GOOD (from Other Examination Detail line)

                 

                and the second result (GOOD) could equate to any detail line in the report, not necessarily to a Pat ID 123.

                 

                I was just thinking I might be able to identify something in the header or perhaps a footer record that says 'Don't trap any more VISION lines'

                 

                Ali /b[/quote]

                • How to extract some duplicate data in a report
                  Steve Caiels

                  Hi Ali,

                   

                  Hey, member number 1000!! 

                   

                  Is this the situation?

                   

                  [font="courier"]name:         Steve

                  Exam type:    Pre – School

                  Vision exam : good

                   

                  Exam type:    Year 5

                  Vision exam : bad

                   

                   

                  Name:         Fred

                  Exam type:    Pre – School

                  Vision exam : bad

                   

                  Exam type :   Year 5

                  Foot exam :   smelly

                   

                  Name:         Harry

                  Exam type:    Pre – School

                  Foot exam :   smelly

                   

                  Exam type :   Year 5

                  Vision exam : bad[/font][/quote]Trapping on “vision exam” as detail and exam type and name  as two appends would give a table like this:-

                   

                  Name   type         result

                  Steve  pre – school good

                  Fred   pre-school   bad

                  Harry  Year 5       bad

                   

                  You could then filter the table using expression type=”pre-school”.

                   

                  If this doesn’t help, please feel free to private message me and I’ll take a look at the actual report (if I may).

                   

                  Regards

                  Steve