This guide will help you install it on your computer.
1) Download and Install MySQL Server
2) Download and Install Grails 2.5.6
Download and installation instructions here
4) Configure the database
Edit the DaraSource, under the "development" environment, check this. If the database you configured doesn’t exist, you need to create it in your DBMS (e.g. MySQL). For simplicity name it "ehrserver".
5) Create working folders and configure paths
opts & opts/base_opts
The project includes a folder called "opts". Inside there is a "base_opts" folder, where the default Operational Templates (definitions of openEHR clinical documents) are located. When the EHRServer is started, the OPTs from "base_opts" are copied (and renamed) to "opts", only those definitions will be used by the EHRServer. You can move the "opts" folder to any location, but you need to update the entry "app.opt_repo" in the Config script to reflect the new location of the folder.
The project includes a folder called "xsd" where the needed XML Schemas are located. You can move that folder to any location, but you need to update these entries on the Config.groovy:
6) Add the ENV VAR to generate REST API Tokens
It's mandatory to configure the EHRSERVER_REST_SECRET environment variable, and it's recommended to assing an UUID as the value. For instance you can have something like this: EHRSERVER_REST_SECRET=6067dba9-1234-1234-1234-92208c77ce77
How to configure environment variables?
7) Run the EHRServer
Execute this command line from the project folder:
$ehrserver> grails -Dserver.port=8090 -Duser.timezone=UTC run-app
This will run the server locally, on the port 8090, so you will be able to access it through: http://localhost:8090/ehr
Use admin / admin / 123456 (username, password, organization) to login, and you are ready to go. That is the administration user, so it has special access to all the functionalities of the EHRServer.
For a more constrained user, you can use this login: orgman / orgman / 123456 (username, password, organization). That user is an organization manager, and can only manage it’s organizations, so some items on the menu are hidden from this user as only the admin has rights to access them.
8) Create environment variables if you will use the "create account" feature locally
When an account is created, it needs to send an email with some basic account information, and a link to reset the password. The email service needs to be configured to do that. We use these environment variables to do that configuration:
If you face any issues, you can use our community forum.