thehyve/dntp-portal

Name: dntp-portal

Owner: The Hyve

Description: Request portal for Dutch pathology labs.

Created: 2015-03-09 14:23:24.0

Updated: 2017-03-03 19:59:14.0

Pushed: 2017-12-08 14:45:24.0

Homepage: https://aanvraag.palga.nl

Size: 4051

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Request portal for Dutch pathology labs

Build Status

This repository hosts the code of a request portal, built for the Dutch National Tissuebank Portal project. The portal is hosted at aanvraag.palga.nl. It allows researchers to submit requests to PALGA, the Dutch pathology database organisation.

Issues

Project members can report issues in JIRA.

Development
Technology

| Tool/framework | Documentation | | —————| ————- | | IDE | Spring Tool Suite | | Maven | Maven | | Web application framework | Spring Boot | | Activiti business process modelling framework | Activiti user guide | | Javascript application framework | AngularJS | | NodeJS package manager | npm |

Git repository
clone git@github.com:thehyve/dntp-portal.git
ntp-portal

Configure PostgreSQL database
 -u postgres psql
te user thehyve with password 'thehyve';
te database dntp_portal;
t all privileges on database dntp_portal to thehyve;

Alternatively, edit src/main/resources/application.properties to change the database settings.

Important for performance: setting the indexes appropriately, e.g.:

te index var_procinst_name_index on act_hi_varinst (proc_inst_id_, name_ );
te index var_task_name_index on act_hi_varinst (task_id_, name_ );
Run, test, deploy

Make sure you have npm and Maven installed.

n the application
spring-boot:run

There should now be an application running at http://localhost:8092/.

Package
eate a war package
package

There should now be a .war-file in target/dntp-portal-<version>.war.

n the packaged application
 -jar target/dntp-portal-<version>.war
Tests

Run all tests

n the testNG test suite
-Dspring.profiles.active=dev test

Running front-end unit testing and e2e testing: Get nodejs.

stall dependencies
 npm install -g gulp protractor
n unit testings
 test
n e2e tests
ractor
Deployment

The project is configured to deploy to the Nexus repository of The Hyve. Credentials are stored in ~/.m2/settings.xml:

tings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                    http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
    <server>
        <id>nl.thehyve.nexus</id>
        <username>USERNAME</username>
        <password>PASSWORD</password>
    </server>
</servers>
ttings>

Deploy to the repository:

-Dspring.profiles.active=dev deploy
Fetch from repository
dependency:get -Dartifact=nl.thehyve:dntp-portal:<version>:war -DremoteRepositories=https://repo.thehyve.nl/content/repositories/releases/ -Ddestination=dntpportal.jar
Release notes
0.0.80
r table lab_request add column return_date timestamp without time zone;
r table lab_request add column sent_return_email boolean;

r table request_properties add column biobank_request_number character varying(255);
r table request_properties add column germline_mutation boolean;

TE TABLE request_properties_informed_consent_form_attachments (
request_properties_id bigint NOT NULL,
informed_consent_form_attachments_id bigint NOT NULL

R TABLE request_properties_informed_consent_form_attachments OWNER TO thehyve;


R TABLE ONLY request_properties_informed_consent_form_attachments
ADD CONSTRAINT uk_46tqt7cfxfkb9p4coyjq4q6s4 UNIQUE (informed_consent_form_attachments_id);


R TABLE ONLY request_properties_informed_consent_form_attachments
ADD CONSTRAINT fk_46tqt7cfxfkb9p4coyjq4q6s4 FOREIGN KEY (informed_consent_form_attachments_id) REFERENCES file(id);

R TABLE ONLY request_properties_informed_consent_form_attachments
ADD CONSTRAINT fk_8i21ti5yf37152ttn4vljo275 FOREIGN KEY (request_properties_id) REFERENCES request_properties(id);
0.0.65
r table lab_request alter reject_reason type varchar(10000);
0.0.60
r table excerpt_list add column remark_column int4 not null default -1;
0.0.55

Set date_submitted for existing requests:

r table request_properties add column date_submitted timestamp;

te request_properties set date_submitted =
ect t.start_time_
from act_hi_taskinst t
where request_properties.process_instance_id = t.proc_inst_id_
and t.task_def_key_ = 'palga_request_review'
limit 1

e date_submitted is null;
0.0.53

Modify these column definitions in an existing database:

d columns
r table lab_request_comments add column comments_order int4 not null default -1;
r table request_properties_comments add column comments_order int4 not null default -1;
r table request_properties_approval_comments add column approval_comments_order int4 not null default -1;

r lab request comments:

eck if there are existing records that need to be updated
ct * from lab_request_comments join comment on lab_request_comments.comments_id = comment.id where comments_order = -1 order by time_created;

me for request comments:
ct * from request_properties_comments join comment on request_properties_comments.comments_id = comment.id where comments_order = -1 order by time_created;

me for request approval comments:
ct * from request_properties_approval_comments join comment on request_properties_approval_comments.approval_comments_id = comment.id where approval_comments_order = -1 order by time_created;

To update the tables, an update script is available.

0.0.48

Modify these column definitions in an existing database:

r table request_properties alter search_criteria type varchar(10000);
r table request_properties alter laboratory_techniques type varchar(10000);
r table request_properties alter privacy_committee_rationale type varchar(10000);
0.0.46

Add these new column definitions to an existing database:

r table excerpt_list add column palga_patient_nr_column int4 not null default -1;
r table excerpt_list add column palga_excerpt_nr_column int4 not null default -1;
r table excerpt_list add column palga_excerpt_id_column int4 not null default -1;

Update existing pathology_item records to have the sequence number from the excerpt list:

te pathology_item
sequence_number = (select e.sequence_number
from excerpt_entry e
join excerpt_list l on l.id = e.excerpt_list_id
join lab_request r on r.process_instance_id = l.process_instance_id
join pathology_item i on i.pa_number = e.pa_number and i.lab_request_id = r.id
where i.id = pathology_item.id
limit 1);
0.0.42

When updating to version 0.0.42, an existing database can be updated with:

r table lab add hub_assistance_enabled boolean default true;
0.0.5

When updating from 0.0.4 to 0.0.5, an existing database can be updated with:

r table excerpt_entry add selected boolean;
License

Copyright © 2016 Stichting PALGA

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.