<PAGE>   1
                                                                EXHIBIT 10.1

                      AMENDMENT NO. 2 TO CREDIT AGREEMENT

     THIS AMENDMENT AGREEMENT is made and entered into as of this 22nd day of
July, 1997, by and among MEDPARTNERS, INC., a Delaware corporation as Borrower,
NATIONSBANK, NATIONAL ASSOCIATION (successor by merger of NationsBank, National
Association (South)), as Administrative Agent for the Lenders, THE FIRST
NATIONAL BANK OF CHICAGO, as Documentation Agent for the Lenders, and the
Lenders, as each of such capitalized terms is defined under the Credit
Agreement described below;

                                  WITNESSETH:

     WHEREAS, the parties hereto have entered into a Credit Agreement dated as
of September 5, 1996, as amended (the "Credit Agreement") pursuant to which the
Lenders have agreed to make Loans to the Borrower in the principal amount of up
to $1,000,000,000 and to provide certain related credit facilities; and

     WHEREAS, the Borrower has requested that certain provisions of the Credit
Agreement be amended; and

     WHEREAS, the Agents and the Lenders, subject to the terms and conditions
hereof, are willing to make such amendments, as provided herein;

     NOW, THEREFORE, the Borrower, the Agents and the Lenders do hereby agree
as follows:

     1.   Definitions.  The term "Credit Agreement" as used herein and in the
other Loan Documents (as defined in the Credit Agreement) and all other
references to the Credit Agreement shall mean and refer to the Credit Agreement
referred to above, as hereby amended and modified.  Unless the context otherwise
requires, all capitalized terms used herein without definition shall have the
definition provided therefor in the Credit Agreement.

     2.   Certain Amendments to Credit Agreement.  Subject to the conditions
hereof, the Credit Agreement is hereby amended as follows:

          (a)  the following new definitions are added to Section 1.1:

               "'Eligible Subordinated Debt' means Subordinated Debt of the
          Borrower for which a like amount of United States Treasury Securities
          are held by a collateral agent as security for the obligation of TAPS
          Investors to purchase common stock of the Borrower."

               "'Subordinated Debt' means any unsecured Indebtedness of the 
          Borrower (other than inter-company Indebtedness) which is
          subordinated in right of payment in all aspects to the Obligations
          in a manner acceptable to the Required Lenders."



                                      1
<PAGE>   2
     "'TAPS' means Threshold Appreciation Price Securities issued by the
Borrower to a TPS Investor, the proceeds of which are used to acquire United
States Treasury Securities which are pledged to secure the obligation of a TAPS
Investor to purchase common stock of the Borrower at a future date."

     "'TAPS Investor' means the purchaser of a TAPS which purchaser shall have
simultaneously with purchasing a TAPS entered into a contract to purchase
common stock of Borrower at a future date."

     "'TAPS Payment' means subordinated yield enhancement payments which are
made by the Borrower to the TAPS Investor pursuant to a purchase contract
providing for the future purchase of common stock of the Borrower by a TAPS
Investor."

     (b)  The definition of "Consolidated EBITDA" in Section 1.1. is hereby
amended (i) by deleting the word "and" at the end of clause (C), (ii) by adding
a comma and the word "and" immediately before the word "plus" at the end of
clause (D), and a new clause (E) reading as follows:

          "(E) adding back up to (x) a $45,000,000 settlement payment made to
          Coram in settlement of the Coram Litigation and (y) all legal fees and
          other out-of-pocket expenses incurred in connection with the Coram
          Litigation"

     (c)  The definition of "Consolidated Indebtedness" in Section 1.1 is
hereby amended in its entirety so that as amended it shall read as follows:

          "'Consolidated Indebtedness' means all Indebtedness, excluding
    Eligible Subordinated Debt, of the Borrower and its Subsidiaries, all
    determined on a consolidated basis."

     (d)  The definition of "Consolidated Interest Expense" in Section 1.1 is
hereby amended (i) by deleting the word "and" at the end of clause (iii), (ii)
by adding the word "and" at the end of clause (iv) immediately preceding the
word "all" and a new clause (v) reading as follows:

          "(v) all interest paid with respect to Eligible Subordinated Debt and
     all TAPS Payments,"

     (e)  Clause (e) of Section 8.4 is hereby amended in its entirety so that as
amended it shall read as follows:

          "(e) unsecured intercompany indebtedness for loans and advances made
     by the Borrower or any Subsidiary to the Borrower or any Subsidiary;"    



                                      2
<PAGE>   3
      (f)   Clause (c) of Section 8.5 is amended in its entirety so that as
amended it shall read as follows:

            "(c) sale of assets of the Borrower and its Subsidiaries so long as
      such assets have an aggregate book value not exceeding (x) three percent
      (3%) of Consolidated Total Assets in any single instance or (Y) five
      percent (5%) of Consolidated Total Assets in the aggregate from the
      Closing Date through the Revolving Credit Termination Date;"

      (g)   Clause (e) of Section 8.6 is hereby amended in its entirety so that
as amended it shall read as follows:

            "(e) investment in Subsidiaries other than pursuant to an
      Acquisition permitted under Section 8.2 so long as (i) such Subsidiary is
      engaged in substantially the same line of business as Borrower, (ii) no
      Default or Event of Default shall have occurred and be continuing either
      immediately prior to or immediately after giving effect to the creation of
      such Subsidiary, (iii) if the amount of cash or assets invested in such
      Subsidiary have a fair market value in excess of $75,000,000 the Borrower
      shall have furnished to the Administrative Agent and the Lenders a
      Compliance Certificate prepared on a historical pro forma basis giving
      effect to the creation of such Subsidiary which certificate shall
      demonstrate that no Default or Event of Default would exist and (iv) if
      the amount of cash or assets invested in such Subsidiary have a fair
      market value in excess of $150,000,000 the Required Lenders shall have
      consented to the creation of such Subsidiary;"

      (h)   Clause (g) of Section 8.6 is hereby amended in its entirety so that
as amended it shall read as follows:

            "(g) additional investments in Persons not constituting Subsidiaries
      engaged in the delivery of health care services, which investments shall
      at no time exceed in the aggregate two percent (2%) of Consolidated Total
      Assets;"

      (i)   Schedule 6.4 to the Agreement is hereby amended by adding thereto
the Supplement to Schedule 6.4 attached to this Amendment Agreement.

3.    Representations and Warranties.  The Borrower hereby represents and
warrants it:

      (a)   The representations and warranties made by or with respect to the
Borrower and its Subsidiaries in Article VI of the Credit Agreement are true
and correct in all material respects on and as of the date hereof;

      (b)   There has been no material change in the business, properties,
prospects or condition, financial or otherwise, of the Borrower and its
Subsidiaries, taken as a whole,



                                      3
<PAGE>   4
      since the Closing Date, other than changes in the ordinary course of
      business, none of which could reasonably be expected to have a Material
      Adverse Effect;

            (c)   The business and properties of the Borrower and its
      Subsidiaries are not, and since the Closing Date have not been, adversely
      affected in any substantial way as the result of any fire, explosion,
      earthquake, accident, strike, lockout, combination of workers, flood,
      embargo, riot, activities of armed forces, war or acts of God or the
      public enemy, or cancellation or loss of any major contracts; and

            (d)   Immediately prior to and immediately after giving effect to
      this Amendment, no Default or Event of Default shall exist or be
      continuing.

      4.    Conditions.  This Amendment Agreement shall become effective upon
satisfaction of all the following conditions:

      (i)   the Borrower shall deliver or cause to be delivered to the Agent,
      the following:

            (a)   counterparts (in number requested by the Administrative Agent)
      of this Amendment Agreement duly executed by the Borrower;

            (b)   an opinion of counsel for the Borrower in form and content
      acceptable to the Administrative Agent and its special counsel, and
      including without limitation opinions as to the authorization, execution,
      delivery and binding effect of this Amendment Agreement;

            (c)   payment in full of (i) all fees payable to the Administrative
      Agent and the Lenders, and (ii) the fees and expenses of the
      Administrative Agent and its special counsel accrued to the date hereof;
      and

            (d)   such other instruments and documents as the Administrative
      Agent may reasonably request;

      (ii)  the Administrative Agent shall receive the written consent to this
      Amendment Agreement of the Agents and the Required Lenders; and

      (iii) all instruments and documents incident to the consummation of the
      transactions contemplated hereby shall be satisfactory in form and
      substance to the Administrative Agent and its special counsel; the
      Administrative Agent shall have received copies of all additional
      agreements, instruments and documents which it may reasonably request in
      connection therewith, including evidence of the authority of the Borrower
      to enter into the transactions contemplated by this Amendment Agreement,
      such documents, when appropriate, to be certified by appropriate corporate
      or governmental authorities; and all proceedings of the Borrower relating
      to the matters provided for herein shall be satisfactory to the
      Administrative Agent and its special counsel.



                                      4
<PAGE>   5
     5.   Entire Agreement.  This Amendment Agreement sets forth the entire
understanding and agreement of the parties hereto in relation to the subject
matter hereof, and supersedes any prior negotiations and agreements among the
parties relative to such subject matter.  No promise, conditions, representation
or warrant, express or implied, not herein set forth shall bind any party
hereto, and no one of them has relied on any such promise, condition,
representation or warranty. Each of the parties hereto acknowledges that, except
as in this Amendment Agreement otherwise expressly stated, no representations,
warranties or commitments, express or implied, in connection herewith have been
made by any other party to the other.  None of the terms or conditions of this
Amendment Agreement may be changed, modified, waived or canceled orally or
otherwise, except in the manner provided in the Credit Agreement.

     6.    Full Force and Effect of Agreement.  Except as hereby specifically
amended, modified or supplemented, the Credit Agreement and all of the other
Loan Documents are hereby confirmed and ratified in all respects and shall
remain in full force and effect according to their respective terms.

     IN WITNESS WHEREOF, the parties hereto have caused this Amendment
Agreement to be duly executed by their duly authorized officers, all as of the
day and year first above written.



                                        MEDPARTNERS, INC.

WITNESS:


/s/                                     By:/s/ Peter J. Clemens, IV
-----------------------                    ------------------------------- 
                                        Name:  Peter J. Clemens, IV
                                              ----------------------------
/s/                                     TITLE: VP Finance-Treasurer
-----------------------                       ----------------------------

                                        

                                      5
<PAGE>   6
                                        NATIONSBANK, NATIONAL ASSOCIATION, as 
                                        Administrative Agent for the Lenders



                                        By:/s/ Scott S. Ward
                                           -------------------------------
                                        Name:  Scott S. Ward
                                               ---------------------------
                                        Title: Sr. Vice President
                                               ---------------------------



                                        THE FIRST NATIONAL BANK OF CHICAGO, as
                                        Documentation Agent for the Lenders



                                        By:/s/ Jay G. Sepanski
                                           -------------------------------
                                        Name:  Jay G. Sepanski
                                              ----------------------------
                                        Title: Asst Vice President
                                              ----------------------------    


                         

                                      6
<PAGE>   7
                                        THE FIRST NATIONAL BANK OF CHICAGO



                                        By:/s/ Scott S/ Ward
                                           -------------------------------
                                        Name:  Scott S. Ward
                                              ----------------------------
                                        Title: Sr. Vice President
                                              ----------------------------






                                      7
<PAGE>   8
                                        THE FIRST NATIONAL BANK OF CHICAGO



                                        By:/s/ Jay G. Sepanski
                                               ---------------------------
                                        Name:  Jay G. Sepanski
                                              ----------------------------
                                        Title: Asst. Vice President
                                              ----------------------------

                                      8
<PAGE>   9
                                 CREDIT LYONNAIS NEW YORK BRANCH, Managing Agent



                                 By: /s/ F. Tavangar
                                     -------------------------------------
                                 Name:   Farboud Tavangar
                                     -------------------------------------
                                 Title:  First Vice President
                                     -------------------------------------


                                      9
<PAGE>   10
                                    MORGAN GUARANTY TRUST COMPANY OF NEW YORK,
                                    Managing Agent



                                    By:/s/ Penelope J. B. Cox
                                       ----------------------
                                    Name:  Penelope J. B. Cox
                                         --------------------
                                    Title: Vice President
                                          -------------------









                                     10
<PAGE>   11
                                        BANK OF AMERICA NT & SA, Co-Agent



                                        By: /s/ Edward S. Han
                                            -----------------------------------
                                        Name:   Edward S. Han
                                            -----------------------------------
                                        Title:  Vice President
                                            ----------------------------------- 

















                                     11
<PAGE>   12
                                        Scotiabanc Inc., Co-Agent
               

                                        
                                        By: /s/Dana Maloney
                                            -----------------------------------
                                        Name:  Dana Maloney
                                            -----------------------------------
                                        Title: Relationship Manager
                                            -----------------------------------















                                     12
<PAGE>   13
                                 THE INDUSTRIAL BANK OF JAPAN, LIMITED, Co-Agent
                              



                                 By: /s/Koichi Hasegawa
                                     ------------------------------------------
                                 Name:  Koichi Hasegawa
                                     ------------------------------------------
                                 Title: Senior Vice President and 
                                        Deputy General Manager
                                     ------------------------------------------

















                                     13
<PAGE>   14
                                        MERRILL LYNCH MORTGAGE





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




















                                     14
<PAGE>   15
                                        AMSOUTH BANK OF ALABAMA




                                        By: /s/Allison J. Sanders
                                            -----------------------------------
                                        Name:  Allison J. Sanders
                                            -----------------------------------
                                        Title: Vice President
                                            -----------------------------------



















                                     15
<PAGE>   16
                                       BANKERS TRUST COMPANY
          


                                       By:/s/ Patricia Hogan
                                          --------------------------------------
                                       Name:  Patricia Hogan
                                          --------------------------------------
                                       Title: Vice President
                                          --------------------------------------










                                             



                                     16
<PAGE>   17

                        THE DAI-ICHI KANGYO BANK, LIMITED
                        ATLANTA AGENCY

                        By: /s/ Tatsuji Noguchi
                           ---------------------------------------------------
                        Name:   Tatsuji Noguchi
                             -------------------------------------------------
                        Title:  Joint General Manager
                              ------------------------------------------------



                                     17
<PAGE>   18

                        DEUTSCHE BANK AG NEW YORK BRANCH
                        AND/OR CAYMAN ISLANDS BRANCH


                        By:   /s/ Andreas Dimagi       /s/ Iain Stewart
                           ---------------------------------------------------
                        Name:     Andreas Dimagi           Iain Stewart
                             -------------------------------------------------
                        Title:    Vice President           Vice President
                              ------------------------------------------------




                                     18
<PAGE>   19
                        THE FUJI BANK, LTD. - ATLANTA AGENCY


                        By:    /s/ Toshihiro Mitsui
                           ---------------------------------------------------
                        Name:      Toshihiro Mitsui
                             -------------------------------------------------
                        Title:     Senior Vice President and Senior Manager
                              ------------------------------------------------




                                     19
<PAGE>   20
                        THE LONG-TERM CREDIT BANK OF JAPAN, LIMITED


                        By:    /s/ Satoru Otsubo
                           ---------------------------------------------------
                        Name:      Satoru Otsubo
                             -------------------------------------------------
                        Title:     Joint General Manager
                              ------------------------------------------------




                                     20
<PAGE>   21
                        MELLON BANK, N.A.


                        By:    /s/ Marsha Wicker
                           ---------------------------------------------------
                        Name:      Marsha Wicker
                             -------------------------------------------------
                        Title:     VP
                              ------------------------------------------------





                                     21
<PAGE>   22
                        PNC BANK, KENTUCKY, INC.


                        By:    /s/ Benjamin A. Willingham
                           ---------------------------------------------------
                        Name:      Benjamin A. Willingham
                             -------------------------------------------------
                        Title:     Vice President
                              ------------------------------------------------



                                     22
<PAGE>   23
                        THE SANWA BANK, LIMITED ATLANTA AGENCY


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





                                     23
<PAGE>   24
                        THE SUMITOMO BANK, LIMITED, ATLANTA AGENCY


                        By:    /s/ Masayuki Fukushima
                           ---------------------------------------------------
                        Name:      MASAYUKI FUKUSHIMA
                             -------------------------------------------------
                        Title:     JOINT GENERAL MANAGER
                              ------------------------------------------------




                                     24
<PAGE>   25
                        WACHOVIA BANK OF GEORGIA


                        By:     /s/ John C. Canty
                           ---------------------------------------------------
                        Name:       John C. Canty
                             -------------------------------------------------
                        Title:      Banking Officer
                              ------------------------------------------------




                                     25
<PAGE>   26
                        THE MITSUI TRUST AND BANKING COMPANY, LIMITED


                        By:    /s/ Margaret Holloway
                           ---------------------------------------------------
                        Name:      MARGARET HOLLOWAY
                             -------------------------------------------------
                        Title:     VICE PRESIDENT & MANAGER
                              ------------------------------------------------





                                     26
<PAGE>   27
                        THE YASUDA TRUST AND BANKING COMPANY,
                        LIMITED, NEW YORK BRANCH




                        By:    /s/ Morikazu Kimura
                           -----------------------------------------
                        Name:      Morikazu Kimura
                             ---------------------------------------
                        Title:     Chief Representative
                              --------------------------------------



                                     27
<PAGE>   28
                        ABN AMRO BANK N.V.


                        By:     /s/ Larry Kelley
                           ---------------------------------------------------
                        Name:       Larry Kelley
                             -------------------------------------------------
                        Title:      Group Vice President
                              ------------------------------------------------



                        By:     /s/ Steven Hipsman
                           ---------------------------------------------------
                        Name:       Steven Hipsman
                             -------------------------------------------------
                        Title:      Vice President
                              ------------------------------------------------




                                     28
<PAGE>   29
                        THE SUMITOMO TRUST AND BANKING CO., LTD.
                        NEW YORK BRANCH


                        By:     /s/ Suraj P. Bhatta
                           ---------------------------------------------------
                        Name:       SURAJ P. BHATTA
                             -------------------------------------------------
                        Title:      SENIOR VICE PRESIDENT
                              ------------------------------------------------
                                    MANAGER, CORPORATE FINANCE DEPT.
                              ------------------------------------------------




                                     29
<PAGE>   30
                        THE MITSUBISHI TRUST AND BANKING CORPORATION


                        By:     /s/ Hachiro Hosoda
                           ---------------------------------------------------
                        Name:       Hachiro Hosoda
                             -------------------------------------------------
                        Title:      Deputy General Manager
                              ------------------------------------------------




                                     30
<PAGE>   31
                        BANK OF TOKYO-MITSUBISHI TRUST COMPANY


                        By:    /s/ Douglas J. Weir
                           ---------------------------------------------------
                        Name:      Douglas J. Weir
                             -------------------------------------------------
                        Title:     Vice President
                              ------------------------------------------------



                                     31
<PAGE>   32
                        UNION BANK OF CALIFORNIA, N.A.


                        By:     /s/ Cary Moore
                           ---------------------------------------------------
                        Name:       Cary Moore
                             -------------------------------------------------
                        Title:      Vice President
                              ------------------------------------------------




                                     32
<PAGE>   33
                        THE SAKURA BANK, LIMITED


                        By:     /s/ Masayuki Kobayashi
                           ---------------------------------------------------
                        Name:       Masayuki Kobayashi
                             -------------------------------------------------
                        Title:      General Manager
                              ------------------------------------------------




                                     33
<PAGE>   34
                                  SCHEDULE 6.4
                               MEDPARTNERS, INC.
                                  INVESTMENTS


EQUITY INVESTMENTS:

Apache Medical Systems, Inc.
Form of entity:         Delaware corporation
Ownership:              18% Preferred Stock by Caremark Inc.

Arcon Healthcare Inc.
Form of entity:         Tennessee corporation
Ownership:              166,667 shares Series B Convertible Preferred Stock by
                        MedPartners, Inc.

Oncology Affiliates, Inc.
Form of entity:         Delaware corporation
Authorized stock:       10,000,000 shares Common Stock and 5,000,000 shares
                        Preferred Stock, $.001 par value
Ownership:              187,463 shares Series A Preferred Stock by MedPartners,
                        Inc.

Preferred Oncology Networks of America, Inc.
Form of entity:         Georgia Corporation
Ownership:              21,666 shares Class A Common Stock [less than 5% Common
                        Stock by Caremark Inc. (actual ownership percentage to
                        be determined by IPO transaction, to provide shares
                        representing $6,050,000)]

Spectrascan Imaging Services, Inc.
Form of entity:         Connecticut corporation
Ownership:              22% Common Stock, 9.2% Preferred-A Stock, 47%
                        Preferred-B Stock, 40% Preferred-C Stock and 
                        21.4% Warrants by Caremark Inc.

Technology Assessment Group
Form of entity:         California general partnership
Ownership:              24% general partnership interest by Caremark
                        International Inc.


                                     34
<PAGE>   35
                                 SUPPLEMENT TO
                                  SCHEDULE 6.4
                               MEDPARTNERS, INC.
                                  INVESTMENTS

NOTES RECEIVABLE:

Atlanta Medical

Coram Healthcare Corporation (Convertible, Non-convertible, and PIK Notes)

Family Physicians

Health Source

High Desert Primary Care

Preferred Oncology Networks
of America

Sierra Meadows

Space Coast Orthopaedic

Stephen H. Hochschuler, MD



                                     35