Skip to content

fix(healthcare): enforce json responseType and fix IAM payloads in FHIR samples#4307

Merged
iennae merged 19 commits intomainfrom
feat/fhir-batch-1-resources
Apr 30, 2026
Merged

fix(healthcare): enforce json responseType and fix IAM payloads in FHIR samples#4307
iennae merged 19 commits intomainfrom
feat/fhir-batch-1-resources

Conversation

@angelcaamal
Copy link
Copy Markdown
Contributor

Description

Fixes #

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

  • I have followed guidelines from CONTRIBUTING.MD and Samples Style Guide
  • Tests pass: npm test (see Testing)
  • Lint pass: npm run lint (see Style)
  • Required CI tests pass (see CI testing)
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • This pull request is from a branch created directly off of GoogleCloudPlatform/nodejs-docs-samples. Not a fork.
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new sample directory, and I created GitHub Actions workflow for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

Note: Any check with (dev), (experimental), or (legacy) can be ignored and should not block your PR from merging (see CI testing).

angelcaamal and others added 16 commits March 3, 2026 23:38
Configured fhirStore requests with responseType: 'json' for automatic parsing, resolving Node 20 ESM/Blob issues. Additionally, fixed the members array syntax in IAM policy payloads.
@angelcaamal angelcaamal added samples Issues that are directly related to samples. api: healhcare labels Apr 30, 2026
@product-auto-label product-auto-label Bot added api: healthcare Issues related to the Cloud Healthcare API API. and removed api: healhcare labels Apr 30, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates several FHIR-related scripts to include "responseType: 'json'" in API requests and implements robust error handling using try-catch blocks. Notably, "exportFhirResources.js" now uses a polling mechanism to check operation status instead of a fixed delay, and "setFhirStoreIamPolicy.js" was corrected to pass "members" as an array. Review feedback suggests explicitly setting the "Content-Type" header in "searchFhirResourcesPost.js" and adding a null check for the "entry" field in FHIR search results to prevent runtime errors.

Comment thread healthcare/fhir/searchFhirResourcesPost.js
Comment thread healthcare/fhir/searchFhirResourcesPost.js Outdated
@angelcaamal angelcaamal marked this pull request as ready for review April 30, 2026 18:18
@angelcaamal angelcaamal requested review from a team as code owners April 30, 2026 18:18
@iennae
Copy link
Copy Markdown
Contributor

iennae commented Apr 30, 2026

it's helpful if you put a replaces issue # (and a line for each one)

@iennae iennae merged commit 18dbc6b into main Apr 30, 2026
17 checks passed
@iennae iennae deleted the feat/fhir-batch-1-resources branch April 30, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: healthcare Issues related to the Cloud Healthcare API API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants