9.4. Standard site queries

The site administrator can create a library of queries that every researcher can use.

Common “standard” queries might include:

  • how many patients are in the de-identified database?
  • when was the database last updated?
  • when were the associated NLP tables last updated?

These queries can have placeholders, marked out by double square brackets.

For example, the administrator might enter this query:

SELECT * FROM anonymous_output.ace WHERE brcid = '[[brcid]]'

and give it a title of “Look up ACE values for a given patient”. When the user runs this query, they are asked to fill in the blank in an HTML form:

SELECT * FROM anonymous_output.ace WHERE brcid = '__________'

and after they’ve entered a brcid value of XYZ, the query that will be run is

SELECT * FROM anonymous_output.ace WHERE brcid = 'XYZ'