Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Error while ingesting hl7 data in Google Healthcare API

Hi 

I am trying to ingest a HL7 message to Google Healthcare HL7V2 data store and getting error. Cloud healthcare api messages.ingest has a try option. I added base 64 encoded hl7 message and getting error “invalid segment terminator, store expects: \”\\r\””, status:INVALID_ARGUMENT”.

I tried adding \r before and after encoding but no success. What am I missing? HLV2 store has segment separator \r. Could someone please give the steps how to use messages.ingest try option provided in google cloud documents? The following section has try button. Thank you!

SEND FEEDBACK

Method: messages.ingest

bookmark_border

 

 

1 1 427
1 REPLY 1

The error message you've received, which states "invalid segment terminator, store expects: '\r'," implies that there could be a problem related to the segment terminator within your HL7 message. Generally, the HL7 standard employs '\r' as the segment terminator; however, it's conceivable that the problem may be linked to how you've encoded or structured the message.

When making a request to the Google Healthcare API's messages.ingest endpoint, ensure that you include the HL7 message encoded in Base64 within the "message_data" field. Here's an illustrative example of how your request could be formatted in JSON:

{
"name": "projects/[PROJECT_ID]/locations/[LOCATION]/datasets/[DATASET_ID]/hl7V2Stores/[HL7V2_STORE_ID]",
"message_data": "[BASE64_ENCODED_HL7_MESSAGE]"
}

Submit an HTTP POST request to the "messages.ingest" endpoint by sending the JSON payload as outlined previously. You have the option to employ tools such as curl or utilize an HTTP library in your chosen programming language to dispatch the request. Following a successful request, you will receive a response from the API that conveys the ingestion status. In case of any problems with the message or its formatting, the API will furnish error details to assist you in the troubleshooting process.

Top Labels in this Space