Criteria Relative Date Extension¶
| Canonical | ../StructureDefinition/criteria-relative-date |
|---|---|
| Status | draft · 1.26.0 |
| Base | Extension (constraint) |
| Context | Library (element) |
| Source | FSH · JSON |
Whether this module definition's membership can change through the passage of time alone. True means the criteria are anchored to a moving reference point ("no visit in the last six months"), so membership goes stale without any write and a periodic re-evaluation is required. False means membership can only change when data changes, so a change feed is sufficient. Derived from the criteria logic, not declared beside it.
FSH
The authored source of truth: extensions/CriteriaRelativeDate.fsh (edit on GitHub). One FSH file may define several related artifacts.
// CriteriaRelativeDate.fsh
// FHIR-71. Stamped on a module-definition Library by the data-requirements analysis, DERIVED from
// the criteria library's ELM rather than declared alongside it, so it cannot drift from the logic
// it describes.
//
// WHAT IT ANSWERS: can this criteria library's membership change by the passage of time ALONE?
//
// "Two eGFR results at least 90 days apart" cannot. Once a patient satisfies it the patient keeps
// satisfying it, and the only thing that can change the answer is a write. "No visit in the last
// six months" can: nobody writes anything, the clock moves, and yesterday's non-member is today's
// member.
//
// That distinction is the difference between a cohort that can be re-scored from a change feed and
// one that also needs a periodic sweep. It is worth carrying because a consumer that cannot tell
// the two apart has to assume the worse case for every cohort, and sweep all of them.
//
// WHY IT IS ALWAYS PRESENT AND NEVER OMITTED. Writing the extension only when the value is true
// would make absence ambiguous: it would mean EITHER "the analysis ran and the answer is no" OR "no
// analysis ran", and those have opposite consequences. The first says a sweep is unnecessary; the
// second says nothing at all. A consumer reading absent-as-false would silently skip a sweep that a
// rot-prone cohort needed, and the cohort would go stale with every surface still reporting success.
// So the value is written explicitly either way, and a Library that omits it is one this analysis
// did not produce.
Extension: CriteriaRelativeDate
Id: criteria-relative-date
Title: "Criteria Relative Date"
Description: "Whether this module definition's membership can change through the passage of time alone. True means the criteria are anchored to a moving reference point (\"no visit in the last six months\"), so membership goes stale without any write and a periodic re-evaluation is required. False means membership can only change when data changes, so a change feed is sufficient. Derived from the criteria logic, not declared beside it."
* ^url = "../StructureDefinition/criteria-relative-date"
* ^status = #draft
* ^context[0].type = #element
* ^context[0].expression = "Library"
* value[x] only boolean
* value[x] 1..1
* value[x] ^short = "true = membership rots with the clock; false = membership changes only on a write"
* value[x] ^definition = "Always populated explicitly. An absent extension means this data-requirements analysis did not produce the Library, NOT that the value is false -- those two have opposite consequences for whether a periodic sweep is required."
* url 1..1