Skip to content
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.15

- Add compliance_params (fhirCore, fhirUrl, fhirResource) as operation parameter

## 0.1.14

- Fix db innitialization crash for fhirschema
Expand Down
2 changes: 1 addition & 1 deletion aidbox_python_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = "aidbox-python-sdk"
__version__ = "0.1.14"
__version__ = "0.1.15"
__author__ = "beda.software"
__license__ = "None"
__copyright__ = "Copyright 2024 beda.software"
Expand Down
3 changes: 3 additions & 0 deletions aidbox_python_sdk/sdk.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import asyncio
import logging
from typing import Dict, Any, Optional

import jsonschema
from fhirpy.base.exceptions import OperationOutcome
Expand Down Expand Up @@ -151,6 +152,7 @@ def operation( # noqa: PLR0913
access_policy=None,
request_schema=None,
timeout=None,
compliance_params: Optional[Dict[str, Any]] = None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's name it compliance.

Use https://peps.python.org/pep-0589/ to define required keys in the dict.

):
if public and access_policy is not None:
raise ValueError("Operation might be public or have access policy, not both")
Expand Down Expand Up @@ -184,6 +186,7 @@ def wrapped_func(operation, request):
"method": method,
"path": path,
**({"timeout": timeout} if timeout else {}),
**(compliance_params if compliance_params else {}),
}
self._operation_handlers[operation_id] = wrapped_func
if public is True:
Expand Down