This page shows all available pointcuts for each component of Smile CDR.
See the HAPI FHIR Client Pointcuts documentation for the request-processing pipeline and the CLIENT_REQUEST / CLIENT_RESPONSE pointcuts.
See the HAPI FHIR Server Pointcuts documentation for the Storage / JPA Server pipeline and the full set of STORAGE_* pointcuts (STORAGE_PRESHOW_RESOURCES, STORAGE_PRESEARCH_REGISTERED, STORAGE_PRESTORAGE_RESOURCE_*, STORAGE_PRECOMMIT_RESOURCE_*, STORAGE_PREACCESS_RESOURCES, etc.).
flowchart TB
Request(["$export<br/>request"]):::app
KickOff["Begin batch job"]:::step
JobLifecycle(["Enters job<br/>lifecycle<br/>(see Batch Job diagram)"]):::app
PreInitiateHook["Java Hook:<br/>STORAGE_PRE_INITIATE_BULK_EXPORT<br/>(before permission checks)"]:::javahook
InitiateHook["Java Hook:<br/>STORAGE_INITIATE_BULK_EXPORT"]:::javahook
InclusionHook["Java Hook:<br/>STORAGE_BULK_EXPORT_RESOURCE_INCLUSION<br/>(per candidate resource). <br/> This is called from inside the batch job, but is shown here for pointcut completeness."]:::javahook
BinaryCreated["Binary created"]:::step
JobCompleted["Job complete"]:::step
Request --> PreInitiateHook
PreInitiateHook --> KickOff
KickOff -- "Job ID returned to caller" --> Request
KickOff --> InitiateHook
InitiateHook --> JobLifecycle
JobLifecycle --> InclusionHook
InclusionHook --> BinaryCreated
BinaryCreated --> JobCompleted
click PreInitiateHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html#STORAGE_PRE_INITIATE_BULK_EXPORT" "Open STORAGE_PRE_INITIATE_BULK_EXPORT pointcut docs"
click InitiateHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html#STORAGE_INITIATE_BULK_EXPORT" "Open STORAGE_INITIATE_BULK_EXPORT pointcut docs"
click InclusionHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html#STORAGE_BULK_EXPORT_RESOURCE_INCLUSION" "Open STORAGE_BULK_EXPORT_RESOURCE_INCLUSION pointcut docs"
click JobLifecycle "/docs/interceptors/pointcuts.html#batch-job-lifecycle" "Open Batch Job Lifecycle diagram"
flowchart TB
Client(["Client kicks off job<br/>($reindex, $export,<br/>$delete-expunge, ...)"]):::app
Build["Build JobInstance<br/>(in memory)"]:::step
Persist["Persist<br/>to DB"]:::step
Pickup["Maintenance scheduler<br/>picks up QUEUED job"]:::step
Run(["Run job steps<br/>in parallel<br/>(chunk processing loop —<br/>see Chunk Processing diagram)"]):::app
Terminal["Final step completes;<br/>job reaches terminal state"]:::step
Complete["Batch job marked<br/>as complete"]:::step
Caller(["Caller queries<br/>results asynchronously"]):::app
PreCreateHook["Java Hook:<br/>STORAGE_PRESTORAGE_BATCH_JOB_CREATE"]:::javahook
PostCreateHook["Java Hook:<br/>STORAGE_POSTSTORAGE_BATCH_JOB_CREATE"]:::javahook
PostCompleteHook["Java Hook:<br/>STORAGE_POSTCOMPLETE_BATCH_JOB"]:::javahook
Client --> Build
Build --> PreCreateHook
PreCreateHook --> Persist
Persist --> PostCreateHook
PostCreateHook --> Pickup
Pickup --> Run
Run --> Terminal
Terminal --> Complete
Complete --> PostCompleteHook
PostCompleteHook --> Caller
click PreCreateHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html#STORAGE_PRESTORAGE_BATCH_JOB_CREATE" "Open STORAGE_PRESTORAGE_BATCH_JOB_CREATE pointcut docs"
click PostCreateHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html#STORAGE_POSTSTORAGE_BATCH_JOB_CREATE" "Open STORAGE_POSTSTORAGE_BATCH_JOB_CREATE pointcut docs"
click PostCompleteHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html#STORAGE_POSTCOMPLETE_BATCH_JOB" "Open STORAGE_POSTCOMPLETE_BATCH_JOB pointcut docs"
click Run "/docs/interceptors/pointcuts.html#work-chunk-processing" "Open Chunk Processing diagram"
flowchart TB
Worker(["Worker claims a<br/>READY work chunk"]):::app
BuildRD["Build new RequestDetails<br/>for task execution context"]:::step
Decide{"Execute<br/>step logic"}
Complete["Mark chunk COMPLETED;<br/>queue next chunk(s)"]:::step
Fail["Retry or mark<br/>chunk FAILED"]:::step
NewRDHook["Java Hook:<br/>STORAGE_BATCH_TASK_NEW_REQUEST_DETAILS"]:::javahook
FilterPre["Java Hook:<br/>BATCH2_CHUNK_PROCESS_FILTER"]:::javahook
FilterOk["Java Hook:<br/>BATCH2_CHUNK_PROCESS_FILTER"]:::javahook
FilterErr["Java Hook:<br/>BATCH2_CHUNK_PROCESS_FILTER"]:::javahook
Worker --> NewRDHook
NewRDHook --> BuildRD
BuildRD --> FilterPre
FilterPre --> Decide
Decide -- "ok" --> Complete
Complete --> FilterOk
Decide -- "error" --> Fail
Fail --> FilterErr
click NewRDHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html#STORAGE_BATCH_TASK_NEW_REQUEST_DETAILS" "Open STORAGE_BATCH_TASK_NEW_REQUEST_DETAILS pointcut docs"
click FilterPre "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html#BATCH2_CHUNK_PROCESS_FILTER" "Open BATCH2_CHUNK_PROCESS_FILTER pointcut docs"
click FilterOk "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html#BATCH2_CHUNK_PROCESS_FILTER" "Open BATCH2_CHUNK_PROCESS_FILTER pointcut docs"
click FilterErr "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html#BATCH2_CHUNK_PROCESS_FILTER" "Open BATCH2_CHUNK_PROCESS_FILTER pointcut docs"
flowchart TB
Client(["A resource is<br/>created / updated / deleted"]):::app
subgraph EndpointModule["FHIR Endpoint Module"]
direction TB
Receive["Resource modification<br/>received"]:::step
end
subgraph PersistenceModule["Persistence Module"]
direction TB
Persist["Resource persisted<br/>to database"]:::step
ModifiedHook["Java Hook:<br/>SUBSCRIPTION_RESOURCE_MODIFIED<br/>(synchronous, in PERSISTENCE module)"]:::javahook
end
subgraph BrokerChannel["Broker (Kafka/ActiveMQ)"]
direction TB
MatchingQueue["Matching Queue"]:::step
DeliveryQueue["Delivery Queue"]:::step
end
subgraph SubscriptionModule["Subscription Module"]
subgraph Matcher["Matcher"]
direction TB
DidResourceMatch{"Did the resource match<br/>any Subscription?"}
IsSubscription{"Is resource of<br/>Type Subscription?"}
BeforeCheckHook["Java Hook:<br/>SUBSCRIPTION_BEFORE_PERSISTED_RESOURCE_CHECKED"]:::javahook
CheckedHook["Java Hook:<br/>SUBSCRIPTION_AFTER_PERSISTED_RESOURCE_CHECKED"]:::javahook
NoMatchHook["Java Hook:<br/>SUBSCRIPTION_RESOURCE_DID_NOT_MATCH_ANY_SUBSCRIPTIONS"]:::javahook
MatchedHook["Java Hook:<br/>SUBSCRIPTION_RESOURCE_MATCHED"]:::javahook
Matching["Subscription<br/>Matching"]:::step
RegistrationHook["Java Hook:<br/>SUBSCRIPTION_AFTER_ACTIVE_SUBSCRIPTION_REGISTERED<br/>SUBSCRIPTION_AFTER_ACTIVE_SUBSCRIPTION_UNREGISTERED<br/>(when a Subscription resource is activated / removed)"]:::javahook
end
subgraph Deliverer["Deliverer"]
direction TB
BeforeDeliveryHook["Java Hook:<br/>SUBSCRIPTION_BEFORE_DELIVERY<br/>SUBSCRIPTION_BEFORE_REST_HOOK_DELIVERY<br/>SUBSCRIPTION_BEFORE_MESSAGE_DELIVERY"]:::javahook
Delivery{"Subscription<br/>Delivery"}
AfterDeliveryHook["Java Hook:<br/>SUBSCRIPTION_AFTER_DELIVERY<br/>SUBSCRIPTION_AFTER_REST_HOOK_DELIVERY<br/>SUBSCRIPTION_AFTER_MESSAGE_DELIVERY"]:::javahook
FailedHook["Java Hook:<br/>SUBSCRIPTION_AFTER_DELIVERY_FAILED<br/>(on delivery failure)"]:::javahook
end
end
Client --> Receive
Receive --> Persist
Persist --> ModifiedHook
ModifiedHook --> MatchingQueue
MatchingQueue --> BeforeCheckHook
BeforeCheckHook --> Matching
Matching --> CheckedHook
CheckedHook --> DidResourceMatch
DidResourceMatch -- "yes" --> MatchedHook
MatchedHook --> DeliveryQueue & IsSubscription
DidResourceMatch -- "no" --> NoMatchHook
NoMatchHook --> IsSubscription
IsSubscription -- "yes" --> RegistrationHook
DeliveryQueue --> BeforeDeliveryHook
BeforeDeliveryHook --> Delivery
Delivery -- "Success" --> AfterDeliveryHook
Delivery -- "failure" --> FailedHook
click ModifiedHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html#SUBSCRIPTION_RESOURCE_MODIFIED" "Open SUBSCRIPTION_RESOURCE_MODIFIED pointcut docs"
click BeforeCheckHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html#SUBSCRIPTION_BEFORE_PERSISTED_RESOURCE_CHECKED" "Open SUBSCRIPTION_BEFORE_PERSISTED_RESOURCE_CHECKED pointcut docs"
click CheckedHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html" "Open Subscription pointcut docs"
click MatchedHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html" "Open Subscription pointcut docs"
click NoMatchHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html" "Open Subscription pointcut docs"
click BeforeDeliveryHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html" "Open Subscription pointcut docs"
click AfterDeliveryHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html" "Open Subscription pointcut docs"
click FailedHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html#SUBSCRIPTION_AFTER_DELIVERY_FAILED" "Open SUBSCRIPTION_AFTER_DELIVERY_FAILED pointcut docs"
click RegistrationHook "/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/interceptor/api/Pointcut.html" "Open Subscription pointcut docs"
See the HAPI FHIR Server Pointcuts documentation for the plain-server request lifecycle and the full set of SERVER_* pointcuts (SERVER_INCOMING_REQUEST_*, SERVER_OUTGOING_*, SERVER_HANDLE_EXCEPTION, SERVER_PROCESSING_COMPLETED*, etc.).
flowchart LR
Broker(["Kafka /<br/>ActiveMQ"]):::app
Router["Channel Import<br/>Router"]:::step
Ingested["Resource<br/>Ingested"]:::step
PreProcessedHook["Java Hook:<br/>CHANNEL_IMPORT_MESSAGE_PRE_PROCESSED"]:::javahook
Broker --> PreProcessedHook
PreProcessedHook --> Router
Router --> Ingested
click PreProcessedHook "/docs/apidocs/cdr-api-public-java/ca/cdr/api/fhir/interceptor/CdrPointcut.html#CHANNEL_IMPORT_MESSAGE_PRE_PROCESSED" "Open CHANNEL_IMPORT_MESSAGE_PRE_PROCESSED pointcut docs"
flowchart TB
App(["Your application"]):::app
GwMethod["Gateway Method<br/>Called"]:::step
Route["Route<br/>Selected"]:::step
TargetReq@{ shape: procs, label: "Target<br/>Requests" }
TargetResp@{ shape: procs, label: "Target<br/>Responses" }
Targets@{ shape: procs, label: "Target FHIR<br/>Endpoints" }
PostSelectHook["Java Hook (post route selection):<br/>FHIRGW_CREATE_POST_SELECT_ROUTE<br/>FHIRGW_READ_POST_SELECT_ROUTE<br/>FHIRGW_UPDATE_POST_SELECT_ROUTE<br/>FHIRGW_DELETE_POST_SELECT_ROUTE<br/>FHIRGW_SEARCH_POST_SELECT_ROUTE<br/>FHIRGW_OPERATION_POST_SELECT_ROUTE<br/>FHIRGW_TRANSACTION_POST_SELECT_ROUTE<br/>FHIRGW_INSTANCE_HISTORY_POST_SELECT_ROUTE"]:::javahook
PreInvokeHook["Java Hook (once per target):<br/>FHIRGW_CREATE_TARGET_PREINVOKE<br/>FHIRGW_READ_TARGET_PREINVOKE<br/>FHIRGW_UPDATE_TARGET_PREINVOKE<br/>FHIRGW_DELETE_TARGET_PREINVOKE<br/>FHIRGW_SEARCH_TARGET_PREINVOKE<br/>FHIRGW_SEARCH_PAGE_TARGET_PREINVOKE<br/>FHIRGW_OPERATION_TARGET_PREINVOKE<br/>FHIRGW_TRANSACTION_TARGET_PREINVOKE<br/>FHIRGW_INSTANCE_HISTORY_TARGET_PREINVOKE<br/>FHIRGW_GET_TARGET_PREINVOKE"]:::javahook
PostInvokeHook["Java Hook (once per target):<br/>FHIRGW_READ_TARGET_POSTINVOKE<br/>FHIRGW_SEARCH_TARGET_POSTINVOKE<br/>FHIRGW_OPERATION_TARGET_POSTINVOKE<br/>FHIRGW_GET_TARGET_POSTINVOKE"]:::javahook
App -- "GET / POST / PUT / DELETE<br/>/Patient/123" --> GwMethod
GwMethod --> Route
Route --> PostSelectHook
PostSelectHook --> TargetReq
TargetReq --> PreInvokeHook
PreInvokeHook --> Targets
Targets --> TargetResp
TargetResp --> PostInvokeHook
PostInvokeHook --> App
click PostSelectHook "/docs/apidocs/cdr-api-public-java/ca/cdr/api/fhir/interceptor/CdrPointcut.html" "Open CdrPointcut docs (FHIRGW_*_POST_SELECT_ROUTE family)"
click PreInvokeHook "/docs/apidocs/cdr-api-public-java/ca/cdr/api/fhir/interceptor/CdrPointcut.html" "Open CdrPointcut docs (FHIRGW_*_TARGET_PREINVOKE family)"
click PostInvokeHook "/docs/apidocs/cdr-api-public-java/ca/cdr/api/fhir/interceptor/CdrPointcut.html" "Open CdrPointcut docs (FHIRGW_*_TARGET_POSTINVOKE family)"
%% tab: Java
flowchart TB
Sender(["HL7 v2<br/>Sender"]):::app
subgraph Listener["HL7 v2 Listener"]
direction TB
Receive["MLLP / HTTP Listener<br/>receives HL7 v2 Message"]:::step
Transform["HL7 v2 Message<br/>transformed into<br/>FHIR Bundles"]:::step
PreHook["Java Hook:<br/>HL7V2IN_PRE_HL7V2_TO_FHIR_MAPPING_PROCESSING"]:::javahook
PostHook["Java Hook:<br/>HL7V2IN_POST_HL7V2_TO_FHIR_MAPPING_PROCESSING"]:::javahook
end
subgraph Storage["JPA Server / Storage"]
direction TB
Submit["Bundles submitted<br/>to transaction processor"]:::step
end
Sender -- "HL7 v2 message" --> Receive
Receive --> PreHook
PreHook --> Transform
Transform --> PostHook
PostHook --> Submit
click PreHook "/docs/apidocs/cdr-api-public-java/ca/cdr/api/fhir/interceptor/CdrPointcut.html#HL7V2IN_PRE_HL7V2_TO_FHIR_MAPPING_PROCESSING" "Open HL7V2IN_PRE_HL7V2_TO_FHIR_MAPPING_PROCESSING pointcut docs"
click PostHook "/docs/apidocs/cdr-api-public-java/ca/cdr/api/fhir/interceptor/CdrPointcut.html#HL7V2IN_POST_HL7V2_TO_FHIR_MAPPING_PROCESSING" "Open HL7V2IN_POST_HL7V2_TO_FHIR_MAPPING_PROCESSING pointcut docs"
click Submit "/hapi-fhir/docs/interceptors/server_pointcuts.html" "Open HAPI FHIR Server Pointcuts diagram"
%% tab: JavaScript
flowchart TB
Sender(["HL7 v2<br/>Sender"]):::app
subgraph Listener["HL7 v2 Listener"]
direction TB
Receive["MLLP / HTTP Listener<br/>receives HL7 v2 Message"]:::step
Transform["HL7 v2 Message<br/>transformed into<br/>FHIR Bundles"]:::step
PreHook["Javascript Hook:<br/>onPreConvertHl7V2ToFhir"]:::jshook
PostHook["Javascript Hook:<br/>onPostConvertHl7V2ToFhir"]:::jshook
end
subgraph Storage["JPA Server / Storage"]
direction TB
Submit["Bundles submitted<br/>to transaction processor"]:::step
end
Sender -- "HL7 v2 message" --> Receive
Receive --> PreHook
PreHook --> Transform
Transform --> PostHook
PostHook --> Submit
click PreHook "/docs/hl7_v2x_support/inbound_hl7v2.html#function-onpreconverthl7v2tofhirthemessage-theconversionresult" "Open onPreConvertHl7V2ToFhir docs"
click PostHook "/docs/hl7_v2x_support/inbound_hl7v2.html#function-onpostconverthl7v2tofhirthemessage-theconversionresult" "Open onPostConvertHl7V2ToFhir docs"
click Submit "/hapi-fhir/docs/interceptors/server_pointcuts.html" "Open HAPI FHIR Server Pointcuts diagram"
%% tab: Java
flowchart TB
YourApp(["Your<br/>client"]):::app
CdaImport["$cda-import"]:::step
CreateBundle["Create<br/>transaction<br/>bundle"]:::step
ProcessBundle["Process<br/>transaction<br/>bundle"]:::step
PreHook["Java Hook:<br/>CDA_PRE_IMPORT"]:::javahook
PostHook["Java Hook:<br/>CDA_POST_IMPORT"]:::javahook
YourApp -- "Document as XML" --> CdaImport
CdaImport --> PreHook
PreHook --> CreateBundle
CreateBundle --> PostHook
PostHook --> ProcessBundle
ProcessBundle -- "Operation outcome" --> YourApp
click PreHook "/docs/apidocs/cdr-api-public-java/ca/cdr/api/fhir/interceptor/CdrPointcut.html#CDA_PRE_IMPORT" "Open CDA_PRE_IMPORT pointcut docs"
click PostHook "/docs/apidocs/cdr-api-public-java/ca/cdr/api/fhir/interceptor/CdrPointcut.html#CDA_POST_IMPORT" "Open CDA_POST_IMPORT pointcut docs"
click CdaImport "/docs/guide_tutorials/tutorial_cda_import_json.html" "Sample CDA Document Submission"
%% tab: JavaScript
flowchart TB
YourApp(["Your<br/>client"]):::app
CdaImport["$cda-import"]:::step
CreateBundle["Create<br/>transaction<br/>bundle"]:::step
ProcessBundle["Process<br/>transaction<br/>bundle"]:::step
PreHook["Javascript Hook:<br/>onPreImportCDA"]:::jshook
PostHook["Javascript Hook:<br/>onPostImportCDA"]:::jshook
YourApp -- "Document as XML" --> CdaImport
CdaImport --> PreHook
PreHook --> CreateBundle
CreateBundle --> PostHook
PostHook --> ProcessBundle
ProcessBundle -- "Operation outcome" --> YourApp
click PreHook "/docs/cda_exchange_plus/javascript_import_export_hooks.html#cda-pre-import-scripts" "Open onPreImportCDA docs"
click PostHook "/docs/cda_exchange_plus/javascript_import_export_hooks.html#cda-post-import-scripts" "Open onPostImportCDA docs"
click CdaImport "/docs/guide_tutorials/tutorial_cda_import_json.html" "Sample CDA Document Submission"
%% tab: Java
flowchart TB
Client(["Your Application"]):::app
Export["Export Document"]:::step
Build["Create<br/>Bundle"]:::step
ExternalFile["Generate external file"]:::step
PostHook["Java Hook:<br/>CDA_POST_EXPORT"]:::javahook
Client -- "POST Bundle/{bundle_id}/$sdh.generate-cda" --> Export
Export --> Build
Build --> PostHook
PostHook --> ExternalFile
ExternalFile -- "Operation Outcome" --> Client
click PostHook "/docs/apidocs/cdr-api-public-java/ca/cdr/api/fhir/interceptor/CdrPointcut.html#CDA_POST_EXPORT" "Open CDA_POST_EXPORT pointcut docs"
click Export "/docs/guide_tutorials/tutorial_cda_export.html" "Sample CDA Document Export"
%% tab: JavaScript
flowchart TB
Client(["Your Application"]):::app
Export["Export Document"]:::step
Build["Create<br/>Bundle"]:::step
ExternalFile["Generate external file"]:::step
PostHook["Javascript Hook:<br/>onPostExportCDA"]:::jshook
Client -- "POST Bundle/{bundle_id}/$sdh.generate-cda" --> Export
Export --> Build
Build --> PostHook
PostHook --> ExternalFile
ExternalFile -- "Operation Outcome" --> Client
click PostHook "/docs/cda_exchange_plus/javascript_import_export_hooks.html#cda-post-export-script" "Open onPostExportCDA docs"
click Export "/docs/guide_tutorials/tutorial_cda_export.html" "Sample CDA Document Export"