P value for trend

I would be very grateful if someone could help me with the code for this - I'm reporting the incidence of stroke in patients with diabetes versus no diabetes in 5 year bands, and would like to calculate the P value for trend over time if possible. I've tried the ptrend command but I'm confused about the other syntax. My data looks something like this:

Year Strokes in non-diabetics Strokes in diabetics
2002-2007 238/72243 343/4030
2007-2012 336/74945 282/4375
2012-2017 431/76741 169/4809

Thanks much in advance!