Skip to content

fix: resolve 3 bugs in common.py - #109

Open
haoyu-haoyu wants to merge 1 commit into
FHIR:mainfrom
haoyu-haoyu:fix/common-py-bugs
Open

fix: resolve 3 bugs in common.py#109
haoyu-haoyu wants to merge 1 commit into
FHIR:mainfrom
haoyu-haoyu:fix/common-py-bugs

Conversation

@haoyu-haoyu

Copy link
Copy Markdown

Summary

Three bugs fixed in app/common.py:

1. result = result no-op in exception handler (line ~1046)

get_intersected_regions() assigns result = result in the except block, which is a no-op. If the database query fails, result remains undefined, causing NameError at the subsequent if result: check.
Fix: result = []

2. Leading space in GRCh38 LOINC code (line ~89)

GENOMIC_BUILD_TO_CODE['GRCh38'] contains ' LA26806-2' with a leading space. This produces malformed FHIR observations.
Fix: Remove leading space → 'LA26806-2'

3. Function name typo: is_overlapingis_overlapping (line ~136)

Missing 'p' in 'overlapping'. Fixed in both the definition and all call sites.

1. get_intersected_regions: result = result (no-op) → result = []
   in exception handler, preventing NameError on query failure

2. GENOMIC_BUILD_TO_CODE: remove leading space from GRCh38 LOINC
   code ' LA26806-2' → 'LA26806-2'

3. is_overlaping() → is_overlapping() function name typo fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant