messages
Creates, updates, deletes, gets or lists a messages
resource.
Overview
Name | messages |
Type | Resource |
Id | google.healthcare.messages |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Resource name of the Message, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id} . |
createTime | string (google-datetime) | Output only. The datetime when the message was created. Set by the server. |
data | string (byte) | Required. Raw message bytes. |
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. |
messageType | string | Output only. The message type for this message. MSH-9.1. |
parsedData | object | Output only. The parsed version of the raw message data. (id: ParsedData) |
patientIds | array | Output only. All patient IDs listed in the PID-2, PID-3, and PID-4 segments of this message. |
schematizedData | object | Output only. The parsed version of the raw message data schematized according to this store's schemas and type definitions. (id: SchematizedData) |
sendFacility | string | Output only. The hospital that this message came from. MSH-4. |
sendTime | string (google-datetime) | Output only. The datetime the sending application sent this message. MSH-7. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Resource name of the Message, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id} . |
createTime | string (google-datetime) | Output only. The datetime when the message was created. Set by the server. |
data | string (byte) | Required. Raw message bytes. |
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. |
messageType | string | Output only. The message type for this message. MSH-9.1. |
parsedData | object | Output only. The parsed version of the raw message data. (id: ParsedData) |
patientIds | array | Output only. All patient IDs listed in the PID-2, PID-3, and PID-4 segments of this message. |
schematizedData | object | Output only. The parsed version of the raw message data schematized according to this store's schemas and type definitions. (id: SchematizedData) |
sendFacility | string | Output only. The hospital that this message came from. MSH-4. |
sendTime | string (google-datetime) | Output only. The datetime the sending application sent this message. MSH-7. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , datasetsId , hl7V2StoresId , messagesId | view | Gets an HL7v2 message. |
list | select | projectsId , locationsId , datasetsId , hl7V2StoresId | pageSize , pageToken , filter , orderBy , view | 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. |
create | insert | projectsId , locationsId , datasetsId , hl7V2StoresId | Parses and stores an HL7v2 message. This method triggers an asynchronous notification to any Pub/Sub topic configured in Hl7V2Store.Hl7V2NotificationConfig, if the filtering matches the message. If an MLLP adapter is configured to listen to a Pub/Sub topic, the adapter transmits the message when a notification is received. | |
patch | update | projectsId , locationsId , datasetsId , hl7V2StoresId , messagesId | updateMask | Update the message. The contents of the message in Message.data and data extracted from the contents such as Message.create_time cannot be altered. Only the Message.labels field is allowed to be updated. The labels in the request are merged with the existing set of labels. Existing labels with the same keys are updated. |
delete | delete | projectsId , locationsId , datasetsId , hl7V2StoresId , messagesId | Deletes an HL7v2 message. | |
ingest | exec | projectsId , locationsId , datasetsId , hl7V2StoresId | Parses and stores an HL7v2 message. This method triggers an asynchronous notification to any Pub/Sub topic configured in Hl7V2Store.Hl7V2NotificationConfig, if the filtering matches the message. If an MLLP adapter is configured to listen to a Pub/Sub topic, the adapter transmits the message when a notification is received. If the method is successful, it generates a response containing an HL7v2 acknowledgment (ACK ) message. If the method encounters an error, it returns a negative acknowledgment (NACK ) message. This behavior is suitable for replying to HL7v2 interface systems that expect these acknowledgments. |
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 | |
messagesId | string | |
projectsId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) | |
view | string |
SELECT
examples
- get
- list
Gets an HL7v2 message.
SELECT
name,
createTime,
data,
labels,
messageType,
parsedData,
patientIds,
schematizedData,
sendFacility,
sendTime
FROM google.healthcare.messages
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND datasetsId = '{{ datasetsId }}' -- required
AND hl7V2StoresId = '{{ hl7V2StoresId }}' -- required
AND messagesId = '{{ messagesId }}' -- required
AND view = '{{ view }}';
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.
SELECT
name,
createTime,
data,
labels,
messageType,
parsedData,
patientIds,
schematizedData,
sendFacility,
sendTime
FROM google.healthcare.messages
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND datasetsId = '{{ datasetsId }}' -- required
AND hl7V2StoresId = '{{ hl7V2StoresId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND view = '{{ view }}';
INSERT
examples
- create
- Manifest
Parses and stores an HL7v2 message. This method triggers an asynchronous notification to any Pub/Sub topic configured in Hl7V2Store.Hl7V2NotificationConfig, if the filtering matches the message. If an MLLP adapter is configured to listen to a Pub/Sub topic, the adapter transmits the message when a notification is received.
INSERT INTO google.healthcare.messages (
data__message,
projectsId,
locationsId,
datasetsId,
hl7V2StoresId
)
SELECT
'{{ message }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ datasetsId }}',
'{{ hl7V2StoresId }}'
RETURNING
name,
createTime,
data,
labels,
messageType,
parsedData,
patientIds,
schematizedData,
sendFacility,
sendTime
;
# Description fields are for documentation purposes
- name: messages
props:
- name: projectsId
value: string
description: Required parameter for the messages resource.
- name: locationsId
value: string
description: Required parameter for the messages resource.
- name: datasetsId
value: string
description: Required parameter for the messages resource.
- name: hl7V2StoresId
value: string
description: Required parameter for the messages resource.
- name: message
value: object
description: >
Required. HL7v2 message.
UPDATE
examples
- patch
Update the message. The contents of the message in Message.data and data extracted from the contents such as Message.create_time cannot be altered. Only the Message.labels field is allowed to be updated. The labels in the request are merged with the existing set of labels. Existing labels with the same keys are updated.
UPDATE google.healthcare.messages
SET
data__data = '{{ data }}',
data__labels = '{{ labels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required
AND hl7V2StoresId = '{{ hl7V2StoresId }}' --required
AND messagesId = '{{ messagesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
data,
labels,
messageType,
parsedData,
patientIds,
schematizedData,
sendFacility,
sendTime;
DELETE
examples
- delete
Deletes an HL7v2 message.
DELETE FROM google.healthcare.messages
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required
AND hl7V2StoresId = '{{ hl7V2StoresId }}' --required
AND messagesId = '{{ messagesId }}' --required;
Lifecycle Methods
- ingest
Parses and stores an HL7v2 message. This method triggers an asynchronous notification to any Pub/Sub topic configured in Hl7V2Store.Hl7V2NotificationConfig, if the filtering matches the message. If an MLLP adapter is configured to listen to a Pub/Sub topic, the adapter transmits the message when a notification is received. If the method is successful, it generates a response containing an HL7v2 acknowledgment (ACK
) message. If the method encounters an error, it returns a negative acknowledgment (NACK
) message. This behavior is suitable for replying to HL7v2 interface systems that expect these acknowledgments.
EXEC google.healthcare.messages.ingest
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@datasetsId='{{ datasetsId }}' --required,
@hl7V2StoresId='{{ hl7V2StoresId }}' --required
@@json=
'{
"message": "{{ message }}"
}';