Skip to contents

NLP - Text Cleaning and Extraction:

Functions to clean raw text

textPrep()
Combine all the text cleaning and extraction functions into one
Extractor()
Extract columns from the raw text
DictionaryInPlaceReplace()
Dictionary In Place Replace
NegativeRemove()
Remove negative and normal sentences
NegativeRemoveWrapper()
Wrapper for Negative Remove
spellCheck()
Find and Replace
ColumnCleanUp()
Tidy up messy columns
ListLookup()
Extract from report, using words from a list

NLP - Text merging:

Functions to help merge datasets

EndoPaste()
Paste endoscopy and histology results into one
Endomerge2()
Merge endoscopy and histology data.

NLP - Lexicons:

Basic lexicons

HistolType()
Use list of pathology types
LocationList()
Use list of upper and lower GI standard locations
LocationListUpper()
Use list of standard locations for upper GI endoscopy
LocationListUniversal()
Use list of standard locations for upper GI endoscopy
LocationListLower()
Use list of standard locations for lower GI endoscopy
RFACath()
Use list of catheters used in radiofrequency ablation
EventList()
Use list of endoscopic events and procedures
BiopsyIndex()
Index biopsy locations
GISymptomsList()
Index of GI symptoms
WordsToNumbers()
Convetr words to numbers especially for the histopathology text

Basic Column mutators

Basic Column mutators

ExtrapolatefromDictionary()
Extrapolate from Dictionary
ListLookup()
Extract from report, using words from a list
EntityPairs_OneSentence()
See if words from two lists co-exist within a sentence
EntityPairs_TwoSentence()
Look for relationships between site and event
MyImgLibrary()
Clean html endoscopic images

Specific Text Cleaning - Endoscopy specific cleaning functions:

Functions to help clean endoscopy reports

EndoscEndoscopist()
Clean endoscopist column
EndoscInstrument()
Clean instrument column
EndoscMeds()
Clean medication column
EndoscopyEvent()
Extract the endoscopic event.

Specific Text Cleaning - Histology specific cleaning functions:

Functions to help clean histology text

HistolNumbOfBx()
Extract the number of biopsies taken from the histology report
HistolBxSize()
Determine the largest biopsy size from the histology report
HistolTypeAndSite()
Extract the site a specimen was removed from as well as the type

Basic Analysis Helper - Grouping by endoscopist

Grouping by endoscopist

MetricByEndoscopist()
Plot a metric by endoscopist
CategoricalByEndoscopist()
Group anything by Endoscopist and returns the table

Basic Analysis - Surveillance Functions:

Functions to analyse surveillance intervals

SurveilTimeByRow()
Extract the time difference between each test in days
SurveilLastTest()
Extract the last test done by a patient only
SurveilFirstTest()
Extracts the first test only per patient
TimeToStatus()
Extract the time to an event
HowManyOverTime()
Number of tests done per month and year by indication

Disease Specific Analysis - Barretts Data

Functions for reading and writing Barretts Data.

BarrettsAll()
Run all the basic Barrett's functions
BarrettsBxQual()
Get the number of Barrett's biopsies taken
BarrettsParisEMR()
Run the Paris classification versus worst histopath grade for Barrett's
Barretts_FUType()
Determine the Follow up group
Barretts_PathStage()
Get the worst pathological stage for Barrett's
Barretts_PragueScore()
Extract the Prague score

Disease Specific Analysis - Polyp functions:

Polyp analysis

GRS_Type_Assess_By_Unit()
Create GRS metrics by endoscopist (X-ref with pathology)

Patient Flow functions:

Visualise patient flow

SurveySankey()
Create a Sankey plot for patient flow
PatientFlow_CircosPlots()
Create a Circos plot for patient flow
PatientFlowIndividual()
Create a plot over time of patient categorical findings as a line chart

Data overview:

Basic consort diagrams

sanity()
Create a basic consort diagram from dataframes

Data Presentation helpers:

Functions to help with data visualisation

theme_Publication()
Set the publication theme for all the ggplots
scale_fill_Publication()
Set the fills for all the ggplots
scale_colour_Publication()
Set the colour theme for all the ggplots
EndoBasicGraph()
Basic graph creation using the template specified in theme_Publication.