<PAGE>

                                                                    EXHIBIT 4.12

                                    EXHIBIT B
                                    ---------

                       RESTRICTED STOCK PURCHASE AGREEMENT

      This Restricted Stock Agreement is made as of November 6, 2001, by DAOU
Systems, Inc., a Delaware corporation (the "Company"), and Daniel J. Malcolm
                                            -------
("Malcolm").
  -------

                              Background Statement

      In connection with Malcolm providing services to the Company pursuant to
an Employment Agreement dated November 6, 2001 and effective retroactively to
July 24, 2001 (the "Employment Agreement"), the Company's Board of Directors has
                    --------------------
granted to Malcolm the right to purchase 150,000 restricted shares of Common
Stock of the Company, which are subject to a limited repurchase right (such
shares, as adjusted for stock splits, recapitalizations, combinations and the
like, are hereinafter referred to as the "Restricted Shares"), at a purchase
                                          -----------------
price of $0.52 per share.

                                    Agreement

      The parties, intending to be legally bound, agree as follows:

1.    Grant of Award Subject to Right of Repurchase.

      1.1 Stock Award. The Company hereby agrees to issue to Malcolm 150,000
          -----------
Restricted Shares of its Common Stock upon his payment to the Company of the
purchase price therefor of $0.52 per share, which shall be paid through his
execution and delivery of the promissory note attached hereto. The Restricted
Shares shall be subject to the limitations provided below in this Section 1.

      1.2 Scope of Repurchase Right. The Restricted Shares shall be subject to a
          -------------------------
limited right (but not an obligation) of repurchase by the Company (the "Right
                                                                         -----
of Repurchase"). Malcolm shall not transfer, assign, encumber or otherwise
-------------
dispose of any unvested Restricted Shares, except as provided in the following
sentence. Malcolm may transfer any Restricted Shares, subject to the Right of
Repurchase, (i) by beneficiary designation, will or intestate succession or (ii)
to Malcolm's spouse, children or grandchildren or to a trust or family limited
partnership established by Malcolm for the benefit of Malcolm or Malcolm's
spouse, children or grandchildren, provided in either case that the Transferee
agrees in writing on a form prescribed by the Company to be bound by all
provisions of this Agreement. If Malcolm transfers any Restricted Shares, then
this Section 1 shall apply to the Transferee to the same extent as to Malcolm.

      1.3 Condition Precedent to Exercise. The Right of Repurchase may be
          -------------------------------
exercised at any time during the term hereof and for up to sixty (60) days
following the termination of Malcolm's Employment as that term is defined in the
Employment Agreement.

                                       1

<PAGE>

     1.4  Lapse of Repurchase Right. Malcolm shall acquire a vested interest in
          -------------------------
and the Company's Right of Repurchase shall lapse with respect to 1/36th of the
Restricted Shares upon Malcolm's completion of each of the next thirty six (36)
months of continuous employment after the date hereof, such that Malcolm would
be fully vested in the Restricted Shares at the expiration of thirty six (36)
months from the date hereof. The Right of Repurchase shall lapse in the event
the Company terminates Malcolm's Employment without Cause (as defined in the
Employment Agreement). In addition, the Right of Repurchase shall lapse with
respect to all remaining Restricted Shares if the Company is subject to a Change
in Control (as defined in the Employment Agreement) before Malcolm's Employment
terminates.

     1.5  Repurchase Cost. If the Company exercises the Right of Repurchase, it
          ---------------
shall pay Malcolm an amount in cash or Cash Equivalents equal to $.52 per share
(equal to the purchase price) for each of the Restricted Shares being
repurchased. "Cash Equivalents" for purposes of this Agreement includes a
              ----------------
reduction of all or part of any unpaid interest and principal of the above
referenced promissory note.

     1.6  Exercise of Repurchase Right. The Right of Repurchase shall be
          ----------------------------
exercisable only by written notice delivered to Malcolm prior to the expiration
of the sixty (60) day period specified in Section 1.3 above. The notice shall
set forth the date on which the repurchase is to be effected. Such date shall
not be more than thirty (30) days after the date of the notice. The
certificate(s) representing the Restricted Shares to be repurchased shall, prior
to the close of business on the date specified for the repurchase, be delivered
to the Company properly endorsed for transfer. The Company shall, concurrently
with the receipt of such certificate(s), pay to Malcolm the purchase price
determined according to Subsection 1.5 above. Payment shall be made in cash (or,
in the Company's sole discretion, by a reduction of any accrued and unpaid
interest or unpaid principal outstanding pursuant to the promissory note). The
Right of Repurchase shall terminate with respect to any Restricted Shares for
which it has not been timely exercised pursuant to this Subsection 1.6.

     1.7  Additional Shares or Substituted Securities. In the event of the
          -------------------------------------------
declaration of a stock dividend, the declaration of an extraordinary dividend
payable in a form other than stock, a spin-off, a stock split, an adjustment in
conversion ratio, a recapitalization or a similar transaction affecting the
Company's outstanding securities without receipt of consideration, any new,
substituted or additional securities or other property (including money paid
other than as an ordinary cash dividend) that by reason of such transaction are
distributed with respect to any Restricted Shares or into which such Restricted
Shares thereby become convertible shall immediately be subject to the Right of
Repurchase. Appropriate adjustments to reflect the distribution of such
securities or property shall be made to the number and/or class of the
Restricted Shares. After each such transaction, appropriate adjustments shall
also be made to the price per share to be paid upon the exercise of the Right of
Repurchase in order to reflect any change in the Company's outstanding
securities effected without receipt of consideration therefor; provided,
however, that the aggregate purchase price payable for the Restricted Shares
shall remain the same.

     1.8  Termination of Rights as Stockholder. If the Company makes available,
          ------------------------------------
at the time and place and in the amount and form provided in this Agreement, the
consideration for the Restricted Shares to be repurchased in accordance with
this Section 1, then after such time the

                                       2

<PAGE>

person from whom such Restricted Shares are to be repurchased shall no longer
have any rights as a holder of such Restricted Shares (other than the right to
receive payment of such consideration in accordance with this Agreement). Such
Restricted Shares shall be deemed to have been repurchased in accordance with
the applicable provisions hereof, whether or not the certificate(s) therefor
have been delivered as required by this Agreement.

     1.9  Escrow. The certificate(s) for Restricted Shares shall be deposited in
          ------
escrow with the Company to be held in accordance with the provisions of this
Agreement. Any new, substituted or additional securities or other property
described in Section 1.7 above shall immediately be delivered to the Company to
be held in escrow, but only to the extent the Shares are at the time Restricted
Shares. All regular cash dividends on Restricted Shares (or other securities at
the time held in escrow) shall be paid directly to Malcolm and shall not be held
in escrow. Restricted Shares, together with any other assets or securities held
in escrow hereunder, shall be (i) surrendered to the Company for repurchase and
cancellation upon the Company's exercise of its Right of Repurchase or (ii)
released to Malcolm, within ten days of Malcolm's request, to the extent the
Shares are vested, no longer subject to the repurchase right herein and no
longer pledged pursuant to that certain Stock Pledge Agreement, dated of even
date herewith by and between Malcolm and the Company (the "Pledge Agreement")
                                                           ----------------
(but not more frequently than once every six (6) months). In any event, all
Shares that have vested (and any other vested assets and securities attributable
thereto) and are no longer subject to the repurchase right and no longer pledged
pursuant to the Pledge Agreement, shall be released within sixty (60) days after
Malcolm's cessation of Employment.

2.   Representations of Malcolm.  Malcolm hereby represents, warrants,
acknowledges, and agrees that Malcolm has the power and authority to execute and
deliver this Agreement and to perform its obligations.

3.   Representations of the Company.  The Company hereby represents, warrants,
acknowledges, and agrees that:

     3.1  The Company has full corporate power and authority to execute and
deliver this Agreement and to perform its obligations hereunder. This Agreement
constitutes the valid and legally binding obligation of the Company, enforceable
in accordance with its terms and conditions. The Company need not give any
notice to, make any filing with, or obtain any authorization, consent, or
approval of any government or governmental agency in order to consummate the
transactions contemplated by this Agreement.

     3.2  Neither the execution and the delivery of this Agreement, nor the
consummation of the transactions contemplated hereby, will violate any
constitution, statute, regulation, rule, injunction, judgment, order, decree,
ruling, charge, or other restriction of any government, governmental agency, or
court to which the Company is subject.

     3.3  When issued upon the terms and conditions of this Agreement (and paid
for as contemplated by this Agreement), the Shares will be validly issued and
fully paid and non-assessable, with no personal liability attached to the
ownership thereof and not subject to any preemptive rights, rights of first
refusal or other similar rights of the stockholders of the Company.

                                       3

<PAGE>

4.   Miscellaneous.

     4.1  Market Stand-Off. In connection with any underwritten public offering
          ----------------
by the Company of its equity securities pursuant to an effective registration
statement filed under the Securities Act, Malcolm shall not, without the prior
written consent of the Company's managing underwriter, (i) lend, offer, pledge,
sell, contract to sell, sell any option or contract to purchase, purchase any
option or contract to sell, grant any option, right or warrant to purchase, or
otherwise transfer or dispose of, directly or indirectly, any shares of Common
Stock of the Company ("Stock") or any securities convertible into or exercisable
                       -----
or exchangeable for Stock (whether such shares or any such securities are then
owned by Malcolm or are thereafter acquired), or (ii) enter into any swap or
other arrangement that transfers to another, in whole or in part, any of the
economic consequences of ownership of the Stock, whether any such transaction
described in clause (i) or (ii) above is to be settled by delivery of Stock or
such other securities, in cash or otherwise. Such restriction (the "Market
                                                                    ------
Stand-Off") shall be in effect for such period of time following the date of the
---------
final prospectus for the offering as may be requested by the Company or such
underwriters. In no event, however, shall such period exceed ninety (90) days.
In the event of the declaration of a stock dividend, a spin-off, a stock split,
an adjustment in conversion ratio, a recapitalization or a similar transaction
affecting the Company's outstanding securities without receipt of consideration,
any new, substituted or additional securities that are by reason of such
transaction distributed with respect to any shares of Stock subject to the
Market Stand-Off, or into which such shares thereby become convertible, shall
immediately be subject to the Market Stand-Off. In order to enforce the Market
Stand-Off, the Company may impose stop-transfer instructions with respect to the
Stock until the end of the applicable stand-off period. The Company's
underwriters shall be beneficiaries of the Agreement set forth in this Section
4.1. Malcolm shall be subject to this Subsection 4.1 only if all of the
directors, officers and any five percent (5%) or greater shareholders of the
Company are subject to similar arrangements.

     4.2  Rights of the Company. The Company shall not be required to (i)
          ---------------------
transfer on its books any Shares that have been sold or transferred in
contravention of this Agreement or (ii) treat as the owner of Shares, or
otherwise to accord voting, dividend or liquidation rights to, any transferee to
whom Shares have been transferred in contravention of this Agreement.

     4.3  Successors and Assigns. Except as otherwise expressly provided to the
          ----------------------
contrary, the provisions of this Agreement shall inure to the benefit of, and be
binding upon, the Company and its successors and assigns and be binding upon
Malcolm and Malcolm's legal representatives, heirs, legatees, distributees,
assigns and transferees by operation of law, whether or not any such person has
become a party to this Agreement or has agreed in writing to join herein and to
be bound by the terms, conditions and restrictions hereof.

     4.4  No Retention of Rights. Nothing in this Agreement shall confer upon
          ----------------------
Malcolm any right to continue his employment for any period of specific duration
or interfere with or otherwise restrict in any way the rights of the Company (or
any Parent or Subsidiary employing or retaining Malcolm) to terminate Malcolm's
employment at any time and for any reason, with or without cause, or of Malcolm
under any other Agreement between Malcolm and the Company, which rights are
hereby expressly reserved by each.

                                       4

<PAGE>

     4.5  Tax Election. Subjecting the Shares to a Right of Repurchase may
          ------------
result in adverse tax consequences that may be avoided or mitigated by filing an
election under Code Section 83(b) of the Internal Revenue Code of 1986, as
amended (the "Code"). Such election may be filed only within thirty (30) days
              ----
after the date of purchase. Malcolm should consult with his tax advisor to
determine the tax consequences of subjecting the Shares to a Right of Repurchase
and the advantages and disadvantages of filing the Code Section 83(b) election.
Malcolm acknowledges that it is Malcolm's sole responsibility, and not the
Company's, to file a timely election under Code Section 83(b), even if Malcolm
requests the Company or its representatives to make this filing Malcolm's
behalf.

     4.6  Legend. All certificates evidencing Restricted Shares shall bear the
          ------
following legends:


          "THE SHARES REPRESENTED HEREBY MAY NOT BE SOLD, ASSIGNED,
          TRANSFERRED, ENCUMBERED OR IN ANY MANNER DISPOSED OF, EXCEPT
          IN COMPLIANCE WITH THE TERMS OF A WRITTEN AGREEMENT BETWEEN
          COMPANY AND THE REGISTERED HOLDER OF THE SHARES (OR THE
          PREDECESSOR IN INTEREST TO THE SHARES). SUCH AGREEMENT
          GRANTS TO COMPANY CERTAIN REPURCHASE RIGHTS UPON TERMINATION
          OF EMPLOYMENT WITH COMPANY. THE SECRETARY OF COMPANY WILL
          UPON WRITTEN REQUEST FURNISH A COPY OF SUCH AGREEMENT TO THE
          HOLDER HEREOF WITHOUT CHARGE."

     4.7  Notice. Any notice required by the terms of this Agreement shall be
          ------
given in writing and shall be deemed effective upon personal delivery or upon
deposit with the United States Postal Service, by registered or certified mail,
with postage and fees prepaid. Notice shall be addressed to the Company at its
principal executive office and to Malcolm at the address that Malcolm most
recently provided to the Company.

     4.8  Entire Agreement. This Agreement constitutes the entire contract
          ----------------
between the parties hereto with regard to the subject matter hereof. It
supersedes any other agreements, representations or understandings (whether oral
or written and whether express or implied) relating to the subject matter
hereof.

     4.9  Governing Law. This Agreement shall be governed by, and construed in
          -------------
accordance with, the laws of the State of California, as such laws are applied
to contracts entered into and to be performed entirely within such State.

     4.10 Amendments and Waivers. Any term of this Agreement may be amended and
          ----------------------
the observance of any term of this Agreement may be waived (either generally or
in a particular instance and either retroactively or prospectively), only with
the written consent of the Company and the holders of a majority of the then
outstanding shares of the Company's capital stock that is not owned by Malcolm.

                                       5

<PAGE>

     4.11 Severability. If one or more provisions of this Agreement are held to
          ------------
be unenforceable under applicable law, such provision shall be excluded from
this Agreement and the balance of the Agreement shall be interpreted as if such
provision was so excluded and shall be enforceable in accordance with its terms.

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

COMPANY:

DAOU SYSTEMS, INC.



By:  /s/ James Roberto
     -----------------
Name: James Roberto
Its:  Chief Executive Officer



MALCOLM:



/s/ Daniel J. Malcolm
---------------------
Daniel J. Malcolm

                                       6

<PAGE>

                     EXHIBIT 1 to RESTRICTED STOCK AGREEMENT
                     ---------------------------------------

                               SPOUSE'S AGREEMENT

The undersigned, being the spouse ("Spouse") of Daniel J. Malcolm (the
                                    ------
"Investor"), agrees to be bound by the provisions of this Agreement to the
 --------
extent applicable to the undersigned.

Name: _______________________

IF THE INVESTOR IS AN INDIVIDUAL WHO IS LEGALLY DOMICILED OR A RESIDENT IN THE
STATE OF CALIFORNIA, OR ANY OTHER "COMMUNITY PROPERTY" STATE, THE SPOUSE OF THE
INVESTOR MUST CHECK ONE OF THE FOLLOWING:

  X
_____  The Investor is acquiring the   ____  The Investor is acquiring the
       Shares as community property          Shares as separate property (the
       in one or both names (both            Investor should consult independent
       spouses must sign)                    counsel in making a determination
                                             as to whether he isusing separate
                                             property to purchase the Shares)


/s/ Daniel J. Malcolm
_____________________________________
Signature of the Investor



Daniel J. Malcolm
_____________________________________
Type or print name of the Investor


/s/ Kathleen M. Malcolm
_____________________________________
Signature of Spouse


Kathleen M. Malcolm
_____________________________________
Type or print name of Spouse

IF SEPARATE PROPERTY IS BEING USED TO PURCHASE THE SHARES, THE SPOUSE OF THE
INVESTOR MUST SIGN THE FOLLOWING ACKNOWLEDGEMENT:

I hereby acknowledge that my Spouse is making this investment in the Shares with
his separate property and funds.

_____________________________________
Signature of the Investor's Spouse


_____________________________________
Type or print name of the Investor's Spouse

                                        7