<PAGE>   1
                                                                   Exhibit 10.40

                          REGISTRATION RIGHTS AGREEMENT

      This REGISTRATION RIGHTS AGREEMENT (this "Agreement") is made and entered
into as of January 31, 1999, by and among RainTree Healthcare Corporation, a
Delaware corporation (the "Company"), and the undersigned holders ("Holders") of
more than 10% of the outstanding Common Stock, $.001 par value (the "Common
Stock"), as of the date hereof, of the Company.

      This Agreement is made pursuant to the terms of the Debtors' First Amended
Joint Plan of Reorganization, dated October 15, 1998, as supplemented and
amended (the "Plan"), which Plan was confirmed by a final order of the United
States Bankruptcy Court for the District of Arizona (Case No.
B-98-06583-PHX-GBN) dated January 29, 1999, which order has become final and
non-appealable.

      NOW, THEREFORE, in consideration of the mutual promises and agreements set
forth herein, and other valuable consideration, the receipt and sufficiency of
which are hereby acknowledged, the parties hereto hereby agree as follows:

      1. Certain Definitions. As used in this Agreement, the following terms
shall have the following respective meanings:

            "Common Stock" has the meaning ascribed to such term in the first
      paragraph of this Agreement.

            "Commission" shall mean the Securities and Exchange Commission, or
      any other federal agency at the time administering the Securities Act.

            "Exchange Act" shall mean the Securities Exchange Act of 1934, as
      amended, or any similar federal statute, and the rules and regulations of
      the Commission thereunder, all as the same shall be in effect at the time.

            "Holders" has the meaning ascribed to such term in the first
      paragraph of this Agreement.

            "Plan" has the meaning ascribed to such term in the second
      paragraph of this Agreement.

            "Public Offering" shall mean a public offering of equity securities
      of the Company pursuant to an effective registration statement under the
      Securities Act, including a public offering in which Holders are entitled
      to sell shares of Common Stock of the Company pursuant to this Agreement.

            "Registrable Securities" means the Common Stock acquired by the
      Holders pursuant to the Plan and upon the Effective Date (as defined in
      the Plan).
<PAGE>   2
            "Registration Expenses" shall mean the expenses described in Section
      5 of this Agreement.

            "Securities Act" shall mean the Securities Act of 1933, as amended,
      or any similar federal statute, and the rules and regulations of the
      Commission thereunder, all as the same shall be in effect at the time.

            "Selling Expenses" shall mean the expenses described in Section 6 of
      this Agreement.

      2. Required Registration.

            (a) At any time following the date which is six months after any
registration statement covering a Public Offering of securities of the Company
under the Securities Act shall have become effective, the Holders of Registrable
Securities constituting at least 25% of the total shares of Registrable
Securities then outstanding may request the Company to register under the
Securities Act all or any portion of the shares of Registrable Securities held
by such requesting Holder or Holders for sale in the manner specified in such
notice. Notwithstanding anything to the contrary contained herein, no request
may be made under this Section 2 within 180 days after the effective date of a
registration statement filed by the Company covering a firm commitment
underwritten Public Offering in which the Holders of Registrable Securities
shall be entitled to join pursuant to Sections 2, 3 or 4 and in which there
shall have been effectively registered all shares of Registrable Securities as
to which registration shall have been requested.

            (b) Following receipt of any notice under this Section 2, the
Company shall promptly notify all Holders of Registrable Securities from whom
notice has not been received and shall use its best efforts to register under
the Securities Act, for public sale in accordance with the method of disposition
specified in such notice from requesting Holders, the number of shares of
Registrable Securities specified in such notice (and in all notices received by
the Company from such other Holders within 30 days after the giving of such
notice by the Company). If such method of disposition shall be an underwritten
Public Offering, the Holders of a majority of the shares of Registrable
Securities to be sold in such offering may designate the managing underwriter of
such offering, subject to the approval of the Company. If such method of
disposition is an underwritten Public Offering and in the opinion of the
managing underwriter inclusion of all shares of Registrable Securities for which
registration has been requested would adversely affect the marketing of the
shares to be sold, the number of shares of Registrable Securities to be included
may be reduced pro rata among requesting Holders based on the number of shares
of Registrable Securities, owned by such Holders. The Company shall be obligated
to register Registrable Securities pursuant to this Section 2 on one occasion
only.

            (c) The Company and any other Holders of Common Stock shall be
entitled to include in any registration statement referred to in this Section 2,
for sale in accordance with the method of disposition specified by the
requesting Holders, shares of Common Stock to be sold by the Company or such
other Holders for their own accounts, except as and to the extent that, in the
opinion of the managing underwriter (if such method of disposition shall be an
underwritten Public Offering), such inclusion would adversely affect the
marketing of the Registrable Securities to be


                                       2
<PAGE>   3
sold. Except for registration statements on Form S-4, S-8 or any successor
thereto and except as provided in Section 9(g), the Company will not file with
the Commission any other registration statement with respect to its Common
Stock, whether for its own account or that of other stockholders, from the date
of receipt of a notice from requesting Holders pursuant to this Section 2 until
the completion of the period of distribution of the registration contemplated
thereby.

      3. Incidental Registration. If the Company at any time (other than
pursuant to Section 2 or 4) proposes to register any of its securities under the
Securities Act for sale to the public, whether for its own account or for the
account of other security holders or both (except with respect to registration
statements on Forms S-4, S-8 or another form not available for registering the
Registrable Securities for sale to the public), the Company will give written
notice to all Holders of outstanding Registrable Securities of its intention so
to do. Upon the written request of any such Holder, received by the Company
within 20 days after the giving of any such notice by the Company, to register
any of its Registrable Securities, the Company will use its best efforts to
cause the Registrable Securities as to which registration shall have been so
requested to be included in the securities to be covered by the registration
statement proposed to be filed by the Company. In the event that any
registration pursuant to this Section 3 shall be, in whole or in part, an
underwritten Public Offering of Common Stock, the number of shares of
Registrable Securities to be included in such an underwriting may be reduced
(pro rata among the requesting Holders based upon the number of shares of
Registrable Securities owned by such Holders) if and to the extent that the
managing underwriter is of the opinion that such inclusion would adversely
affect the marketing of the securities to be sold by the Company therein.
Notwithstanding the foregoing provisions, the Company may withdraw any
registration statement referred to in this Section 3 without thereby incurring
any liability to the Holders of Registrable Securities.

      4. Shelf Registration. The Company shall use its reasonable best efforts
to cause to be filed as soon as practicable, but in no event later than 120 days
following the date hereof, a shelf registration statement (the "Shelf
Registration") pursuant to Rule 415 under the Securities Act relating to all
Registrable Securities. Notwithstanding the foregoing, the Company shall not be
required to include Registrable Securities of any Holder that has not provided
to the Company all information reasonably requested by the Company for use
therein. The Company shall use its reasonable best efforts to cause such
registration statement to become effective within 180 days of the date hereof
and to keep such registration statement continuously effective, supplemented and
amended to the extent necessary to ensure that it is available for sales of
Registrable Securities by the Holders thereof, and to ensure that it complies
with the requirements of the Securities Act and the policies, rules and
regulations of the Commission until such time as all Registrable Securities
registered thereunder have been sold pursuant to such registration statement or
otherwise. The Shelf Registration shall describe a plan of distribution that
will include one or more methods of sale selected by the Holders, including a
firm commitment underwriting.

      5. Registration Procedures. If and whenever the Company is required by the
provisions of Sections 2, 3 or 4 to use its best efforts to effect the
registration of any shares of Registrable Securities under the Securities Act,
the Company will, as expeditiously as possible:

            (a) prepare and file with the Commission a registration statement
with respect to such securities and use its best efforts to cause such
registration statement to become and remain


                                       3
<PAGE>   4
effective for the period of the distribution contemplated thereby (determined as
hereinafter provided);

            (b) prepare and file with the Commission such amendments and
supplements to such registration statement and the prospectus used in connection
therewith as may be necessary to keep such registration statement effective for
the period specified in paragraph (a) above and comply with the provisions of
the Securities Act with respect to the disposition of all Registrable Securities
covered by such registration statement in accordance with the sellers' intended
method of disposition set forth in such registration statement for such period;

            (c) furnish to each seller of Registrable Securities and to each
underwriter such number of copies of the registration statement and the
prospectus included therein (including each preliminary prospectus) as such
persons reasonably may request in order to facilitate the public sale or other
disposition of the Registrable Securities covered by such registration
statement;

            (d) use its best efforts to register or qualify the Registrable
Securities covered by such registration statement under the securities or "blue
sky" laws of such jurisdictions as the sellers of Registrable Securities or, in
the case of an underwritten Public Offering, the managing underwriter reasonably
shall request; provided, however, that the Company shall not for any such
purpose be required to qualify generally to transact business as a foreign
corporation in any jurisdiction where it is not so qualified or to consent to
general service of process in any such jurisdiction;

            (e) use its best efforts to list the Registrable Securities covered
by such registration statement with any securities exchange on which the Common
Stock of the Company is then listed;

            (f) immediately notify each seller of Registrable Securities and
each underwriter under such registration statement, at any time when a
prospectus relating thereto is required to be delivered under the Securities
Act, of the happening of any event of which the Company has knowledge as a
result of which the prospectus contained in such registration statement, as then
in effect, includes an untrue statement of a material fact or omits to state a
material fact required to be stated therein or necessary to make the statements
therein not misleading in light of the circumstances then existing;

      For purposes of this Agreement, the period of distribution with respect to
the Shelf Registration shall end when all Registrable Securities have been sold.
The period of distribution with respect to a registration pursuant to Section 2
or Section 3 shall end, in the case of a firm commitment underwriting, when each
underwriter has completed its distribution of all securities purchased by it,
or, in all other cases, upon the earlier of (i) 120 days after the effective
date thereof or (ii) the sale of all Registrable Securities covered thereby.

      In connection with each registration hereunder, the sellers of Registrable
Securities will furnish to the Company in writing such information with respect
to themselves and the proposed distribution by them as reasonably shall be
necessary in order to assure compliance with federal and applicable state
securities laws.


                                       4
<PAGE>   5
      If the Company has delivered preliminary or final prospectuses to the
sellers of Registrable Securities and after having done so the prospectus is
amended to comply with the requirements of the Securities Act, the Company shall
promptly notify such sellers and, if requested, such sellers shall immediately
cease making offers of Registrable Securities and return all prospectuses to the
Company. The Company shall promptly provide the sellers with revised
prospectuses and, following receipt of the revised prospectuses, the sellers
shall be free to resume making offers of the Registrable Securities.

      In connection with each registration pursuant to Sections 2, 3 or 4
covering an underwritten Public Offering, the Company and each seller agree to
enter into a written agreement with the managing underwriter selected in the
manner herein provided in such form and containing such provisions as are
customary in the securities business for such an arrangement between such
underwriter and companies of the Company's size and investment stature.

      6. Expenses. All expenses incurred by the Company in complying with
Sections 2, 3 or 4, including, without limitation, all registration and filing
fees, printing expenses, fees and disbursements of counsel and independent
public accountants for the Company, fees and expenses (including counsel fees)
incurred in connection with complying with state securities or "blue sky" laws,
fees of the National Association of Securities Dealers, Inc., transfer taxes,
fees of transfer agents and registrars and costs of insurance, but excluding any
Selling Expenses, are called "Registration Expenses." All underwriting discounts
and selling commissions applicable to the sale of Registrable Securities and
fees and disbursements of counsel to the Holders are called "Selling Expenses."

      The Company will pay all Registration Expenses in connection with each
registration statement under Sections 2, 3 or 4; provided, however, that if a
requested registration under Section 2 is withdrawn by Holders of Registrable
Securities requesting such registration (other than solely as a result of
material information concerning the business or financial condition of the
Company which is made known to such Holders after the date on which such
registration was requested) and if such requesting Holders elect not to have
such registration counted as a registration required under Section 2, the
requesting Holders shall pay the Registration Expenses of such withdrawn
registration pro rata in accordance with the number of shares of Registrable
Securities of each such Holder included in such registration. All Selling
Expenses in connection with each registration statement under Sections 2, 3 or 4
shall be borne by the participating sellers in proportion to the number of
shares sold by each, or by such participating sellers other than the Company
(except to the extent the Company shall be a seller) as they may agree.

      7. Indemnification and Contribution.

            (a) In the event of a registration of any of the Registrable
Securities under the Securities Act pursuant to Sections 2, 3 or 4, the Company
will indemnify and hold harmless each seller of such Registrable Securities
thereunder, each underwriter of such Registrable Securities thereunder and each
other person, if any, who controls such seller or underwriter within the meaning
of the Securities Act, against any losses, claims, damages or liabilities, joint
or several, to which such seller, underwriter or controlling person may become
subject under the Securities Act or otherwise, insofar as such losses, claims,
damages or liabilities (or actions in respect thereof) arise


                                       5
<PAGE>   6
out of or are based upon any untrue statement or alleged untrue statement of any
material fact contained in any registration statement under which such
Registrable Securities were registered under the Securities Act pursuant to
Sections 2, 3 or 4, any preliminary prospectus or final prospectus contained
therein, or any amendment or supplement thereof, or arise out of or are based
upon the omission or alleged omission to state therein a material fact required
to be stated therein or necessary to make the statements therein not misleading,
and will reimburse each such seller, each such underwriter and each such
controlling person for any legal or other expenses reasonably incurred by them
in connection with investigating or defending any such loss, claim, damage,
liability or action, provided, however, that the Company will not be liable in
any such case if and to the extent that any such loss, claim, damage or
liability (or action in respect thereof) arises out of or is based upon an
untrue statement or alleged untrue statement or omission or alleged omission so
made in conformity with information furnished by any such seller, any such
underwriter or any such controlling person in writing specifically for use in
such registration statement or prospectus.

            (b) In the event of a registration of any of the Registrable
Securities under the Securities Act pursuant to Sections 2, 3 or 4, each seller
of such Registrable Securities thereunder, severally and not jointly, will, to
the extent permitted by law, indemnify and hold harmless the Company, each
person, if any, who controls the Company within the meaning of the Securities
Act, each officer of the Company who signs the registration statement, each
director of the Company, each underwriter and each person who controls any
underwriter within the meaning of the Securities Act, against all losses,
claims, damages or liabilities, joint or several, to which the Company or such
officer, director, underwriter or controlling person may become subject under
the Securities Act or otherwise, insofar as such losses, claims, damages or
liabilities (or actions in respect thereof) arise out of or are based upon any
untrue statement or alleged untrue statement of any material fact contained in
the registration statement under which such Registrable Securities were
Registrable under the Securities Act pursuant to Sections 2, 3 or 4, any
preliminary prospectus or final prospectus contained therein, or any amendment
or supplement thereof, or arise out of or are based upon the omission or alleged
omission to state therein a material fact required to be stated therein or
necessary to make the statements therein not misleading, and will reimburse the
Company and each such officer, director, underwriter and controlling person for
any legal or other expenses reasonably incurred by them in connection with
investigating or defending any such loss, claim, damage, liability or action,
provided, however, that such seller will be liable hereunder in any such case if
and only to the extent that any such loss, claim, damage or liability (or action
in respect thereof) arises out of or is based upon an untrue statement or
alleged untrue statement or omission or alleged omission made in reliance upon
and in conformity with information pertaining to such seller, as such, furnished
in writing to the Company by such seller specifically for use in such
registration statement or prospectus, and provided, further, however, that the
liability of each seller hereunder shall be limited to the proceeds received by
such seller from the sale of Registrable Securities covered by such registration
statement.

            (c) Promptly after receipt by an indemnified party hereunder of
notice of the commencement of any action, such indemnified party shall, if a
claim in respect thereof is to be made against the indemnifying party hereunder,
notify the indemnifying party in writing thereof, but the omission so to notify
the indemnifying party shall not relieve it from any liability which it may have
to such indemnified party other than under this Section 7 and shall only relieve
it from any liability which it may have to such indemnified party under this
Section 7 if and to the extent the


                                       6
<PAGE>   7
indemnifying party is prejudiced by such omission. In case any such action shall
be brought against any indemnified party and it shall notify the indemnifying
party of the commencement thereof, the indemnifying party shall be entitled to
participate in and, to the extent it shall wish, to assume and undertake the
defense thereof with counsel reasonably satisfactory to such indemnified party,
and, after notice from the indemnifying party to such indemnified party of its
election so to assume and undertake the defense thereof, the indemnifying party
shall not be liable to such indemnified party under this Section 7 for any legal
or other expenses subsequently incurred by such indemnified party in connection
with the defense thereof other than reasonable costs of investigation and of
liaison with counsel so selected, provided, however, that, if the defendants in
any such action include both the indemnified party and the indemnifying party
and the indemnified party shall have reasonably concluded that there may be
reasonable defenses available to it which are different from or additional to
those available to the indemnifying party or if the indemnified party is advised
by counsel that the interests of the indemnified party reasonably may be deemed
to conflict with the interests of the indemnifying party, the indemnified party
shall have the right to select a separate counsel and to assume such legal
defenses and otherwise to participate in the defense of such action, with the
expenses and fees of such separate counsel and other expenses related to such
participation to be reimbursed by the indemnifying party as incurred. The
indemnifying party shall not, however, in connection with any action or related
action in the same jurisdiction be liable for the fees and expenses of more than
one separate law firm at any one time for all such indemnified parties. No
indemnifying party shall be liable for any settlement of any proceeding effected
without its written consent, which consent shall not be unreasonably withheld,
but if settled with such consent, the indemnifying party agrees to indemnify the
indemnified party from and against any loss or liability by reason of such
settlement.

            (d) In order to provide for just and equitable contribution to joint
liability under the Securities Act in any case in which either (i) any Holder of
Registrable Securities exercising rights under this Agreement, or any
controlling person of any such Holder, makes a claim for indemnification
pursuant to this Section 7 but it is judicially determined (by the entry of a
final judgment or decree by a court of competent jurisdiction and the expiration
of time to appeal or the denial of the last right of appeal) that such
indemnification may not be enforced in such case notwithstanding the fact that
this Section 7 provides for indemnification in such case, or (ii) contribution
under the Securities Act may be required on the part of any such selling Holder
or any such controlling person in circumstances for which indemnification is
provided under this Section 7; then, and in each such case, the Company and such
Holder will contribute to the aggregate losses, claims, damages or liabilities
to which they may be subject (after contribution from others) in such proportion
so that such Holder is responsible for the portion represented by the percentage
that the Public Offering price of its Registrable Securities or offered by the
registration statement bears to the Public Offering price of all securities
offered by such registration statement, and the Company is responsible for the
remaining portion; provided, however, that, in any such case, (A) no such Holder
will be required to contribute any amount in excess of the Public Offering price
of all such Registrable Securities offered by it pursuant to such registration
statement; and (B) no person or entity guilty of fraudulent misrepresentation
(within the meaning of Section 11(f) of the Securities Act) will be entitled to
contribution from any person or entity who was not guilty of such fraudulent
misrepresentation.


                                       7
<PAGE>   8
      8. Changes in Common Stock . If, and as often as, there is any change in
the Common Stock by way of a stock split, stock dividend, combination or
reclassification, or through a merger, consolidation, reorganization or
recapitalization, or by any other means, appropriate adjustment shall be made in
the provisions hereof so that the rights and privileges granted hereby shall
continue with respect to the Common Stock as so changed.

      9. Miscellaneous.

            (a) All covenants and agreements contained in this Agreement by or
on behalf of any of the parties hereto shall bind and inure to the benefit of
the successors and assigns of the Company. This Agreement may not be assigned by
any Holder without the prior written consent of the Company; provided, however,
that each Holder may assign, and the immediate assignee to whom such Holder
transferred (i) its Registrable Securities it holds on the date hereof and (ii)
this Agreement (the "First Assignee"), may assign this Agreement to any holder
who owns more than 10% of the Common Stock. Any Holder or any First Assignee
shall provide the Company with written notice of any such assignment within two
(2) business days of such assignment.

            (b) All notices, requests, consents and other communications
hereunder shall be in writing and shall be delivered in person, mailed by
certified or registered mail, return receipt requested, or sent by telecopier or
telex, addressed as follows:

            if to the Company or any other party hereto, at the address of
      such party set forth in Schedule I hereto;

or, in any case, at such other address or addresses as shall have been furnished
in writing to the Company (in the case of a Holder) or to the Holders of
Registrable Securities (in the case of the Company) in accordance with the
provisions of this paragraph.

            (c) This Agreement shall be governed by and construed in accordance
with the laws of the State of Arizona.

            (d) This Agreement may not be amended or modified, and no provision
hereof may be waived, without the written consent of the Company and the Holders
of at least a majority of the outstanding shares of Registrable Securities.

            (e) 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.

            (f) The obligations of the Company to register shares of Registrable
Securities under Sections 2, 3 and 4 shall terminate on the tenth anniversary of
the date of this Agreement.

            (g) Notwithstanding the provisions of Sections 2 and 4, the
Company's obligation to file a registration statement, or cause such
registration statement to become and remain effective, shall be suspended (i)
for a period not to exceed 120 days in any 12-month period if there exists at
the time material non-public information relating to the Company which, in the
reasonable opinion of the Company, should not be disclosed or (ii) if at the
time of a request to register


                                       8
<PAGE>   9
securities pursuant to Section 2 or an obligation to register securities
pursuant to Section 4, the Company is engaged or has fixed plans to engage,
within 30 days of the time of the request or the time the Shelf Registration is
to be filed, in a firm commitment underwritten Public Offering as to which
Holders of Registrable Securities may include shares pursuant to Section 3.

            (h) If any provision of this Agreement shall be held to be illegal,
invalid or unenforceable, such illegality, invalidity or unenforceability shall
attach only to such provision and shall not in any manner affect or render
illegal, invalid or unenforceable any other provision of this Agreement, and
this Agreement shall be carried out as if any such illegal, invalid or
unenforceable provision were not contained herein.

            (i) Each party covenants, warrants and agrees not to claim or assert
that the validity or enforceability of this Agreement is subject to a defense or
claim based on recharacterization, unconscionability or public policy. If any
provision of this Agreement or the application thereof to any person or
circumstance is determined by a court of competent jurisdiction to be invalid,
void or unenforceable, the remaining provisions hereof or thereof, or the
application of such provision to persons or circumstances or in jurisdictions
other than those as to which it has been held invalid or unenforceable, shall
remain in full force and effect and shall in no way be affected, impaired or
invalidated thereby, so long as the economic or legal substance of the
transactions contemplated hereby or thereby, as the case may be, is not affected
in any manner adverse to any party. Upon such determination, the parties shall
negotiate in good faith in an effort to agree upon such a suitable and equitable
provision to effect the original intent of the parties.

                                    RAINTREE HEALTHCARE CORPORATION

                                    By:  ____________________________________
                                    Name: Clayton Kloehr
                                    Its:  Senior Vice President - Finance
                                          and Treasurer


                                       9
<PAGE>   10
AGREED TO AND ACCEPTED as of the
date first above written.

Holders:
Morgan Stanley Dean Witter High Yield Securities, Inc.
Morgan Stanley Dean Witter Diversified Income Fund
Morgan Stanley Dean Witter Variable Investment Series  -  High Yield Portfolio
High Income Advantage Trust II
High Income Advantage Trust
High Income Advantage Trust III
Morgan Stanley Dean Witter Select Dimensions Investment
  Series - The Diversified Income Portfolio

By:________________________________
      Peter M. Avelar
      Their Vice President

CAPITAL RESEARCH AND MANAGEMENT COMPANY

By: _______________________________
      Name:  Robert J. Martorelli
      Its:   Senior Vice President


                                       10
<PAGE>   11
                                   Schedule I

Holder and Holder's Address

Holders:    Morgan Stanley Dean Witter High Yield Securities, Inc.
            Morgan Stanley Dean Witter Diversified Income Fund
            Morgan Stanley Dean Witter Variable Investment Series - High
                  Yield Portfolio
            High Income Advantage Trust II
            High Income Advantage Trust
            High Income Advantage Trust III
            Morgan Stanley Dean Witter Select Dimensions Investment Series -
                  The Diversified Income Portfolio

            c/o Morgan Stanley Dean Witter Advisors, Inc.
            2 World Trade Center
            72nd Floor
            New York, NY  10048
            Attn:  Peter M. Avelar
            Fax (212) 392-0094

with a copy to

            Gordon Altman Butowsky Weitzen Shalov & Wein
            114 West 47th Street
            New York, NY  10036-1510
            Attn:  Irving H. Picard, Esq.
            Fax (212) 626-0799


                                       11