Fee Agreement

Re: Mergers and Acquisitions Advisory Fee Agreement

by QuadraMed Corporation
June 17th, 1998
   1
   
                                                                    EXHIBIT 10.2


                             QUADRAMED CORPORATION
                 80 EAST SIR FRANCIS DRAKE BOULEVARD, SUITE 2A
                           LARKSPUR, CALIFORNIA 94939
                                 (415) 461-7725


                                  June 5, 1998

Nitin T. Mehta
Mehta & Company, Inc.
58 Greenoaks Drive
Atherton, California 94027

       RE:    MERGERS AND ACQUISITIONS ADVISORY FEE AGREEMENT

Dear Nitin:

       This letter confirms our understanding (the "Agreement") that QuadraMed
Corporation (the "Company") has engaged Mehta & Company, Inc. ("Mehta & Co.") to
act as the Company's non-exclusive financial advisor with respect to the
acquisition of potential target corporations or entities ("Target(s)") via a
sale, merger, consolidation or other business combination or alliance in one or
a series a transactions (each, a "Transaction"). Mehta & Co. will undertake
certain services on our behalf in connection with Transactions in our Medical
Records Division, and otherwise to the extent requested by QuadraMed: (i)
identifying and contacting selected qualified Targets; (ii) assisting in
assessment of the operations, historical performance and future prospects of
such Targets, and facilitating due diligence investigation; and (iii) assisting
in negotiating the financial aspects of any proposed Transaction.

       As compensation for services to be provided by Mehta & Co. hereunder,
QuadraMed agrees to pay Mehta & Co. a success fee in an amount equal to five
percent (5%) of the Transaction Value with respect to any Target which becomes a
part of the Company's Medical Records Division or, in the sole and absolute
discretion of QuadraMed, five percent (5%) of the Transaction Value in
connection with any other Transaction by QuadraMed. Any such success fee shall
be payable in cash upon consummation of a Transaction.

       For purposes of this Agreement, "Transaction Value" means the aggregate
consideration received by the Target and/or its equity holders in any
Transaction, plus, in the case of an asset acquisition, the amount of any debt
securities or other liabilities assumed. If consideration or other value
received in any Transaction is paid in whole or in part in the form of
securities or other property or assets, the value of such securities or other
properties or assets, for purposes of calculating the success fee, shall be the
fair market value thereof, as recorded for financial accounting purposes in
connection with the Transaction; provided, however, that if such securities
consist of securities with an existing public trading market, the value thereof
shall be determined by the last sales price for such securities on the last
trading day prior to such consummation. If all or some portion of the
consideration is contingent upon future earnings or 
    

   2
   
operations of the Target, the portion of that future compensation relating
thereto shall be calculated and shall be paid at the time the Transaction is
consummated based upon the estimated net value thereof.

        In order to coordinate our efforts with respect to potential
Transactions, during the period of Mehta & Co.'s engagement hereunder, Mehta &
Co. will not initiate discussions regarding a Transaction without prior notice
to and consent of QuadraMed. If Mehta & Co. receives an inquiry regarding a
Transaction, it will promptly advise QuadraMed of such inquiry in order that 
QuadraMed may evaluate the person making such inquiry and take the lead in any
resulting negotiations.

        In no event shall the aggregate amount of all success fees payable to
Mehta & Co. hereunder exceed $8,750,000.


                                  Very truly yours,

                                  QUADRAMED CORPORATION

                                  By: /s/ John Cracchiolo
                                      ----------------------------------------
                                  Name: John Cracchiolo
                                        --------------------------------------
                                  Title: President and Chief Operating Officer
                                         -------------------------------------

        Accepted as of the date first written above.

                                  MEHTA & COMPANY, INC.

                                  By: /s/ Nitin T. Mehta
                                      ----------------------------------------
                                      Nitin T. Mehta, Chief Executive Officer