The aim is to extract a C and M stage (Prague score) for Barrett's samples. This is done using a regex where C and M stages are explicitly mentioned in the free text Specfically it extracts the Prague score

Barretts_PragueScore(dataframe, EndoReportColumn)

Arguments

dataframe

dataframe with column of interest

EndoReportColumn

column of interest

Examples

#The example takes the endoscopy demo dataset and searches the # Findings column (which contains endoscopy free text about the # procedure itself). It then extracts the Prague score if relevant. I # find it easiest to use this on a Barrett's subset of data rather than # a dump of all endoscopies but of course this is a permissible dataset # too aa<-Barretts_PragueScore(Myendo,'Findings')