Barretts_FUType: Follow up group determination

Description Usage Arguments Examples

Description

This determines the follow up rule a patient should fit in to (according to the British Society for Gastroenterology guidance on Barrett's oesophagus) Specfically it combines the presence of intestinal metaplasia with Prague score so the follow-up group can be determined. It relies on the presence of a Prague score. It should be run after Barretts_PathStage which looks for the worst stage of a specimen and which will determine the presence or absence of intestinal metaplasia if the sample is non-dysplastic. Because reports often do not record a Prague score a more pragmatic approach as been to assess the M stage and if this is not present then to use the C stage extrapolated using the Barretts_Prague function

Usage

1
Barretts_FUType(dataframe, CStage, MStage, IMorNoIM)

Arguments

dataframe

the dataframe(which has to have been processed by the Barretts_PathStage function first to get IMorNoIM and the Barretts_PragueScore to get the C and M stage if available),

CStage

CStage column

MStage

MStage column

IMorNoIM

IMorNoIM column

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Firstly relevant columns are extrapolated from the
# Mypath demo dataset. These functions are all part of Histology data
# cleaning as part of the package.
# Mypath demo dataset. These functions are all part of Histology data
# cleaning as part of the package.
v<-Mypath
v$NumBx<-HistolNumbOfBx(v$Macroscopicdescription,'specimen')
v$BxSize<-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 relies on the other Barrett's functions being run as well:
v$IMorNoIM<-Barretts_PathStage(v,'Histology')
v<-Barretts_PragueScore(v,'Findings')

#The follow-up group depends on the histology and the Prague score for a
# patient so it takes the processed Barrett's data and then looks in the
# Findings column for permutations of the Prague score.
v$FU_Type<-Barretts_FUType(v,"CStage","MStage","IMorNoIM")
rm(v)

sebastiz/EndoMineR_devlop documentation built on May 29, 2019, 7:33 a.m.