diff --git a/civicpy/exports/civic_gks_record.py b/civicpy/exports/civic_gks_record.py index 3146e73..a3d055b 100644 --- a/civicpy/exports/civic_gks_record.py +++ b/civicpy/exports/civic_gks_record.py @@ -640,7 +640,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="https://civicdb.org", + 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 cf9c86a..41f23f3 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": "https://civicdb.org", + "iris": [ + "https://civic.readthedocs.io/en/latest/model/evidence/origin.html" + ], + }, + "relation": "exactMatch", + } + ], }, "predicate": "predictsSensitivityTo", "objectTherapeutic": gks_tid146,