7 Replies Latest reply: May 15, 2014 9:54 AM by Grant Perkins RSS

    Multiline trap

    dmontgomery _

      I know this has probably been covered but I just cannot get it to work.  I am working with Monarch Version 4 and here is a sample of some data I am trying to extract.  What I want to do is grab everything from Tick# to the line of ~~~~~~'s but can't seem to get it to work since the number of lines can vary.

       

      [font="courier"]     Tick#  11111 U  111  11 JOHN          DOE             Total:   9999.00         

      01/01/01  170-DOE  MD      GENERIC    02/25/04 03/08/04 GENER HOSP INPT            

      -LINE DETAIL-                                                                      

      010101-010101 11111   -11-ZZZZZZZZ    111.1   -GENERIC     YYY  17.00  1088.00    

      010101-010101 12121   -22-ZZZZZZZZZ   222.2   -GENERIC 2   YYY   1.00   117.00    

      010101-010101 13131   -  -ZZZZZZZZZ   333.3   -GENERIC 3   YYY   1.00    64.00    

             ZZZZZZZZZZZZZZZ -  1:11, ZZZZZ - 11:11,  ZZZZ - 11:11                       

      -RECEIPTS-                                                                         

        Date   Type                                               Amount  Applied        

      01/01/01 2002-ZZZZZZZ   ZZZZZZZ ZZz#  111111R#  11111U 111 11   271.04-  271.04-   

      01/01/01 9101-ZZ-zzz         11.11c#  111111r#  11111U 111 11                      

      01/01/01 4002-ZZZZZ-ZZZ ZZZZZZZ ZZZ#  111111R#  11111U 111 11   930.20-  930.20-   

      01/01/01 3399-ZZZZZZZZZZZZZZZZZZ            r# 11111111111 11    67.76-   67.76-   

      -CLAIM INFO-                                Claim #                                

                010101-      -ZZZZZZZZZZZZZZZZ   -11111111-Z-Z-Z zzzzzzz                 

      -SUMMARY-                                                                               

      ZZZZZZZ ZZ                         Status   zzzzz       Balance      .00    

      Paid    271.04        .00        .00    Expected   1269.00        Ins       .00    

      W/O    930.20        .00        .00    Personal       .00        Pat       .00    

      zzz zzzz zz zzzzz zz zzzz        .00    Other pd     67.76                         

       

          • CLAIM #      111111                                                           

        Date    Time    Opr   Note                                                       

      010101    740a   sys   zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz                    

      010101    740a   sys   zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz                    

      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /font[/quote]

        • Multiline trap
          Grant Perkins

          Originally posted by dmontgomery:

             What I want to do is grab everything from Tick# to the line of ~~~~~~'s but can't seem to get it to work since the number of lines can vary.

          /quoteWhen you say "everything" do you really mean everything - header lines and all of the differently formatted lines in a single large text field?

           

          Also can you tell us what aspect you are having a problem with - capturing each (every?) line or finding a way to make it capture to the end line or finding a way to stop the capture at the ~~~~~~~~ line?

           

          If it is a problem of finding a way to stop the multi line selection, what have you tried so far?

           

          Grant

          • Multiline trap
            dmontgomery _

            I want to grab everything including header lines and just put in into one text field.  I haven't been able to get anything to work with the multiline selection.  Each time I have tried it grabs a set number of lines rather than up to the "~~~~~~~~~~~"'s and then places them into individual fields for each line.  I know I am probably just not doing something correctly.

             

            Thanks!!

            • Multiline trap
              Grant Perkins

              Sounds like you are 'painting' a block of lines whereas to get a single field you should just pain the first line and then go to the field's advanced properties ("Options" button I think in V4) and select the most suitable "End On" option.

               

              Based on the sample it is not entirely clear which might be the best option but possibly "Minimum Action Only" in this case.

               

              The field will need to be set to Memo rather than character (Memo is available in V4? I don't have a running version or documentation to refer to at the moment.) However I think you will probably lose the formatting of the lines - hope that is not a problem for you.

               

              If I have guessed wrongly, please let us know so that we can suggest something else - especially any other V4 users out there!!!!

              • Multiline trap
                dmontgomery _

                You hit the nail on the head Grant.  The way I was painting my block was the problem.  There is no Memo in version 4.  Is that why I lost formatting or would I have lost with newer version too.  I used "Minimum Action Only" but I have another template within this one so it is messing me up.  I see there is an optioin to begin a field based on a string is there an option in newer versions of Monarch to end a field based on a string?

                 

                Thanks for your help!!

                Davy

                • Multiline trap
                  Grant Perkins

                  Originally posted by dmontgomery:

                  You hit the nail on the head Grant.  The way I was painting my block was the problem.  There is no Memo in version 4.  Is that why I lost formatting or would I have lost with newer version too. 

                  /b[/quote]Ah! OK. Could not recall whether V4 had the Memo field type. V5 does.

                   

                  You will lose the formatting anyway I'm afraid. There was one release (an interim in V6 I think) which could retain formatting but in most cases it will be lost UNLESS you look at alternatives to the single field approach.

                   

                  Originally posted by dmontgomery:

                  I used "Minimum Action Only" but I have another template within this one so it is messing me up.  I see there is an optioin to begin a field based on a string is there an option in newer versions of Monarch to end a field based on a string?[/b][/quote]A template within the range you want will be a little tricky to deal with without getting into some 'Voodoo' Monarch. There is not option to end a field on a specified string although to an extent the other options for how to end a field sort of cover that 99.99% of the time.

                   

                  You will need a work around. I'm having some difficulty getting a feel for what you will be able to do with the records once extracted - especially if you have other embedded templates covering the same data.

                   

                  But without the Memo field type I think you will have to battle some limitations anyway so were I you I would seriously consider an upgrade if possible as life will get much easier though you will be left with a few interesting challenges still I suspect!

                   

                   

                  Grant

                  • Multiline trap
                    dmontgomery _

                    Originally posted by Grant Perkins:

                    You will lose the formatting anyway I'm afraid. There was one release (an interim in V6 I think) which could retain formatting but in most cases it will be lost UNLESS you look at alternatives to the single field approach.

                    /quoteAre there any alternatives not using a single field that you could walk me thru setting up.

                     

                    Thanks!!

                    • Multiline trap
                      Grant Perkins

                      [b]Are there any alternatives not using a single field that you could walk me thru setting up.

                       

                      Thanks!! [/b][/quote]Not without a feel for what your objective is. Are you exporting the result to another database for example? Or are you reprinting to a paper or electronic file?

                       

                      What are the limits of the target output (if any?)

                       

                      If you had a Pro version of Monarch (started with V5 iirc) we could look at exporting the block of text to a form of lookup table which would then allow us to consider the options for looking up the block as a calculated field to be attached to the more specific fields you want to pick up in the middle of the block itself. However that would still leave you with the format problem if you wanted to include everything as a single field (as far as I can tell.)

                       

                      I really need to know what you are seeking to achieve at the end of the whole process. And maybe whether you have any possibility of considering an upgrade which might bring the Memo field into play. The character limit for a normal character field would prevent you capturing a whole block in a single field anyway.

                       

                       

                      Grant