File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
lambdas/shared/src/common/validator/lookup_expressions Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 1- # --------------------------------------------------------------------------------------------------------
2- # main conversion lookup
1+ """
2+ Provides human-readable descriptions for coded values such as SNOMED codes.
3+ For LOOKUP expressions to return the text meaning of a code
4+ (e.g., "368208006" -> "Left upper arm structure").
5+
6+ Example:
7+ >>> lookup = LookUpData()
8+ >>> lookup.find_lookup("368208006")
9+ 'Left upper arm structure'
10+ """
311
412
513class LookUpData :
@@ -9,7 +17,7 @@ class LookUpData:
917
1018 # data settings
1119 def __init__ (self ):
12- self .all_data = {
20+ self .all_data : dict [ str , str ] = {
1321 "368208006" : "Left upper arm structure" ,
1422 "279549004" : "Nasal cavity structure" ,
1523 "74262004" : "Oral cavity structure" ,
@@ -105,7 +113,7 @@ def __init__(self):
105113 }
106114
107115 # Look up the term for the code
108- def find_lookup (self , field_value ) :
116+ def find_lookup (self , field_value : str ) -> str :
109117 try :
110118 lookup_value = self .all_data [field_value ]
111119 except Exception :
You can’t perform that action at this time.
0 commit comments