And that which our teachers the authors of the Tosafot wrote (70b, s.v. Hatam), and this is their wording: And regarding a get of a shekhiv mera, the Ri says that one must be careful that he does not become impaired between the writing and the giving, etc. Thus far their words. Their intention is not that the impairment in the interim invalidates the get, but rather this is the explanation: that if after the writing he became impaired and gave it to her while he was impaired, even if he recovered afterwards, we do not say "the matter is revealed" that he was sane when he gave her the get and it was merely a temporary stupor that seized him and the get is valid. Rather, we are in doubt lest he was a shoteh at the time of the giving, and she is a safek divorcee (Beit Yosef). Or, their intention is that they are obligated to see before the giving that he stands in a sane mind at the time of the giving; and if we did not see, and after an hour we saw him in an impairment of mind, we are concerned also regarding the time of giving, for it is not appropriate to establish him on the chazakah of the time of writing—that he was sane—and to say that also at the time of giving he was sane, for since he is prone to impairment, he has no chazakah (and see Maharsha and Pnei Yehoshua there). And that which is written in the Seder Ketivat HaGet of the Rosh, of blessed memory, and this is his wording: And if a shekhiv mera commands to write a get for his wife, the sofer shall be careful that the sick person be sane and composed in his mind from the beginning of the writing until the completion of its giving, for if his mind becomes disordered in the interim, even though his mind returns to him, the get is invalid. Thus far his words. This is a printing error, and it should say: until the completion of its writing (Beit Yosef). And so too the Tur at the end of siman 154, who transcribed this Seder from the Rosh, wrote explicitly: from the beginning of the writing of the get until the completion of its writing, see there. And so too our teacher Yerucham transcribed it thus, and not like what is written before us in the Rosh, see there (ibid.). And so it is implied from what he wrote, "that the sofer shall be careful," for if it were according to the version before us, the "carefulness" would be upon the arrangers of the get; but regarding the time of writing, the language of "carefulness" is appropriate for the sofer who writes before him. Nevertheless, our teacher, the Rema, wrote in Darkei Moshe, letter 1, that since also in the Seder HaGet found in our hands it is written according to the language in the Tosafot and the Rosh, it is good to be concerned for his words. Thus far his words. And so wrote some of the great Acharonim (Beit Shmuel, subsection 5), and only ex post facto should one be lenient (ibid.). And I do not understand their words; what relevance is there here for "ab initio" and "ex post facto"? Is it in our hands that the mind of the sick person should not be interrupted in the middle? And if we say that their intention is that when he becomes insane in the middle, one should ab initio arrange another get, this is even more wonderous; for who can say to us that in the second one it will not be so? And furthermore, how shall we not be concerned for the "tikkun ha-olam," lest there will not be time to arrange another get in its entirety? Therefore, their words are not clarified to me, in my humble opinion, and the main point is like the words of our teacher, the Beit Yosef.
וזה שכתבו רבותינו בעלי התוס' (ע': ד"ה התם) וז"ל ובגט שכ"מ אומר ר"י דצריך ליזהר שלא יתקלקל בין כתיבה לנתינה וכו' עכ"ל אין כוונתם דהקלקול בינתים פוסל הגט אלא דה"פ דאם אחר הכתיבה נתקלקל ונתנו לה בעודו מקולקל אע"פ שנשתפה אח"כ לא אמרינן איגלאי מילתא דשפוי היה כשנתנו לה הגט ותונבא בעלמא הוא דנקיט ליה והגט כשר אלא מספקינן שמא שוטה היה בשעת הנתינה והיא ספק מגורשת (ב"י) או שכוונתם שמחוייבים לראות קודם הנתינה שעומד בדעת שפויה לעת הנתינה ואם לא ראינו ואחר שעה ראינוהו בקלקול דעת חוששין גם אשעת נתינה דלא שייך לאוקמיה אחזקת זמן כתיבה ששפוי היה ונאמר דגם בשעת הנתינה שפוי היה דכיון דהוא עלול לקלקול אין אצלו חזקה (וע' מהרש"א ופ"י שם) וזה שכתוב בסדר כתיבת הגט להרא"ש ז"ל וז"ל ואם שכ"מ מצוה לכתוב גט לאשתו יזהר הסופר שיהא החולה שפוי ומיושב בדעתו מתחלת הכתיבה עד גמר נתינתו שאם תטרוף דעתו בנתים אע"פ שתחזור דעתו עליו הגט פסול עכ"ל טעות הדפוס הוא וצ"ל עד גמר כתיבתו (ב"י) וכן הטור בס"ס קנ"ד שהעתיק הסדר הזה מהרא"ש כתב להדיא מתחלת כתיבת הגט עד גמר כתיבתו ע"ש וכן רבינו ירוחם העתיק כן ולא כמ"ש לפנינו בהרא"ש ע"ש (שם) וכן משמע ממ"ש שהסופר יזהר ואי כפי הגירסא שלפנינו הזהירות הוא על מסדרי הגט אבל על שעת כתיבה שייך לשון זהירות על הסופר שהוא כותב תחתיו ומ"מ כתב רבינו הרמ"א בד"מ אות א' דכיון דגם בסדר הגט הנמצא בידינו כתוב כלשון שבתוס' ורא"ש טוב לחוש לדבריו עכ"ל וכ"כ מגדולי אחרונים (ב"ש סק"ה) ורק בדיעבד יש להקל (שם) ואיני מבין דבריהם מה שייך כאן לכתחלה ודיעבד אטו בידינו הוא שלא תופסק דעת החולה באמצע ואם נאמר דכוונתם שכשנשתטה באמצע יש לכתחלה לסדר גט אחר זהו יותר תמוה ומאן לימא לן שבהשני לא יהיה כן ועוד דאיך לא נחוש לתק"ע שמא לא יהיה שהות לסדר גט אחר בשלימות ולכן דבריהם לא נתבררו אצלי לענ"ד והעיקר כדברי רבינו הב"י: