GCP.Healthcare reference
Dataset
Section titled “Dataset”Source:
src/GCP/Healthcare/Dataset.ts
A Cloud Healthcare dataset — a container for DICOM, FHIR, HL7v2, and consent stores.
Dataset create and delete are long-running operations. Location and
dataset id are immutable; timeZone updates in place. Datasets have
no labels API, so list returns every dataset in us-central1 that
this stack created (matched by persisted name).
Dataset: Creating a Dataset
Section titled “Dataset: Creating a Dataset”Generated name
const dataset = yield* GCP.Healthcare.Dataset("Clinic", {});Named dataset with a time zone
const dataset = yield* GCP.Healthcare.Dataset("Clinic", { datasetId: "clinic-records", location: "us-central1", timeZone: "America/New_York",});DatasetsConsentStore
Section titled “DatasetsConsentStore”Source:
src/GCP/Healthcare/DatasetsConsentStore.ts
A Cloud Healthcare consent store inside a dataset.
Dataset, store id, and location are immutable. Labels, default TTL, and
enableConsentCreateOnUpdate update in place.
DatasetsConsentStore: Creating a Consent Store
Section titled “DatasetsConsentStore: Creating a Consent Store”Store with labels
const store = yield* GCP.Healthcare.DatasetsConsentStore("Consents", { dataset: dataset.name, labels: { env: "test" },});Named store that creates consents on update
const store = yield* GCP.Healthcare.DatasetsConsentStore("Consents", { dataset: dataset.name, consentStoreId: "clinic-consents", enableConsentCreateOnUpdate: true,});DatasetsConsentStoresAttributeDefinition
Section titled “DatasetsConsentStoresAttributeDefinition”Source:
src/GCP/Healthcare/DatasetsConsentStoresAttributeDefinition.ts
A client-defined consent attribute in a consent store.
Consent store, id, and category are immutable. Allowed values can only
grow. Description, consent defaults, and data-mapping default update
in place. Ownership is stamped into description.
DatasetsConsentStoresAttributeDefinition: Creating an Attribute Definition
Section titled “DatasetsConsentStoresAttributeDefinition: Creating an Attribute Definition”const attr = yield* GCP.Healthcare.DatasetsConsentStoresAttributeDefinition( "DataType", { consentStore: store.name, category: "RESOURCE", allowedValues: ["fhir", "dicom"], description: "data modality", },);DatasetsConsentStoresConsent
Section titled “DatasetsConsentStoresConsent”Source:
src/GCP/Healthcare/DatasetsConsentStoresConsent.ts
A user’s consent in a consent store.
Consent ids are server-assigned. userId, policies, consent artifact,
and metadata update by committing a new revision. Ownership is stamped
into metadata.
DatasetsConsentStoresConsent: Creating a Consent
Section titled “DatasetsConsentStoresConsent: Creating a Consent”const consent = yield* GCP.Healthcare.DatasetsConsentStoresConsent( "Grant", { consentStore: store.name, userId: "user-123", consentArtifact: artifact.name, state: "DRAFT", metadata: { source: "app" }, },);DatasetsConsentStoresConsentArtifact
Section titled “DatasetsConsentStoresConsentArtifact”Source:
src/GCP/Healthcare/DatasetsConsentStoresConsentArtifact.ts
Documentation of a user’s consent (artifact) in a consent store.
Artifact ids are server-assigned. There is no patch API — changing
userId, version, metadata, or parent replaces the artifact.
Ownership is stamped into metadata.
DatasetsConsentStoresConsentArtifact: Creating a Consent Artifact
Section titled “DatasetsConsentStoresConsentArtifact: Creating a Consent Artifact”const artifact = yield* GCP.Healthcare.DatasetsConsentStoresConsentArtifact( "Proof", { consentStore: store.name, userId: "user-123", consentContentVersion: "v1", metadata: { locale: "en" }, },);DatasetsConsentStoresUserDataMapping
Section titled “DatasetsConsentStoresUserDataMapping”Source:
src/GCP/Healthcare/DatasetsConsentStoresUserDataMapping.ts
Maps a resource to a user and consent attributes.
Mapping ids are server-assigned. userId, dataId, and resource
attributes update in place. Ownership is stamped into dataId.
DatasetsConsentStoresUserDataMapping: Creating a User Data Mapping
Section titled “DatasetsConsentStoresUserDataMapping: Creating a User Data Mapping”const mapping = yield* GCP.Healthcare.DatasetsConsentStoresUserDataMapping( "Chart", { consentStore: store.name, userId: "user-123", dataId: "Patient/abc", },);DatasetsDicomStore
Section titled “DatasetsDicomStore”Source:
src/GCP/Healthcare/DatasetsDicomStore.ts
A Cloud Healthcare DICOM store inside a dataset.
Dataset, store id, and location are immutable. Labels and notification configs update in place.
DatasetsDicomStore: Creating a DICOM Store
Section titled “DatasetsDicomStore: Creating a DICOM Store”Store with labels
const store = yield* GCP.Healthcare.DatasetsDicomStore("Images", { dataset: dataset.name, labels: { env: "test" },});Named store
const store = yield* GCP.Healthcare.DatasetsDicomStore("Images", { dataset: dataset.name, dicomStoreId: "clinic-images",});DatasetsFhirStore
Section titled “DatasetsFhirStore”Source:
src/GCP/Healthcare/DatasetsFhirStore.ts
A Cloud Healthcare FHIR store inside a dataset.
Dataset, store id, location, FHIR version, referential-integrity, and
versioning flags are immutable. Labels, enableUpdateCreate, and
search-handling update in place.
DatasetsFhirStore: Creating a FHIR Store
Section titled “DatasetsFhirStore: Creating a FHIR Store”R4 store with labels
const store = yield* GCP.Healthcare.DatasetsFhirStore("Records", { dataset: dataset.name, version: "R4", labels: { env: "test" },});Named store that allows client-assigned ids
const store = yield* GCP.Healthcare.DatasetsFhirStore("Records", { dataset: dataset.name, fhirStoreId: "clinic-fhir", version: "R4", enableUpdateCreate: true,});DatasetsHl7V2Store
Section titled “DatasetsHl7V2Store”Source:
src/GCP/Healthcare/DatasetsHl7V2Store.ts
A Cloud Healthcare HL7v2 store inside a dataset.
Dataset, store id, location, and parser version are immutable. Labels,
duplicate rejection, allowNullHeader, and notification configs update
in place.
DatasetsHl7V2Store: Creating an HL7v2 Store
Section titled “DatasetsHl7V2Store: Creating an HL7v2 Store”Store with labels
const store = yield* GCP.Healthcare.DatasetsHl7V2Store("Adt", { dataset: dataset.name, labels: { env: "test" },});Named store that rejects duplicates
const store = yield* GCP.Healthcare.DatasetsHl7V2Store("Adt", { dataset: dataset.name, hl7V2StoreId: "clinic-adt", rejectDuplicateMessage: true,});DatasetsHl7V2StoresMessage
Section titled “DatasetsHl7V2StoresMessage”Source:
src/GCP/Healthcare/DatasetsHl7V2StoresMessage.ts
An HL7v2 message stored in a Cloud Healthcare HL7v2 store.
Message ids are server-assigned. Parent store and raw data are
identity — changing either replaces the message. Labels update in
place (updateMask=labels).
DatasetsHl7V2StoresMessage: Creating a Message
Section titled “DatasetsHl7V2StoresMessage: Creating a Message”const message = yield* GCP.Healthcare.DatasetsHl7V2StoresMessage("Adt", { parent: store.name, data: [ "MSH|^~\\&|APP|FACILITY|DEST|DESTFAC|20240101120000||ADT^A01|MSG00001|P|2.5", "PID|1||PAT001^^^MR||DOE^JOHN", ].join("\r"), labels: { env: "test" },});DatasetsHl7V2StoresMessage: Updating a Message
Section titled “DatasetsHl7V2StoresMessage: Updating a Message”Change props on the same logical id; the engine keeps the physical id.
const message = yield* GCP.Healthcare.DatasetsHl7V2StoresMessage("Adt", { parent: store.name, data: [ "MSH|^~\\&|APP|FACILITY|DEST|DESTFAC|20240101120000||ADT^A01|MSG00001|P|2.5", "PID|1||PAT001^^^MR||DOE^JOHN", ].join("\r"), labels: { env: "prod" },});