r – Find the difference with the next previous row in a group that meets the criteria

For each line, I try to compute the difference with the closest previous row to the same group that meets certain criteria.

Suppose I have the following data frame:

s <- read.table (text = "Visit_num Patient Day Approved")
1 1 2015/01/01 Yes
2 1 2015/01/10 no
3 1 15.01.2015 Yes
4 1 2015/02/10 no
5 1 2015/03/08 Yes
6 2 01.01.01 Yes
7 2 2015/04/01 no
8 2 2015/04/10 No ", header = T, sep =" ")

For each Visit_num and for each patient, I would like to determine the difference with the next line for which the patient was admitted (ie, Yes). Note that the column is sorted day by day, and the time unit for this example is days.
This is how my data frame should look like:

Visit_num patient day allowed day
1 1 01.01.2015 Yes (NA)
2 1 2015/01/10 No (9)
3 1 15.01.2015 Yes (14)
4 1 2015/02/10 No (26)
5 1 2015/03/08 Yes (52)
6 2 01.01.01 Yes (NA)
7 2 2015/04/01 No (90)
8 2 2015/04/10 No. (99)

Every help is appreciated.