⚠️ Consent handling changes
Extraction results can differ from v1.0.2 for the same CRTDL and data.
-
Only inpatient stays extend the consent start (#1299)
When a broad consent is signed during a stay, TORCH moves the start of the .6 (MDAT erheben) data window back to the start of that stay. This follows the AG Consent Handreichung v1.6.1 §5.6: consent covers the "gesamten aktuellen Aufenthalt". Until
now, any overlapping encounter could do this. Long-running outpatient umbrella cases (Klammerfälle) could therefore push the data window back by years. For example, a consent signed in 2023 inside an ambulatory case open since 2018 was treated as
starting in 2018.
From v1.0.3 on, only encounters with class = IMP (inpatient) move the start. Klammerfälle no longer move the start, and neither do any other ambulatory (AMB), semi-stationary (SS), pre-admission (PRENC), virtual (VR) or home-health (HH) encounters.
Such data from earlier stays needs the retrospective module (.45), as set out in Handreichung §5.8. -
New cutoff for the start shift (#1299)
A new safeguard limits how far the start can move: TORCH_ENCOUNTER_SHIFT_MAX_DAYS, default 7 days. If the inpatient stay began more than 7 days before the consent start, the start is not moved at all. It is not shortened to 7 days either, so the
window starts on the signing date. As a result, a consent signed late in a long inpatient stay, e.g. after an ICU stay, no longer covers the earlier part of that stay. Sites can raise the limit; 0 turns the shift off entirely. -
TORCH_ENABLE_ENCOUNTER_SHIFT is now applied (#1297)
Until now, TORCH ignored the documented spelling of this variable, so the shift stayed on even when it was set to false. It now takes effect, and TORCH_ENABLEENCOUNTERSHIFT works too. -
Conflicting consents are reported (#1321)
One signed consent can contain both a permit and a deny for the same code with overlapping periods. In that case the deny still wins. Such cases are now listed in reports/consent-conflicts.csv so the source data can be corrected.
What this means for you: compared with v1.0.2, patients whose consent was moved back by an outpatient or long-running encounter will have a shorter data window, and resources from before the signing date may be missing. Before extracting, please
check that your sites code Encounter.class correctly: an inpatient case coded as AMB no longer moves the start.
Changes
Added
- Add diagnostics fetch script #1287
- Add encounter shift data to raw provisions diagnostics #1294
- Flag conflicting consent permits and denies within a signing event and aggregate provisions per event #1321
Changed
Fixed
- Normalize relative patient ids in extract-data patient parameter #1289
- Fix TORCH_ENABLE_ENCOUNTER_SHIFT not being applied #1297
- Fix expired FHIR search page links failing the whole job #1301
- Fix transfer script failing on large CRTDLs and lowercase Content-Location header #1302
- Fix flaky task-api-test #1318
Documentation
- Add versioned documentation following Aether's approach #1313