upload_notes: Upload Notes to Database

Description Usage Arguments Value Examples

View source: R/text_processing.R

Description

Allows user to populate notes in database from dataframe; could be easily inserted into wrapper batch function to serially download from other DB etc. Notes dataframe must contain: 'patient_id', 'text_id' (a unique identifier for each text segment), along with 'text', 'text_date', 'doc_id' (designates unique EHR document) and ideally 'text_sequence' which indicates order of text section within document. 'doc_section_name' along 'text_tag_1' to 'text_tag_10' are optional. 'text_date' must be in format '%Y-%m-%d'!

Usage

1
upload_notes(uri_fun, user, password, host, port, database, notes)

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.

port

MongoDB port.

database

MongoDB database name.

notes

Dataframe of EHR documents with metadata. The documents can consist of full notes or note subsections.

Value

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

Examples

1
2
3
4
5
## Not run: 
upload_notes(uri_fun = mongo_uri_standard, user = 'John', password = 'db_password_1234',
host = 'server1234', port = NA, database = 'TEST_PROJECT', notes = simulated_patients)

## End(Not run)

CEDARS documentation built on Feb. 7, 2021, 5:06 p.m.