<PAGE>


                                                                   Exhibit 10.21


                     SETTLEMENT AGREEMENT AND MUTUAL RELEASE

         This Settlement Agreement and Mutual Release ("Agreement") is entered
into by and among e-Medsoft.com ("MED"), on the one hand, and Sutro & Co., Inc.
("Sutro") and Joseph A. Boystak ("Boystak") (jointly referred to herein as "the
Sutro Parties"), on the other. MED and the Sutro Parties are collectively
referred to herein as "the Parties".

         WHEREAS, Sutro filed an action before the NASD entitled SUTRO & CO. v.
E-MEDSOFT.COM No. 00-03989, to which MED filed an Answer denying all claims and
a Counterclaim (hereinafter referred to as "the Litigation"); and

         WHEREAS, one or both of the Sutro Parties is a party to two other
actions involving in part, MED or transactions with MED, GUEZ v. SUTRO, NASD No.
00-004713 and PRIMERX v. SUTRO AND BOYSTAK, NASD No. 00-04798 (hereinafter
collectively referred to as "the GUEZ and PRIMERX cases");

         WHEREAS, the Parties, through their respective counsel, agreed to the
material terms of a settlement of the Litigation and the GUEZ and PRIMERX cases
on October 22, 2001 and

         WHEREAS, the Parties now desire to memorialize that settlement:


<PAGE>


         THEREFORE, the Parties agree as follows:

         l. DELIVERY OF MED SECURITIES. Within one business day of execution of
this Agreement by Sutro and by no means later than the close of business on
October 23, MED will deliver to Sutro 1,600,000 shares of MED common stock
("Timely Delivery") that immediately shall be subject to and available for sale,
transfer or other disposition ("Sale") by Sutro without any restrictions or
limitations on Sale or re-sale whether pursuant to law, rules, regulations,
contract or otherwise. The stock shall be delivered as follows:

                  a. A stock certificate (the "Certificate") representing
1,300,000 shares of MED common stock shall be delivered to Sutro and shall
constitute the 1,300,000 shares of MED common stock to which Sutro was entitled
resulting from Sutro's cashless exercise of its $.01 warrants granted by MED to
Sutro on May 23, 1999 and exercised by Sutro on June 26, 2000 and August 23,
2000. MED shall instruct MED's transfer agent and provide an opinion of counsel
substantially in the form attached hereto as Exhibit A that all requirements of
Rule 144 (k) have been met and that the Certificate shall be delivered to Sutro
without any restrictions upon resale and shall not contain any restrictive
legend. MED shall take all actions necessary to


                                       2
<PAGE>


assure that the form of opinion and the Certificate are acceptable to MED's
transfer agent and that the Certificate is issued free of restrictions.

                  b. A second stock certificate (the "Second Certificate") shall
be delivered to Sutro no later than October 26, 2001 representing 300,000 shares
of MED common stock. To the extent that said shares are neither registered nor
exempt from registration at the time of their issuance, MED agrees that it shall
register said shares for resale at the time of, and shall include said shares
for resale in, the next registration statement that MED files with the
Securities and Exchange Commission following the date of this Agreement. If
based on the closing price of MED common stock two (2) business days prior to
the effective date of said registration statement, the market value of said
300,000 shares is less than $720,000, then MED shall issue to Sutro, and include
in the final registration statement, an additional number of shares such that
the market value of the sum of the shares is as nearly as possible equal to
$720,000. On the other hand, if based on the closing price of MED common stock
two (2) business days prior to the effective date of said registration
statement, the market value of said 300,000 shares is greater than $720,000,
then MED shall be entitled to cancel, and not register, that number of shares
whose value represents the excess over $720,000.


                                       3
<PAGE>


                  c. The Timely Delivery of the MED shares and the immediate and
unrestricted transferability of all such shares is a material part of the
consideration for this Agreement and any failure to deliver to Sutro such freely
tradable shares in a timely manner shall entitle Sutro to withdraw from this
Agreement and shall render it null and void. Delivery of the Certificate shall
be accomplished via FEDEX upon actual receipt of the Certificate no later than
12:00PM noon on Tuesday, October 23, 2001 at the offices of:

                  Abe Lampart
                  c/o Sutro & Co., Inc.
                  201 California Street - 2d Floor
                  San Francisco CA 94111

                  (415) 445-8454

         2. MUTUAL RELEASES AND DISMISSALS OF GUEZ AND PRIMERX. MED hereby
represents that it has the ability to obtain and will obtain within five days of
the Sutro Parties' execution of this Agreement, dismissals with prejudice and
complete and general releases of Sutro and Boystak from all claims in the GUEZ
and PRIMERX cases which releases will encompass all claims that are or could
have been alleged by the parties to these cases, known or unknown. In
consideration therefore, Sutro and Boystak agree that they will consent to such
dismissals, dismiss any of their counterclaims, and provide complete and general
releases to the other parties in the GUEZ and PRIMERX cases. If such releases
and dismissal by Claimants in the GUEZ and


                                       4
<PAGE>


PRIMERX cases are not obtained, MED shall immediately undertake to fully defend
and indemnify the Sutro Parties in these cases and the Sutro Parties shall
retain the right to counsel of their choice.

         3. MUTUAL RELEASE. In consideration of the terms of this Agreement, MED
and the Sutro Parties and their respective present and former officers,
directors, employees, agents, assignees, successors, and beneficiaries hereby
fully release and discharge each other and their respective parents,
subsidiaries, predecessors, and successors, including their present and former
attorneys, officers, directors, shareholders, partners, agents, and employees,
including Joseph Boystak and Sutro's financial advisors, investment bankers,
brokers, managers, and supervisors, from any and all claims (including claims
for costs and attorneys' fees), damages, demands, actions or causes of action of
any kind, known or unknown, including but not limited to all claims which relate
to any of the claims asserted in the Litigation, to MED's engagement of Sutro to
perform investment banking services, to MED's relationship with PrimeRx, and to
any other matter that was or could have been asserted against Sutro in the
Litigation. Nothing in this release, however, is intended to rescind, revoke or
require the return or rescission of any


                                       5
<PAGE>


consideration previously given by MED to Sutro in connection with its engagement
agreements or the rendering of services to MED.

         4. UNKNOWN CLAIMS. It is possible that other injuries or damages not
now known to the Parties will be discovered, and this Agreement is expressly
intended to cover and include all such injuries or damages, including all rights
of action therefor. The parties hereby expressly, knowingly, and voluntarily
waive the provisions of Section 1542 of the California Civil Code (or any
similar provision of any applicable state law) which provides as follows:

                  "A general release does not extend to claims which the
                  creditor does not know or suspect to exist in his favor at the
                  time of executing the release, which if known by him must have
                  materially affected his settlement with the debtor."

         5. ENTRY OF DISMISSAL. Immediately upon execution of this Agreement,
counsel for the Parties will promptly notify the NASD of the dismissal of all of
their claims with prejudice and of the dismissal with prejudice of the GUEZ and
PRIMERX cases.

         6. ATTORNEYS' FEES AND COSTS. The Parties will bear their own expenses,
including costs and attorneys' fees, incurred in connection with the Litigation,
the controversy giving rise to it, and the negotiation and execution of this
Agreement.


                                       6
<PAGE>


         7. ENTIRE AGREEMENT. This Agreement constitutes the only existing and
binding agreement of settlement among the Parties, and the Parties acknowledge
that there are no other warranties, promises, assurances or representations of
any kind, express or implied, upon which the Parties have relied in entering
into this Agreement, unless expressly set forth herein. This Agreement shall not
be modified except by written agreement signed by the party against whom
modification is sought.

         8. ARBITRATION. Any disputes arising between the Parties arising out of
or related to this Agreement shall be resolved by binding arbitration under the
rules of the National Association of Securities Dealers in Los Angeles.

         9. GOVERNING LAW. This Agreement shall be governed by California Law.

         10. ACKNOWLEDGMENT OF TERMS. The Parties have read and understand the
terms of this Agreement, have consulted with their respective counsel, and
understand and acknowledge the significance and consequence of each such term.
Plaintiffs acknowledge that they have not sought or received legal or tax advice
as to this settlement from Sutro or its counsel.


                                       7
<PAGE>


         11. PARTIES AFFECTED. This Agreement shall be binding upon and inure to
the benefit of the present and former officers, present and former corporate
directors, shareholders, employees, partners, affiliates, representatives,
heirs, successors, and assigns of each of the Parties.

         12. WARRANTY. Each person signing this Agreement hereby warrants (a)
that such person executing this Agreement has the full authority to do so on
behalf of the Party on whose behalf he or she signs; and (b) that the claims
that are being released pursuant to this Agreement have not been sold, assigned
or transferred in whole or in part to any other person or entity.

         13. EXECUTION OF DOCUMENTS. This Agreement may be executed in
counterparts.

         14. CONFIDENTIALITY. The Parties agree that, other than acknowledging
in response to an inquiry, the fact that the Litigation has been settled, no
party shall disclose, directly or indirectly, to any person, entity or
representative thereof, who is not a party, attorney, or tax adviser of a party
to the Litigation any of the terms of this settlement, except to the extent that
any party hereto may make such disclosures as are necessary to enforce the terms
of this Agreement or for legitimate law enforcement, self-regulatory, or
regulatory purposes or in compliance with a subpoena or legal process in a court
or arbitration proceeding.


                                       8
<PAGE>


         IN WITNESS WHEREOF, the Parties have executed this Agreement to be
effective as of the 22nd day of October 2001.


DATED: October 22, 2001                     E-MEDSOFT.COM


                                            -----------------------------------
                                            By:  Frank Magliochetti
                                            Its: Chief Executive Officer


DATED: October 22, 2001                     SUTRO & CO., INC.


                                            -----------------------------------
                                            By:  ABE LAMPART
                                            Its: SENIOR VICE PRESIDENT & DEPUTY
                                                 GENERAL COUNSEL


DATED: October 22, 2001
                                            -----------------------------------
                                            Joseph A. Boystak



                                       9
<PAGE>



APPROVED AS TO FORM:

DATED: October 22, 2001                     HOWARD, RICE, NEMEROVSKI, CANADY,
                                                    FALK & RABKIN
                                            A Professional Corporation


                                            By:
                                                -------------------------------
                                                       GILBERT R. SEROTA
                                            Attorneys for SUTRO & CO., INC. and
                                            JOSEPH A. BOYSTAK


DATED: October 22, 2001                     DEMPSEY & JOHNSON


                                            By:
                                                -------------------------------
                                            Attorney for e-MEDSOFT.COM



                                       10
<PAGE>


                                   EXHIBIT `A'

         Please prepare a certificate in the name of Sutro & Co., Inc.
representing 1,300,000 shares of MED common stock for delivery to Sutro & Co.,
Inc., 201 California Street San Francisco California 94111, Attn: Abe Lampart,
Esq.

         The shares were acquired as of May 23, 1999, and all of the
requirements of Rule 144(k) have been met, with the result that this certificate
should be issued without legend of any kind.



                                       11