Index
Hl7V2Service
(interface)CreateHl7V2StoreRequest
(message)CreateMessageRequest
(message)DeleteHl7V2StoreRequest
(message)DeleteMessageRequest
(message)ExportMessagesRequest
(message)ExportMessagesResponse
(message)GcsDestination
(message)GcsDestination.ContentStructure
(enum)GcsSource
(message)GetHl7V2StoreMetricsRequest
(message)GetHl7V2StoreRequest
(message)GetMessageRequest
(message)GroupOrSegment
(message)Hl7SchemaConfig
(message)Hl7TypesConfig
(message)Hl7V2Store
(message)Hl7V2Store.Hl7V2NotificationConfig
(message)Hl7V2StoreMetrics
(message)Hl7V2StoreMetrics.Hl7V2StoreMetric
(message)ImportMessagesRequest
(message)ImportMessagesResponse
(message)IngestMessageErrorDetail
(message)IngestMessageRequest
(message)IngestMessageResponse
(message)ListHl7V2StoresRequest
(message)ListHl7V2StoresResponse
(message)ListMessagesRequest
(message)ListMessagesResponse
(message)Message
(message)MessageView
(enum)ParsedData
(message)ParserConfig
(message)ParserConfig.ParserVersion
(enum)PubsubDestination
(message)SchemaGroup
(message)SchemaPackage
(message)SchemaPackage.UnexpectedSegmentHandlingMode
(enum)SchemaSegment
(message)SchematizedData
(message)SchematizedParsingType
(enum)Segment
(message)Type
(message)Type.Field
(message)Type.Primitive
(enum)UpdateHl7V2StoreRequest
(message)UpdateMessageRequest
(message)VersionSource
(message)
Hl7V2Service
A service for handling HL7v2 messages (v2.x).
CreateHl7V2Store |
---|
Creates a new HL7v2 store within the parent dataset.
|
CreateMessage |
---|
Parses and stores an HL7v2 message. This method triggers an asynchronous notification to any Pub/Sub topic configured in
|
DeleteHl7V2Store |
---|
Deletes the specified HL7v2 store and removes all messages that it contains.
|
DeleteMessage |
---|
Deletes an HL7v2 message.
|
ExportMessages |
---|
Exports the messages to a destination. To filter messages to be exported, define a filter using the start and end time, relative to the message generation time (MSH.7). This API returns an Immediate fatal errors appear in the
|
GetHl7V2Store |
---|
Gets the specified HL7v2 store.
|
GetHl7V2StoreMetrics |
---|
Gets metrics associated with the HL7v2 store.
|
GetMessage |
---|
Gets an HL7v2 message.
|
ImportMessages |
---|
Import messages to the HL7v2 store by loading data from the specified sources. This method is optimized to load large quantities of data using import semantics that ignore some HL7v2 store configuration options and are not suitable for all use cases. It is primarily intended to load data into an empty HL7v2 store that is not being used by other clients. An existing message will be overwritten if a duplicate message is imported. A duplicate message is a message with the same raw bytes as a message that already exists in this HL7v2 store. When a message is overwritten, its labels will also be overwritten. The import operation is idempotent unless the input data contains multiple valid messages with the same raw bytes but different labels. In that case, after the import completes, the store contains exactly one message with those raw bytes but there is no ordering guarantee on which version of the labels it has. The operation result counters do not count duplicated raw bytes as an error and count one success for each message in the input, which might result in a success count larger than the number of messages in the HL7v2 store. If some messages fail to import, for example due to parsing errors, successfully imported messages are not rolled back. This method returns an Immediate fatal errors appear in the
|
IngestMessage |
---|
Parses and stores an HL7v2 message. This method triggers an asynchronous notification to any Pub/Sub topic configured in
|
ListHl7V2Stores |
---|
Lists the HL7v2 stores in the given dataset.
|
ListMessages |
---|
Lists all the messages in the given HL7v2 store with support for filtering. Note: HL7v2 messages are indexed asynchronously, so there might be a slight delay between the time a message is created and when it can be found through a filter.
|
UpdateHl7V2Store |
---|
Updates the HL7v2 store.
|
UpdateMessage |
---|
Update the message. The contents of the message in
|
CreateHl7V2StoreRequest
Creates a new HL7v2 store.
Fields | |
---|---|
parent |
Required. The name of the dataset this HL7v2 store belongs to. Authorization requires the following IAM permission on the specified resource
|
hl7_v2_store_id |
Required. The ID of the HL7v2 store that is being created. The string must match the following regex: |
hl7_v2_store |
Configuration info for this HL7v2 store. |
CreateMessageRequest
Creates a new message.
Fields | |
---|---|
parent |
Required. The name of the HL7v2 store this message belongs to. Authorization requires the following IAM permission on the specified resource
|
message |
Required. HL7v2 message. |
DeleteHl7V2StoreRequest
Deletes the specified HL7v2 store.
Fields | |
---|---|
name |
Required. The resource name of the HL7v2 store to delete. Authorization requires the following IAM permission on the specified resource
|
DeleteMessageRequest
Deletes a message from the specified HL7v2 store.
Fields | |
---|---|
name |
Required. The resource name of the HL7v2 message to delete. Authorization requires the following IAM permission on the specified resource
|
ExportMessagesRequest
Request to schedule an export.
Fields | |
---|---|
name |
Required. The name of the source HL7v2 store, in the format Authorization requires the following IAM permission on the specified resource
|
start_time |
The start of the range in This value has to come before the |
end_time |
The end of the range in This value has to come after the |
filter |
Restricts messages exported to those matching a filter, only applicable to
The following fields and functions are available for filtering:
Note: The filter will be applied to every message in the HL7v2 store whose |
Union field destination . Export destination. destination can be only one of the following: |
|
gcs_destination |
Export to a Cloud Storage destination. |
pubsub_destination |
Export messages to a Pub/Sub topic. |
ExportMessagesResponse
This type has no fields.
Final response for the export operation. This structure is included in the response
to describe the detailed outcome.
GcsDestination
The Cloud Storage output destination.
The Cloud Healthcare Service Agent requires the roles/storage.objectAdmin
Cloud IAM roles on the Cloud Storage location.
Fields | |
---|---|
uri_prefix |
URI of an existing Cloud Storage directory where the server writes result files, in the format |
message_view |
Specifies the parts of the Message resource to include in the export. If not specified, FULL is used. |
content_structure |
The format of the exported HL7v2 message files. |
ContentStructure
The content structure of the exported HL7v2 message files.
Enums | |
---|---|
CONTENT_STRUCTURE_UNSPECIFIED |
If the content structure is not specified, the default value MESSAGE_JSON will be used. |
MESSAGE_JSON |
Messages are printed using the JSON format returned from the GetMessage API. Messages are delimited with newlines. |
GcsSource
Specifies the configuration for importing data from Cloud Storage.
Fields | |
---|---|
uri |
Points to a Cloud Storage URI containing file(s) to import. The URI must be in the following format:
Files matching the wildcard are expected to contain content only, no metadata. |
GetHl7V2StoreMetricsRequest
Request to get HL7v2 store metrics.
Fields | |
---|---|
name |
Required. The resource name of the HL7v2 store to get metrics for, in the format Authorization requires the following IAM permission on the specified resource
|
GetHl7V2StoreRequest
Gets an HL7v2 store.
Fields | |
---|---|
name |
Required. The resource name of the HL7v2 store to get. Authorization requires the following IAM permission on the specified resource
|
GetMessageRequest
Gets a message from the specified HL7v2 store.
Fields | |
---|---|
name |
Required. The resource name of the HL7v2 message to retrieve. Authorization requires the following IAM permission on the specified resource
|
view |
Specifies which parts of the Message resource to return in the response. When unspecified, equivalent to FULL. |
GroupOrSegment
Construct representing a logical group or a segment.
Fields | |
---|---|
Union field
|
|
segment |
|
group |
Hl7SchemaConfig
Root config message for HL7v2 schema. This contains a schema structure of groups and segments, and filters that determine which messages to apply the schema structure to.
Fields | |
---|---|
version[] |
Each VersionSource is tested and only if they all match is the schema used for the message. |
message_schema_configs |
Map from each HL7v2 message type and trigger event pair, such as ADT_A04, to its schema configuration root group. |
Hl7TypesConfig
Root config for HL7v2 datatype definitions for a specific HL7v2 version.
Fields | |
---|---|
version[] |
The version selectors that this config applies to. A message must match ALL version sources to apply. |
type[] |
The HL7v2 type definitions. |
Hl7V2Store
Represents an HL7v2 store.
Fields | |
---|---|
name |
Identifier. Resource name of the HL7v2 store, of the form |
parser_config |
The configuration for the parser. It determines how the server parses the messages. |
labels |
User-supplied key-value pairs used to organize HL7v2 stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. |
notification_configs[] |
A list of notification configs. Each configuration uses a filter to determine whether to publish a message (both Ingest & Create) on the corresponding notification destination. Only the message name is sent as part of the notification. Supplied by the client. |
reject_duplicate_message |
Determines whether to reject duplicate messages. A duplicate message is a message with the same raw bytes as a message that has already been ingested/created in this HL7v2 store. The default value is false, meaning that the store accepts the duplicate messages and it also returns the same ACK message in the |
Hl7V2NotificationConfig
Specifies where and whether to send notifications upon changes to a data store.
Fields | |
---|---|
pubsub_topic |
The Pub/Sub topic that notifications of changes are published on. Supplied by the client. The notification is a
Note that notifications are only sent if the topic is non-empty. Topic names must be scoped to a project. The Cloud Healthcare API service account, service-PROJECT_NUMBER@gcp-sa-healthcare.iam.gserviceaccount.com, must have publisher permissions on the given Pub/Sub topic. Not having adequate permissions causes the calls that send notifications to fail. If a notification cannot be published to Pub/Sub, errors are logged to Cloud Logging. For more information, see Viewing error logs in Cloud Logging). |
filter |
Restricts notifications sent for messages matching a filter. If this is empty, all messages are matched. The following syntax is available:
The following fields and functions are available for filtering:
|
Hl7V2StoreMetrics
List of metrics for a given HL7v2 store.
Fields | |
---|---|
name |
The resource name of the HL7v2 store to get metrics for, in the format |
metrics[] |
List of HL7v2 store metrics by message type. |
Hl7V2StoreMetric
Count of messages and total storage size by type for a given HL7 store.
Fields | |
---|---|
message_type |
The Hl7v2 message type this metric applies to, such as |
count |
The total count of HL7v2 messages in the store for the given message type. |
structured_storage_size_bytes |
The total amount of structured storage used by HL7v2 messages of this message type in the store. |
ImportMessagesRequest
Request to import messages.
Fields | |
---|---|
name |
Required. The name of the target HL7v2 store, in the format Authorization requires the following IAM permission on the specified resource
|
Union field To enable the Cloud Healthcare API to read from resources in your project such as Cloud Storage buckets, you must give the consumer Cloud Healthcare API service account the proper permissions. The service account is: |
|
gcs_source |
Cloud Storage source data location and import configuration. The Cloud Healthcare Service Agent requires the |
ImportMessagesResponse
This type has no fields.
Final response of importing messages. This structure is included in the response
to describe the detailed outcome. It is only included when the operation finishes successfully.
IngestMessageErrorDetail
Contains the HL7v2 NACK message for ingest message failure.
Fields | |
---|---|
hl7_nack |
HL7v2 NACK message. |
IngestMessageRequest
Ingests a message into the specified HL7v2 store.
Fields | |
---|---|
parent |
Required. The name of the HL7v2 store this message belongs to. Authorization requires the following IAM permission on the specified resource
|
message |
Required. HL7v2 message to ingest. |
IngestMessageResponse
Acknowledges that a message has been ingested into the specified HL7v2 store.
Fields | |
---|---|
hl7_ack |
HL7v2 ACK message. |
message |
Created message resource. |
ListHl7V2StoresRequest
Lists the HL7v2 stores in the given dataset.
Fields | |
---|---|
parent |
Required. Name of the dataset. Authorization requires the following IAM permission on the specified resource
|
page_size |
Limit on the number of HL7v2 stores to return in a single response. If not specified, 100 is used. May not be larger than 1000. |
page_token |
The next_page_token value returned from the previous List request, if any. |
filter |
Restricts stores returned to those matching a filter. The following syntax is available:
Only filtering on labels is supported. For example, |
ListHl7V2StoresResponse
Lists the HL7v2 stores in the given dataset.
Fields | |
---|---|
hl7_v2_stores[] |
The returned HL7v2 stores. Won't be more HL7v2 stores than the value of page_size in the request. |
next_page_token |
Token to retrieve the next page of results or empty if there are no more results in the list. |
ListMessagesRequest
Lists the messages in the specified HL7v2 store.
Fields | |
---|---|
parent |
Required. Name of the HL7v2 store to retrieve messages from. Authorization requires the following IAM permission on the specified resource
|
page_size |
Limit on the number of messages to return in a single response. If not specified, 100 is used. May not be larger than 1000. |
page_token |
The next_page_token value returned from the previous List request, if any. |
filter |
Restricts messages returned to those matching a filter. The following syntax is available:
Fields/functions available for filtering are:
|
order_by |
Orders messages returned by the specified order_by clause. Syntax: https://cloud.google.com/apis/design/design_patterns#sorting_order Fields available for ordering are:
|
view |
Specifies the parts of the Message to return in the response. When unspecified, equivalent to BASIC. Setting this to anything other than BASIC with a |
ListMessagesResponse
Lists the messages in the specified HL7v2 store.
Fields | |
---|---|
hl7_v2_messages[] |
The returned Messages. Won't be more Messages than the value of page_size in the request. See |
next_page_token |
Token to retrieve the next page of results or empty if there are no more results in the list. |
Message
A complete HL7v2 message. See Introduction to HL7 Standards for details on the standard.
Fields | |
---|---|
name |
Output only. Resource name of the Message, of the form |
data |
Required. Raw message bytes. |
create_time |
Output only. The datetime when the message was created. Set by the server. |
send_facility |
The hospital that this message came from. MSH-4. |
send_time |
The datetime the sending application sent this message. MSH-7. |
message_type |
The message type for this message. MSH-9.1. |
patient_ids[] |
All patient IDs listed in the PID-2, PID-3, and PID-4 segments of this message. |
labels |
User-supplied key-value pairs used to organize HL7v2 stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. |
parsed_data |
Output only. The parsed version of the raw message data. |
schematized_data |
The parsed version of the raw message data schematized according to this store's schemas and type definitions. |
MessageView
Enums | |
---|---|
MESSAGE_VIEW_UNSPECIFIED |
Not specified, equivalent to FULL. |
RAW_ONLY |
Server responses include all the message fields except parsed_data field, and schematized_data fields. |
PARSED_ONLY |
Server responses include all the message fields except data field, and schematized_data fields. |
FULL |
Server responses include all the message fields. |
SCHEMATIZED_ONLY |
Server responses include all the message fields except data and parsed_data fields. |
BASIC |
Server responses include only the name field. |
ParsedData
The content of a HL7v2 message in a structured format.
Fields | |
---|---|
segments[] |
ParserConfig
The configuration for the parser. It determines how the server parses the messages.
Fields | |
---|---|
allow_null_header |
Determines whether messages with no header are allowed. |
segment_terminator |
Byte(s) to use as the segment terminator. If this is unset, '\r' is used as segment terminator, matching the HL7 version 2 specification. |
schema |
Schemas used to parse messages in this store, if schematized parsing is desired. |
version |
Immutable. Determines the version of both the default parser to be used when |
ParserVersion
The parser version. Applies to both the default parser and the schematized parser. The highest version of the parser is recommended.
Enums | |
---|---|
PARSER_VERSION_UNSPECIFIED |
Unspecified parser version, equivalent to V1. |
V1 |
The parsed_data includes every given non-empty message field except the Field Separator (MSH-1) field. As a result, the parsed MSH segment starts with the MSH-2 field and the field numbers are off-by-one with respect to the HL7 standard. |
V2 |
The parsed_data includes every given non-empty message field. |
V3 |
This version is the same as V2, with the following change. The If |
PubsubDestination
The Pub/Sub output destination.
The Cloud Healthcare Service Agent requires the roles/pubsub.publisher
Cloud IAM role on the Pub/Sub topic.
Fields | |
---|---|
pubsub_topic |
The Pub/Sub topic that Pub/Sub messages are published on. Supplied by the client. The
Topic names must be scoped to a project. The Cloud Healthcare API service account, service-PROJECT_NUMBER@gcp-sa-healthcare.iam.gserviceaccount.com, must have publisher permissions on the given Pub/Sub topic. Not having adequate permissions causes the calls that send notifications to fail. |
SchemaGroup
An HL7v2 logical group construct.
Fields | |
---|---|
name |
The name of this group. For example, "ORDER_DETAIL". |
choice |
True indicates that this is a choice group, meaning that only one of its segments can exist in a given message. |
min_occurs |
The minimum number of times this group must be present/repeated. |
max_occurs |
The maximum number of times this group can be repeated. 0 or -1 means unbounded. |
members[] |
Nested groups and/or segments. |
SchemaPackage
A schema package contains a set of schemas and type definitions.
Fields | |
---|---|
schematized_parsing_type |
Determines how messages that fail to parse are handled. |
schemas[] |
Schema configs that are layered based on their VersionSources that match the incoming message. Schema configs present in higher indices override those in lower indices with the same message type and trigger event if their VersionSources all match an incoming message. |
types[] |
Schema type definitions that are layered based on their VersionSources that match the incoming message. Type definitions present in higher indices override those in lower indices with the same type name if their VersionSources all match an incoming message. |
ignore_min_occurs |
Flag to ignore all min_occurs restrictions in the schema. This means that incoming messages can omit any group, segment, field, component, or subcomponent. |
unexpected_segment_handling |
Determines how unexpected segments (segments not matched to the schema) are handled. |
UnexpectedSegmentHandlingMode
Determines how unexpected segments are handled. An unexpected segment is a segment that is present in a message but has no corresponding match in the message type definition.
Enums | |
---|---|
UNEXPECTED_SEGMENT_HANDLING_MODE_UNSPECIFIED |
Unspecified handling mode, equivalent to FAIL. |
FAIL |
Unexpected segments fail to parse and return an error. |
SKIP |
Unexpected segments do not fail, but are omitted from the output. |
PARSE |
Unexpected segments do not fail, but are parsed in place and added to the current group. If a segment has a type definition, it is used, otherwise it is parsed as VARIES. |
SchemaSegment
An HL7v2 Segment.
Fields | |
---|---|
type |
The Segment type. For example, "PID". |
min_occurs |
The minimum number of times this segment can be present in this group. |
max_occurs |
The maximum number of times this segment can be present in this group. 0 or -1 means unbounded. |
SchematizedData
The content of an HL7v2 message in a structured format as specified by a schema.
Fields | |
---|---|
Union field
|
|
data |
JSON output of the parser. |
error |
The error output of the parser. |
SchematizedParsingType
Determines the failure mode for schematized parsing.
Enums | |
---|---|
SCHEMATIZED_PARSING_TYPE_UNSPECIFIED |
Unspecified schematized parsing type, equivalent to SOFT_FAIL . |
SOFT_FAIL |
Messages that fail to parse are still stored and ACKed but a parser error is stored in place of the schematized data. |
HARD_FAIL |
Messages that fail to parse are rejected from ingestion/insertion and return an error code. |
Segment
A segment in a structured format.
Fields | |
---|---|
segment_id |
A string that indicates the type of segment. For example, EVN or PID. |
set_id |
Set ID for segments that can be in a set. This can be empty if it's missing or isn't applicable. |
fields |
A mapping from the positional location to the value. The key string uses zero-based indexes separated by dots to identify Fields, components and sub-components. A bracket notation is also used to identify different instances of a repeated field. Regex for key: (\d+)([\d+])?(.\d+)?(.\d+)? Examples of (key, value) pairs:
|
Type
A type definition for some HL7v2 type (incl. Segments and Datatypes).
Fields | |
---|---|
name |
The name of this type. This would be the segment or datatype name. For example, "PID" or "XPN". |
primitive |
If this is a primitive type then this field is the type of the primitive For example, STRING. Leave unspecified for composite types. |
fields[] |
The (sub) fields this type has (if not primitive). |
Field
A (sub) field of a type.
Fields | |
---|---|
name |
The name of the field. For example, "PID-1" or just "1". |
type |
The type of this field. A Type with this name must be defined in an Hl7TypesConfig. |
table |
The HL7v2 table this field refers to. For example, PID-15 (Patient's Primary Language) usually refers to table "0296". |
min_occurs |
The minimum number of times this field must be present/repeated. |
max_occurs |
The maximum number of times this field can be repeated. 0 or -1 means unbounded. |
Primitive
Enums | |
---|---|
PRIMITIVE_UNSPECIFIED |
Not a primitive. |
STRING |
String primitive. |
VARIES |
Element that can have unschematized children. |
UNESCAPED_STRING |
Like STRING, but all delimiters below this element are ignored. |
UpdateHl7V2StoreRequest
Request to update the given HL7v2 store. For example, to change the Cloud Pub/Sub topic.
Fields | |
---|---|
hl7_v2_store |
Required. The HL7v2 store to update. Only fields listed in Authorization requires the following IAM permission on the specified resource
|
update_mask |
Required. The update mask applies to the resource. For the |
UpdateMessageRequest
Request to update labels on the given message.
Fields | |
---|---|
message |
Required. The message resource which updates the resource on the server. Only fields listed in Authorization requires the following IAM permission on the specified resource
|
update_mask |
Required. The update mask applies to the resource. For the |
VersionSource
Describes a selector for extracting and matching an MSH field to a value.
Fields | |
---|---|
msh_field |
The field to extract from the MSH segment. For example, "3.1" or "18[1].1". |
value |
The value to match with the field. For example, "My Application Name" or "2.3". |