diff --git a/civicpy/exports/civic_gks_record.py b/civicpy/exports/civic_gks_record.py index b9d0eba..8ab5058 100644 --- a/civicpy/exports/civic_gks_record.py +++ b/civicpy/exports/civic_gks_record.py @@ -634,7 +634,20 @@ def get_allele_origin_qualifier(record: Evidence | Assertion) -> MappableConcept return MappableConcept( name=VARIANT_ORIGIN_TO_ALLELE_ORIGIN[variant_origin], - extensions=[Extension(name="civic_variant_origin", value=variant_origin)], + mappings=[ + ConceptMapping( + coding=Coding( + code=variant_origin, + system="CIViC Knowledgebase", + iris=[ + iriReference( + root="https://civic.readthedocs.io/en/latest/model/evidence/origin.html" + ) + ], + ), + relation=Relation.EXACT_MATCH, + ) + ], ) @staticmethod diff --git a/civicpy/tests/test_exports.py b/civicpy/tests/test_exports.py index 2739d52..9f0a38c 100644 --- a/civicpy/tests/test_exports.py +++ b/civicpy/tests/test_exports.py @@ -368,7 +368,18 @@ def gks_therapeutic_proposition(gks_mpid33, gks_gid19, gks_tid146, gks_did8): "geneContextQualifier": gks_gid19, "alleleOriginQualifier": { "name": "somatic", - "extensions": [{"name": "civic_variant_origin", "value": "SOMATIC"}], + "mappings": [ + { + "coding": { + "code": "SOMATIC", + "system": "CIViC Knowledgebase", + "iris": [ + "https://civic.readthedocs.io/en/latest/model/evidence/origin.html" + ], + }, + "relation": "exactMatch", + } + ], }, "predicate": "predictsSensitivityTo", "objectTherapeutic": gks_tid146,