<PAGE>
                                                                    EXHIBIT 10.1


                               AMENDMENT NO. 5 TO
                              THE CREDIT AGREEMENT

                  AMENDMENT NO. 5 TO THE CREDIT AGREEMENT (this "Amendment")
dated as of July 17, 2002 is entered into by and among AdvancePCS, f/k/a Advance
Paradigm, Inc., a Delaware corporation (the "Borrower"), the Subsidiary
Guarantors party hereto, the Lenders party hereto, Bank One, N.A. ("Bank One"),
as Documentation Agent, Bank of America, N.A. ("Bank of America"), as Collateral
Agent and as Administrative Agent for the Lender Parties, Merrill Lynch, Pierce,
Fenner & Smith Incorporated, as Book-Runner, Lead Arranger and Syndication
Agent, and Banc of America Securities LLC, as Joint Book-Runner and Joint Lead
Arranger. Capitalized terms not otherwise defined in this Amendment have the
same meanings as specified in the Credit Agreement (as defined below).

                  PRELIMINARY STATEMENTS:

                  WHEREAS, the Borrower, the Subsidiary Guarantors, the Lenders
and the Agents have entered into a Credit Agreement dated as of October 2, 2000,
as amended by Amendment No. 1 to the Credit Agreement dated as of November 3,
2000, Amendment No. 2 to the Credit Agreement dated as of June 22, 2001,
Amendment No. 3 to the Credit Agreement dated as of August 24, 2001 and
Amendment No. 4 to the Credit Agreement dated as of May 29, 2002 (as so amended
and as otherwise amended, restated and modified from time to time, the "Credit
Agreement"); and

                  WHEREAS, the Borrower and its subsidiaries have requested that
the Required Lenders approve certain amendments to the Credit Agreement as
described herein; and

                  WHEREAS, the Borrower and each Subsidiary Guarantor that has
its chief executive office at the same location as the Borrower (as indicated on
Schedule IV to the Security Agreement) have each relocated their chief executive
office from the address for each such party set forth in Schedule IV to the
Security Agreement (the "North O'Connor Blvd Address") to the following address:
750 West John Carpenter Freeway, Suite 1200, Irving, TX 75039 (the "WJC Freeway
Address"); provided, however, ADVP Consolidation, L.L.C. is located at the
following address: 103 Foulk Road, Wilmington, DE 19803; and

                  WHEREAS, in connection with such relocation, the Borrower and
each Subsidiary Guarantor located at the same address as the Borrower have each
likewise relocated any Equipment and Inventory previously maintained by each
such party at the North O'Connor Blvd Address to the WJC Freeway Address; and

                  WHEREAS, the Borrower and its subsidiaries have requested that
the Required Lenders agree to waive compliance by the Borrower and each
applicable Subsidiary Guarantor with the requirement to give (i) thirty (30)
days notice of such headquarters relocation as required by Section 13(a) of the
Security Agreement, and (ii) fifteen (15) days notice of such Equipment and
Inventory relocation as required by Section 11(a) of the Security Agreement.

<PAGE>

                  NOW, THEREFORE, in consideration of the mutual promises and
obligations contained herein and other good and valuable consideration, the
receipt and sufficiency of which are hereby acknowledged, the Borrower, the
Subsidiary Guarantors and the Required Lenders have agreed to amend the Credit
Agreement as hereinafter set forth.

                  SECTION 1. Amendment. The Credit Agreement is, effective as of
the Amendment No. 5 Effective Date (as defined herein), hereby amended as
follows:

         (a) Section 5.02(g)(ix)(II) of the Credit Agreement is hereby amended
by deleting such section in its entirety and replacing it with the following:

                  "(II) if any of the requirements set forth in the immediately
         preceding clause (I) is not satisfied, the amount of any payment to
         make such repurchase shall not (x) when aggregated with all other such
         payments made during the same Fiscal Year, exceed $200,000,000 and (y)
         when aggregated with all other such payments made during the term of
         this Agreement, exceed $300,000,000."

         (b) Section 9.02 if the Credit Agreement is amended by deleting the
notice address for the Borrower set forth in the first sentence thereof and
replacing it with the following: 750 West John Carpenter Freeway, Suite 1200,
Irving, TX 75039, Attn: Chief Executive Officer.

                  SECTION 2. Waiver Relating to Relocation of Corporate
Headquarters. The Required Lenders hereby waive compliance by the Borrower and
each Subsidiary Guarantor located at the same address as the Borrower with (i)
the requirement to give thirty (30) days notice of the relocation of its
corporate headquarters as required by Section 13(a) of the Security Agreement,
and (ii) the requirement to give fifteen (15) days notice of the relocation of
any Equipment and Inventory held at such location as required by Section 11(a)
of the Security Agreement. The foregoing waivers shall not operate as a consent
to any action or inaction by the Borrower or any other Loan Party and the
waivers set forth in this Section 2 are one-time waivers and shall not be
construed to be (i) waivers as to future compliance with any provision of the
Credit Agreement or any other Loan Document, (ii) waivers of any other Default
or Event of Default that may exist under any Loan Document or (iii) an amendment
of or modification to the Credit Agreement or any other Loan Document. The
Administrative Agent and the Lenders hereby reserve all of their rights, powers
and remedies under the Credit Agreement, after giving effect to this Amendment
and applicable law.

                  SECTION 3. Conditions of Effectiveness. This Amendment shall
become effective as of the date first above written (the "Amendment No. 5
Effective Date") when, and only when each of the following conditions shall have
been satisfied (it being understood that the satisfaction of one or more of the
following conditions may occur concurrently with the effectiveness of this
Amendment):

                      (a) the Administrative Agent shall have received
         counterparts of this Amendment executed by the Borrower, the Subsidiary
         Guarantors and the Required Lenders or, as to any of the Required
         Lenders, advice satisfactory to the Administrative Agent that such
         Required Lender has executed this Amendment;




                                       2
<PAGE>

                      (b) the Borrower shall have paid any and all out-of-pocket
         costs (to the extent invoiced) incurred by the Administrative Agent
         (including the reasonable fees and expenses of the Administrative
         Agent's legal counsel), and fees and other amounts payable to the
         Administrative Agent, in each case in connection with the arrangement,
         negotiation, preparation, execution and delivery of this Amendment; and

                      (c) the Administrative Agent shall have received (i) a
         certified copy of the resolutions of the Board of Directors of the
         Borrower and each other Loan Party evidencing its approval of this
         Amendment and the other matters contemplated hereby, and a certified
         copy of all documents evidencing other necessary corporate action and
         governmental approvals, if any, with respect to this Amendment and the
         other matters contemplated hereby; (ii) a certificate from a
         Responsible Officer of the Borrower to the effect that, as of the date
         hereof, (A) all representations and warranties made by the Borrower and
         each other Loan Party in this Amendment and each other Loan Document
         are true and correct in all material respects as if made as of the date
         hereof, other than any such representations or warranties that, by
         their terms, refer to a specific date other than the date hereof, in
         which case as of such specific date, and (B) after giving effect to
         this Amendment, no Default or Event of Default has occurred and is
         continuing;

                  SECTION 4. Authority of Administrative Agent. The Required
Lenders hereby acknowledge and agree that pursuant to the authority granted to
the Administrative Agent under Article VIII of the Credit Agreement, the
Administrative Agent has the power to execute and deliver all documents and to
take all such further action on behalf of the Lender Parties as it may deem to
be reasonably necessary to effectuate this Amendment.

                  SECTION 5. Representations and Warranties. Each of the Loan
Parties represents and warrants as follows:

                      (a) the representations and warranties contained in each
         Loan Document are correct in all material respects on and as of the
         date hereof, before and after giving effect to this Amendment, as
         though made on and as of the date hereof, other than any such
         representations or warranties that by their terms, refer to a specific
         date, in which case, as of such specific date;

                      (b) no Default or Event of Default has occurred and is
         continuing under the Credit Agreement, as amended hereby, or would
         result from this Amendment;

                      (c) it has taken all necessary action to authorize
         the execution, delivery and performance of this Amendment;

                      (d) this Amendment has been duly executed and delivered by
         such Loan Party and constitutes such Loan Party's legal, valid and
         binding obligation, enforceable in accordance with its terms, except as
         such enforceability may be limited (x) by general principles of equity
         and conflicts of laws or (y) by bankruptcy, reorganization,



                                       3
<PAGE>

         insolvency, moratorium or other laws of general application relating to
         or affecting the enforcement, of creditors' rights;

                      (e) no consent, approval, authorization or order of, or
         filing, registration or qualification with, any court or governmental
         authority or third party is required in connection with the execution,
         delivery or performance by such Loan Party of this Amendment where not
         completed such action would reasonably be expected to have a Material
         Adverse Effect; and

                      (f) the execution and delivery of this Amendment does not
         diminish or reduce its obligations under the Loan Documents (including,
         without limitation, in the case of each Subsidiary Guarantor, such
         Subsidiary Guarantor's guaranty pursuant to Section 7 of the Credit
         Agreement) in any manner, except as specifically set forth herein.

                      (g) (i) the relocation by the Borrower of its corporate
         headquarters and the Equipment and Inventory located at such location
         does not and will not affect the rights of the Administrative Agent or
         any Lender under any Collateral Document, nor does it affect the
         validity, perfection and/or priority of any security interest granted
         by any Loan Party thereunder, and (ii) in accordance with Sections 10,
         11 and 13 of the Security Agreement, the Borrower and each other Loan
         Party has taken any and all necessary actions to protect any pledge or
         security interest granted thereunder.

                  SECTION 6. Reference to and Effect on the Loan Documents. (a)
On and after the effectiveness of this Amendment, each reference in the Credit
Agreement to "this Agreement", "hereunder", "hereof" or words of like import
referring to the Credit Agreement, and each reference in the Notes and each of
the other Loan Documents to "the Credit Agreement", "thereunder", "thereof" or
words of like import referring to the Credit Agreement, shall mean and be a
reference to the Credit Agreement as amended by this Amendment.

                      (b) The Credit Agreement, the Notes and each of the other
         Loan Documents, as specifically amended by this Amendment, are and
         shall continue to be in full force and effect and are hereby in all
         respects ratified and confirmed.

                      (c) Except as expressly provided herein, the execution,
         delivery and effectiveness of this Amendment shall not operate as a
         waiver of any right, power or remedy of any Lender or the
         Administrative Agent under any of the Loan Documents, nor constitute a
         waiver of any provision of any of the Loan Documents.

                      (d) This Amendment shall constitute a Loan Document and,
         as such, can only be amended in accordance with the provisions of
         Section 9.01 of the Credit Agreement.

                  SECTION 7. Costs, Expenses. The Borrower agrees to pay on
demand all reasonable costs and expenses of the Administrative Agent in
connection with the preparation, execution, delivery and administration of this
Amendment (including, without limitation, the reasonable fees and expenses of
counsel for the Administrative Agent) in accordance with the terms of Section
9.04 of the Credit Agreement.



                                       4
<PAGE>

                  SECTION 8. Execution in Counterparts. This Amendment may be
executed in any number of counterparts and by different parties hereto in
separate counterparts, each of which when so executed shall be deemed to be an
original and all of which taken together shall constitute but one and the same
agreement. Delivery of an executed counterpart of a signature page to this
Amendment by telecopier shall be effective as delivery of a manually executed
counterpart of this Amendment.

                  SECTION 9. Governing Law. This Amendment shall be governed by,
and construed in accordance with, the laws of the State of New York.

              [The rest of this page is intentionally left blank.]


                                       5
<PAGE>
         IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be
executed by their respective officers thereunto duly authorized, as of the date
first above written.



                               BORROWER:


                                        ADVANCEPCS

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title:    CEO

                               SUBSIDIARY GUARANTORS:


                                        ADVANCEPCS HOLDING CORPORATION

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO

                                        ADVANCEPCS HEALTH SYSTEMS, LLC


                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO

                                        ADVANCEPCS HEALTH, L.P.

                                        By ADVANCEPCS HEALTH SYSTEMS, LLC, its
                                        General Partner


                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO


                                        ADVANCEPCS RESEARCH, L.L.C.

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO







<PAGE>
                                        ADVANCERX.COM, L.P.

                                        By ADVANCEPCS HEALTH SYSTEMS, LLC, its
                                        General Partner

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO


                                        ADVP CONSOLIDATION, L.L.C.

                                        By:
                                             -----------------------------------
                                        Name:  Susan de Mars
                                        Title:    General Counsel and Secretary


                                        ADVP MANAGEMENT, L.P.,

                                        By ADVANCEPCS HEALTH SYSTEMS, LLC, its
                                        General Partner

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO


                                        AMBULATORY CARE REVIEW SERVICES, INC.

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO








                                        BAUMEL-EISNER NEUROMEDICAL INSTITUTE,
                                        INC.

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO

                                        FFI RX MANAGED CARE, INC.

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO




<PAGE>

                                        FIRST FLORIDA INTERNATIONAL HOLDINGS,
                                        INC.

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO


                                        HMN HEALTH SERVICES, INC.

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO


                                        ADVANCEPCS MAIL SERVICES OF BIRMINGHAM,
                                        INC.

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO


                                        ADVANCEPCS PUERTO RICO, INC.

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO


                                        ADVANCEPCS SPECIALTYRX, LLC
                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO




                                        AFC RECEIVABLES HOLDING CORPORATION

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO

                                        DRESING-LIERMAN, INC.
                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO

                                        THERACOM, INC.

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO


<PAGE>

                                        CONSUMER HEALTH INTERACTIVE, INC.

                                        By:
                                             -----------------------------------
                                        Name:  David D. Halbert
                                        Title: CEO






<PAGE>
LENDERS (AND OTHER AGENTS)

BANK OF AMERICA, N.A.,
as Initial Lender and Initial Issuing Bank and Lender Party


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


BANK ONE, N.A., as Documentation Agent and Lender Party


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


MERRILL LYNCH, PIERCE, FENNER & SMITH INCORPORATED,
as Syndication Agent and Lender Party


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


------------------------------------------------
[LENDER]

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