Skip to content

googleHealthcareHl7V2Store

A Hl7V2Store is a datastore inside a Healthcare dataset that conforms to the FHIR (https://www.hl7.org/hl7V2/STU3/) standard for Healthcare information exchange

To get more information about Hl7V2Store, see:

Example Usage - Healthcare Hl7 V2 Store Basic

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleHealthcareDatasetDataset =
  new google.healthcareDataset.HealthcareDataset(this, "dataset", {
    location: "us-central1",
    name: "example-dataset",
  });
const googlePubsubTopicTopic = new google.pubsubTopic.PubsubTopic(
  this,
  "topic",
  {
    name: "hl7-v2-notifications",
  }
);
new google.healthcareHl7V2Store.HealthcareHl7V2Store(this, "store", {
  dataset: googleHealthcareDatasetDataset.id,
  labels: [
    {
      label1: "labelvalue1",
    },
  ],
  name: "example-hl7-v2-store",
  notification_configs: [
    {
      pubsub_topic: googlePubsubTopicTopic.id,
    },
  ],
});

Example Usage - Healthcare Hl7 V2 Store Parser Config

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleHealthcareDatasetDataset =
  new google.healthcareDataset.HealthcareDataset(this, "dataset", {
    location: "us-central1",
    name: "example-dataset",
    provider: "${google-beta}",
  });
new google.healthcareHl7V2Store.HealthcareHl7V2Store(this, "store", {
  dataset: googleHealthcareDatasetDataset.id,
  name: "example-hl7-v2-store",
  parser_config: [
    {
      allow_null_header: false,
      schema:
        '{\n  "schemas": [{\n    "messageSchemaConfigs": {\n      "ADT_A01": {\n        "name": "ADT_A01",\n        "minOccurs": 1,\n        "maxOccurs": 1,\n        "members": [{\n            "segment": {\n              "type": "MSH",\n              "minOccurs": 1,\n              "maxOccurs": 1\n            }\n          },\n          {\n            "segment": {\n              "type": "EVN",\n              "minOccurs": 1,\n              "maxOccurs": 1\n            }\n          },\n          {\n            "segment": {\n              "type": "PID",\n              "minOccurs": 1,\n              "maxOccurs": 1\n            }\n          },\n          {\n            "segment": {\n              "type": "ZPD",\n              "minOccurs": 1,\n              "maxOccurs": 1\n            }\n          },\n          {\n            "segment": {\n              "type": "OBX"\n            }\n          },\n          {\n            "group": {\n              "name": "PROCEDURE",\n              "members": [{\n                  "segment": {\n                    "type": "PR1",\n                    "minOccurs": 1,\n                    "maxOccurs": 1\n                  }\n                },\n                {\n                  "segment": {\n                    "type": "ROL"\n                  }\n                }\n              ]\n            }\n          },\n          {\n            "segment": {\n              "type": "PDA",\n              "maxOccurs": 1\n            }\n          }\n        ]\n      }\n    }\n  }],\n  "types": [{\n    "type": [{\n        "name": "ZPD",\n        "primitive": "VARIES"\n      }\n\n    ]\n  }],\n  "ignoreMinOccurs": true\n}\n',
      segment_terminator: "Jw==",
    },
  ],
  provider: "${google-beta}",
});

Example Usage - Healthcare Hl7 V2 Store Unschematized

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleHealthcareDatasetDataset =
  new google.healthcareDataset.HealthcareDataset(this, "dataset", {
    location: "us-central1",
    name: "example-dataset",
    provider: "${google-beta}",
  });
new google.healthcareHl7V2Store.HealthcareHl7V2Store(this, "store", {
  dataset: googleHealthcareDatasetDataset.id,
  name: "example-hl7-v2-store",
  parser_config: [
    {
      allow_null_header: false,
      segment_terminator: "Jw==",
      version: "V2",
    },
  ],
  provider: "${google-beta}",
});

Argument Reference

The following arguments are supported:

  • name - (Required) The resource name for the Hl7V2Store. ** Changing this property may recreate the Hl7v2 store (removing all data) **

  • dataset - (Required) Identifies the dataset addressed by this request. Must be in the format 'projects/{project}/locations/{location}/datasets/{dataset}'


  • parserConfig - (Optional) A nested object resource Structure is documented below.

  • labels - (Optional) 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}][\p{Ll}\p{Lo}\p{N}-]{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. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

  • notificationConfigs - (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. Structure is documented below.

  • notificationConfig - (Optional, Deprecated) A nested object resource Structure is documented below.

The parserConfig block supports:

  • allowNullHeader - (Optional) Determines whether messages with no header are allowed.

  • segmentTerminator - (Optional) Byte(s) to be used as the segment terminator. If this is unset, '\r' will be used as segment terminator. A base64-encoded string.

  • schema - (Optional) JSON encoded string for schemas used to parse messages in this store if schematized parsing is desired.

  • version - (Optional) The version of the unschematized parser to be used when a custom schema is not set. Default value is v1. Possible values are v1, v2, and v3.

The notificationConfigs block supports:

  • pubsubTopic - (Required) The Cloud Pub/Sub topic that notifications of changes are published on. Supplied by the client. PubsubMessage.Data will contain the resource name. PubsubMessage.MessageId is the ID of this message. It is guaranteed to be unique within the topic. PubsubMessage.PublishTime is the time at which the message was published. Notifications are only sent if the topic is non-empty. Topic names must be scoped to a project. service-PROJECT_NUMBER@gcp-sa-healthcare.iam.gserviceaccount.com must have publisher permissions on the given Cloud Pub/Sub topic. Not having adequate permissions will cause the calls that send notifications to fail. If a notification cannot be published to Cloud Pub/Sub, errors will be logged to Stackdriver

  • filter - (Optional) Restricts notifications sent for messages matching a filter. If this is empty, all messages are matched. Syntax: https://cloud.google.com/appengine/docs/standard/python/search/query_strings Fields/functions available for filtering are:

    • messageType, from the MSH-9.1 field. For example, NOT messageType = "ADT".
    • send_date or sendDate, the YYYY-MM-DD date the message was sent in the dataset's timeZone, from the MSH-7 segment. For example, send_date < "2017-01-02".
    • sendTime, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, sendTime < "2017-01-02T00:00:00-05:00".
    • sendFacility, the care center that the message came from, from the MSH-4 segment. For example, sendFacility = "ABC".
    • PatientId(value, type), which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, PatientId("123456", "MRN").
    • labels.x, a string value of the label with key x as set using the Message.labels map. For example, labels."priority"="high". The operator :* can be used to assert the existence of a label. For example, labels."priority":*.

The notificationConfig block supports:

  • pubsubTopic - (Required) The Cloud Pub/Sub topic that notifications of changes are published on. Supplied by the client. PubsubMessage.Data will contain the resource name. PubsubMessage.MessageId is the ID of this message. It is guaranteed to be unique within the topic. PubsubMessage.PublishTime is the time at which the message was published. Notifications are only sent if the topic is non-empty. Topic names must be scoped to a project. service-PROJECT_NUMBER@gcp-sa-healthcare.iam.gserviceaccount.com must have publisher permissions on the given Cloud Pub/Sub topic. Not having adequate permissions will cause the calls that send notifications to fail.

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format {{dataset}}/hl7V2Stores/{{name}}

  • selfLink - The fully qualified name of this dataset

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

Hl7V2Store can be imported using any of these accepted formats:

$ terraform import google_healthcare_hl7_v2_store.default {{dataset}}/hl7V2Stores/{{name}}
$ terraform import google_healthcare_hl7_v2_store.default {{dataset}}/{{name}}