Le portail - eFondaMental v4
This content is not available in your language yet.
Introduction
L’objectif du Portail FondaMental est d’être la porte d’entrée pour tous les médecins et équipes médical du réseaux des Centres Experts. Que ce soit pour suivre un patient ou une inclusion dans une étude clinique.

Trois sections principales:
- Patient : un patient peut être créer par un médecin ou l’équipe médicale.
 - Medecins : un médecin est créer par l’équipe Admin à FondaMental
 - Centres : un centre expert, ou d’inclusion d’une étude clinique est crée par l’équie Admin à Fondamental.
 
Technical details
- Backend: API FHIR Health Samurai - Aidbox
 - Front end: React
- Github: https://github.com/fondationfondamental/frenchminds_emr
 - Deployment: https://emr.frenchminds.beda.software/
Permet de créer un compte medecin et des patients.- login: 
see BitWarden - mdp: 
see BitWarden 
 - login: 
 
 
v0.1
- Trials
- EMMA
 - French Minds
 
 
v0.2
To do
- Devops to plan with LecPac
 
Components:
- Twilio: SMS 2FA
 
Sign in & Sign up
The sign up, or “Créer un compte”, can be done freely by anyone.
The following roles are available upon account creation:
- Patient
 - Practioner
- Psychiatre
 - Psychologue
 - Infirmier/ère
 - Care Coordinator
 
 - ARC
 - Superadmin: no sign up flow needed
 
-> add a CAPTCHA on account creation
For the patient, we ask similar information as currently: Nom, prénom, e-mail, birth date, Gender, phone number, SSN
For Patient, passwordless option is preferable: on password is sent by e-mail or SMS for longging in.
For the Doctor, Infirmier, Psychologue and ARC, we ask the following information: nom, prénom, e-mail, gender, phone number, organisation (from list of organisations, other if not found).
For Practioner, ARC and Admins we need 2FA : password + code sent to e-mail or SMS.
- Check if this is possible for practioners: https://docs.aidbox.app/modules-1/security-and-access-control/auth/two-factor-authentication
 
Questionnaires
- Questionnaire “nu”
 - Score du questionnaire
- Create documentation on how to create a questionnaire with items (with complex contraints) + Scores : take examples
 
 - Create: types or categories of questionnaires
 
Clinical trial
- 
Clinical trials
- Assigne trial to one or more Organisations
 
 - 
Create
.ymltemplate to create a new Clinical trial- No UI needed.
 - Done in backend with 
.ymlcreation. - A trial is defined following French Minds organisation: Visits, categories, questionnaire
 
 - 
Trials:
- EMMA: 
done - French Minds: 
done - eAsperger: start-august
 - eBipolar: mid-july
 - eCEDR: mid-july
 - eSchizo: start-august
 
 - EMMA: 
 
Practionner
- 
Create patient
- If patient exists already, then do a scenario: a completer
 - Practioner can create a patient.
 - Affiliate one or more organisation to the patient.

 - Fondacode: @seif donner l’algorithm
 
 - 
The patient receives an e-mail for account creation.
 - 
Have an overview on Patient’s Medical records, agostic from clinical trial

- Graphics: spécifier les métriques de manière précisse
 - Onglets:
- Traitements: @Marion
 - Biologie: avoir un onglet spécifique - @Marion
 - Questionnaire: Auto-Q, hétéro-Q, Social, Document clinique : @MC
 
 
 - 
Add patient to a Clinical Trial:
- One patient can belong to multiple trials
 - Follow progress of a clinical trial

 
 - 
Drugs: create terminology list of drugs in France
 
Patient
- Can answer assigned questionnaires: Web
 
Admin FondaMental
- Management
- Create Organizations, as it is today is fine: Admin manage
 - Can create a practionner, the practioner receives e-mail with sign up process
 - Add Practionners to organisations: one practioner can be in more than one organisation.
A practioner can have access to all patients in the organisation - Add patient to organisations: one patient can in in more than one organisation
 - Clinical trial: a clinical trial can be in more than on organization
 - ARC: can read only all patients in a trial
 - Admin have acces to anonyme data
 
 
v0.3
Questionnaires
- 
Neuropsy tests
 - 
ARC (or CRA (Clinical Research Associate))
- Read-only a given clinical trial
 - Possibility to have 2 buttons to “Valid”-ate or “Not valid”-ate + add comment item-per-item
 
 - 
Referral
- Anyone (no account needed) can recommend a patient
- Info about referring practionner: name, email, etc.
 - Info about refered patient
 - Select Expert Center (Organization) to send patient to (City)
 - Questionnaire to assess patient
 
 
 - Anyone (no account needed) can recommend a patient
 - 
Report genration
- Generate a normalized report
 
 - 
Data Migration
 - 
Trials:
- EMMA
 - French Minds
 - eSchizo
 - eAsperger
 - eCEDR
 - eBipolar
 - BAE
 - LENA
 
 
Infos pratiques
Version de développement:
- Lien: https://emr.frenchminds.beda.software/
 - Accès Admin: création centres, compte médecin, patients
- Login: 
admin - Mot de passe: 
sojM2RsJCqecvCBk2L 
 - Login: 
 
- Créer un médecin avec le compte administrateur, l’associer a une organisation ou en créer un nouvelle.
 - Se connecter avec le compte médecin crée. Puis créer un patient.
 - Ajouter le patient a une ou des études cliniques
 
To do
- Faire un plan de dev pour le Portail FondaMental
 - Doc pour travailler en local
 - Déployer avec LecPac un version en dev: dev.portail.fondamental.online
- Aidbox
 - fondamental_emr
 
 
Architecture

Matrice de flux efondamental Backend et Frontend
| Service source | Service cible | Port source | Port cible | Protocole | Description | 
|---|---|---|---|---|---|
| Utilisateur | Nginx | 443 | 80/443 | HTTPS | L’utilisateur accède a l’app web via Nginx (avec SSL) | 
| Nginx | emr-web | 443 | 5000 | HTTP | Redirection des requêtes vers le frontend | 
| emr-web | efondamental-backend | 5000 | 8081 | HTTP | Requêtes frontend vers le backend | 
| emr-web | aidbox | 5000 | 8080 | HTTPS | Requêtes frontend vers Aidbox | 
| efondamental-backend | aidbox | 8081 | 8080 | HTTP | Requêtes et migrations seed vers aidbox | 
| FHIR SDC | aidbox | 8080 | 8080 | HTTP | Capture structurée de données via des formulaires au format FHIR | 
| FHIR SDC | FHIR-path | 8080 | 8090 | HTTP | Manipulation des données FHIR | 
| efondamental-data-warehouse | minio | 8081 | 9000 | HTTPS | Stockage et récupération de fichiers | 
| efondamental-data-warehouse | datasequence-db | 8081 | 5432 | PostgreSQL | Connexion à TimescaleDB pour les opérations de data warehouse | 
| frenchminds-task-queue | datasequence-db | 8081 | 5432 | PostgreSQL | File de tâches basé sur PostgreSQL | 
| efondamental-backend | Twilio API | 8081 | 443 | HTTPS | Envoi de SMS via l’API Twilio | 
| aidbox | aidbox-db | 8080 | 5432 | PostgreSQL | Connexion entre aidbox et sa base de données | 
| frenchminds-task-queue-migrations | datasequence-db | 8081 | 5432 | PostgreSQL | Migration du schéma avec procrastinate | 
| efondamental-data-warehouse-migrations | datasequence-db | 8081 | 5432 | PostgreSQL | Migration du schéma pour le data warehouse | 
| Nginx | Certbot | 443 | 80 | HTTP | Renouvellement des certificats SSL | 
Variables d’environnement pour un deploiement
Postgres pour Aidbox
- POSTGRES_USER : user (default: postgres)
 - POSTGRES_PASSWORD : password
 - POSTGRES_DB : name db (default: postgres)
 
Aidbox
- AIDBOX_LICENSE : licence Aidbox
 - AIDBOX_ADMIN_PASSWORD : password admin Aidbox
 - PGUSER : 
POSTGRES_USER - PGPASSWORD : 
POSTGRES_PASSWORD - FRENCHMINDS_SUBSCRIPTION_WEBHOOK : http://efondamental-data-warehouse:8080/v1/subscriptions/notify (
efondamental-data-warehouseest le nom du service) - FRENCHMINDS_SUBSCRIPTION_WEBHOOK_AUTHORIZATION : jeton d’autorisation username and password (peut etre random)
 - EFONDAMENTAL_BACKEND_2FA_WEBHOOK : 
http://aidbox:8080/webhook/two-factor-confirmation(aidboxest le nom du service) - EFONDAMENTAL_BACKEND_2FA_WEBHOOK_AUTHORIZATION : jeton d’autorisation username:
two-factor-webhookand password:EFONDAMENTAL_BACKEND_2FA_WEBHOOK_SECRET - EFONDAMENTAL_BACKEND_2FA_WEBHOOK_SECRET : secret_password
 - EMAIL_PROVIDER : 
postmark - EMAIL_FROM : email d’expediteur
 - POSTMARK_API_KEY : clé d’api postmark
 
eFondamental Backend
- APP_INIT_CLIENT_ID : 
fondamental_aidbox_app - APP_INIT_CLIENT_SECRET : secret
 - APP_INIT_URL : 
http://aidbox:8080(aidboxest le nom du service) - APP_ID : 
efondamental-backend - APP_SECRET : secret
 - APP_URL : 
http://efondamental-backend:8081(efondamental-backendest le nom du service) - APP_PORT : 
8081 - AIO_PORT : 
8081 - AIO_HOST : 
0.0.0.0 - TWILIO_ACCOUNT_SID : TWILIO_ACCOUNT_SID
 - TWILIO_PHONE : TWILIO_PHONE
 - TWILIO_AUTH_TOKEN : TWILIO_AUTH_TOKEN
 - FRONTEND_URL : url du frontend (https://emr.frenchminds.beda.software)
 
Datasequence DB
- POSTGRES_PASSWORD : TIMESCALEDB_POSTGRES_PASSWORD
 
Minio
- MINIO_ROOT_USER : MINIO_ROOT_USER
 - MINIO_ROOT_PASSWORD : MINIO_ROOT_PASSWORD
 
eFondamental Data Warehouse Migrations
- TIMESCALEDB_SERVICE_NAME : 
datasequence-db(nom du service) - PGPASSWORD : 
POSTGRES_PASSWORD(datasequence db service) 
eFondamental Task Queue Migrations
- TIMESCALEDB_SERVICE_NAME : 
datasequence-db(nom du service) - PGPASSWORD : 
POSTGRES_PASSWORD(datasequence db service) - FRENCHMINDS_FCM_SERVICE_ACCOUNT_FILE_PATH : path to the Firebase service account certificate
 
eFondamental Data Warehouse
- TIMESCALEDB_SERVICE_NAME : 
datasequence-db(nom du service) - PGPASSWORD : 
POSTGRES_PASSWORD(datasequence db service) - STORAGE_SERVICE_PUBLIC_URL : uploads.frenchminds.beda.software
 - STORAGE_ACCESS_KEY_ID : 
MINIO_ROOT_USER - STORAGE_ACCESS_KEY_SECRET : 
MINIO_ROOT_PASSWORD - FRENCHMINDS_SUBSCRIPTION_WEBHOOK_AUTHORIZATION : 
FRENCHMINDS_SUBSCRIPTION_WEBHOOK_AUTHORIZATIONdu service aidbox - EMR_WEB_URL : url front end (https://emr.frenchminds.beda.software)
 - EMR_AIDBOX_URL : url aidbox (https://aidbox.frenchminds.beda.software)
 
FHIR SDC
- FHIRPATH_MAPPING_SERVICE : 
http://fhirpath_mapping:8090/parse-template(fhirpath_mappingest le nom du service) 
NGINX
- CERTBOT_EMAIL : email pour Certbot (SSL)
 
Configuration à vérifier pour le déploiement (répertoire deploy_config)
1. Certificat Firebase :
- S’assurer qu un certificat firebase 
fondamental-app-firebase.jsonest présent dans ./gcloud. 
2. Configuration du frontend:
- Modifiez les URLs dans le fichier 
contrib/emr-config/config.local.jspour le déploiement local oucontrib/emr-config/config.production.jspour la production afin qu’elles pointent vers les services backend déployés. - Copiez ensuite le fichier de configuration dans 
contrib/emr-config/config.js.