Skip to content

Commit 3622225

Browse files
authored
Fix deprecation warnings of fhir-py
1 parent eb03cbc commit 3622225

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

aidbox_python_sdk/aidboxpy.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,12 @@ class AsyncAidboxReference(BaseAidboxReference, AsyncReference):
109109

110110

111111
class SyncAidboxClient(SyncClient):
112-
searchset_class = SyncAidboxSearchSet
113-
resource_class = SyncAidboxResource
114-
112+
def resource(self, resource_type, **kwargs):
113+
return SyncAidboxResource(self, resource_type, **kwargs)
114+
115+
def resources(self, resource_type):
116+
return SyncAidboxSearchSet(self, resource_type)
117+
115118
def reference(self, resource_type=None, id=None, reference=None, **kwargs): # noqa: A002
116119
resource_type = kwargs.pop("resourceType", resource_type)
117120
if reference:
@@ -124,8 +127,11 @@ def reference(self, resource_type=None, id=None, reference=None, **kwargs): # n
124127

125128

126129
class AsyncAidboxClient(AsyncClient):
127-
searchset_class = AsyncAidboxSearchSet
128-
resource_class = AsyncAidboxResource
130+
def resource(self, resource_type, **kwargs):
131+
return AsyncAidboxResource(self, resource_type, **kwargs)
132+
133+
def resources(self, resource_type):
134+
return AsyncAidboxSearchSet(self, resource_type)
129135

130136
def reference(self, resource_type=None, id=None, reference=None, **kwargs): # noqa: A002
131137
resource_type = kwargs.pop("resourceType", resource_type)

0 commit comments

Comments
 (0)