Installing OpenNCP Portal

Before starting, be aware that you cannot use the same database for different versions of Liferay (you'll get a corrupted database if you try and there's no way to restore it unless you have a backup).
  1. Download this Liferay version from here (the related Liferay version is 6.2.5 CE GA6);
  2. Populate the database using the scripts that can be found here. Use the files located in folder "create". Note that the database name in the scripts ('lportal') differs from the one shown in the properties file shown in step 4 ('lp62'), but they refer to the same database. Choose the one you like the most;
  3. Change Liferay's Tomcat ports to others different than the ones you're using in your OpenNCP Tomcat (the chosen ports should be available too):

    server.xml

    <Server port="XXXX" shutdown="SHUTDOWN">

    <Connector port="YYYY" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="ZZZZ" URIEncoding="UTF-8" />

    <Connector port="WWWW" protocol="AJP/1.3" redirectPort="ZZZZ" URIEncoding="UTF-8" />

  4.  Create portal-ext.properties under Liferay folder and add the following options (adjust the DB connection to your scenario):

    # # MySQL (You can configure any other database by providing the appropriate settings)
    jdbc.default.driverClassName=com.mysql.jdbc.Driver
    jdbc.default.url=jdbc:mysql://localhost/lp62?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
    jdbc.default.username=<username>
    jdbc.default.password=<password>


    # EPSOS ROLES (These roles will be created by default on OpenNCP Portal startup)
    system.roles=Doctor,Pharmacist,Patient,Nurse
    system.role.Doctor.description=Doctor Role
    system.role.Pharmacist.description=Pharmacist Role
    system.role.Patient.description=Patient Role
    system.role.Nurse.description=Nurse role

  5. Add the following properties to your $EPSOS_PROPS_PATH/tsam.properties (connection to your TSAM/LTR database):

    tsam.properties

    ## Required for OpenNCP Portal
    ltr.db.url=jdbc:mysql://hostname:3306/database?useUnicode=true&characterEncoding=UTF-8
    ltr.db.user=username
    ltr.db.password=password
    ltr.db.driverClass=com.mysql.jdbc.Driver

  6. In your Liferay's Tomcat, add to /conf/context.xml the same JNDI resources that you defined in your OpenNCP's Tomcat;
  7. It is advisable to give enough memory space for the OpenNCP Portal to render the CDA documents. That can be defined in your Liferay's Tomcat /bin/setenv.sh, by setting -XX:MaxPermSize=1024m.
  8. Start Liferay's Tomcat in order to create the deploy folder (zip file doesn't have it due to being an empty folder);
  9. Open "http://<hostname>:<YYYY>" in a web-browser and follow the setup wizard to create the default users and other data in the database;
    1. <hostname> can be a hostname or an IP address;
    2. <YYYY> is the port with value "YYYY" defined in step 3.
  10. Then download the latest artifacts from Joinup and install them in OpenNCP Portal:
    1. Remove the epsosportal folder from webapps (rm -rf epsosportal). In a fresh install this folder will not exist;
    2. Copy the WAR files to the "deploy" folder placed under Liferay's directory.

Building OpenNCP Portal

If you want to build your own OpenNCP Portal you have to alter the settings of maven according to the servers configuration:

<server>
<username>reader</username>
<password><ask for password></password>
<id>gnomon-lib-snapshot</id>
</server>
<server>
<username>reader</username>
<password><ask for password></password>
<id>gnomon-lib-release</id>
</server>

 

Configure HCER.PROPERTIES

If you want to use the functionality of the HCER database (used by Trillium) you have to:

  1. Create "hcer" database and use the following script to create its table structure:

    CREATE TABLE IF NOT EXISTS `hcerdocs` (
      `documentbody` text NOT NULL,
      `creationDate` datetime DEFAULT NULL,
      `creator` varchar(255) DEFAULT NULL,
      `patient` varchar(255) DEFAULT NULL,
      `fromcountry` varchar(20) DEFAULT NULL,
      `docid` bigint(20) NOT NULL AUTO_INCREMENT,
      PRIMARY KEY (`docid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  2. Set the connection properties in your $EPSOS_PROPS_PATH/hcer.properties:

jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost:3306/hcer?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false
jdbc.default.username=<username>
jdbc.default.password=<password>

Adding eID functionality

To add eID capabilities to the Portal please refer to Smartcard-based eID integration into OpenNCP - 3. Deployment.

 

Post Install Configuration

 

  1. You have to login as admin (test@liferay.com with password test) and then do the following actions: 

    • Login with administration rights (test@liferay.com/test)
    • Change your admin password for security reasons
    • Add a new page in your portal by clicking in the plus icon in the left up corner 

       
    • Then it will appear the following screen

       
    • You have first to select "Page", add a name to your new page (e.g. epsos services), and select the layout "1 Column"
    • Then you have to click on the menu this newly created page and click again on the plus icon in order to add in this new page the application for epsos services. So do add application -> portalb and the portlet for epsosServices will appear in your screen

Logout from Portal

In case you're wondering how to logout from Portal, you need to paste this specific URL in the browser: http://<hostname>:<port>/c/portal/logout