const resource = await healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle( request );
}; const resource = await healthcare.projects.locations.datasets.fhirStores.fhir.patch( request, );
const resource = await healthcare.projects.locations.datasets.fhirStores.fhir.create( request );
/** * Disable billing for a project by removing its billing account * @param {string} projectName Name of project disable billing on * @return {string} Text containing response from disabling billing */ const _disableBillingForProject = async projectName => { const res = await billing.updateBillingInfo({ name: projectName, resource: {billingAccountName: ''}, // Disable billing }); return `Billing disabled: ${JSON.stringify(res.data)}`; }
/** * Determine whether billing is enabled for a project * @param {string} projectName Name of project to check if billing is enabled * @return {bool} Whether project has billing enabled or not */ const _isBillingEnabled = async projectName => { const res = await billing.getBillingInfo({name: projectName}); return res.data.billingEnabled; }
// Acquires credentials google.auth .getClient({scopes: ['https://www.googleapis.com/auth/cloud-platform']}) .then(auth => { // Instantiates an authorized client const cloudkms = google.cloudkms({ version: 'v1', auth, }); const request = { parent: `projects/${projectId}/locations/${location}`, }; // Lists key rings cloudkms.projects.locations.keyRings.list(request, (err, result) => { if (err) { console.error(err); return; } const keyRings = result.data.keyRings || []; if (keyRings.length) { console.log('Key rings:'); keyRings.forEach(keyRing => console.log(keyRing.name)); } else { console.log(`No key rings found.`); } }); });
function main( projectId = process.env.GCLOUD_PROJECT, cloudRegion = 'us-central1', datasetId ) { // [START healthcare_get_dataset] const {google} = require('googleapis'); const healthcare = google.healthcare('v1beta1'); async function getDataset() { const auth = await google.auth.getClient({ scopes: ['https://www.googleapis.com/auth/cloud-platform'], }); google.options({auth}); // TODO(developer): uncomment these lines before running the sample // const cloudRegion = 'us-central1'; // const projectId = 'adjective-noun-123'; // const datasetId = 'my-dataset'; const parent = `projects/${projectId}/locations/${cloudRegion}/datasets/${datasetId}`; const request = {name: parent}; const dataset = await healthcare.projects.locations.datasets.get(request); console.log(dataset.data); } getDataset(); // [END healthcare_get_dataset] }
const request = {parent}; const fhirStores = await healthcare.projects.locations.datasets.fhirStores.list( request );
const request = {name}; await healthcare.projects.locations.datasets.hl7V2Stores.delete(request); console.log(`Deleted HL7v2 store: ${hl7v2StoreId}`);
function main( projectId = process.env.GCLOUD_PROJECT, cloudRegion = 'us-central1', datasetId ) { // [START healthcare_create_dataset] const {google} = require('googleapis'); const healthcare = google.healthcare('v1beta1'); async function createDataset() { const auth = await google.auth.getClient({ scopes: ['https://www.googleapis.com/auth/cloud-platform'], }); google.options({auth}); // TODO(developer): uncomment these lines before running the sample // const cloudRegion = 'us-central1'; // const projectId = 'adjective-noun-123'; // const datasetId = 'my-dataset'; const parent = `projects/${projectId}/locations/${cloudRegion}`; const request = {parent, datasetId}; await healthcare.projects.locations.datasets.create(request); console.log(`Created dataset: ${datasetId}`); } createDataset(); // [END healthcare_create_dataset] }
const request = {name}; await healthcare.projects.locations.datasets.dicomStores.delete(request); console.log(`Deleted DICOM store: ${dicomStoreId}`);
function main( projectId = process.env.GCLOUD_PROJECT, cloudRegion = 'us-central1' ) { // [START healthcare_list_datasets] const {google} = require('googleapis'); const healthcare = google.healthcare('v1beta1'); async function listDatasets() { const auth = await google.auth.getClient({ scopes: ['https://www.googleapis.com/auth/cloud-platform'], }); google.options({auth}); // TODO(developer): uncomment these lines before running the sample // const cloudRegion = 'us-central1'; // const projectId = 'adjective-noun-123'; const parent = `projects/${projectId}/locations/${cloudRegion}`; const request = {parent}; const dataset = await healthcare.projects.locations.datasets.list(request); console.log(dataset.data); } listDatasets(); // [END healthcare_list_datasets] }
const request = {name}; const fhirStore = await healthcare.projects.locations.datasets.fhirStores.get( request );
function main( projectId = process.env.GCLOUD_PROJECT, cloudRegion = 'us-central1', datasetId ) { // [START healthcare_delete_dataset] const {google} = require('googleapis'); const healthcare = google.healthcare('v1beta1'); async function deleteDataset() { const auth = await google.auth.getClient({ scopes: ['https://www.googleapis.com/auth/cloud-platform'], }); google.options({auth}); // TODO(developer): uncomment these lines before running the sample // const cloudRegion = 'us-central1'; // const projectId = 'adjective-noun-123'; // const datasetId = 'my-dataset'; const parent = `projects/${projectId}/locations/${cloudRegion}/datasets/${datasetId}`; const request = {name: parent}; await healthcare.projects.locations.datasets.delete(request); console.log(`Deleted dataset: ${datasetId}`); } deleteDataset(); // [END healthcare_delete_dataset] }
const request = {parent, hl7V2StoreId: hl7v2StoreId}; await healthcare.projects.locations.datasets.hl7V2Stores.create(request); console.log(`Created HL7v2 store: ${hl7v2StoreId}`);