Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
ISKLIMS_PUT_LABORATORY_PARAMETER = "update-lab"
ISKLIMS_GET_SAMPLE_FIELDS = "sample-fields"
ISKLIMS_GET_SAMPLE_INFORMATION = ["sample-info", "sample"]
ISKLIMS_GET_SAMPLE_PROJECT_VALUES_BULK = ["sample-project-values-bulk"]
ISKLIMS_GET_SAMPLE_PARAMETER_INFORMATION = ["sample-info", "parameter"]
ISKLIMS_GET_SAMPLE_PROJECT_PARAMETER_INFORMATION = ["sample-info"]
ISKLIMS_GET_SAMPLE_PROJECT_FIELDS = ["projects-fields", "project"]
Expand Down
2 changes: 1 addition & 1 deletion core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def create_new_value(self, data):


class BioinfoAnalysisValue(models.Model):
value = models.CharField(max_length=400, null=True, blank=True)
value = models.CharField(max_length=1000, null=True, blank=True)
bioinfo_analysis_fieldID = models.ForeignKey(
BioinfoAnalysisField, on_delete=models.CASCADE
)
Expand Down
6 changes: 5 additions & 1 deletion core/static/core/custom/css/side_bar_menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
flex: 1 0 auto;
}

#wrapper #content-wrapper #content > .container-fluid > .row:first-child {
padding-top: 1.5rem;
}

/* Clases auxiliares */
.rounded-circle {
border-radius: 50% !important;
Expand Down Expand Up @@ -209,4 +213,4 @@
display: block;
font-size: 0.6rem;
margin-top: 0.25rem;
}
}
4 changes: 4 additions & 0 deletions core/static/core/main_style/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,10 @@ section {
padding: 135px 0 0;
}

.hero-animated > .container.position-relative {
max-width: min(96vw, 1500px);
}

.hero-animated h1 {
margin: 0 0 10px 0;
font-size: 48px;
Expand Down
493 changes: 477 additions & 16 deletions core/templates/core/searchSample.html

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions core/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,21 @@
core.views.search_sample_data,
name="search_sample_data",
),
path(
"searchSample/csv",
core.views.search_sample_csv,
name="search_sample_csv",
),
path(
"searchSample/surveillance-data",
core.views.search_sample_surveillance_data,
name="search_sample_surveillance_data",
),
path(
"searchSample/variants-long-table",
core.views.search_sample_variants_long_table,
name="search_sample_variants_long_table",
),
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
2 changes: 2 additions & 0 deletions core/utils/bioinfo_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def get_bio_analysis_stats_from_lab(
bio_stats["analized"] = (
core.models.DateUpdateState.objects.select_related("sampleID")
.filter(sampleID__pk__in=lab_samples, stateID__state__iexact="Bioinfo")
.values("sampleID")
.distinct()
.count()
)
bio_stats["received"] = (
Expand Down
13 changes: 13 additions & 0 deletions core/utils/rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,19 @@ def get_sample_information(sample_name):
return data["data"]


def get_sample_project_values_bulk(sample_names, fields=None):
"""Fetch selected iSkyLIMS project values for many samples in one request."""
query_data = {"samples": ",".join(sample_names)}
if fields:
query_data["fields"] = ",".join(fields)
data = create_get_api_instance(
core.config.ISKLIMS_GET_SAMPLE_PROJECT_VALUES_BULK, query_data
)
if "ERROR" in data:
return {"ERROR": data}
return data["data"]


def get_sample_parameter_data(param_data):
if isinstance(param_data, dict):
data = create_get_api_instance(
Expand Down
Loading
Loading