diff --git a/cg/services/orders/lims_service/service.py b/cg/services/orders/lims_service/service.py index 299f6300d8..28d5c255e5 100644 --- a/cg/services/orders/lims_service/service.py +++ b/cg/services/orders/lims_service/service.py @@ -15,7 +15,11 @@ def __init__(self, lims_api: LimsAPI): @staticmethod def _build_lims_sample( - customer: str, samples: list[Sample], workflow: Workflow, delivery_type: DataDelivery + customer: str, + samples: list[Sample], + workflow: Workflow, + delivery_type: DataDelivery, + skip_reception_control: bool, ) -> list[LimsSample]: """Convert order input to LIMS interface input.""" samples_lims = [] @@ -26,6 +30,8 @@ def _build_lims_sample( dict_sample["data_analysis"] = workflow dict_sample["data_delivery"] = delivery_type dict_sample["family_name"] = sample._case_name + if skip_reception_control: + dict_sample["skip_reception_control"] = True lims_sample: LimsSample = LimsSample.parse_obj(dict_sample) samples_lims.append(lims_sample) return samples_lims @@ -38,10 +44,15 @@ def process_lims( order_name: str, workflow: Workflow, delivery_type: DataDelivery, + skip_reception_control: bool, ) -> tuple[any, dict]: """Process samples to add them to LIMS.""" samples_lims: list[LimsSample] = self._build_lims_sample( - customer=customer, samples=samples, workflow=workflow, delivery_type=delivery_type + customer=customer, + samples=samples, + workflow=workflow, + delivery_type=delivery_type, + skip_reception_control=skip_reception_control, ) project_name: str = str(ticket) or order_name # Create new lims project diff --git a/cg/services/orders/storing/implementations/case_order_service.py b/cg/services/orders/storing/implementations/case_order_service.py index ba604dd636..f2f8808a19 100644 --- a/cg/services/orders/storing/implementations/case_order_service.py +++ b/cg/services/orders/storing/implementations/case_order_service.py @@ -51,6 +51,7 @@ def store_order(self, order: OrderWithCases) -> dict: order_name=order.name, workflow=ORDER_TYPE_WORKFLOW_MAP[order.order_type], delivery_type=order.delivery_type, + skip_reception_control=order.skip_reception_control, ) if lims_map: self._fill_in_sample_ids(samples=new_samples, lims_map=lims_map) diff --git a/cg/services/orders/storing/implementations/fastq_order_service.py b/cg/services/orders/storing/implementations/fastq_order_service.py index bec8a48dd8..ea6df4656b 100644 --- a/cg/services/orders/storing/implementations/fastq_order_service.py +++ b/cg/services/orders/storing/implementations/fastq_order_service.py @@ -33,6 +33,7 @@ def store_order(self, order: FastqOrder) -> dict: workflow=Workflow.RAW_DATA, customer=order.customer, delivery_type=DataDelivery(order.delivery_type), + skip_reception_control=order.skip_reception_control, ) self._fill_in_sample_ids(samples=order.samples, lims_map=lims_map) new_samples: list[Sample] = self.store_order_data_in_status_db(order=order) diff --git a/cg/services/orders/storing/implementations/metagenome_order_service.py b/cg/services/orders/storing/implementations/metagenome_order_service.py index 5fb318e882..325a049c5a 100644 --- a/cg/services/orders/storing/implementations/metagenome_order_service.py +++ b/cg/services/orders/storing/implementations/metagenome_order_service.py @@ -39,6 +39,7 @@ def store_order(self, order: OrderMetagenome) -> dict: order_name=order.name, workflow=ORDER_TYPE_WORKFLOW_MAP[order.order_type], delivery_type=DataDelivery(order.delivery_type), + skip_reception_control=order.skip_reception_control, ) self._fill_in_sample_ids(samples=order.samples, lims_map=lims_map) new_samples = self.store_order_data_in_status_db(order) diff --git a/cg/services/orders/storing/implementations/microbial_fastq_order_service.py b/cg/services/orders/storing/implementations/microbial_fastq_order_service.py index 4682259895..69dd9cdfdd 100644 --- a/cg/services/orders/storing/implementations/microbial_fastq_order_service.py +++ b/cg/services/orders/storing/implementations/microbial_fastq_order_service.py @@ -28,6 +28,7 @@ def store_order(self, order: MicrobialFastqOrder) -> dict: workflow=Workflow.RAW_DATA, customer=order.customer, delivery_type=DataDelivery(order.delivery_type), + skip_reception_control=order.skip_reception_control, ) self._fill_in_sample_ids(samples=order.samples, lims_map=lims_map) new_samples: list[Sample] = self.store_order_data_in_status_db(order=order) diff --git a/cg/services/orders/storing/implementations/microbial_order_service.py b/cg/services/orders/storing/implementations/microbial_order_service.py index 057c5dd9f7..4922db7146 100644 --- a/cg/services/orders/storing/implementations/microbial_order_service.py +++ b/cg/services/orders/storing/implementations/microbial_order_service.py @@ -44,6 +44,7 @@ def store_order(self, order: MicrobialOrder) -> dict: order_name=order.name, workflow=ORDER_TYPE_WORKFLOW_MAP[order.order_type], delivery_type=DataDelivery(order.delivery_type), + skip_reception_control=order.skip_reception_control, ) self._fill_in_sample_ids(samples=order.samples, lims_map=lims_map) diff --git a/cg/services/orders/storing/implementations/pacbio_order_service.py b/cg/services/orders/storing/implementations/pacbio_order_service.py index fbb1016c30..536a03b124 100644 --- a/cg/services/orders/storing/implementations/pacbio_order_service.py +++ b/cg/services/orders/storing/implementations/pacbio_order_service.py @@ -30,6 +30,7 @@ def store_order(self, order: PacbioOrder) -> dict: workflow=Workflow.RAW_DATA, customer=order.customer, delivery_type=DataDelivery(order.delivery_type), + skip_reception_control=order.skip_reception_control, ) self._fill_in_sample_ids(samples=order.samples, lims_map=lims_map) new_samples = self.store_order_data_in_status_db(order=order) diff --git a/cg/services/orders/storing/implementations/pool_order_service.py b/cg/services/orders/storing/implementations/pool_order_service.py index 0d6fa1da54..dd6b59f8d5 100644 --- a/cg/services/orders/storing/implementations/pool_order_service.py +++ b/cg/services/orders/storing/implementations/pool_order_service.py @@ -33,6 +33,7 @@ def store_order(self, order: OrderWithIndexedSamples) -> dict: order_name=order.name, workflow=ORDER_TYPE_WORKFLOW_MAP[order.order_type], delivery_type=order.delivery_type, + skip_reception_control=order.skip_reception_control, ) self._fill_in_sample_ids(samples=order.samples, lims_map=lims_map) new_records: list[Pool] = self.store_order_data_in_status_db(order=order)