<PAGE>

                                                                   EXHIBIT 10.12

                              SUBLEASE AGREEMENT

1.   PARTIES This Sublease is entered into as of the 13th day of July, 1997, by
and between Baugh Industrial Contractors, Inc., a Washington Corporation
("Sublessor"), and HealthKnowledge Corporation, a Washington Corporation
("Sublessee"), as a Sublease under the Lease (the "Lease") dated May 25, 1995,
entered into by Sublessor and Spieker Properties, L.P. ("Master Landlord"). A
copy of the Lease is attached hereto, marked Exhibit A, and incorporated herein
by reference.

2.   PROVISIONS CONSTITUTING SUBLEASE

2.1  Assumption of Obligations. This Sublease is subject to all of the terms and
     -------------------------
conditions of the Lease in Exhibit A, except for Sections 3(a), 32(a), 36 and
Exhibit C of the Lease which are specifically excluded and except as otherwise
specifically exempted herein. Subject to said limitations, Sublessee shall
assume and perform the obligations of Sublessor as Lessee in the Lease for the
benefit of Sublessor, and Sublessor shall assume and perform to the extent
possible the obligations of Master Landlord as Lessor in the Lease for the
benefit of Sublessee, to the extent said terms and conditions are applicable to
the Premises (defined below) subleased pursuant to this Sublease. Sublessee
shall be entitled to receive all of the rights and benefits reserved for the
Sublessor as Lessee under the Master Lease including use of the seven parking
spaces in the building garage.

2.2  Exceptions. Notwithstanding anything contained herein to the contrary, (i)
     ----------
Sublessee's duties and obligations hereunder apply only to acts and omissions
occurring during the term of this Sublease; (ii) Sublessee's duties and
obligations in regard to the condition of the Premises shall be performed based
on the condition of the Premises when the Premises are delivered to and accepted
by Sublessee hereunder and not on their condition upon the commencement of the
Lease; (iii) nothing contained in this Sublease shall affect the duties and
obligations of Sublessor under the Lease, and Sublessor shall continue to
perform all of its obligations under the Lease; and (iv) the exclusion of
Section 32(a) of the Lease from the terms of this Sublease shall not affect any
rights Sublessor may have under RCW 60.72.010.

2.3  Mutual Covenants. Neither Sublessor nor Sublessee shall commit or permit to
     ----------------
be committed on the Premises or otherwise any act or omission which shall
violate, or constitute breach of or default under any term or condition of the
Lease. Sublessor and Sublessee shall make their respective best efforts to cause
Master Landlord to perform all of its obligations under the Lease, and to keep
the Lease in full force and effect.

                                       1
<PAGE>

2.4  Lease Termination. In the event of the termination of Sublessor's interest
     -----------------
as Lessee under the Lease for any reason, then this Sublease shall terminate
coincidentally therewith without any liability of Sublessor to Sublessee, except
for any liability relating to Sublessor's breach of the terms of this Sublease,
if any.

2.5  Cooperation. Sublessor shall cooperate with Sublessee in regard to any
     -----------
efforts by Sublessee to obtain consents and approvals from Master Landlord which
may be required under the Lease.

3.   PREMISES

3.1  Description. Sublessor leases to Sublessee and Sublessee leases from
     -----------
Sublessor all of the premises leased from Master Landlord to Sublessor under the
Lease as described in the Lease and Exhibits B and E thereto (the "Premises")
situated in the City of Bellevue, County of King, State of Washington. The floor
plan of the Premises is attached hereto as Exhibit B and made a part hereof.

3.2  Condition. Prior to the commencement of the term of this Sublease,
     ---------
Sublessor shall cause the Premises to be in good condition and repair, and to
paint interior wails and woodwork (except for areas which Sublessee and
Sublessor mutually agree are not in need of fresh paint), to clean all carpets
(which may be completed on the date the Sublease term commences), to replace
damaged ceiling tiles, and to patch, sand and paint walls damaged by the removal
of cabinets and fixtures.

4.   TERM

4.1  Term. The term of this Sublease shall be for a period commencing on July
     ----
13, 1997, and ending on August 30, 2000, unless sooner terminated pursuant to
any provision hereof; provided, however, this Sublease shall not become
effective until and unless Master Landlord consents to the terms hereof by
signing below and Sublessor receives from Sublessee acceptable evidence that
Sublessee has obtained new private placement financing of not less than
$2,000,000.

4.2  Delay in Commencement. Notwithstanding the provisions of Section 4.1 above,
     ---------------------
if for any reason Sublessor cannot deliver possession of the Premises to
Sublessee on July 13, 1997, Sublessor shall not be subject to any liability
therefor, nor shall such failure affect the validity of this Sublease or the
obligations of Sublessee hereunder or extend the term hereof, but in such case
Sublessee shall not be obligated to pay rent until possession of the Premises is
tendered to Sublessee; provided, however, that (i) Sublessor shall use its best
efforts to deliver possession of the Premises to Sublessee on July 13, 1997; and
(ii) if Sublessor shall not have delivered possession of the Premises to
Sublessee on or before August 15, 1997, Sublessee may, at Sublessee's option, by
notice in writing to

                                       2
<PAGE>

Sublessor given on or before August 27, 1997, cancel this Sublease. If this
Lease is canceled as herein provided, Sublessor shall return any monies
previously deposited by Sublessee and the parties shall be discharged from all
obligations hereunder.

5.  RENT Sublessee shall pay to Sublessor as rent for the Premises equal monthly
installments of Twelve Thousand One Hundred Twenty Four and No/100 Dollars
($12,124.00), in advance, on the first day of each calendar month of the term
hereof. Sublessee shall pay Sublessor upon the full execution hereof by
Sublessee and Sublessor (and upon Master Landlord's written consent to this
Sublease in conformance with the substance of the consent form shown at the end
of this Sublease) the sum of Twelve Thousand One Hundred Twenty Four and No/100
Dollars ($12,124.00) as rent for August, 2000. Rent for any period during the
term hereof which is for less than one month shall be a pro rata portion of the
monthly installment. Rent shall be payable without notice or demand and without
any deduction, offset, or abatement in lawful money of the United States of
America to Sublessor at the address stated herein or to such other persons or at
such other places as Sublessor may designate in writing.

6.   SECURITY DEPOSIT

6.1  Amount and Purpose. Sublessee shall deposit with Sublessor upon the full
     ------------------
execution hereof by Sublessee, Sublessor and Master Landlord the sum of
Seventeen Thousand Seven Hundred Ninety and No/100 Dollars ($17,790.00) as
security for Sublessee's faithful performance of Sublessee's obligations
hereunder. If Sublessee fails to pay rent or other charges due hereunder, or
otherwise defaults with respect to any provision of this Sublease, Sublessor may
use, apply or retain all or any portion of said deposit for the payment of any
rent or other charge in default or for the payment of any other sum to which
Sublessor may become obligated by reason of Sublessee's default, or to
compensate Sublessor for any loss or damage which Sublessor may suffer thereby.
If Sublessor so uses or applies all or any portion of said deposit, Sublessee
shall within ten (10) days after written demand therefor deposit cash with
Sublessor in the amount sufficient to restore said deposit to the full amount
hereinabove stated (minus the amounts previously applied to rent as provided
below) and Sublessee's failure to do so shall be a breach of this Sublease, and
Sublessor may at its option terminate this Sublease.

6.2  Refund. Sublessor shall not be required to keep said deposit separate from
     ------
its general accounts. If there remains no uncured default of Sublessee hereunder
twelve (12) months after the commencement of the term of this Sublease, one-
third (1/3) of said deposit or so much thereof as had not theretofore been
applied by Sublessor shall be applied to the payment of the thirteenth (13th)
installment of the rent coming due hereunder; if there remains no uncured
default of Sublessee

                                       3
<PAGE>

hereunder twenty-four (24) months after the commencement of the term of this
Sublease, one-half ( 1/2) of the then remaining balance of the deposit shall be
applied to the payment of the twenty-fifth (25th) installment of rent coming due
hereunder; and if there remains no uncured default of Sublessee thereafter, all
of the then remaining balance of the deposit shall be refunded to Sublessee
within ten (10) days following the expiration of this Sublease.

7.   USE The Premises shall be used and occupied only for general office use.

8.   COMMISSION In accordance with the listing agreement dated March 13, 1997
between Sublessor and Leibsohn & Company ("Broker"), Sublessor shall remit a
brokerage commission to Broker upon Sublessee's occupancy of the Premises.

9.   MISCELLANEOUS

9.1  Notices. Any notice under this Sublease shall be deemed given if delivered
     -------
personally or sent by reputable courier service providing proof of delivery
(e.g., Federal Express, DHL, etc.), registered mail, postage prepaid, addressed
------
to the other party at the address set forth below or at such other address as
designated by the party by written notice, or by confirmed facsimile.

     SUBLESSOR           BAUGH INDUSTRIAL CONTRACTORS, INC.
                         900 Poplar Place South
                         Seattle, WA 98144
                         Attn: Alan Cornell
                         Fax: (206) 328-9235

     SUBLESSEE           HEALTHKNOWLEDGE CORPORATION
                         1300 114th Ave. S.E., Ste. 100
                         Bellevue, WA 98004
                         Attn: Chief Financial Officer
                         Fax:_______________________

9.2. Dispute Resolution. Any and all disputes arising between Sublessee and
     ------------------
Sublessor in connection with this Sublease shall be resolved in the following
order: (i) by good faith negotiation between the representatives of Sublessee
and Sublessor who have authority to fully and finally resolve the dispute; or
(ii) by litigation. In the event of any action to enforce or for breach of this
Sublease, the prevailing party shall be entitled to recover such sums as the
court may adjudge reasonable as attorneys' fees and litigation expenses,
including fees and expenses that may be incurred in any appellate proceeding.

                                       4
<PAGE>

9.3  Assignment. Notwithstanding Section 9 of the Lease to the contrary, a
     ----------
transfer by the present majority shareholders of Sublessee of ownership and
control of Sublessee's voting stock shall not be deemed an assignment for the
purposes of Section 9(a) of the Lease, and as incorporated herein, to the extent
such transfer results from a private placement.

EXECUTED as of the date first above written.

SUBLESSOR:

BAUGH INDUSTRIAL CONTRACTORS, INC.

Name: /s/ Curt C. Wagner
     ----------------------------
       Name: CURT C. WAGNER
            ---------------------
       Title: VICE PRESIDENT
             --------------------


SUBLESSEE:

HEALTHKNOWLEDGE CORPORATION

Name: /s/ Dennis Schmuland
     -----------------------------
        Name: Dennis Schmuland
             ---------------------
        Title: Chairman
              --------------------


List of Exhibits
----------------

Exhibit A:  Lease
Exhibit B:  Floor Plan

                                       5
<PAGE>

                                                                       EXHIBIT A
                            Basic Lease Information

                             Bellefield Office Park
                                  OFFICE LEASE
<TABLE>

<S>                  <C>                       <C>
                     Lease Date:                       May 25, 1995

                     Landlord                          Spieker Properties, L.P.,
                                                       a California limited partnership

                     Address of Landlord:              915 118/th/ Ave. S.E., Suite 110
                                                       Bellvue, WA  98004

                     Tenant:                           Baugh Industrial Contractors, Inc.
                                                       a Washington corporation

                     Address of Tenant:                1300 114/th/ Ave. S.E., Suite 100
                                                       Bellvue, WA  98004

                     Contact:                          E. Scott Dahlgreen

Paragraph 1          Premises:                 Approximately 7,461 rentable Square Feet located in Suite 100
                                               (formerly known as Suites 112, 113, 114, 116 & 118),
                                               Building "L". See Addendum.
                                                             ------------

                     Building:                 "Mercer Canal" Building "L": 1300 114/th/ Ave. SE, Bellevue WA

                     Project:                  that certain office park commonly known as Bellefield Office Park
                                               located in Bellevue, Washington on the Property containing 12
                                               office buildings, including the building, as it may be changed from
                                               time to time.

                     Property:                 The real property on which the building is located, as more fully
                                               and legally described on Exhibit E attached.

Paragraph 2          Lease Term:               The period commencing on September 1, 1995 and ending on the date
                                               ------------------------------------------               --------
                                               which is the last day of the sixtieth (60/th/) month following the
                                               ------------------------------------------------------------------
                                               Rent commencement Date.  SEE ADDENDUM
                                               -------------------------------------

Paragraph 3          Base Rent:                Months 1-36       $10,570,00/month
                                                                 ----------------
                                               Months 37-60      $11,503.00/month
                                                                 ----------------
                                               See Addendum
                                               -------------
</TABLE>

Paragraph 27         "Base Year" for Operating Cost: 1995
                                                     ----

                     "Fiscal Year" for Operating Costs: January 1 - December 31

Paragraph 27c        "Tenants Share" of Operating Costs: 2.4%
                                                         ----

Paragraph 32         Security Deposit: $0.00
                                       -----

The foregoing Basic Lease Information is hereby incorporated into and made a
part of this Lease. Each reference in this Lease to set forth Basic Lease
Information shall mean the respective information set forth above and shall be
construed to incorporate all of the terms provided under the particular Lease
paragraph pertaining to such information. If there is any conflict between any
Basic Lease information and the Lease, the Lease shall control

<TABLE>
<CAPTION>
LANDLORD:                                    TENANT:
<S>                                          <C>
Spiecker Properties                          Baugh Industrial Contractors, Inc.,
A California limited partnership             a Washington corporation
By:     Spiecker Properties L.P.,
        a California limited partnership
Its:    General Partner
By:     Spiecker Properties, Inc.
        a Maryland corporation
Its:    General Partner

   /s/ Donald S. Jefferson                     /s/
------------------------------               --------------------------------------
By: Donald S. Jefferson                      By:
Its: Senior Vice President                   Its: Baugh Industrial Contractors, Inc.
                                                  President
Date:                                        Date: 6/5/95
     --------------------------                   ---------------------------------
</TABLE>