3 Replies Latest reply: May 15, 2014 10:04 AM by Grant Perkins RSS

    Filtering all charges for patients with a particular charge

    NicolasF1212 _

      Good morning,

      I have a listing of medical charges with columns for date, patient ID, code & charge description, etc.

      I'd like to filter all[/U] the charges for patients that have a[/U] particular charge, i.e. a drug. Currently I can only filter all those charges and not the other charges for the same patient.

      Can anybody give me advice if there is a filter function that answers the question: "Give me all charges for patients that have any drug_x charge"?

      Many thanks

        • Filtering all charges for patients with a particular charge
          Olly Bond

          Hello Nicholas,

           

          You can try advanced filter properties with rules about duplicate handling, but it really depends on the data as to whether you can get Monarch to recognise that a reference Drug X should be joined to every record for Patient Y but not for Patient Z.

           

          However, assuming you have a fairly recent edition of Monarch Pro, it's easy as a two stage project. Firstly, make a filter just showing those patients who have drug X. Export the patient ID fields and at least one other field for this filter to an Excel / Access / CSV file.

           

          Then make an external lookup to this file, and join on the Patient ID, and then filter only those data that have a non-NULL result from the external lookup.

           

          That's a crude approach, but robust and automatable if you need that. You might be able to do something using the "guru" trap approach described elsewhere on this forum, or some other advanced field tricks might help ensure that Drug X is recorded against every line for a patient who has it.

           

          Monarch v10 might allow you to solve the issue using a turn off append template approach also. Feel free to email some sample data if you want me to have a bash at a model for you.

           

          I don't know when the next local training course is for you -  there was one in Zurich a little while ago. Perhaps Steve can advise?

           

          Best wishes,

           

          Olly

            • Filtering all charges for patients with a particular charge
              Olly Bond

              Hello Nicholas,

               

              Having looked at the sample data, I can't see a way to solve it in one pass. If you new that Drug X would always be the first record for each patient, you could use an append. If you knew that there was a blank record or line in between each patient's details, then again, an append with some advanced field properties. If you don't have access to Monarch Pro, then you could, even with your data, export to a fixed width text summary that then was suitable for a one-pass model.

               

              Perhaps Grant might confirm whether there's a way to use Appends in this case:

               

              Detail 1 - Value A

              Detail 1 - Value B

              Detail 1 - Value C

              Detail 2 - Value B

              Detail 2 - Value A

              Detail 3 - Value B

              Detail 3 - Value C

              Detail 3 - Value D

              /CODE

               

              to return:

               

              1,A

              1,B

              1,C

              2,B

              2,A

              /CODE

               

              i.e. all records for detail N where one record for N has value A.

               

              Best wishes,

               

              Olly

                • Filtering all charges for patients with a particular charge
                  Grant Perkins

                  Perhaps Grant might confirm whether there's a way to use Appends in this case:

                   

                  Detail 1 - Value A

                  Detail 1 - Value B

                  Detail 1 - Value C

                  Detail 2 - Value B

                  Detail 2 - Value A

                  Detail 3 - Value B

                  Detail 3 - Value C

                  Detail 3 - Value D

                  /code

                   

                  to return:

                   

                  1,A

                  1,B

                  1,C

                  2,B

                  2,A

                  /code

                   

                  i.e. all records for detail N where one record for N has value A.

                   

                  Best wishes,

                   

                  Olly[/quote]

                   

                  Not having seen the data and format I can't be sure but there may be a possibility to set up an append that populates a field on the basis of a preceding string that can then be used for the entire record for filtering purposes.

                   

                  http://www.monarchforums.com/showthread.php?t=2794[/URL]

                   

                  is a thread with a similar requirement that offers another approach. This was also written up in the March Monarch Newsletter.

                   

                  There could well be variations on these themes that would suit the problem better. An intial pre-analsysis to extract the patient IDs that qualify and then a link back to provide the selection flag is a good solid way to ensure correct function. One could also cretae a 2 column extract and cut ans paste it into an internal lookup but obviously this would have to be repeated by someone each time the report is run.

                   

                  HTH.

                   

                   

                  Grant