"that is within, internal," 1590s, from in (adv.). Sense of "holding power" (the in party) first recorded c. 1600; that of "exclusive" (the in-crowd, anin-joke) is from 1907 (in-group); that of "stylish, fashionable" (the in thing) is from 1960.
"suffering, injured, or sick person under medical treatment," late 14c., from Old French pacient (n.), from the adjective, from Latin patientem "suffering" (see patience). In Middle English also of anyone who suffered patiently.
<a href="https://www.etymonline.com/word/in-patient">Etymology of in-patient by etymonline</a>
Harper, D. (n.d.). Etymology of in-patient. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/in-patient