This determines the last test done by that patient and the time between now and that last test in days

SurveilLastToNow(dataframe, HospNum_Id, Endo_ResultPerformed)

Arguments

dataframe

dataframe

HospNum_Id

Patient ID

Endo_ResultPerformed

Date of the Endoscopy

Examples

bb<-SurveilLastToNow(Myendo,'HospitalNumber', 'Dateofprocedure')