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 Operation that can be used to track the status of the job by calling GetOperation. Immediate fatal errors appear in the error field. Otherwise, when the operation finishes, a detailed response of type ExportMessagesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata.

Scopes

You will need authorization for at least one of the following scopes to make a valid call:

  • https://www.googleapis.com/auth/cloud-healthcare
  • https://www.googleapis.com/auth/cloud-platform

If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-healthcare. You can set the scope for this method like this: healthcare1-beta1 --scope <scope> projects locations-datasets-hl7-v2-stores-export ...

Required Scalar Argument

  • <name> (string)
    • Required. The name of the source HL7v2 store, in the format projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

ExportMessagesRequest:
  end-time: string
  filter: string
  gcs-destination:
    content-structure: string
    message-view: string
    uri-prefix: string
  pubsub-destination:
    pubsub-topic: string
  start-time: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r . end-time=sit
    • The end of the range in send_time (MSH.7, https://www.hl7.org/documentcenter/public_temp_2E58C1F9-1C23-BA17-0C6126475344DA9D/wg/conf/HL7MSH.htm) to process. If not specified, the time when the export is scheduled is used. This value has to come after the start_time defined below. Only messages whose send_time lies in the range start_time (inclusive) to end_time (exclusive) are exported.
  • filter=accusam
    • Restricts messages exported to those matching a filter, only applicable to PubsubDestination. The following syntax is available: * A string field value can be written as text inside quotation marks, for example &#34;query text&#34;. The only valid relational operation for text fields is equality (=), where text is searched within the field, rather than having the field be equal to the text. For example, &#34;Comment = great&#34; returns messages with great in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (=), along with the less than/greater than operators (&lt;, &lt;=, &gt;, &gt;=). Note that there is no inequality (!=) operator. You can prepend the NOT operator to an expression to negate it. * A date field value must be written in the yyyy-mm-dd format. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (=) , along with the less than/greater than operators (&lt;, &lt;=, &gt;, &gt;=). Note that there is no inequality (!=) operator. You can prepend the NOT operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding AND or OR operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, and is just another part of the character string to be matched. You can prepend the NOT operator to an expression to negate it. The following fields and functions are available for filtering: * message_type, from the MSH-9.1 field. For example, NOT message_type = &#34;ADT&#34;. * send_date or sendDate, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, send_date &lt; &#34;2017-01-02&#34;. * send_time, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, send_time &lt; &#34;2017-01-02T00:00:00-05:00&#34;. * create_time, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, create_time &lt; &#34;2017-01-02T00:00:00-05:00&#34;. * send_facility, the care center that the message came from, from the MSH-4 segment. For example, send_facility = &#34;ABC&#34;. Note: The filter will be applied to every message in the HL7v2 store whose send_time lies in the range defined by the start_time and the end_time. Even if the filter only matches a small set of messages, the export operation can still take a long time to finish when a lot of messages are between the specified start_time and end_time range.
  • gcs-destination content-structure=et
    • The format of the exported HL7v2 message files.
  • message-view=nonumy
    • Specifies the parts of the Message resource to include in the export. If not specified, FULL is used.
  • uri-prefix=accusam

    • URI of an existing Cloud Storage directory where the server writes result files, in the format gs://{bucket-id}/{path/to/destination/dir}. If there is no trailing slash, the service appends one when composing the object path.
  • ..pubsub-destination pubsub-topic=ut

    • The Pub/Sub topic that Pub/Sub messages are published on. Supplied by the client. The PubsubMessage contains the following fields: * PubsubMessage.Data contains the resource name. * PubsubMessage.MessageId is the ID of this notification. It is guaranteed to be unique within the topic. * PubsubMessage.PublishTime is the time when the message was published. 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.
  • .. start-time=voluptua.

    • The start of the range in send_time (MSH.7, https://www.hl7.org/documentcenter/public_temp_2E58C1F9-1C23-BA17-0C6126475344DA9D/wg/conf/HL7MSH.htm) to process. If not specified, the UNIX epoch (1970-01-01T00:00:00Z) is used. This value has to come before the end_time defined below. Only messages whose send_time lies in the range start_time (inclusive) to end_time (exclusive) are exported.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").