This page lists the Batch2 batch jobs registered in Smile CDR, the job ID used to invoke each one, and the parameters a caller typically supplies. When invoking a job from a custom scheduled job, the job ID is the value placed after the batch: prefix in the target field — for example batch:REINDEX.
The Scheduled job candidate column indicates how well-suited each job is to being run automatically on a recurring schedule:
Task IDs, request context) are not known ahead of time, so it cannot be driven by a scheduled job.| Job ID | What it does | Typical parameters | Scheduled job candidate |
|---|---|---|---|
REINDEX | Reindexes stored resources to rebuild search parameters and optimize storage. | url (search URLs to reindex), batchSize, optimizeStorage, reindexSearchParameters | Yes — common after adding/changing SearchParameters. |
MDM_SUBMIT | Submits resources to the MDM matching pipeline to create/update MDM links. | url (search URLs selecting resources to submit), batchSize | Yes — periodically match newly ingested resources. |
BULK_EXPORT | Exports FHIR resources to NDJSON for bulk data exchange. | resourceTypes, since, until, filters, exportStyle (PATIENT/GROUP/SYSTEM), groupId, expandMdm | Situational — useful for recurring exports (e.g. nightly); often on demand. |
BULK_IMPORT_PULL | Imports FHIR resources by pulling NDJSON from a set of URLs. | ndJsonUrls (required), httpBasicCredentials, maxBatchResourceCount | Situational — schedulable when polling a known, stable feed. |
DELETE_EXPUNGE | Permanently deletes resources matching the given criteria, optionally cascading. | url (search URLs to delete), batchSize, cascade, cascadeMaxRounds | No (destructive) — deliberate, audited operation. |
MDM_CLEAR | Removes MDM links and golden resources for the given resource types. | resourceType, url, batchSize | No (destructive) — wipes MDM state. |
termCodeSystemDeleteJob | Deletes an entire terminology CodeSystem and all of its versions/concepts. | codeSystemPID (internal CodeSystem PID) | No (internal) — triggered by a CodeSystem delete; needs an internal PID. |
termCodeSystemVersionDeleteJob | Deletes a single version of a CodeSystem and its concepts. | versionPID (internal CodeSystem version PID) | No (internal) — triggered by a version delete; needs an internal PID. |
INVOKE_EXPORT_BATCH_JOB | CDR system-to-system: invokes $export against an external system and ingests the result. | taskId, exportParams, sourceOidcServer, patientReference | No (internal) — driven by a Task/request; parameters come from request context. |
BULK_MEMBER_MATCH_BATCH_JOB | CDR system-to-system: runs bulk $member-match over a Group and builds the response. | businessId, bulkMemberMatchParameters, outputFormat, taskId | No (internal) — driven by the $member-match operation. |
PROVIDER_MEMBER_MATCH_BATCH_JOB | CDR system-to-system: runs bulk $provider-member-match over a Group and builds the response. | businessId, bulkMemberMatchParameters, outputFormat, taskId | No (internal) — driven by the $provider-member-match operation. |
The examples below show the parameters object for each job that can be driven from a custom scheduled job.
Each is the serialized form of the job's Batch2 parameters model, so the field names must match exactly. Two things to note:
partitionedUrl — a list of { "url": ... } objects — not a bare url field. Each entry may optionally carry a requestPartitionId (e.g. { "url": "Patient?", "requestPartitionId": { "allPartitions": true } }).parameters field of a scheduled job, it must be supplied as an escaped JSON string, as shown in that endpoint's examples.The No (internal) jobs are omitted here: their parameters (internal PIDs, Task IDs, request context) are supplied by the platform and cannot be authored by hand.
REINDEX{
"partitionedUrl": [
{ "url": "Patient?" },
{ "url": "Observation?status=final" }
],
"batchSize": 1000,
"optimizeStorage": "CURRENT_VERSION",
"reindexSearchParameters": "ALL"
}
optimizeStorage is one of NONE, CURRENT_VERSION, or ALL_VERSIONS; reindexSearchParameters is one of ALL or NONE.
MDM_SUBMIT{
"partitionedUrl": [
{ "url": "Patient?" }
],
"batchSize": 500
}
BULK_EXPORT{
"resourceTypes": ["Patient", "Observation"],
"since": "2026-01-01T00:00:00.000Z",
"exportStyle": "GROUP",
"groupId": "Group/123",
"expandMdm": true,
"outputFormat": "application/fhir+ndjson"
}
exportStyle is one of PATIENT, GROUP, or SYSTEM. groupId is required only for GROUP exports.
BULK_IMPORT_PULL{
"ndJsonUrls": [
"https://example.com/data/patients.ndjson",
"https://example.com/data/observations.ndjson"
],
"maxBatchResourceCount": 500
}
ndJsonUrls is required. Supply httpBasicCredentials (a username:password string) if the feed requires authentication.
DELETE_EXPUNGE{
"partitionedUrl": [
{ "url": "AuditEvent?date=lt2025-01-01" }
],
"batchSize": 1000,
"cascade": false
}
Set cascade to true to delete referencing resources, and cascadeMaxRounds to bound the number of cascade passes.
MDM_CLEAR{
"resourceType": ["Patient"],
"batchSize": 500
}
JobDefinitionRegistry plus the CDR-specific jobs. The authoritative set of job IDs available at runtime can be queried through the batch job admin endpoint.You are about to leave the Smile Digital Health documentation and navigate to the Open Source HAPI-FHIR Documentation.