Most workhouses had an infirmary, which was often the only publicly funded health care available prior to the foundation (in the UK) of the National Health Service in 1947. The workhouses themselves were closed down around that time but the infirmary part usually continued in business becoming a state hospital. That’s what happened in Magherafelt. The buildings that had previously been other parts of the workhouse were sometimes converted into hospital facilities or in other cases they were demolished and replaced by more modern buildings. Antrim workhouse became the Massereene Hospital, Ballymena became the Waveney hospital and Belfast workhouse became the City Hospital. And so on.
The workhouse records for Magherafelt will likely be in PRONI in Belfast, as Clare has indicated. There are 2 sets of records. The Board of Guardians minutes are the minutes of the weekly management meetings and are concerned with the usual management issues eg statistics of the numbers of inmates, payment of bills, treatment of diseases, more efficient working procedures and change of personnel. Inmates only get mentioned by name if something remarkable happened eg an assault or damage to property. The other set of records are the admission books. I have attached a page of entries so you can see what you are likely to find. The admission records should give her townland (address) prior to admission. Some workhouses also had separate hospital admission records but they haven’t all survived.