
Execute Dual-Gated SaMD Clinical Chart Write-Back
Source:R/clinical-writeback.R
clinical_writeback_execute.RdEnforces both the server-wide SaMD feature flag
(clinical_writeback_enabled()) and RBAC "clinical_writeback"
permission (pi or admin) before dispatching or simulating STOW-RS and
FHIR DiagnosticReport + Provenance write-back, logging every event to
the SHA-256 hash-chained audit trail.
Usage
clinical_writeback_execute(
ctx,
principal,
project_id,
air_bundle,
dicomweb_stow_url = NULL,
fhir_base_url = NULL,
dry_run = FALSE
)Arguments
- ctx
A
"dicom_server_context"fromserver_create_context().- principal
Authenticated
"dicom_server_principal".- project_id
Project identifier.
- air_bundle
A
"dicom_ihe_air_bundle"fromihe_air_bundle().- dicomweb_stow_url
Optional DICOMweb
STOW-RSendpoint URL.- fhir_base_url
Optional FHIR R4/R5 base URL for
DiagnosticReportandProvenancewrite-back.- dry_run
Logical; if
TRUE, validates gates and logs audit entry without performing external HTTP calls.