-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support healthcare fhir new notifications config (#6471)
- Loading branch information
1 parent
434bf2c
commit 3443a0d
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -379,6 +379,31 @@ objects: | |
resource is a recursive structure; when the depth is 2, the CodeSystem table will have a column called | ||
concept.concept but not concept.concept.concept. If not specified or set to 0, the server will use the default | ||
value 2. The maximum depth allowed is 5. | ||
- !ruby/object:Api::Type::Array | ||
name: notificationConfigs | ||
description: |- | ||
A list of notifcation configs that configure the notification for every resource mutation in this FHIR store. | ||
min_version: beta | ||
item_type: !ruby/object:Api::Type::NestedObject | ||
properties: | ||
- !ruby/object:Api::Type::String | ||
name: pubsubTopic | ||
required: true | ||
description: | | ||
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. [email protected] must have publisher permissions on the given | ||
Cloud Pub/Sub topic. Not having adequate permissions will cause the calls that send notifications to fail. | ||
- !ruby/object:Api::Type::Boolean | ||
name: sendFullResource | ||
description: | | ||
Whether to send full FHIR resource to this Pub/Sub topic for Create and Update operation. | ||
Note that setting this to true does not guarantee that all resources will be sent in the format of | ||
full FHIR resource. When a resource change is too large or during heavy traffic, only the resource name will be | ||
sent. Clients should always check the "payloadType" label from a Pub/Sub message to determine whether | ||
it needs to fetch the full resource as a separate operation. | ||
references: !ruby/object:Api::Resource::ReferenceLinks | ||
guides: | ||
'Creating a FHIR store': | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
mmv1/templates/terraform/examples/healthcare_fhir_store_notification_config.tf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
resource "google_healthcare_fhir_store" "default" { | ||
name = "<%= ctx[:vars]['fhir_store_name'] %>" | ||
dataset = google_healthcare_dataset.dataset.id | ||
version = "R4" | ||
|
||
enable_update_create = false | ||
disable_referential_integrity = false | ||
disable_resource_versioning = false | ||
enable_history_import = false | ||
|
||
labels = { | ||
label1 = "labelvalue1" | ||
} | ||
|
||
notification_configs { | ||
pubsub_topic = "${google_pubsub_topic.topic.id}" | ||
send_full_resource = true | ||
} | ||
} | ||
|
||
resource "google_pubsub_topic" "topic" { | ||
name = "<%= ctx[:vars]['pubsub_topic']%>" | ||
} | ||
|
||
resource "google_healthcare_dataset" "dataset" { | ||
name = "<%= ctx[:vars]['dataset_name'] %>" | ||
location = "us-central1" | ||
} | ||
|
||
|