1 Exhibit 10.1 GUARANTY AGREEMENT ("Guaranty") dated as of April 16, 1997, between HEALTH MANAGEMENT SYSTEMS, INC. (the "Guarantor") and THE CHASE MANHATTAN BANK (the "Bank"). PRELIMINARY STATEMENT. The Bank has agreed to provide a One Million Six Hundred Thousand Dollar ($1,600,000) loan (the "Loan") to Robert V. Nagelhout (the "Borrower") pursuant to a Note dated the date hereof between the Bank and the Borrower and any and all documentation executed in connection therewith (as the same may be amended from time to time, the "Note"). It is a condition precedent to the obligation of the Bank to provide the Loan that the Guarantor shall have guaranteed the obligations of the Borrower under the Note to the extent and in the manner herein set forth. NOW, THEREFORE, in consideration of the premises and in order to induce the Bank to provide the Loan to the Borrower as provided in the Note, the Guarantor hereby agrees as follows: SECTION 1. Loan Guaranty. The Guarantor hereby irrevocably, absolutely and unconditionally guarantees to the Bank and its successors, endorsees, transferees and assigns the prompt and complete payment by the Borrower, as and when due and payable (whether on a scheduled payment date, on acceleration or otherwise), of all indebtedness, obligations and liabilities of the Borrower to the Bank now existing or hereafter incurred under or arising out of or in connection with the Loan, whether for principal, interest, fees, expenses or otherwise (all such indebtedness, obligations, and liabilities being herein called the "Loan Obligations"); and agrees to pay any and all expenses (including reasonable counsel fees and expenses) which may be paid or incurred by the Bank by reason of Borrower's default under the Note in collecting any or all of the Loan Obligations and/or enforcing any rights under the Note or under the Loan Obligations (the "Loan Guaranty"). SECTION 2. Guarantor's Obligations Unconditional. The Guarantor hereby guarantees that the Loan Obligations will be paid strictly in accordance with the terms of the Note, regardless of any law, now or hereafter in effect in any jurisdiction affecting any such terms or the rights of the Bank with respect thereto. The obligations and liabilities of the Guarantor under this Guaranty shall be absolute and unconditional irrespective of: (1) any lack of validity or enforceability of any of the Loan Obligations, the Note, or any agreement or instrument relating thereto; (2) any change in the time, manner or place of payment of, or in any other term in respect of, all or any of the Loan Obligations, or any other amendment or waiver of or consent to any departure from the Note; or (3) any other circumstances which might otherwise constitute a defense available to, or a discharge of, a guarantor in respect of the Loan Obligations. 2 This Guaranty is a continuing guaranty and shall remain in full force and effect until: (1) the payment in full of all the Loan Obligations, and (2) the payment of the other expenses to be paid by the Guarantor pursuant hereto. This Guaranty shall continue to be effective or shall be reinstated, as the case may be, if at any time any payment, or any part thereof, of any of the Loan Obligations is rescinded or must otherwise be returned by the Bank upon the insolvency, bankruptcy, dissolution, liquidation or reorganization of the Borrower or otherwise, all as though such payment had not been made. The obligations and liabilities of the Guarantor under this Guaranty shall not be conditioned or contingent upon the pursuit by the Bank or any other person at any time of any right or remedy against the Borrower or any other person which may be become liable in respect of all or any part of the Loan Obligations or against any collateral or security or guarantee therefor or right of setoff with respect thereto. The Guarantor hereby consents that, without the necessity of any reservation of rights against the Guarantor and without notice to or further assent by the Guarantor, any demand for payment of any of the Loan Obligations made by the Bank may be rescinded by the Bank and any of the Loan Obligations continued after such rescission. SECTION 3. Waivers. The Guarantor hereby waives: (a) promptness and diligence; (b) notice of or proof of reliance by the Bank upon this Guaranty or acceptance of this Guaranty; (c) notice of the incurrence of any Loan Obligations by the Borrower or the renewal, extension or accrual of any Loan Obligation; (d) notice of any actions taken by the Bank or the Borrower or any other party under the Note or any other agreement or instrument relating thereto; (e) all other notices, demands and protests, and all other formalities of every kind in connection with the enforcement of the Loan Obligations or of the obligations of the Guarantor hereunder, the omission of or delay in which, but for the provisions of this Section 3, might constitute grounds for relieving the Guarantor of its obligations hereunder; and (f) any requirement that the Bank protect, secure, perfect or insure any lien or security interest, or any property subject thereto or exhaust any right or take any action against the Borrower or any other person or any collateral. SECTION 4. Subrogation. The Guarantor will not exercise any rights which it may acquire by way of subrogation under this Guaranty, whether acquired by any payment made hereunder, by any setoff or application of funds of such Guarantor by the Bank or otherwise, until (a) the payment in full of the Loan Obligations, and (b) the payment of all other expenses to be paid by the Guarantor pursuant hereto. If any amount shall be paid to the Guarantor on account of such subrogation rights at any time when all of the Loan Obligations and all such other 2 3 expenses shall not have been paid in full, such amount shall be held in trust for the benefit of the Bank, shall be segregated from the other funds of the Guarantor and shall forthwith be paid over to the Bank to be credited and applied in whole or in part by the Bank against the Loan Obligations, whether matured or unmatured, and all such other expenses in accordance with the terms of this Guaranty. SECTION 5. Representations and Warranties. The Guarantor represents and warrants as follows as of the date of this Guaranty: (a) The Guarantor is a corporation duly incorporated, validly existing and in good standing under the laws of the jurisdiction of its incorporation, has the corporate power and authority to own its assets and to transact the business in which it is engaged or proposed to be engaged, and is duly qualified as a foreign corporation and in good standing under the laws of each other jurisdiction in which such qualification is required except where failure to qualify would not have a material adverse effect on Guarantor, its assets or properties. (b) The execution, delivery and performance by the Guarantor of the Guaranty has been duly authorized by all corporate action and does not and will not: (i) require any consent or approval of its stockholders; (ii) contravene its charter or by-laws; (iii) violate any provisions of any law, rule, regulation, order, writ, judgment, injunction, decree, determination or award presently in effect applicable to it; (iv) result in a breach of, constitute a default under or otherwise contravene any indenture or loan or credit agreement or any other agreement, lease or instrument to which it is a party or by which it or its properties may be bound or affected; (v) result in, or require, the creations or imposition of any lien, security interest or other charge or encumbrance upon or with respect to any of its properties now owned or hereafter acquired: or (vi) cause it to be in default under any such law, rule, regulation, order, writ, judgment, injunction, decree, determination or award or any such indenture, agreement, lease or instrument. (c) No authorization or approval or other action by, and no notice to or filing with, any governmental authority or other regulatory body is required for the due execution, delivery and performance by the Guarantor of this Guaranty. (d) This Guaranty constitutes a legal valid and binding obligation of the Guarantor enforceable in accordance with its terms, except to the extent that such enforcement may be limited by applicable bankruptcy, insolvency and other similar laws affecting creditor's rights generally. 3 4 (e) Other than as disclosed on Schedule A attached hereto, there is no action, suit or proceeding pending or to Guarantor's knowledge threatened against or otherwise affecting the Guarantor before any court or other governmental authority or any arbitrator which may, in any one case or in the aggregate, materially adversely affect the financial condition, operations, properties or business of the Guarantor or the ability of the Guarantor to perform its obligations under this Guaranty. SECTION 6. Right of Set-Off. If the Borrower defaults in the payments or performance of any of its Loan Obligations the Bank may, and is hereby authorized, at any time and from time to time, without notice to the Guarantor (any such notice being expressly waived by the Guarantor), to set-off and apply any and all deposits (general or special, time or demand, provisional or final) at any time held and other indebtedness at any time owing by the Bank to or for the credit or the account of the Guarantor against any and all obligations of the Guarantor now or hereafter existing under this Guaranty, irrespective of whether or not the Bank shall have made any demand under this Guaranty and although such obligations may be contingent or unmatured. The Bank agrees promptly to notify the Guarantor after any such set-off and application, provided that the failure to give such notice shall not affect the validity of such set-off and application. The rights of the Bank under this Section 6 are in addition to other rights and remedies (including, without limitation, other rights of setoff) which the Bank may have. SECTION 7. Indemnity and Expenses. (a) The Guarantor agrees to indemnify the Bank from and against any and all claims, losses and liabilities growing out of or resulting from this Guaranty to the extent of such claim, loss or liability (including, without limitation, enforcement of this Guaranty against the Guarantor), except claims, losses or liabilities resulting from the Bank's gross negligence or willful misconduct. (b) The Guarantor will upon demand and proof of the expenses being incurred, pay to the Bank the amount of any and all expenses, including the reasonable fees and disbursements of counsel to the Bank and of any experts and agents, which the Bank may incur in connection with the enforcement of this Guaranty. The Guarantor will upon demand and proof of the expenses being incurred, pay to the Bank the amount of any and all expenses, including the reasonable fees and disbursements of counsel to the Bank and of any experts and agents, which the Bank may incur in connection with (i) the exercise or enforcement of any of the rights of the Bank hereunder against the Guarantor, or (ii) the failure by the Guarantor to perform or observe any of the provisions hereof. SECTION 8. Amendments, Etc. No amendment or waiver of any provision of this Guaranty nor consent to any departure by the Guarantor herefrom 4 5 shall in any event be effective unless the same shall be in writing and signed by the Bank, and then such waiver or consent shall be effective only in the specific instance and for the specific purpose for which given. SECTION 9. Addresses for Notices. All notices and other communications provided for hereunder shall be in writing (including telegraphic and telecopied communication) and, if to the Guarantor, mailed, telegraphed, telecopied or delivered to the Guarantor, addressed to the Guarantor at 401 Park Avenue South, New York, New York 10016, Attention: Phillip Siegel; with a copy to the Guarantor's counsel at Coleman & Rhine, LLP, 1120 Avenue of the Americas, New York, New York 10036, Attention: Kenneth S. Goodwin; if to the Bank, mailed, telegraphed, telecopied or delivered to the Bank, addressed to the Bank at the Manhattan Middle Market Division, 1411 Broadway, Fifth Floor, New York, New York 10018, Attention: Maria Florez; with a copy to Rodger Tighe, Esq., Dewey Ballantine, 1301 Avenue of the Americas, New York, New York 10019; or as to either party at such other address as shall be designated by such party in a written notice to each other party complying as to delivery with the terms of this Section. All such notices and other communications shall, when mailed, telegraphed, telecopied or delivered, respectively, be effective when deposited in the mails, telecopied, delivered to the telegraph company or delivered, respectively, addressed as aforesaid. SECTION 10. Assignment. The Bank may upon notice to Guarantor assign or otherwise transfer the Loan Obligations held by it to any other person, and such other person shall thereupon become vested with all the benefits in respect thereof granted to the Bank herein or otherwise; provided, however, failure of the Bank to deliver notice of assignment in no way limits the obligations of the Guarantor under this Guaranty. SECTION 11. Severability of Provisions. Any provision of this Guaranty which is prohibited or unenforceable in any jurisdiction, shall, as to such jurisdiction, be ineffective to the extent of such prohibition or unenforceability without invalidating the remaining provisions hereof or affecting the validity or enforceability of such provision in any other jurisdiction. SECTION 12. Headings. Section headings in this Guaranty are included in this Guaranty for the convenience of reference only and shall not constitute a part of the Guaranty for any other purpose. SECTION 13. Governing Law. This Guaranty shall be governed by and construed in accordance with the laws of the State of New York. THE GUARANTOR WAIVES ANY RIGHT IT MAY HAVE TO A JURY TRIAL. 5 6 IN WITNESS WHEREOF, the parties hereto have caused this Guaranty to be duly executed and delivered by their officer thereunto duly authorized as of the date first above written. HEALTH MANAGEMENT SYSTEMS, INC. By___________________________________ Name: Title: THE CHASE MANHATTAN BANK By___________________________________ Name: Title: 6