Interface HealthcareApiClient
- All Known Implementing Classes:
HttpHealthcareApiClient
public interface HealthcareApiClient
Defines a client to communicate with the GCP HCLS API (version v1).
-
Method Summary
Modifier and TypeMethodDescriptioncreateDicomStore
(String dataset, String name) Create a DicomStore.createDicomStore
(String dataset, String name, String pubsubTopic) Create a DicomStore with a PubSub listener.createFhirStore
(String dataset, String name, String version) Create FHIR Store.createFhirStore
(String dataset, String name, String version, String pubsubTopic) Create FHIR Store with a PubSub topic listener.createHL7v2Message
(String hl7v2Store, Message msg) Creates an HL7v2 message.createHL7v2Store
(String dataset, String name) Create hl 7 v 2 store hl 7 v 2 store.deidentifyFhirStore
(String sourceFhirStore, String destinationFhirStore, DeidentifyConfig deidConfig) Deidentify a GCP FHIR Store and write the result into a new FHIR Store.deleteDicomStore
(String name) Delete a Dicom Store.deleteFhirStore
(String store) Delete Fhir store.deleteHL7v2Message
(String msgName) Deletes an HL7v2 message.deleteHL7v2Store
(String store) Deletes an HL7v2 store.executeFhirBundle
(String fhirStore, String bundle) Execute fhir bundle http body.exportFhirResourceToBigQuery
(String fhirStore, String bigQueryDatasetUri) Export a FHIR Resource to BigQuery.exportFhirResourceToGcs
(String fhirStore, String gcsDestinationPrefix) Export a FHIR Resource to GCS.getEarliestHL7v2SendTime
(String hl7v2Store, @Nullable String filter) Gets the earliest HL7v2 send time.getHL7v2Message
(String msgName) Gets a Hl7v2 message by its name from a Hl7v2 store.getHL7v2Store
(String storeName) Gets an HL7v2 store.getLatestHL7v2SendTime
(String hl7v2Store, @Nullable String filter) Gets the latest HL7v2 send time.Fhir get patient everything http body.importFhirResource
(String fhirStore, String gcsSourcePath, @Nullable String contentStructure) Importing a FHIR resource from GCS.ingestHL7v2Message
(String hl7v2Store, Message msg) Ingest an HL7v2 message.listAllFhirStores
(String dataset) List all FHIR stores in a dataset.makeHL7v2ListRequest
(String hl7v2Store, @Nullable String filter, @Nullable String orderBy, @Nullable String pageToken) Make hl 7 v 2 list request list messages response.makeSendTimeBoundHL7v2ListRequest
(String hl7v2Store, Instant start, @Nullable Instant end, @Nullable String otherFilter, @Nullable String orderBy, @Nullable String pageToken) Time Bound HL7v2 list request.pollOperation
(Operation operation, Long sleepMs) Poll operation.readFhirResource
(String resourceName) Read fhir resource http body.retrieveDicomStudyMetadata
(String dicomWebPath) Retrieve DicomStudyMetadata.searchFhirResource
(String fhirStore, String resourceType, @Nullable Map<String, Object> parameters, String pageToken) Search fhir resource http body.uploadToDicomStore
(String webPath, String filePath) Upload to a Dicom Store.
-
Method Details
-
getHL7v2Message
Gets a Hl7v2 message by its name from a Hl7v2 store.- Parameters:
msgName
- The message name to be retrieved.- Returns:
- The HL7v2 message.
- Throws:
IOException
- The IO Exception.ParseException
- The Parse Exception.
-
deleteHL7v2Message
Deletes an HL7v2 message.- Parameters:
msgName
- The message name to be deleted.- Returns:
- Empty.
- Throws:
IOException
- The IO Exception.
-
getHL7v2Store
Gets an HL7v2 store.- Parameters:
storeName
- The store name to be retrieved.- Returns:
- The HL7v2 store.
- Throws:
IOException
- The IO Exception.
-
getEarliestHL7v2SendTime
Gets the earliest HL7v2 send time.- Parameters:
hl7v2Store
- The HL7v2 store.filter
- the filter to be matched on.- Returns:
- The earliest HL7v2 send time.
- Throws:
IOException
- The IO Exception.
-
getLatestHL7v2SendTime
Gets the latest HL7v2 send time.- Parameters:
hl7v2Store
- The HL7v2 store.filter
- The filter to be matched on.- Returns:
- The latest HL7v2 send time.
- Throws:
IOException
- The IO Exception.
-
makeSendTimeBoundHL7v2ListRequest
ListMessagesResponse makeSendTimeBoundHL7v2ListRequest(String hl7v2Store, Instant start, @Nullable Instant end, @Nullable String otherFilter, @Nullable String orderBy, @Nullable String pageToken) throws IOException Time Bound HL7v2 list request.- Parameters:
hl7v2Store
- The HL7v2 store.start
- Start time.end
- End time.otherFilter
- The filter outside of the sendTime.orderBy
- Order by.pageToken
- The page token.- Returns:
- HTTP List response.
- Throws:
IOException
- The IO Exception.
-
makeHL7v2ListRequest
ListMessagesResponse makeHL7v2ListRequest(String hl7v2Store, @Nullable String filter, @Nullable String orderBy, @Nullable String pageToken) throws IOException Make hl 7 v 2 list request list messages response.- Parameters:
hl7v2Store
- The HL7v2 Store.filter
- The Filter.orderBy
- Order by.pageToken
- The Page Token.- Returns:
- HTTP List response.
- Throws:
IOException
- The IO Exception.
-
ingestHL7v2Message
Ingest an HL7v2 message.- Parameters:
hl7v2Store
- The HL7v2 store of the message.msg
- The message.- Returns:
- Empty.
- Throws:
IOException
- The IO Exception.
-
createHL7v2Message
Creates an HL7v2 message.- Parameters:
hl7v2Store
- The HL7v2 store to create a message in.msg
- The message to create.- Returns:
- Empty.
- Throws:
IOException
- The IO Exception.
-
deleteHL7v2Store
Deletes an HL7v2 store.- Parameters:
store
- The HL7v2 store to be deleted.- Returns:
- Empty.
- Throws:
IOException
- The IO Exception.
-
importFhirResource
Operation importFhirResource(String fhirStore, String gcsSourcePath, @Nullable String contentStructure) throws IOException Importing a FHIR resource from GCS.- Parameters:
fhirStore
- the FhirStore to import into.gcsSourcePath
- the GCS Path of resource.contentStructure
- The content structure.- Returns:
- Empty.
- Throws:
IOException
- the io exception
-
exportFhirResourceToGcs
Export a FHIR Resource to GCS.- Parameters:
fhirStore
- the FhirStore of the resource.gcsDestinationPrefix
- GCS Destination Prefix to export to.- Returns:
- Empty.
- Throws:
IOException
- The IO Exception.
-
exportFhirResourceToBigQuery
Operation exportFhirResourceToBigQuery(String fhirStore, String bigQueryDatasetUri) throws IOException Export a FHIR Resource to BigQuery.- Parameters:
fhirStore
- the FhirStore of the resource.bigQueryDatasetUri
- The BQ Dataset URI to export to.- Returns:
- Empty.
- Throws:
IOException
- The IO Exception.
-
deidentifyFhirStore
Operation deidentifyFhirStore(String sourceFhirStore, String destinationFhirStore, DeidentifyConfig deidConfig) throws IOException Deidentify a GCP FHIR Store and write the result into a new FHIR Store.- Parameters:
sourceFhirStore
- the FhirStore to be deidentified.destinationFhirStore
- the FhirStore that the deidentified data will be written to.deidConfig
- the deidCongig specifying form of deidentification.- Returns:
- Empty.
- Throws:
IOException
- The IO Exception.
-
pollOperation
Poll operation.- Parameters:
operation
- to be polled.sleepMs
- length of time to wait between requests.- Returns:
- HTTP Request (that returns status of operation).
- Throws:
IOException
- The IO Exception.InterruptedException
-
executeFhirBundle
HttpBody executeFhirBundle(String fhirStore, String bundle) throws IOException, HttpHealthcareApiClient.HealthcareHttpException Execute fhir bundle http body.- Parameters:
fhirStore
- the fhir storebundle
- the bundle- Returns:
- the http body
- Throws:
IOException
- The IO Exception.HttpHealthcareApiClient.HealthcareHttpException
-
readFhirResource
Read fhir resource http body.- Parameters:
resourceName
- the resource name, in format projects/{p}/locations/{l}/datasets/{d}/fhirStores/{f}/fhir/{resourceType}/{id}- Returns:
- the http body
- Throws:
IOException
- The IO Exception.
-
searchFhirResource
HttpBody searchFhirResource(String fhirStore, String resourceType, @Nullable Map<String, Object> parameters, String pageToken) throws IOExceptionSearch fhir resource http body.- Parameters:
fhirStore
- the fhir storeresourceType
- the resource typeparameters
- The parameters (in the form of key-value pairs).- Returns:
- the http body
- Throws:
IOException
- The IO Exception.
-
getPatientEverything
HttpBody getPatientEverything(String resourceName, @Nullable Map<String, Object> filters, String pageToken) throws IOExceptionFhir get patient everything http body.- Parameters:
resourceName
- the resource name, in format projects/{p}/locations/{l}/datasets/{d}/fhirStores/{f}/fhir/{resourceType}/{id}filters
- optional request filters (in key value pairs).- Returns:
- the http body
- Throws:
IOException
- The IO Exception.
-
createHL7v2Store
Create hl 7 v 2 store hl 7 v 2 store.- Parameters:
dataset
- The dataset to create the HL7v2 store in.name
- The name of the store to be created.- Returns:
- Empty.
- Throws:
IOException
- The IO Exception.
-
createFhirStore
FhirStore createFhirStore(String dataset, String name, String version, String pubsubTopic) throws IOException Create FHIR Store with a PubSub topic listener.- Parameters:
dataset
- The name of Dataset for the FHIR store to be created in.name
- The name of the FHIR store.version
- The version of the FHIR store (DSTU2, STU3, R4).pubsubTopic
- The pubsub topic listening to the FHIR store.- Throws:
IOException
- The IO Exception.
-
createFhirStore
Create FHIR Store.- Parameters:
dataset
- The name of the Dataset for the FHIR store to be created in.name
- The name of the FHIR store.version
- The version of the FHIR store (DSTU2, STU3, R4).- Throws:
IOException
- The IO Exception.
-
listAllFhirStores
List all FHIR stores in a dataset.- Parameters:
dataset
- The dataset, in the format: projects/project_id/locations/location_id/datasets/dataset_id- Returns:
- A list of all FHIR stores in the dataset.
- Throws:
IOException
- The IO Exception.
-
deleteFhirStore
Delete Fhir store.- Parameters:
store
- The FHIR store to be deleted.- Returns:
- Empty.
- Throws:
IOException
- The IO Exception.
-
retrieveDicomStudyMetadata
Retrieve DicomStudyMetadata.- Parameters:
dicomWebPath
- The Dicom Web Path to retrieve the metadata from.- Returns:
- The study metadata.
- Throws:
IOException
- The IO Exception.
-
createDicomStore
Create a DicomStore.- Parameters:
dataset
- The dataset that the Dicom Store should be in, in the format: projects/project_id/locations/location_id/datasets/dataset_id.name
- The name of the Dicom Store to be created.- Returns:
- Empty.
- Throws:
IOException
- The IO Exception.
-
createDicomStore
Create a DicomStore with a PubSub listener.- Parameters:
dataset
- The dataset that the Dicom Store should be in, in the format: projects/project_id/locations/location_id/datasets/dataset_idname
- The name of the Dicom Store to be created.pubsubTopic
- Name of PubSub topic connected with the Dicom store.- Returns:
- Empty.
- Throws:
IOException
- The IO Exception.
-
deleteDicomStore
Delete a Dicom Store.- Parameters:
name
- The name of the Dicom Store to be deleted.- Returns:
- Empty.
- Throws:
IOException
- The IO Exception.
-
uploadToDicomStore
Upload to a Dicom Store.- Parameters:
webPath
- String format of webPath to upload into.filePath
- filePath of file to upload.- Returns:
- Empty.
- Throws:
IOException
- The IO Exception.URISyntaxException
-