Skip to content

Commit

Permalink
Add primaryCode to MappableConcept (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
larrybabb authored Nov 15, 2024
1 parent 9831bdc commit 0f315ae
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/mappable-concept-gene.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
id: HGNC:1101
label: BRCA2
primaryCode: BRCA2
label: BRCA2 DNA repair associated
conceptType: Gene
mappings:
- coding:
code: HGNC:1101
Expand Down
5 changes: 5 additions & 0 deletions schema/gks-core/def/MappableConcept.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ Some MappableConcept attributes are inherited from :ref:`Element`.
- string
- 1..1
- A primary name for the concept.
* - primaryCode
-
- :ref:`code`
- 0..1
- A primary code for the concept that is used to identify the concept in a terminology or code system. If there is a public code system for the primaryCode then it should also be specified in the mappings array with a relation of 'exactMatch'. This attribute is provided to both allow a more technical code to be used when a public Coding with a system is not available as well as when it is available but should be identified as the primary code.
* - mappings
-
.. raw:: html
Expand Down
8 changes: 8 additions & 0 deletions schema/gks-core/gks-core-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ $defs:
label:
type: string
description: A primary name for the concept.
primaryCode:
$ref: "#/$defs/code"
description: >-
A primary code for the concept that is used to identify the concept in a terminology or code system.
If there is a public code system for the primaryCode then it should also be specified in the mappings
array with a relation of 'exactMatch'. This attribute is provided to both allow a more technical code
to be used when a public Coding with a system is not available as well as when it is available but
should be identified as the primary code.
mappings:
type: array
ordered: false
Expand Down
4 changes: 4 additions & 0 deletions schema/gks-core/json/MappableConcept
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"type": "string",
"description": "A primary name for the concept."
},
"primaryCode": {
"$ref": "/ga4gh/schema/gks-core/1.x/json/code",
"description": "A primary code for the concept that is used to identify the concept in a terminology or code system. If there is a public code system for the primaryCode then it should also be specified in the mappings array with a relation of 'exactMatch'. This attribute is provided to both allow a more technical code to be used when a public Coding with a system is not available as well as when it is available but should be identified as the primary code."
},
"mappings": {
"type": "array",
"ordered": false,
Expand Down

0 comments on commit 0f315ae

Please sign in to comment.