Exhibit 10.5

SECOND AMENDMENT TO EMPLOYMENT AGREEMENT

THIS SECOND AMENDMENT TO EMPLOYMENT AGREEMENT (this “Amendment”) between
Allscripts LLC, a Delaware limited liability company (“Company”), and Laurie
McGraw (“Executive”) is made and entered into as of July 7, 2006.

WITNESSETH:

WHEREAS, Allscripts, Inc. and Executive entered into an Employment Agreement,
dated as of January 31, 2003 and a Clarification Amendment to Employment
Agreement dated as of April 17, 2003 (collectively, as the same may be further
amended, supplemented or otherwise modified from time to time, the “Employment
Agreement”); and

WHEREAS, the Compensation Committee of the Board of Directors of Parent (the
“Board”), after comprehensive review of employment arrangements with executive
officers, has determined that it is advisable and in the best interests of
Parent, Company and Parent’s stockholders to modify such arrangements to extend
the term of the Employment Agreement, and to more appropriately reflect the
current business and legal environment and risk profile of Parent and its
subsidiaries; and

WHEREAS, Company and Executive desire to amend the Employment Agreement upon the
terms and conditions set forth herein.

NOW, THEREFORE, in consideration of the foregoing premises, and the mutual
promises and agreements herein contained, the parties hereto agree as follows:

1. Amendment Date. This Amendment shall be deemed effective as of July 8, 2006
(the “Amendment Date”). Except as specifically set forth in this Amendment, all
capitalized terms used in this Amendment shall have the same meaning as set
forth in the Employment Agreement.

2. Renewal and Rights Upon Expiration/Termination. (a) Section 2 of the
Employment Agreement is hereby amended and restated as follows:

The initial term of Executive’s employment by Company under this Agreement shall
commence as of January 31, 2003 (the “Effective Date”) and shall continue in
effect through December 31, 2007 unless earlier terminated as provided herein.
Thereafter, the Company may elect to renew this Agreement upon the expiration of
the initial term or any renewal term by providing written notice of renewal to
Executive at least ninety (90) days prior to the expiration of the then current
term. If such notice is not provided, Executive must notify Company that Company
failed to provide a notice of renewal. If Company does not cure such failure
within five (5) business days, this Agreement will terminate at the expiration
of the then current term. If Company elects not to renew this Agreement at the
end of the initial term or any renewal term, such nonrenewal shall be treated as
a termination of the Employment Period without cause by Company for the limited
purpose of determining the payments and benefits available to Executive (i.e.,
Executive shall be entitled to the severance/benefits set forth in
Section 4.5.1). If

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

Executive elects not to renew this Agreement, the same shall constitute a
termination of the Employment Period by Executive without cause, and Executive
shall only be entitled to the payments and benefits set forth in Section 4.5.2.
As used herein, the term “Employment Period” shall mean the period from the
Effective Date until the termination of the Agreement (i) for non-renewal
pursuant to this Section 2, or (ii) pursuant to Section 4 herein.

(b) Section 4.5.2 of the Employment Agreement shall be amended to delete the
words “or a non-renewal under Section 2” and in lieu thereof add the words “or
Executive terminates the Employment Period by a non-renewal by Executive under
Section 2” following “if Executive terminates the Employment Period other than
as a result of a Constructive Discharge” in the first sentence of said Section.

3. Termination by Company Without Cause or for Constructive Discharge.
Section 4.5.1(iv) of the Employment Agreement is deleted in its entirety and
shall be replaced with the words “Intentionally Omitted.”

4. Termination in Connection with Change of Control.

(a) A new Section 4.4.2 shall be added as follows:

For purposes of this Agreement, a “Change of Control” shall mean any one of the
following events:

(i) the acquisition by any person or group of beneficial ownership of stock
possessing more than thirty percent (30%) of the outstanding securities of
Company which generally entitle the holder thereof to vote for the election of
directors (“Voting Power”), except that (a) no such person or group shall be
deemed to own beneficially (1) any securities acquired directly from Company
pursuant to a written agreement with Company, or (2) any securities held by
Company or a subsidiary of Company (“Subsidiary”), or any employee benefit plan
(or related trust) of Company or a Subsidiary; and (b) no Change in Control
shall be deemed to have occurred solely by reason of any such acquisition by a
corporation with respect to which, after such acquisition, more than sixty
percent (60%) of the then outstanding shares of common stock of such corporation
and the Voting Power of such corporation are then beneficially owned, directly
or indirectly, by the persons who were the beneficial owners of the stock and
Voting Power of Company immediately before such acquisition, in substantially
the same proportions as their ownership immediately before such acquisition; or

(ii) the individuals who constitute the Board as of July 7, 2006 (the “Incumbent
Board”) cease for any reason other than their deaths to constitute at least a
majority of the Board; provided that any individual who becomes a director after
July 7, 2006 whose election or nomination for election by Company’s stockholders
was approved by a vote of at least two-thirds (2/3) of the directors then
comprising the Incumbent Board shall be considered, for purposes of this
Section, as though such individual were a member of the Incumbent Board,

 

2

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

but excluding, for this purpose, any such individual whose initial assumption of
office is in connection with an actual or threatened election contest relating
to the election of the directors of Company (as such terms are used in Rule
14a-11 under the 1934 Act); or

(iii) Company effects: (a) a merger, reorganization or consolidation of Company
with respect to which the individuals and entities who were the respective
beneficial owners of the shares of common stock and Voting Power of Company
immediately before such merger, reorganization or consolidation do not,
immediately after such merger, reorganization or consolidation, beneficially
own, directly or indirectly, more than sixty percent (60%) of, respectively, the
then outstanding shares of common stock and the Voting Power of the corporation
resulting from such merger, reorganization, or consolidation; (b) a liquidation
or dissolution of Company; or (c) a sale or other disposition of all or
substantially all of the assets of Company.

(b) A new Section 4.4.3 shall be added as follows:

For purpose of the foregoing definition, the terms “beneficially owned” and
“beneficial ownership” and “person” shall have the meanings ascribed to them in
SEC rules 13d-5(b) under the 1934 Act; and “group” means two or more persons
acting together in such a way to be deemed a person for purposes of
Section 13(d) of the 1934 Act. Further, a Change of Control shall be deemed to
include a Change of Control of Parent; and with respect to Company, references
to “shares” or “common stock” shall be deemed to include the membership
interests of Company.

(c) A new Section 4.5.5 shall be added as follows:

Additional Severance Upon Termination in Connection with Change of Control. If a
Change of Control occurs and the successor to Company does not, at the time of
the Change of Control, provide Executive with a comparable job at the location
in which she performed services for Company immediately prior to the Change of
Control (or within fifty (50) miles thereof), then Executive shall be entitled
to receive the compensation and benefits described in Section 4.5.1 (except for
those benefits described in Sections 4.5.1(i) and (ii)) and a lump sum severance
payment equal to Executive’s Base Salary in effect as of the Termination Date.

5. Base Salary. Section 3.1 of the Employment Agreement is hereby amended and
restated as follows:

During the Employment Period, Company shall pay to Executive an annual base
salary, effective July 15, 2006, at a rate of Two Hundred Forty- Five Thousand
Dollars ($245,000) per annum, subject to all appropriate federal and state
withholding taxes, which base salary shall be payable in accordance with
Company’s normal payroll practices and procedures. Executive’s base salary shall
be reviewed annually prior to the beginning of each Fiscal Year (as defined

 

3

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

below) during the Employment Period by the Chief Executive Officer of Company,
and may be increased in the sole discretion of the Chief Executive Officer,
based on Executive’s performance during the preceding Fiscal Year. For purposes
of this Agreement, the term “Fiscal Year” shall mean the fiscal year of the
Company, commencing on January 1 of each year and ending on December 31.
Executive’s base salary, as such base salary may be increased annually
hereunder, is hereinafter referred to as the “Base Salary.”

6. Performance Bonus. Section 3.2 of the Employment Agreement is hereby amended
and restated as follows:

Executive shall be eligible to receive a cash bonus with respect to each Fiscal
Year of Company that ends during the term of this Agreement (the “Performance
Bonus”). Executive shall have a target Performance Bonus for each Fiscal Year
equal to forty percent (40%) of Executive’s base salary as in effect at the
beginning of such Fiscal Year. Payment of the Performance Bonus, if any, will be
subject to the sole discretion of the Chief Executive Officer, and the amount of
any such Performance Bonus will be determined by, and based upon criteria
selected by, the Chief Executive Officer.

7. Miscellaneous. Except as modified by this Amendment, the Employment Agreement
shall continue in full force and effect and is hereby ratified and confirmed. To
the extent that any provision of this Amendment is inconsistent with the
Agreement, the terms of this Amendment shall control. This Amendment and the
Employment Agreement (a) are complete, (b) constitute the entire and original
understanding between the parties with respect to the subject matter hereof and
thereof, and (c) supersede all prior agreements, whether oral or written. No
waiver, modification, or addition to this Amendment or the Employment Agreement
shall be valid unless in writing and signed by the parties hereto.

IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be duly
executed as of the day and year first above written.

 

ALLSCRIPTS LLC     Laurie McGraw By:  

/s/ Glen Tullman

 

   

/s/ Laurie McGraw

 

Title:  

Chief Executive Officer

 

   

 

4