[
https://issues.apache.org/jira/browse/BEAM-11073?focusedWorklogId=504784&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-504784
]
ASF GitHub Bot logged work on BEAM-11073:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Oct/20 15:56
Start Date: 26/Oct/20 15:56
Worklog Time Spent: 10m
Work Description: poojavenkatram commented on a change in pull request
#13137:
URL: https://github.com/apache/beam/pull/13137#discussion_r512068306
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/DicomIO.java
##########
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.io.gcp.healthcare;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Map;
+import org.apache.beam.sdk.Pipeline;
+import org.apache.beam.sdk.io.gcp.pubsub.PubsubMessage;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.PTransform;
+import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.values.PCollection;
+import org.apache.beam.sdk.values.PCollectionTuple;
+import org.apache.beam.sdk.values.PInput;
+import org.apache.beam.sdk.values.POutput;
+import org.apache.beam.sdk.values.PValue;
+import org.apache.beam.sdk.values.TupleTag;
+import org.apache.beam.sdk.values.TupleTagList;
+import
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
+
+/**
+ * The DicomIO connectors allows Beam pipelines to make calls to the Dicom API
from Google Cloud
+ * Healthcare. https://cloud.google.com/healthcare/docs/concepts/dicom
+ */
+public class DicomIO {
+
+ /** The type ReadDicomStudyMetadata. */
+ public static class ReadDicomStudyMetadata
+ extends PTransform<PCollection<PubsubMessage>,
DicomIO.ReadDicomStudyMetadata.Result> {
+
+ /**
+ * This class makes a call to the retrieve metadata endpoint
+ *
(https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_metadata
It is
Review comment:
add a ). after the link....
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/DicomIO.java
##########
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.io.gcp.healthcare;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Map;
+import org.apache.beam.sdk.Pipeline;
+import org.apache.beam.sdk.io.gcp.pubsub.PubsubMessage;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.PTransform;
+import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.values.PCollection;
+import org.apache.beam.sdk.values.PCollectionTuple;
+import org.apache.beam.sdk.values.PInput;
+import org.apache.beam.sdk.values.POutput;
+import org.apache.beam.sdk.values.PValue;
+import org.apache.beam.sdk.values.TupleTag;
+import org.apache.beam.sdk.values.TupleTagList;
+import
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
+
+/**
+ * The DicomIO connectors allows Beam pipelines to make calls to the Dicom API
from Google Cloud
+ * Healthcare. https://cloud.google.com/healthcare/docs/concepts/dicom
+ */
+public class DicomIO {
+
+ /** The type ReadDicomStudyMetadata. */
Review comment:
add the class documentation here...the general rule of thumb is you add
the description and all details about the class with the class definition and
then each method will have it's specific description..
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/DicomIO.java
##########
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.io.gcp.healthcare;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Map;
+import org.apache.beam.sdk.Pipeline;
+import org.apache.beam.sdk.io.gcp.pubsub.PubsubMessage;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.PTransform;
+import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.values.PCollection;
+import org.apache.beam.sdk.values.PCollectionTuple;
+import org.apache.beam.sdk.values.PInput;
+import org.apache.beam.sdk.values.POutput;
+import org.apache.beam.sdk.values.PValue;
+import org.apache.beam.sdk.values.TupleTag;
+import org.apache.beam.sdk.values.TupleTagList;
+import
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
+
+/**
+ * The DicomIO connectors allows Beam pipelines to make calls to the Dicom API
from Google Cloud
+ * Healthcare. https://cloud.google.com/healthcare/docs/concepts/dicom
Review comment:
"allows Beam pipelines to make calls to the DICOM API of the Google
Cloud Healthcare API:
https://cloud.google.com/healthcare/docs/how-tos#dicom-guide" ? the link here
is better because it links to the How-to guide which is much easier for someone
to follow..
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/DicomIO.java
##########
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.io.gcp.healthcare;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Map;
+import org.apache.beam.sdk.Pipeline;
+import org.apache.beam.sdk.io.gcp.pubsub.PubsubMessage;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.PTransform;
+import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.values.PCollection;
+import org.apache.beam.sdk.values.PCollectionTuple;
+import org.apache.beam.sdk.values.PInput;
+import org.apache.beam.sdk.values.POutput;
+import org.apache.beam.sdk.values.PValue;
+import org.apache.beam.sdk.values.TupleTag;
+import org.apache.beam.sdk.values.TupleTagList;
+import
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
+
+/**
+ * The DicomIO connectors allows Beam pipelines to make calls to the Dicom API
from Google Cloud
+ * Healthcare. https://cloud.google.com/healthcare/docs/concepts/dicom
+ */
+public class DicomIO {
+
+ /** The type ReadDicomStudyMetadata. */
+ public static class ReadDicomStudyMetadata
+ extends PTransform<PCollection<PubsubMessage>,
DicomIO.ReadDicomStudyMetadata.Result> {
+
+ /**
+ * This class makes a call to the retrieve metadata endpoint
+ *
(https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_metadata
It is
+ * expecting a PubSub message as input, where the message's body will
contain the path to the
Review comment:
It defines a function that can be used to process a Pubsub message from
a DICOM store, read the DICOM study path and get the metadata of the specified
study.
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/DicomIO.java
##########
@@ -0,0 +1,172 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.io.gcp.healthcare;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Map;
+import org.apache.beam.sdk.Pipeline;
+import org.apache.beam.sdk.io.gcp.pubsub.PubsubMessage;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.PTransform;
+import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.values.PCollection;
+import org.apache.beam.sdk.values.PCollectionTuple;
+import org.apache.beam.sdk.values.PInput;
+import org.apache.beam.sdk.values.POutput;
+import org.apache.beam.sdk.values.PValue;
+import org.apache.beam.sdk.values.TupleTag;
+import org.apache.beam.sdk.values.TupleTagList;
+import
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
+
+/**
+ * The DicomIO connectors allows Beam pipelines to read from the Dicom API
from Google Cloud
+ * Healthcare.
+ *
+ * <p>Study-level metadata can be read using {@link ReadDicomStudyMetadata}.
It is expecting a
+ * PubSub message as input, where the message's body will contain the location
of the Study. You can
+ * learn how to configure PubSub messages to be published when an instance is
stored in a data store
+ * by following: https://cloud.google.com/healthcare/docs/how-tos/pubsub. The
connector will output
+ * a {@link ReadDicomStudyMetadata.Result} which will contain metadata of a
study encoded in json
+ * string
+ */
+public class DicomIO {
+
+ /** The type ReadDicomStudyMetadata. */
+ public static class ReadDicomStudyMetadata
+ extends PTransform<PCollection<PubsubMessage>,
DicomIO.ReadDicomStudyMetadata.Result> {
+
+ public ReadDicomStudyMetadata() {}
+
+ public static final TupleTag<String> OUT = new TupleTag<String>() {};
Review comment:
That's ok these names make it difficult to read and understand what
these values are without going through the code which is not ideal so we should
rename them..
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 504784)
Time Spent: 1h 40m (was: 1.5h)
> GCP HCLS Api - Dicom IO Connector for Java
> ------------------------------------------
>
> Key: BEAM-11073
> URL: https://issues.apache.org/jira/browse/BEAM-11073
> Project: Beam
> Issue Type: New Feature
> Components: io-java-gcp
> Reporter: Aliraza Nagamia
> Assignee: Aliraza Nagamia
> Priority: P2
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> We are looking to create a new Java Pipeline Connector to help facilitate
> Reading data from the Imaging API in GCP. Initially, this connector will be
> used to read study level metadata of Dicom instances.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)