#' @author Gregoire Versmee, Laura Versmee
result.ID <- function(env, body, token, verbose = FALSE) {
if (verbose) message('\nGetting a result ID')
ID <- httr::content(httr::POST(paste0(env, "/rest/v1/queryService/runQuery"), body = body))$resultId
if (is.null(ID)) {
body <- gsub("ENCOUNTER", "ENOUNTER", body)
ID <- httr::content(httr::POST(paste0(env, "/rest/v1/queryService/runQuery"), body = body))$resultId
if (!is.null(ID)) message(paste("!!!!! PLease, ask the developpers to fix the ENOUNTER issue on", env, "!!!!!"))
else stop("\nInvalid query, process stopped", call. = FALSE)
}
if (verbose) message(paste0(" -> Query #", ID))
return(ID)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.