This function extracts the Event- usually a therapeutic event, from the text eg endoscopic mucosal resection, radiofrequency ablation etc. It does not currently include stricture dilatation.Specfically it extracts the event

Barretts_EventType(dataframe, HistolReportColumn, ProcPerformedColumn,
  EndoReportColumn, EndoFindingsColumn)

Arguments

dataframe

the dataframe

HistolReportColumn

The histology main text

ProcPerformedColumn

The Procedure Performed column

EndoReportColumn

The endoscopic diagnosis column

EndoFindingsColumn

The endoscopic findings column if different to the Diagnosis column

Examples

# Firstly relevant columns are extrapolated from the # Mypath demo dataset. These functions are all part of Histology data # cleaning as part of the package. v<-HistolAccessionNumber(Mypath,'Histology', 'SP-\\d{2}-\\d{7}') v<-HistolDx(v,'Diagnosis') v<-HistolExtrapolDx(v,'Diagnosis')
#> Error in paste0("[Cc]arcin|[Cc]ance|[Ll]ymphoma|[Tt]umour|[Dd]yspla|G[Ii][Ss][Tt]|[Ss]tromal|[Ll]eio|[Cc]rohn", userString): argument "userString" is missing, with no default
v<-HistolNumbOfBx(v,'Macroscopicdescription','specimen') v<-HistolBxSize(v,'Macroscopicdescription') # The histology is then merged with the Endoscopy dataset. The merge occurs # according to date and Hospital number v<-Endomerge2(Myendo,'Dateofprocedure','HospitalNumber',v,'Dateofprocedure', 'HospitalNumber') # The function then looks within the Histology and the # Procedure performed, free text endoscopic Findings and the original # whole endoscopy report columns from the merged data set (v) for # EMR/APC/RFA/HALO so that the event for the procedure, is recorded. bb<-Barretts_EventType(v,'Histology', 'ProcedurePerformed','Indications','Findings') rm(v)