0

I'm able to fetch a fhirStore object with the JS api, but I don't see any decent examples of how to update the fhirStore to use defaultSearchHandlingStrict = true. Thanks

a1-----
  • 11
  • 2

1 Answers1

0

The Cloud Healthcare API docs have a guide for how to update a FHIR store config, link. Updating the strict handling behaviour can be done in the same way as other properties of the FHIR store config. If you're using JS this might look something like

const updateStrictHandling = async () => {
  // TODO(developer): uncomment these lines before running the sample
  // const cloudRegion = 'us-central1';
  // const projectId = 'adjective-noun-123';
  // const datasetId = 'my-dataset';
  // const fhirStoreId = 'my-fhir-store';
  const name = `projects/${projectId}/locations/${cloudRegion}/datasets/${datasetId}/fhirStores/${fhirStoreId}`;
  const request = {
    name,
    updateMask: 'defaultSearchHandlingStrict',
    resource: {
      defaultSearchHandlingStrict: true,
    },
  };

  return healthcare.projects.locations.datasets.fhirStores.patch(request);
};

await updateStrictHandling();

(example adapted from the linked page)

Nik Klassen
  • 681
  • 8
  • 16