A police officer still cannot search in that situation (except airports, government buildings, etc) without probable cause, search warrant, or consent. A hospital I work at has signs posted saying you are subject to search, but those searches are done by security staff or others, not police...