(* https://aha.betterexplained.com/t/convolution/679 *)
plan[0]=3;
plan[1]=2;
plan[2]=1;
plan[x_]:=0;
patients[1]=1;
patients[2]=2;
patients[3]=3;
patients[4]=4;
patients[5]=5;
patients[x_]:=0;

f[x_]:=({{\[Piecewise], ({{-x+3, x≥0&&x≤2}, {0, True}})}});
g[x_]:=({{\[Piecewise], ({{x, x≥1&&x≤5}, {0, True}})}});
conv[x_]:=(∑_(i=0)^2)plan[i]*patients[-i+x];
convC=Convolve[f[x],g[x],x,y]

convInterpolated=Interpolation[Table[conv[x],{x,0,10}],InterpolationOrder->1,"ExtrapolationHandler"->{(Indeterminate&),"WarningMessage"->False}];

animateDPlot[t_]:=Show[
Plot[{f[x],g[-x+t],({{\[Piecewise], ({{convInterpolated[x+1], x≤t}, {Undefined, True}})}})},{x,-2,10},
PlotRange->{0,28},
PlotLabel->"t = "<>ToString[t],
AxesLabel->{"t,τ"},
ImageSize->500
],
DiscretePlot[{plan[x],patients[-x+t],({{\[Piecewise], ({{conv[x], x≤t}, {Undefined, True}})}})},{x,-2,10},
PlotLegends->{"Plan[τ]","Patients[-τ+t]","(Plan*Patients)[t]"},
PlotRange->{0,28}
]
];

Manipulate[
animateDPlot[t]
,{t,0,16,1}]

animateTable[t_]:=Grid[{
{"Plan",plan[0],plan[1],plan[2],plan[3],plan[4]},
{"Patients",patients[t],patients[t-1],patients[t-2],patients[t-3],patients[t-4],"*"},{"t="<>ToString[t],plan[0]*patients[t],plan[1]*patients[t-1],plan[2]*patients[t-2],plan[3]*patients[t-3],plan[4]*patients[t-4],"Σ "<>ToString[conv[t]]}
},
Dividers->{{False,False,False,False,False,False,True},{False,False,True}},
ItemSize->{{Automatic,1,1,1,1,1,3},{Automatic,Automatic,1.8}}
];

m=Manipulate[
animateTable[t]
,{t,0,10,1}
]

(*Export[FileNameJoin[{NotebookDirectory[],"frames/t=00.png"}],Table[animateTable[t],{t,0,10,1}],"VideoFrames",ImageSize->500,Antialiasing->True];*)

(*Export[FileNameJoin[{NotebookDirectory[],"frames/t=00.png"}],Table[animateDPlot[t],{t,0,16,1}],"VideoFrames",Antialiasing->True];*)

Show[
DiscretePlot[conv[x],{x,0,9}],
Plot[convC/.{y->x},{x,0,9}]
]