Class HttpHealthcareApiClient
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.healthcare.HttpHealthcareApiClient
-
- All Implemented Interfaces:
java.io.Serializable,HealthcareApiClient
public class HttpHealthcareApiClient extends java.lang.Object implements HealthcareApiClient, java.io.Serializable
A client that talks to the Cloud Healthcare API through HTTP requests. This client is created mainly to encapsulate the unserializable dependencies, since most generated classes are not serializable in the HTTP client.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpHealthcareApiClient.AuthenticatedRetryInitializerstatic classHttpHealthcareApiClient.FhirResourcePagesIteratorThe type FhirResourcePagesIterator for methods which return paged output.static classHttpHealthcareApiClient.HealthcareHttpExceptionWrapsHttpResponsein an exception with a statusCode field for use withHealthcareIOError.static classHttpHealthcareApiClient.HL7v2MessagePages
-
Constructor Summary
Constructors Constructor Description HttpHealthcareApiClient()Instantiates a new Http healthcare api client.HttpHealthcareApiClient(com.google.api.services.healthcare.v1.CloudHealthcare client)Instantiates a new Http healthcare api client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.api.services.healthcare.v1.model.DicomStorecreateDicomStore(java.lang.String dataset, java.lang.String name)com.google.api.services.healthcare.v1.model.DicomStorecreateDicomStore(java.lang.String dataset, java.lang.String name, @Nullable java.lang.String pubsubTopic)com.google.api.services.healthcare.v1.model.FhirStorecreateFhirStore(java.lang.String dataset, java.lang.String name, java.lang.String version)com.google.api.services.healthcare.v1.model.FhirStorecreateFhirStore(java.lang.String dataset, java.lang.String name, java.lang.String version, @Nullable java.lang.String pubsubTopic)com.google.api.services.healthcare.v1.model.MessagecreateHL7v2Message(java.lang.String hl7v2Store, com.google.api.services.healthcare.v1.model.Message msg)Create hl 7 v 2 message message.com.google.api.services.healthcare.v1.model.Hl7V2StorecreateHL7v2Store(java.lang.String dataset, java.lang.String name)Create hl 7 v 2 store hl 7 v 2 store.com.google.api.services.healthcare.v1.model.OperationdeidentifyFhirStore(java.lang.String sourcefhirStore, java.lang.String destinationFhirStore, com.google.api.services.healthcare.v1.model.DeidentifyConfig deidConfig)com.google.api.services.healthcare.v1.model.EmptydeleteDicomStore(java.lang.String name)com.google.api.services.healthcare.v1.model.EmptydeleteFhirStore(java.lang.String name)com.google.api.services.healthcare.v1.model.EmptydeleteHL7v2Message(java.lang.String msgName)Delete hl 7 v 2 message empty.com.google.api.services.healthcare.v1.model.EmptydeleteHL7v2Store(java.lang.String name)Delete hl 7 v 2 store empty.com.google.api.services.healthcare.v1.model.HttpBodyexecuteFhirBundle(java.lang.String fhirStore, java.lang.String bundle)Execute fhir bundle http body.com.google.api.services.healthcare.v1.model.OperationexportFhirResourceToBigQuery(java.lang.String fhirStore, java.lang.String bigQueryDatasetUri)com.google.api.services.healthcare.v1.model.OperationexportFhirResourceToGcs(java.lang.String fhirStore, java.lang.String gcsDestinationPrefix)org.joda.time.InstantgetEarliestHL7v2SendTime(java.lang.String hl7v2Store, @Nullable java.lang.String filter)Gets earliest hl 7 v 2 send time.com.google.api.services.healthcare.v1.model.MessagegetHL7v2Message(java.lang.String msgName)Gets HL7v2 message.com.google.api.services.healthcare.v1.model.Hl7V2StoregetHL7v2Store(java.lang.String storeName)Gets HL7v2 store.com.google.api.client.json.JsonFactorygetJsonFactory()org.joda.time.InstantgetLatestHL7v2SendTime(java.lang.String hl7v2Store, @Nullable java.lang.String filter)com.google.api.services.healthcare.v1.model.HttpBodygetPatientEverything(java.lang.String resourceName, @Nullable java.util.Map<java.lang.String,java.lang.Object> filters, java.lang.String pageToken)Fhir get patient everythhing http body.com.google.api.services.healthcare.v1.model.OperationimportFhirResource(java.lang.String fhirStore, java.lang.String gcsSourcePath, @Nullable java.lang.String contentStructure)com.google.api.services.healthcare.v1.model.IngestMessageResponseingestHL7v2Message(java.lang.String hl7v2Store, com.google.api.services.healthcare.v1.model.Message msg)Ingest hl 7 v 2 message ingest message response.java.util.List<com.google.api.services.healthcare.v1.model.FhirStore>listAllFhirStores(java.lang.String dataset)List all FHIR stores in a dataset.com.google.api.services.healthcare.v1.model.ListMessagesResponsemakeHL7v2ListRequest(java.lang.String hl7v2Store, @Nullable java.lang.String filter, @Nullable java.lang.String orderBy, @Nullable java.lang.String pageToken)Make hl 7 v 2 list request list messages response.com.google.api.services.healthcare.v1.model.ListMessagesResponsemakeSendTimeBoundHL7v2ListRequest(java.lang.String hl7v2Store, org.joda.time.Instant start, @Nullable org.joda.time.Instant end, @Nullable java.lang.String otherFilter, @Nullable java.lang.String orderBy, @Nullable java.lang.String pageToken)Make send time bound hl 7 v 2 list request.com.google.api.services.healthcare.v1.model.OperationpollOperation(com.google.api.services.healthcare.v1.model.Operation operation, java.lang.Long sleepMs)com.google.api.services.healthcare.v1.model.HttpBodyreadFhirResource(java.lang.String resourceName)Read fhir resource http body.java.lang.StringretrieveDicomStudyMetadata(java.lang.String dicomWebPath)com.google.api.services.healthcare.v1.model.HttpBodysearchFhirResource(java.lang.String fhirStore, java.lang.String resourceType, @Nullable java.util.Map<java.lang.String,java.lang.Object> parameters, java.lang.String pageToken)Search fhir resource http body.com.google.api.services.healthcare.v1.model.EmptyuploadToDicomStore(java.lang.String webPath, java.lang.String filePath)
-
-
-
Constructor Detail
-
HttpHealthcareApiClient
public HttpHealthcareApiClient() throws java.io.IOExceptionInstantiates a new Http healthcare api client.- Throws:
java.io.IOException- the io exception
-
HttpHealthcareApiClient
public HttpHealthcareApiClient(com.google.api.services.healthcare.v1.CloudHealthcare client) throws java.io.IOExceptionInstantiates a new Http healthcare api client.- Parameters:
client- the client- Throws:
java.io.IOException- the io exception
-
-
Method Detail
-
getJsonFactory
public com.google.api.client.json.JsonFactory getJsonFactory()
-
createHL7v2Store
public com.google.api.services.healthcare.v1.model.Hl7V2Store createHL7v2Store(java.lang.String dataset, java.lang.String name) throws java.io.IOExceptionDescription copied from interface:HealthcareApiClientCreate hl 7 v 2 store hl 7 v 2 store.- Specified by:
createHL7v2Storein interfaceHealthcareApiClient- Parameters:
dataset- the datasetname- the name- Returns:
- the hl 7 v 2 store
- Throws:
java.io.IOException- the io exception
-
createFhirStore
public com.google.api.services.healthcare.v1.model.FhirStore createFhirStore(java.lang.String dataset, java.lang.String name, java.lang.String version) throws java.io.IOException- Specified by:
createFhirStorein interfaceHealthcareApiClient- Throws:
java.io.IOException
-
createFhirStore
public com.google.api.services.healthcare.v1.model.FhirStore createFhirStore(java.lang.String dataset, java.lang.String name, java.lang.String version, @Nullable java.lang.String pubsubTopic) throws java.io.IOException- Specified by:
createFhirStorein interfaceHealthcareApiClient- Throws:
java.io.IOException
-
listAllFhirStores
public java.util.List<com.google.api.services.healthcare.v1.model.FhirStore> listAllFhirStores(java.lang.String dataset) throws java.io.IOExceptionDescription copied from interface:HealthcareApiClientList all FHIR stores in a dataset.- Specified by:
listAllFhirStoresin interfaceHealthcareApiClient- Parameters:
dataset- the dataset, in the format: projects/project_id/locations/location_id/datasets/dataset_id- Returns:
- a list of FhirStore
- Throws:
java.io.IOException
-
deleteHL7v2Store
public com.google.api.services.healthcare.v1.model.Empty deleteHL7v2Store(java.lang.String name) throws java.io.IOExceptionDescription copied from interface:HealthcareApiClientDelete hl 7 v 2 store empty.- Specified by:
deleteHL7v2Storein interfaceHealthcareApiClient- Parameters:
name- the store- Returns:
- the empty
- Throws:
java.io.IOException- the io exception
-
deleteFhirStore
public com.google.api.services.healthcare.v1.model.Empty deleteFhirStore(java.lang.String name) throws java.io.IOException- Specified by:
deleteFhirStorein interfaceHealthcareApiClient- Throws:
java.io.IOException
-
retrieveDicomStudyMetadata
public java.lang.String retrieveDicomStudyMetadata(java.lang.String dicomWebPath) throws java.io.IOException- Specified by:
retrieveDicomStudyMetadatain interfaceHealthcareApiClient- Throws:
java.io.IOException
-
createDicomStore
public com.google.api.services.healthcare.v1.model.DicomStore createDicomStore(java.lang.String dataset, java.lang.String name) throws java.io.IOException- Specified by:
createDicomStorein interfaceHealthcareApiClient- Throws:
java.io.IOException
-
deleteDicomStore
public com.google.api.services.healthcare.v1.model.Empty deleteDicomStore(java.lang.String name) throws java.io.IOException- Specified by:
deleteDicomStorein interfaceHealthcareApiClient- Throws:
java.io.IOException
-
uploadToDicomStore
public com.google.api.services.healthcare.v1.model.Empty uploadToDicomStore(java.lang.String webPath, java.lang.String filePath) throws java.io.IOException, java.net.URISyntaxException- Specified by:
uploadToDicomStorein interfaceHealthcareApiClient- Throws:
java.io.IOExceptionjava.net.URISyntaxException
-
createDicomStore
public com.google.api.services.healthcare.v1.model.DicomStore createDicomStore(java.lang.String dataset, java.lang.String name, @Nullable java.lang.String pubsubTopic) throws java.io.IOException- Specified by:
createDicomStorein interfaceHealthcareApiClient- Throws:
java.io.IOException
-
getEarliestHL7v2SendTime
public org.joda.time.Instant getEarliestHL7v2SendTime(java.lang.String hl7v2Store, @Nullable java.lang.String filter) throws java.io.IOExceptionDescription copied from interface:HealthcareApiClientGets earliest hl 7 v 2 send time.- Specified by:
getEarliestHL7v2SendTimein interfaceHealthcareApiClient- Parameters:
hl7v2Store- the hl 7 v 2 storefilter- the filter- Returns:
- the earliest hl 7 v 2 send time
- Throws:
java.io.IOException- the io exception
-
getLatestHL7v2SendTime
public org.joda.time.Instant getLatestHL7v2SendTime(java.lang.String hl7v2Store, @Nullable java.lang.String filter) throws java.io.IOException- Specified by:
getLatestHL7v2SendTimein interfaceHealthcareApiClient- Throws:
java.io.IOException
-
makeSendTimeBoundHL7v2ListRequest
public com.google.api.services.healthcare.v1.model.ListMessagesResponse makeSendTimeBoundHL7v2ListRequest(java.lang.String hl7v2Store, org.joda.time.Instant start, @Nullable org.joda.time.Instant end, @Nullable java.lang.String otherFilter, @Nullable java.lang.String orderBy, @Nullable java.lang.String pageToken) throws java.io.IOExceptionDescription copied from interface:HealthcareApiClientMake send time bound hl 7 v 2 list request.- Specified by:
makeSendTimeBoundHL7v2ListRequestin interfaceHealthcareApiClient- Parameters:
hl7v2Store- the hl 7 v 2 storestart- the startend- the endotherFilter- the other filterorderBy- the order bypageToken- the page token- Returns:
- the list messages response
- Throws:
java.io.IOException- the io exception
-
makeHL7v2ListRequest
public com.google.api.services.healthcare.v1.model.ListMessagesResponse makeHL7v2ListRequest(java.lang.String hl7v2Store, @Nullable java.lang.String filter, @Nullable java.lang.String orderBy, @Nullable java.lang.String pageToken) throws java.io.IOExceptionDescription copied from interface:HealthcareApiClientMake hl 7 v 2 list request list messages response.- Specified by:
makeHL7v2ListRequestin interfaceHealthcareApiClient- Parameters:
hl7v2Store- the hl 7 v 2 storefilter- the filterorderBy- the order bypageToken- the page token- Returns:
- the list messages response
- Throws:
java.io.IOException- the io exception
-
getHL7v2Message
public com.google.api.services.healthcare.v1.model.Message getHL7v2Message(java.lang.String msgName) throws java.io.IOExceptionGets HL7v2 message.- Specified by:
getHL7v2Messagein interfaceHealthcareApiClient- Parameters:
msgName- the msg name- Returns:
- the message
- Throws:
java.io.IOException- the io exceptionjava.text.ParseException- the parse exception
-
deleteHL7v2Message
public com.google.api.services.healthcare.v1.model.Empty deleteHL7v2Message(java.lang.String msgName) throws java.io.IOExceptionDescription copied from interface:HealthcareApiClientDelete hl 7 v 2 message empty.- Specified by:
deleteHL7v2Messagein interfaceHealthcareApiClient- Parameters:
msgName- the msg name- Returns:
- the empty
- Throws:
java.io.IOException- the io exception
-
getHL7v2Store
public com.google.api.services.healthcare.v1.model.Hl7V2Store getHL7v2Store(java.lang.String storeName) throws java.io.IOExceptionGets HL7v2 store.- Specified by:
getHL7v2Storein interfaceHealthcareApiClient- Parameters:
storeName- the store name- Returns:
- the HL7v2 store
- Throws:
java.io.IOException- the io exception
-
ingestHL7v2Message
public com.google.api.services.healthcare.v1.model.IngestMessageResponse ingestHL7v2Message(java.lang.String hl7v2Store, com.google.api.services.healthcare.v1.model.Message msg) throws java.io.IOExceptionDescription copied from interface:HealthcareApiClientIngest hl 7 v 2 message ingest message response.- Specified by:
ingestHL7v2Messagein interfaceHealthcareApiClient- Parameters:
hl7v2Store- the hl 7 v 2 storemsg- the msg- Returns:
- the ingest message response
- Throws:
java.io.IOException- the io exception
-
createHL7v2Message
public com.google.api.services.healthcare.v1.model.Message createHL7v2Message(java.lang.String hl7v2Store, com.google.api.services.healthcare.v1.model.Message msg) throws java.io.IOExceptionDescription copied from interface:HealthcareApiClientCreate hl 7 v 2 message message.- Specified by:
createHL7v2Messagein interfaceHealthcareApiClient- Parameters:
hl7v2Store- the hl 7 v 2 storemsg- the msg- Returns:
- the message
- Throws:
java.io.IOException- the io exception
-
importFhirResource
public com.google.api.services.healthcare.v1.model.Operation importFhirResource(java.lang.String fhirStore, java.lang.String gcsSourcePath, @Nullable java.lang.String contentStructure) throws java.io.IOException- Specified by:
importFhirResourcein interfaceHealthcareApiClient- Throws:
java.io.IOException
-
exportFhirResourceToGcs
public com.google.api.services.healthcare.v1.model.Operation exportFhirResourceToGcs(java.lang.String fhirStore, java.lang.String gcsDestinationPrefix) throws java.io.IOException- Specified by:
exportFhirResourceToGcsin interfaceHealthcareApiClient- Throws:
java.io.IOException
-
exportFhirResourceToBigQuery
public com.google.api.services.healthcare.v1.model.Operation exportFhirResourceToBigQuery(java.lang.String fhirStore, java.lang.String bigQueryDatasetUri) throws java.io.IOException- Specified by:
exportFhirResourceToBigQueryin interfaceHealthcareApiClient- Throws:
java.io.IOException
-
deidentifyFhirStore
public com.google.api.services.healthcare.v1.model.Operation deidentifyFhirStore(java.lang.String sourcefhirStore, java.lang.String destinationFhirStore, com.google.api.services.healthcare.v1.model.DeidentifyConfig deidConfig) throws java.io.IOException- Specified by:
deidentifyFhirStorein interfaceHealthcareApiClient- Throws:
java.io.IOException
-
pollOperation
public com.google.api.services.healthcare.v1.model.Operation pollOperation(com.google.api.services.healthcare.v1.model.Operation operation, java.lang.Long sleepMs) throws java.lang.InterruptedException, java.io.IOException- Specified by:
pollOperationin interfaceHealthcareApiClient- Throws:
java.lang.InterruptedExceptionjava.io.IOException
-
executeFhirBundle
public com.google.api.services.healthcare.v1.model.HttpBody executeFhirBundle(java.lang.String fhirStore, java.lang.String bundle) throws java.io.IOExceptionDescription copied from interface:HealthcareApiClientExecute fhir bundle http body.- Specified by:
executeFhirBundlein interfaceHealthcareApiClient- Parameters:
fhirStore- the fhir storebundle- the bundle- Returns:
- the http body
- Throws:
java.io.IOException- the io exception
-
readFhirResource
public com.google.api.services.healthcare.v1.model.HttpBody readFhirResource(java.lang.String resourceName) throws java.io.IOExceptionDescription copied from interface:HealthcareApiClientRead fhir resource http body.- Specified by:
readFhirResourcein interfaceHealthcareApiClient- Parameters:
resourceName- the resource name, in format projects/{p}/locations/{l}/datasets/{d}/fhirStores/{f}/fhir/{resourceType}/{id}- Returns:
- the http body
- Throws:
java.io.IOException- the io exception
-
searchFhirResource
public com.google.api.services.healthcare.v1.model.HttpBody searchFhirResource(java.lang.String fhirStore, java.lang.String resourceType, @Nullable java.util.Map<java.lang.String,java.lang.Object> parameters, java.lang.String pageToken) throws java.io.IOExceptionDescription copied from interface:HealthcareApiClientSearch fhir resource http body.- Specified by:
searchFhirResourcein interfaceHealthcareApiClient- Parameters:
fhirStore- the fhir storeresourceType- the resource typeparameters- the parameters- Returns:
- the http body
- Throws:
java.io.IOException
-
getPatientEverything
public com.google.api.services.healthcare.v1.model.HttpBody getPatientEverything(java.lang.String resourceName, @Nullable java.util.Map<java.lang.String,java.lang.Object> filters, java.lang.String pageToken) throws java.io.IOExceptionDescription copied from interface:HealthcareApiClientFhir get patient everythhing http body.- Specified by:
getPatientEverythingin interfaceHealthcareApiClient- Parameters:
resourceName- the resource name, in format projects/{p}/locations/{l}/datasets/{d}/fhirStores/{f}/fhir/{resourceType}/{id}filters- optional request filters- Returns:
- the http body
- Throws:
java.io.IOException
-
-