Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion chord_metadata_service/chord/ingest/phenopackets.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def get_or_create_interpretation_diagnosis(
interpretation_id = interpretation.get("id")
diag_obj, created = pm.Diagnosis.objects.get_or_create(
id=interpretation_id,
disease=diagnosis.get("disease", {}),
disease=diagnosis["disease"],
extra_properties=remove_computed_properties(diagnosis.get("extra_properties", {})),
)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 5.2.10 on 2026-01-16 20:11

import chord_metadata_service.restapi.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('phenopackets', '0016_biosample_fts_extra_phenopacket_fts_extra'),
]

operations = [
migrations.AlterField(
model_name='diagnosis',
name='disease',
field=models.JSONField(validators=[chord_metadata_service.restapi.validators.JsonSchemaValidator(formats=None, schema_ref='ONTOLOGY_CLASS')]),
),
]
2 changes: 1 addition & 1 deletion chord_metadata_service/phenopackets/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ class Diagnosis(BaseTimeStamp, ToFTSReprMixin):
"""
id = models.CharField(primary_key=True, max_length=200,
help_text="Unique ID, uses the parent Interpretation's id when ingesting.")
disease = models.JSONField(null=True, blank=True, validators=[ontology_validator])
disease = models.JSONField(validators=[ontology_validator])
genomic_interpretations = models.ManyToManyField(
GenomicInterpretation, blank=True,
help_text='The genomic elements assessed as being responsible for the disease.')
Expand Down