configurable template

This commit is contained in:
Dr Masroor Ehsan 2025-01-12 10:55:39 +06:00
parent 0d75b15d01
commit ce55b65585
2 changed files with 8 additions and 2 deletions

View File

@ -16,10 +16,10 @@ protected function handle(): string
$filename = $this->filename();
$filepath = ReportStorage::customFilepath($this->study, $filename);
if (ReportStorage::exists($this->study, $filename)) {
return $filepath;
// return $filepath;
}
$docx = new CreateDocxFromTemplate(Storage::disk('local')->path('report/report-template-gray.docx'));
$docx = new CreateDocxFromTemplate(Storage::disk('local')->path(config('services.report.word2007.template')));
$variables = [
'PAT_NAME' => $this->report->study->patient_name,
'PAT_ID' => $this->report->study->patient_id,

View File

@ -35,4 +35,10 @@
],
],
'report' => [
'word2007' => [
'template' => env('REPORT_TEMPLATE_WORD2007', 'report/report-template-gray.docx'),
],
],
];