Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions healthcare/fhir/patchFhirStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const main = (
auth: new google.auth.GoogleAuth({
scopes: ['https://www.googleapis.com/auth/cloud-platform'],
}),
responseType: 'json',
});

const patchFhirStore = async () => {
Expand All @@ -50,10 +51,16 @@ const main = (
},
};

await healthcare.projects.locations.datasets.fhirStores.patch(request);
console.log(
`Patched FHIR store ${fhirStoreId} with Cloud Pub/Sub topic ${pubsubTopic}`
);
try {
const response =
await healthcare.projects.locations.datasets.fhirStores.patch(request);
console.log(
`Patched FHIR store ${fhirStoreId} with Cloud Pub/Sub topic ${pubsubTopic}`
);
console.log(JSON.stringify(response.data, null, 2));
} catch (error) {
console.error('Error patching FHIR store:', error.message || error);
}
};

patchFhirStore();
Expand Down
Loading