EXHIBIT 5.1 March 31, 2000 Board of Directors MedicaLogic, Inc. 20500 NW Evergreen Parkway Hillsboro, OR 97124 We have acted as counsel for MedicaLogic, Inc., an Oregon corporation (the "Company"), in connection with the preparation and filing of a Registration Statement on Form S-4 (the "Registration Statement") under the Securities Act of 1933, as amended, covering 25,350,569 shares of common stock of the Company (the "Shares") to be issued in connection with the Agreement of Reorganization and Merger among the Company and Medscape, Inc., a Delaware corporation ("Medscape"), and the Agreement of Reorganization and Merger among the Company and Total eMed, Inc. a Delaware corporation ("Total eMed") (collectively the "Merger Agreements"). We have reviewed the corporate actions of the Company in connection with this matter and have examined the documents, corporate records and other instruments we deemed necessary for the purpose of this opinion. Based on the foregoing, it is our opinion that the Company is a corporation validly existing under the laws of the State of Oregon. We are further of the opinion that all action necessary to make valid the proposed issuance of the Shares by the Company will have been taken when: (1) the Registration Statement, as it may be amended, shall have been declared effective; (2) for each of the respective mergers, a Certificate of Merger shall have been filed in accordance with the laws of the State of Delaware; (3) the respective Merger Agreements shall have been approved by the requisite votes of the shareholders of the Company and of Medscape or Total eMed, as the case may be; (4) all other conditions to the consummation of the mergers contemplated by the respective Merger Agreements shall have been satisfied or waived; and (5) the Shares shall have been appropriately issued and delivered for the consideration contemplated by, and otherwise in conformity with, the acts, proceedings and documents referred to above. We are further of the opinion that when the steps set forth in the immediately preceding paragraphs shall have been taken, the Shares will have been duly issued and be validly outstanding and all of the Shares will be fully paid and non-assessable. We consent to the use of our name in the Registration Statement and in the Proxy Statement/ Prospectus filed as a part thereof, and to the filing of this opinion as an exhibit to the Registration Statement. Very truly yours, /s/ STOEL RIVES LLP STOEL RIVES LLP