hl7_v2_stores
Creates, updates, deletes, gets or lists a hl7_v2_stores
resource.
Overview
Name | hl7_v2_stores |
Type | Resource |
Id | google.healthcare.hl7_v2_stores |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Resource name of the HL7v2 store, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id} . |
labels | object | 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}{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. |
notificationConfigs | array | Optional. 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. |
parserConfig | object | Optional. The configuration for the parser. It determines how the server parses the messages. (id: ParserConfig) |
rejectDuplicateMessage | boolean | Optional. 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 IngestMessageResponse as has been returned previously. Note that only one resource is created in the store. When this field is set to true, CreateMessage/IngestMessage requests with a duplicate message will be rejected by the store, and IngestMessageErrorDetail returns a NACK message upon rejection. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Resource name of the HL7v2 store, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id} . |
labels | object | 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}{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. |
notificationConfigs | array | Optional. 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. |
parserConfig | object | Optional. The configuration for the parser. It determines how the server parses the messages. (id: ParserConfig) |
rejectDuplicateMessage | boolean | Optional. 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 IngestMessageResponse as has been returned previously. Note that only one resource is created in the store. When this field is set to true, CreateMessage/IngestMessage requests with a duplicate message will be rejected by the store, and IngestMessageErrorDetail returns a NACK message upon rejection. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , datasetsId , hl7V2StoresId | Gets the specified HL7v2 store. | |
list | select | projectsId , locationsId , datasetsId | pageSize , pageToken , filter | Lists the HL7v2 stores in the given dataset. |
create | insert | projectsId , locationsId , datasetsId | hl7V2StoreId | Creates a new HL7v2 store within the parent dataset. |
patch | update | projectsId , locationsId , datasetsId , hl7V2StoresId | updateMask | Updates the HL7v2 store. |
delete | delete | projectsId , locationsId , datasetsId , hl7V2StoresId | Deletes the specified HL7v2 store and removes all messages that it contains. | |
export | exec | projectsId , locationsId , datasetsId , hl7V2StoresId | 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. | |
import | exec | projectsId , locationsId , datasetsId , hl7V2StoresId | 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 Operation that can be used to track the status of the import by calling GetOperation. Immediate fatal errors appear in the error field, errors are also logged to Cloud Logging (see Viewing error logs in Cloud Logging). Otherwise, when the operation finishes, a response of type ImportMessagesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata. | |
rollback | exec | projectsId , locationsId , datasetsId , hl7V2StoresId | Rolls back messages from the HL7v2 store to the specified time. This method returns an Operation that can be used to track the status of the rollback by calling GetOperation. Immediate fatal errors appear in the error field, errors are also logged to Cloud Logging (see Viewing error logs in Cloud Logging). Otherwise, when the operation finishes, a detailed response of type RollbackHl7V2MessagesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
datasetsId | string | |
hl7V2StoresId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
hl7V2StoreId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets the specified HL7v2 store.
SELECT
name,
labels,
notificationConfigs,
parserConfig,
rejectDuplicateMessage
FROM google.healthcare.hl7_v2_stores
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND datasetsId = '{{ datasetsId }}' -- required
AND hl7V2StoresId = '{{ hl7V2StoresId }}' -- required;
Lists the HL7v2 stores in the given dataset.
SELECT
name,
labels,
notificationConfigs,
parserConfig,
rejectDuplicateMessage
FROM google.healthcare.hl7_v2_stores
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND datasetsId = '{{ datasetsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
INSERT
examples
- create
- Manifest
Creates a new HL7v2 store within the parent dataset.
INSERT INTO google.healthcare.hl7_v2_stores (
data__name,
data__parserConfig,
data__labels,
data__notificationConfigs,
data__rejectDuplicateMessage,
projectsId,
locationsId,
datasetsId,
hl7V2StoreId
)
SELECT
'{{ name }}',
'{{ parserConfig }}',
'{{ labels }}',
'{{ notificationConfigs }}',
{{ rejectDuplicateMessage }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ datasetsId }}',
'{{ hl7V2StoreId }}'
RETURNING
name,
labels,
notificationConfigs,
parserConfig,
rejectDuplicateMessage
;
# Description fields are for documentation purposes
- name: hl7_v2_stores
props:
- name: projectsId
value: string
description: Required parameter for the hl7_v2_stores resource.
- name: locationsId
value: string
description: Required parameter for the hl7_v2_stores resource.
- name: datasetsId
value: string
description: Required parameter for the hl7_v2_stores resource.
- name: name
value: string
description: >
Identifier. Resource name of the HL7v2 store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.
- name: parserConfig
value: object
description: >
Optional. The configuration for the parser. It determines how the server parses the messages.
- name: labels
value: object
description: >
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}{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.
- name: notificationConfigs
value: array
description: >
Optional. 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.
- name: rejectDuplicateMessage
value: boolean
description: >
Optional. 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 IngestMessageResponse as has been returned previously. Note that only one resource is created in the store. When this field is set to true, CreateMessage/IngestMessage requests with a duplicate message will be rejected by the store, and IngestMessageErrorDetail returns a NACK message upon rejection.
- name: hl7V2StoreId
value: string
UPDATE
examples
- patch
Updates the HL7v2 store.
UPDATE google.healthcare.hl7_v2_stores
SET
data__name = '{{ name }}',
data__parserConfig = '{{ parserConfig }}',
data__labels = '{{ labels }}',
data__notificationConfigs = '{{ notificationConfigs }}',
data__rejectDuplicateMessage = {{ rejectDuplicateMessage }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required
AND hl7V2StoresId = '{{ hl7V2StoresId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
labels,
notificationConfigs,
parserConfig,
rejectDuplicateMessage;
DELETE
examples
- delete
Deletes the specified HL7v2 store and removes all messages that it contains.
DELETE FROM google.healthcare.hl7_v2_stores
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required
AND hl7V2StoresId = '{{ hl7V2StoresId }}' --required;
Lifecycle Methods
- export
- import
- rollback
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.
EXEC google.healthcare.hl7_v2_stores.export
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@datasetsId='{{ datasetsId }}' --required,
@hl7V2StoresId='{{ hl7V2StoresId }}' --required
@@json=
'{
"startTime": "{{ startTime }}",
"endTime": "{{ endTime }}",
"filter": "{{ filter }}",
"gcsDestination": "{{ gcsDestination }}",
"pubsubDestination": "{{ pubsubDestination }}"
}';
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 Operation that can be used to track the status of the import by calling GetOperation. Immediate fatal errors appear in the error field, errors are also logged to Cloud Logging (see Viewing error logs in Cloud Logging). Otherwise, when the operation finishes, a response of type ImportMessagesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata.
EXEC google.healthcare.hl7_v2_stores.import
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@datasetsId='{{ datasetsId }}' --required,
@hl7V2StoresId='{{ hl7V2StoresId }}' --required
@@json=
'{
"gcsSource": "{{ gcsSource }}"
}';
Rolls back messages from the HL7v2 store to the specified time. This method returns an Operation that can be used to track the status of the rollback by calling GetOperation. Immediate fatal errors appear in the error field, errors are also logged to Cloud Logging (see Viewing error logs in Cloud Logging). Otherwise, when the operation finishes, a detailed response of type RollbackHl7V2MessagesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata.
EXEC google.healthcare.hl7_v2_stores.rollback
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@datasetsId='{{ datasetsId }}' --required,
@hl7V2StoresId='{{ hl7V2StoresId }}' --required
@@json=
'{
"rollbackTime": "{{ rollbackTime }}",
"force": {{ force }},
"changeType": "{{ changeType }}",
"resultGcsBucket": "{{ resultGcsBucket }}",
"inputGcsObject": "{{ inputGcsObject }}",
"excludeRollbacks": {{ excludeRollbacks }},
"filteringFields": "{{ filteringFields }}"
}';