Search in sources :

Example 6 with DicomStores

use of com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.DicomStores in project java-docs-samples by GoogleCloudPlatform.

the class DicomStorePatch method patchDicomStore.

public static void patchDicomStore(String dicomStoreName, String pubsubTopic) throws IOException {
    // String dicomStoreName =
    // String.format(
    // DICOM_NAME, "your-project-id", "your-region-id", "your-dataset-id", "your-dicom-id");
    // String pubsubTopic = "projects/your-project-id/topics/your-pubsub-topic";
    // Initialize the client, which will be used to interact with the service.
    CloudHealthcare client = createClient();
    // Fetch the initial state of the DICOM store.
    DicomStores.Get getRequest = client.projects().locations().datasets().dicomStores().get(dicomStoreName);
    DicomStore store = getRequest.execute();
    // Update the DicomStore fields as needed as needed. For a full list of DicomStore fields, see:
    // https://cloud.google.com/healthcare/docs/reference/rest/v1/projects.locations.datasets.dicomStores#DicomStore
    store.setNotificationConfig(new NotificationConfig().setPubsubTopic(pubsubTopic));
    // Create request and configure any parameters.
    DicomStores.Patch request = client.projects().locations().datasets().dicomStores().patch(dicomStoreName, store).setUpdateMask("notificationConfig");
    // Execute the request and process the results.
    store = request.execute();
    System.out.println("DICOM store patched: \n" + store.toPrettyString());
}
Also used : DicomStores(com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.DicomStores) DicomStore(com.google.api.services.healthcare.v1.model.DicomStore) NotificationConfig(com.google.api.services.healthcare.v1.model.NotificationConfig) CloudHealthcare(com.google.api.services.healthcare.v1.CloudHealthcare)

Example 7 with DicomStores

use of com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.DicomStores in project java-docs-samples by GoogleCloudPlatform.

the class DicomWebDeleteStudy method dicomWebDeleteStudy.

public static void dicomWebDeleteStudy(String dicomStoreName, String studyId) throws IOException {
    // String dicomStoreName =
    // String.format(
    // DICOM_NAME, "your-project-id", "your-region-id", "your-dataset-id", "your-dicom-id");
    // String studyId = "your-study-id";
    // Initialize the client, which will be used to interact with the service.
    CloudHealthcare client = createClient();
    // Create request and configure any parameters.
    Studies.Delete request = client.projects().locations().datasets().dicomStores().studies().delete(dicomStoreName, "studies/" + studyId);
    // Execute the request and process the results.
    request.execute();
    System.out.println("DICOM study deleted.");
}
Also used : Studies(com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.DicomStores.Studies) CloudHealthcare(com.google.api.services.healthcare.v1.CloudHealthcare)

Example 8 with DicomStores

use of com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.DicomStores in project java-docs-samples by GoogleCloudPlatform.

the class DicomStoreDelete method deleteDicomStore.

public static void deleteDicomStore(String dicomStoreName) throws IOException {
    // String dicomStoreName =
    // String.format(
    // DICOM_NAME, "your-project-id", "your-region-id", "your-dataset-id", "your-dicom-id");
    // Initialize the client, which will be used to interact with the service.
    CloudHealthcare client = createClient();
    // Create request and configure any parameters.
    DicomStores.Delete request = client.projects().locations().datasets().dicomStores().delete(dicomStoreName);
    // Execute the request and process the results.
    request.execute();
    System.out.println("DICOM store deleted.");
}
Also used : DicomStores(com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.DicomStores) CloudHealthcare(com.google.api.services.healthcare.v1.CloudHealthcare)

Example 9 with DicomStores

use of com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.DicomStores in project java-docs-samples by GoogleCloudPlatform.

the class DicomStoreGet method dicomeStoreGet.

public static void dicomeStoreGet(String dicomStoreName) throws IOException {
    // String dicomStoreName =
    // String.format(
    // DICOM_NAME, "your-project-id", "your-region-id", "your-dataset-id", "your-dicom-id");
    // Initialize the client, which will be used to interact with the service.
    CloudHealthcare client = createClient();
    // Create request and configure any parameters.
    DicomStores.Get request = client.projects().locations().datasets().dicomStores().get(dicomStoreName);
    // Execute the request and process the results.
    DicomStore store = request.execute();
    System.out.println("DICOM store retrieved: \n" + store.toPrettyString());
}
Also used : DicomStores(com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.DicomStores) DicomStore(com.google.api.services.healthcare.v1.model.DicomStore) CloudHealthcare(com.google.api.services.healthcare.v1.CloudHealthcare)

Example 10 with DicomStores

use of com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.DicomStores in project java-docs-samples by GoogleCloudPlatform.

the class DicomStoreCreate method dicomStoreCreate.

public static void dicomStoreCreate(String datasetName, String dicomStoreId) throws IOException {
    // String datasetName =
    // String.format(DATASET_NAME, "your-project-id", "your-region-id", "your-dataset-id");
    // Initialize the client, which will be used to interact with the service.
    CloudHealthcare client = createClient();
    // Configure the dicomStore to be created.
    Map<String, String> labels = new HashMap<String, String>();
    labels.put("key1", "value1");
    labels.put("key2", "value2");
    DicomStore content = new DicomStore().setLabels(labels);
    // Create request and configure any parameters.
    DicomStores.Create request = client.projects().locations().datasets().dicomStores().create(datasetName, content).setDicomStoreId(dicomStoreId);
    // Execute the request and process the results.
    DicomStore response = request.execute();
    System.out.println("DICOM store created: " + response.toPrettyString());
}
Also used : HashMap(java.util.HashMap) DicomStore(com.google.api.services.healthcare.v1.model.DicomStore) DicomStores(com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.DicomStores) CloudHealthcare(com.google.api.services.healthcare.v1.CloudHealthcare)

Aggregations

CloudHealthcare (com.google.api.services.healthcare.v1.CloudHealthcare)15 DicomStores (com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.DicomStores)11 HttpResponse (com.google.api.client.http.HttpResponse)5 DicomStore (com.google.api.services.healthcare.v1.model.DicomStore)5 File (java.io.File)3 FileOutputStream (java.io.FileOutputStream)3 OutputStream (java.io.OutputStream)3 Studies (com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.DicomStores.Studies)2 Instances (com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.DicomStores.Studies.Series.Instances)2 NotificationConfig (com.google.api.services.healthcare.v1.model.NotificationConfig)2 Operation (com.google.api.services.healthcare.v1.model.Operation)2 Policy (com.google.api.services.healthcare.v1.model.Policy)2 IOException (java.io.IOException)2 Binding (com.google.api.services.healthcare.v1.model.Binding)1 ExportDicomDataRequest (com.google.api.services.healthcare.v1.model.ExportDicomDataRequest)1 GoogleCloudHealthcareV1DicomGcsDestination (com.google.api.services.healthcare.v1.model.GoogleCloudHealthcareV1DicomGcsDestination)1 GoogleCloudHealthcareV1DicomGcsSource (com.google.api.services.healthcare.v1.model.GoogleCloudHealthcareV1DicomGcsSource)1 ImportDicomDataRequest (com.google.api.services.healthcare.v1.model.ImportDicomDataRequest)1 ListDicomStoresResponse (com.google.api.services.healthcare.v1.model.ListDicomStoresResponse)1 SetIamPolicyRequest (com.google.api.services.healthcare.v1.model.SetIamPolicyRequest)1