save_query: Save Search Query

View source: R/database.R

save_queryR Documentation

Save Search Query

Description

Saves the search query. The query consists of keywords/UMLS concept unique identifiers (CUI's), boolean elements and other operators ('AND', 'OR', '!', '(', or ')').

Usage

save_query(
  uri_fun,
  user,
  password,
  host,
  replica_set,
  port,
  database,
  search_query,
  use_negation,
  hide_duplicates,
  skip_after_event,
  tag_query = NA,
  date_min = NA,
  date_max = NA
)

Arguments

uri_fun

Uniform resource identifier (URI) string generating function for MongoDB credentials.

user

MongoDB user name.

password

MongoDB user password.

host

MongoDB host server.

replica_set

MongoDB replica set, if indicated.

port

MongoDB port.

database

MongoDB database name.

search_query

Medical corpus query containg keywords/CUI's, boolean elements and other operators ('AND', 'OR', '!', '(', or ')').

use_negation

Should negated items be ignored in the keyword/concept search?

hide_duplicates

Should duplicated sentences be removed for search results?

skip_after_event

Should sentences occurring after recorded clinical event be skipped?

tag_query

List with 2 sublists, namely "include" and "exclude", indicating matching strings for metadata tag parameters.

date_min

Minimum date for NLP processing and text search.

date_max

Maximum date for NLP processing and text search.

Value

Confirmation that requested operation was completed, or error message if attempt failed.

Examples

## Not run: 
save_query(uri_fun = mongo_uri_standard, user = 'John', password = 'db_password_1234',
host = 'server1234', port = NA, database = 'TEST_PROJECT', search_query = 'thrombosis AND venous',
use_negation = TRUE, hide_duplicates = TRUE, skip_after_event = TRUE,
tag_query = list(exact = FALSE, nlp_apply = FALSE, include = list(text_tag_1 = c("admission"),
text_tag_2 = c("impression", "plan")), exclude = NA))

## End(Not run)

simon-hans/CEDARS documentation built on Feb. 14, 2024, 3:16 a.m.