This commit is contained in:
Your Name
2026-10-09 09:36:17 +08:00
parent 88b94c2fc6
commit 51d8fd409e
727 changed files with 3753398 additions and 102 deletions
@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace app\common\service\prescriptionai;
use app\common\service\NihaixiaClinicalSkill;
use app\common\service\TcmAncientBooksReference;
use DomainException;
use think\facade\Db;
@@ -345,8 +347,9 @@ final class PrescriptionAiStore
$coverageStatus = in_array($coverageStatus, ['complete', 'full'], true) ? 'complete' : 'partial';
$body = ['report' => $output['report'] ?? [], 'candidate' => $output['candidate'] ?? null,
'comparison' => $comparison, 'coverage' => $coverage, 'usage' => $output['usage'] ?? [],
'knowledge_source' => $output['knowledge_source'] ?? null,
'ancient_book_sources' => $output['ancient_book_sources'] ?? []];
'knowledge_source' => NihaixiaClinicalSkill::localizeKnowledgeSource($output['knowledge_source'] ?? null),
'ancient_book_sources' => TcmAncientBooksReference::localizeSources(
is_array($output['ancient_book_sources'] ?? null) ? $output['ancient_book_sources'] : [])];
$now = time();
$resultId = (int) Db::name('prescription_ai_result')->insertGetId([
'batch_id' => $task['batch_id'], 'model_key' => $task['model_key'],