-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐣 Issue #2 add supports for ´:below´ modifier and ´sa´ prefix. along …
…side some bugs are fixes. tests coverage added.
- Loading branch information
1 parent
bca2f5a
commit 3988d7a
Showing
12 changed files
with
155 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# _*_ coding: utf-8 _*_ | ||
from fhirpath.enums import OPERATOR | ||
|
||
from fhirpath.interfaces.fql import IGroupTerm | ||
from fhirpath.interfaces.fql import ITerm | ||
from fhirpath.types import EMPTY_VALUE | ||
|
@@ -15,6 +14,7 @@ | |
from .types import Term | ||
from .types import TermValue | ||
|
||
|
||
__author__ = "Md Nazrul Islam <[email protected]>" | ||
|
||
__all__ = [ | ||
|
@@ -37,11 +37,7 @@ | |
# API functions | ||
def T_(path, value=EMPTY_VALUE, match_type=None, non_fhir=False): # noqa: E302 | ||
""" """ | ||
params = { | ||
"path": path, | ||
"value": value, | ||
"match_type": match_type | ||
} | ||
params = {"path": path, "value": value, "match_type": match_type} | ||
if non_fhir is False: | ||
term = Term(**params) | ||
else: | ||
|
@@ -145,6 +141,20 @@ def not_in_(path, values): | |
return not_(in_(path, values)) | ||
|
||
|
||
def sa_(path, value=EMPTY_VALUE): | ||
""" """ | ||
term_or_group = _prepare_term_or_group(path, value) | ||
term_or_group.comparison_operator = OPERATOR.sa | ||
return term_or_group | ||
|
||
|
||
def eb_(path, value=EMPTY_VALUE): | ||
""" """ | ||
term_or_group = _prepare_term_or_group(path, value) | ||
term_or_group.comparison_operator = OPERATOR.eb | ||
return term_or_group | ||
|
||
|
||
def sort_(path, order=EMPTY_VALUE): | ||
""" """ | ||
sort_term = SortTerm(path) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# _*_ coding: utf-8 _*_ | ||
"""Basically here things are copied from various open source projects""" | ||
from .peewee import Proxy # noqa: 401 | ||
from .peewee import attrdict # noqa: 401 | ||
from .plone_api_validation import InvalidParameterError # noqa: 401 | ||
from .plone_api_validation import MissingParameterError # noqa: 401 | ||
from .plone_api_validation import at_least_one_of # noqa: 401 | ||
from .plone_api_validation import mutually_exclusive_parameters # noqa: 401 | ||
from .plone_api_validation import required_parameters # noqa: 401 | ||
from .peewee import attrdict # noqa: 401 | ||
from .peewee import Proxy # noqa: 401 | ||
from .werkzeug import ImmutableDict # noqa: 401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.