diff --git a/cg/models/orders/samples.py b/cg/models/orders/samples.py index 002cff01f6..0ee332ec0d 100644 --- a/cg/models/orders/samples.py +++ b/cg/models/orders/samples.py @@ -195,8 +195,12 @@ def str_to_int(cls, v: str) -> int | None: class PacBioSample(OrderInSample): _suitable_project = OrderType.PACBIO_LONG_READ - capture_kit: str | None = None + buffer: str + container: ContainerEnum + container_name: str | None = None sex: SexEnum = SexEnum.unknown + source: str + subject_id: str tumour: bool diff --git a/cg/services/orders/store_order_services/store_pacbio_order_service.py b/cg/services/orders/store_order_services/store_pacbio_order_service.py index 5425e38226..7df4e9c361 100644 --- a/cg/services/orders/store_order_services/store_pacbio_order_service.py +++ b/cg/services/orders/store_order_services/store_pacbio_order_service.py @@ -43,7 +43,6 @@ def order_to_status(order: OrderIn) -> dict: "samples": [ { "application": sample.application, - "capture_kit": sample.capture_kit, "comment": sample.comment, "data_analysis": sample.data_analysis, "data_delivery": sample.data_delivery, @@ -52,6 +51,7 @@ def order_to_status(order: OrderIn) -> dict: "sex": sample.sex, "tumour": sample.tumour, "volume": sample.volume, + "subject_id": sample.subject_id, } for sample in order.samples ], @@ -79,7 +79,7 @@ def _store_samples_in_statusdb( original_ticket=ticket_id, priority=sample["priority"], tumour=sample["tumour"], - capture_kit=sample["capture_kit"], + subject_id=sample["subject_id"], ) new_sample.customer = customer application_tag: str = sample["application"] diff --git a/tests/fixtures/cgweb_orders/pacbio.json b/tests/fixtures/cgweb_orders/pacbio.json index 7da4ec0f96..69ea4a7cab 100644 --- a/tests/fixtures/cgweb_orders/pacbio.json +++ b/tests/fixtures/cgweb_orders/pacbio.json @@ -17,7 +17,9 @@ "source": "blood", "tumour": false, "volume": "25", - "well_position": "" + "well_position": "", + "buffer": "Nuclease-free water", + "subject_id": "subject2" }, { "application": "WGSPCFC060", @@ -33,7 +35,9 @@ "source": "cell line", "tumour": true, "volume": "35", - "well_position": "" + "well_position": "", + "buffer": "Nuclease-free water", + "subject_id": "subject1" } ] } \ No newline at end of file diff --git a/tests/services/orders/test_validate_order_service/conftest.py b/tests/services/orders/test_validate_order_service/conftest.py index 13cc38f51c..27d2ae9d19 100644 --- a/tests/services/orders/test_validate_order_service/conftest.py +++ b/tests/services/orders/test_validate_order_service/conftest.py @@ -14,13 +14,16 @@ def pacbio_sample() -> PacBioSample: return PacBioSample( application="WGSPCFC060", - capture_kit=None, data_analysis=Workflow.RAW_DATA, data_delivery=DataDelivery.NO_DELIVERY, name="PacbioSample", sex=SexEnum.unknown, tumour=False, volume="50", + buffer="buffer", + source="source", + subject_id="subject_id", + container="Tube", )