This determines the time difference between each test for a patient in days It returns the time since the first and the last study as a new dataframe.
SurveilTimeByRow(dataframe, HospNum_Id, Endo_ResultPerformed)
| dataframe | dataframe, |
|---|---|
| HospNum_Id | Patient ID |
| Endo_ResultPerformed | Date of the Endoscopy |
Other Basic Analysis - Surveillance Functions:
HowManyOverTime(),
SurveilFirstTest(),
SurveilLastTest(),
TimeToStatus()
aa <- SurveilTimeByRow( Myendo, "HospitalNumber", "Dateofprocedure" )