Utilizzo ListFHIRDatastores con un AWS SDK o una CLI - AWS HealthLake

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

Utilizzo ListFHIRDatastores con un AWS SDK o una CLI

Gli esempi di codice seguenti mostrano come utilizzare ListFHIRDatastores.

CLI
AWS CLI

Come elencare i datastore FHIR

L'list-fhir-datastoresesempio seguente mostra come utilizzare il comando e come gli utenti possono filtrare i risultati in base allo stato del data store in AWS HealthLake.

aws healthlake list-fhir-datastores \ --filter DatastoreStatus=ACTIVE

Output:

{ "DatastorePropertiesList": [ { "PreloadDataConfig": { "PreloadDataType": "SYNTHEA" }, "SseConfiguration": { "KmsEncryptionConfig": { "CmkType": "CUSTOMER_MANAGED_KMS_KEY", "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" } }, "DatastoreName": "Demo", "DatastoreArn": "arn:aws:healthlake:us-east-1:<AWS Account ID>:datastore/<Data store ID>", "DatastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/<Data store ID>/r4/", "DatastoreStatus": "ACTIVE", "DatastoreTypeVersion": "R4", "CreatedAt": 1603761064.881, "DatastoreId": "<Data store ID>", "IdentityProviderConfiguration": { "AuthorizationStrategy": "AWS_AUTH", "FineGrainedAuthorizationEnabled": false } } ] }

Per ulteriori informazioni, consulta Creazione e monitoraggio di un data store FHIR nella Guida per gli AWS HealthLake sviluppatori.

Python
SDK per Python (Boto3)
@classmethod def from_client(cls) -> "HealthLakeWrapper": """ Creates a HealthLakeWrapper instance with a default AWS HealthLake client. :return: An instance of HealthLakeWrapper initialized with the default HealthLake client. """ health_lake_client = boto3.client("healthlake") return cls(health_lake_client) def list_fhir_datastores(self) -> list[dict[str, any]]: """ Lists all HealthLake data stores. :return: A list of data store descriptions. """ try: next_token = None datastores = [] # Loop through paginated results. while True: parameters = {} if next_token is not None: parameters["NextToken"] = next_token response = self.health_lake_client.list_fhir_datastores(**parameters) datastores.extend(response["DatastorePropertiesList"]) if "NextToken" in response: next_token = response["NextToken"] else: break return datastores except ClientError as err: logger.exception( "Couldn't list data stores. Here's why %s", err.response["Error"]["Message"] ) raise
  • Per i dettagli sull'API, consulta List FHIRDatastores in AWS SDK for Python (Boto3) API Reference.

Nota

C'è di più su. GitHub Trova l'esempio completo e scopri di più sulla configurazione e l'esecuzione nel Repository di esempi di codice AWS.

SAP ABAP
SDK per SAP ABAP
Nota

C'è altro da fare. GitHub Trova l'esempio completo e scopri di più sulla configurazione e l'esecuzione nel Repository di esempi di codice AWS.

TRY. oo_result = lo_hll->listfhirdatastores( ). DATA(lt_datastores) = oo_result->get_datastorepropertieslist( ). DATA(lv_datastore_count) = lines( lt_datastores ). MESSAGE |Found { lv_datastore_count } data store(s).| TYPE 'I'. CATCH /aws1/cx_hllvalidationex INTO DATA(lo_validation_ex). DATA(lv_error) = |Validation error: { lo_validation_ex->av_err_code }-{ lo_validation_ex->av_err_msg }|. MESSAGE lv_error TYPE 'I'. RAISE EXCEPTION lo_validation_ex. CATCH /aws1/cx_hllthrottlingex INTO DATA(lo_throttling_ex). lv_error = |Throttling error: { lo_throttling_ex->av_err_code }-{ lo_throttling_ex->av_err_msg }|. MESSAGE lv_error TYPE 'I'. RAISE EXCEPTION lo_throttling_ex. ENDTRY.
  • Per i dettagli sulle API, consulta List FHIRDatastores in AWS SDK for SAP ABAP API reference.

Per un elenco completo delle guide per sviluppatori AWS SDK e degli esempi di codice, consulta. Utilizzo HealthLake con un AWS SDK Questo argomento include anche informazioni su come iniziare e dettagli sulle versioni precedenti dell’SDK.