Class HL7v2IO
HL7v2IO
provides an API for reading from and writing to Google Cloud Healthcare HL7v2 API.
Read
HL7v2 Messages can be fetched from the HL7v2 store in two ways Message Fetching and Message Listing.
Message Fetching
Message Fetching with HL7v2IO.Read
supports use cases where you have a $PCollection
of message IDS. This is appropriate for reading the HL7v2 notifications from a
Pub/Sub subscription with PubsubIO.readStrings()
or in cases where you have a manually
prepared list of messages that you need to process (e.g. in a text file read with TextIO
) .
Fetch Message contents from HL7v2 Store based on the PCollection
of message ID strings
HL7v2IO.Read.Result
where one can call HL7v2IO.HL7v2ReadResult.getMessages()
to retrived a
PCollection
containing the successfully fetched HL7v2Message
s and/or HL7v2IO.HL7v2ReadResult.getFailedReads()
to retrieve a PCollection
of HealthcareIOError
containing the msgID that could not be fetched and the exception as a HealthcareIOError
,
this can be used to write to the dead letter storage system of your choosing. This error handling
is mainly to catch scenarios where the upstream PCollection
contains IDs that are not
valid or are not reachable due to permissions issues.
Message Listing Message Listing with HL7v2IO.ListHL7v2Messages
supports batch use
cases where you want to process all the messages in an HL7v2 store or those matching a filter
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The type Read that reads HL7v2 message contents given a PCollection ofHL7v2ReadParameter
.static class
List HL7v2 messages in HL7v2 Stores with optional filter.static class
The type Read that reads HL7v2 message contents given a PCollection of message IDs strings.static class
The type Write that writes the given PCollection of HL7v2 messages. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HL7v2IO.Read
getAll()
Retrieve all HL7v2 Messages from a PCollection of message IDs (such as from PubSub notification subscription).static HL7v2IO.Write
ingestMessages
(String hl7v2Store) Write with Messages.Ingest method.static HL7v2IO.ListHL7v2Messages
Read all HL7v2 Messages from a single store.static HL7v2IO.ListHL7v2Messages
read
(ValueProvider<String> hl7v2Store) Read all HL7v2 Messages from a single store.static HL7v2IO.ListHL7v2Messages
Read all HL7v2 Messages from multiple stores.static HL7v2IO.ListHL7v2Messages
readAll
(ValueProvider<List<String>> hl7v2Stores) Read all HL7v2 Messages from multiple stores.static HL7v2IO.HL7v2Read
Retrieve all HL7v2 Messages from a PCollection ofHL7v2ReadParameter
.static HL7v2IO.ListHL7v2Messages
readAllWithFilter
(List<String> hl7v2Stores, String filter) Read all HL7v2 Messages from a multiple stores matching a filter.static HL7v2IO.ListHL7v2Messages
readAllWithFilter
(ValueProvider<List<String>> hl7v2Stores, ValueProvider<String> filter) Read all HL7v2 Messages from a multiple stores matching a filter.static HL7v2IO.ListHL7v2Messages
readWithFilter
(String hl7v2Store, String filter) Read all HL7v2 Messages from a single store matching a filter.static HL7v2IO.ListHL7v2Messages
readWithFilter
(ValueProvider<String> hl7v2Store, ValueProvider<String> filter) Read all HL7v2 Messages from a single store matching a filter.
-
Constructor Details
-
HL7v2IO
public HL7v2IO()
-
-
Method Details
-
getAll
Retrieve all HL7v2 Messages from a PCollection of message IDs (such as from PubSub notification subscription). -
readAllRequests
Retrieve all HL7v2 Messages from a PCollection ofHL7v2ReadParameter
. -
readAll
Read all HL7v2 Messages from multiple stores. -
readAll
Read all HL7v2 Messages from multiple stores. -
read
Read all HL7v2 Messages from a single store. -
read
Read all HL7v2 Messages from a single store. -
readWithFilter
Read all HL7v2 Messages from a single store matching a filter.- See Also:
-
readWithFilter
public static HL7v2IO.ListHL7v2Messages readWithFilter(ValueProvider<String> hl7v2Store, ValueProvider<String> filter) Read all HL7v2 Messages from a single store matching a filter.- See Also:
-
readAllWithFilter
Read all HL7v2 Messages from a multiple stores matching a filter.- See Also:
-
readAllWithFilter
public static HL7v2IO.ListHL7v2Messages readAllWithFilter(ValueProvider<List<String>> hl7v2Stores, ValueProvider<String> filter) Read all HL7v2 Messages from a multiple stores matching a filter.- See Also:
-
ingestMessages
- Parameters:
hl7v2Store
- the hl 7 v 2 store- Returns:
- the write
-