Preparing Your Patient Notes Data for Upload to Brim: Common Gotchas and How to Fix Them

Brim expects a very specific CSV structure. Clinical notes data is especially tricky because the text of notes often contains commas, line breaks, and quotation marks — the same characters that give a CSV file its structure. This guide walks through the most common issues and how to resolve them before uploading.

Here's what Brim expects:

The data CSV has one document per row, and should be formatted as described below. Note that the field name must be in the CSV header.

Each row must have a unique pair of NOTE_ID and PERSON_ID fields in order to be successfully imported.

Field Name Field Description

Notes


NOTE_ID Alphanumeric identifier of the Note The combination of NOTE_ID and PERSON_ID must be unique for each row.
PATIENT_ID Alphanumeric identifier for the Patient The combination of NOTE_ID and PATIENT_ID must be unique for each row.
NOTE_DATETIME Timestamp when a note was written. Format must be: "YYYY-MM-DD HH:MM:SS" Other formats that are  also accepted areMM/DD/YYYY HH:MM:SS   and MM/DD/YYYY . When in doubt, use the recommended format to avoid ambiguity.
NOTE_TEXT The text of the note. Note text fields are wrapped in double quotes.
NOTE_TITLE The title of the note.

It is helpful if the notes have meaningful titles that contain the note type e.g. "Pathology Report", "ED Intake".

If NOTE_TITLE is missing or empty for a row, Brim will not error, it will substitute the placeholder text "Note Type" as the title. If you see "Note Type" appearing in Brim where you expected a meaningful title, check your NOTE_TITLE column for empty values.

Note: The alphanumeric identifier for the Patient may be specified using either PERSON_ID or PATIENT_ID as the header. Both formats are accepted and treated equivalently. The alphanumeric identifier for Note may be specified using either NOTE_ID or DOCUMENT_ID. Both formats are accepted and treated equivalently.

Common Gotchas

Here are some common reasons you may be having issues with your file:

Gotcha 1: Opening the CSV in Excel — and then saving it. When Excel opens a CSV and you save it, Excel silently:

  • Reformats dates (2023-01-15 09:30:00 → 1/15/2023 or worse) and strips time components from timestamps
  • Truncates note text longer than 32,767 characters with no warning
  • Adds or removes quotes in ways that break field boundaries
  • Converts numeric NOTE_IDs or PERSON_IDs to scientific notation (e.g., 1234567890 → 1.23457E+09)

Fix: Do not open your final CSV in Excel. Use Notepad/TextEdit in plain text mode. If you must use Excel, export to CSV only from its original source — never re-save a CSV that Excel has opened.


Gotcha 2: Line breaks inside note text. Clinical notes almost always have line breaks — "Chief Complaint:" on one line, the actual complaint on the next. In a CSV, an unquoted line break is read as a new row, so one note becomes 10 rows and the entire file falls apart. Fix: The note text fields must be wrapped in double quotes AND any internal line breaks must be preserved inside those quotes.


Gotcha 3: Commas inside note text or titles. A note saying "Patient has hypertension, diabetes, and hyperlipidemia" contains commas. If the field isn't properly wrapped in double quotes, Brim reads those commas as column separators and the row breaks. Fix: Wrap all NOTE_TEXT and NOTE_TITLE fields in double quotes.


Gotcha 4: Quotation marks inside note text. A note might contain a quote: Patient reported "no pain". In Brim's CSV format, that quote needs to be doubled: Patient reported ""no pain"". A single unescaped quote inside a quoted field will corrupt everything from that point forward in the file. Fix: Find-and-replace all " with "" inside text fields before wrapping them in outer quotes.


Gotcha 5: Wrong or mismatched column headers. Brim's column names must be exact. These will fail: Note ID, NoteID, text. Fix: Double-check headers match exactly: NOTE_ID, PERSON_ID, NOTE_DATETIME, NOTE_TEXT, NOTE_TITLE.


Gotcha 6: Duplicate NOTE_ID + PERSON_ID pairs. If the same note appears twice for the same patient (e.g., from a data export that joined tables incorrectly), Brim will reject those rows. Fix: Before uploading, check for duplicates.


Gotcha 7: File encoding issues. Excel on Windows saves CSVs in Windows-1252 encoding by default, not UTF-8. Clinical notes often contain smart quotes, em dashes, and other characters that get garbled when the encoding is wrong. You might see characters like “ instead of ". Fix: When saving from Excel, choose "CSV UTF-8 (Comma delimited)" from the Save As format dropdown (not just "CSV").


Gotcha 8: Multiple Notes Concatenated in One Row. If your file has multiple notes combined into a single row, Brim will treat the entire contents as one note rather than separate documents. For example, you might expect a patient to have 10 individual documents in Brim, but instead see only one  this means all of that patient's notes were concatenated into a single row before upload.

Important: Brim will not show an error. The file will upload successfully, making this easy to miss.

Fix: This cannot be corrected by reformatting the file. Go back to your data source and re-export, ensuring the file is structured with one note per row before uploading.


Gotcha 9: Empty values in required fields. If your file contains one or more rows with an empty value in a required column, the file will fail to upload. For example, a row without a value in NOTE_DATETIME will cause the upload to fail. Fix: Ensure every required column has a value for each row, then re-upload.


Gotcha 10: Empty NOTE_TEXT fields are silently skipped. If a row has no value in the NOTE_TEXT column, Brim will not show an error — the file will upload successfully, but that row will be quietly dropped and the note will not appear in Brim. You won't know a row was skipped unless you compare your expected document count against what actually loaded. Fix: Before uploading, filter your data to ensure every row has a value in NOTE_TEXT. If some notes genuinely have no text, go back to your data source and investigate before uploading.



Before You Upload — Common Things to Check For:

  • File is saved as .csv, not .xlsx
  • Headers are exactly NOTE_ID, PERSON_ID, NOTE_DATETIME, NOTE_TEXT, NOTE_TITLE
  • NOTE_DATETIME is YYYY-MM-DD HH:MM:SS  .Other formats that are  also accepted areMM/DD/YYYY HH:MM:SS   and MM/DD/YYYY . When in doubt, use the recommended format to avoid ambiguity.
  • Note text fields are wrapped in double quotes.
  • Quotation marks inside note text are doubled ("")
  • No line breaks outside of quoted fields
  • No duplicate NOTE_ID + PERSON_ID combinations
  • File saved as UTF-8 encoding

Brim Error Message Decoder

Brim says… What it means Common cause

What to do


No file uploaded. Please select a CSV file. No file was attached when upload was attempted Form submitted without selecting a file first Select a file before clicking upload
This is not a csv or tsv file. File format is not accepted File was exported as .xlsx or another format instead of CSV Re-export your data as a .csv or .tsv file
Missing header for field {field}! Header: {header} A required column is absent or misnamed in the file header Column was renamed, deleted, or never included. Brim checks for exact matches: NOTE_ID, NOTE_DATETIME, NOTE_TEXT, NOTE_TITLE, PATIENT_ID Check your column headers against the required names. Restore or rename the column shown in the error.
Missing NOTE_ID field NOTE_ID is missing or blank The NOTE_ID column header is absent, or one or more rows have no value in the NOTE_ID column Check that the NOTE_ID column header exists and that every row has a value in that column
Missing PATIENT_ID field PATIENT_ID is missing or blank The PATIENT_ID column header is absent, or one or more rows have no value in the PATIENT_ID column Check that the PATIENT_ID column header exists and that every row has a value in that column
Invalid PATIENT_ID: {mrn} An MRN value contains characters Brim can't accept MRN contains unsupported characters. Letters, numbers, and underscores are allowed. Spaces, hyphens, and punctuation (e.g. #  , @  , -  ) will cause this error. Review the MRN values in your source data and remove any special characters
Invalid PATIENT_ID: {mrn} (type mismatch variant) An MRN value is in a format Brim can't read as an identifier MRN column contains a value in an incompatible data type — possibly a float or other non-string value. May also be caused by Excel converting long numeric IDs to scientific notation (e.g. 1.23E+10) Check that MRN values are plain text. If using Excel, format the PATIENT_ID column as Text before exporting to prevent scientific notation conversion.
Found duplicate value and stopped upload. DETAIL: NOTE_ID '{note_id}' for PATIENT_ID '{mrn}' appears multiple times in the file. Two rows share the same NOTE_ID + PATIENT_ID combination Duplicate rows in source data, a join error in your export, or a single note split across multiple rows Search for the NOTE_ID and PATIENT_ID shown in the error. Remove or merge the duplicate rows, then re-upload.
Unable to process date: {date} A date value in NOTE_DATETIME can't be parsed Date is in an unexpected format, or contains a non-date value (e.g. blank, placeholder text, or a number) Check the NOTE_DATETIME column for the value shown in the error. Ensure all dates follow the expected format before re-uploading.
Missing field {column} in {row} A required column is present in the header but has no value in a specific row A cell is blank in a required column, or a row has fewer columns than the header (e.g. due to a stray line break in the data) Find the row indicated and fill in the missing value for the column shown. Check for line breaks embedded in cell values.
Error: could not get PATIENT_ID in {row} {number} An unexpected error occurred while reading the PATIENT_ID value from a row Technical exception — likely a data format issue in that row rather than something the file header would catch Review the row indicated. If the issue isn't obvious, contact your Brim administrator with the full error message.
Error bulk creating patients: {number} for project {project} A system-level error occurred while creating patient records Technical exception not typically caused by file content Try uploading again. If the error persists, contact your Brim administrator with the full error message.
Error acquiring create patient lock: {number} for project {project} A concurrency conflict prevented the upload from proceeding Another upload for the same project was in progress at the same time Wait for any other active uploads to complete, then try again.
Upload failed: {filename}. Something went wrong during upload — the specific error is usually available in the Upload History table Any unhandled failure during upload processing Check the Upload History table for a more specific error on the same file. If no detail is available, try again or contact your Brim administrator.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.