Unless otherwise allowed by state or federal law or regulation, the management of a long-term care facility at which an automated medication system is located shall not require a resident of the facility to obtain medication through the automated medication system and shall not restrict or impair the ability of a resident of the facility to obtain medications from the pharmacy of the resident's choice.