Publier Globinours 1.0.0-rc.3

This commit is contained in:
Alexandre NOEL 2026-09-03 12:39:15 +02:00
commit 9a2b4068da
325 changed files with 38230 additions and 20 deletions

21
scripts/asm3-clinical.php Normal file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env php
<?php
declare(strict_types=1);
$root = dirname(__DIR__);
foreach (['DB', 'Migrations', 'BackupService', 'AppSettings', 'Asm3Analyzer', 'Asm3ClinicalImporter'] as $s) {
require $root . '/app/Services/' . $s . '.php';
}
$path = $argv[1] ?? null;
$apply = in_array('--apply', $argv, true);
if (!$path) {
fwrite(STDERR, "Usage : php scripts/asm3-clinical.php dump.sql [--apply]\n");
exit(2);
}
if ($apply) {
fwrite(STDERR, 'Tapez IMPORTER MEDICAL : ');
if (trim((string) fgets(STDIN)) !== 'IMPORTER MEDICAL') {
exit(3);
}
}
Migrations::run($root . '/migrations');
echo json_encode(Asm3ClinicalImporter::run($path, DB::pdo(), $apply), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE), "\n";