Bläddra i källkod

scripts et fichiers de configuration pour creer des paquets debian

Fabrice 3 år sedan
förälder
incheckning
5763f09482

+ 36 - 0
build-MAth-Cloud.sh

@@ -0,0 +1,36 @@
+#! /bin/bash
+
+
+curDir=`pwd`
+
+
+# Build MAth DLLs
+
+for i in math-imt math-plaque;
+do
+  echo -e "\033[92m*** Build ${i} DLL ***\033[0m"
+  cd ${curDir}/api.ipsocloud.com/${i}
+  qmake
+  make -j$(nproc --all) && cp ${i} ../bin/
+  make clean
+done
+
+
+# Build ipsocloud web sites
+
+for i in admin cro www;
+do
+  echo -e "\033[92m*** Build ${i}.ipsocloud.com web site***\033[0m"
+  cd ${curDir}/${i}.ipsocloud.com/webapp_webpack/
+  npm install
+  npm run build-dev
+done
+
+
+# Create debian packages
+
+[ -x ${curDir}/debian/buildDeb.sh ] && cd ${curDir}/debian/ && ${curDir}/debian/buildDeb.sh
+
+
+cd ${curDir}
+

+ 7 - 0
debian/Math-Cloud-app/DEBIAN/control

@@ -0,0 +1,7 @@
+Package: MAth-Cloud-app
+Architecture: amd64
+Maintainer: Fabrice Poupon <fabrice.poupon@free.fr>
+Priority: optional
+Version: 3.0.0
+Description: MAth-Cloud web application
+

+ 9 - 0
debian/Math-Cloud-devel/DEBIAN/control

@@ -0,0 +1,9 @@
+Package: MAth-Cloud-devel
+Architecture: amd64
+Maintainer: Fabrice Poupon <fabrice.poupon@free.fr>
+Priority: optional
+Version: 3.0.0
+Description: Development environment for MAth-Cloud
+Depends: curl, dcmtk, ffmpeg, git-all, libdcmtk-dev, mariadb-server, npm, 
+         php-gd, phpmyadmin, qt5-default, unzip, wget, zip
+

+ 107 - 0
debian/Math-Cloud-devel/DEBIAN/postinst

@@ -0,0 +1,107 @@
+#! /bin/bash
+
+# Configuration Apache2
+
+if [ -f /tmp/api.conf.in ];
+then
+  sed "s/USER_LOGIN/${SUDO_USER}/g" /tmp/api.conf.in > /etc/apache2/sites-available/api.conf
+fi
+
+if [ -f /etc/apache2/ports.conf ];
+then
+  [ -z "$(grep 10302 /etc/apache2/ports.conf)" ] && ed -s /etc/apache2/ports.conf <<EOF
+/Listen\ 443
++i
+	Listen 10302
+.
+/Listen\ 443
++i
+	Listen 10302
+.
+w
+EOF
+fi
+
+a2enmod headers
+a2enmod rewrite
+a2enmod ssl
+
+a2ensite api.conf
+
+
+# Configuration PHP
+
+if [ -f /etc/php/7.4/apache2/php.ini ];
+then
+  ed -s /etc/php/7.4/apache2/php.ini <<EOF
+/upload_max_filesize
+s/2M/30M
+.
+w
+EOF
+fi
+
+
+# Redemarrage du serveur Apache2
+
+systemctl restart apache2
+
+
+# Configuration de la base de donnees
+
+mysql_secure_installation
+mysql -u root <<EOF
+CREATE USER IF NOT EXISTS 'newuser'@'localhost';
+SET PASSWORD FOR 'newuser'@'localhost' = PASSWORD( 'password' );
+GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'localhost';
+FLUSH PRIVILEGES;
+exit
+EOF
+
+
+# Ajoute les tables de Math-Cloud
+
+if [ -f /tmp/iimt_mathcloud.sql ] && 
+   [ -f /tmp/iimt_mathcloud_audit.sql ] &&
+   [ -f /tmp/iimt_mathcloud_shadow.sql ];
+then
+  mysql -u root <<EOF
+SOURCE /tmp/iimt_mathcloud.sql
+SOURCE /tmp/iimt_mathcloud_audit.sql
+SOURCE /tmp/iimt_mathcloud_shadow.sql
+exit
+EOF
+fi
+
+
+# Redemarrage de la base de donnees
+
+systemctl restart mysql
+
+
+# Copie des cles SSH
+
+cp /tmp/sshFabrice.zip /home/${SUDO_USER}/.ssh/
+chown ${SUDO_USER}:${SUDO_USER} /home/${SUDO_USER}/.ssh/sshFabrice.zip
+
+
+# Configuration du compte utilisateur
+
+if [ ! -d /home/${SUDO_USER}/Git ];
+then
+  mkdir /home/${SUDO_USER}/Git
+  chown -R ${SUDO_USER}:${SUDO_USER} /home/${SUDO_USER}/Git
+fi
+
+
+if [ ! -f /home/${SUDO_USER}/Git/gitClone.sh ];
+then
+  cat > /home/${SUDO_USER}/Git/gitClone.sh <<EOF
+#! /bin/bash
+
+git clone ssh://iimt@gogs.iimt.fr:iimt/MAth-Cloud-3.0.0.git
+EOF
+  chmod +x /home/${SUDO_USER}/Git/gitClone.sh
+  chown ${SUDO_USER}:${SUDO_USER} /home/${SUDO_USER}/Git/gitClone.sh
+fi
+

+ 142 - 0
debian/Math-Cloud-devel/tmp/api.conf.in

@@ -0,0 +1,142 @@
+<IfModule mod_ssl.c>
+	<VirtualHost _default_:10302>
+		ServerAdmin webmaster@localhost
+
+		DocumentRoot /home/USER_LOGIN/Git/MAth-Cloud-3.0.0/api.ipsocloud.com
+
+		# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
+		# error, crit, alert, emerg.
+		# It is also possible to configure the loglevel for particular
+		# modules, e.g.
+		#LogLevel info ssl:warn
+
+		ErrorLog ${APACHE_LOG_DIR}/error.log
+		CustomLog ${APACHE_LOG_DIR}/access.log combined
+		
+		# For most configuration files from conf-available/, which are
+		# enabled or disabled at a global level, it is possible to
+		# include a line for only one particular virtual host. For example the
+		# following line enables the CGI configuration for this host only
+		# after it has been globally disabled with "a2disconf".
+		#Include conf-available/serve-cgi-bin.conf
+
+		#   SSL Engine Switch:
+		#   Enable/Disable SSL for this virtual host.
+		SSLEngine on
+
+		#   A self-signed (snakeoil) certificate can be created by installing
+		#   the ssl-cert package. See
+		#   /usr/share/doc/apache2/README.Debian.gz for more info.
+		#   If both key and certificate are stored in the same file, only the
+		#   SSLCertificateFile directive is needed.
+		SSLCertificateFile	/etc/ssl/certs/ssl-cert-snakeoil.pem
+		SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
+
+		#   Server Certificate Chain:
+		#   Point SSLCertificateChainFile at a file containing the
+		#   concatenation of PEM encoded CA certificates which form the
+		#   certificate chain for the server certificate. Alternatively
+		#   the referenced file can be the same as SSLCertificateFile
+		#   when the CA certificates are directly appended to the server
+		#   certificate for convinience.
+		#SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
+
+		#   Certificate Authority (CA):
+		#   Set the CA certificate verification path where to find CA
+		#   certificates for client authentication or alternatively one
+		#   huge file containing all of them (file must be PEM encoded)
+		#   Note: Inside SSLCACertificatePath you need hash symlinks
+		#		 to point to the certificate files. Use the provided
+		#		 Makefile to update the hash symlinks after changes.
+		#SSLCACertificatePath /etc/ssl/certs/
+		#SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
+
+		#   Certificate Revocation Lists (CRL):
+		#   Set the CA revocation path where to find CA CRLs for client
+		#   authentication or alternatively one huge file containing all
+		#   of them (file must be PEM encoded)
+		#   Note: Inside SSLCARevocationPath you need hash symlinks
+		#		 to point to the certificate files. Use the provided
+		#		 Makefile to update the hash symlinks after changes.
+		#SSLCARevocationPath /etc/apache2/ssl.crl/
+		#SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
+
+		#   Client Authentication (Type):
+		#   Client certificate verification type and depth.  Types are
+		#   none, optional, require and optional_no_ca.  Depth is a
+		#   number which specifies how deeply to verify the certificate
+		#   issuer chain before deciding the certificate is not valid.
+		#SSLVerifyClient require
+		#SSLVerifyDepth  10
+
+		#   SSL Engine Options:
+		#   Set various options for the SSL engine.
+		#   o FakeBasicAuth:
+		#	 Translate the client X.509 into a Basic Authorisation.  This means that
+		#	 the standard Auth/DBMAuth methods can be used for access control.  The
+		#	 user name is the `one line' version of the client's X.509 certificate.
+		#	 Note that no password is obtained from the user. Every entry in the user
+		#	 file needs this password: `xxj31ZMTZzkVA'.
+		#   o ExportCertData:
+		#	 This exports two additional environment variables: SSL_CLIENT_CERT and
+		#	 SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
+		#	 server (always existing) and the client (only existing when client
+		#	 authentication is used). This can be used to import the certificates
+		#	 into CGI scripts.
+		#   o StdEnvVars:
+		#	 This exports the standard SSL/TLS related `SSL_*' environment variables.
+		#	 Per default this exportation is switched off for performance reasons,
+		#	 because the extraction step is an expensive operation and is usually
+		#	 useless for serving static content. So one usually enables the
+		#	 exportation for CGI and SSI requests only.
+		#   o OptRenegotiate:
+		#	 This enables optimized SSL connection renegotiation handling when SSL
+		#	 directives are used in per-directory context.
+		#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
+		<FilesMatch "\.(cgi|shtml|phtml|php)$">
+				SSLOptions +StdEnvVars
+		</FilesMatch>
+		<Directory /usr/lib/cgi-bin>
+				SSLOptions +StdEnvVars
+		</Directory>
+
+		<Directory /home/USER_LOGIN/Git/MAth-Cloud-3.0.0/api.ipsocloud.com/>
+			Options Indexes FollowSymLinks
+			AllowOverride All
+			SSLOptions +StdEnvVars
+			Require all granted
+			Header set Access-Control-Allow-Origin "*"
+		</Directory>
+ 
+		#   SSL Protocol Adjustments:
+		#   The safe and default but still SSL/TLS standard compliant shutdown
+		#   approach is that mod_ssl sends the close notify alert but doesn't wait for
+		#   the close notify alert from client. When you need a different shutdown
+		#   approach you can use one of the following variables:
+		#   o ssl-unclean-shutdown:
+		#	 This forces an unclean shutdown when the connection is closed, i.e. no
+		#	 SSL close notify alert is send or allowed to received.  This violates
+		#	 the SSL/TLS standard but is needed for some brain-dead browsers. Use
+		#	 this when you receive I/O errors because of the standard approach where
+		#	 mod_ssl sends the close notify alert.
+		#   o ssl-accurate-shutdown:
+		#	 This forces an accurate shutdown when the connection is closed, i.e. a
+		#	 SSL close notify alert is send and mod_ssl waits for the close notify
+		#	 alert of the client. This is 100% SSL/TLS standard compliant, but in
+		#	 practice often causes hanging connections with brain-dead browsers. Use
+		#	 this only for browsers where you know that their SSL implementation
+		#	 works correctly.
+		#   Notice: Most problems of broken clients are also related to the HTTP
+		#   keep-alive facility, so you usually additionally want to disable
+		#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
+		#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
+		#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
+		#   "force-response-1.0" for this.
+		# BrowserMatch "MSIE [2-6]" \
+		#		nokeepalive ssl-unclean-shutdown \
+		#		downgrade-1.0 force-response-1.0
+
+	</VirtualHost>
+</IfModule>
+
+# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

+ 934 - 0
debian/Math-Cloud-devel/tmp/iimt_mathcloud.sql

@@ -0,0 +1,934 @@
+-- phpMyAdmin SQL Dump
+-- version 4.9.5deb2
+-- https://www.phpmyadmin.net/
+--
+-- Host: localhost:3306
+-- Generation Time: Feb 04, 2022 at 02:19 PM
+-- Server version: 10.3.32-MariaDB-0ubuntu0.20.04.1
+-- PHP Version: 7.4.3
+
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
+SET AUTOCOMMIT = 0;
+START TRANSACTION;
+SET time_zone = "+00:00";
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8mb4 */;
+
+--
+-- Database: `iimt_mathcloud`
+--
+CREATE DATABASE IF NOT EXISTS `iimt_mathcloud` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
+USE `iimt_mathcloud`;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `abacus`
+--
+
+DROP TABLE IF EXISTS `abacus`;
+CREATE TABLE `abacus` (
+  `ID` int(255) NOT NULL,
+  `name` text NOT NULL,
+  `sex` varchar(1) NOT NULL,
+  `race` varchar(128) NOT NULL,
+  `side` varchar(16) NOT NULL,
+  `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `abacus`
+--
+
+INSERT INTO `abacus` (`ID`, `name`, `sex`, `race`, `side`, `data`) VALUES
+(1, 'Europe, France, 30-79 years, PARC 2009 (Mean)', 'M', '', '', '[{\r\n\"age\":30,\r\n\"min\":0.574,\r\n\"mean\":0.616,\r\n\"max\":0.672\r\n},{\r\n\"age\":40,\r\n\"min\":0.586,\r\n\"mean\":0.653,\r\n\"max\":0.705\r\n},{\r\n\"age\":50,\r\n\"min\":0.637,\r\n\"mean\":0.701,\r\n\"max\":0.787\r\n},{\r\n\"age\":60,\r\n\"min\":0.663,\r\n\"mean\":0.738,\r\n\"max\":0.842\r\n},{\r\n\"age\":70,\r\n\"min\":0.743,\r\n\"mean\":0.798,\r\n\"max\":0.907\r\n}]\r\n'),
+(2, 'Europe, France, 30-79 years, PARC 2009 (Mean)', 'F', '', '', '[{\r\n\"age\":30,\r\n\"min\":0.537,\r\n\"mean\":0.588,\r\n\"max\":0.635\r\n},{\r\n\"age\":40,\r\n\"min\":0.576,\r\n\"mean\":0.64,\r\n\"max\":0.691\r\n},{\r\n\"age\":50,\r\n\"min\":0.619,\r\n\"mean\":0.669,\r\n\"max\":0.737\r\n},{\r\n\"age\":60,\r\n\"min\":0.665,\r\n\"mean\":0.752,\r\n\"max\":0.817\r\n},{\r\n\"age\":70,\r\n\"min\":0.71,\r\n\"mean\":0.758,\r\n\"max\":0.841\r\n}]\r\n'),
+(3, 'USA, 35-85 years, Caucasian, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'M', 'white', 'right', '[{\r\n\"age\":35,\r\n\"min\":0.43,\r\n\"mean\":0.48,\r\n\"max\":0.55\r\n},{\r\n\"age\":45,\r\n\"min\":0.50,\r\n\"mean\":0.57,\r\n\"max\":0.66\r\n},{\r\n\"age\":55,\r\n\"min\":0.57,\r\n\"mean\":0.66,\r\n\"max\":0.77\r\n},{\r\n\"age\":65,\r\n\"min\":0.65,\r\n\"mean\":0.76,\r\n\"max\":0.90\r\n},{\r\n\"age\":75,\r\n\"min\":0.73,\r\n\"mean\":0.86,\r\n\"max\":1.03\r\n},{\r\n\"age\":85,\r\n\"min\":0.80,\r\n\"mean\":0.95,\r\n\"max\":1.14\r\n}]\r\n'),
+(4, 'USA, 35-85 years, Caucasian, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'M', 'white', 'left', '[{\r\n\"age\":35,\r\n\"min\":0.45,\r\n\"mean\":0.520,\r\n\"max\":0.6\r\n},{\r\n\"age\":45,\r\n\"min\":0.52,\r\n\"mean\":0.6,\r\n\"max\":0.7\r\n},{\r\n\"age\":55,\r\n\"min\":0.59,\r\n\"mean\":0.68,\r\n\"max\":0.8\r\n},{\r\n\"age\":65,\r\n\"min\":0.65,\r\n\"mean\":0.77,\r\n\"max\":0.93\r\n},{\r\n\"age\":75,\r\n\"min\":0.71,\r\n\"mean\":0.86,\r\n\"max\":1.06\r\n},{\r\n\"age\":85,\r\n\"min\":0.78,\r\n\"mean\":0.97,\r\n\"max\":1.18\r\n}]\r\n'),
+(5, 'USA, 35-85 years, Caucasian, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'F', 'white', 'right', '[{\r\n\"age\":35,\r\n\"min\":0.39,\r\n\"mean\":0.44,\r\n\"max\":0.51\r\n},{\r\n\"age\":45,\r\n\"min\":0.47,\r\n\"mean\":0.53,\r\n\"max\":0.61\r\n},{\r\n\"age\":55,\r\n\"min\":0.55,\r\n\"mean\":0.62,\r\n\"max\":0.71\r\n},{\r\n\"age\":65,\r\n\"min\":0.6,\r\n\"mean\":0.69,\r\n\"max\":0.81\r\n},{\r\n\"age\":75,\r\n\"min\":0.65,\r\n\"mean\":0.76,\r\n\"max\":0.91\r\n},{\r\n\"age\":85,\r\n\"min\":0.72,\r\n\"mean\":0.88,\r\n\"max\":1.01\r\n}]\r\n'),
+(6, 'USA, 35-85 years, Caucasian, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'F', 'white', 'left', '[{\r\n\"age\":35,\r\n\"min\":0.4,\r\n\"mean\":0.46,\r\n\"max\":0.51\r\n},{\r\n\"age\":45,\r\n\"min\":0.47,\r\n\"mean\":0.54,\r\n\"max\":0.61\r\n},{\r\n\"age\":55,\r\n\"min\":0.54,\r\n\"mean\":0.62,\r\n\"max\":0.71\r\n},{\r\n\"age\":65,\r\n\"min\":0.61,\r\n\"mean\":0.71,\r\n\"max\":0.81\r\n},{\r\n\"age\":75,\r\n\"min\":0.68,\r\n\"mean\":0.8,\r\n\"max\":0.91\r\n},{\r\n\"age\":85,\r\n\"min\":0.74,\r\n\"mean\":0.84,\r\n\"max\":1.01\r\n}]\r\n'),
+(7, 'USA, 35-85 years, African American, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'M', 'african', 'right', '[{\r\n\"age\":35,\r\n\"min\":0.43,\r\n\"mean\":0.5,\r\n\"max\":0.58\r\n},{\r\n\"age\":45,\r\n\"min\":0.52,\r\n\"mean\":0.61,\r\n\"max\":0.71\r\n},{\r\n\"age\":55,\r\n\"min\":0.61,\r\n\"mean\":0.72,\r\n\"max\":0.84\r\n},{\r\n\"age\":65,\r\n\"min\":0.72,\r\n\"mean\":0.85,\r\n\"max\":1.01\r\n},{\r\n\"age\":75,\r\n\"min\":0.83,\r\n\"mean\":0.98,\r\n\"max\":1.14\r\n},{\r\n\"age\":85,\r\n\"min\":0.94,\r\n\"mean\":1.06,\r\n\"max\":1.28\r\n}]\r\n'),
+(8, 'USA, 35-85 years, African American, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'M', 'african', 'left', '[{\r\n\"age\":35,\r\n\"min\":0.45,\r\n\"mean\":0.53,\r\n\"max\":0.61\r\n},{\r\n\"age\":45,\r\n\"min\":0.53,\r\n\"mean\":0.62,\r\n\"max\":0.72\r\n},{\r\n\"age\":55,\r\n\"min\":0.61,\r\n\"mean\":0.71,\r\n\"max\":0.83\r\n},{\r\n\"age\":65,\r\n\"min\":0.69,\r\n\"mean\":0.82,\r\n\"max\":0.99\r\n},{\r\n\"age\":75,\r\n\"min\":0.77,\r\n\"mean\":0.93,\r\n\"max\":1.16\r\n},{\r\n\"age\":85,\r\n\"min\":0.94,\r\n\"mean\":1.10,\r\n\"max\":1.36\r\n}]\r\n'),
+(9, 'USA, 35-85 years, African American, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'F', 'african', 'right', '[{\r\n\"age\":35,\r\n\"min\":0.43,\r\n\"mean\":0.48,\r\n\"max\":0.52\r\n},{\r\n\"age\":45,\r\n\"min\":0.51,\r\n\"mean\":0.58,\r\n\"max\":0.65\r\n},{\r\n\"age\":55,\r\n\"min\":0.59,\r\n\"mean\":0.68,\r\n\"max\":0.78\r\n},{\r\n\"age\":65,\r\n\"min\":0.63,\r\n\"mean\":0.74,\r\n\"max\":0.85\r\n},{\r\n\"age\":75,\r\n\"min\":0.67,\r\n\"mean\":0.8,\r\n\"max\":0.92\r\n},{\r\n\"age\":85,\r\n\"min\":0.74,\r\n\"mean\":0.9,\r\n\"max\":1.06\r\n}]\r\n'),
+(10, 'USA, 35-85 years, African American, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'F', 'african', 'left', '[{\r\n\"age\":35,\r\n\"min\":0.42,\r\n\"mean\":0.47,\r\n\"max\":0.53\r\n},{\r\n\"age\":45,\r\n\"min\":0.49,\r\n\"mean\":0.56,\r\n\"max\":0.64\r\n},{\r\n\"age\":55,\r\n\"min\":0.56,\r\n\"mean\":0.65,\r\n\"max\":0.75\r\n},{\r\n\"age\":65,\r\n\"min\":0.62,\r\n\"mean\":0.72,\r\n\"max\":0.85\r\n},{\r\n\"age\":75,\r\n\"min\":0.68,\r\n\"mean\":0.79,\r\n\"max\":0.95\r\n},{\r\n\"age\":85,\r\n\"min\":0.78,\r\n\"mean\":0.86,\r\n\"max\":1.06\r\n}]\r\n');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `broker`
+--
+
+DROP TABLE IF EXISTS `broker`;
+CREATE TABLE `broker` (
+  `ID` int(255) NOT NULL,
+  `name` varchar(64) NOT NULL,
+  `config` text NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `broker`
+--
+
+INSERT INTO `broker` (`ID`, `name`, `config`) VALUES
+(1, 'braintree-sandbox', '{\r\n \"MerchantID\": \"tqbv9j5p3fmbmzx4\",\r\n \"PublicKey\": \"vsyr2294699hj6z5\",\r\n \"PrivateKey\": \"70184b99b13aafb398827f4702e2648a\"\r\n}');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `clinical_trial`
+--
+
+DROP TABLE IF EXISTS `clinical_trial`;
+CREATE TABLE `clinical_trial` (
+  `ID` int(255) NOT NULL,
+  `number` varchar(64) NOT NULL,
+  `name` text NOT NULL,
+  `start` date NOT NULL,
+  `patient_expected` smallint(6) NOT NULL,
+  `center_count` tinyint(4) NOT NULL,
+  `inclusion_month` tinyint(4) NOT NULL,
+  `followup_month` tinyint(4) NOT NULL,
+  `visit_per_patient` tinyint(4) NOT NULL,
+  `visit_interval` tinyint(4) NOT NULL,
+  `image_per_visit` tinyint(4) NOT NULL,
+  `video_per_visit` tinyint(4) NOT NULL,
+  `measure_per_timepoint` tinyint(4) NOT NULL,
+  `comment` text NOT NULL,
+  `max_readers` tinyint(4) NOT NULL,
+  `max_investigators` tinyint(4) NOT NULL,
+  `anon_percent` smallint(6) NOT NULL,
+  `fk_user` int(255) NOT NULL,
+  `created` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `context`
+--
+
+DROP TABLE IF EXISTS `context`;
+CREATE TABLE `context` (
+  `ID` int(255) NOT NULL,
+  `fk_visit` int(255) NOT NULL,
+  `risks` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}',
+  `phistory` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}',
+  `fhistory` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}',
+  `examination` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}',
+  `treatments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `country`
+--
+
+DROP TABLE IF EXISTS `country`;
+CREATE TABLE `country` (
+  `ID` int(255) NOT NULL,
+  `alpha2` varchar(2) NOT NULL,
+  `alpha3` varchar(3) NOT NULL,
+  `name_en` char(128) NOT NULL,
+  `name_fr` char(128) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `country`
+--
+
+INSERT INTO `country` (`ID`, `alpha2`, `alpha3`, `name_en`, `name_fr`) VALUES
+(1, 'AE', 'ARE', 'United Arab Emirates', 'Emirats Arabes Unis'),
+(2, 'AF', 'AFG', 'Afghanistan', 'Afghanistan'),
+(3, 'AG', 'ATG', 'Antigua and Barbuda', 'Antigua-et-Barbuda'),
+(4, 'AI', 'AIA', 'Anguilla', 'Anguilla'),
+(5, 'AL', 'ALB', 'Albania', 'Albanie'),
+(6, 'AM', 'ARM', 'Armenia', 'Arménie'),
+(7, 'AN', 'ANT', 'Netherlands Antilles', 'Antilles néerlandaises'),
+(8, 'AO', 'AGO', 'Angola', 'Angola'),
+(9, 'AQ', 'ATA', 'Antarctica', 'Antarctique'),
+(10, 'AR', 'ARG', 'Argentina', 'Argentine'),
+(11, 'AS', 'ASM', 'American Samoa', 'Samoa américaines'),
+(12, 'AT', 'AUT', 'Austria', 'Autriche'),
+(13, 'AU', 'AUS', 'Australia', 'Australie'),
+(14, 'AW', 'ABW', 'Aruba', 'Aruba'),
+(15, 'AZ', 'AZE', 'Azerbaijan', 'Azerbaïdjan'),
+(16, 'BA', 'BIH', 'Bosnia and Herzegovina', 'Bosnie Herzégovine'),
+(17, 'BB', 'BRB', 'Barbados', 'Barbade'),
+(18, 'BD', 'BGD', 'Bangladesh', 'Bangladesh'),
+(19, 'BE', 'BEL', 'Belgium', 'Belgique'),
+(20, 'BF', 'BFA', 'Burkina Faso', 'Burkina Faso'),
+(21, 'BG', 'BGR', 'Bulgaria', 'Bulgarie'),
+(22, 'BH', 'BHR', 'Bahrain', 'Bahreïn'),
+(23, 'BI', 'BDI', 'Burundi', 'Burundi'),
+(24, 'BJ', 'BEN', 'Benin', 'Bénin'),
+(25, 'BM', 'BMU', 'Bermuda', 'Bermudes'),
+(26, 'BN', 'BRN', 'Brunei', 'Brunei'),
+(27, 'BO', 'BOL', 'Bolivia', 'Bolivie'),
+(28, 'BR', 'BRA', 'Brazil', 'Brésil'),
+(29, 'BS', 'BHS', 'Bahamas', 'Bahamas'),
+(30, 'BT', 'BTN', 'Bhutan', 'Bhoutan'),
+(31, 'BV', 'BVT', 'Bouvet Island', 'Île Bouvet'),
+(32, 'BW', 'BWA', 'Botswana', 'Botswana'),
+(33, 'BY', 'BLR', 'Belarus', 'Biélorussie'),
+(34, 'BZ', 'BLZ', 'Belize', 'Belize'),
+(35, 'CA', 'CAN', 'Canada', 'Canada'),
+(36, 'CC', 'CCK', 'Cocos (Keeling) Islands', 'Îles Cocos (Keeling)'),
+(37, 'CD', 'COD', 'Congo, The Democratic Republic of the', 'Congo, République démocratique du'),
+(38, 'CF', 'CAF', 'Central African Republic', 'République centrafricaine'),
+(39, 'CG', 'COG', 'Congo', 'Congo'),
+(40, 'CH', 'CHE', 'Switzerland', 'Suisse'),
+(41, 'CI', 'CIV', 'Côte d\'Ivoire', 'Côte Ivoire'),
+(42, 'CK', 'COK', 'Cook Islands', 'Îles Cook'),
+(43, 'CL', 'CHL', 'Chile', 'Chili'),
+(44, 'CM', 'CMR', 'Cameroon', 'Cameroun'),
+(45, 'CN', 'CHN', 'China', 'Chine'),
+(46, 'CO', 'COL', 'Colombia', 'Colombie'),
+(47, 'CR', 'CRI', 'Costa Rica', 'Costa Rica'),
+(48, 'CU', 'CUB', 'Cuba', 'Cuba'),
+(49, 'CV', 'CPV', 'Cape Verde', 'Cap-Vert'),
+(50, 'CX', 'CXR', 'Christmas Island', 'île de noël'),
+(51, 'CY', 'CYP', 'Cyprus', 'Chypre'),
+(52, 'CZ', 'CZE', 'Czech Republic', 'République Tchèque'),
+(53, 'DE', 'DEU', 'Germany', 'Allemagne'),
+(54, 'DJ', 'DJI', 'Djibouti', 'Djibouti'),
+(55, 'DK', 'DNK', 'Denmark', 'Danemark'),
+(56, 'DM', 'DMA', 'Dominica', 'Dominique'),
+(57, 'DO', 'DOM', 'Dominican Republic', 'République Dominicaine'),
+(58, 'DZ', 'DZA', 'Algeria', 'Algérie'),
+(59, 'EC', 'ECU', 'Ecuador', 'Equateur'),
+(60, 'EE', 'EST', 'Estonia', 'Estonie'),
+(61, 'EG', 'EGY', 'Egypt', 'Egypte'),
+(62, 'EH', 'ESH', 'Western Sahara', 'Sahara occidental'),
+(63, 'ER', 'ERI', 'Eritrea', 'Érythrée'),
+(64, 'ES', 'ESP', 'Spain', 'Espagne'),
+(65, 'ET', 'ETH', 'Ethiopia', 'Ethiopie'),
+(66, 'FI', 'FIN', 'Finland', 'Finlande'),
+(67, 'FJ', 'FJI', 'Fiji Islands', 'Iles Fidji'),
+(68, 'FK', 'FLK', 'Falkland Islands', 'îles Falkland'),
+(69, 'FM', 'FSM', 'Micronesia, Federated States of', 'Micronésie, États fédérés de'),
+(70, 'FO', 'FRO', 'Faroe Islands', 'Îles Féroé'),
+(71, 'FR', 'FRA', 'France', 'France'),
+(72, 'GA', 'GAB', 'Gabon', 'Gabon'),
+(73, 'GB', 'GBR', 'United Kingdom', 'Royaume-Uni'),
+(74, 'GD', 'GRD', 'Grenada', 'Grenade'),
+(75, 'GE', 'GEO', 'Georgia', 'Géorgie'),
+(76, 'GF', 'GUF', 'French Guiana', 'Guyane Française'),
+(77, 'GH', 'GHA', 'Ghana', 'Ghana'),
+(78, 'GI', 'GIB', 'Gibraltar', 'Gibraltar'),
+(79, 'GL', 'GRL', 'Greenland', 'Groenland'),
+(80, 'GM', 'GMB', 'Gambia', 'Gambie'),
+(81, 'GN', 'GIN', 'Guinea', 'Guinée'),
+(82, 'GP', 'GLP', 'Guadeloupe', 'Guadeloupe'),
+(83, 'GQ', 'GNQ', 'Equatorial Guinea', 'Guinée Équatoriale'),
+(84, 'GR', 'GRC', 'Greece', 'Grèce'),
+(85, 'GS', 'SGS', 'South Georgia and the South Sandwich Islands', 'Géorgie du Sud et îles Sandwich du Sud'),
+(86, 'GT', 'GTM', 'Guatemala', 'Guatemala'),
+(87, 'GU', 'GUM', 'Guam', 'Guam'),
+(88, 'GW', 'GNB', 'Guinea-Bissau', 'Guinée-Bissau'),
+(89, 'GY', 'GUY', 'Guyana', 'Guyane'),
+(90, 'HK', 'HKG', 'Hong Kong', 'Hong Kong'),
+(91, 'HM', 'HMD', 'Heard Island and McDonald Islands', 'Îles Heard et McDonald'),
+(92, 'HN', 'HND', 'Honduras', 'Honduras'),
+(93, 'HR', 'HRV', 'Croatia', 'Croatie'),
+(94, 'HT', 'HTI', 'Haiti', 'Haïti'),
+(95, 'HU', 'HUN', 'Hungary', 'Hongrie'),
+(96, 'ID', 'IDN', 'Indonesia', 'Indonésie'),
+(97, 'IE', 'IRL', 'Ireland', 'Irlande'),
+(98, 'IL', 'ISR', 'Israel', 'Israël'),
+(99, 'IN', 'IND', 'India', 'Inde'),
+(100, 'IO', 'IOT', 'British Indian Ocean Territory', 'Territoire britannique de l\'océan Indien'),
+(101, 'IQ', 'IRQ', 'Iraq', 'Irak'),
+(102, 'IR', 'IRN', 'Iran', 'Iran'),
+(103, 'IS', 'ISL', 'Iceland', 'Islande'),
+(104, 'IT', 'ITA', 'Italy', 'Italie'),
+(105, 'JM', 'JAM', 'Jamaica', 'Jamaïque'),
+(106, 'JO', 'JOR', 'Jordan', 'Jordan'),
+(107, 'JP', 'JPN', 'Japan', 'Japon'),
+(108, 'KE', 'KEN', 'Kenya', 'Kenya'),
+(109, 'KG', 'KGZ', 'Kyrgyzstan', 'Kirghizistan'),
+(110, 'KH', 'KHM', 'Cambodia', 'Cambodge'),
+(111, 'KI', 'KIR', 'Kiribati', 'Kiribati'),
+(112, 'KM', 'COM', 'Comoros', 'Comores'),
+(113, 'KN', 'KNA', 'Saint Kitts and Nevis', 'Saint-Christophe-et-Niévès'),
+(114, 'KP', 'PRK', 'North Korea', 'Corée du Nord'),
+(115, 'KR', 'KOR', 'South Korea', 'Corée du Sud'),
+(116, 'KW', 'KWT', 'Kuwait', 'Koweit'),
+(117, 'KY', 'CYM', 'Cayman Islands', 'Îles Caïmans'),
+(118, 'KZ', 'KAZ', 'Kazakstan', 'Kazakstan'),
+(119, 'LA', 'LAO', 'Laos', 'Laos'),
+(120, 'LB', 'LBN', 'Lebanon', 'Liban'),
+(121, 'LC', 'LCA', 'Saint Lucia', 'Sainte-Lucie'),
+(122, 'LI', 'LIE', 'Liechtenstein', 'Liechtenstein'),
+(123, 'LK', 'LKA', 'Sri Lanka', 'Sri Lanka'),
+(124, 'LR', 'LBR', 'Liberia', 'Libéria'),
+(125, 'LS', 'LSO', 'Lesotho', 'Lesotho'),
+(126, 'LT', 'LTU', 'Lithuania', 'Lituanie'),
+(127, 'LU', 'LUX', 'Luxembourg', 'Luxembourg'),
+(128, 'LV', 'LVA', 'Latvia', 'Lettonie'),
+(129, 'LY', 'LBY', 'Libyan Arab Jamahiriya', 'Jamahiriya arabe libyenne'),
+(130, 'MA', 'MAR', 'Morocco', 'Maroc'),
+(131, 'MC', 'MCO', 'Monaco', 'Monaco'),
+(132, 'MD', 'MDA', 'Moldova', 'Moldavie'),
+(133, 'MG', 'MDG', 'Madagascar', 'Madagascar'),
+(134, 'MH', 'MHL', 'Marshall Islands', 'Iles Marshall'),
+(135, 'MK', 'MKD', 'Macedonia', 'Macédoine'),
+(136, 'ML', 'MLI', 'Mali', 'Mali'),
+(137, 'MM', 'MMR', 'Myanmar', 'Myanmar'),
+(138, 'MN', 'MNG', 'Mongolia', 'Mongolie'),
+(139, 'MO', 'MAC', 'Macao', 'Macao'),
+(140, 'MP', 'MNP', 'Northern Mariana Islands', 'Îles Mariannes du Nord'),
+(141, 'MQ', 'MTQ', 'Martinique', 'Martinique'),
+(142, 'MR', 'MRT', 'Mauritania', 'Mauritanie'),
+(143, 'MS', 'MSR', 'Montserrat', 'Montserrat'),
+(144, 'MT', 'MLT', 'Malta', 'Malte'),
+(145, 'MU', 'MUS', 'Mauritius', 'Ile Maurice'),
+(146, 'MV', 'MDV', 'Maldives', 'Maldives'),
+(147, 'MW', 'MWI', 'Malawi', 'Malawi'),
+(148, 'MX', 'MEX', 'Mexico', 'Mexique'),
+(149, 'MY', 'MYS', 'Malaysia', 'Malaisie'),
+(150, 'MZ', 'MOZ', 'Mozambique', 'Mozambique'),
+(151, 'NA', 'NAM', 'Namibia', 'Namibie'),
+(152, 'NC', 'NCL', 'New Caledonia', 'Nouvelle Calédonie'),
+(153, 'NE', 'NER', 'Niger', 'Niger'),
+(154, 'NF', 'NFK', 'Norfolk Island', 'Ile de Norfolk'),
+(155, 'NG', 'NGA', 'Nigeria', 'Nigeria'),
+(156, 'NI', 'NIC', 'Nicaragua', 'Nicaragua'),
+(157, 'NL', 'NLD', 'Netherlands', 'Pays-Bas'),
+(158, 'NO', 'NOR', 'Norway', 'Norvège'),
+(159, 'NP', 'NPL', 'Nepal', 'Népal'),
+(160, 'NR', 'NRU', 'Nauru', 'Nauru'),
+(161, 'NU', 'NIU', 'Niue', 'Niue'),
+(162, 'NZ', 'NZL', 'New Zealand', 'Nouvelle-Zélande'),
+(163, 'OM', 'OMN', 'Oman', 'Oman'),
+(164, 'PA', 'PAN', 'Panama', 'Panama'),
+(165, 'PE', 'PER', 'Peru', 'Pérou'),
+(166, 'PF', 'PYF', 'French Polynesia', 'Polynésie française'),
+(167, 'PG', 'PNG', 'Papua New Guinea', 'Papouasie Nouvelle Guinée'),
+(168, 'PH', 'PHL', 'Philippines', 'Philippines'),
+(169, 'PK', 'PAK', 'Pakistan', 'Pakistan'),
+(170, 'PL', 'POL', 'Poland', 'Pologne'),
+(171, 'PM', 'SPM', 'Saint Pierre and Miquelon', 'Saint-Pierre-et-Miquelon'),
+(172, 'PN', 'PCN', 'Pitcairn', 'Pitcairn'),
+(173, 'PR', 'PRI', 'Puerto Rico', 'Porto Rico'),
+(174, 'PS', 'PSE', 'Palestine', 'Palestine'),
+(175, 'PT', 'PRT', 'Portugal', 'le Portugal'),
+(176, 'PW', 'PLW', 'Palau', 'Palau'),
+(177, 'PY', 'PRY', 'Paraguay', 'Paraguay'),
+(178, 'QA', 'QAT', 'Qatar', 'Qatar'),
+(179, 'RE', 'REU', 'RÚunion', 'Réunion'),
+(180, 'RO', 'ROM', 'Romania', 'Roumanie'),
+(181, 'RU', 'RUS', 'Russian Federation', 'Fédération Russe'),
+(182, 'RW', 'RWA', 'Rwanda', 'Rwanda'),
+(183, 'SA', 'SAU', 'Saudi Arabia', 'Arabie Saoudite'),
+(184, 'SB', 'SLB', 'Solomon Islands', 'Iles Salomon'),
+(185, 'SC', 'SYC', 'Seychelles', 'Seychelles'),
+(186, 'SD', 'SDN', 'Sudan', 'Soudan'),
+(187, 'SE', 'SWE', 'Sweden', 'Suède'),
+(188, 'SG', 'SGP', 'Singapore', 'Singapour'),
+(189, 'SH', 'SHN', 'Saint Helena', 'Sainte-Hélène'),
+(190, 'SI', 'SVN', 'Slovenia', 'Slovénie'),
+(191, 'SJ', 'SJM', 'Svalbard and Jan Mayen', 'Svalbard et Jan Mayen'),
+(192, 'SK', 'SVK', 'Slovakia', 'Slovaquie'),
+(193, 'SL', 'SLE', 'Sierra Leone', 'Sierra Leone'),
+(194, 'SM', 'SMR', 'San Marino', 'Saint Marin'),
+(195, 'SN', 'SEN', 'Senegal', 'Sénégal'),
+(196, 'SO', 'SOM', 'Somalia', 'Somalie'),
+(197, 'SR', 'SUR', 'Suriname', 'Suriname'),
+(198, 'ST', 'STP', 'Sao Tome and Principe', 'Sao Tomé et Principe'),
+(199, 'SV', 'SLV', 'El Salvador', 'Salvador'),
+(200, 'SY', 'SYR', 'Syria', 'Syrie'),
+(201, 'SZ', 'SWZ', 'Swaziland', 'Swaziland'),
+(202, 'TC', 'TCA', 'Turks and Caicos Islands', 'Iles Turques-et-Caïques'),
+(203, 'TD', 'TCD', 'Chad', 'Tchad'),
+(204, 'TF', 'ATF', 'French Southern territories', 'Territoires du Sud français'),
+(205, 'TG', 'TGO', 'Togo', 'Togo'),
+(206, 'TH', 'THA', 'Thailand', 'Thaïlande'),
+(207, 'TJ', 'TJK', 'Tajikistan', 'Tadjikistan'),
+(208, 'TK', 'TKL', 'Tokelau', 'Tokelau'),
+(209, 'TM', 'TKM', 'Turkmenistan', 'Turkménistan'),
+(210, 'TN', 'TUN', 'Tunisia', 'Tunisie'),
+(211, 'TO', 'TON', 'Tonga', 'Tonga'),
+(212, 'TP', 'TMP', 'East Timor', 'Timor oriental'),
+(213, 'TR', 'TUR', 'Turkey', 'Turquie'),
+(214, 'TT', 'TTO', 'Trinidad and Tobago', 'Trinité-et-Tobago'),
+(215, 'TV', 'TUV', 'Tuvalu', 'Tuvalu'),
+(216, 'TW', 'TWN', 'Taiwan', 'Taïwan'),
+(217, 'TZ', 'TZA', 'Tanzania', 'Tanzanie'),
+(218, 'UA', 'UKR', 'Ukraine', 'Ukraine'),
+(219, 'UG', 'UGA', 'Uganda', 'Ouganda'),
+(220, 'UM', 'UMI', 'United States Minor Outlying Islands', 'Îles mineures éloignées des États-Unis'),
+(221, 'US', 'USA', 'United States', 'États Unis'),
+(222, 'UY', 'URY', 'Uruguay', 'Uruguay'),
+(223, 'UZ', 'UZB', 'Uzbekistan', 'Ouzbékistan'),
+(224, 'VA', 'VAT', 'Holy See (Vatican City State)', 'Saint-Siège (État de la Cité du Vatican)'),
+(225, 'VC', 'VCT', 'Saint Vincent and the Grenadines', 'Saint-Vincent-et-les-Grenadines'),
+(226, 'VE', 'VEN', 'Venezuela', 'Venezuela'),
+(227, 'VG', 'VGB', 'Virgin Islands, British', 'Îles Vierges britanniques'),
+(228, 'VI', 'VIR', 'Virgin Islands, U.S.', 'Îles Vierges américaines, États-Unis'),
+(229, 'VN', 'VNM', 'Vietnam', 'Vietnam'),
+(230, 'VU', 'VUT', 'Vanuatu', 'Vanuatu'),
+(231, 'WF', 'WLF', 'Wallis and Futuna', 'Wallis et Futuna'),
+(232, 'WS', 'WSM', 'Samoa', 'Samoa'),
+(233, 'YE', 'YEM', 'Yemen', 'Yémen'),
+(234, 'YT', 'MYT', 'Mayotte', 'Mayotte'),
+(235, 'YU', 'YUG', 'Yugoslavia', 'Yougoslavie'),
+(236, 'ZA', 'ZAF', 'South Africa', 'Afrique du Sud'),
+(237, 'ZM', 'ZMB', 'Zambia', 'Zambie'),
+(238, 'ZW', 'ZWE', 'Zimbabwe', 'Zimbabwe');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `credit`
+--
+
+DROP TABLE IF EXISTS `credit`;
+CREATE TABLE `credit` (
+  `ID` int(255) NOT NULL,
+  `ID_user` int(255) NOT NULL,
+  `stamp` datetime NOT NULL DEFAULT current_timestamp(),
+  `count` int(11) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `credit_usage`
+--
+
+DROP TABLE IF EXISTS `credit_usage`;
+CREATE TABLE `credit_usage` (
+  `ID` int(255) NOT NULL,
+  `fk_user` int(255) NOT NULL,
+  `fk_media` int(255) NOT NULL,
+  `stamp` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ct_center`
+--
+
+DROP TABLE IF EXISTS `ct_center`;
+CREATE TABLE `ct_center` (
+  `ID` int(255) NOT NULL,
+  `fk_organization` int(255) NOT NULL,
+  `fk_probe` int(255) NOT NULL,
+  `stamp` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `email`
+--
+
+DROP TABLE IF EXISTS `email`;
+CREATE TABLE `email` (
+  `ID` int(255) NOT NULL,
+  `type` varchar(64) NOT NULL,
+  `address` varchar(128) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `email`
+--
+
+INSERT INTO `email` (`ID`, `type`, `address`) VALUES
+(1, 'postmaster', 'postmaster@ipsocloud.com');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `lst_coronary_type`
+--
+
+DROP TABLE IF EXISTS `lst_coronary_type`;
+CREATE TABLE `lst_coronary_type` (
+  `ID` int(255) NOT NULL,
+  `code` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `lst_coronary_type`
+--
+
+INSERT INTO `lst_coronary_type` (`ID`, `code`) VALUES
+(1, '{\"fr\":\"Insuffisance coronarienne\", \"en\": \"Coronary insufficiency\"}'),
+(2, '{\"fr\":\"Athérosclérose\", \"en\": \"Atherosclerosis\"}'),
+(3, '{\"fr\":\"Infarctus\", \"en\": \"Infarctus\"}');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `lst_stroke_type`
+--
+
+DROP TABLE IF EXISTS `lst_stroke_type`;
+CREATE TABLE `lst_stroke_type` (
+  `ID` int(255) NOT NULL,
+  `code` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `lst_stroke_type`
+--
+
+INSERT INTO `lst_stroke_type` (`ID`, `code`) VALUES
+(1, '{\"fr\":\"Hémorragie\", \"en\": \"Hemorrhage\"}'),
+(2, '{\"fr\":\"AIT\", \"en\": \"TIA\"}'),
+(3, '{\"fr\":\"Infarctus territorial\", \"en\": \"Territorial Infarction\"}'),
+(4, '{\"fr\":\"Lacunaire\", \"en\": \"Lacunar\"}');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `measure`
+--
+
+DROP TABLE IF EXISTS `measure`;
+CREATE TABLE `measure` (
+  `ID` int(255) NOT NULL,
+  `type` varchar(64) NOT NULL,
+  `points` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `computation` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `fk_media` int(255) NOT NULL,
+  `frame` mediumint(9) NOT NULL DEFAULT 0,
+  `fk_user` int(255) NOT NULL,
+  `created` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `media`
+--
+
+DROP TABLE IF EXISTS `media`;
+CREATE TABLE `media` (
+  `ID` int(255) NOT NULL,
+  `side` varchar(16) DEFAULT NULL,
+  `location` varchar(16) DEFAULT NULL,
+  `incidence` varchar(32) DEFAULT NULL,
+  `filename` varchar(64) NOT NULL,
+  `metrics` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `fk_visit` int(255) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `organization`
+--
+
+DROP TABLE IF EXISTS `organization`;
+CREATE TABLE `organization` (
+  `ID` int(255) NOT NULL,
+  `fk_user` int(255) NOT NULL,
+  `name` varchar(128) NOT NULL,
+  `fk_country` int(255) NOT NULL,
+  `zip` varchar(32) NOT NULL,
+  `city` varchar(128) NOT NULL,
+  `address` text NOT NULL,
+  `phone` varchar(32) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `patient`
+--
+
+DROP TABLE IF EXISTS `patient`;
+CREATE TABLE `patient` (
+  `ID` int(255) NOT NULL,
+  `patientID` varchar(128) NOT NULL,
+  `ctPatientID` varchar(128) DEFAULT NULL,
+  `firstname` varchar(128) NOT NULL,
+  `lastname` varchar(128) NOT NULL,
+  `gender` char(1) NOT NULL DEFAULT 'M',
+  `birthDate` date NOT NULL,
+  `height` int(11) DEFAULT NULL,
+  `weight` int(11) DEFAULT NULL,
+  `race` enum('white','african','indian','asian','other') DEFAULT NULL,
+  `fk_birthCountry` int(255) DEFAULT NULL,
+  `fk_residenceCountry` int(255) DEFAULT NULL,
+  `fk_user` int(255) NOT NULL,
+  `created` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `probe`
+--
+
+DROP TABLE IF EXISTS `probe`;
+CREATE TABLE `probe` (
+  `ID` int(255) NOT NULL,
+  `fk_user` int(255) NOT NULL,
+  `name` varchar(128) NOT NULL,
+  `brand` varchar(128) NOT NULL,
+  `type` varchar(128) NOT NULL,
+  `year` int(4) DEFAULT NULL,
+  `frequency` float NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `recipient`
+--
+
+DROP TABLE IF EXISTS `recipient`;
+CREATE TABLE `recipient` (
+  `ID` int(255) NOT NULL,
+  `email` varchar(128) NOT NULL,
+  `fk_user` int(255) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `settings`
+--
+
+DROP TABLE IF EXISTS `settings`;
+CREATE TABLE `settings` (
+  `ID` int(255) NOT NULL,
+  `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `settings`
+--
+
+INSERT INTO `settings` (`ID`, `data`) VALUES
+(1, '{\"patientListFields\":[{\"name\":\"Sex\",\"display\":1},{\"name\":\"PatientID\",\"display\":1},{\"name\":\"Lastname\",\"display\":1},{\"name\":\"Firstname\",\"display\":1},{\"name\":\"Birthdate\",\"display\":1},{\"name\":\"Height\",\"display\":0},{\"name\":\"Weight\",\"display\":0},{\"name\":\"Last visit\",\"display\":1},{\"name\":\"Visit count\",\"display\":1},{\"name\":\"Image count\",\"display\":1},{\"name\":\"Video count\",\"display\":1}],\"newPatientFields\":[{\"name\":\"Visit date\",\"display\":1,\"required\":1},{\"name\":\"Firstname\",\"display\":1,\"required\":1},{\"name\":\"Lastname\",\"display\":1,\"required\":1},{\"name\":\"Sex\",\"display\":1,\"required\":1},{\"name\":\"Birthdate\",\"display\":1,\"required\":1},{\"name\":\"Height\",\"display\":0,\"required\":0},{\"name\":\"Weight\",\"display\":0,\"required\":0},{\"name\":\"Birth country\",\"display\":1,\"required\":1},{\"name\":\"Residence country\",\"display\":0,\"required\":0}],\"videoDurationMax\":300}');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `settings_pacs`
+--
+
+DROP TABLE IF EXISTS `settings_pacs`;
+CREATE TABLE `settings_pacs` (
+  `ID` int(255) NOT NULL,
+  `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `fk_physician` int(255) DEFAULT NULL,
+  `fk_center` int(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `user`
+--
+
+DROP TABLE IF EXISTS `user`;
+CREATE TABLE `user` (
+  `ID` int(255) NOT NULL,
+  `activation_token` varchar(127) NOT NULL,
+  `activation_expire` datetime NOT NULL,
+  `activation` datetime DEFAULT NULL,
+  `password` varchar(128) NOT NULL,
+  `firstname` varchar(128) NOT NULL,
+  `lastname` varchar(128) NOT NULL,
+  `email` varchar(128) NOT NULL,
+  `phone` varchar(32) NOT NULL,
+  `type` enum('imt-master','physician','cro','reader','investigator') NOT NULL,
+  `active` tinyint(4) NOT NULL DEFAULT 1,
+  `stamp` datetime NOT NULL DEFAULT current_timestamp(),
+  `fk_center` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `visit`
+--
+
+DROP TABLE IF EXISTS `visit`;
+CREATE TABLE `visit` (
+  `ID` int(255) NOT NULL,
+  `number` varchar(128) NOT NULL,
+  `visitDate` date NOT NULL,
+  `area` varchar(16) DEFAULT NULL,
+  `markers` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '[]',
+  `completed` datetime DEFAULT NULL,
+  `fk_patient` int(255) NOT NULL,
+  `fk_reader` int(255) DEFAULT NULL,
+  `created` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Indexes for dumped tables
+--
+
+--
+-- Indexes for table `abacus`
+--
+ALTER TABLE `abacus`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `broker`
+--
+ALTER TABLE `broker`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `clinical_trial`
+--
+ALTER TABLE `clinical_trial`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `context`
+--
+ALTER TABLE `context`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `country`
+--
+ALTER TABLE `country`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `credit`
+--
+ALTER TABLE `credit`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `credit_usage`
+--
+ALTER TABLE `credit_usage`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `ct_center`
+--
+ALTER TABLE `ct_center`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `email`
+--
+ALTER TABLE `email`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `lst_coronary_type`
+--
+ALTER TABLE `lst_coronary_type`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `lst_stroke_type`
+--
+ALTER TABLE `lst_stroke_type`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `measure`
+--
+ALTER TABLE `measure`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `media`
+--
+ALTER TABLE `media`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `organization`
+--
+ALTER TABLE `organization`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `patient`
+--
+ALTER TABLE `patient`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `probe`
+--
+ALTER TABLE `probe`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `recipient`
+--
+ALTER TABLE `recipient`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `settings`
+--
+ALTER TABLE `settings`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `settings_pacs`
+--
+ALTER TABLE `settings_pacs`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `user`
+--
+ALTER TABLE `user`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `visit`
+--
+ALTER TABLE `visit`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- AUTO_INCREMENT for dumped tables
+--
+
+--
+-- AUTO_INCREMENT for table `abacus`
+--
+ALTER TABLE `abacus`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
+
+--
+-- AUTO_INCREMENT for table `broker`
+--
+ALTER TABLE `broker`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
+
+--
+-- AUTO_INCREMENT for table `clinical_trial`
+--
+ALTER TABLE `clinical_trial`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `context`
+--
+ALTER TABLE `context`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `country`
+--
+ALTER TABLE `country`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=239;
+
+--
+-- AUTO_INCREMENT for table `credit`
+--
+ALTER TABLE `credit`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `credit_usage`
+--
+ALTER TABLE `credit_usage`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `ct_center`
+--
+ALTER TABLE `ct_center`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `email`
+--
+ALTER TABLE `email`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
+
+--
+-- AUTO_INCREMENT for table `lst_coronary_type`
+--
+ALTER TABLE `lst_coronary_type`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
+
+--
+-- AUTO_INCREMENT for table `lst_stroke_type`
+--
+ALTER TABLE `lst_stroke_type`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
+
+--
+-- AUTO_INCREMENT for table `measure`
+--
+ALTER TABLE `measure`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `media`
+--
+ALTER TABLE `media`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `organization`
+--
+ALTER TABLE `organization`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `patient`
+--
+ALTER TABLE `patient`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `probe`
+--
+ALTER TABLE `probe`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `recipient`
+--
+ALTER TABLE `recipient`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `settings`
+--
+ALTER TABLE `settings`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
+
+--
+-- AUTO_INCREMENT for table `settings_pacs`
+--
+ALTER TABLE `settings_pacs`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `user`
+--
+ALTER TABLE `user`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `visit`
+--
+ALTER TABLE `visit`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+COMMIT;
+
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

+ 93 - 0
debian/Math-Cloud-devel/tmp/iimt_mathcloud_audit.sql

@@ -0,0 +1,93 @@
+-- phpMyAdmin SQL Dump
+-- version 4.9.5deb2
+-- https://www.phpmyadmin.net/
+--
+-- Host: localhost:3306
+-- Generation Time: Feb 04, 2022 at 02:21 PM
+-- Server version: 10.3.32-MariaDB-0ubuntu0.20.04.1
+-- PHP Version: 7.4.3
+
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
+SET AUTOCOMMIT = 0;
+START TRANSACTION;
+SET time_zone = "+00:00";
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8mb4 */;
+
+--
+-- Database: `iimt_mathcloud_audit`
+--
+CREATE DATABASE IF NOT EXISTS `iimt_mathcloud_audit` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
+USE `iimt_mathcloud_audit`;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `activity`
+--
+
+DROP TABLE IF EXISTS `activity`;
+CREATE TABLE `activity` (
+  `ID` int(255) NOT NULL,
+  `ID_ray` int(255) NOT NULL,
+  `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `stamp` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ray`
+--
+
+DROP TABLE IF EXISTS `ray`;
+CREATE TABLE `ray` (
+  `ID` int(255) NOT NULL,
+  `userAgent` text NOT NULL,
+  `apiKey` varchar(128) NOT NULL,
+  `ipData` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `locationData` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `userData` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `stamp` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Indexes for dumped tables
+--
+
+--
+-- Indexes for table `activity`
+--
+ALTER TABLE `activity`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `ray`
+--
+ALTER TABLE `ray`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- AUTO_INCREMENT for dumped tables
+--
+
+--
+-- AUTO_INCREMENT for table `activity`
+--
+ALTER TABLE `activity`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `ray`
+--
+ALTER TABLE `ray`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+COMMIT;
+
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

+ 67 - 0
debian/Math-Cloud-devel/tmp/iimt_mathcloud_shadow.sql

@@ -0,0 +1,67 @@
+-- phpMyAdmin SQL Dump
+-- version 4.9.5deb2
+-- https://www.phpmyadmin.net/
+--
+-- Host: localhost:3306
+-- Generation Time: Sep 28, 2021 at 10:10 AM
+-- Server version: 10.3.31-MariaDB-0ubuntu0.20.04.1
+-- PHP Version: 7.4.3
+
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
+SET AUTOCOMMIT = 0;
+START TRANSACTION;
+SET time_zone = "+00:00";
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8mb4 */;
+
+--
+-- Database: `iimt_mathcloud_shadow`
+--
+CREATE DATABASE IF NOT EXISTS `iimt_mathcloud_shadow` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
+USE `iimt_mathcloud_shadow`;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `media`
+--
+
+DROP TABLE IF EXISTS `media`;
+CREATE TABLE `media` (
+  `ID` int(255) NOT NULL,
+  `side` varchar(16) NOT NULL,
+  `location` varchar(16) NOT NULL,
+  `incidence` varchar(32) NOT NULL,
+  `filename` varchar(64) NOT NULL,
+  `metrics` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `fk_visit` int(255) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Indexes for dumped tables
+--
+
+--
+-- Indexes for table `media`
+--
+ALTER TABLE `media`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- AUTO_INCREMENT for dumped tables
+--
+
+--
+-- AUTO_INCREMENT for table `media`
+--
+ALTER TABLE `media`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+COMMIT;
+
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

BIN
debian/Math-Cloud-devel/tmp/sshFabrice.zip


+ 9 - 0
debian/Math-Cloud-server/DEBIAN/control

@@ -0,0 +1,9 @@
+Package: MAth-Cloud-server
+Architecture: amd64
+Maintainer: Fabrice Poupon <fabrice.poupon@free.fr>
+Priority: optional
+Version: 3.0.0
+Description: Production server configuration for MAth-Cloud
+Depends: curl, dcmtk, ffmpeg, libdcmtk14, mariadb-server, php-gd, phpmyadmin, 
+         qt5-default, unzip, wget, zip
+

+ 75 - 0
debian/Math-Cloud-server/DEBIAN/postinst

@@ -0,0 +1,75 @@
+#!/bin/bash
+
+# Configuration Apache2
+
+[ -z "$(grep \/var\/www\/www /etc/apache2/apache2.conf)" ] && ed -s /etc/apache2/apache2.conf <<EOF
+/\#<Directory
+-i
+
+<Directory /var/www/www/>
+	Options Indexes FollowSymLinks
+	AllowOverride None
+	Require all granted
+</Directory>
+.
+w
+EOF
+
+a2enmod headers
+a2enmod rewrite
+a2enmod ssl
+
+a2ensite api.conf
+a2ensite www.conf
+a2ensite cro.conf
+
+
+# Configuration PHP
+
+if [ -f /etc/php/7.4/apache2/php.ini ];
+then
+  ed -s /etc/php/7.4/apache2/php.ini <<EOF
+/upload_max_filesize
+s/2M/30M
+.
+w
+EOF
+fi
+
+
+# Redemarrage du serveur Apache2
+
+systemctl restart apache2
+
+
+# Configuration de la base de donnees
+
+mysql_secure_installation
+mysql -u root <<EOF
+CREATE USER IF NOT EXISTS 'newuser'@'localhost';
+SET PASSWORD FOR 'newuser'@'localhost' = PASSWORD( 'password' );
+GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'localhost';
+FLUSH PRIVILEGES;
+exit
+EOF
+
+
+# Ajoute les tables de Math-Cloud
+
+if [ -f /tmp/iimt_mathcloud.sql ] && 
+   [ -f /tmp/iimt_mathcloud_audit.sql ] &&
+   [ -f /tmp/iimt_mathcloud_shadow.sql ];
+then
+  mysql -u root <<EOF
+SOURCE /tmp/iimt_mathcloud.sql
+SOURCE /tmp/iimt_mathcloud_audit.sql
+SOURCE /tmp/iimt_mathcloud_shadow.sql
+exit
+EOF
+fi
+
+
+# Redemarrage de la base de donnees
+
+systemctl restart mysql
+

+ 33 - 0
debian/Math-Cloud-server/etc/apache2/sites-available/api.conf

@@ -0,0 +1,33 @@
+<IfModule mod_ssl.c>
+	<VirtualHost _default_:443>
+		ServerAdmin webmaster@localhost
+		ServerName api.ipsocloud.com
+
+		DocumentRoot /var/www/api
+
+		ErrorLog ${APACHE_LOG_DIR}/error.log
+		CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+		SSLEngine on
+		SSLCertificateFile	/etc/ssl/ipsocloud.crt
+		SSLCertificateKeyFile	/etc/ssl/ipsocloud.key
+		SSLCACertificateFile /etc/ssl/ipsocloud.ca
+
+		<FilesMatch "\.(cgi|shtml|phtml|php)$">
+			SSLOptions +StdEnvVars
+		</FilesMatch>
+		
+		<Directory /usr/lib/cgi-bin>
+			SSLOptions +StdEnvVars
+		</Directory>
+		
+		<Directory /var/www/api/>
+			Options Indexes FollowSymLinks
+			AllowOverride All
+			SSLOptions +StdEnvVars
+			Require all granted
+			Header set Access-Control-Allow-Origin "*"
+		</Directory>
+	</VirtualHost>
+</IfModule>
+

+ 25 - 0
debian/Math-Cloud-server/etc/apache2/sites-available/cro.conf

@@ -0,0 +1,25 @@
+<IfModule mod_ssl.c>
+	<VirtualHost _default_:443>
+		ServerAdmin webmaster@localhost
+		ServerName cro.ipsocloud.com
+
+		DocumentRoot /var/www/cro
+
+		ErrorLog ${APACHE_LOG_DIR}/error.log
+		CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+		SSLEngine on
+		SSLCertificateFile	/etc/ssl/ipsocloud.crt
+		SSLCertificateKeyFile	/etc/ssl/ipsocloud.key
+		SSLCACertificateFile /etc/ssl/ipsocloud.ca
+
+		<FilesMatch "\.(cgi|shtml|phtml|php)$">
+			SSLOptions +StdEnvVars
+		</FilesMatch>
+		
+		<Directory /usr/lib/cgi-bin>
+			SSLOptions +StdEnvVars
+		</Directory>
+	</VirtualHost>
+</IfModule>
+

+ 25 - 0
debian/Math-Cloud-server/etc/apache2/sites-available/www.conf

@@ -0,0 +1,25 @@
+<IfModule mod_ssl.c>
+	<VirtualHost _default_:443>
+		ServerAdmin webmaster@localhost
+		ServerName www.ipsocloud.com
+
+		DocumentRoot /var/www/www
+
+		ErrorLog ${APACHE_LOG_DIR}/error.log
+		CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+		SSLEngine on
+		SSLCertificateFile	/etc/ssl/ipsocloud.crt
+		SSLCertificateKeyFile	/etc/ssl/ipsocloud.key
+		SSLCACertificateFile /etc/ssl/ipsocloud.ca
+
+		<FilesMatch "\.(cgi|shtml|phtml|php)$">
+			SSLOptions +StdEnvVars
+		</FilesMatch>
+		
+		<Directory /usr/lib/cgi-bin>
+			SSLOptions +StdEnvVars
+		</Directory>
+	</VirtualHost>
+</IfModule>
+

+ 91 - 0
debian/Math-Cloud-server/etc/ssl/ipsocloud.ca

@@ -0,0 +1,91 @@
+-----BEGIN CERTIFICATE-----
+MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb
+MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
+GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj
+YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezEL
+MAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
+BwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM
+GEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua
+BtDFcCLNSS1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ggFtBIIBaQFnAHYARqVV63X6kSAwtaKJafTzfREsQXS+/Um4havy/HD+bUcAAAF6
+COfD1gAABAMARzBFAiBO/RHOMRjrZOkXpKwPW4BC8hJ89aepHOb2Ea6rXADBdAIh
+AP6oFxbQqFXd2TdfLc9AtAa3M9QotlexTu4wIBlSZORiAHYAQcjKsd8iRkoQxqE6
+CUKHXk4xixsD6+tLx2jwkGKWBvYAAAF6COfDnAAABAMARzBFAiBQM+9hEwh1RW0M
+WI+EXQQ3tKY3cL36quenJe4XlYY88wIhAJhmxjZtvktv6kzFmkL+cEFIrPlqJqUE
+eiBrLmtx7VMjAHUAKXm+8J45OSHwVnOfY6V35b5XfZxgCvj5TV0mXCVdx4QAAAF6
+COfDdQAABAMARjBEAiB5D270OgA+6fAS9fQuOMGAp/uv5wakr8HnzSAuNy15MwIg
+EeZTISTCZajJak62gkMHnIxEgL+hxt8McBpT7tU3dmgwQgYDVR0RBDswOYIRd3d3
+Lmlwc29jbG91ZC5jb22CEWFwaS5pcHNvY2xvdWQuY29tghFjcm8uaXBzb2Nsb3Vk
+LmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAidp7Nzec2l3QtlG9s98XGUQOoMhuy0NU
+NMuSL0ONyq/Qz5ehiwIvICbcLFdWLBT1ialg81NJISd/E7/B5ijxdSaGaMHFklPq
+Uu3Ihjq0ovL0tdy1T/uya669qmdZg5c53iy/NQdQU4AvVjQx63cmwbkrstWkB0Pd
+BPOcxfnLp9g5GlAWzqHvYduL9JbtyB6df09t2IEsZeZX44zzSLn0zTAq5IYpSxWE
+muefN6Ey42/1/HqCUkkla517dOao/BEwlINhJO5J2rWpT3n7wKxvlYfysbrUL82s
+zdj3us4PkBpepA2xLT+78AVNPQuOWRfMEweYfZchDKcLWbXZ6bBf/A==
+-----END CERTIFICATE-----

+ 18 - 0
debian/Math-Cloud-server/etc/ssl/ipsocloud.csr

@@ -0,0 +1,18 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIIC1TCCAb0CAQ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1XG45wNUcEfO0CEZs/9DmJ8JAHX21amOVGJ7Ze9GHULZ99E8Y
+vtTposWzfZkCgYAZlcU28be4hbwKKVtJsRsnMcpHdbjaRXqPSJAciQdQEoI6PiHn
+I0piznSrMyYGbHwx1qqcLVlJUHH7LclPclj5dvpzXwo313LP6/oxn7o/m0yC2GxM
+T+F8t/cRBQmZf1ceMP0eQOZzqH6VN9cN0fPmKloqOzfViFgQGr5PIF1fcQKBgAfM
+jsHGfXd8OvKrFlY/5V7nvID3vsN7Zft4S1ZpN5gEPzdafUGTjWlIyG9UpzYjg2Lt
+rzls2o+RcU4PwcOAie1ZBXVWlckUEj9xmdbLLDMz0eBX3RJ+uj3jhbn9iGZhUwMU
+cA7M8OlHkun+fxDBYa0Wl1qLtxeMZucZANuPoDm5AoGBAIyiZraKAh9u/lwL2STz
+FYJUClQW5AhZA3bFHVIMkykIivD0uKMZ1ZRTXP01ZvBDNZBTMLQVRpN3w13V7mJa
+aLFxHI45punEEH2c8Az6eMwJuC5wVfuFKHR7nBrVEJhEjc98G2WC3NgXMGWEhxjI
+ZM1QMffnojT4nqMtMixmt1Bn
+-----END PRIVATE KEY-----

+ 934 - 0
debian/Math-Cloud-server/tmp/iimt_mathcloud.sql

@@ -0,0 +1,934 @@
+-- phpMyAdmin SQL Dump
+-- version 4.9.5deb2
+-- https://www.phpmyadmin.net/
+--
+-- Host: localhost:3306
+-- Generation Time: Feb 04, 2022 at 02:19 PM
+-- Server version: 10.3.32-MariaDB-0ubuntu0.20.04.1
+-- PHP Version: 7.4.3
+
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
+SET AUTOCOMMIT = 0;
+START TRANSACTION;
+SET time_zone = "+00:00";
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8mb4 */;
+
+--
+-- Database: `iimt_mathcloud`
+--
+CREATE DATABASE IF NOT EXISTS `iimt_mathcloud` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
+USE `iimt_mathcloud`;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `abacus`
+--
+
+DROP TABLE IF EXISTS `abacus`;
+CREATE TABLE `abacus` (
+  `ID` int(255) NOT NULL,
+  `name` text NOT NULL,
+  `sex` varchar(1) NOT NULL,
+  `race` varchar(128) NOT NULL,
+  `side` varchar(16) NOT NULL,
+  `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `abacus`
+--
+
+INSERT INTO `abacus` (`ID`, `name`, `sex`, `race`, `side`, `data`) VALUES
+(1, 'Europe, France, 30-79 years, PARC 2009 (Mean)', 'M', '', '', '[{\r\n\"age\":30,\r\n\"min\":0.574,\r\n\"mean\":0.616,\r\n\"max\":0.672\r\n},{\r\n\"age\":40,\r\n\"min\":0.586,\r\n\"mean\":0.653,\r\n\"max\":0.705\r\n},{\r\n\"age\":50,\r\n\"min\":0.637,\r\n\"mean\":0.701,\r\n\"max\":0.787\r\n},{\r\n\"age\":60,\r\n\"min\":0.663,\r\n\"mean\":0.738,\r\n\"max\":0.842\r\n},{\r\n\"age\":70,\r\n\"min\":0.743,\r\n\"mean\":0.798,\r\n\"max\":0.907\r\n}]\r\n'),
+(2, 'Europe, France, 30-79 years, PARC 2009 (Mean)', 'F', '', '', '[{\r\n\"age\":30,\r\n\"min\":0.537,\r\n\"mean\":0.588,\r\n\"max\":0.635\r\n},{\r\n\"age\":40,\r\n\"min\":0.576,\r\n\"mean\":0.64,\r\n\"max\":0.691\r\n},{\r\n\"age\":50,\r\n\"min\":0.619,\r\n\"mean\":0.669,\r\n\"max\":0.737\r\n},{\r\n\"age\":60,\r\n\"min\":0.665,\r\n\"mean\":0.752,\r\n\"max\":0.817\r\n},{\r\n\"age\":70,\r\n\"min\":0.71,\r\n\"mean\":0.758,\r\n\"max\":0.841\r\n}]\r\n'),
+(3, 'USA, 35-85 years, Caucasian, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'M', 'white', 'right', '[{\r\n\"age\":35,\r\n\"min\":0.43,\r\n\"mean\":0.48,\r\n\"max\":0.55\r\n},{\r\n\"age\":45,\r\n\"min\":0.50,\r\n\"mean\":0.57,\r\n\"max\":0.66\r\n},{\r\n\"age\":55,\r\n\"min\":0.57,\r\n\"mean\":0.66,\r\n\"max\":0.77\r\n},{\r\n\"age\":65,\r\n\"min\":0.65,\r\n\"mean\":0.76,\r\n\"max\":0.90\r\n},{\r\n\"age\":75,\r\n\"min\":0.73,\r\n\"mean\":0.86,\r\n\"max\":1.03\r\n},{\r\n\"age\":85,\r\n\"min\":0.80,\r\n\"mean\":0.95,\r\n\"max\":1.14\r\n}]\r\n'),
+(4, 'USA, 35-85 years, Caucasian, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'M', 'white', 'left', '[{\r\n\"age\":35,\r\n\"min\":0.45,\r\n\"mean\":0.520,\r\n\"max\":0.6\r\n},{\r\n\"age\":45,\r\n\"min\":0.52,\r\n\"mean\":0.6,\r\n\"max\":0.7\r\n},{\r\n\"age\":55,\r\n\"min\":0.59,\r\n\"mean\":0.68,\r\n\"max\":0.8\r\n},{\r\n\"age\":65,\r\n\"min\":0.65,\r\n\"mean\":0.77,\r\n\"max\":0.93\r\n},{\r\n\"age\":75,\r\n\"min\":0.71,\r\n\"mean\":0.86,\r\n\"max\":1.06\r\n},{\r\n\"age\":85,\r\n\"min\":0.78,\r\n\"mean\":0.97,\r\n\"max\":1.18\r\n}]\r\n'),
+(5, 'USA, 35-85 years, Caucasian, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'F', 'white', 'right', '[{\r\n\"age\":35,\r\n\"min\":0.39,\r\n\"mean\":0.44,\r\n\"max\":0.51\r\n},{\r\n\"age\":45,\r\n\"min\":0.47,\r\n\"mean\":0.53,\r\n\"max\":0.61\r\n},{\r\n\"age\":55,\r\n\"min\":0.55,\r\n\"mean\":0.62,\r\n\"max\":0.71\r\n},{\r\n\"age\":65,\r\n\"min\":0.6,\r\n\"mean\":0.69,\r\n\"max\":0.81\r\n},{\r\n\"age\":75,\r\n\"min\":0.65,\r\n\"mean\":0.76,\r\n\"max\":0.91\r\n},{\r\n\"age\":85,\r\n\"min\":0.72,\r\n\"mean\":0.88,\r\n\"max\":1.01\r\n}]\r\n'),
+(6, 'USA, 35-85 years, Caucasian, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'F', 'white', 'left', '[{\r\n\"age\":35,\r\n\"min\":0.4,\r\n\"mean\":0.46,\r\n\"max\":0.51\r\n},{\r\n\"age\":45,\r\n\"min\":0.47,\r\n\"mean\":0.54,\r\n\"max\":0.61\r\n},{\r\n\"age\":55,\r\n\"min\":0.54,\r\n\"mean\":0.62,\r\n\"max\":0.71\r\n},{\r\n\"age\":65,\r\n\"min\":0.61,\r\n\"mean\":0.71,\r\n\"max\":0.81\r\n},{\r\n\"age\":75,\r\n\"min\":0.68,\r\n\"mean\":0.8,\r\n\"max\":0.91\r\n},{\r\n\"age\":85,\r\n\"min\":0.74,\r\n\"mean\":0.84,\r\n\"max\":1.01\r\n}]\r\n'),
+(7, 'USA, 35-85 years, African American, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'M', 'african', 'right', '[{\r\n\"age\":35,\r\n\"min\":0.43,\r\n\"mean\":0.5,\r\n\"max\":0.58\r\n},{\r\n\"age\":45,\r\n\"min\":0.52,\r\n\"mean\":0.61,\r\n\"max\":0.71\r\n},{\r\n\"age\":55,\r\n\"min\":0.61,\r\n\"mean\":0.72,\r\n\"max\":0.84\r\n},{\r\n\"age\":65,\r\n\"min\":0.72,\r\n\"mean\":0.85,\r\n\"max\":1.01\r\n},{\r\n\"age\":75,\r\n\"min\":0.83,\r\n\"mean\":0.98,\r\n\"max\":1.14\r\n},{\r\n\"age\":85,\r\n\"min\":0.94,\r\n\"mean\":1.06,\r\n\"max\":1.28\r\n}]\r\n'),
+(8, 'USA, 35-85 years, African American, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'M', 'african', 'left', '[{\r\n\"age\":35,\r\n\"min\":0.45,\r\n\"mean\":0.53,\r\n\"max\":0.61\r\n},{\r\n\"age\":45,\r\n\"min\":0.53,\r\n\"mean\":0.62,\r\n\"max\":0.72\r\n},{\r\n\"age\":55,\r\n\"min\":0.61,\r\n\"mean\":0.71,\r\n\"max\":0.83\r\n},{\r\n\"age\":65,\r\n\"min\":0.69,\r\n\"mean\":0.82,\r\n\"max\":0.99\r\n},{\r\n\"age\":75,\r\n\"min\":0.77,\r\n\"mean\":0.93,\r\n\"max\":1.16\r\n},{\r\n\"age\":85,\r\n\"min\":0.94,\r\n\"mean\":1.10,\r\n\"max\":1.36\r\n}]\r\n'),
+(9, 'USA, 35-85 years, African American, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'F', 'african', 'right', '[{\r\n\"age\":35,\r\n\"min\":0.43,\r\n\"mean\":0.48,\r\n\"max\":0.52\r\n},{\r\n\"age\":45,\r\n\"min\":0.51,\r\n\"mean\":0.58,\r\n\"max\":0.65\r\n},{\r\n\"age\":55,\r\n\"min\":0.59,\r\n\"mean\":0.68,\r\n\"max\":0.78\r\n},{\r\n\"age\":65,\r\n\"min\":0.63,\r\n\"mean\":0.74,\r\n\"max\":0.85\r\n},{\r\n\"age\":75,\r\n\"min\":0.67,\r\n\"mean\":0.8,\r\n\"max\":0.92\r\n},{\r\n\"age\":85,\r\n\"min\":0.74,\r\n\"mean\":0.9,\r\n\"max\":1.06\r\n}]\r\n'),
+(10, 'USA, 35-85 years, African American, ARIC 1993 (R+L). Extrapolated values below 45 and over 65', 'F', 'african', 'left', '[{\r\n\"age\":35,\r\n\"min\":0.42,\r\n\"mean\":0.47,\r\n\"max\":0.53\r\n},{\r\n\"age\":45,\r\n\"min\":0.49,\r\n\"mean\":0.56,\r\n\"max\":0.64\r\n},{\r\n\"age\":55,\r\n\"min\":0.56,\r\n\"mean\":0.65,\r\n\"max\":0.75\r\n},{\r\n\"age\":65,\r\n\"min\":0.62,\r\n\"mean\":0.72,\r\n\"max\":0.85\r\n},{\r\n\"age\":75,\r\n\"min\":0.68,\r\n\"mean\":0.79,\r\n\"max\":0.95\r\n},{\r\n\"age\":85,\r\n\"min\":0.78,\r\n\"mean\":0.86,\r\n\"max\":1.06\r\n}]\r\n');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `broker`
+--
+
+DROP TABLE IF EXISTS `broker`;
+CREATE TABLE `broker` (
+  `ID` int(255) NOT NULL,
+  `name` varchar(64) NOT NULL,
+  `config` text NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `broker`
+--
+
+INSERT INTO `broker` (`ID`, `name`, `config`) VALUES
+(1, 'braintree-sandbox', '{\r\n \"MerchantID\": \"tqbv9j5p3fmbmzx4\",\r\n \"PublicKey\": \"vsyr2294699hj6z5\",\r\n \"PrivateKey\": \"70184b99b13aafb398827f4702e2648a\"\r\n}');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `clinical_trial`
+--
+
+DROP TABLE IF EXISTS `clinical_trial`;
+CREATE TABLE `clinical_trial` (
+  `ID` int(255) NOT NULL,
+  `number` varchar(64) NOT NULL,
+  `name` text NOT NULL,
+  `start` date NOT NULL,
+  `patient_expected` smallint(6) NOT NULL,
+  `center_count` tinyint(4) NOT NULL,
+  `inclusion_month` tinyint(4) NOT NULL,
+  `followup_month` tinyint(4) NOT NULL,
+  `visit_per_patient` tinyint(4) NOT NULL,
+  `visit_interval` tinyint(4) NOT NULL,
+  `image_per_visit` tinyint(4) NOT NULL,
+  `video_per_visit` tinyint(4) NOT NULL,
+  `measure_per_timepoint` tinyint(4) NOT NULL,
+  `comment` text NOT NULL,
+  `max_readers` tinyint(4) NOT NULL,
+  `max_investigators` tinyint(4) NOT NULL,
+  `anon_percent` smallint(6) NOT NULL,
+  `fk_user` int(255) NOT NULL,
+  `created` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `context`
+--
+
+DROP TABLE IF EXISTS `context`;
+CREATE TABLE `context` (
+  `ID` int(255) NOT NULL,
+  `fk_visit` int(255) NOT NULL,
+  `risks` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}',
+  `phistory` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}',
+  `fhistory` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}',
+  `examination` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}',
+  `treatments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `country`
+--
+
+DROP TABLE IF EXISTS `country`;
+CREATE TABLE `country` (
+  `ID` int(255) NOT NULL,
+  `alpha2` varchar(2) NOT NULL,
+  `alpha3` varchar(3) NOT NULL,
+  `name_en` char(128) NOT NULL,
+  `name_fr` char(128) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `country`
+--
+
+INSERT INTO `country` (`ID`, `alpha2`, `alpha3`, `name_en`, `name_fr`) VALUES
+(1, 'AE', 'ARE', 'United Arab Emirates', 'Emirats Arabes Unis'),
+(2, 'AF', 'AFG', 'Afghanistan', 'Afghanistan'),
+(3, 'AG', 'ATG', 'Antigua and Barbuda', 'Antigua-et-Barbuda'),
+(4, 'AI', 'AIA', 'Anguilla', 'Anguilla'),
+(5, 'AL', 'ALB', 'Albania', 'Albanie'),
+(6, 'AM', 'ARM', 'Armenia', 'Arménie'),
+(7, 'AN', 'ANT', 'Netherlands Antilles', 'Antilles néerlandaises'),
+(8, 'AO', 'AGO', 'Angola', 'Angola'),
+(9, 'AQ', 'ATA', 'Antarctica', 'Antarctique'),
+(10, 'AR', 'ARG', 'Argentina', 'Argentine'),
+(11, 'AS', 'ASM', 'American Samoa', 'Samoa américaines'),
+(12, 'AT', 'AUT', 'Austria', 'Autriche'),
+(13, 'AU', 'AUS', 'Australia', 'Australie'),
+(14, 'AW', 'ABW', 'Aruba', 'Aruba'),
+(15, 'AZ', 'AZE', 'Azerbaijan', 'Azerbaïdjan'),
+(16, 'BA', 'BIH', 'Bosnia and Herzegovina', 'Bosnie Herzégovine'),
+(17, 'BB', 'BRB', 'Barbados', 'Barbade'),
+(18, 'BD', 'BGD', 'Bangladesh', 'Bangladesh'),
+(19, 'BE', 'BEL', 'Belgium', 'Belgique'),
+(20, 'BF', 'BFA', 'Burkina Faso', 'Burkina Faso'),
+(21, 'BG', 'BGR', 'Bulgaria', 'Bulgarie'),
+(22, 'BH', 'BHR', 'Bahrain', 'Bahreïn'),
+(23, 'BI', 'BDI', 'Burundi', 'Burundi'),
+(24, 'BJ', 'BEN', 'Benin', 'Bénin'),
+(25, 'BM', 'BMU', 'Bermuda', 'Bermudes'),
+(26, 'BN', 'BRN', 'Brunei', 'Brunei'),
+(27, 'BO', 'BOL', 'Bolivia', 'Bolivie'),
+(28, 'BR', 'BRA', 'Brazil', 'Brésil'),
+(29, 'BS', 'BHS', 'Bahamas', 'Bahamas'),
+(30, 'BT', 'BTN', 'Bhutan', 'Bhoutan'),
+(31, 'BV', 'BVT', 'Bouvet Island', 'Île Bouvet'),
+(32, 'BW', 'BWA', 'Botswana', 'Botswana'),
+(33, 'BY', 'BLR', 'Belarus', 'Biélorussie'),
+(34, 'BZ', 'BLZ', 'Belize', 'Belize'),
+(35, 'CA', 'CAN', 'Canada', 'Canada'),
+(36, 'CC', 'CCK', 'Cocos (Keeling) Islands', 'Îles Cocos (Keeling)'),
+(37, 'CD', 'COD', 'Congo, The Democratic Republic of the', 'Congo, République démocratique du'),
+(38, 'CF', 'CAF', 'Central African Republic', 'République centrafricaine'),
+(39, 'CG', 'COG', 'Congo', 'Congo'),
+(40, 'CH', 'CHE', 'Switzerland', 'Suisse'),
+(41, 'CI', 'CIV', 'Côte d\'Ivoire', 'Côte Ivoire'),
+(42, 'CK', 'COK', 'Cook Islands', 'Îles Cook'),
+(43, 'CL', 'CHL', 'Chile', 'Chili'),
+(44, 'CM', 'CMR', 'Cameroon', 'Cameroun'),
+(45, 'CN', 'CHN', 'China', 'Chine'),
+(46, 'CO', 'COL', 'Colombia', 'Colombie'),
+(47, 'CR', 'CRI', 'Costa Rica', 'Costa Rica'),
+(48, 'CU', 'CUB', 'Cuba', 'Cuba'),
+(49, 'CV', 'CPV', 'Cape Verde', 'Cap-Vert'),
+(50, 'CX', 'CXR', 'Christmas Island', 'île de noël'),
+(51, 'CY', 'CYP', 'Cyprus', 'Chypre'),
+(52, 'CZ', 'CZE', 'Czech Republic', 'République Tchèque'),
+(53, 'DE', 'DEU', 'Germany', 'Allemagne'),
+(54, 'DJ', 'DJI', 'Djibouti', 'Djibouti'),
+(55, 'DK', 'DNK', 'Denmark', 'Danemark'),
+(56, 'DM', 'DMA', 'Dominica', 'Dominique'),
+(57, 'DO', 'DOM', 'Dominican Republic', 'République Dominicaine'),
+(58, 'DZ', 'DZA', 'Algeria', 'Algérie'),
+(59, 'EC', 'ECU', 'Ecuador', 'Equateur'),
+(60, 'EE', 'EST', 'Estonia', 'Estonie'),
+(61, 'EG', 'EGY', 'Egypt', 'Egypte'),
+(62, 'EH', 'ESH', 'Western Sahara', 'Sahara occidental'),
+(63, 'ER', 'ERI', 'Eritrea', 'Érythrée'),
+(64, 'ES', 'ESP', 'Spain', 'Espagne'),
+(65, 'ET', 'ETH', 'Ethiopia', 'Ethiopie'),
+(66, 'FI', 'FIN', 'Finland', 'Finlande'),
+(67, 'FJ', 'FJI', 'Fiji Islands', 'Iles Fidji'),
+(68, 'FK', 'FLK', 'Falkland Islands', 'îles Falkland'),
+(69, 'FM', 'FSM', 'Micronesia, Federated States of', 'Micronésie, États fédérés de'),
+(70, 'FO', 'FRO', 'Faroe Islands', 'Îles Féroé'),
+(71, 'FR', 'FRA', 'France', 'France'),
+(72, 'GA', 'GAB', 'Gabon', 'Gabon'),
+(73, 'GB', 'GBR', 'United Kingdom', 'Royaume-Uni'),
+(74, 'GD', 'GRD', 'Grenada', 'Grenade'),
+(75, 'GE', 'GEO', 'Georgia', 'Géorgie'),
+(76, 'GF', 'GUF', 'French Guiana', 'Guyane Française'),
+(77, 'GH', 'GHA', 'Ghana', 'Ghana'),
+(78, 'GI', 'GIB', 'Gibraltar', 'Gibraltar'),
+(79, 'GL', 'GRL', 'Greenland', 'Groenland'),
+(80, 'GM', 'GMB', 'Gambia', 'Gambie'),
+(81, 'GN', 'GIN', 'Guinea', 'Guinée'),
+(82, 'GP', 'GLP', 'Guadeloupe', 'Guadeloupe'),
+(83, 'GQ', 'GNQ', 'Equatorial Guinea', 'Guinée Équatoriale'),
+(84, 'GR', 'GRC', 'Greece', 'Grèce'),
+(85, 'GS', 'SGS', 'South Georgia and the South Sandwich Islands', 'Géorgie du Sud et îles Sandwich du Sud'),
+(86, 'GT', 'GTM', 'Guatemala', 'Guatemala'),
+(87, 'GU', 'GUM', 'Guam', 'Guam'),
+(88, 'GW', 'GNB', 'Guinea-Bissau', 'Guinée-Bissau'),
+(89, 'GY', 'GUY', 'Guyana', 'Guyane'),
+(90, 'HK', 'HKG', 'Hong Kong', 'Hong Kong'),
+(91, 'HM', 'HMD', 'Heard Island and McDonald Islands', 'Îles Heard et McDonald'),
+(92, 'HN', 'HND', 'Honduras', 'Honduras'),
+(93, 'HR', 'HRV', 'Croatia', 'Croatie'),
+(94, 'HT', 'HTI', 'Haiti', 'Haïti'),
+(95, 'HU', 'HUN', 'Hungary', 'Hongrie'),
+(96, 'ID', 'IDN', 'Indonesia', 'Indonésie'),
+(97, 'IE', 'IRL', 'Ireland', 'Irlande'),
+(98, 'IL', 'ISR', 'Israel', 'Israël'),
+(99, 'IN', 'IND', 'India', 'Inde'),
+(100, 'IO', 'IOT', 'British Indian Ocean Territory', 'Territoire britannique de l\'océan Indien'),
+(101, 'IQ', 'IRQ', 'Iraq', 'Irak'),
+(102, 'IR', 'IRN', 'Iran', 'Iran'),
+(103, 'IS', 'ISL', 'Iceland', 'Islande'),
+(104, 'IT', 'ITA', 'Italy', 'Italie'),
+(105, 'JM', 'JAM', 'Jamaica', 'Jamaïque'),
+(106, 'JO', 'JOR', 'Jordan', 'Jordan'),
+(107, 'JP', 'JPN', 'Japan', 'Japon'),
+(108, 'KE', 'KEN', 'Kenya', 'Kenya'),
+(109, 'KG', 'KGZ', 'Kyrgyzstan', 'Kirghizistan'),
+(110, 'KH', 'KHM', 'Cambodia', 'Cambodge'),
+(111, 'KI', 'KIR', 'Kiribati', 'Kiribati'),
+(112, 'KM', 'COM', 'Comoros', 'Comores'),
+(113, 'KN', 'KNA', 'Saint Kitts and Nevis', 'Saint-Christophe-et-Niévès'),
+(114, 'KP', 'PRK', 'North Korea', 'Corée du Nord'),
+(115, 'KR', 'KOR', 'South Korea', 'Corée du Sud'),
+(116, 'KW', 'KWT', 'Kuwait', 'Koweit'),
+(117, 'KY', 'CYM', 'Cayman Islands', 'Îles Caïmans'),
+(118, 'KZ', 'KAZ', 'Kazakstan', 'Kazakstan'),
+(119, 'LA', 'LAO', 'Laos', 'Laos'),
+(120, 'LB', 'LBN', 'Lebanon', 'Liban'),
+(121, 'LC', 'LCA', 'Saint Lucia', 'Sainte-Lucie'),
+(122, 'LI', 'LIE', 'Liechtenstein', 'Liechtenstein'),
+(123, 'LK', 'LKA', 'Sri Lanka', 'Sri Lanka'),
+(124, 'LR', 'LBR', 'Liberia', 'Libéria'),
+(125, 'LS', 'LSO', 'Lesotho', 'Lesotho'),
+(126, 'LT', 'LTU', 'Lithuania', 'Lituanie'),
+(127, 'LU', 'LUX', 'Luxembourg', 'Luxembourg'),
+(128, 'LV', 'LVA', 'Latvia', 'Lettonie'),
+(129, 'LY', 'LBY', 'Libyan Arab Jamahiriya', 'Jamahiriya arabe libyenne'),
+(130, 'MA', 'MAR', 'Morocco', 'Maroc'),
+(131, 'MC', 'MCO', 'Monaco', 'Monaco'),
+(132, 'MD', 'MDA', 'Moldova', 'Moldavie'),
+(133, 'MG', 'MDG', 'Madagascar', 'Madagascar'),
+(134, 'MH', 'MHL', 'Marshall Islands', 'Iles Marshall'),
+(135, 'MK', 'MKD', 'Macedonia', 'Macédoine'),
+(136, 'ML', 'MLI', 'Mali', 'Mali'),
+(137, 'MM', 'MMR', 'Myanmar', 'Myanmar'),
+(138, 'MN', 'MNG', 'Mongolia', 'Mongolie'),
+(139, 'MO', 'MAC', 'Macao', 'Macao'),
+(140, 'MP', 'MNP', 'Northern Mariana Islands', 'Îles Mariannes du Nord'),
+(141, 'MQ', 'MTQ', 'Martinique', 'Martinique'),
+(142, 'MR', 'MRT', 'Mauritania', 'Mauritanie'),
+(143, 'MS', 'MSR', 'Montserrat', 'Montserrat'),
+(144, 'MT', 'MLT', 'Malta', 'Malte'),
+(145, 'MU', 'MUS', 'Mauritius', 'Ile Maurice'),
+(146, 'MV', 'MDV', 'Maldives', 'Maldives'),
+(147, 'MW', 'MWI', 'Malawi', 'Malawi'),
+(148, 'MX', 'MEX', 'Mexico', 'Mexique'),
+(149, 'MY', 'MYS', 'Malaysia', 'Malaisie'),
+(150, 'MZ', 'MOZ', 'Mozambique', 'Mozambique'),
+(151, 'NA', 'NAM', 'Namibia', 'Namibie'),
+(152, 'NC', 'NCL', 'New Caledonia', 'Nouvelle Calédonie'),
+(153, 'NE', 'NER', 'Niger', 'Niger'),
+(154, 'NF', 'NFK', 'Norfolk Island', 'Ile de Norfolk'),
+(155, 'NG', 'NGA', 'Nigeria', 'Nigeria'),
+(156, 'NI', 'NIC', 'Nicaragua', 'Nicaragua'),
+(157, 'NL', 'NLD', 'Netherlands', 'Pays-Bas'),
+(158, 'NO', 'NOR', 'Norway', 'Norvège'),
+(159, 'NP', 'NPL', 'Nepal', 'Népal'),
+(160, 'NR', 'NRU', 'Nauru', 'Nauru'),
+(161, 'NU', 'NIU', 'Niue', 'Niue'),
+(162, 'NZ', 'NZL', 'New Zealand', 'Nouvelle-Zélande'),
+(163, 'OM', 'OMN', 'Oman', 'Oman'),
+(164, 'PA', 'PAN', 'Panama', 'Panama'),
+(165, 'PE', 'PER', 'Peru', 'Pérou'),
+(166, 'PF', 'PYF', 'French Polynesia', 'Polynésie française'),
+(167, 'PG', 'PNG', 'Papua New Guinea', 'Papouasie Nouvelle Guinée'),
+(168, 'PH', 'PHL', 'Philippines', 'Philippines'),
+(169, 'PK', 'PAK', 'Pakistan', 'Pakistan'),
+(170, 'PL', 'POL', 'Poland', 'Pologne'),
+(171, 'PM', 'SPM', 'Saint Pierre and Miquelon', 'Saint-Pierre-et-Miquelon'),
+(172, 'PN', 'PCN', 'Pitcairn', 'Pitcairn'),
+(173, 'PR', 'PRI', 'Puerto Rico', 'Porto Rico'),
+(174, 'PS', 'PSE', 'Palestine', 'Palestine'),
+(175, 'PT', 'PRT', 'Portugal', 'le Portugal'),
+(176, 'PW', 'PLW', 'Palau', 'Palau'),
+(177, 'PY', 'PRY', 'Paraguay', 'Paraguay'),
+(178, 'QA', 'QAT', 'Qatar', 'Qatar'),
+(179, 'RE', 'REU', 'RÚunion', 'Réunion'),
+(180, 'RO', 'ROM', 'Romania', 'Roumanie'),
+(181, 'RU', 'RUS', 'Russian Federation', 'Fédération Russe'),
+(182, 'RW', 'RWA', 'Rwanda', 'Rwanda'),
+(183, 'SA', 'SAU', 'Saudi Arabia', 'Arabie Saoudite'),
+(184, 'SB', 'SLB', 'Solomon Islands', 'Iles Salomon'),
+(185, 'SC', 'SYC', 'Seychelles', 'Seychelles'),
+(186, 'SD', 'SDN', 'Sudan', 'Soudan'),
+(187, 'SE', 'SWE', 'Sweden', 'Suède'),
+(188, 'SG', 'SGP', 'Singapore', 'Singapour'),
+(189, 'SH', 'SHN', 'Saint Helena', 'Sainte-Hélène'),
+(190, 'SI', 'SVN', 'Slovenia', 'Slovénie'),
+(191, 'SJ', 'SJM', 'Svalbard and Jan Mayen', 'Svalbard et Jan Mayen'),
+(192, 'SK', 'SVK', 'Slovakia', 'Slovaquie'),
+(193, 'SL', 'SLE', 'Sierra Leone', 'Sierra Leone'),
+(194, 'SM', 'SMR', 'San Marino', 'Saint Marin'),
+(195, 'SN', 'SEN', 'Senegal', 'Sénégal'),
+(196, 'SO', 'SOM', 'Somalia', 'Somalie'),
+(197, 'SR', 'SUR', 'Suriname', 'Suriname'),
+(198, 'ST', 'STP', 'Sao Tome and Principe', 'Sao Tomé et Principe'),
+(199, 'SV', 'SLV', 'El Salvador', 'Salvador'),
+(200, 'SY', 'SYR', 'Syria', 'Syrie'),
+(201, 'SZ', 'SWZ', 'Swaziland', 'Swaziland'),
+(202, 'TC', 'TCA', 'Turks and Caicos Islands', 'Iles Turques-et-Caïques'),
+(203, 'TD', 'TCD', 'Chad', 'Tchad'),
+(204, 'TF', 'ATF', 'French Southern territories', 'Territoires du Sud français'),
+(205, 'TG', 'TGO', 'Togo', 'Togo'),
+(206, 'TH', 'THA', 'Thailand', 'Thaïlande'),
+(207, 'TJ', 'TJK', 'Tajikistan', 'Tadjikistan'),
+(208, 'TK', 'TKL', 'Tokelau', 'Tokelau'),
+(209, 'TM', 'TKM', 'Turkmenistan', 'Turkménistan'),
+(210, 'TN', 'TUN', 'Tunisia', 'Tunisie'),
+(211, 'TO', 'TON', 'Tonga', 'Tonga'),
+(212, 'TP', 'TMP', 'East Timor', 'Timor oriental'),
+(213, 'TR', 'TUR', 'Turkey', 'Turquie'),
+(214, 'TT', 'TTO', 'Trinidad and Tobago', 'Trinité-et-Tobago'),
+(215, 'TV', 'TUV', 'Tuvalu', 'Tuvalu'),
+(216, 'TW', 'TWN', 'Taiwan', 'Taïwan'),
+(217, 'TZ', 'TZA', 'Tanzania', 'Tanzanie'),
+(218, 'UA', 'UKR', 'Ukraine', 'Ukraine'),
+(219, 'UG', 'UGA', 'Uganda', 'Ouganda'),
+(220, 'UM', 'UMI', 'United States Minor Outlying Islands', 'Îles mineures éloignées des États-Unis'),
+(221, 'US', 'USA', 'United States', 'États Unis'),
+(222, 'UY', 'URY', 'Uruguay', 'Uruguay'),
+(223, 'UZ', 'UZB', 'Uzbekistan', 'Ouzbékistan'),
+(224, 'VA', 'VAT', 'Holy See (Vatican City State)', 'Saint-Siège (État de la Cité du Vatican)'),
+(225, 'VC', 'VCT', 'Saint Vincent and the Grenadines', 'Saint-Vincent-et-les-Grenadines'),
+(226, 'VE', 'VEN', 'Venezuela', 'Venezuela'),
+(227, 'VG', 'VGB', 'Virgin Islands, British', 'Îles Vierges britanniques'),
+(228, 'VI', 'VIR', 'Virgin Islands, U.S.', 'Îles Vierges américaines, États-Unis'),
+(229, 'VN', 'VNM', 'Vietnam', 'Vietnam'),
+(230, 'VU', 'VUT', 'Vanuatu', 'Vanuatu'),
+(231, 'WF', 'WLF', 'Wallis and Futuna', 'Wallis et Futuna'),
+(232, 'WS', 'WSM', 'Samoa', 'Samoa'),
+(233, 'YE', 'YEM', 'Yemen', 'Yémen'),
+(234, 'YT', 'MYT', 'Mayotte', 'Mayotte'),
+(235, 'YU', 'YUG', 'Yugoslavia', 'Yougoslavie'),
+(236, 'ZA', 'ZAF', 'South Africa', 'Afrique du Sud'),
+(237, 'ZM', 'ZMB', 'Zambia', 'Zambie'),
+(238, 'ZW', 'ZWE', 'Zimbabwe', 'Zimbabwe');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `credit`
+--
+
+DROP TABLE IF EXISTS `credit`;
+CREATE TABLE `credit` (
+  `ID` int(255) NOT NULL,
+  `ID_user` int(255) NOT NULL,
+  `stamp` datetime NOT NULL DEFAULT current_timestamp(),
+  `count` int(11) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `credit_usage`
+--
+
+DROP TABLE IF EXISTS `credit_usage`;
+CREATE TABLE `credit_usage` (
+  `ID` int(255) NOT NULL,
+  `fk_user` int(255) NOT NULL,
+  `fk_media` int(255) NOT NULL,
+  `stamp` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ct_center`
+--
+
+DROP TABLE IF EXISTS `ct_center`;
+CREATE TABLE `ct_center` (
+  `ID` int(255) NOT NULL,
+  `fk_organization` int(255) NOT NULL,
+  `fk_probe` int(255) NOT NULL,
+  `stamp` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `email`
+--
+
+DROP TABLE IF EXISTS `email`;
+CREATE TABLE `email` (
+  `ID` int(255) NOT NULL,
+  `type` varchar(64) NOT NULL,
+  `address` varchar(128) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `email`
+--
+
+INSERT INTO `email` (`ID`, `type`, `address`) VALUES
+(1, 'postmaster', 'postmaster@ipsocloud.com');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `lst_coronary_type`
+--
+
+DROP TABLE IF EXISTS `lst_coronary_type`;
+CREATE TABLE `lst_coronary_type` (
+  `ID` int(255) NOT NULL,
+  `code` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `lst_coronary_type`
+--
+
+INSERT INTO `lst_coronary_type` (`ID`, `code`) VALUES
+(1, '{\"fr\":\"Insuffisance coronarienne\", \"en\": \"Coronary insufficiency\"}'),
+(2, '{\"fr\":\"Athérosclérose\", \"en\": \"Atherosclerosis\"}'),
+(3, '{\"fr\":\"Infarctus\", \"en\": \"Infarctus\"}');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `lst_stroke_type`
+--
+
+DROP TABLE IF EXISTS `lst_stroke_type`;
+CREATE TABLE `lst_stroke_type` (
+  `ID` int(255) NOT NULL,
+  `code` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `lst_stroke_type`
+--
+
+INSERT INTO `lst_stroke_type` (`ID`, `code`) VALUES
+(1, '{\"fr\":\"Hémorragie\", \"en\": \"Hemorrhage\"}'),
+(2, '{\"fr\":\"AIT\", \"en\": \"TIA\"}'),
+(3, '{\"fr\":\"Infarctus territorial\", \"en\": \"Territorial Infarction\"}'),
+(4, '{\"fr\":\"Lacunaire\", \"en\": \"Lacunar\"}');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `measure`
+--
+
+DROP TABLE IF EXISTS `measure`;
+CREATE TABLE `measure` (
+  `ID` int(255) NOT NULL,
+  `type` varchar(64) NOT NULL,
+  `points` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `computation` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `fk_media` int(255) NOT NULL,
+  `frame` mediumint(9) NOT NULL DEFAULT 0,
+  `fk_user` int(255) NOT NULL,
+  `created` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `media`
+--
+
+DROP TABLE IF EXISTS `media`;
+CREATE TABLE `media` (
+  `ID` int(255) NOT NULL,
+  `side` varchar(16) DEFAULT NULL,
+  `location` varchar(16) DEFAULT NULL,
+  `incidence` varchar(32) DEFAULT NULL,
+  `filename` varchar(64) NOT NULL,
+  `metrics` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `fk_visit` int(255) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `organization`
+--
+
+DROP TABLE IF EXISTS `organization`;
+CREATE TABLE `organization` (
+  `ID` int(255) NOT NULL,
+  `fk_user` int(255) NOT NULL,
+  `name` varchar(128) NOT NULL,
+  `fk_country` int(255) NOT NULL,
+  `zip` varchar(32) NOT NULL,
+  `city` varchar(128) NOT NULL,
+  `address` text NOT NULL,
+  `phone` varchar(32) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `patient`
+--
+
+DROP TABLE IF EXISTS `patient`;
+CREATE TABLE `patient` (
+  `ID` int(255) NOT NULL,
+  `patientID` varchar(128) NOT NULL,
+  `ctPatientID` varchar(128) DEFAULT NULL,
+  `firstname` varchar(128) NOT NULL,
+  `lastname` varchar(128) NOT NULL,
+  `gender` char(1) NOT NULL DEFAULT 'M',
+  `birthDate` date NOT NULL,
+  `height` int(11) DEFAULT NULL,
+  `weight` int(11) DEFAULT NULL,
+  `race` enum('white','african','indian','asian','other') DEFAULT NULL,
+  `fk_birthCountry` int(255) DEFAULT NULL,
+  `fk_residenceCountry` int(255) DEFAULT NULL,
+  `fk_user` int(255) NOT NULL,
+  `created` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `probe`
+--
+
+DROP TABLE IF EXISTS `probe`;
+CREATE TABLE `probe` (
+  `ID` int(255) NOT NULL,
+  `fk_user` int(255) NOT NULL,
+  `name` varchar(128) NOT NULL,
+  `brand` varchar(128) NOT NULL,
+  `type` varchar(128) NOT NULL,
+  `year` int(4) DEFAULT NULL,
+  `frequency` float NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `recipient`
+--
+
+DROP TABLE IF EXISTS `recipient`;
+CREATE TABLE `recipient` (
+  `ID` int(255) NOT NULL,
+  `email` varchar(128) NOT NULL,
+  `fk_user` int(255) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `settings`
+--
+
+DROP TABLE IF EXISTS `settings`;
+CREATE TABLE `settings` (
+  `ID` int(255) NOT NULL,
+  `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `settings`
+--
+
+INSERT INTO `settings` (`ID`, `data`) VALUES
+(1, '{\"patientListFields\":[{\"name\":\"Sex\",\"display\":1},{\"name\":\"PatientID\",\"display\":1},{\"name\":\"Lastname\",\"display\":1},{\"name\":\"Firstname\",\"display\":1},{\"name\":\"Birthdate\",\"display\":1},{\"name\":\"Height\",\"display\":0},{\"name\":\"Weight\",\"display\":0},{\"name\":\"Last visit\",\"display\":1},{\"name\":\"Visit count\",\"display\":1},{\"name\":\"Image count\",\"display\":1},{\"name\":\"Video count\",\"display\":1}],\"newPatientFields\":[{\"name\":\"Visit date\",\"display\":1,\"required\":1},{\"name\":\"Firstname\",\"display\":1,\"required\":1},{\"name\":\"Lastname\",\"display\":1,\"required\":1},{\"name\":\"Sex\",\"display\":1,\"required\":1},{\"name\":\"Birthdate\",\"display\":1,\"required\":1},{\"name\":\"Height\",\"display\":0,\"required\":0},{\"name\":\"Weight\",\"display\":0,\"required\":0},{\"name\":\"Birth country\",\"display\":1,\"required\":1},{\"name\":\"Residence country\",\"display\":0,\"required\":0}],\"videoDurationMax\":300}');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `settings_pacs`
+--
+
+DROP TABLE IF EXISTS `settings_pacs`;
+CREATE TABLE `settings_pacs` (
+  `ID` int(255) NOT NULL,
+  `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `fk_physician` int(255) DEFAULT NULL,
+  `fk_center` int(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `user`
+--
+
+DROP TABLE IF EXISTS `user`;
+CREATE TABLE `user` (
+  `ID` int(255) NOT NULL,
+  `activation_token` varchar(127) NOT NULL,
+  `activation_expire` datetime NOT NULL,
+  `activation` datetime DEFAULT NULL,
+  `password` varchar(128) NOT NULL,
+  `firstname` varchar(128) NOT NULL,
+  `lastname` varchar(128) NOT NULL,
+  `email` varchar(128) NOT NULL,
+  `phone` varchar(32) NOT NULL,
+  `type` enum('imt-master','physician','cro','reader','investigator') NOT NULL,
+  `active` tinyint(4) NOT NULL DEFAULT 1,
+  `stamp` datetime NOT NULL DEFAULT current_timestamp(),
+  `fk_center` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `visit`
+--
+
+DROP TABLE IF EXISTS `visit`;
+CREATE TABLE `visit` (
+  `ID` int(255) NOT NULL,
+  `number` varchar(128) NOT NULL,
+  `visitDate` date NOT NULL,
+  `area` varchar(16) DEFAULT NULL,
+  `markers` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '[]',
+  `completed` datetime DEFAULT NULL,
+  `fk_patient` int(255) NOT NULL,
+  `fk_reader` int(255) DEFAULT NULL,
+  `created` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Indexes for dumped tables
+--
+
+--
+-- Indexes for table `abacus`
+--
+ALTER TABLE `abacus`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `broker`
+--
+ALTER TABLE `broker`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `clinical_trial`
+--
+ALTER TABLE `clinical_trial`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `context`
+--
+ALTER TABLE `context`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `country`
+--
+ALTER TABLE `country`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `credit`
+--
+ALTER TABLE `credit`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `credit_usage`
+--
+ALTER TABLE `credit_usage`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `ct_center`
+--
+ALTER TABLE `ct_center`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `email`
+--
+ALTER TABLE `email`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `lst_coronary_type`
+--
+ALTER TABLE `lst_coronary_type`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `lst_stroke_type`
+--
+ALTER TABLE `lst_stroke_type`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `measure`
+--
+ALTER TABLE `measure`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `media`
+--
+ALTER TABLE `media`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `organization`
+--
+ALTER TABLE `organization`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `patient`
+--
+ALTER TABLE `patient`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `probe`
+--
+ALTER TABLE `probe`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `recipient`
+--
+ALTER TABLE `recipient`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `settings`
+--
+ALTER TABLE `settings`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `settings_pacs`
+--
+ALTER TABLE `settings_pacs`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `user`
+--
+ALTER TABLE `user`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `visit`
+--
+ALTER TABLE `visit`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- AUTO_INCREMENT for dumped tables
+--
+
+--
+-- AUTO_INCREMENT for table `abacus`
+--
+ALTER TABLE `abacus`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
+
+--
+-- AUTO_INCREMENT for table `broker`
+--
+ALTER TABLE `broker`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
+
+--
+-- AUTO_INCREMENT for table `clinical_trial`
+--
+ALTER TABLE `clinical_trial`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `context`
+--
+ALTER TABLE `context`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `country`
+--
+ALTER TABLE `country`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=239;
+
+--
+-- AUTO_INCREMENT for table `credit`
+--
+ALTER TABLE `credit`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `credit_usage`
+--
+ALTER TABLE `credit_usage`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `ct_center`
+--
+ALTER TABLE `ct_center`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `email`
+--
+ALTER TABLE `email`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
+
+--
+-- AUTO_INCREMENT for table `lst_coronary_type`
+--
+ALTER TABLE `lst_coronary_type`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
+
+--
+-- AUTO_INCREMENT for table `lst_stroke_type`
+--
+ALTER TABLE `lst_stroke_type`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
+
+--
+-- AUTO_INCREMENT for table `measure`
+--
+ALTER TABLE `measure`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `media`
+--
+ALTER TABLE `media`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `organization`
+--
+ALTER TABLE `organization`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `patient`
+--
+ALTER TABLE `patient`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `probe`
+--
+ALTER TABLE `probe`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `recipient`
+--
+ALTER TABLE `recipient`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `settings`
+--
+ALTER TABLE `settings`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
+
+--
+-- AUTO_INCREMENT for table `settings_pacs`
+--
+ALTER TABLE `settings_pacs`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `user`
+--
+ALTER TABLE `user`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `visit`
+--
+ALTER TABLE `visit`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+COMMIT;
+
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

+ 93 - 0
debian/Math-Cloud-server/tmp/iimt_mathcloud_audit.sql

@@ -0,0 +1,93 @@
+-- phpMyAdmin SQL Dump
+-- version 4.9.5deb2
+-- https://www.phpmyadmin.net/
+--
+-- Host: localhost:3306
+-- Generation Time: Feb 04, 2022 at 02:21 PM
+-- Server version: 10.3.32-MariaDB-0ubuntu0.20.04.1
+-- PHP Version: 7.4.3
+
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
+SET AUTOCOMMIT = 0;
+START TRANSACTION;
+SET time_zone = "+00:00";
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8mb4 */;
+
+--
+-- Database: `iimt_mathcloud_audit`
+--
+CREATE DATABASE IF NOT EXISTS `iimt_mathcloud_audit` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
+USE `iimt_mathcloud_audit`;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `activity`
+--
+
+DROP TABLE IF EXISTS `activity`;
+CREATE TABLE `activity` (
+  `ID` int(255) NOT NULL,
+  `ID_ray` int(255) NOT NULL,
+  `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `stamp` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ray`
+--
+
+DROP TABLE IF EXISTS `ray`;
+CREATE TABLE `ray` (
+  `ID` int(255) NOT NULL,
+  `userAgent` text NOT NULL,
+  `apiKey` varchar(128) NOT NULL,
+  `ipData` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `locationData` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `userData` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `stamp` datetime NOT NULL DEFAULT current_timestamp()
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Indexes for dumped tables
+--
+
+--
+-- Indexes for table `activity`
+--
+ALTER TABLE `activity`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- Indexes for table `ray`
+--
+ALTER TABLE `ray`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- AUTO_INCREMENT for dumped tables
+--
+
+--
+-- AUTO_INCREMENT for table `activity`
+--
+ALTER TABLE `activity`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+
+--
+-- AUTO_INCREMENT for table `ray`
+--
+ALTER TABLE `ray`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+COMMIT;
+
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

+ 67 - 0
debian/Math-Cloud-server/tmp/iimt_mathcloud_shadow.sql

@@ -0,0 +1,67 @@
+-- phpMyAdmin SQL Dump
+-- version 4.9.5deb2
+-- https://www.phpmyadmin.net/
+--
+-- Host: localhost:3306
+-- Generation Time: Sep 28, 2021 at 10:10 AM
+-- Server version: 10.3.31-MariaDB-0ubuntu0.20.04.1
+-- PHP Version: 7.4.3
+
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
+SET AUTOCOMMIT = 0;
+START TRANSACTION;
+SET time_zone = "+00:00";
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8mb4 */;
+
+--
+-- Database: `iimt_mathcloud_shadow`
+--
+CREATE DATABASE IF NOT EXISTS `iimt_mathcloud_shadow` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
+USE `iimt_mathcloud_shadow`;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `media`
+--
+
+DROP TABLE IF EXISTS `media`;
+CREATE TABLE `media` (
+  `ID` int(255) NOT NULL,
+  `side` varchar(16) NOT NULL,
+  `location` varchar(16) NOT NULL,
+  `incidence` varchar(32) NOT NULL,
+  `filename` varchar(64) NOT NULL,
+  `metrics` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `fk_visit` int(255) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Indexes for dumped tables
+--
+
+--
+-- Indexes for table `media`
+--
+ALTER TABLE `media`
+  ADD PRIMARY KEY (`ID`);
+
+--
+-- AUTO_INCREMENT for dumped tables
+--
+
+--
+-- AUTO_INCREMENT for table `media`
+--
+ALTER TABLE `media`
+  MODIFY `ID` int(255) NOT NULL AUTO_INCREMENT;
+COMMIT;
+
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

+ 43 - 0
debian/buildDeb.sh

@@ -0,0 +1,43 @@
+#! /bin/bash
+
+
+echo -e "\033[92m*** Build debian packages ***\033[0m"
+
+
+# Prepare le paquet devel
+
+cp -f ../api.ipsocloud.com/sql/iimt_mathcloud.sql Math-Cloud-devel/tmp/
+cp -f ../api.ipsocloud.com/sql/iimt_mathcloud_audit.sql Math-Cloud-devel/tmp/
+cp -f ../api.ipsocloud.com/sql/iimt_mathcloud_shadow.sql Math-Cloud-devel/tmp/
+
+
+# Prepare le paquet server
+
+cp -f ../api.ipsocloud.com/sql/iimt_mathcloud.sql Math-Cloud-server/tmp/
+cp -f ../api.ipsocloud.com/sql/iimt_mathcloud_audit.sql Math-Cloud-server/tmp/
+cp -f ../api.ipsocloud.com/sql/iimt_mathcloud_shadow.sql Math-Cloud-server/tmp/
+
+
+# Prepare le paquet app
+
+mkdir -p Math-Cloud-app/var/www/api
+mkdir -p Math-Cloud-app/var/www/cro
+mkdir -p Math-Cloud-app/var/www/www/admin
+
+cp -r ../admin.ipsocloud.com/webapp_webpack/www/* Math-Cloud-app/var/www/www/admin/
+cp -r ../api.ipsocloud.com/{api,bin,.htaccess} Math-Cloud-app/var/www/api/
+cp -r ../cro.ipsocloud.com/webapp_webpack/www/* Math-Cloud-app/var/www/cro/
+cp -r ../www.ipsocloud.com/webapp_webpack/www/* Math-Cloud-app/var/www/www/
+
+
+# Construit les paquets debian
+
+dpkg-deb --build Math-Cloud-devel/
+dpkg-deb --build Math-Cloud-server/
+dpkg-deb --build Math-Cloud-app/
+
+
+# Efface les fichiers app temporaires
+
+rm -rf Math-Cloud-app/var/www/*
+