From edc2e860e828b06f69e84871461c2dfb68fb85d0 Mon Sep 17 00:00:00 2001 From: joeflack4 Date: Sat, 7 Oct 2023 14:27:03 -0400 Subject: [PATCH] 1.0.2 - Bugfix: Special RxNorm BioPortal operations made much more explicit via parameter. Previous logic was handling other instances of RxNorm. --- owl_on_fhir/__main__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/owl_on_fhir/__main__.py b/owl_on_fhir/__main__.py index 9133763..d4b5617 100644 --- a/owl_on_fhir/__main__.py +++ b/owl_on_fhir/__main__.py @@ -199,9 +199,11 @@ def owl_to_fhir( retain_intermediaries=False, intermediary_type=['obographs', 'semsql'][0], use_cached_intermediaries=False, intermediary_outdir: str = None, convert_intermediaries_only=False, native_uri_stems: List[str] = None, code_system_id: str = None, code_system_url: str = None, dev_oak_path: str = None, - dev_oak_interpreter_path: str = None + dev_oak_interpreter_path: str = None, rxnorm_bioportal=False ) -> str: - """Run conversion""" + """Run conversion + + :param rxnorm_bioportal: Special custom case. Set True if the file being processed is RxNorm.ttl from BioPortal.""" include_all_predicates = not include_only_critical_predicates if not os.path.exists(CACHE_DIR): @@ -233,7 +235,7 @@ def owl_to_fhir( intermediary_outdir = intermediary_outdir if intermediary_outdir else out_dir # Preprocessing: Special cases - if 'rxnorm' in input_path.lower() or 'rxnorm' in out_filename.lower(): + if rxnorm_bioportal: input_path = _preprocess_rxnorm(input_path) # Convert