<PAGE>   1
                                                                   Exhibit 10.18


                               SECURITY AGREEMENT

      THIS SECURITY AGREEMENT (the "Security Agreement") made as of the ____
day of October, 1998 by and between PAUL J. KERZ (the "Debtor") and HSA
MANAGED CARE SYSTEMS, INC. (the "Secured Party").

                                   WITNESSETH:

      WHEREAS, the Secured Party has agreed to provide a secured loan (the
"Secured Loan") to the Debtor in the amount of $500,000, which is to be
evidenced by a promissory note from Debtor to the Secured Party (the "Secured
Note") which the Debtor has agreed to pay together with any costs or expenses
which arise pursuant to the Secured Note (collectively, the "Secured Loan
Obligations"); and

      WHEREAS, it is a condition precedent to the obligation of the Secured
Party to provide the Secured Loan that all of the Debtor's Secured Loan
Obligations to the Secured Party be secured by the collateral described herein;

      NOW, THEREFORE, to induce the Secured Party to make the Secured Loan, and
in consideration thereof and for other good and valuable consideration, the
receipt and sufficiency of which being hereby acknowledged, the parties hereto
agree as follows:

      1. Security Interest. The Debtor hereby grants, bargains, sells, assigns,
transfers and pledges to the Secured Party, its successors and assigns, a first
security interest (the "Security Interest") in and to 162,666 shares of the
common stock, $.01 par value, of Health Management Systems, Inc. (the "Parent"),
together with any and all proceeds thereof (the "Collateral").

      2. Obligations. This Security Agreement and the Security Interest shall
secure repayment of the Secured Loan Obligations to the Secured Party.

      3. Financing Statements and Other Action. The Debtor will do all lawful
acts which the Secured Party deems necessary or desirable to protect the
Security Interest or otherwise to carry out the provisions of this Security
Agreement, including, but not limited to, the execution of Uniform Commercial
Code (the "Code") financing, continuation, amendment and termination statements
and similar instruments, the execution of such additional documents as may be
necessary to effectuate the purposes of this Security Agreement. The Debtor
irrevocably appoints the
<PAGE>   2
Secured Party as its attorney-in-fact (such power of attorney being coupled with
an interest) during the term of this Security Agreement to do all acts which it
may be required to do under this Security Agreement.

      4. Representations and Warranties. The Debtor hereby represents and
warrants to the Secured Party as follows:

            (a) The Debtor is the sole owner of the Collateral. The Security
Interest created herein in the Collateral does not require the approval of any
other party.

            (b) Except for the Security Interest created by this Security
Agreement, the Collateral is free and clear of all security interests, liens and
encumbrances.

            (c) The Debtor has the full power and authority to enter into this
Agreement and to pledge the Collateral. Entering into this Agreement does not
violate any material provision of any contract, license or agreement to which
the Debtor is a party.

      5. Encumbrances. The Debtor warrants that it has good and marketable title
to the Collateral purportedly owned by it and that there are no sums owed or
claims, liens, security interests or other encumbrances against the Collateral.
The Debtor will notify the Secured Party of any lien, security interest or other
encumbrance adverse to the Secured Party, and will not create, incur, assume, or
suffer to exist any lien, security interest or other encumbrances against the
Collateral.

      6. Default. In the case of the happening of any of the following events
(hereinafter called "Events of Default"):

            (a) if the Debtor shall fail to pay when due and payable any
obligations owing under the Secured Note or other note of even date herewith
(the "Unsecured Loan Note") executed by Debtor in favor of the Secured Party in
connection with an unsecured loan (the "Unsecured Loan") made by Secured Party
to the Debtor;

            (b) if the Debtor ceases to be actively involved in the management
of the Secured Party or the Parent;

            (c) if the Debtor shall file a petition in bankruptcy or for an
arrangement or for reorganization pursuant to the Federal Bankruptcy Act or any
similar law, federal or state, or if, by decree of a court of competent
<PAGE>   3
jurisdiction, the Debtor shall be adjudicated a bankrupt, or be declared
insolvent, or shall make an assignment for the benefit of creditors, or shall
admit in writing its inability to pay its debts generally as they become due, or
shall consent to the appointment of a receiver or receivers of all or any part
of its property;

            (d) if any of the Debtor's creditors shall file a petition in
bankruptcy against it or for its reorganization pursuant to the Federal
Bankruptcy Act or any similar law, federal or state, and if such petition shall
not be discharged or dismissed within sixty (60) days after the date on which
such petition was filed;

            (e) if the Debtor shall fail to observe or perform any covenant,
condition or agreement in the Secured Note, the Unsecured Note, this Security
Agreement or in any other document that the Debtor shall have executed or
delivered in connection with the Secured Loan or the Unsecured Loan; or

            (f) if any representation or warranty made by the Secured Party in
the Secured Note, the Unsecured Note, this Security Agreement or in any other
document that the Debtor shall have executed or delivered in connection with the
Secured Loan or the Unsecured Loan shall prove to have been incorrect in any
material respect on or as of the date made;

thereafter the Secured Party may declare all Secured Loan Obligations secured
hereby, and any other Obligations of the Debtor to the Secured Party,
immediately due and payable and shall have the remedies with respect to the
Collateral of a secured party under the Code. The Secured Party will give the
Debtor reasonable notice of the time and place of any public sale of the
Collateral or of the time after which any private sale or any other intended
disposition thereof is to be made. The requirements of reasonable notice shall
be met if such notice is delivered in the manner described in Section 9 of this
Agreement, to the address of the Debtor shown in such Section at least ten (10)
days before the time of the sale or disposition. Expenses of retaking, holding,
preparing for sale, selling or the like shall include the Secured Party's
attorney's fees and legal expenses.

      6. Waivers. To the extent permitted by law, the Secured Party may release,
supersede, exchange or modify any Collateral which it may from time to time
hold.

      7. Termination. This Security Agreement and the Security Interest shall
terminate when all Secured Loan
<PAGE>   4
Obligations have been paid and discharged in full by the Debtor and the Secured
Party, upon such termination, shall deliver to the Debtor appropriate Code
termination statements with respect to the Collateral so released from the
Security Interest, for filing with each filing office with which Code financing
statements have been filed by the Secured Party with respect to the Collateral,
and shall release the Collateral to the Debtor.

      8.  Modification.  This Security Agreement may not be modified or
amended without the prior written consent of each of the parties hereto.

      9. Notices. Except as otherwise provided in this Security Agreement, all
notices and other communications hereunder shall be deemed to have been
sufficiently given when sent by certified mail, return receipt requested, or by
fax, provided the sender shall have received such return receipt or a
confirmation of receipt in the case of a fax, such notices or communications to
be addressed as follows:

      If to the Secured Party:

            HSA Managed Care Systems, Inc.
            c/o Health Care microsystems, Inc.
            200 N. Sepulveda Boulevard
            El Segundo, California 90245

      If to the Debtor:

            Paul J. Kerz
            126 East 65th Street
            New York, New York 10021

or at such other address or fax number, as the case may be, as the party to whom
such notice or demand is directed may have designated in writing to the other
party hereto by notice as provided in this Section 9, except that notices of
change of address shall be effective when actually received by the addressee.
Each of the parties hereto shall have the right to rely on as an original any
notice given hereunder by fax as aforesaid.

      10. Rights; Merger. No course of dealing between the Debtor and the
Secured Party, nor any delay in exercising, on the part of the Secured Party,
any right, power or privilege hereunder, shall operate as a waiver thereof; nor
shall any single or partial exercise of any right, power or privilege hereunder
preclude any other or further exercise thereof or the exercise of any other
right, power or
<PAGE>   5
privilege. The rights and remedies hereunder are cumulative and are in addition
to, and not exclusive of, any rights or remedies provided by law or in equity,
including, without limitation, the rights and remedies of a secured party under
the Code. It is understood and agreed that all understandings and agreements
heretofore had between the parties, if any, with respect to the subject matter
hereof are merged into this Security Agreement and this Security Agreement
represents the full and complete agreement of the parties with respect to the
subject matter hereof.

      11. Governing Law, Binding Effect, Etc. This Security Agreement and the
rights and obligations of the parties hereunder shall be construed in accordance
with and governed by the laws of the State of New York. This Security Agreement
shall be binding upon and inure to the benefit of the parties hereto and their
respective successors and assigns.

      12. Statute Of Limitations. To the full extent permitted by law, the
Debtor waives the right to plead any statute of limitations as a defense to any
indebtedness or obligation secured hereunder.

      13. Survival of Provisions. All representations, warranties and covenants
of the Debtor contained herein shall survive the execution and delivery of this
Security Agreement and shall terminate only upon the termination of this
Security Agreement and the Security Interest created hereby in accordance with
the provisions of Section 7.

      14. Counterparts. This Security Agreement may be executed in two or more
counterparts, each of which shall be deemed to be an original, but all of which
taken together shall constitute one and the same instrument.

      15.  Severability.  The invalidity or unenforceability of any provision
hereof shall in no way affect the validity or enforceability of any other
provision hereof.
<PAGE>   6
      IN WITNESS WHEREOF, the parties hereto have executed this Security
Agreement as of the day and year first above written.

                         HSA MANAGED CARE SYSTEMS, INC.

                        By:__________________________________
                            Name:
                            Title:


                           __________________________________
                              PAUL J. KERZ