<PAGE>   1
                                                                    EXHIBIT 10.4


                     SECOND AMENDMENT AND WAIVER TO SECOND
                     AMENDED AND RESTATED CREDIT AGREEMENT

         THIS SECOND AMENDMENT AND WAIVER (this "Amendment") to the Second
Amended and Restated Credit Agreement referred to below is made as of July 28,
1999 by and among NEW AMERICAN HEALTHCARE CORPORATION, a Delaware corporation
(the "Borrower"), TORONTO DOMINION (TEXAS), INC., as agent for the financial
institutions party hereto (in such capacity, the "Agent"), THE TORONTO-DOMINION
BANK, as Issuing Bank and THE FINANCIAL INSTITUTIONS PARTY HERETO (collectively,
the "Banks"; individually, a "Bank").

                                   WITNESSETH

         WHEREAS, the Borrower, the Agent, the Issuing Bank and the Banks are
party to that certain Second Amended and Restated Credit Agreement, dated as of
May 14, 1999 (as amended, supplemented or otherwise modified from time to time,
prior to the date hereof, the "Credit Agreement");

         WHEREAS, the Agent, the Issuing Bank and the Banks have agreed to amend
the Credit Agreement in the manner, and on the terms and conditions, provided
for herein; and

         WHEREAS, the Agent, the Issuing Bank and the Banks have also agreed to
waive compliance with certain financial covenants in the manner, and on the
terms and conditions, provided for herein.

         NOW, THEREFORE, for good and valuable consideration, the receipt and
sufficiency of which are hereby acknowledged, the parties hereto agree as
follows:

         1. CERTAIN DEFINITIONS. Capitalized terms used herein and not otherwise
defined shall have the meanings ascribed to them in the Credit Agreement.

         2. AMENDMENT OF GRACE PERIODS. The text "thirty (30)" in each of
Sections 9.1(b), (c), (e) and (f) is hereby deleted and the text "ten (10)" is
hereby inserted in lieu thereof.

         3. WAIVER OF FINANCIAL COVENANTS. The Banks hereby waive any Event of
Default which arises solely from the failure of Borrower (a) to maintain a Fixed
Charge Coverage Ratio of not less than 1.10 to 1.00 for the fiscal quarter ended
June 30, 1999 and (b) to have EBITDAR of at least $714,000 for the month ended
June 30, 1999, in each case as required by Section 7.18(a) of the Credit
Agreement.

         4. Delivery of Certain Documents. Notwithstanding anything to the
contrary contained in the Credit Agreement, Borrower shall deliver to the Agent,
with sufficient copies for

<PAGE>   2

distribution by the Agent to each of the Banks, on or before August 20, 1999,
the portion of the unaudited Board of Director package for the month ended July
31, 1999 relating to Borrower's compliance with the minimum EBITDAR covenant set
forth in Section 7.18(a)(iv) of the Credit Agreement (including, without
limitation, a statement of revenues and EBITDA and EBITDAR), which package is
required to be delivered to the Agent pursuant to Section 7.2(a) of the Credit
Agreement. The parties hereto acknowledge and agree that any failure to comply
with the foregoing shall constitute an immediate Event of Default for any and
all purposes under the Credit Agreement and the other Loan Documents.

         5. RATIFICATION OF CREDIT AGREEMENT. Except as expressly provided
herein, the Credit Agreement and all other Loan Documents shall continue to be
in full force and effect and are hereby in all respects ratified and confirmed.

         6. REPRESENTATIONS AND WARRANTIES. Borrower hereby represents and
warrants to the Banks that it is not aware of any Incipient Default or Event of
Default. Borrower acknowledges that the Banks are relying on the foregoing
representation and warranty in making their decision to enter into this
Amendment.

         7. GOVERNING LAW. THIS AMENDMENT SHALL BE GOVERNED BY, AND CONSTRUED IN
ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK.

         8. Effectiveness. This Amendment shall become effective upon receipt by
the Agent of nine original copies of this Amendment duly executed and delivered
by the Borrower, the Agent, the Issuing Bank and the Majority Banks.

         9. COUNTERPARTS. This Amendment may be executed in any number of
counterparts, each of which shall be an original with the same effect as if the
signatures thereto and hereto were upon the same instrument.





                            [SIGNATURE PAGES FOLLOW]


<PAGE>   3




         IN WITNESS WHEREOF, each of the parties hereto has executed this
Amendment as of date and year first above written.


                                        NEW AMERICAN HEALTHCARE CORP.



                                        By: /s/ Dana C. McClendon, Jr.
                                            ------------------------------------
                                        Name: Dana C. McClendon, Jr.
                                        Title: SVP-CAO


                                        TORONTO DOMINION (TEXAS), INC.,
                                        As Agent and a Bank



                                        By:
                                            ------------------------------------
                                        Name:
                                        Title:


                                        THE TORONTO-DOMINION BANK,
                                        as Issuing Bank



                                        By:
                                            ------------------------------------
                                        Name:
                                        Title:


                                        NATIONSBANK, N.A.



                                        By:
                                            ------------------------------------
                                        Name:
                                        Title:




                      [SIGNATURES CONTINUED ON NEXT PAGE]


<PAGE>   4




                                        FIRST UNION NATIONAL BANK



                                        By: /s/ James A. Hobensack
                                            ------------------------------------
                                        Name: James A. Hobensack
                                        Title: Senior Vice President


                                        FIRST AMERICAN NATIONAL BANK



                                        By:
                                            ------------------------------------
                                        Name:
                                        Title:


                                        NATIONAL CITY BANK OF KENTUCKY



                                        By:
                                            ------------------------------------
                                        Name:
                                        Title:


                                        BANK ONE, N.A.



                                        By:
                                            ------------------------------------
                                        Name:
                                        Title:


                                        AMSOUTH BANK



                                        By:
                                            ------------------------------------
                                        Name:
                                        Title: