-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add: New converter for OWL to FHIR CodeSystem JON (WIP) - Add: Tests for new converter (WIP) Misc - Update: .gitignore: added: .DS_Store
- Loading branch information
Showing
3 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"""Convert OWL to FHIR CodeSystem JSON | ||
TODO's | ||
1. Write functioning converter | ||
2. Optional/Later: Schema mappings (Obograph -> FHIR CodeSystem). SchemaAutomator? Other approach? | ||
3. Add converter to CLI | ||
4. Test(s) | ||
todo's (minor) | ||
1. owl_to_fhir.py -> owl_to_fhir_codesystem.py? | ||
""" | ||
from typing import Dict | ||
|
||
|
||
def convert(inpath: str, outpath: str) -> Dict: | ||
"""Convert | ||
Side effects: | ||
- Writes file at `outpath`""" | ||
|
||
return {} | ||
|
||
|
||
if __name__ == '__main__': | ||
convert('path/to/mondo-example.owl') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"""Tests for OWL to FHIR CodeSystem converter.""" | ||
import unittest | ||
|
||
from oaklib.converters.owl_to_fhir import convert | ||
from tests import INPUT_DIR, OUTPUT_DIR | ||
|
||
|
||
ONT = INPUT_DIR / "mondo-example.owl" | ||
OUT = OUTPUT_DIR / "mondo-example.json" | ||
|
||
|
||
class OwlToFhirConversionTest(unittest.TestCase): | ||
"""Tests""" | ||
|
||
def test_convert(self): | ||
"""Tests basic conversion""" | ||
result = convert(ONT) | ||
self.assertTrue(result != True) # todo |