<PAGE>

                                                                   EXHIBIT 10.38

THIS WARRANT AND THE SHARES ISSUABLE HEREUNDER HAVE NOT BEEN REGISTERED UNDER
THE SECURITIES ACT OF 1933, AS AMENDED, OR REGISTERED OR QUALIFIED UNDER ANY
STATE SECURITIES OR "BLUE SKY" LAWS, AND MAY NOT BE SOLD, PLEDGED, OR OTHERWISE
TRANSFERRED WITHOUT AN EFFECTIVE REGISTRATION THEREOF UNDER SUCH ACT AND/OR LAWS
OR PURSUANT TO RULE 144 UNDER THE SECURITIES ACT OF 1933, AS AMENDED, OR AN
OPINION OF COUNSEL REASONABLY SATISFACTORY TO THE CORPORATION AND ITS COUNSEL,
THAT SUCH REGISTRATION AND/OR QUALIFICATION IS NOT REQUIRED.

                            WARRANT TO PURCHASE STOCK

ISSUER:           ATHENAHEALTH, INC. A DELAWARE CORPORATION
NUMBER OF SHARES: 5,000 SHARES, SUBJECT TO ADJUSTMENT
CLASS OF STOCK:   SERIES E PREFERRED STOCK
EXERCISE PRICE:   $9.30 PER SHARE, SUBJECT TO ADJUSTMENT
ISSUE DATE:       JUNE 6, 2007
EXPIRATION DATE:  JUNE 6, 2014

     THIS WARRANT CERTIFIES THAT, for the agreed upon value of $1.00 and for
other good and valuable consideration, ORIX VENTURE FINANCE LLC, a Delaware
limited liability company ("Holder") is entitled to purchase from athenahealth,
Inc., a Delaware corporation (the "Company"), up to 5,000 fully paid and
nonassessable shares (the "Shares") of the Company's Series E Preferred Stock,
at a purchase price per share of $9.30 (the "Exercise Price"). This Warrant may
be exercised in whole or in part at any time and from time to time until 5:00
PM, Eastern time, on the Expiration Date and shall be void thereafter. Until
such time as this Warrant is exercised in full or expires, the Exercise Price
and the Shares are subject to adjustment as hereinafter provided.

ARTICLE 1. EXERCISE.

          1.1 Method of Exercise. Holder may exercise this Warrant by delivering
a duly executed Notice of Exercise in substantially the form attached as
Appendix 1 to the principal office of the Company. Unless Holder is exercising
the conversion right set forth in Section 1.2, Holder shall also deliver to the
Company a certified or bank check, or wire transfer to an account designated by
the Company, for the aggregate Exercise Price for the Shares being purchased.

          1.2 Conversion Right. In lieu of exercising this Warrant as specified
in Section 1.1, Holder may from time to time convert this Warrant, in whole or
in part, into a number of Shares (or Common Stock if the Series E Preferred
Stock has been automatically converted into Common Stock) determined by dividing
(a) the aggregate fair market value of the Shares (or other securities otherwise
issuable upon exercise of this Warrant) to be exercised


                                        1

<PAGE>

minus the aggregate Exercise Price of such Shares by (b) the fair market value
of one Share (or other such security). The fair market value of the Shares shall
be determined pursuant to Section 1.4.

          1.3 Intentionally Omitted.

          1.4 Fair Market Value. If the Shares are traded in a public market,
the fair market value of one Share shall be the closing price of such Share (or
the closing price of one share of the Company's stock into which the Shares are
convertible multiplied by the number of shares of such Company stock into which
each Share is then convertible) reported for the business day immediately before
Holder delivers its Notice of Exercise to the Company. If the Shares are not
traded in a public market, the Board of Directors of the Company shall determine
fair market value in its reasonable good faith judgment. The foregoing
notwithstanding, if Holder advises the Board of Directors in writing that Holder
disagrees with such determination, then the Company and Holder shall promptly
agree upon a reputable investment banking firm to undertake such valuation. If
the valuation of such investment banking firm is greater than that determined by
the Board of Directors by five percent (5%) or more, then all fees and expenses
of such investment banking firm shall be paid by the Company. In all other
circumstances, such fees and expenses shall be paid by Holder, but in all events
the determination of the investment banking firm as to fair market value shall
apply for purposes of Section 1.2 above.

          1.5 Delivery of Certificate and New Warrant. Promptly after Holder
exercises or converts this Warrant, the Company shall deliver to Holder
certificates for the Shares acquired and, if this Warrant has not been fully
exercised or converted and has not expired, a new Warrant representing the
Shares not so acquired.

          1.6 Replacement of Warrant. On receipt of evidence reasonably
satisfactory to the Company of the loss, theft, destruction or mutilation of
this Warrant and, in the case of loss, theft or destruction, on delivery of an
indemnity agreement reasonably satisfactory in form and amount to the Company
or, in the case of mutilation, on surrender and cancellation of this Warrant,
the Company at its expense shall execute and deliver, in lieu of this Warrant, a
new warrant of like tenor.

          1.7 Repurchase on Sale, Merger, or Consolidation of the Company.

               1.7.1. "Acquisition". For the purpose of this Warrant,
"Acquisition" means any sale, transfer, license, or other disposition of all or
substantially all of the assets of the Company, or any reorganization,
consolidation, or merger of the Company where the holders of the Company's
securities before the transaction beneficially own less than 50% of the
outstanding voting securities of the surviving entity after the transaction.

               1.7.2. Assumption of Warrant. Upon the closing of any Acquisition
the successor entity shall assume the obligations of this Warrant, and this
Warrant shall be exercisable for the same securities, cash, and property as
would be payable for the Shares issuable upon exercise of the unexercised
portion of this Warrant as if such Shares were


                                        2

<PAGE>

outstanding on the record date for the Acquisition and subsequent closing. The
Exercise Price shall be adjusted accordingly.

               1.7.3 Purchase Right. Notwithstanding the foregoing, at the
election of Holder, the Company shall purchase the unexercised portion of this
Warrant for cash upon the closing of any Acquisition in which the consideration
is solely cash or cash equivalents for an amount equal to (a) the fair market
value of any consideration that would have been received by Holder in
consideration of the Shares had Holder exercised the unexercised portion of this
Warrant immediately before the record date for determining the shareholders
entitled to participate in the proceeds of the Acquisition, less (b) the
aggregate Exercise Price of the Shares, but in no event less than zero.

          1.8 Automatic Exercise Prior to Expiration. To the extent this Warrant
is not previously exercised as to all of the Shares subject hereto, and if the
fair market value of one Share is greater than the Exercise Price then in
effect, this Warrant shall be deemed automatically exercised pursuant to Section
1.2 above (even if not surrendered) immediately before its expiration date as
set forth in this Warrant. For purposes of such automatic exercise, the fair
market value of one Share upon such expiration shall be determined pursuant to
Section 1.4 above. To the extent this Warrant or any portion thereof is deemed
automatically exercised pursuant to this Section, the Company agrees to promptly
notify the Holder of the number of Shares, if any, the Holder hereof is to
receive by reason of such automatic exercise.

ARTICLE 2. ADJUSTMENTS TO THE SHARES.

          2.1 Stock Dividends, Splits, Etc. If the Company declares or pays a
dividend shares of the same class or series as the Shares, payable in Common
Stock or, subdivides the outstanding shares of the same class or series as the
Shares into a greater amount of shares of the same class or series as the
Shares, or, if the Shares are securities other than Common Stock, subdivides the
Shares in a transaction that increases the amount of Common Stock into which the
Shares are convertible, then upon exercise of this Warrant, for each Share
acquired, Holder shall receive, without cost to Holder, the total number and
kind of securities to which Holder would have been entitled had Holder owned the
Shares of record as of the date the dividend or subdivision occurred.

          2.2 Reclassification, Exchange or Substitution. Upon any
reclassification, exchange, substitution, or other event that results in a
change of the number and/or class of the Company's outstanding securities of the
same class or series as the Shares, Holder shall be entitled to receive, upon
exercise or conversion of this Warrant, the number and kind of securities and
property that Holder would have received for the Shares if this Warrant had been
exercised immediately before such reclassification, exchange, substitution, or
other event. Such an event shall include any automatic conversion of all (but
not less than all) of the outstanding securities of the Company of the same
class or series as the Shares to Common Stock pursuant to the terms of the
Company's Fourth Amended and Restated Certificate of Incorporation, as amended
(including without limitation any and all applicable Certificates of
Designation) ("Certificate of Incorporation") upon the closing of a registered
public offering of the


                                        3
<PAGE>

Company's Common Stock. The Company or its successor shall promptly issue to
Holder a new Warrant for such new securities or other property. The new Warrant
shall provide for adjustments which shall be as nearly equivalent as may be
practicable to the adjustments provided for in this Article 2 including, without
limitation, adjustments to the Exercise Price and to the number of securities or
property issuable upon exercise of the new Warrant. The provisions of this
Section 2.2 shall similarly apply to successive reclassifications, exchanges,
substitutions, or other events.

          2.3 Adjustments for Combinations, Etc. If the outstanding shares of
the class or series of securities issuable upon exercise or conversion of this
Warrant are combined or consolidated, by reclassification or otherwise, into a
lesser number of shares, the Exercise Price shall be proportionately increased
and the number of Shares for which this Warrant is exercisable shall be
proportionately decreased.

          2.4 Adjustments for Dilutive Issuances. In the event of the issuance
(a "Dilutive Issuance") by the Company, after the Issue Date of the Warrant, of
securities of the same class or series as the Shares at a price per share less
than the Exercise Price, or securities which are convertible into or exercisable
or exchangeable for Common Stock at a Common Stock per share exercise or
conversion price or exchange rate that is less than the Exercise Price in effect
at such date, then the number of shares of Common Stock issuable upon exercise
or conversion of the Shares shall be adjusted in accordance with the provisions
(the "Provisions") of the Series E Preferred Stock of the Company as set forth
in the Certificate of Incorporation and in effect on the Issue Date of this
Warrant. The Company agrees that the Provisions shall not be restated, amended,
modified or waived in any manner such that the Holder hereof is treated
differently than other holders of the Series E Preferred Stock (as holders of
Series E Preferred Stock). Under no circumstances shall the aggregate Exercise
Price payable by the Holder upon exercise of the Warrant increase as a result of
any adjustment arising from a Dilutive Issuance.

          2.5 No Impairment. The Company shall not, by amendment of its
Certificate of Incorporation or the Provisions or through a reorganization,
transfer of assets, consolidation, merger, dissolution, issue, or sale of
securities or any other voluntary action, avoid or seek to avoid the observance
or performance of any of the terms to be observed or performed under this
Warrant by the Company, but shall at all times in good faith assist in carrying
out of all the provisions of this Article 2 and in taking all such action as may
be necessary or appropriate to protect Holder's rights under this Article
against impairment.

          2.6 Fractional Shares. No fractional Shares shall be issuable upon
exercise or conversion of the Warrant and the number of Shares to be issued
shall be rounded down to the nearest whole Share. If a fractional share interest
arises upon any exercise or conversion of the Warrant, the Company shall
eliminate such fractional share interest by paying Holder an amount computed by
multiplying the fractional interest by the fair market value of a full Share.

          2.7 Certificate as to Adjustments. Upon each adjustment as provided in
this Warrant of the number of Shares, the Exercise Price or the number of shares
of Common Stock into which the Shares are convertible, the Company at its
expense shall promptly compute such


                                        4

<PAGE>

adjustment, and furnish Holder with a certificate of its Chief Financial Officer
setting forth such adjustment and the facts upon which such adjustment is based.
The Company shall, upon written request, furnish Holder a certificate setting
forth the number of Shares, the Exercise Price and/or the ratio by which the
Shares may be converted into shares of Common Stock in effect upon the date
thereof and the series of adjustments leading to such number of Shares, Exercise
Price and/or ratio by which the Shares may be converted into shares of Common
Stock.

ARTICLE 3. REPRESENTATIONS AND COVENANTS OF THE COMPANY.

          3.1 Representations and Warranties. The Company hereby represents and
warrants to the Holder as follows:

               (a) All Shares which may be issued upon the exercise of this
Warrant, and all shares of Common Stock or other securities, if any, issuable
upon conversion of the Shares, shall, upon issuance, be duly authorized, validly
issued, fully paid and nonassessable, and free of any liens and encumbrances
except for restrictions on transfer provided for herein or under applicable
federal and state securities laws.

               (b) The authorized capital stock of the Company consists of the
following: 76,589,684 shares, consisting of 50,000,000 shares of common stock,
$.01 par value (the "Common Stock"), and 26,589,684 shares of Preferred Stock,
$.01 par value of which 1,600,000 shares have been designated Series A-1
Convertible Preferred Stock, 1,045,015 shares have been designated Series A-2
Convertible Preferred Stock, 1,250,000 shares have been designated Series B-1
Convertible Preferred Stock, 127,605 shares have been designated Series B-2
Convertible Preferred Stock, 8,000,000 shares have been designated Series C
Convertible Preferred Stock, 12,977,380 shares have been designated Series D
Preferred Stock and 1,589,684 shares have been designated Series E Preferred
Stock. Schedule 3.1(b) sets forth, as of immediately prior to the issuance of
this Warrant, all of the outstanding shares of Common Stock and Preferred Stock
and outstanding options, warrants, convertible securities, convertible
debentures, and rights to acquire, subscribe for, and/or purchase any Common
Stock, Preferred Stock and/or other capital stock of the Company or any
securities or debentures convertible into or exchangeable for Common Stock,
Preferred Stock and/or other capital stock of the Company.

               (c) The Exercise Price is equal to the lowest price per share of
Series E Preferred Stock issued by the Company.

               (d) [intentionally omitted]

               (e) The Company covenants that it shall at all times cause to be
reserved and kept available out of its authorized and unissued shares such
number of shares of Series E Preferred Stock and shares of Common Stock and
other securities as will be sufficient to permit the exercise in full of this
Warrant and the conversion of the Shares into shares of Common Stock or such
other securities.

          3.2 Notice of Certain Events. If the Company proposes at any time (a)
to declare any dividend or distribution upon any of its capital stock, whether
in cash, property,


                                        5

<PAGE>

stock, or other securities and whether or not a regular cash dividend; (b) to
offer for subscription pro rata to the holders of any class or series of its
stock any additional shares of stock of any class or series or other rights; (c)
to effect any reclassification or recapitalization of any of its securities; (d)
to merge or consolidate with or into any other corporation, or sell, lease,
license, or convey all or substantially all of its assets, or to liquidate,
dissolve or wind up; or (e) offer holders of registration rights the opportunity
to participate in an underwritten public offering of the company's securities
for cash, then, in connection with each such event, the Company shall give
Holder (1) at least 20 days prior written notice of the date on which a record
will be taken for such dividend, distribution, or subscription rights (and
specifying the date on which the holders of securities of the Company) or for
determining rights to vote, if any, in respect of the matters referred to in (c)
and (d) above; (2) in the case of the matters referred to in (c) and (d) above
at least 20 days prior written notice of the date when the same will take place
(and specifying the date on which the holders of securities of the Company will
be entitled to exchange their securities of the Company for securities or other
property deliverable upon the occurrence of such event); and (3) in the case of
the matter referred to in (e) above, the same notice as is given to the holders
of such registration rights.

          3.3 Information Rights. So long as the Holder holds this Warrant
and/or any of the Shares, the Company shall deliver to the Holder (a) promptly
after mailing, copies of all notices or other written communications to the
shareholders of the Company, and (b) such financial reports as are generally
distributed to the holders of Series E Preferred Stock (or other securities
otherwise issuable upon exercise of this Warrant) of the Company concurrently
with the distribution thereof to such shareholders.

          3.4 Registration Under Securities Act of 1933, as amended. The shares
of Common Stock into which the Shares are convertible (or, if at any time the
Shares shall be shares of Common Stock, the Shares) shall have certain
registration rights pursuant to that certain Registration Rights Agreement dated
as of September 9, 1999, between the Company, Silicon Valley Bank and Holder as
amended to date. The Company represents and warrants to Holder that the
Company's execution, delivery and performance of the aforesaid Amendment (a) has
been duly authorized by all necessary corporate action of the Company's Board of
Directors and shareholders, (b) will not violate the Company's Certificate of
Incorporation or By-laws, each as amended, (c) will not violate or cause a
breach or default (or an event which with the passage of time or the giving of
notice or both, would constitute a breach or default) under any agreement,
instrument, mortgage, deed of trust or other arrangement to which the Company is
a party or by which it or any of its assets is subject or bound, and (d) does
not require the approval, consent or waiver of or by any third party which
approval, consent or waiver has not been obtained as of the Issue Date of this
Warrant.

ARTICLE 4. MISCELLANEOUS.

          4.1 Term; Notice of Expiration. Subject to Section 1.8 above, this
Warrant is exercisable, in whole or in part, at any time and from time to time
on or before the Expiration Date set forth above.


                                        6
<PAGE>

          4.2 Legends; Compliance with Securities Act. This Warrant and the
Shares (and the securities issuable, directly or indirectly, upon conversion of
the Shares, if any) shall be imprinted with a legend in substantially the
following form:

     THIS SECURITY HAS NOT BEEN REGISTERED UNDER THE SECURITIES ACT OF 1933, AS
     AMENDED, OR REGISTERED OR QUALIFIED UNDER ANY STATE SECURITIES OR "BLUE
     SKY" LAWS, AND MAY NOT BE SOLD, PLEDGED, OR OTHERWISE TRANSFERRED WITHOUT
     AN EFFECTIVE REGISTRATION THEREOF UNDER SUCH ACT AND/OR LAWS OR PURSUANT TO
     RULE 144 UNDER THE SECURITIES ACT OF 1933, AS AMENDED, OR AN OPINION OF
     COUNSEL REASONABLY SATISFACTORY TO THE CORPORATION AND ITS COUNSEL, THAT
     SUCH REGISTRATION AND/OR QUALIFICATION IS NOT REQUIRED.

In addition, in connection with the issuance of this Warrant, the holder
specifically represents to the Company by acceptance of this Warrant as follows:

(a) The holder is aware of the Company's business affairs and financial
condition, and has acquired information about the Company sufficient to reach an
informed and knowledgeable decision to acquire this Warrant. The holder is
acquiring this Warrant for its own account for investment purposes only and not
with a view to, or for the resale in connection with, any "distribution" thereof
in violation of the Securities Act of 1933, as amended (the "Act").

(b) The holder understands that this Warrant has not been registered under the
Act in reliance upon a specific exemption therefrom, which exemption depends
upon, among other things, the bona fide nature of the holder's investment intent
as expressed herein.

(c) The holder further understands that this Warrant must be held indefinitely
unless subsequently registered under the Act and qualified under any applicable
state securities laws, or unless exemptions from registration and qualification
are otherwise available. The holder is aware of the provisions of Rule 144,
promulgated under the Act.

(d) The holder is an "accredited investor" as such term is defined in Rule 501
of Regulation D promulgated under the Act.

          4.3 Compliance with Securities Laws on Transfer. This Warrant and the
Shares issuable upon exercise of this Warrant (and the securities issuable,
directly or indirectly, upon conversion of the Shares, if any) may not be
transferred or assigned in whole or in part without compliance with applicable
federal and state securities laws by the transferor and the transferee
(including, without limitation, the delivery of investment representation
letters and legal opinions reasonably satisfactory to the Company, as reasonably
requested by the Company). The Company shall not require Holder to provide an
opinion of counsel if the transfer is to an affiliate of Holder or if there is
no material question as to the availability of current information as referenced
in Rule 144(c), Holder represents that it has complied with Rule 144(d) and (e)
in reasonable detail, the selling broker represents that it has complied with
Rule 144(f), and the Company is provided with a copy of Holder's notice of
proposed sale.


                                        7

<PAGE>

          4.4 Transfer Procedure. Subject to the provisions of Section 4.3
Holder may transfer all or part of this Warrant and/or the Shares issuable upon
exercise of this Warrant (or the securities issuable, directly or indirectly,
upon conversion of the Shares, if any) at any time to any transferee by giving
the Company notice of the portion of the Warrant being transferred setting forth
the name, address and taxpayer identification number of the transferee and
surrendering this Warrant to the Company for reissuance to the transferee(s)
(and Holder if applicable).

          4.5 Notices. All notices and other communications from the Company to
the Holder, or vice versa, shall be deemed delivered and effective when given
personally or sent by express overnight courier service, or mailed by
first-class registered or certified mail, postage prepaid, or by electronic
facsimile transmission with prompt confirmation by one of the foregoing means,
at such address as may have been furnished to the Company or the Holder, as the
case may be, in writing by the Company or such holder from time to time, but in
all cases, unless instructed in writing otherwise, the Company shall deliver a
copy of all notices to Holder to ORIX Venture Finance LLC, 245 Park Avenue, 19th
Floor, New York, NY 10167, Attention: President.

          4.6 Waiver. This Warrant and any term hereof may be changed, waived,
discharged or terminated only by an instrument in writing signed by the party
against which enforcement of such change, waiver, discharge or termination is
sought.

          4.7 Issue Tax. The issuance of the securities subject to this Warrant
shall be made without charge to the Holder for any issue tax (other than
applicable income taxes) in respect thereof.

          4.8 Attorneys Fees. In the event of any dispute between the parties
concerning the terms and provisions of this Warrant, the party prevailing in
such dispute shall be entitled to collect from the other party all costs
incurred in such dispute, including reasonable attorneys' fees.

          4.9 Governing Law. This Warrant shall be governed by and construed in
accordance with the laws of The Commonwealth of Massachusetts, without giving
effect to its principles regarding conflicts of law.

                  [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]


                                        8

<PAGE>

     IN WITNESS WHEREOF, the Company has caused this Warrant to be executed as
an instrument under seal by its duly authorized representative as of the date
first above written.

                                        ATHENAHEALTH, INC.


                                        By /s/ Jonathan Bush
                                           -------------------------------------
                                        Name: Jonathan Bush
                                        Title: President & CEO


                                        9

<PAGE>

                                   APPENDIX 1

                               NOTICE OF EXERCISE

     1. The undersigned hereby elects to purchase _________________ shares of
the ________________________ stock of athenahealth, Inc. pursuant to Section 1.1
of the attached Warrant, and tenders herewith payment of the purchase price of
such shares in full.

     1. The undersigned hereby elects to convert the attached Warrant into
Shares in the manner specified in Section 1.2 of the attached Warrant. This
conversion is exercised with respect to ________________________ of shares of
the ______________________________ Stock of athenahealth, Inc.

     [Strike paragraph that does not apply.]

     2. Please issue a certificate or certificates representing said shares in
the name of the undersigned or in such other name as is specified below:

                                        ----------------------------------------
                                        (Name)

                                        ----------------------------------------

                                        ----------------------------------------
                                        (Address)

     3. The undersigned represents it is acquiring the shares solely for its own
account and not as a nominee for any other party and not with a view toward the
resale or distribution thereof except in compliance with applicable securities
laws.


                                        ----------------------------------------
                                        (Signature)

-------------------------------------
(Date)


                                       10

<PAGE>

                        Schedule 3.1(b) - Capitalization

Outstanding Capital Stock:

<TABLE>
<S>                                      <C>
Common Stock                             5,039,371 shares
Series A-l Convertible Preferred Stock   1,600,000 shares
Series A-2 Convertible Preferred Stock     787,748 shares
Series B-1 Convertible Preferred Stock     627,000 shares
Series B-2 Convertible Preferred Stock      19,395 shares
Series C Convertible Preferred Stock     7,214,288 shares
Series D Convertible Preferred Stock     9,993,342 shares
Series E Convertible Preferred Stock     1,289,684 shares
</TABLE>

Outstanding options, warrants, convertible securities, convertible debentures,
and rights to acquire, subscribe for, and/or purchase any Common Stock and/or
other capital stock of the Company or any securities or debentures convertible
into or exchangeable for Common Stock and/or other capital stock of the Company:

<TABLE>
<S>                      <C>
Options                  3,047,650 shares of Common Stock
Warrants                    75,000 shares of Common Stock
                            31,481 shares of Series A-2 Preferred Stock
                            28,571 shares of Series C Preferred Stock
                           300,360 shares of Series D Preferred Stock
                           194,375 shares of Series E Preferred Stock
Convertible Debentures   None
Rights                   None
</TABLE>


                                       11