phenoml 0.0.8__py3-none-any.whl → 0.0.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- phenoml/agent/client.py +38 -2
- phenoml/agent/raw_client.py +24 -0
- phenoml/client.py +4 -4
- phenoml/construe/__init__.py +2 -16
- phenoml/construe/client.py +0 -90
- phenoml/construe/raw_client.py +0 -180
- phenoml/construe/types/__init__.py +2 -20
- phenoml/construe/types/extract_request_config.py +33 -4
- phenoml/construe/types/extract_request_config_chunking_method.py +3 -1
- phenoml/construe/types/extract_request_config_validation_method.py +5 -0
- phenoml/construe/types/extract_request_system.py +2 -0
- phenoml/core/client_wrapper.py +8 -10
- phenoml/fhir/client.py +116 -14
- phenoml/fhir/raw_client.py +84 -0
- phenoml/fhir_provider/__init__.py +2 -0
- phenoml/fhir_provider/client.py +21 -4
- phenoml/fhir_provider/raw_client.py +23 -6
- phenoml/fhir_provider/types/__init__.py +2 -0
- phenoml/fhir_provider/types/auth_method.py +1 -1
- phenoml/fhir_provider/types/role.py +27 -0
- phenoml/tools/client.py +112 -6
- phenoml/tools/raw_client.py +82 -2
- {phenoml-0.0.8.dist-info → phenoml-0.0.10.dist-info}/METADATA +1 -1
- {phenoml-0.0.8.dist-info → phenoml-0.0.10.dist-info}/RECORD +26 -32
- phenoml/construe/types/bad_request_error_body.py +0 -27
- phenoml/construe/types/construe_cohort_request_config.py +0 -37
- phenoml/construe/types/construe_cohort_response.py +0 -33
- phenoml/construe/types/construe_cohort_response_queries_item.py +0 -49
- phenoml/construe/types/construe_cohort_response_queries_item_code_extract_results_item.py +0 -31
- phenoml/construe/types/construe_cohort_response_queries_item_code_extract_results_item_codes_item.py +0 -32
- phenoml/construe/types/internal_server_error_body.py +0 -27
- phenoml/construe/types/unauthorized_error_body.py +0 -27
- {phenoml-0.0.8.dist-info → phenoml-0.0.10.dist-info}/LICENSE +0 -0
- {phenoml-0.0.8.dist-info → phenoml-0.0.10.dist-info}/WHEEL +0 -0
phenoml/fhir/raw_client.py
CHANGED
|
@@ -36,6 +36,7 @@ class RawFhirClient:
|
|
|
36
36
|
*,
|
|
37
37
|
query_parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
|
|
38
38
|
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
39
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
39
40
|
request_options: typing.Optional[RequestOptions] = None,
|
|
40
41
|
) -> HttpResponse[FhirSearchResponse]:
|
|
41
42
|
"""
|
|
@@ -66,6 +67,11 @@ class RawFhirClient:
|
|
|
66
67
|
|
|
67
68
|
phenoml_on_behalf_of : typing.Optional[str]
|
|
68
69
|
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
70
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
71
|
+
|
|
72
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
73
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
74
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
69
75
|
|
|
70
76
|
request_options : typing.Optional[RequestOptions]
|
|
71
77
|
Request-specific configuration.
|
|
@@ -83,6 +89,7 @@ class RawFhirClient:
|
|
|
83
89
|
},
|
|
84
90
|
headers={
|
|
85
91
|
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
92
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
86
93
|
},
|
|
87
94
|
request_options=request_options,
|
|
88
95
|
)
|
|
@@ -152,6 +159,7 @@ class RawFhirClient:
|
|
|
152
159
|
*,
|
|
153
160
|
resource_type: str,
|
|
154
161
|
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
162
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
155
163
|
id: typing.Optional[str] = OMIT,
|
|
156
164
|
meta: typing.Optional[FhirResourceMeta] = OMIT,
|
|
157
165
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -180,6 +188,11 @@ class RawFhirClient:
|
|
|
180
188
|
|
|
181
189
|
phenoml_on_behalf_of : typing.Optional[str]
|
|
182
190
|
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
191
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
192
|
+
|
|
193
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
194
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
195
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
183
196
|
|
|
184
197
|
id : typing.Optional[str]
|
|
185
198
|
Logical ID of the resource
|
|
@@ -208,6 +221,7 @@ class RawFhirClient:
|
|
|
208
221
|
headers={
|
|
209
222
|
"content-type": "application/fhir+json",
|
|
210
223
|
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
224
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
211
225
|
},
|
|
212
226
|
request_options=request_options,
|
|
213
227
|
omit=OMIT,
|
|
@@ -267,6 +281,7 @@ class RawFhirClient:
|
|
|
267
281
|
*,
|
|
268
282
|
resource_type: str,
|
|
269
283
|
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
284
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
270
285
|
id: typing.Optional[str] = OMIT,
|
|
271
286
|
meta: typing.Optional[FhirResourceMeta] = OMIT,
|
|
272
287
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -295,6 +310,11 @@ class RawFhirClient:
|
|
|
295
310
|
|
|
296
311
|
phenoml_on_behalf_of : typing.Optional[str]
|
|
297
312
|
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
313
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
314
|
+
|
|
315
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
316
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
317
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
298
318
|
|
|
299
319
|
id : typing.Optional[str]
|
|
300
320
|
Logical ID of the resource
|
|
@@ -323,6 +343,7 @@ class RawFhirClient:
|
|
|
323
343
|
headers={
|
|
324
344
|
"content-type": "application/fhir+json",
|
|
325
345
|
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
346
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
326
347
|
},
|
|
327
348
|
request_options=request_options,
|
|
328
349
|
omit=OMIT,
|
|
@@ -381,6 +402,7 @@ class RawFhirClient:
|
|
|
381
402
|
fhir_path: str,
|
|
382
403
|
*,
|
|
383
404
|
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
405
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
384
406
|
request_options: typing.Optional[RequestOptions] = None,
|
|
385
407
|
) -> HttpResponse[typing.Dict[str, typing.Optional[typing.Any]]]:
|
|
386
408
|
"""
|
|
@@ -404,6 +426,11 @@ class RawFhirClient:
|
|
|
404
426
|
|
|
405
427
|
phenoml_on_behalf_of : typing.Optional[str]
|
|
406
428
|
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
429
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
430
|
+
|
|
431
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
432
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
433
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
407
434
|
|
|
408
435
|
request_options : typing.Optional[RequestOptions]
|
|
409
436
|
Request-specific configuration.
|
|
@@ -418,6 +445,7 @@ class RawFhirClient:
|
|
|
418
445
|
method="DELETE",
|
|
419
446
|
headers={
|
|
420
447
|
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
448
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
421
449
|
},
|
|
422
450
|
request_options=request_options,
|
|
423
451
|
)
|
|
@@ -487,6 +515,7 @@ class RawFhirClient:
|
|
|
487
515
|
*,
|
|
488
516
|
request: typing.Sequence[FhirPatchRequestBodyItem],
|
|
489
517
|
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
518
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
490
519
|
request_options: typing.Optional[RequestOptions] = None,
|
|
491
520
|
) -> HttpResponse[FhirResource]:
|
|
492
521
|
"""
|
|
@@ -517,6 +546,11 @@ class RawFhirClient:
|
|
|
517
546
|
|
|
518
547
|
phenoml_on_behalf_of : typing.Optional[str]
|
|
519
548
|
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
549
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
550
|
+
|
|
551
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
552
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
553
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
520
554
|
|
|
521
555
|
request_options : typing.Optional[RequestOptions]
|
|
522
556
|
Request-specific configuration.
|
|
@@ -535,6 +569,7 @@ class RawFhirClient:
|
|
|
535
569
|
headers={
|
|
536
570
|
"content-type": "application/json-patch+json",
|
|
537
571
|
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
572
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
538
573
|
},
|
|
539
574
|
request_options=request_options,
|
|
540
575
|
omit=OMIT,
|
|
@@ -604,6 +639,7 @@ class RawFhirClient:
|
|
|
604
639
|
*,
|
|
605
640
|
entry: typing.Sequence[FhirBundleEntryItem],
|
|
606
641
|
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
642
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
607
643
|
total: typing.Optional[int] = OMIT,
|
|
608
644
|
request_options: typing.Optional[RequestOptions] = None,
|
|
609
645
|
) -> HttpResponse[FhirBundle]:
|
|
@@ -626,6 +662,11 @@ class RawFhirClient:
|
|
|
626
662
|
|
|
627
663
|
phenoml_on_behalf_of : typing.Optional[str]
|
|
628
664
|
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
665
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
666
|
+
|
|
667
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
668
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
669
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
629
670
|
|
|
630
671
|
total : typing.Optional[int]
|
|
631
672
|
Total number of resources that match the search criteria.
|
|
@@ -652,6 +693,7 @@ class RawFhirClient:
|
|
|
652
693
|
headers={
|
|
653
694
|
"content-type": "application/fhir+json",
|
|
654
695
|
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
696
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
655
697
|
},
|
|
656
698
|
request_options=request_options,
|
|
657
699
|
omit=OMIT,
|
|
@@ -716,6 +758,7 @@ class AsyncRawFhirClient:
|
|
|
716
758
|
*,
|
|
717
759
|
query_parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
|
|
718
760
|
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
761
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
719
762
|
request_options: typing.Optional[RequestOptions] = None,
|
|
720
763
|
) -> AsyncHttpResponse[FhirSearchResponse]:
|
|
721
764
|
"""
|
|
@@ -746,6 +789,11 @@ class AsyncRawFhirClient:
|
|
|
746
789
|
|
|
747
790
|
phenoml_on_behalf_of : typing.Optional[str]
|
|
748
791
|
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
792
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
793
|
+
|
|
794
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
795
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
796
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
749
797
|
|
|
750
798
|
request_options : typing.Optional[RequestOptions]
|
|
751
799
|
Request-specific configuration.
|
|
@@ -763,6 +811,7 @@ class AsyncRawFhirClient:
|
|
|
763
811
|
},
|
|
764
812
|
headers={
|
|
765
813
|
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
814
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
766
815
|
},
|
|
767
816
|
request_options=request_options,
|
|
768
817
|
)
|
|
@@ -832,6 +881,7 @@ class AsyncRawFhirClient:
|
|
|
832
881
|
*,
|
|
833
882
|
resource_type: str,
|
|
834
883
|
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
884
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
835
885
|
id: typing.Optional[str] = OMIT,
|
|
836
886
|
meta: typing.Optional[FhirResourceMeta] = OMIT,
|
|
837
887
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -860,6 +910,11 @@ class AsyncRawFhirClient:
|
|
|
860
910
|
|
|
861
911
|
phenoml_on_behalf_of : typing.Optional[str]
|
|
862
912
|
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
913
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
914
|
+
|
|
915
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
916
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
917
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
863
918
|
|
|
864
919
|
id : typing.Optional[str]
|
|
865
920
|
Logical ID of the resource
|
|
@@ -888,6 +943,7 @@ class AsyncRawFhirClient:
|
|
|
888
943
|
headers={
|
|
889
944
|
"content-type": "application/fhir+json",
|
|
890
945
|
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
946
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
891
947
|
},
|
|
892
948
|
request_options=request_options,
|
|
893
949
|
omit=OMIT,
|
|
@@ -947,6 +1003,7 @@ class AsyncRawFhirClient:
|
|
|
947
1003
|
*,
|
|
948
1004
|
resource_type: str,
|
|
949
1005
|
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
1006
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
950
1007
|
id: typing.Optional[str] = OMIT,
|
|
951
1008
|
meta: typing.Optional[FhirResourceMeta] = OMIT,
|
|
952
1009
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -975,6 +1032,11 @@ class AsyncRawFhirClient:
|
|
|
975
1032
|
|
|
976
1033
|
phenoml_on_behalf_of : typing.Optional[str]
|
|
977
1034
|
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
1035
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
1036
|
+
|
|
1037
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
1038
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
1039
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
978
1040
|
|
|
979
1041
|
id : typing.Optional[str]
|
|
980
1042
|
Logical ID of the resource
|
|
@@ -1003,6 +1065,7 @@ class AsyncRawFhirClient:
|
|
|
1003
1065
|
headers={
|
|
1004
1066
|
"content-type": "application/fhir+json",
|
|
1005
1067
|
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
1068
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
1006
1069
|
},
|
|
1007
1070
|
request_options=request_options,
|
|
1008
1071
|
omit=OMIT,
|
|
@@ -1061,6 +1124,7 @@ class AsyncRawFhirClient:
|
|
|
1061
1124
|
fhir_path: str,
|
|
1062
1125
|
*,
|
|
1063
1126
|
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
1127
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
1064
1128
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1065
1129
|
) -> AsyncHttpResponse[typing.Dict[str, typing.Optional[typing.Any]]]:
|
|
1066
1130
|
"""
|
|
@@ -1084,6 +1148,11 @@ class AsyncRawFhirClient:
|
|
|
1084
1148
|
|
|
1085
1149
|
phenoml_on_behalf_of : typing.Optional[str]
|
|
1086
1150
|
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
1151
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
1152
|
+
|
|
1153
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
1154
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
1155
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
1087
1156
|
|
|
1088
1157
|
request_options : typing.Optional[RequestOptions]
|
|
1089
1158
|
Request-specific configuration.
|
|
@@ -1098,6 +1167,7 @@ class AsyncRawFhirClient:
|
|
|
1098
1167
|
method="DELETE",
|
|
1099
1168
|
headers={
|
|
1100
1169
|
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
1170
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
1101
1171
|
},
|
|
1102
1172
|
request_options=request_options,
|
|
1103
1173
|
)
|
|
@@ -1167,6 +1237,7 @@ class AsyncRawFhirClient:
|
|
|
1167
1237
|
*,
|
|
1168
1238
|
request: typing.Sequence[FhirPatchRequestBodyItem],
|
|
1169
1239
|
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
1240
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
1170
1241
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1171
1242
|
) -> AsyncHttpResponse[FhirResource]:
|
|
1172
1243
|
"""
|
|
@@ -1197,6 +1268,11 @@ class AsyncRawFhirClient:
|
|
|
1197
1268
|
|
|
1198
1269
|
phenoml_on_behalf_of : typing.Optional[str]
|
|
1199
1270
|
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
1271
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
1272
|
+
|
|
1273
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
1274
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
1275
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
1200
1276
|
|
|
1201
1277
|
request_options : typing.Optional[RequestOptions]
|
|
1202
1278
|
Request-specific configuration.
|
|
@@ -1215,6 +1291,7 @@ class AsyncRawFhirClient:
|
|
|
1215
1291
|
headers={
|
|
1216
1292
|
"content-type": "application/json-patch+json",
|
|
1217
1293
|
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
1294
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
1218
1295
|
},
|
|
1219
1296
|
request_options=request_options,
|
|
1220
1297
|
omit=OMIT,
|
|
@@ -1284,6 +1361,7 @@ class AsyncRawFhirClient:
|
|
|
1284
1361
|
*,
|
|
1285
1362
|
entry: typing.Sequence[FhirBundleEntryItem],
|
|
1286
1363
|
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
1364
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
1287
1365
|
total: typing.Optional[int] = OMIT,
|
|
1288
1366
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1289
1367
|
) -> AsyncHttpResponse[FhirBundle]:
|
|
@@ -1306,6 +1384,11 @@ class AsyncRawFhirClient:
|
|
|
1306
1384
|
|
|
1307
1385
|
phenoml_on_behalf_of : typing.Optional[str]
|
|
1308
1386
|
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
1387
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
1388
|
+
|
|
1389
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
1390
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
1391
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
1309
1392
|
|
|
1310
1393
|
total : typing.Optional[int]
|
|
1311
1394
|
Total number of resources that match the search criteria.
|
|
@@ -1332,6 +1415,7 @@ class AsyncRawFhirClient:
|
|
|
1332
1415
|
headers={
|
|
1333
1416
|
"content-type": "application/fhir+json",
|
|
1334
1417
|
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
1418
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
1335
1419
|
},
|
|
1336
1420
|
request_options=request_options,
|
|
1337
1421
|
omit=OMIT,
|
|
@@ -15,6 +15,7 @@ from .types import (
|
|
|
15
15
|
FhirQueryResponseData,
|
|
16
16
|
JsonWebKey,
|
|
17
17
|
Provider,
|
|
18
|
+
Role,
|
|
18
19
|
ServiceAccountKey,
|
|
19
20
|
SmartConfiguration,
|
|
20
21
|
)
|
|
@@ -37,6 +38,7 @@ __all__ = [
|
|
|
37
38
|
"JsonWebKey",
|
|
38
39
|
"NotFoundError",
|
|
39
40
|
"Provider",
|
|
41
|
+
"Role",
|
|
40
42
|
"ServiceAccountKey",
|
|
41
43
|
"SmartConfiguration",
|
|
42
44
|
"UnauthorizedError",
|
phenoml/fhir_provider/client.py
CHANGED
|
@@ -13,6 +13,7 @@ from .types.fhir_provider_remove_auth_config_response import FhirProviderRemoveA
|
|
|
13
13
|
from .types.fhir_provider_response import FhirProviderResponse
|
|
14
14
|
from .types.fhir_provider_set_active_auth_config_response import FhirProviderSetActiveAuthConfigResponse
|
|
15
15
|
from .types.provider import Provider
|
|
16
|
+
from .types.role import Role
|
|
16
17
|
from .types.service_account_key import ServiceAccountKey
|
|
17
18
|
|
|
18
19
|
# this is used as the default value for optional parameters
|
|
@@ -45,6 +46,7 @@ class FhirProviderClient:
|
|
|
45
46
|
client_id: typing.Optional[str] = OMIT,
|
|
46
47
|
client_secret: typing.Optional[str] = OMIT,
|
|
47
48
|
service_account_key: typing.Optional[ServiceAccountKey] = OMIT,
|
|
49
|
+
role: typing.Optional[Role] = OMIT,
|
|
48
50
|
scopes: typing.Optional[str] = OMIT,
|
|
49
51
|
request_options: typing.Optional[RequestOptions] = None,
|
|
50
52
|
) -> FhirProviderResponse:
|
|
@@ -74,8 +76,10 @@ class FhirProviderClient:
|
|
|
74
76
|
|
|
75
77
|
service_account_key : typing.Optional[ServiceAccountKey]
|
|
76
78
|
|
|
79
|
+
role : typing.Optional[Role]
|
|
80
|
+
|
|
77
81
|
scopes : typing.Optional[str]
|
|
78
|
-
OAuth scopes to request
|
|
82
|
+
OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. You are solely responsible for ensuring the scopes are valid options for the provider being created or updated.
|
|
79
83
|
|
|
80
84
|
request_options : typing.Optional[RequestOptions]
|
|
81
85
|
Request-specific configuration.
|
|
@@ -108,6 +112,7 @@ class FhirProviderClient:
|
|
|
108
112
|
client_id=client_id,
|
|
109
113
|
client_secret=client_secret,
|
|
110
114
|
service_account_key=service_account_key,
|
|
115
|
+
role=role,
|
|
111
116
|
scopes=scopes,
|
|
112
117
|
request_options=request_options,
|
|
113
118
|
)
|
|
@@ -213,6 +218,7 @@ class FhirProviderClient:
|
|
|
213
218
|
client_secret: typing.Optional[str] = OMIT,
|
|
214
219
|
service_account_key: typing.Optional[ServiceAccountKey] = OMIT,
|
|
215
220
|
credential_expiry: typing.Optional[dt.datetime] = OMIT,
|
|
221
|
+
role: typing.Optional[Role] = OMIT,
|
|
216
222
|
scopes: typing.Optional[str] = OMIT,
|
|
217
223
|
request_options: typing.Optional[RequestOptions] = None,
|
|
218
224
|
) -> FhirProviderResponse:
|
|
@@ -234,8 +240,10 @@ class FhirProviderClient:
|
|
|
234
240
|
credential_expiry : typing.Optional[dt.datetime]
|
|
235
241
|
Expiry time for JWT credentials (only applicable for JWT auth method)
|
|
236
242
|
|
|
243
|
+
role : typing.Optional[Role]
|
|
244
|
+
|
|
237
245
|
scopes : typing.Optional[str]
|
|
238
|
-
OAuth scopes to request
|
|
246
|
+
OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. You are solely responsible for ensuring the scopes are valid options for the provider being created or updated.
|
|
239
247
|
|
|
240
248
|
request_options : typing.Optional[RequestOptions]
|
|
241
249
|
Request-specific configuration.
|
|
@@ -263,6 +271,7 @@ class FhirProviderClient:
|
|
|
263
271
|
client_secret=client_secret,
|
|
264
272
|
service_account_key=service_account_key,
|
|
265
273
|
credential_expiry=credential_expiry,
|
|
274
|
+
role=role,
|
|
266
275
|
scopes=scopes,
|
|
267
276
|
request_options=request_options,
|
|
268
277
|
)
|
|
@@ -373,6 +382,7 @@ class AsyncFhirProviderClient:
|
|
|
373
382
|
client_id: typing.Optional[str] = OMIT,
|
|
374
383
|
client_secret: typing.Optional[str] = OMIT,
|
|
375
384
|
service_account_key: typing.Optional[ServiceAccountKey] = OMIT,
|
|
385
|
+
role: typing.Optional[Role] = OMIT,
|
|
376
386
|
scopes: typing.Optional[str] = OMIT,
|
|
377
387
|
request_options: typing.Optional[RequestOptions] = None,
|
|
378
388
|
) -> FhirProviderResponse:
|
|
@@ -402,8 +412,10 @@ class AsyncFhirProviderClient:
|
|
|
402
412
|
|
|
403
413
|
service_account_key : typing.Optional[ServiceAccountKey]
|
|
404
414
|
|
|
415
|
+
role : typing.Optional[Role]
|
|
416
|
+
|
|
405
417
|
scopes : typing.Optional[str]
|
|
406
|
-
OAuth scopes to request
|
|
418
|
+
OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. You are solely responsible for ensuring the scopes are valid options for the provider being created or updated.
|
|
407
419
|
|
|
408
420
|
request_options : typing.Optional[RequestOptions]
|
|
409
421
|
Request-specific configuration.
|
|
@@ -444,6 +456,7 @@ class AsyncFhirProviderClient:
|
|
|
444
456
|
client_id=client_id,
|
|
445
457
|
client_secret=client_secret,
|
|
446
458
|
service_account_key=service_account_key,
|
|
459
|
+
role=role,
|
|
447
460
|
scopes=scopes,
|
|
448
461
|
request_options=request_options,
|
|
449
462
|
)
|
|
@@ -573,6 +586,7 @@ class AsyncFhirProviderClient:
|
|
|
573
586
|
client_secret: typing.Optional[str] = OMIT,
|
|
574
587
|
service_account_key: typing.Optional[ServiceAccountKey] = OMIT,
|
|
575
588
|
credential_expiry: typing.Optional[dt.datetime] = OMIT,
|
|
589
|
+
role: typing.Optional[Role] = OMIT,
|
|
576
590
|
scopes: typing.Optional[str] = OMIT,
|
|
577
591
|
request_options: typing.Optional[RequestOptions] = None,
|
|
578
592
|
) -> FhirProviderResponse:
|
|
@@ -594,8 +608,10 @@ class AsyncFhirProviderClient:
|
|
|
594
608
|
credential_expiry : typing.Optional[dt.datetime]
|
|
595
609
|
Expiry time for JWT credentials (only applicable for JWT auth method)
|
|
596
610
|
|
|
611
|
+
role : typing.Optional[Role]
|
|
612
|
+
|
|
597
613
|
scopes : typing.Optional[str]
|
|
598
|
-
OAuth scopes to request
|
|
614
|
+
OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. You are solely responsible for ensuring the scopes are valid options for the provider being created or updated.
|
|
599
615
|
|
|
600
616
|
request_options : typing.Optional[RequestOptions]
|
|
601
617
|
Request-specific configuration.
|
|
@@ -631,6 +647,7 @@ class AsyncFhirProviderClient:
|
|
|
631
647
|
client_secret=client_secret,
|
|
632
648
|
service_account_key=service_account_key,
|
|
633
649
|
credential_expiry=credential_expiry,
|
|
650
|
+
role=role,
|
|
634
651
|
scopes=scopes,
|
|
635
652
|
request_options=request_options,
|
|
636
653
|
)
|
|
@@ -23,6 +23,7 @@ from .types.fhir_provider_remove_auth_config_response import FhirProviderRemoveA
|
|
|
23
23
|
from .types.fhir_provider_response import FhirProviderResponse
|
|
24
24
|
from .types.fhir_provider_set_active_auth_config_response import FhirProviderSetActiveAuthConfigResponse
|
|
25
25
|
from .types.provider import Provider
|
|
26
|
+
from .types.role import Role
|
|
26
27
|
from .types.service_account_key import ServiceAccountKey
|
|
27
28
|
|
|
28
29
|
# this is used as the default value for optional parameters
|
|
@@ -44,6 +45,7 @@ class RawFhirProviderClient:
|
|
|
44
45
|
client_id: typing.Optional[str] = OMIT,
|
|
45
46
|
client_secret: typing.Optional[str] = OMIT,
|
|
46
47
|
service_account_key: typing.Optional[ServiceAccountKey] = OMIT,
|
|
48
|
+
role: typing.Optional[Role] = OMIT,
|
|
47
49
|
scopes: typing.Optional[str] = OMIT,
|
|
48
50
|
request_options: typing.Optional[RequestOptions] = None,
|
|
49
51
|
) -> HttpResponse[FhirProviderResponse]:
|
|
@@ -73,8 +75,10 @@ class RawFhirProviderClient:
|
|
|
73
75
|
|
|
74
76
|
service_account_key : typing.Optional[ServiceAccountKey]
|
|
75
77
|
|
|
78
|
+
role : typing.Optional[Role]
|
|
79
|
+
|
|
76
80
|
scopes : typing.Optional[str]
|
|
77
|
-
OAuth scopes to request
|
|
81
|
+
OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. You are solely responsible for ensuring the scopes are valid options for the provider being created or updated.
|
|
78
82
|
|
|
79
83
|
request_options : typing.Optional[RequestOptions]
|
|
80
84
|
Request-specific configuration.
|
|
@@ -85,7 +89,7 @@ class RawFhirProviderClient:
|
|
|
85
89
|
FHIR provider created successfully
|
|
86
90
|
"""
|
|
87
91
|
_response = self._client_wrapper.httpx_client.request(
|
|
88
|
-
"fhir-provider
|
|
92
|
+
"fhir-provider",
|
|
89
93
|
method="POST",
|
|
90
94
|
json={
|
|
91
95
|
"name": name,
|
|
@@ -98,6 +102,7 @@ class RawFhirProviderClient:
|
|
|
98
102
|
"service_account_key": convert_and_respect_annotation_metadata(
|
|
99
103
|
object_=service_account_key, annotation=ServiceAccountKey, direction="write"
|
|
100
104
|
),
|
|
105
|
+
"role": role,
|
|
101
106
|
"scopes": scopes,
|
|
102
107
|
},
|
|
103
108
|
headers={
|
|
@@ -408,6 +413,7 @@ class RawFhirProviderClient:
|
|
|
408
413
|
client_secret: typing.Optional[str] = OMIT,
|
|
409
414
|
service_account_key: typing.Optional[ServiceAccountKey] = OMIT,
|
|
410
415
|
credential_expiry: typing.Optional[dt.datetime] = OMIT,
|
|
416
|
+
role: typing.Optional[Role] = OMIT,
|
|
411
417
|
scopes: typing.Optional[str] = OMIT,
|
|
412
418
|
request_options: typing.Optional[RequestOptions] = None,
|
|
413
419
|
) -> HttpResponse[FhirProviderResponse]:
|
|
@@ -429,8 +435,10 @@ class RawFhirProviderClient:
|
|
|
429
435
|
credential_expiry : typing.Optional[dt.datetime]
|
|
430
436
|
Expiry time for JWT credentials (only applicable for JWT auth method)
|
|
431
437
|
|
|
438
|
+
role : typing.Optional[Role]
|
|
439
|
+
|
|
432
440
|
scopes : typing.Optional[str]
|
|
433
|
-
OAuth scopes to request
|
|
441
|
+
OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. You are solely responsible for ensuring the scopes are valid options for the provider being created or updated.
|
|
434
442
|
|
|
435
443
|
request_options : typing.Optional[RequestOptions]
|
|
436
444
|
Request-specific configuration.
|
|
@@ -450,6 +458,7 @@ class RawFhirProviderClient:
|
|
|
450
458
|
object_=service_account_key, annotation=ServiceAccountKey, direction="write"
|
|
451
459
|
),
|
|
452
460
|
"credential_expiry": credential_expiry,
|
|
461
|
+
"role": role,
|
|
453
462
|
"scopes": scopes,
|
|
454
463
|
},
|
|
455
464
|
headers={
|
|
@@ -752,6 +761,7 @@ class AsyncRawFhirProviderClient:
|
|
|
752
761
|
client_id: typing.Optional[str] = OMIT,
|
|
753
762
|
client_secret: typing.Optional[str] = OMIT,
|
|
754
763
|
service_account_key: typing.Optional[ServiceAccountKey] = OMIT,
|
|
764
|
+
role: typing.Optional[Role] = OMIT,
|
|
755
765
|
scopes: typing.Optional[str] = OMIT,
|
|
756
766
|
request_options: typing.Optional[RequestOptions] = None,
|
|
757
767
|
) -> AsyncHttpResponse[FhirProviderResponse]:
|
|
@@ -781,8 +791,10 @@ class AsyncRawFhirProviderClient:
|
|
|
781
791
|
|
|
782
792
|
service_account_key : typing.Optional[ServiceAccountKey]
|
|
783
793
|
|
|
794
|
+
role : typing.Optional[Role]
|
|
795
|
+
|
|
784
796
|
scopes : typing.Optional[str]
|
|
785
|
-
OAuth scopes to request
|
|
797
|
+
OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. You are solely responsible for ensuring the scopes are valid options for the provider being created or updated.
|
|
786
798
|
|
|
787
799
|
request_options : typing.Optional[RequestOptions]
|
|
788
800
|
Request-specific configuration.
|
|
@@ -793,7 +805,7 @@ class AsyncRawFhirProviderClient:
|
|
|
793
805
|
FHIR provider created successfully
|
|
794
806
|
"""
|
|
795
807
|
_response = await self._client_wrapper.httpx_client.request(
|
|
796
|
-
"fhir-provider
|
|
808
|
+
"fhir-provider",
|
|
797
809
|
method="POST",
|
|
798
810
|
json={
|
|
799
811
|
"name": name,
|
|
@@ -806,6 +818,7 @@ class AsyncRawFhirProviderClient:
|
|
|
806
818
|
"service_account_key": convert_and_respect_annotation_metadata(
|
|
807
819
|
object_=service_account_key, annotation=ServiceAccountKey, direction="write"
|
|
808
820
|
),
|
|
821
|
+
"role": role,
|
|
809
822
|
"scopes": scopes,
|
|
810
823
|
},
|
|
811
824
|
headers={
|
|
@@ -1116,6 +1129,7 @@ class AsyncRawFhirProviderClient:
|
|
|
1116
1129
|
client_secret: typing.Optional[str] = OMIT,
|
|
1117
1130
|
service_account_key: typing.Optional[ServiceAccountKey] = OMIT,
|
|
1118
1131
|
credential_expiry: typing.Optional[dt.datetime] = OMIT,
|
|
1132
|
+
role: typing.Optional[Role] = OMIT,
|
|
1119
1133
|
scopes: typing.Optional[str] = OMIT,
|
|
1120
1134
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1121
1135
|
) -> AsyncHttpResponse[FhirProviderResponse]:
|
|
@@ -1137,8 +1151,10 @@ class AsyncRawFhirProviderClient:
|
|
|
1137
1151
|
credential_expiry : typing.Optional[dt.datetime]
|
|
1138
1152
|
Expiry time for JWT credentials (only applicable for JWT auth method)
|
|
1139
1153
|
|
|
1154
|
+
role : typing.Optional[Role]
|
|
1155
|
+
|
|
1140
1156
|
scopes : typing.Optional[str]
|
|
1141
|
-
OAuth scopes to request
|
|
1157
|
+
OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. You are solely responsible for ensuring the scopes are valid options for the provider being created or updated.
|
|
1142
1158
|
|
|
1143
1159
|
request_options : typing.Optional[RequestOptions]
|
|
1144
1160
|
Request-specific configuration.
|
|
@@ -1158,6 +1174,7 @@ class AsyncRawFhirProviderClient:
|
|
|
1158
1174
|
object_=service_account_key, annotation=ServiceAccountKey, direction="write"
|
|
1159
1175
|
),
|
|
1160
1176
|
"credential_expiry": credential_expiry,
|
|
1177
|
+
"role": role,
|
|
1161
1178
|
"scopes": scopes,
|
|
1162
1179
|
},
|
|
1163
1180
|
headers={
|
|
@@ -14,6 +14,7 @@ from .fhir_query_response import FhirQueryResponse
|
|
|
14
14
|
from .fhir_query_response_data import FhirQueryResponseData
|
|
15
15
|
from .json_web_key import JsonWebKey
|
|
16
16
|
from .provider import Provider
|
|
17
|
+
from .role import Role
|
|
17
18
|
from .service_account_key import ServiceAccountKey
|
|
18
19
|
from .smart_configuration import SmartConfiguration
|
|
19
20
|
|
|
@@ -30,6 +31,7 @@ __all__ = [
|
|
|
30
31
|
"FhirQueryResponseData",
|
|
31
32
|
"JsonWebKey",
|
|
32
33
|
"Provider",
|
|
34
|
+
"Role",
|
|
33
35
|
"ServiceAccountKey",
|
|
34
36
|
"SmartConfiguration",
|
|
35
37
|
]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
Role = typing.Union[
|
|
6
|
+
typing.Literal[
|
|
7
|
+
"SmartV1Admin",
|
|
8
|
+
"SmartV1Read",
|
|
9
|
+
"SmartV1Write",
|
|
10
|
+
"SmartV2Admin",
|
|
11
|
+
"SmartV2Read",
|
|
12
|
+
"SmartV2Write",
|
|
13
|
+
"USCDISmartV1Admin",
|
|
14
|
+
"USCDISmartV1Read",
|
|
15
|
+
"USCDISmartV1Write",
|
|
16
|
+
"USCDISmartV2Admin",
|
|
17
|
+
"USCDISmartV2Read",
|
|
18
|
+
"USCDISmartV2Write",
|
|
19
|
+
"CernerSmartV1Admin",
|
|
20
|
+
"CernerSmartV1Read",
|
|
21
|
+
"CernerSmartV1Write",
|
|
22
|
+
"CernerSmartV2Admin",
|
|
23
|
+
"CernerSmartV2Read",
|
|
24
|
+
"CernerSmartV2Write",
|
|
25
|
+
],
|
|
26
|
+
typing.Any,
|
|
27
|
+
]
|