Class HL7v2IO.Read.FetchHL7v2Message
- All Implemented Interfaces:
Serializable
,HasDisplayData
- Enclosing class:
HL7v2IO.Read
PTransform
to fetch a message from an Google Cloud Healthcare HL7v2 store based on
msgID.
This DoFn consumes a PCollection
of notifications String
s from the HL7v2
store, and fetches the actual HL7v2Message
object based on the id in the notification
and will output a PCollectionTuple
which contains the output and dead-letter PCollection
.
The PCollectionTuple
output will contain the following PCollection
:
HL7v2IO.Read.OUT
- Contains allPCollection
records successfully read from the HL7v2 store.HL7v2IO.Read.DEAD_LETTER
- Contains allPCollection
ofHealthcareIOError
message IDs which failed to be fetched from the HL7v2 store, with error message and stacktrace.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
DoFn for fetching messages from the HL7v2 store with error handling. -
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexpand
(PCollection<String> msgIds) Override this method to specify how thisPTransform
should be expanded on the givenInputT
.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Constructor Details
-
FetchHL7v2Message
public FetchHL7v2Message()Instantiates a new Fetch HL7v2 message DoFn.
-
-
Method Details
-
expand
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
method.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expand
in classPTransform<PCollection<String>,
HL7v2IO.Read.Result>
-