Skip to content
Merged
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
14 changes: 11 additions & 3 deletions healthcare/fhir/getFhirStoreCapabilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const main = (
auth: new google.auth.GoogleAuth({
scopes: ['https://www.googleapis.com/auth/cloud-platform'],
}),
responseType: 'json',
});

const getFhirStoreCapabilities = async () => {
Expand All @@ -38,9 +39,16 @@ const main = (
const name = `projects/${projectId}/locations/${cloudRegion}/datasets/${datasetId}/fhirStores/${fhirStoreId}/fhir/metadata`;
const request = {name};

const fhirStore =
await healthcare.projects.locations.datasets.fhirStores.get(request);
console.log(JSON.stringify(fhirStore.data, null, 2));
try {
const fhirStore =
await healthcare.projects.locations.datasets.fhirStores.get(request);
console.log(JSON.stringify(fhirStore.data, null, 2));
} catch (error) {
console.error(
'Error getting FHIR store capabilities:',
error.message || error
);
}
Comment thread
angelcaamal marked this conversation as resolved.
};

getFhirStoreCapabilities();
Expand Down
Loading