Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse new concentration field #2740

Merged
merged 13 commits into from
Dec 20, 2023
1 change: 1 addition & 0 deletions cg/models/orders/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class ExcelSampleAliases(StrEnum):
COLLECTION_DATE = "UDF/Collection Date"
COMMENT = "UDF/Comment"
CONCENTRATION = "UDF/Concentration (nM)"
CONCENTRATION_NG_UL = "UDF/Concentration (ng/ul)"
CONCENTRATION_SAMPLE = "UDF/Sample Conc."
CONTAINER = "Container/Type"
CONTAINER_NAME = "Container/Name"
Expand Down
1 change: 1 addition & 0 deletions cg/models/orders/excel_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ExcelSample(OrderSample):
concentration: Annotated[str, AfterValidator(numeric_value)] = Field(
None, alias=ExcelSampleAliases.CONCENTRATION
)
concentration_ng_ul: str = Field(None, alias=ExcelSampleAliases.CONCENTRATION_NG_UL)
islean marked this conversation as resolved.
Show resolved Hide resolved
concentration_sample: Annotated[str, AfterValidator(numeric_value)] = Field(
None, alias=ExcelSampleAliases.CONCENTRATION_SAMPLE
)
Expand Down
1 change: 1 addition & 0 deletions cg/models/orders/json_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
class JsonSample(OrderSample):
cohorts: list[str] | None = None
concentration: str | None = None
concentration_ng_ul: str | None = None
concentration_sample: str | None = None
control: str | None = None
data_analysis: Pipeline = Pipeline.MIP_DNA
Expand Down
1 change: 1 addition & 0 deletions cg/models/orders/sample_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class OrderSample(BaseModel):
collection_date: str | None = None
comment: constr(max_length=Sample.comment.property.columns[0].type.length) | None = None
concentration: float | None = None
concentration_ng_ul: float | None = None
concentration_sample: float | None = None
container: ContainerEnum | None = None
container_name: str | None = None
Expand Down
Loading