Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ test = ["pytest==8.4.1"]
minversion = "6.0"
testpaths = ["tests"]
python_files = ["tests.py"]
pythonpath = [
"."
]

[tool.uv.build-backend]
module-name = "sqlonfhir"
Expand Down
8 changes: 1 addition & 7 deletions sqlonfhir/sqlonfhir.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
from fhirpathpy.models import models


def upper_first(string):
return string[:1].upper() + string[1:]


# This is here to change identified.ofType(boolean) to identifiedBoolean.ofType(boolean)
# This function should be replaced at some point as fhirpathpy and the SQL on FHIR specifications converge
def escape_path(path):
Expand Down Expand Up @@ -204,9 +200,7 @@ def move_functions(view, function, sub_functions):


def replace_constants(path, view_definition):
if "constant" not in view_definition:
return path
for constant in view_definition["constant"]:
for constant in view_definition.get("constant") or []:
value_key = [vk for vk in constant.keys() if vk.startswith("value")]
if "valueBoolean" in constant:
path = path.replace(
Expand Down