Mapis Mursa

(ה) הַמֵּפִיס מֻרְסָא בְּשַׁבָּת, אִם לַעֲשׂוֹת לָהּ פֶּה, חַיָּב, וְאִם לְהוֹצִיא מִמֶּנָּה לֵחָה, פָּטוּר...

(5) One who lances an abscess on the Sabbath: if it was to make an opening he is liable; if it was to bring out the pus, he is exempt...

המפיס מורסא בשבת אם לעשות לה פה כדרך שרופאי מלאכת היד עושים לכונת רפואה להכניס שם האויר וליבש את הליחות חייב שהרי מלאכה הצריכה לגופה היא שהרי צריך הוא לפתח זה מצד עצמו.

ואם להוציא ממנה ליחה שיש בה עכשיו ואינו חושש אם תחזור לסורה ותסתם מותר לכתחילה שהרי מלאכה שאינה צריכה לגופה היא ובמקום הסרת נזק מותרת לכתחילה וכמו שאמרו מחט של יד ניטלת לכתחלה ליטול בה את הקוץ והוצאת קוץ והוצאת ליחה הכל א':

אָמַר שְׁמוּאֵל: כֹּל פְּטוּרֵי דְשַׁבָּת פָּטוּר אֲבָל אָסוּר, לְבַר מֵהָנֵי תְּלָת דְּפָטוּר וּמוּתָּר...

וְאִידַּךְ: הַמֵּפִיס מוּרְסָא בְּשַׁבָּת, אִם לַעֲשׂוֹת לָהּ פֶּה — חַיָּיב, אִם לְהוֹצִיא מִמֶּנָּה לֵחָה — פָּטוּר.

With regard to this issue Shmuel said: With regard to all exempt rulings in the halakhot of Shabbat, although one who performs the action is exempt by Torah law, his action is prohibited by rabbinic law, with the exception of these three for which he is exempt and it is permitted to perform the action.
And another example where he is exempt and it is permitted is: One who drains an abscess containing pus on Shabbat, if he did so to create a permanent opening in it, he is liable. However, if he did so to drain fluid from it, he is exempt.

המפיס - מבקע מורסא קויטור"א: אם לעשות לה פה - בתוספתא תני הכי אם לקולפה ולעשות לה פה כדרך שרופאים של עכשיו עושין דמתקן לה פתח: חייב - משום בונה פתח או משום מתקן כלי מה לי לתקן מכה מה לי לתקן כלי: ואם להוציא לחה - של עכשיו ואינו חושש אם תחזור ותסתום מיד: פטור - ומותר דאין כאן תיקון ורבנן נמי לא גזור בה שבות משום צערא:

(א) אם לעשות לה פה
שמרחיב הנקב כדי שישאר פתוח תמיד:

(א) חייב משום בונה, דבבעל חי נמי שייך בניין, כדכתיב ויבן את הצלע [רש"י כתובות ד"ו ע"ב]. גם חייב משום מכה בפטיש [רש"י שבת ק"ז א']:

וְרַבִּי יְהוּדָה? הָתָם — מְתַקֵּן הוּא, כִּדְרַב אָשֵׁי. דְּאָמַר רַב אָשֵׁי: מַה לִּי לְתַקֵּן מִילָּה, מַה לִּי לְתַקֵּן כְּלִי. מַה לִּי לְבַשֵּׁל פְּתִילָה, מַה לִּי לְבַשֵּׁל סַמָּנִין.

For Rav Ashi said: What difference is there to me between repairing the child through circumcision and repairing a vessel? They are both constructive acts. And what difference is there to me between cooking a lead wick, as a melted lead wick was poured down the throat of the criminal sentenced to execution by burning, and cooking herbs used to produce dyes in the Tabernacle? The Torah addressed these cases specifically because they are constructive, and nothing can be derived from them with regard to liability for performance of destructive labors.