National All Schedules Prescription Electronic Reporting Act of 2004 - Amends the Public Health Service Act to require the Secretary of Health and Human Services to award grants to approved States to establish a controlled substance monitoring program. Bases the amount of each grant on the ratio of pharmacies in the State receiving such a grant to the number of pharmacies in all approved States.

Requires a State to submit a grant application that shall include proposed penalties for illegal redisclosure of information and proposed standards for: (1) information security; (2) availability of information and limitation on access to program personnel; (3) database access and integrity; and (4) redisclosure of information. Requires the Secretary to approve such an application if the State demonstrates that it will establish or operate a controlled substance monitoring program in accordance with this Act.

Requires an approved State to give notice if it fails to implement such a program. Requires the Secretary to withdrawal approval if the State fails to take corrective action within a reasonable period of time.

Requires an approved State to give the Secretary notice before ceasing to implement or operate such a program.

Requires an approved State to: (1) require dispensers to report within one week of each dispensing of a controlled substance to an ultimate user or research subject; (2) report information in accordance with the specified electronic format; (3) automatically share with another approved State information concerning the dispensing of a controlled substance to a user or subject who resides in such other State or by a practitioner whose principal place of business is in such other State.

Allows a State to notify the appropriate authorities responsible for drug diversion investigations if information in the database indicates an unlawful diversion or misuse of a controlled substance.

Requires the State to establish and maintain an electronic searchable database containing the information reported.

Allows a State to provide information from the database in response to certain requests by practitioners, law enforcement, narcotics control, licensure, disciplinary, or program authorities, the controlled substance monitoring program of another State, and agents of the Department of Health and Human Services (HHS), State Medicaid programs, State health departments, or the Drug Enforcement Administration (DEA). Requires a State to make reasonable efforts to limit the information provided to the minimum necessary and to withhold all individually identifiable information from requests by HHS, State Medicaid programs, State health departments, or DEA.

Requires the Secretary to: (1) specify a uniform electronic format for the reporting, sharing, and provision of information; (2) give preference to approved States in awarding competitive grants related to drug use beginning January 1, 2007; (3) study and report to Congress on such programs, including the progress of States in establishing such programs, the feasibility of implementing a real-time electronic controlled substance monitoring program, and privacy protections.

Authorizes appropriations.
Output: To provide for the establishment of a controlled substance monitoring program in each State.