Skip to content

Commit

Permalink
Remove unused check_fhir_type function
Browse files Browse the repository at this point in the history
  • Loading branch information
atuonufure committed Jan 12, 2024
1 parent 3e5fbde commit 6458e70
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions fhirpathpy/engine/invocations/filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,25 +113,6 @@ def skip_fn(ctx, x, n):
return x[int(n) :]


def check_fhir_type(ctx, x, tp):
if tp == "string" and isinstance(x, str):
return True

if tp == "boolean" and isinstance(x, bool):
return True

if tp == "object":
return isinstance(x, dict)

if tp == "integer" and isinstance(x, int) and not isinstance(x, bool):
return True

if tp == "decimal" and isinstance(x, Decimal):
return True

return False


def of_type_fn(ctx, coll, tp):
return [value for value in coll if nodes.TypeInfo.from_value(value).is_(tp)]

Expand Down

0 comments on commit 6458e70

Please sign in to comment.