Appointuit support centre

Have a question? We have the answers to help you.

Non urgent recalls in BP- pulling the list using a SQL search

Follow

All active patient with recalls that have been marked as a non urgent appointment by all Doctors

 

Currently BP does not allow you to pull a list from the follow-up in-box to create a list of non-urgent recalls. It only allows view and print as a pdf.

To get around this- you can get the list from the BP clinical side using this search.

Please find below your custom SQL Query to create the list above. The list can be generated by entering the following under your search parameters in BP.

For instructions on how to do a general search in BP, see our information sheet:

https://appointuit.zendesk.com/hc/en-us/articles/204245223-BEST-PRACTICE-How-to-Export-patient-information-SQL-Search

Instructions specifically for non-urgent recall list:

Go to> Utilities > Search

select * from bps_patients

where statustext = 'active'

and (internalid in (select internalid from investigations

where Investigations.RecordStatus = 1

AND Investigations.Actioned = 0

AND Investigations.Action = 6

AND Investigations.RequestDate >= '2015-01-01')

or internalid in (select internalid from correspondencein

where CorrespondenceIn.RecordStatus = 1

AND CorrespondenceIn.Action != 0

AND CorrespondenceIn.Actioned = 0

AND CorrespondenceIn.Action = 6

AND CorrespondenceIn.CorrespondenceDate >= '2015-01-01'))

order by surname, firstname

 

***NB: This will show all NURs from the 01/01/2015 (so outstanding will also be included). If you need to change this you can insert a new date in this space.

That is the search is 

-- All active patient with recalls that have been marked as a non urgent appointment by all Doctors since 01/01/2015.

Below you will find detailed instructions on running the above query.

After the instructions on running the query, you’ll also find further down instructions on ‘saving’ the query for use later, along with how you can use the results from the query at the end of this email.

To Run this query please follow the steps below.

How to run a custom SQL Query in 10 Steps.

1. Copy the SQL Query from above. (It might look similar to the below and will begin with the word “Select” and usually end with the words “order by….” But the content in between will differ for each unique query supplied by Bp)

2. Highlight the Query from “Select” right down to the last line and copy by pressing CTL + C on the keyboard.

3. Now go back into BP.

4. From the Main Menu of BP go to “Utilities” > ”Search”

5. You will see a default query in the query window. Go to step 6. (N.B. As a side note, If you run this default query it will show you all of your current active patients)

6. Highlight the default query in the “SQL Query Window” and press “Delete”.

7. The SQL Query window will then be blank as below.

8. Click in the SQL query window and press CTL+ V to paste the custom query you copied before.

9. Click “Run query” to run your query

10. The patients matching the query will be displayed below the query.

11. END of how to Run a custom query

Saving the Query for future use.

12. Click “Save query”

13. Next, 1- Choose the folder to save to, 2- Give the file a meaningful Name, 3 - Select “SQL Query” from the drop down list, 4 – Click “Save”.

14. END of How to Save a Custom Query.

How to Save your results to a Spreadsheet file.

15. If you want to save this query to an Excel/Spreadsheet format so that you get more information about the patients that match or edit the list.

Click on “File” and “Save”

16. Next, 1- Choose the folder to save to, 2- Give the file a meaningful Name, 3 - Select “CSV” / "XML" from the drop down list, 4 – Click “Save”.

If you have any problems running, saving or exporting your custom SQL query, please contact us for further assistance.

Have more questions? Submit a request

Comments

Powered by Zendesk