Skip to content

Commit c7d5924

Browse files
committed
Comments
1 parent f4928c5 commit c7d5924

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

delta_backend/src/FHIRParser.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,21 @@ class FHIRParser:
1010
def parseFHIRData(self, fhirData):
1111
self.FHIRFile = json.loads(fhirData) if isinstance(fhirData, str) else fhirData
1212

13+
1314
def _validate_expression_rule(self, expression_type, expression_rule, key_value_pair):
15+
"""
16+
Applies expression rules for filtering key-value pairs during searches.
17+
18+
This method provides a flexible foundation for implementing various filtering
19+
or validation rules, enabling more dynamic and configurable search behavior.
20+
While it currently supports only SNOMED code validation, the structure opens
21+
the door to applying a wide range of expression rules in the future.
22+
23+
For example, when processing a list of items, this method helps determine
24+
which item(s) satisfy specific criteria based on the logic defined by the
25+
expression type and rule.
26+
"""
27+
1428
if not expression_rule:
1529
return True
1630

delta_backend/src/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
from stdnum.verhoeff import validate
33

44
def is_valid_simple_snomed(simple_snomed: str) -> bool:
5-
"check the snomed code valid or not."
5+
"""
6+
This utility is designed for reuse and should be packaged as part of a
7+
shared validation module or service.
8+
"""
69
min_snomed_length = 6
710
max_snomed_length = 18
811
try:

0 commit comments

Comments
 (0)