apache/beam · warning
Error executing GetPatientEverything: FHIR resources…
Error message
Error executing GetPatientEverything: FHIR resources writing to Dead Letter Queue.
What it means
FhirIOPatientEverything's processElement invokes the Patient/$everything operation for a given Patient resource name. When the request parameters are invalid (IllegalArgumentException) or the result is unexpectedly empty causing NoSuchElementException, the error counter is incremented, this warning logged, and the failing parameter is emitted to the DEAD_LETTER output as a HealthcareIOError instead of failing the pipeline.
Solutions
- Inspect DEAD_LETTER output for the offending PatientEverythingParameter and exception detail.
- Ensure resourceName is a fully-qualified Patient path: projects/{p}/locations/{l}/datasets/{d}/fhirStores/{s}/fhir/Patient/{id}.
- Validate filters use search parameters supported by $everything for your store version.
- Skip or re-queue patients whose resources no longer exist.
Example fix
// before
String name = patientId; // bare id
// after
String name = String.format("projects/%s/locations/%s/datasets/%s/fhirStores/%s/fhir/Patient/%s", project, location, dataset, store, patientId); Defensive patterns
Strategy: validation
Validate before calling
// Java: validate Patient resourceName before calling $everything
java.util.regex.Pattern P = java.util.regex.Pattern.compile(
"projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/Patient/[^/]+");
if (!P.matcher(resourceName).matches()) {
throw new IllegalArgumentException("Not a fully-qualified Patient resource name: " + resourceName);
} Prevention
- Always build fully-qualified Patient resource names.
- Monitor FhirIOPatientEverything DEAD_LETTER output.
- Validate filters against supported $everything search parameters.
- Exclude deleted/nonexistent patients before the call.
When it happens
Trigger: Calling FhirIOPatientEverything with a resourceName that is not a valid Patient reference (wrong path shape, wrong resource type), invalid filter definitions, or an empty/incomplete Patient where the client expects at least one entry.
Common situations: Building Patient references from inconsistent upstream fields (e.g. plain IDs instead of projects/.../patients/{id}); filters using unsupported FHIR search parameters; patients deleted before the everything call.
Understand the failure class
Background: "invalid id" errors: invalid identifier format — why libraries reject IDs before lookup, and how to fix them — this error's family across 37 libraries.
Related errors
- Error fetching Fhir resource with ID
- Error search FHIR resources writing to Dead Letter Queue.
- Failed to parse payload
- Error fetching HL7v2 message with ID
- Failed to import with error. Moving to deadletter path
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/107ec21e5d84abfa.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIOPatientEverything.java:210
*
* @throws IOException the io exception
*/
@Setup
public void instantiateHealthcareClient() throws IOException {
this.client = new HttpHealthcareApiClient();
}
@ProcessElement
public void processElement(ProcessContext context) {
PatientEverythingParameter patientEverythingParameter = context.element();
try {
context.output(
getPatientEverything(
patientEverythingParameter.getResourceName(),
patientEverythingParameter.getFilters()));
} catch (IllegalArgumentException | NoSuchElementException e) {
GET_PATIENT_EVERYTHING_ERROR_COUNT.inc();
LOG.warn(
"Error executing GetPatientEverything: FHIR resources writing to Dead Letter Queue.",
e);
context.output(DEAD_LETTER, HealthcareIOError.of(patientEverythingParameter.toString(), e));
}
}
private JsonArray getPatientEverything(
String resourceName, @Nullable Map<String, String> filters) {
long start = Instant.now().toEpochMilli();
HashMap<String, Object> filterObjects = new HashMap<>();
if (filters != null) {
filterObjects.putAll(filters);
}
FhirResourcePagesIterator iter =
FhirResourcePagesIterator.ofPatientEverything(client, resourceName, filterObjects);
JsonArray result = new JsonArray();
while (iter.hasNext()) {View on GitHub (pinned to 12126d8942)