Listing Patients With UserSort Fields

I am trying to do a query on the additional tab of a client.
We have renamed the 3 squares (in a row) and not sure what they were called Can you give me a query that will get any of the 3 squares. I would never run them all at the same time however would run 1 at a time.

The three customizable fields on the Additional Tab are “usersort”, “usersort2”, and “usersort3”. You can find them in the PATIENTS table and in the RV_PATIENTS view. The example below includes all three, but you can remove any you do not want from the SELECT list:

SELECT
  lastname,firstname,id,usersort,usersort2,usersort3
FROM
  /*you can select from either PATIENTS or RV_PATIENTS*/
  sos.patients
WHERE
  /*the following conditions filter out all but active patients in the main data set */
  flag = 0
  AND dischargedate IS NULL
  AND licnum = 101
ORDER BY
  lastname,firstname,id

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.