From a944b38e6bcd6a474e20b6058b7f1401cb6e4e37 Mon Sep 17 00:00:00 2001 From: Vadym Date: Thu, 26 Oct 2023 15:25:30 +0200 Subject: [PATCH] Add application details to delivery report (#2631) ### Added: - Application details to delivery report --- cg/meta/report/report_api.py | 1 + cg/meta/report/templates/balsamic_report.html | 3 +++ cg/meta/report/templates/mip-dna_report.html | 3 +++ cg/meta/report/templates/rnafusion_report.html | 3 +++ cg/models/report/sample.py | 1 + 5 files changed, 11 insertions(+) diff --git a/cg/meta/report/report_api.py b/cg/meta/report/report_api.py index 0a0669fb31..9d1adc7b21 100644 --- a/cg/meta/report/report_api.py +++ b/cg/meta/report/report_api.py @@ -282,6 +282,7 @@ def get_sample_application_data(self, lims_sample: dict) -> ApplicationModel: version=lims_sample.get("application_version"), prep_category=application.prep_category, description=application.description, + details=application.details, limitations=application.limitations, pipeline_limitations=self.get_pipeline_accreditation_limitation(application.tag), accredited=application.is_accredited, diff --git a/cg/meta/report/templates/balsamic_report.html b/cg/meta/report/templates/balsamic_report.html index f96e556fb0..7ff995d766 100644 --- a/cg/meta/report/templates/balsamic_report.html +++ b/cg/meta/report/templates/balsamic_report.html @@ -252,6 +252,9 @@

Teknisk beskrivning av analysen: {{ application.tag }}

{{ application.description }}

+ {% if application.details != 'N/A' %} +

{{ application.details }}

+ {% endif %} {% if application.limitations != 'N/A' %}

Begränsningar av analysen: {{ application.tag }} diff --git a/cg/meta/report/templates/mip-dna_report.html b/cg/meta/report/templates/mip-dna_report.html index 07a82e3a9c..f323922573 100644 --- a/cg/meta/report/templates/mip-dna_report.html +++ b/cg/meta/report/templates/mip-dna_report.html @@ -232,6 +232,9 @@

Teknisk beskrivning av analysen: {{ application.tag }}

{{ application.description }}

+ {% if application.details != 'N/A' %} +

{{ application.details }}

+ {% endif %} {% if application.limitations != 'N/A' %}

Begränsningar av analysen: {{ application.tag }} diff --git a/cg/meta/report/templates/rnafusion_report.html b/cg/meta/report/templates/rnafusion_report.html index ccd4eb1a4e..f9f9c9c488 100644 --- a/cg/meta/report/templates/rnafusion_report.html +++ b/cg/meta/report/templates/rnafusion_report.html @@ -233,6 +233,9 @@

Teknisk beskrivning av analysen: {{ application.tag }}

{{ application.description }}

+ {% if application.details != 'N/A' %} +

{{ application.details }}

+ {% endif %} {% if application.limitations != 'N/A' %}

Begränsningar av analysen: {{ application.tag }} diff --git a/cg/models/report/sample.py b/cg/models/report/sample.py index adedbe223b..e969f467eb 100644 --- a/cg/models/report/sample.py +++ b/cg/models/report/sample.py @@ -37,6 +37,7 @@ class ApplicationModel(BaseModel): version: Annotated[str, BeforeValidator(get_report_string)] = NA_FIELD prep_category: Annotated[str, BeforeValidator(get_prep_category_as_string)] = NA_FIELD description: Annotated[str, BeforeValidator(get_report_string)] = NA_FIELD + details: Annotated[str, BeforeValidator(get_report_string)] = NA_FIELD limitations: Annotated[str, BeforeValidator(get_report_string)] = NA_FIELD pipeline_limitations: Annotated[str, BeforeValidator(get_report_string)] = NA_FIELD accredited: Optional[bool] = None