SPRINGFIELD, Mo. -

A mother from Republic is upset over getting detained and ordered to turn over her personal cell phone at her son's latest doctor's appointment last week at Mercy.

The security guard told her she had violated federal privacy laws, referred to as HIPAA.

The mother, Mandi Kay Wilson, often takes pictures at her son's many doctors' appointments because she uses them on the Web-site, gofundme.com, trying to raise money for her son's expensive hearing aids.  He's 7 and going deaf.  But last week at her appointment, her usual picture taking was met with much push back, to the point she thought she was going to wind up in jail.

What Mandi Kay Wilson didn't know when she walked into her son's audiologist appointment last week at Mercy-- was that the doctor was already upset with her.

"I went to take a picture of him during his current hearing test and she was like you cannot take pics here, it's against policy, she was right in my face waving her hands and I was like… I've been able to take pics here before, I don't really know what the problem is… you've never said anything before I've always taken pictures while he was in the hospital and she just wouldn't even give me the time of day when I was trying to speak to her about it, and then finally I got her attention by saying excuse me, I'm trying to figure out what you are talking about.. what is this picture of your daughter that you are so upset about… and why cant I take pictures, whats this policy?  And she comes storming out of the booth and in my face again… and said something is wrong with you, you have a picture of my daughter on the Internet, and I still didn't know what she was talking about because this picture was so small… and that's when I was like you crossed the line, I want to see the director of this department right now," Wilson explained.

Mandi had posted a picture of her son Cruz to facebook.  In the background, was a small frame with the doctor's daughter inside.  Mandi took up the issue with the director of the department and thought this issue was resolved.

"I thought we were going for hearing test, I thought everything was fine and.. well she tells Cruz to go sit in this room and she separates me from my son… so she's like he needs to sit in here and you need to come with me."

That's when Mandi says she got scared, and started recording.

"Even if it's like your own child or whatever, it's just how the federal government how their regulations are.  How many pictures do you have on your phone right now that were taken on property?"

"I don't know," Wilson said.

"Okay, um, could I see those please?"

"No," she said.

"Okay, here's what is going to happen if you do not cooperate.  I am going to have to escort you off the property," the security guard said.

"Okay."

"We will trespass you and they will probably fire you as a patient," the guard said.

"That's fine, I'm already going to withdraw from Mercy that's okay."

"Okay, um, I need to see your identification."

"Are you security?  What's it for?  I'm going leave," she said.

"It's for legal, I need to see identification."

"What kind of legal purposes?" Mandi asked.

"I have to do a report on this because your being trespassed."

"I'm trespassing for what?" she said.

"You are being trespassed for violation of HIPAA," the security guard said.

"I didn't know I was trespassing, I had no idea."

"Well, I am informing you now... you are being trespassed if you come back on this property you will be detained and taken to Greene County Jail."

"Because I took a picture of my son!?  I was unaware that I couldn't take a picture of my son on my phone," she said.

"Well now you know and you are not cooperating because you won't let me see your picture."

Mandi says she tried to leave multiple times, and could not.
A local HIPAA expert says the law is intended for the patient.

"What it was designed to do when it was enacted is to allow people to move their health insurance around easier than it was before.  In addition to that, it protects private health information for patients to help protect them in relation to their info being given out to other people.  It also gives you the ability to request health information from your provider, and they under the law have to give it to you." said attorney Tim Ricker.  "It's a pretty complex law in effect, and they've also enacted regulations to go with the law, so it becomes very confusing who it applies to, and even from a lawyer's perspective, it's a difficult law to understand so I think people get scared because of these civil fines and also there are criminal penalties under the law."

"I get in my car and he (the security guard) stood behind my car for a good while because he was taking down my information on my truck and I finally rolled down my window and said you need to leave, move away from my truck so I can leave. And he was laughing at me," Wilson said.

The mom says she actually had consent to take pictures in that office, because she invited Springfield Batman and wanted to photograph the occasion.

Mercy would not go on camera to comment, but sent us this statement:

Mercy Springfield Communities understands that patients mark milestones in our facilities and want to capture those moments. While the actions of our staff in this situation were out of consideration for the privacy of all of our patients, co-workers and providers, they have prompted the review of how we enforce our policies regarding photography and videography within our facilities. We regret the confusion that this situation caused and want to ensure that there is clarity for both our patients and our staff regarding appropriate use of personal photography and video within our facilities.  The policy is currently under review. The idea is not to prohibit patients from capturing personal memories. However, we want to ensure that we protect everyone’s right to privacy. That includes other patients, visitors, co-workers and providers who may not want to appear in someone else’s photograph, video or recording.

WATCH: Mercy Hospital security detains mother; see what happened