batch_upload_notes: Upload Notes for Multiple Patients to Database

View source: R/text_processing.R

batch_upload_notesR Documentation

Upload Notes for Multiple Patients to Database

Description

Allows user to populate notes in database from dataframe. 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

batch_upload_notes(
  uri_fun,
  user,
  password,
  host,
  replica_set,
  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.

replica_set

MongoDB replica set, if indicated.

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

## 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)

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