Method: hl7V2Stores.export

Full name: projects.locations.datasets.hl7V2Stores.export

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 operations.get.

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.

HTTP request

POST https://healthcare.googleapis.com/v1beta1/{name=projects/*/locations/*/datasets/*/hl7V2Stores/*}:export

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

The name of the source HL7v2 store, in the format projects/{projectId}/locations/{locationId}/datasets/{datasetId}/hl7v2Stores/{hl7v2_store_id}

Authorization requires the following IAM permission on the specified resource name:

  • healthcare.hl7v2Stores.export

Request body

The request body contains data with the following structure:

JSON representation
{
  "startTime": string,
  "endTime": string,
  "gcsDestination": {
    object(GcsDestination)
  }
}
Fields
startTime

string(Timestamp format)

The start of the range in sendTime (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 endTime defined below. Only messages whose sendTime lies in the range startTime (inclusive) to endTime (exclusive) are exported.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

endTime

string(Timestamp format)

The end of the range in sendTime (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 startTime defined below. Only messages whose sendTime lies in the range startTime (inclusive) to endTime (exclusive) are exported.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

gcsDestination

object(GcsDestination)

Export to a Cloud Storage destination.

Response body

If successful, the response body contains an instance of Operation.

Authorization Scopes

Requires one of the following OAuth scopes:

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

For more information, see the Authentication Overview.

GcsDestination

The Cloud Storage output destination.

The Cloud Healthcare Service Agent requires the roles/storage.objectAdmin Cloud IAM roles on the Cloud Storage location.

JSON representation
{
  "uriPrefix": string,
  "messageView": enum(MessageView),
  "contentStructure": enum(ContentStructure)
}
Fields
uriPrefix

string

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.

messageView

enum(MessageView)

Specifies the parts of the Message resource to include in the export. If not specified, FULL is used.

contentStructure

enum(ContentStructure)

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 messages.get API. Messages are delimited with newlines.