-
Notifications
You must be signed in to change notification settings - Fork 0
Building the RIS from source
This post explains how to build the RIS from source and how to set up a local development server, assuming you have already cloned the repository to your local drive.
-
Install the Ruby runtime. Some of the source code is generated at build-time using a Ruby-based code generator. Ruby for windows is currently found here: http://rubyinstaller.org/
-
cd to /Ris
-
Open a VS 2005 Command Prompt in the Ris folder and run:
msbuild ris.proj
This will build both the server and the client.
-
A database server is required. Only SQL Server 2005-2008 have been tested. Other DB servers may or may not work.
-
Create a new database in SQL Server using Enterprise Manager or an equivalent tool.
-
Modify the file /Healthcare/Hibernate/App.config file. Set the "connection_string" and the "default_schema" properties appropriately. Modifying any other properties is not recommended. Rebuild the solution to ensure that these changes are copied to the main configuration file.
-
cd to /Ris/Server/Executable/bin/Debug and run the following command: ClearCanvas.Ris.Server.Executable DdlWriterApplication /out:db.sql
This will generate a database creation script and save it in the file db.sql. Run this script against your newly created database to create an empty RIS database.
- From the same directory run the following 2 commands in succession:
ClearCanvas.Ris.Server.Executable Authentication.Setup.SetupApplication
ClearCanvas.Ris.Server.Executable Common.Setup.SetupApplication
- The server and client will only communicate over a secure channel, which means that even during development an X509 certificate is required. Run the command
/Ris/Server/cert-setup.bat
This will generate a test certificate for the name "localhost" and install it on the machine such that is it accessible to the server and the client. (Note: this will fail if you do not have makecert.exe and certmgr.exe installed)
- At this point you are ready to run the RIS application server. In production this would typically run as a service, but for development it is generally easier to run it via the console. From the bin/Debug directory again, run ClearCanvas.Ris.Server.Executable Server.Application
By default the server listens on localhost:8000.
-
Launch the client from /Desktop/Executable/bin/Debug by double-clicking on ClearCanvas.Desktop.Executable. A login prompt should appear after the splash screen.
-
Login as 'sa', password is 'clearcanvas'. You will be prompted to change this password immediately.
[Note: menu and toolbar items will appear out of order because they have not yet been configured... ClearCanvas should provide a default menu/toolbar configuration file...]
-
From the client, go to Admin/Authority Groups. Click on the "Import" toolbar button. This is a one-time manual installation step that is required to fully initialize the permissions system.
-
Edit the "Administrators" group. Ensure that all available permissions are assigned to the Administrators group (unless for some reason you don't want this to be the case).
-
Go to Admin/Users and create a new user account. The 'sa' account is primarily intended as a bootstrap account. It is recommended that all users have their own personal account. Press the "Add" toolbar button on the Users page. Choose a User ID, etc., and add yourself to the Administrators group. It is recommended that you associate a Staff person with the user account, since only accounts with an associated Staff can access the workflow portion of the application. To do this, go to Admin/Staff, create a new Staff entry, and associate your user account to this staff.
-
Once you have created your user account/Staff record, exit the application and login again using your own user ID. Notice that the home page automatically appears when you login as a user associated with a Staff. This behaviour can be controlled under Tools/Options.
-
The client contains many embedded web pages. A web server must be configured to supply these pages. Copy the contents of /Ris/web/ to your desired location, and use the IIS console to expose this as a website.
-
Go to Tools/Utilities/Configure Settings. This screen allows modification of settings that affect global application behaviour. Click on the "Import" button in the top toolbar. This is a one-time manual installation step that is required to fully initialize the configuration system.
-
In the upper portion of the same screen, locate the group named ClearCanvas.Ris.Client.WebResourcesSettings. In the lower portion of the screen, select the BaseUrl setting. Edit this setting to point to your website as defined in the previous step, and save your changes.
-
At this point, the system is essentially functional, but not useful as it contains no data.
-
The Admin screens can be used to manually add data to the system. Bulk import mechanisms exist but they are not documented.
-
There are two solution files, one for the server and one for the client: /Ris/Server/RisServer.sln /Ris/Client/RisClient.sln
-
It is important to do the initial build using msbuild prior to opening RisServer.sln in VS, so that the generated source code files are created.