Let $a_1,a_2,\dots,a_{30}$ be the finite sequence of the number of pills taken on the days respectively $1,2,\dots,30$. Let $s_1,s_2,\dots,s_{30}$ be the strictly increasing sequence of partial sums of the pills taken up to the day $1,2,\dots,30$, including that day. So $s_1=a_1\ge 1$, $s_2=a_1+a_2=s_1+a_2>s_1$, and so on, $s_{30}=a_1+a_2+\dots+a_{30}\le 48$. (I will remove the hypothesis that the pills have to be taken all at the end, thus relaxing the data of the problem.)
So the problem is equivalent to the following one. Some $30$ different numbers are extracted among the numbers from $1$ to $48$. Show that there are two with difference $11$.
Assume this is false. We are building the bins, $A,B,C,D,E$ as the intervals of integer numbers:
$$
\begin{aligned}
A &= [1,11]\ , & C &= [23,26]\ , & D &= [27,37] \\
B &= [12,22]\ ,&&& E &= [38,48]
\ .
\end{aligned}
$$
Assume we have $a,b;c;d,e$ numbers from the bins $A,B,C,D,E$ respectively in our extraction.
- Each number $x$ from $A$ excludes furthermore the number $x+11$ from $B$ being taken. We mark with a cross this $2a$ places.
- Each number $y$ from $B$ excludes furthermore the number $x-11$ from $A$ being taken. We mark with a cross this $2b$ places.
- So far we have $2(a+b)$ crosses, that do not interfere in the bins $A,B$.
- By symmetry, and the same argument, we obtain $2(d+e)$ crosses that do not interfere in the bins $D,E$.
- Add the $c$ places from $C$ as crosses. We have
$$2a+2b+c+2d+2e$$
distinct crosses in the interval from $1$ to $48$. So
$$
\begin{aligned}
a+b+c+d+e &= 30\ ,\\
2a+2b+c+2d+2e &\le 48\ .
\end{aligned}
$$
Well, it is clear that we have an immediate contradiction. For instance from $c\le 4$ we have
$$
56=
2\cdot 30-4\le 60 -c=2(a+b+c+d+e)-c\le 48\ .
$$
$\square$
We have a slight generalization:
The doctor gave me $$\bbox[lightyellow]{\color{red}{\ 51\ }}$$ pills, to take one or more every day of June. I may take them all till the end of the month, or not. (For instance, I may want to take only $48$ of them.) Then there are some consecutive days where I take exactly $11$ pills.
For the proof, let $N$ be $51$. The bins $A,B$, respectively $D,E$ contain the first $22$, respectively the last $22$ numbers in the interval $[1,N]$. The same argument gives:
$$
60-(N-44)\le 2a+2b+c +2d+2e=N\ ,
$$
so $104\le 2N$, $52\le N$. This is a contradiction for $N=51$, and cannot be improved (to work with this lazy argument).
Note: In a first false answer, I wanted to get the optimal upper bound for the number of pills, the argument using three bins was not clean for the reasons pointed out by Jaap Scherphuis in the comments, (many thanks, unfortunately I cannot give points as credit for this,) and the idea could not be saved. The present five bins estimation is "generous", and may be maybe improved. But my urgent need was to have a valid answer.
Note: A second answer was given, but its generalization suffered. Thanks for putting the finger on the wound to user2357112. I hope it is all fine now.