2 Replies Latest reply on Nov 17, 2016 8:55 AM by taylorsharpe

    How do i show patients of same or similar name within your department

    u177svr

      When booking in a Patient I need to know if I have two or more of the same or similar surname.

      on booking in I press a button which is called "Name Check" and this finds these.

      The script is:

      Go to Layout ("Name Check")

      Enter Find Mode (Restore) (Table:: Patient Released: ("No")

      Go to Field (Table::Surname)

      Insert from Last Visited (Select)

      Go to Field (Table::Patient Released)

      Insert Text ("No")

      Perform Find

       

      At present this will show Patients I have in of the same name like "Richards" but then also brings up Patients like "Richardson".

      I don't want this I just want specific same names.

      Please Help?

        • 1. Re: How do i show patients of same or similar name within your department
          fmpdude

          If you use the "=" with your Find, it will find an exact match.

           

          So, enter Find mode.

          Enter =Richards

          Perform Find

          It will ignore Richardson.

           

          --

           

          Find has some other operators you can use as well (but sadly, no RegEx):

           

          HOPE THIS HELPS.

          1 of 1 people found this helpful
          • 2. Re: How do i show patients of same or similar name within your department
            taylorsharpe

            Better scripting is to set fields rather than insert.  And it is a good habit to set error capture around your Perform find and you can then test for finding nothing so that you can do something else if no records are found instead of getting an error prompt.  But the main answer you had above from fmdude should take care of your Find problem using the equals. 

             

            Go to Layout ("Name Check")

            Set Variable [ $LastVisited ; Table::Surname ]

            Enter Find Mode

            Set Field [ (Table::Surname) ; "==" & $LastVisited ]

            Set Field [ (Table::Patient Released) ; "No" ]

            Set Error Capture [On]

            Perform Find

            Set Error Capture [Off]