Skip to content
Alpha: see what works today →
Menu

For tools: runtime/matcher.feature

The matcher's procedure

The scenario the examples run

How the matcher judges records the same: which records it takes, in what order, by which rules, and what it writes.

Each pod starts empty, at https://pod.example/, with one person as its subject (scripted-input/people.ttl). Cleo claims her hospital profile with an About, imports five allergies, enters ten more by hand, and judges some herself. Dev enters pairs of allergies, procedures and flu shots for the matcher to compare, and later two more allergies. Eve enters twelve allergies whose codes the product ingredients table gives one ingredient, and three shots of one day. Finn brings exports and entries a runtime must refuse, and two allergies of one code under a rule list of his own, and, with the rule list of an app, connects to a hospital's server at its address and again at a new path or a new host. Gus enters three flu shots. Hana enters nine conditions, whose codes recur. Gus, with the drug tables of an app, enters medications of RxNorm and NDC codes, and pairs of medications that share an NDC, a product code or only an ingredient, each pair in an entry of its own, some first under an app's earlier version "0" of the rule list. Ivo, with the variant classifications table of an app, enters pairs of variants that carry a ClinVar ID, an HGVS expression or both, each pair in an entry of its own. Gus, with the vocabulary's rule list of an app, enters lab results whose values, units and times differ by a little, and imports a hospital's summary, an exchange's that names the hospital as its author, and a clinic's, each holding a potassium of one business identifier. Hana, with the vocabulary's rule list of an app, enters conditions, flu shots and lab results whose dates are a year, a month or a time to the hour. Gus, with the vocabulary's rule list of an app, imports his clinic's summaries, whose plan of treatment grows, and the hospital course his hospital and his clinic each send, and, with the drug products table, enters two courses of metformin years apart and a copy within the first. Except where an example names another, a person's references/ and an app's tables hold the vocabulary's rule list, version 19.

28 rules, 71 examples: 71 pass, 0 fail, 0 not run

M1. A step's records are those with at least one first revision from that step's import, entry session or connect, the servers its connect wrote any revision for, or all from acts its sync names

Ruled by When a source moves, switches vendor or issues a new edition, row what a run compares; What a pod costs as it grows, row runs bound to arrivals, scoped within an organisation

A record's first revisions are those with no prov:wasRevisionOf; it has one or more, one from each writer that imported one export. A step's records are those with at least one first revision generated by (prov:wasGeneratedBy) the import, entry session or connect that step made, or, for a step that received another writer's files, those all of whose first revisions were generated by acts its sync names (prov:wasInformedBy, S2): the records first held through that sync; a sync naming no act has none. A server's record (M2) is the step's too when any of its revisions, its first or a later one, was generated by the connect that step made, so a reconnect is taken (M20). The matcher is given that activity, the sync for a sync, and its run is prov:wasInformedBy it, its cause; it reads no file name and no list of steps. A record's arrival is its earliest first revision's prov:generatedAtTime. A record the matcher takes (M2) with no first revision fails the run. A run compares only its step's records, each with every other record the matcher takes: each comparison query is evaluated with ?record bound to the step's records (M4a), never over every pair in the pod.

Two runs compare the whole pod, with ?record unbound, and no other: a recheck (M7), which follows a new version of a table or of the rule list, and an open (O1), which then takes the records of the pairs its tables newly join.

No example can tell this from taking the records whose first revision's file the step wrote, since in a pod that follows these rules the two always agree. Each runtime tests it itself.

Why a run is bound to what arrived. A pair neither of whose records arrived was compared when the later of them did, so a run compares the arrived records with their code groups and nothing else; a sync is a trigger because a union leaves pairs no matcher saw together. With ?record unbound, every run enumerates every ordered pair of every code group, about 1 to 5M rows, and same-result within one code is about 80M comparisons, where bound it is about 100k (assumed ten-year pod, #206).

When a source moves, switches vendor or issues a new edition: the whole Why, the alternatives that lost and what would change our mind.

2 examples: 2 pass, 0 fail, 0 not run

passa run takes only the records its step brought, so the import's two codeine records are never judged together
Example: a run takes only the records its step brought, so the import's two codeine records are never judged together
  Given a new pod for Cleo on 2026-03-01 at 09:00
  And Cleo files the judgment "about-p" on 2026-03-01 at 09:05
  And the export "first-export" is imported on 2026-03-02 at 10:00
  And Cleo enters "entry" on 2026-03-03 at 08:00
  When the matcher runs on the records of that entry on 2026-03-03 at 08:01
  Then that step wrote these matcher judgments:
    | justification | members                                                                                                         |
    | same code     | allergy RxNorm 10180 from sulfa, allergy RxNorm 10180 "Gantanol"                                                |
    | same code     | allergy RxNorm 1191 "Aspirin", allergy RxNorm 1191 "Bayer aspirin"                                              |
    | same code     | allergy RxNorm 1191 "Bayer aspirin", allergy RxNorm 1191 "Ecotrin"                                              |
    | same code     | allergy RxNorm 7980 "Penicillin G", allergy RxNorm 7980 "Bicillin"                                              |
    | same code     | allergy RxNorm 2670 from codeine-1, allergy RxNorm 2670 from codeine-2, allergy RxNorm 2670 "Codeine phosphate" |
passa sync's run takes the records the sync brought, so it joins a pair neither writer held together
Example: a sync's run takes the records the sync brought, so it joins a pair neither writer held together
  Dev's first writer enters Principen, and the second Ampicillin, both RxNorm 733; the second writer receives the
  first's files.

  Given a new pod for Dev on 2026-04-01 at 09:00
  And a second writer of the pod
  And Dev enters "later" on 2026-04-04 at 09:00
  And the steps that follow are the second writer's
  And Dev enters "pairs" on 2026-04-04 at 10:00
  And the second writer receives the files of the first writer on 2026-04-05 at 09:00
  When the matcher runs on the records of that step on 2026-04-05 at 09:05
  Then the matcher's judgments holding allergy RxNorm 733 "Principen" and allergy RxNorm 733 "Ampicillin" are:
    | justification | members                                                         |
    | same code     | allergy RxNorm 733 "Principen", allergy RxNorm 733 "Ampicillin" |
  When the query is:
    """
    SELECT ?causeStep WHERE {
      GRAPH <urn:cascade:steps> { <urn:cascade:step:matcher> prov:generated ?file . ?causeStep prov:generated ?causeFile }
      GRAPH ?file { ?run a cascade:MatcherRun ; prov:wasInformedBy ?cause }
      GRAPH ?causeFile { ?cause a cascade:SyncFromAnotherWriter }
    }
    """
  Then it answers:
    | causeStep               |
    | <urn:cascade:step:sync> |

M2. The matcher takes only the subject's records, and the servers' records that have a version

Ruled by When a source moves, switches vendor or issues a new edition, rows server, organisation

Those queries/derivations/subjects.rq gives the pod's cascade:Subject, under the everyday lens. A server's or an organization's record names no patient, as cascade:ServerShape and cascade:OrganizationShape hold, so it is never the subject's (decisions/republishing-sources.md, rows "server" and "organisation"). A server's record is taken all the same when it has a version, which only a connect writes (A16), and only R14 applies to it (M20, decisions/republishing-sources.md, row "two servers are one"); an organization's record is never taken.

Why the client's address, and the self-URL only as evidence. Hashing the server's self-asserted base instead of the client's address was measured and lost (research 2): it survives a path edit and not a hosting move (verified, probed: 19 of 19 old Epic hosts now report the new host as themselves), MEDITECH never sends it, eClinicalWorks reports one base for every practice (both verified, probed), and Epic documents that it can differ per client id; as a judgment input it keeps the benefit and makes the failure retractable.

When a source moves, switches vendor or issues a new edition: the whole Why, the alternatives that lost and what would change our mind.

2 examples: 2 pass, 0 fail, 0 not run

passa record whose patient profile no About claims, or which names no patient, is never taken nor compared
Example: a record whose patient profile no About claims, or which names no patient, is never taken nor compared
  Given a new pod for Cleo on 2026-03-01 at 09:00
  And Cleo files the judgment "about-p" on 2026-03-01 at 09:05
  And the export "first-export" is imported on 2026-03-02 at 10:00
  And Cleo enters "entry" on 2026-03-03 at 08:00
  When the matcher runs on the records of that entry on 2026-03-03 at 08:01
  Then the matcher has no judgment holding allergy RxNorm 10180 from sulfa-other, allergy RxNorm 10180 "Septra" and allergy RxNorm 10180 "Bactrim"
passwhile an About claims a profile the matcher takes its records, and once it is retracted, none
Example: while an About claims a profile the matcher takes its records, and once it is retracted, none
  Given a new pod for Cleo on 2026-03-01 at 09:00
  And Cleo files the judgment "about-r" on 2026-03-04 at 07:00
  And Cleo enters "second-entry" on 2026-03-04 at 08:00
  And the matcher runs on the records of that entry on 2026-03-04 at 08:01
  And Cleo files the judgment "retract-about-r" on 2026-03-04 at 12:00
  And Cleo enters "third-entry" on 2026-03-05 at 08:00
  When the matcher runs on the records of that entry on 2026-03-05 at 08:01 (match-third-entry)
  Then the matcher's judgments holding allergy RxNorm 8591 "Latex gloves", allergy RxNorm 8591 "Latex" and allergy RxNorm 8591 "Natural rubber latex" are:
    | justification | members                                                         |
    | same code     | allergy RxNorm 8591 "Latex gloves", allergy RxNorm 8591 "Latex" |

M2a. A person's NotAbout over a patient profile hides its records from the subject until an act names it

Ruled by What a judgment is, and what it borrows, rows not about, verdict

While a person's cascade:NotAbout over a profile counts for the subject, no record naming the profile is the subject's (queries/derivations/subjects.rq), whatever About counts: the matcher takes none of them (M2), and each is in no view, hidden, never deleted. It outranks a machine's About and its own maker's earlier About, and each record is left out because its profile has a counting NotAbout. An About by a person that it does not outrank, filed by its own maker after it or by another person at any time, stands against it: the records stay hidden, left out because the profile has a counting NotAbout and a person's About that stands against it, and queries/questions/profile/What needs review.rq lists the profile with the people on both sides. Only an act that names the NotAbout, its retraction or a judgment replacing it, lifts it, so no later import or About gives the records back.

The examples have one person, the pod's owner; tests/fixtures/a-profile-judged-both-about-and-not-about-is-held-back shows two people and three, and tests/fixtures/a-not-about-outranks-its-makers-earlier-about-and-a-machines a machine's About.

Why a person's NotAbout is needed, and outranks a machine's About and its maker's earlier one. The import once filed an About for every profile no counting About claimed, signed by the owner in the patient's role, so a parent's only "these are not my child's" was to retract words they never said, and the next import said them again. The import now claims nothing by itself, and a person says no with a verdict of its own over the profile record, which keeps its name across pulls. It does not borrow Different's reason for winning: Different wins so the pod errs toward showing, and a NotAbout hides. It wins over a machine's About because a person outranks every machine, and over its own maker's earlier About because the later word of one person is that person's answer.

What a judgment is, and what it borrows: the whole Why, the alternatives that lost and what would change our mind.

3 examples: 3 pass, 0 fail, 0 not run

passCleo's NotAbout after her own About leaves the profile's record in no view, and the matcher takes it no more
Example: Cleo's NotAbout after her own About leaves the profile's record in no view, and the matcher takes it no more
  Of the entry's two latex allergies, only "Latex gloves" names the profile; "Latex" names Cleo herself.

  Given a new pod for Cleo on 2026-03-01 at 09:00
  And Cleo files the judgment "about-r" on 2026-03-04 at 07:00
  And Cleo enters "second-entry" on 2026-03-04 at 08:00
  And Cleo files the judgment "not-about-r" on 2026-03-04 at 09:00
  When the matcher runs on the records of that entry on 2026-03-04 at 09:01
  Then the matcher has no judgment holding allergy RxNorm 8591 "Latex gloves" and allergy RxNorm 8591 "Latex"
  And these records are in no view, for these reasons:
    | record                             | reason                                      | because                                         |
    | allergy RxNorm 8591 "Latex gloves" | its patient profile has a counting NotAbout | <urn:uuid:428ff610-55f5-8b55-8661-4540e8cb2517> |
passan About Cleo files after her NotAbout, as an import claiming the profile would, holds the profile back and lists it
Example: an About Cleo files after her NotAbout, as an import claiming the profile would, holds the profile back and lists it
  Given a new pod for Cleo on 2026-03-01 at 09:00
  And Cleo files the judgment "about-r" on 2026-03-04 at 07:00
  And Cleo enters "second-entry" on 2026-03-04 at 08:00
  And Cleo files the judgment "not-about-r" on 2026-03-04 at 09:00
  When Cleo files the judgment "about-r-after-not-about-r" on 2026-03-04 at 10:00
  And the query "questions/profile/What needs review.rq" is asked
  Then it answers:
    | profile                                         | profileLabel                                                   | needs                                         | hospital | records | saidAbout                                 | saidNotAbout                              |
    | <urn:uuid:428ff610-55f5-8b55-8661-4540e8cb2517> | "Patient profile · unknown source · first received 2026-03-04" | "judged both about and not about the subject" |          | 1       | "https://pod.example/profile/card.ttl#me" | "https://pod.example/profile/card.ttl#me" |
  And these records are in no view, for these reasons:
    | record                             | reason                                                                                  | because                                         |
    | allergy RxNorm 8591 "Latex gloves" | its patient profile has a counting NotAbout and a person's About that stands against it | <urn:uuid:428ff610-55f5-8b55-8661-4540e8cb2517> |
passretracting the NotAbout gives the records back to Cleo, by the About it no longer outranks
Example: retracting the NotAbout gives the records back to Cleo, by the About it no longer outranks
  Given a new pod for Cleo on 2026-03-01 at 09:00
  And Cleo files the judgment "about-r" on 2026-03-04 at 07:00
  And Cleo enters "second-entry" on 2026-03-04 at 08:00
  And Cleo files the judgment "not-about-r" on 2026-03-04 at 09:00
  When Cleo files the judgment "retract-not-about-r" on 2026-03-04 at 11:00
  Then the allergies view holds these entries:
    | members                            |
    | allergy RxNorm 8591 "Latex gloves" |
    | allergy RxNorm 8591 "Latex"        |

M3. It takes them in order of arrival, then by record name

No decision note rules this: it is mechanics every runtime follows alike.

Arrival is the earliest first revision's prov:generatedAtTime (M1), compared as a time. All of one step's records arrive at the step's start (N4), so the record name decides among them. It compares each with the other records it takes, then adds it to them for the next.

No example can tell ordering by record name from ordering by file path, since a record's file is named from its name (N9) in its kind's folder and no comparison joins two kinds; this example pins what the order does.

1 example: 1 pass, 0 fail, 0 not run

passthree records of one code are two judgments, each record compared with those taken before it
Example: three records of one code are two judgments, each record compared with those taken before it
  Given a new pod for Cleo on 2026-03-01 at 09:00
  And Cleo enters "entry" on 2026-03-03 at 08:00
  When the matcher runs on the records of that entry on 2026-03-03 at 08:01
  Then the matcher's judgments holding allergy RxNorm 1191 "Aspirin", allergy RxNorm 1191 "Bayer aspirin" and allergy RxNorm 1191 "Ecotrin" are:
    | justification | members                                                            |
    | same code     | allergy RxNorm 1191 "Aspirin", allergy RxNorm 1191 "Bayer aspirin" |
    | same code     | allergy RxNorm 1191 "Bayer aspirin", allergy RxNorm 1191 "Ecotrin" |

M4. Each row of the rule list runs its comparison query

No decision note rules this: it is mechanics every runtime follows alike.

For each row of the current rule list, the matcher runs the query the row names, with ?record bound to the records the run compares (M1), over the pod, its derived state under the everyday lens, and, for a row naming a table kind (cascade:tableKind), the rows of the current version of every series of that kind (M13). A row (record, other) of its answer, with the version whose rows joined it as ?origin when the rule reads a table, is a match when the record's class is one the row applies to (cascade:appliesToClass). A recheck and an open run it with ?record unbound.

1 example: 1 pass, 0 fail, 0 not run

passtwo allergies with one code are the same by code, and one with another code joins neither
Example: two allergies with one code are the same by code, and one with another code joins neither
  Then the matcher's judgments holding allergy RxNorm 10180 "Sulfamethoxazole", allergy RxNorm 10180 "Bactrim" and allergy RxNorm 2670 are:
    | justification | members                                                                 |
    | same code     | allergy RxNorm 10180 "Sulfamethoxazole", allergy RxNorm 10180 "Bactrim" |

M4a. A run binds ?record to its records as an initial binding, or as a VALUES block on an engine that takes none

Ruled by What a pod costs as it grows, row runs bound to arrivals, scoped within an organisation

?record is bound as SPARQL's substitution binds a variable: an initial binding, as pyoxigraph's substitutions and rdflib's initBindings give it, one evaluation per record; or, on an engine that takes no initial binding, as Oxigraph's JavaScript build does not, a VALUES ?record block of the run's records opening the query's outermost group and each group the query marks, one evaluation per query per run. A comparison marks a group with a comment line, # bound: ?record, with nothing but white space, or WHERE, between it and the group's opening brace, whose first token is not SELECT; a number sign inside a string or an IRI opens no comment. It marks only a group inside a sub-select that binds ?record in a triple pattern of its own, outside any nested pattern, and that has no LIMIT, OFFSET or HAVING and groups, if it groups or aggregates at all, by ?record; and only where taking ?record as the run's records leaves those records' rows as they are. A comparison that works each side of a pair out in a sub-select marks the record's side, and a sub-select in the other side that gives it the keys of the records bound, such as their codes, so a run works out its records' side and only the others that share a key, never every record in the pod. The two give the same rows because every comparison binds ?record in its outermost group before any sub-select or MINUS reads it, and binding a marked group drops no row of the run's records. A query is plain SPARQL, which an adapter or an app may run unbound.

No example can tell the two ways of binding ?record apart, since they give the same rows. Each runtime tests its own, and the vocabulary's tests check the mark.

Work follows what arrived. A sync check, a matcher run and a view rebuild each cost what the act brought and the groups it touches: a sync check needs no hash of the set because in a grow-only set "a file arrived I lacked" says the same; a run compares the arrived records with their code groups, since every older pair was compared when its later record arrived; a rebuild touches the records whose current state could have changed, because the ladder is per record and an entry a closure. The wholesale cases are named and rare: a rule list version's first run (40), a vendor switch, an organisation Same, and the three rebuild triggers.

What a pod costs as it grows: the whole Why, the alternatives that lost and what would change our mind.

M4b. A query reads a table's rows only inside GRAPH ?origin, guarded by the table's kind

No decision note rules this: it is mechanics every runtime follows alike.

A query reads a table's rows only inside GRAPH ?origin, guarded by ?origin prov:specializationOf/cascade:tableKind and its kind.

No example shows this rule: it is the form of every query that reads a table, which the vocabulary's tests check against the table kind each rule list's row names.

M4c. A code joins a table's row as its IRI: its system's stem and, for a code written as a literal, the literal percent-encoded

Ruled by The IRI of every code, row a literal joining as an IRI; Clinical terms with one meaning each, row 6. `vaccineCode`

A record's code joins a row by the code's IRI, one form per code system (cascade:CodeSystem in cascade.ttl): a code held as an IRI, as a vaccine code is, <https://ns.cascadeprotocol.org/codes/cvx/141>, joins as it is; a code written as a literal is its system's void:uriSpace followed by the literal percent-encoded as SPARQL's ENCODE_FOR_URI does (every character but A-Z a-z 0-9 - _ . ~ as % and two upper-case hexadecimal digits of its UTF-8), as an HGVS expression, which holds reserved characters, cascade:hgvsCodingDnaExpression "NM_000249.4:c.2042C>T", is <https://ns.cascadeprotocol.org/codes/hgvs/NM_000249.4%3Ac.2042C%3ET>. Every query that joins a literal to a stem encodes it. The rationale is decisions/code-iris.md.

No example here shows this rule alone: M4d's vaccine group example joins CVX codes held as IRIs to a table's rows, and M17's join an HGVS expression to a row through its encoding.

Why every query encodes after the re-mint. The pinned comparisons were exempt only because a rule list version pins its queries' bytes, so encoding them meant a new version for no change in what they join. The settlement rewrites rule lists and matcher queries in place and regenerates published-bytes.json (D3): every pinned query's bytes change at this re-mint, the CVX stem with them, so the exemption buys nothing and its test exception goes.

The IRI of every code: the whole Why, the alternatives that lost and what would change our mind.

M4d. Each version of the rule list names, for each of its rules from R1 to R21, the query that rule's row runs

No decision note rules this: it is mechanics every runtime follows alike.

Each row names its rule, the rule's class and justification (a finding, for a rule that files no judgment), and the query it runs, with the table kind it reads, if any. A matcher judgment cites its rule, and its assertion the list's version and the hash of the query that version's row for the rule runs.

The vocabulary's own rule list, runtime/rule-list/, is the one an app uses. Its rows are:

  • R1, cascade:SameCodeRule, justified cascade:SameCode: queries/matcher/same-code-key-joined-first.rq, for allergies and procedures. R1 reads a procedure's or a condition's code only where its IRI is in SNOMED CT's space, http://snomed.info/id/: two procedures coded CPT 36415 a year apart are two entries, and a CPT or an ICD-10-CM code joins nothing under R1.
  • R2, cascade:SameCodeAndDateRule, justified cascade:SameCodeAndDate: queries/matcher/same-code-and-day-or-exact-time-key-joined-first.rq, for immunizations only. Two shots of one code on one day or at one time its source wrote to the second (M23).
  • R3, cascade:SameMappedCodeRule, justified cascade:SameMappedCode: queries/matcher/same-active-ingredient-key-joined-first.rq, with cascade:ProductIngredients, for allergies only. It reads rows under obo:RO_0002248 (has active ingredient), the relation its prior art uses; its example is under O1.
  • R4, cascade:SameMappedCodeAndDateRule, justified cascade:SameMappedCodeAndDate: queries/matcher/same-vaccine-group-and-day-or-exact-time-key-joined-first.rq, with cascade:VaccineGroups, for immunizations only. It reads rows under obo:RO_0002350 (member of), and a date as R2 does.
  • R5, cascade:SameMedicationCodeRule, justified cascade:SameMedicationCode: queries/matcher/same-ndc-code-and-overlapping-exposure-periods.rq, for medications only. Two medications that share an NDC code and whose exposure periods share a day (M15, M16). It reads no table.
  • R6, cascade:SameResultRule, justified cascade:SameResult: queries/matcher/same-code-instant-to-the-second-value-and-unit-others-by-code-and-instant.rq, for lab results only. Two results of one LOINC code at one instant whose values are of one kind and equal, in one unit (M21).
  • R7, cascade:SameConvertedCodeRule, justified cascade:SameConvertedCode: queries/matcher/same-one-to-one-conversion-key-joined-first.rq, with cascade:CodeConversions, for conditions only. A retired code and its replacement are joined only by a dct:isReplacedBy row whose cardinality is 1:1; a split (1:n), a merge (n:1) and an n:n row join nothing, since one judgment holds a record and all it matched. Its example is under O1.
  • R8, cascade:SameCodeAndPeriodRule, justified cascade:SameCodeAndPeriod: queries/matcher/same-code-and-period-read-as-ranges.rq, for conditions only. Two conditions of one condition code whose periods overlap, each onset and abatement read as the days its type covers (M14, M23).
  • R10, cascade:SameBrandGenericRule, justified cascade:SameBrandGeneric: queries/matcher/same-brand-generic-and-overlapping-exposure-periods.rq, with cascade:BrandGenerics, for medications only. A branded product and its generic, or two brands of one generic, when the records share no code (M15).
  • R11, cascade:SameProductCodeRule, justified cascade:SameProductCode: queries/matcher/same-product-code-in-current-tables-and-overlapping-exposure-periods.rq, with cascade:DrugProducts, for medications only. Two medications that share an RxNorm code which a current version of a drug products table says names one product, a version's product codes counted over the current version of each series alone, so an app may drop an old version's rows (M16). A pair that shares an NDC is left to R5.
  • R12, cascade:SameVariationRule, justified cascade:SameVariation: queries/matcher/same-variation-key-joined-first.rq, for variants only. Two variants whose current versions carry one ClinVar VariationID (M17).
  • R13, cascade:SameVariationThroughTableRule, justified cascade:SameVariationThroughTable: queries/matcher/same-variation-through-current-tables-key-joined-first.rq, with cascade:VariantClassifications, for variants only. Two variants whose current versions find one row of one version of a variant classifications table, the rows an expression is on counted over current versions alone (M17).
  • R14, cascade:SameSelfAssertedBaseUrlAndAuthorizationEndpointOnOneHostRule, justified cascade:SameSelfAssertedBaseUrlAndAuthorizationEndpointOnOneHost: queries/matcher/same-self-asserted-base-url-and-authorization-endpoint-on-one-host.rq, for servers only (M20).
  • R15, cascade:SameResultOnOneDayRule, justified cascade:SameResultOnOneDay: queries/matcher/same-code-day-or-padded-time-value-and-unit-others-by-code-and-day.rq, for lab results only. As R6, on one day, at least one of the two stamped with the day alone or a padded time: a likely join (M21, M23).
  • R16, cascade:DifferentResultValuesRule, finding cascade:DifferentResultValuesAtOneInstant: queries/matcher/same-code-instant-to-the-second-different-values-others-by-code-and-instant.rq, for lab results only. It files no judgment: each pair its query gives, of the run's records with the subject's others, is a finding for review naming the two records and their current versions. Its row gives cascade:findingKind where every other judging row gives cascade:justifiedAs.
  • R17, cascade:DifferentResultUnitsRule, finding cascade:DifferentResultUnitsAtOneInstant: queries/matcher/same-code-instant-to-the-second-different-units-others-by-code-and-instant.rq, for lab results only. As R16, a finding for review, of two results of one code at one instant whose units differ.
  • R18, cascade:SameBusinessIdentifierAndTestCodeWithinOneOrganizationRule, justified cascade:SameBusinessIdentifierAndTestCodeWithinOneOrganization: queries/matcher/same-business-identifier-and-test-code-within-one-organization-bound-per-side.rq, for lab results only. Two results whose current versions carry one business identifier of a named system, one LOINC code and one time, or one no time, from documents naming one organization record, or two currently the same organization (M22).
  • R19, cascade:SameNoteTypeAndTextGrownWithinOneOrganizationRule, justified cascade:SameNoteTypeAndTextGrownWithinOneOrganization: queries/matcher/same-note-type-and-text-grown-within-one-organization.rq, for notes only. Two notes of one type from documents of one organization, the shorter one's text beginning or ending the longer one's, as a chain (M24).
  • R20, cascade:SameNoteTypeAndTextRule, justified cascade:SameNoteTypeAndText: queries/matcher/same-note-type-and-text.rq, for notes only. Two notes of one type and one text, from any sources.
  • R21, cascade:SameNoteOrDocumentMasterIdentifierRule, justified cascade:SameNoteOrDocumentMasterIdentifier: queries/matcher/same-note-or-document-master-identifier.rq, for notes only. Two notes of one master identifier typed by its system, from any sources.

A query whose name ends key-joined-first reaches the other record of a pair through the code, or the table row, the two share, and compares their kinds only then, never pairing every record of a kind with every other first. One that works each side of a pair out in a sub-select binds ?record in the record's side and reads the other side only for the keys its records carry (M4a): the test code, with the instant or, for R15, the day, and for R18 the business identifier and the test code. A time, with a zone or without, that an engine cannot work out to an instant (Oxigraph cannot one written to more than 18 fractional digits, which a conforming pod may hold) is read as written, so it is the instant of the records that write it alike and of no other.

Dev's references/ hold version 19 of the rule list, a product ingredients table and a vaccine group table. His pairs of procedures, flu shots and allergies close this rule.

4 examples: 4 pass, 0 fail, 0 not run

passtwo procedures of one code are the same by code whatever their dates
Example: two procedures of one code are the same by code whatever their dates
  Then the matcher's judgments holding procedure SNOMED 73761001 "Colonoscopy" and procedure SNOMED 73761001 "Screening colonoscopy" are:
    | justification | members                                                                                    |
    | same code     | procedure SNOMED 73761001 "Colonoscopy", procedure SNOMED 73761001 "Screening colonoscopy" |
passtwo immunizations of one CVX code on one date are the same by code and date, and one on another date joins neither
Example: two immunizations of one CVX code on one date are the same by code and date, and one on another date joins neither
  Then the matcher's judgments holding immunization CVX 150 "Fluzone", immunization CVX 150 "Afluria" and immunization CVX 150 "Flucelvax" are:
    | justification      | members                                                        |
    | same code and date | immunization CVX 150 "Fluzone", immunization CVX 150 "Afluria" |
passimmunizations of different codes in one vaccine group on one date are the same by mapped code and date
Example: immunizations of different codes in one vaccine group on one date are the same by mapped code and date
  M3 takes FluLaval after the two shots of the other code on its date, which the same code and date has joined in
  one entry by then, so its matcher judgment holds it and the least of those two (M5). A shot of their code on another date
  joins none.

  Then the matcher's judgments holding immunization CVX 141 "Fluarix", immunization CVX 150 "FluLaval", immunization CVX 141 "Flublok" and immunization CVX 141 "Fluad" are:
    | justification             | members                                                         |
    | same mapped code and date | immunization CVX 141 "Fluarix", immunization CVX 150 "FluLaval" |
    | same code and date        | immunization CVX 141 "Fluarix", immunization CVX 141 "Fluad"    |
passcodes are joined through the current version of the product ingredients table only
Example: codes are joined through the current version of the product ingredients table only
  Version 1 gives penicillin G potassium injection its ingredient, penicillin G, and version 2, which revises it,
  gives ampicillin injection its ingredient, ampicillin, instead. A pair the old version joins is not joined once the
  new one arrives, and a pair only the new one joins is joined only then.

  Given version "2" of "RxNorm product ingredients" arrives on 2026-04-03 at 09:00
  And Dev enters "later" on 2026-04-04 at 09:00
  When the matcher runs on the records of that entry on 2026-04-04 at 09:05 (match-later)
  Then the matcher's judgments holding allergy RxNorm 204466, allergy RxNorm 7980 "Penicillin G", allergy RxNorm 1721474, allergy RxNorm 733 "Ampicillin", allergy RxNorm 7980 "Bicillin" and allergy RxNorm 733 "Principen" are:
    | justification    | members                                                            |
    | same mapped code | allergy RxNorm 7980 "Penicillin G", allergy RxNorm 204466          |
    | same code        | allergy RxNorm 7980 "Bicillin", allergy RxNorm 7980 "Penicillin G" |
    | same code        | allergy RxNorm 733 "Principen", allergy RxNorm 733 "Ampicillin"    |
    | same mapped code | allergy RxNorm 733 "Principen", allergy RxNorm 1721474             |

M5. It writes one matcher judgment per record per rule, and per table version, that matched anything, and asserts it under the rule list's version

Ruled by How everything in a pod is named, rows matcher judgment, assertion, retraction by a release, maker; What a judgment is, and what it borrows, rows maker, matcher judgment and assertion, what a judgment, a finding or a view came from; What a pod costs as it grows, row the star

The matcher judgment's members are the record and, of each entry among the records that version's rows matched it with, or the rule matched it with when the rule reads no table, the least of those it is not judged different from, or the least of them all when it is judged different from each, in code point order of their names: a star, so a record matched with every earlier copy of one fact names one of them, and the entries are those every pair of them would give (queries/derivations/ same-pairs.rq). The entries are those the counting Sames make, as same-pairs.rq derives them, with the matcher judgments the run has filed before, and without any Same that holds the record or a record that arrived after it (M3), so a run again over the same records reaches the same matcher judgments. A Different filed later that splits an entry a matcher judgment's star reached is answered by the next recheck (M7), so the facts give the same entries in either order. The matcher judgment is cascade:Same with the rule's justification and cites the rule (cascade:matcherRule). It uses the table version whose rows joined it, if any, and each member's current version, never the rule list's version. It is attributed to the matcher, cascade:CascadeMatcher, carries no time, and is named by N6.

Its assertion, a cascade:MatcherJudgmentAssertion named by N6, asserts it (cascade:assertedJudgment) under the rule list's version (cascade:assertedUnderRuleListVersion). The everyday lens counts the matcher judgment while every version it used is current, or has a current version whose rows join its members (M7), and the current version of a rule list has a row for the matcher judgment's rule with the cascade:queryHash of that rule's row in a version the matcher judgment is asserted under (M8, queries/lenses/everyday.rq). A matcher judgment carries no run: the run is an act (N7), and which run wrote a matcher judgment or an assertion is read from the run's snapshot, which names every file it wrote (N14).

Why a matcher judgment, an assertion per rule list version, and one matcher agent. A matcher judgment is named once, with an assertion per rule list version because the same inputs give the same name, so a later version that agrees could otherwise write nothing, and a run that reaches an asserted judgment writes nothing, so a daily run adds no files. A matcher judgment counts while its maker is trusted, its used versions are current, and it has an assertion under a rule list version whose row for the rule carries the same rec:queryHash as the version the app uses. M11 pins a rule's bytes, so two versions with one hash reach the same matcher judgments, and a new version asserts only the matcher judgments of the rules it changed; an assertion per matcher judgment per version would be 600k to 1.2M files over ten years, more than the rest of the pod (computed, #206). A matcher judgment's members are the record and the least member of each entry it matched, a star, because entries are a transitive closure and come out the same, where every earlier copy as a member makes a fact re-downloaded in each monthly summary a matcher judgment of 1, 2 … g members, which same-pairs.rq expands to about 58M pairs over ten years (computed from an assumed 100 persistent entries per summary, #206). The rule list's version is out of the matcher judgment's name because with it in, every version renamed every matcher judgment, the duplication the split exists to stop; the member and table versions stay in, because a matcher judgment about old content is a different matcher judgment, and a new table version re-mints only the matcher judgments whose joining rows changed in it (M7), since rows are the content: re-minting every table-reading matcher judgment per adopted table version is about 960k matcher judgments in ten years (assumed monthly adoption, #206), and a used table version stays current for a matcher judgment while the current version's joining rows are the same. Which rows join is asked of the matcher judgment's rule, run over its members against the current version (M7), so a matcher judgment names no rows and its recipe stays as ruled. A rule list version that merely tightens a rule retracts nothing: the matcher judgments it no longer reaches have no assertion under it and stop counting by derivation, and its first run files one finding naming them, which the review page lists as one line, answered pair by pair over records: a Same or a Different over a pair's records, which an app may file for every pair at once, or an acknowledgement of the kind naming exactly them; a person's Same already filed on a pair is untouched. A release retracts only what it declares wrong, so a known-bad join is never offered back. The Cascade matcher is one unversioned agent because the matcher feature promises every runtime that follows it reaches the same matcher judgments, so which runtime ran is forensics, and it sits on the run's act with every other act's performer: a bug in a rule list version is found by the assertions under it, a bug in a runtime by the acts it performed, a bug in an app by its own agent and version, and bad data from any of them is hidden by a person's Erroneous over the act.

How everything in a pod is named: the whole Why, the alternatives that lost and what would change our mind.

6 examples: 6 pass, 0 fail, 0 not run

passa record matching under two rules gets a judgment for each, holding it and everything it matched by that rule
Example: a record matching under two rules gets a judgment for each, holding it and everything it matched by that rule
  Dev's later Bicillin shares penicillin G's code with one record and, through the product ingredients table, its
  ingredient with another, which the first run joined to the first in one entry.

  Given a new pod for Dev on 2026-04-01 at 09:00
  And Dev enters "pairs" on 2026-04-02 at 09:00
  And the matcher runs on the records of that entry on 2026-04-02 at 09:05
  And Dev enters "later" on 2026-04-04 at 09:00
  When the matcher runs on the records of that entry on 2026-04-04 at 09:05 (match-later)
  Then the matcher's judgments holding allergy RxNorm 7980 "Bicillin" are:
    | justification    | members                                                            |
    | same code        | allergy RxNorm 7980 "Bicillin", allergy RxNorm 7980 "Penicillin G" |
    | same mapped code | allergy RxNorm 7980 "Bicillin", allergy RxNorm 204466              |
passa matcher judgment is a Same of its rule, using the table's version and its members', asserted under the rule list's version
Example: a matcher judgment is a Same of its rule, using the table's version and its members', asserted under the rule list's version
  Given a new pod for Dev on 2026-04-01 at 09:00
  And Dev enters "pairs" on 2026-04-02 at 09:00
  When the matcher runs on the records of that entry on 2026-04-02 at 09:05
  Then the matcher's judgments holding allergy RxNorm 204466 are:
    | justification    | members                                                   | asserted under           | used                                                                                                                      |
    | same mapped code | allergy RxNorm 7980 "Penicillin G", allergy RxNorm 204466 | Matcher rules version 19 | RxNorm product ingredients version 1, version 1 of allergy RxNorm 7980 "Penicillin G", version 1 of allergy RxNorm 204466 |
passa record matched with records already in one entry names the least of those it matched there
Example: a record matched with records already in one entry names the least of those it matched there
  The second entry's two latex allergies are one entry once the matcher joins them; the third entry's matches both,
  and its matcher judgment names the one whose name is least, allergy RxNorm 8591 "Latex gloves". A fact in every monthly
  summary so gives matcher judgments of two members each, not two, three, four.

  Given a new pod for Cleo on 2026-03-01 at 09:00
  And Cleo files the judgment "about-p" on 2026-03-01 at 09:05
  And the export "first-export" is imported on 2026-03-02 at 10:00
  And Cleo enters "entry" on 2026-03-03 at 08:00
  And the matcher runs on the records of that entry on 2026-03-03 at 08:01
  And Cleo files the judgment "about-r" on 2026-03-04 at 07:00
  And Cleo enters "second-entry" on 2026-03-04 at 08:00
  And the matcher runs on the records of that entry on 2026-03-04 at 08:01 (match-second-entry)
  And Cleo enters "third-entry" on 2026-03-05 at 08:00
  When the matcher runs on the records of that entry on 2026-03-05 at 08:01 (match-third-entry)
  Then that step wrote these matcher judgments:
    | justification | members                                                                        |
    | same code     | allergy RxNorm 8591 "Natural rubber latex", allergy RxNorm 8591 "Latex gloves" |
  And the allergies view holds these entries:
    | members                                                                                                     |
    | allergy RxNorm 8591 "Latex gloves", allergy RxNorm 8591 "Latex", allergy RxNorm 8591 "Natural rubber latex" |
passa Different filed before a record is matched splits its star, so it names both records the Different keeps apart
Example: a Different filed before a record is matched splits its star, so it names both records the Different keeps apart
  Cleo judges the two latex allergies different before the third entry's is matched, so they are two entries
  when it is, and its matcher judgment holds both, through which the three are one entry (decisions/judgments.md: a
  Different wins only for its pair).

  Given a new pod for Cleo on 2026-03-01 at 09:00
  And Cleo files the judgment "about-p" on 2026-03-01 at 09:05
  And the export "first-export" is imported on 2026-03-02 at 10:00
  And Cleo enters "entry" on 2026-03-03 at 08:00
  And the matcher runs on the records of that entry on 2026-03-03 at 08:01
  And Cleo files the judgment "about-r" on 2026-03-04 at 07:00
  And Cleo enters "second-entry" on 2026-03-04 at 08:00
  And the matcher runs on the records of that entry on 2026-03-04 at 08:01 (match-second-entry)
  And Cleo files the judgment "latex-different" on 2026-03-05 at 12:00
  And Cleo enters "third-entry" on 2026-03-06 at 08:00
  When the matcher runs on the records of that entry on 2026-03-06 at 08:01 (match-third-entry)
  Then that step wrote these matcher judgments:
    | justification | members                                                                                                     |
    | same code     | allergy RxNorm 8591 "Natural rubber latex", allergy RxNorm 8591 "Latex gloves", allergy RxNorm 8591 "Latex" |
  And the allergies view holds these entries:
    | members                                                                                                     |
    | allergy RxNorm 8591 "Latex gloves", allergy RxNorm 8591 "Latex", allergy RxNorm 8591 "Natural rubber latex" |
passa Different filed after a record is matched gives the same entries, once a recheck files its star again
Example: a Different filed after a record is matched gives the same entries, once a recheck files its star again
  Here Cleo judges the two latex allergies different after the third entry's matcher judgment named only the least of them;
  the next recheck re-runs that matcher judgment's rule over the entries the Different split (M7) and files the matcher judgment the
  other order gave, so the entries are the same in both orders.

  Given a new pod for Cleo on 2026-03-01 at 09:00
  And Cleo files the judgment "about-p" on 2026-03-01 at 09:05
  And the export "first-export" is imported on 2026-03-02 at 10:00
  And Cleo enters "entry" on 2026-03-03 at 08:00
  And the matcher runs on the records of that entry on 2026-03-03 at 08:01
  And Cleo files the judgment "about-r" on 2026-03-04 at 07:00
  And Cleo enters "second-entry" on 2026-03-04 at 08:00
  And the matcher runs on the records of that entry on 2026-03-04 at 08:01 (match-second-entry)
  And Cleo enters "third-entry" on 2026-03-05 at 08:00
  And the matcher runs on the records of that entry on 2026-03-05 at 08:01 (match-third-entry)
  And Cleo files the judgment "latex-different" on 2026-03-05 at 12:00
  When the matcher rechecks on 2026-03-05 at 13:00
  Then that step wrote these matcher judgments:
    | justification | members                                                                                                     |
    | same code     | allergy RxNorm 8591 "Natural rubber latex", allergy RxNorm 8591 "Latex gloves", allergy RxNorm 8591 "Latex" |
  And the allergies view holds these entries:
    | members                                                                                                     |
    | allergy RxNorm 8591 "Latex gloves", allergy RxNorm 8591 "Latex", allergy RxNorm 8591 "Natural rubber latex" |
passa Different between a record and the least it named makes the recheck name the next record of that entry
Example: a Different between a record and the least it named makes the recheck name the next record of that entry
  Cleo judges the third entry's latex allergy different from the one its matcher judgment named; the other record of that
  entry, which its rule also matched, is one it is not judged different from, so the recheck files that matcher judgment
  (M7), and the three are one entry, as every pair of them but the different one would make.

  Given a new pod for Cleo on 2026-03-01 at 09:00
  And Cleo files the judgment "about-p" on 2026-03-01 at 09:05
  And the export "first-export" is imported on 2026-03-02 at 10:00
  And Cleo enters "entry" on 2026-03-03 at 08:00
  And the matcher runs on the records of that entry on 2026-03-03 at 08:01
  And Cleo files the judgment "about-r" on 2026-03-04 at 07:00
  And Cleo enters "second-entry" on 2026-03-04 at 08:00
  And the matcher runs on the records of that entry on 2026-03-04 at 08:01 (match-second-entry)
  And Cleo enters "third-entry" on 2026-03-05 at 08:00
  And the matcher runs on the records of that entry on 2026-03-05 at 08:01 (match-third-entry)
  And Cleo files the judgment "rubber-latex-different" on 2026-03-05 at 12:00
  When the matcher rechecks on 2026-03-05 at 13:00
  Then that step wrote these matcher judgments:
    | justification | members                                                                 |
    | same code     | allergy RxNorm 8591 "Natural rubber latex", allergy RxNorm 8591 "Latex" |
  And the allergies view holds these entries:
    | members                                                                                                     |
    | allergy RxNorm 8591 "Latex gloves", allergy RxNorm 8591 "Latex", allergy RxNorm 8591 "Natural rubber latex" |

M6. The matcher reads no person's Same or Different

No decision note rules this: it is mechanics every runtime follows alike.

No judgment decides which records a rule matches; only a matcher judgment's star reads the entries the judgments make (M5).

1 example: 1 pass, 0 fail, 0 not run

passthe matcher joins the pair a person called different, and not the pair a person called the same
Example: the matcher joins the pair a person called different, and not the pair a person called the same
  Given a new pod for Cleo on 2026-03-01 at 09:00
  And Cleo files the judgment "about-p" on 2026-03-01 at 09:05
  And the export "first-export" is imported on 2026-03-02 at 10:00
  And Cleo files the judgment "persons-different" on 2026-03-02 at 12:00
  And Cleo files the judgment "persons-same" on 2026-03-02 at 12:05
  And Cleo enters "entry" on 2026-03-03 at 08:00
  When the matcher runs on the records of that entry on 2026-03-03 at 08:01
  Then the matcher's judgments holding allergy RxNorm 10180 from sulfa, allergy RxNorm 10180 "Gantanol", allergy RxNorm 2670 from codeine-1 and allergy RxNorm 5640 are:
    | justification | members                                                                                                         |
    | same code     | allergy RxNorm 10180 from sulfa, allergy RxNorm 10180 "Gantanol"                                                |
    | same code     | allergy RxNorm 2670 from codeine-1, allergy RxNorm 2670 from codeine-2, allergy RxNorm 2670 "Codeine phosphate" |

M7. A recheck re-runs the rule of each matcher Same that used a reference version the tables revise and whose current version does not join its members, or whose rule now runs another query, or whose star a Different has split

Ruled by What a pod costs as it grows, row matcher judgments named once, asserted per query hash; When two variant records are one variant, row used; The variant classifications table, row versions an app keeps

A Same's rule runs another query when the current rule list's row for it carries a cascade:queryHash that no row for the rule carries in a version the Same is asserted under by an assertion no retraction invalidates (M5, N15). A Different has split a Same's star when the Same's latest-arriving member matches by its rule a record it is not judged different from that the entries keep apart from it: the rule is run again for that record over the entries as they now are (M5), and the matcher judgment that gives is filed beside the Same, which keeps counting, since every pair it joins its new matcher judgment joins too.

The current version of a series whose older version a Same used joins its members when the query the current rule list's row for its rule names, evaluated with ?record bound to the Same's members over the pod, its derived state and that version's rows (M4, M13), gives a row (record, other, that version) with one member as the record and each other member as the other. A version that changed only rows the members' codes do not reach so joins them, and the Same is left as it was: it is not run again, nothing is written for it, and the everyday lens counts it on. A runtime derives, just before the lens, cascade:membersJoinedByCurrentTableVersion from each such Same to that version, from the current rule list and versions the pod names and the rows its tables hold of them; the lens reads it (queries/lenses/everyday.rq). Filing a new matcher judgment for every table-reading matcher judgment at each adopted version would be about 960k matcher judgments in ten years (decisions/naming.md). The cost of asking the rule rather than naming the rows in the matcher judgment is that the answer depends on the tables a device holds: where the pod's current version of the series is one its tables do not hold, nothing joins and the Same does not count there, so a read names that version as unheld, as an open does (O2), rather than differ silently from a device that holds it.

Otherwise the rule runs on the members that are still taken (M2), under the current version of the series whose version the Same used, and files their matcher judgment (M5, M9) if at least two still match: a new matcher judgment when that version is new, and otherwise the matcher judgment's assertion under the current rule list alone. A Same whose rule now runs another query is run so even when the current version joins its members. A version is revised when a version of the tables revises it, whether or not the pod describes that one, so an open that writes the descriptions last (W1) still rechecks. A Same whose rule now reads a table, and which used no version of that table's kind, is not filed again. A Same whose rule the current rule list lacks is not filed again.

Most of Eve's allergies were recorded against a product, as a source may code one, though cascade:allergenCode is a code for the substance: the product ingredients table gives each product its ingredient, which R3 joins.

Judgments grow with facts, not with versions or copies. A matcher judgment per conclusion, asserted again only when its rule's bytes change, keeps assertions near the matcher judgment count rather than 600k to 1.2M; re-minting only matcher judgments whose rows changed keeps M7 to what a table version changed rather than 8k matcher judgments an adoption; and a star keeps a fact seen in 120 summaries at 120 members rather than 120³/3 derived pairs.

What a pod costs as it grows: the whole Why, the alternatives that lost and what would change our mind.

4 examples: 4 pass, 0 fail, 0 not run

passa Same whose members the revised table still joins is not filed again, and counts on
Example: a Same whose members the revised table still joins is not filed again, and counts on
  Version 2 drops only the row of amoxicillin oral suspension, which penicillin's records do not reach.

  Given version "2" of "RxNorm product ingredients" arrives on 2026-05-04 at 09:00
  When the matcher rechecks on 2026-05-05 at 09:00
  Then that step wrote no file
  And the matcher's judgments holding allergy RxNorm 204466 and allergy RxNorm 7980 are:
    | justification    | members                                    | used                                                                                                       | name                                          |
    | same mapped code | allergy RxNorm 204466, allergy RxNorm 7980 | RxNorm product ingredients version 1, version 1 of allergy RxNorm 204466, version 1 of allergy RxNorm 7980 | urn:uuid:5c813aec-207a-8263-a682-d934f4522827 |
  And the matcher's same mapped code of allergy RxNorm 204466 and allergy RxNorm 7980 counts
passonce the About naming their profile is retracted, fewer than two members are the subject's and nothing is written
Example: once the About naming their profile is retracted, fewer than two members are the subject's and nothing is written
  Given Eve files the judgment "retract-about-d" on 2026-05-03 at 09:10
  And version "2" of "RxNorm product ingredients" arrives on 2026-05-04 at 09:00
  When the matcher rechecks on 2026-05-05 at 09:00
  Then the matcher's judgments holding allergy RxNorm 104474 and allergy RxNorm 1191 are:
    | justification    | members                                    |
    | same mapped code | allergy RxNorm 104474, allergy RxNorm 1191 |
passa recheck writes nothing when fewer than two members still match under the current table, and the Same lapses
Example: a recheck writes nothing when fewer than two members still match under the current table, and the Same lapses
  Version 2 drops the row that gave amoxicillin oral suspension its ingredient, which joined amoxicillin's two
  records.

  Given version "2" of "RxNorm product ingredients" arrives on 2026-05-04 at 09:00
  When the matcher rechecks on 2026-05-05 at 09:00
  Then the matcher's judgments holding allergy RxNorm 105152 and allergy RxNorm 723 are:
    | justification    | members                                   |
    | same mapped code | allergy RxNorm 105152, allergy RxNorm 723 |
  And the matcher's same mapped code of allergy RxNorm 105152 and allergy RxNorm 723 has lapsed
passa Same of three whose current version joins only two of them is filed again for those two, and lapses
Example: a Same of three whose current version joins only two of them is filed again for those two, and lapses
  Eve enters a hepatitis A shot and a polio shot of one day, which share no vaccine group, and later the same
  hepatitis A shot as her card names it: Twinrix, the hepatitis A and B vaccine. Twinrix shares hepatitis A's group,
  and version 1 of her vaccine group table also puts it, wrongly, in the polio group, as the DTaP, hepatitis B and
  polio vaccine is, so its Same has three members. Version 2 drops that row: no member is joined to each other one,
  so the Same is run again on version 2, which joins two.

  Given Eve enters "hepatitis-a-and-polio" on 2026-05-03 at 09:00
  And the matcher runs on the records of that entry on 2026-05-03 at 09:05 (shots-matched)
  And Eve enters "twinrix" on 2026-05-03 at 10:00
  And the matcher runs on the records of that entry on 2026-05-03 at 10:05 (twinrix-matched)
  And version "2" of "Eve's CVX vaccine group table" arrives on 2026-05-04 at 09:00
  When the matcher rechecks on 2026-05-05 at 09:00
  Then that step wrote these matcher judgments:
    | justification             | members                                                                   | used                                                                                                                                   |
    | same mapped code and date | immunization CVX 104 "Twinrix", immunization CVX 85 "Hepatitis A vaccine" | Eve's CVX vaccine group table version 2, version 1 of immunization CVX 104 "Twinrix", version 1 of immunization CVX 85 "Hepatitis A vaccine" |
  And the matcher's same mapped code and date of immunization CVX 104 "Twinrix", immunization CVX 85 "Hepatitis A vaccine" and immunization CVX 10 "IPOL" has lapsed
  And the matcher's same mapped code and date of immunization CVX 104 "Twinrix" and immunization CVX 85 "Hepatitis A vaccine" counts

M8. A reference version's description is written only if the pod lacks it

No decision note rules this: it is mechanics every runtime follows alike.

A rule list version's description also describes each of its rows, named <version>#<the local name of its rule term>, by cascade:rowOfRuleListVersion, its cascade:matcherRule and its cascade:queryHash, so the lens can compare the row for a matcher judgment's rule in two versions (M5).

1 example: 1 pass, 0 fail, 0 not run

passa reference series or version is described only by the first step that finds the pod lacking it
Example: a reference series or version is described only by the first step that finds the pod lacking it
  Given a new pod for Dev on 2026-04-01 at 09:00
  And Dev enters "pairs" on 2026-04-02 at 09:00
  And the matcher runs on the records of that entry on 2026-04-02 at 09:05 (match-pairs)
  And version "2" of "RxNorm product ingredients" arrives on 2026-04-03 at 09:00 (new-map)
  And Dev enters "later" on 2026-04-04 at 09:00
  When the matcher runs on the records of that entry on 2026-04-04 at 09:05
  Then "match-pairs" wrote these reference descriptions:
    | reference                            |
    | Matcher rules                        |
    | Matcher rules version 19             |
    | RxNorm product ingredients           |
    | RxNorm product ingredients version 1 |
    | CVX vaccine group table              |
    | CVX vaccine group table version 1    |
  And "new-map" wrote these reference descriptions:
    | reference                            |
    | RxNorm product ingredients version 2 |
  And that step wrote these reference descriptions:
    | reference |

M9. A run that reaches a matcher judgment asserted with its rule's query hash writes nothing for it, and one asserted only with other hashes gets its assertion alone

Ruled by How everything in a pod is named, row assertion, retraction by a release; What a judgment is, and what it borrows, row matcher judgment and assertion

A matcher judgment is named once (N6) and carries no time, so a run that reaches a matcher judgment the pod holds never writes it again. It writes the matcher judgment's assertion under the rule list's version unless the matcher judgment is already asserted under a version whose row for the rule carries the hash this version's row carries, by an assertion no retraction invalidates (N15): at most one assertion per version per matcher judgment, and none under a version that runs the query the matcher judgment is asserted with, so a new version asserts only the matcher judgments of the rules it changed. Only the reference descriptions it uses that the pod lacks are written (M8), so a run that stopped between its matcher judgments and its descriptions (W1) finishes when run again. So running again is always safe.

Why a matcher judgment, an assertion per rule list version, and one matcher agent. A matcher judgment is named once, with an assertion per rule list version because the same inputs give the same name, so a later version that agrees could otherwise write nothing, and a run that reaches an asserted judgment writes nothing, so a daily run adds no files. A matcher judgment counts while its maker is trusted, its used versions are current, and it has an assertion under a rule list version whose row for the rule carries the same rec:queryHash as the version the app uses. M11 pins a rule's bytes, so two versions with one hash reach the same matcher judgments, and a new version asserts only the matcher judgments of the rules it changed; an assertion per matcher judgment per version would be 600k to 1.2M files over ten years, more than the rest of the pod (computed, #206). A matcher judgment's members are the record and the least member of each entry it matched, a star, because entries are a transitive closure and come out the same, where every earlier copy as a member makes a fact re-downloaded in each monthly summary a matcher judgment of 1, 2 … g members, which same-pairs.rq expands to about 58M pairs over ten years (computed from an assumed 100 persistent entries per summary, #206). The rule list's version is out of the matcher judgment's name because with it in, every version renamed every matcher judgment, the duplication the split exists to stop; the member and table versions stay in, because a matcher judgment about old content is a different matcher judgment, and a new table version re-mints only the matcher judgments whose joining rows changed in it (M7), since rows are the content: re-minting every table-reading matcher judgment per adopted table version is about 960k matcher judgments in ten years (assumed monthly adoption, #206), and a used table version stays current for a matcher judgment while the current version's joining rows are the same. Which rows join is asked of the matcher judgment's rule, run over its members against the current version (M7), so a matcher judgment names no rows and its recipe stays as ruled. A rule list version that merely tightens a rule retracts nothing: the matcher judgments it no longer reaches have no assertion under it and stop counting by derivation, and its first run files one finding naming them, which the review page lists as one line, answered pair by pair over records: a Same or a Different over a pair's records, which an app may file for every pair at once, or an acknowledgement of the kind naming exactly them; a person's Same already filed on a pair is untouched. A release retracts only what it declares wrong, so a known-bad join is never offered back. The Cascade matcher is one unversioned agent because the matcher feature promises every runtime that follows it reaches the same matcher judgments, so which runtime ran is forensics, and it sits on the run's act with every other act's performer: a bug in a rule list version is found by the assertions under it, a bug in a runtime by the acts it performed, a bug in an app by its own agent and version, and bad data from any of them is hidden by a person's Erroneous over the act.

How everything in a pod is named: the whole Why, the alternatives that lost and what would change our mind.

2 examples: 2 pass, 0 fail, 0 not run

passrunning the matcher again on the same step writes nothing
Example: running the matcher again on the same step writes nothing
  When the matcher runs on the records of "entry" on 2026-03-03 at 09:00 (again)
  Then that step wrote no file
passrunning the matcher again leaves each matcher judgment asserted once
Example: running the matcher again leaves each matcher judgment asserted once
  When the matcher runs on the records of "entry" on 2026-03-03 at 09:00 (again)
  Then the matcher's judgments holding allergy RxNorm 1191 "Aspirin" are:
    | justification | members                                                            | asserted under           |
    | same code     | allergy RxNorm 1191 "Aspirin", allergy RxNorm 1191 "Bayer aspirin" | Matcher rules version 19 |

M10. A table's current version is the one the pod names, and otherwise its series' default

No decision note rules this: it is mechanics every runtime follows alike.

In a story, the default is the version the story's tables ship with (cascade:defaultTableVersion). In an app, it is the newest version of the series the app holds: the end of its line of prov:wasRevisionOf. An app never adopts a version that does not descend from the one it holds. The examples run on stories, so none shows an app's default.

1 example: 1 pass, 0 fail, 0 not run

passa table's current version is the one its series ships with until the pod names one, though a later one is listed
Example: a table's current version is the one its series ships with until the pod names one, though a later one is listed
  Given a new pod for Dev on 2026-04-01 at 09:00
  And Dev enters "pairs" on 2026-04-02 at 09:00
  And the matcher runs on the records of that entry on 2026-04-02 at 09:05
  And version "2" of "RxNorm product ingredients" arrives on 2026-04-03 at 09:00
  And Dev enters "later" on 2026-04-04 at 09:00
  When the matcher runs on the records of that entry on 2026-04-04 at 09:05 (match-later)
  Then the matcher's judgments holding allergy RxNorm 204466 and allergy RxNorm 1721474 are:
    | justification    | members                                                   | used                                                                                                                      | name                                          |
    | same mapped code | allergy RxNorm 7980 "Penicillin G", allergy RxNorm 204466 | RxNorm product ingredients version 1, version 1 of allergy RxNorm 7980 "Penicillin G", version 1 of allergy RxNorm 204466 | urn:uuid:dc4f866e-dc87-8236-94f2-76097f2ad52d |
    | same mapped code | allergy RxNorm 733 "Principen", allergy RxNorm 1721474    | RxNorm product ingredients version 2, version 1 of allergy RxNorm 733 "Principen", version 1 of allergy RxNorm 1721474    | urn:uuid:f32a542b-11c0-8457-b3fa-878c2208dd61 |

M11. A rule list whose row names a query that does not hash to the row's cascade:queryHash refuses the run

No decision note rules this: it is mechanics every runtime follows alike.

It writes nothing. So does a rule list with a row naming a file outside queries/matcher/, a row without exactly one cascade:queryPath and cascade:queryHash, or without exactly one of cascade:justifiedAs and cascade:findingKind, or two rows with one justification or one finding kind. A rule list's rows are never edited: a changed query is a new version of the rule list, revising the old; a rule list an app has used never changes. Finn's references/ hold a version "0" of the rule list of his own, whose one row gives R1's query a hash its bytes do not have.

1 example: 1 pass, 0 fail, 0 not run

passa run whose rule list gives same-code-key-joined-first.rq a hash its bytes do not have is refused, though two allergies share a code
Example: a run whose rule list gives same-code-key-joined-first.rq a hash its bytes do not have is refused, though two allergies share a code
  Given a new pod for Finn on 2026-06-01 at 09:00
  And Finn enters "same-code-entry" on 2026-06-07 at 09:00
  When the matcher runs on the records of that entry on 2026-06-07 at 09:05
  Then that step is refused
  And that step wrote no file

M13. A match comes from one table version's rows, and each version that joins a pair gives a judgment of its own

Ruled by How everything in a pod is named, row matcher judgment

A rule naming a table kind reads the rows of the current version of every series of that kind, each in the graph named by the version's IRI, and the descriptions of those versions and their series, as references.ttl states them, beside the pod, and no other version's: the pod's own descriptions of reference versions are left out, so a version the pod describes and the tables do not load revises none of those read. A comparison reads rows only inside GRAPH ?origin, so it joins rows of one version only, and the judgment uses that version. Rows never reach the pod.

Gus's references hold a second vaccine group series, "Clinic vaccine groups", that also puts CVX 140 in the influenza group. M3 takes his three shots in the order 140, 141, 150, so FluLaval's matcher judgment by the clinic's groups holds the least of the two shots the clinic's groups joined before it (M5).

Why a matcher judgment, an assertion per rule list version, and one matcher agent. A matcher judgment is named once, with an assertion per rule list version because the same inputs give the same name, so a later version that agrees could otherwise write nothing, and a run that reaches an asserted judgment writes nothing, so a daily run adds no files. A matcher judgment counts while its maker is trusted, its used versions are current, and it has an assertion under a rule list version whose row for the rule carries the same rec:queryHash as the version the app uses. M11 pins a rule's bytes, so two versions with one hash reach the same matcher judgments, and a new version asserts only the matcher judgments of the rules it changed; an assertion per matcher judgment per version would be 600k to 1.2M files over ten years, more than the rest of the pod (computed, #206). A matcher judgment's members are the record and the least member of each entry it matched, a star, because entries are a transitive closure and come out the same, where every earlier copy as a member makes a fact re-downloaded in each monthly summary a matcher judgment of 1, 2 … g members, which same-pairs.rq expands to about 58M pairs over ten years (computed from an assumed 100 persistent entries per summary, #206). The rule list's version is out of the matcher judgment's name because with it in, every version renamed every matcher judgment, the duplication the split exists to stop; the member and table versions stay in, because a matcher judgment about old content is a different matcher judgment, and a new table version re-mints only the matcher judgments whose joining rows changed in it (M7), since rows are the content: re-minting every table-reading matcher judgment per adopted table version is about 960k matcher judgments in ten years (assumed monthly adoption, #206), and a used table version stays current for a matcher judgment while the current version's joining rows are the same. Which rows join is asked of the matcher judgment's rule, run over its members against the current version (M7), so a matcher judgment names no rows and its recipe stays as ruled. A rule list version that merely tightens a rule retracts nothing: the matcher judgments it no longer reaches have no assertion under it and stop counting by derivation, and its first run files one finding naming them, which the review page lists as one line, answered pair by pair over records: a Same or a Different over a pair's records, which an app may file for every pair at once, or an acknowledgement of the kind naming exactly them; a person's Same already filed on a pair is untouched. A release retracts only what it declares wrong, so a known-bad join is never offered back. The Cascade matcher is one unversioned agent because the matcher feature promises every runtime that follows it reaches the same matcher judgments, so which runtime ran is forensics, and it sits on the run's act with every other act's performer: a bug in a rule list version is found by the assertions under it, a bug in a runtime by the acts it performed, a bug in an app by its own agent and version, and bad data from any of them is hidden by a person's Erroneous over the act.

How everything in a pod is named: the whole Why, the alternatives that lost and what would change our mind.

1 example: 1 pass, 0 fail, 0 not run

passtwo tables of one kind that both join a pair each give a judgment of it, and a pair only one joins gets one
Example: two tables of one kind that both join a pair each give a judgment of it, and a pair only one joins gets one
  Given a new pod for Gus on 2025-05-01 at 09:00
  And Gus enters "flu-shots" on 2025-10-02 at 09:00
  When the matcher runs on the records of that entry on 2025-10-02 at 09:05
  Then the matcher's judgments holding immunization CVX 141 "Fluarix", immunization CVX 150 "FluLaval" and immunization CVX 140 "Afluria" are:
    | justification             | members                                                         | used                                                                                                                         |
    | same mapped code and date | immunization CVX 141 "Fluarix", immunization CVX 150 "FluLaval" | CVX vaccine group table version 1, version 1 of immunization CVX 141 "Fluarix", version 1 of immunization CVX 150 "FluLaval" |
    | same mapped code and date | immunization CVX 140 "Afluria", immunization CVX 141 "Fluarix"  | Clinic vaccine groups version 1, version 1 of immunization CVX 140 "Afluria", version 1 of immunization CVX 141 "Fluarix"    |
    | same mapped code and date | immunization CVX 140 "Afluria", immunization CVX 150 "FluLaval" | Clinic vaccine groups version 1, version 1 of immunization CVX 140 "Afluria", version 1 of immunization CVX 150 "FluLaval"   |

M14. A condition is compared by its code and its period

Ruled by Clinical terms with one meaning each, row 1. clinical state and workflow state

R8 joins two conditions of one condition code (a `cascade:conditionCode`) whose periods overlap. A period runs from the onset's day to the abatement's day. An abatement that is not a date, or falls before the onset, counts as none. With none, the period runs on while the status is active, recurrence or relapse, and is the onset's day alone otherwise (resolved, inactive, remission, or no status). A day is the first ten characters of the date as written, so a date and a dateTime compare, and a time zone never moves a day, unlike R6's instants. Both bounds count. A condition with no onset joins nothing. So a condition two sources both call active joins whatever onsets they give, and two episodes that are each over, and apart, do not. M23 says how R8 reads a date that is a year or a month.

Hana's "episodes" are conditions of J18.9 (three), E11.9 (two), R10.9 (two) and SNOMED CT 195662009 (two).

Two statuses, because the standards have two. FHIR R4 and R5 give a condition and an allergy a clinicalStatus and no status, and give the acts a status and no clinicalStatus (verified); openEHR keeps workflow state on the ISM and no state on an observation or an evaluation. A condition "resolved" is a fact about the person; an immunization "completed" is a fact about an act. One term for both is what makes "active" ambiguous: M14 and What needs review.rq test rec:status for active, recurrence and relapse on any kind with the code (verified, same-code-and-period-read-as-ranges.rq); only the rule list row's kinds keep M14 to conditions (M4), and once #193 merges snomedCode a procedure's code is the same term, so the query alone would read a procedure's workflow status as a clinical state (inferred). Reading clinicalStatus there makes the query say what it means. The cost is one term and the readers listed in row 1, which #193's removal of rec:status touches anyway.

Clinical terms with one meaning each: the whole Why, the alternatives that lost and what would change our mind.

4 examples: 4 pass, 0 fail, 0 not run

passtwo conditions of one ICD-10-CM code whose periods overlap are the same by code and period, and one of a later episode joins neither
Example: two conditions of one ICD-10-CM code whose periods overlap are the same by code and period, and one of a later episode joins neither
  Then the matcher's judgments holding condition ICD-10-CM J18.9 "Pneumonia, first report", condition ICD-10-CM J18.9 "Pneumonia, second report" and condition ICD-10-CM J18.9 "Pneumonia, 2024" are:
    | justification        | members                                                                                                   | used                                                                                                                                |
    | same code and period | condition ICD-10-CM J18.9 "Pneumonia, first report", condition ICD-10-CM J18.9 "Pneumonia, second report" | version 1 of condition ICD-10-CM J18.9 "Pneumonia, first report", version 1 of condition ICD-10-CM J18.9 "Pneumonia, second report" |
passtwo conditions both active with no abatement are the same by code and period, whatever their onsets
Example: two conditions both active with no abatement are the same by code and period, whatever their onsets
  Then the matcher's judgments holding condition ICD-10-CM E11.9 "Type 2 diabetes, clinic" and condition ICD-10-CM E11.9 "Type 2 diabetes, hospital" are:
    | justification        | members                                                                                                    |
    | same code and period | condition ICD-10-CM E11.9 "Type 2 diabetes, clinic", condition ICD-10-CM E11.9 "Type 2 diabetes, hospital" |
passtwo episodes of one SNOMED CT code that are each over, and apart, join nothing
Example: two episodes of one SNOMED CT code that are each over, and apart, join nothing
  Then the matcher has no judgment holding condition SNOMED 195662009 "Acute viral pharyngitis, 2017" and condition SNOMED 195662009 "Acute viral pharyngitis, 2020"
passa condition with no onset joins nothing
Example: a condition with no onset joins nothing
  Then the matcher has no judgment holding condition ICD-10-CM R10.9 "Abdominal pain, no onset" and condition ICD-10-CM R10.9 "Abdominal pain, 2022"

M15. A medication is compared by every RxNorm and NDC code it carries, through the brand generics table, and by its exposure period

Ruled by Medication matching: which copies are one medication, rows same course, a period, an ongoing course, no dates, a gap

A medication version may carry any number of RxNorm codes and NDC codes (cascade:ndcCode), and name the one its source chose (cascade:userSelectedCode). R5 reads no table: it joins two medications that share an NDC. An NDC names a package within one listing; one reused after a product was discontinued would join two products, a known limit the period test narrows. R10 joins a branded product and its generic, or two brands of one generic, by a version of the brand generics table, only when the two records share no code, so R5 and R10 never judge one pair. R11 joins two that share a product code (M16). No rule joins an NDC with the drug it is, until the-cascade-protocol/cascade-vocabulary#118.

R5, R10 and R11 join two medications only when their exposure periods share at least one day as well, so two courses of one drug years apart are two medications. A period runs from the record's cascade:medicationExposureStart to its cascade:medicationExposureEnd, both days counting; with no end it runs on while cascade:medicationExposureOngoing holds, and is its start day alone otherwise. A record with no exposure start joins no other medication, and a break of one day keeps two apart. A start given to the year or month counts as its last day and an end as its first, unlike M14 and M23, which read a partial date as every day it covers, so two records join only when the overlap is certain.

Gus's pharmacy entry holds medications whose codes pair in no more than twos, so no judgment depends on M3's order.

Why: Medication matching: which copies are one medication, with the alternatives that lost and what would change our mind.

1 example: 1 pass, 0 fail, 0 not run

passa brand and its generic are the same brand generic, and a fill coded by an NDC alone joins neither
Example: a brand and its generic are the same brand generic, and a fill coded by an NDC alone joins neither
  Then the matcher's judgments holding medication RxNorm 212549 "Norvasc 5 MG Oral Tablet", medication RxNorm 197361 "amlodipine 5 MG Oral Tablet" and medication NDC 00378520905 "Amlodipine 5 mg tablet, pharmacy" are:
    | justification      | members                                                                                                     | used                                                                                                                                                                  |
    | same brand generic | medication RxNorm 212549 "Norvasc 5 MG Oral Tablet", medication RxNorm 197361 "amlodipine 5 MG Oral Tablet" | Brand generics table version 1, version 1 of medication RxNorm 212549 "Norvasc 5 MG Oral Tablet", version 1 of medication RxNorm 197361 "amlodipine 5 MG Oral Tablet" |

M16. Medications are joined by a shared NDC, or by a shared RxNorm code that the drug products table says names one product, and by no other code they share

Ruled by Medication matching: which copies are one medication, row what is kept apart

R5 joins two medications that share an NDC. R11 joins two medications that share an RxNorm code which a version of the drug products table lists (an SCD, SBD, GPCK or BPCK), whatever else each carries and whichever code its source selected. A pair that shares an NDC is R5's alone, so no pair has two justifications. R11 leaves out a medication that carries more than one product code, since it would join two products into one entry through it.

With no drug products version held, no RxNorm code joins. A pair that shares a code and is left apart, such as two records of one ingredient, one dose form, one brand name or a product the table does not list, is "possibly the same medication" on "What needs review", for a person to confirm. No step asks a question, so the vocabulary's fixtures show it. R10 joins only records that share no code, so a brand and its generic that also share a code that is not a product are left to a person too. So are a pair of one product or one NDC that the period test (M15) keeps apart, as two courses or one course with a gap.

Each example opens a new pod for Gus with the drug products table, one of them after the drug tables of an app at an earlier version "0" of the rule list, whose R5 runs R11's query, joining two medications of one product code by the app's "Clinic drug products" table (that table wrongly lists the ingredient lisinopril as a clinical drug, which its later tables no longer hold, and version "0" has no R11); and each enters its own entry, so that no example's records join another's.

Why: Medication matching: which copies are one medication, with the alternatives that lost and what would change our mind.

9 examples: 9 pass, 0 fail, 0 not run

passtwo records sharing a product code are the same product code, although one selected its NDC
Example: two records sharing a product code are the same product code, although one selected its NDC
  Given a new pod for Gus on 2026-09-01 at 09:00
  And the pod is opened with the tables "app-drug-products" on 2026-09-01 at 09:01
  And Gus enters "product-codes" on 2026-09-02 at 09:00
  When the matcher runs on the records of that entry on 2026-09-02 at 09:05
  Then the matcher's judgments holding medication RxNorm 861007 "metformin 500 MG Oral Tablet" and medication RxNorm 861007 "Metformin 500 mg, refill" are:
    | justification     | members                                                                                                      | used                                                                                                                                                                  |
    | same product code | medication RxNorm 861007 "metformin 500 MG Oral Tablet", medication RxNorm 861007 "Metformin 500 mg, refill" | Drug products table version 1, version 1 of medication RxNorm 861007 "metformin 500 MG Oral Tablet", version 1 of medication RxNorm 861007 "Metformin 500 mg, refill" |
passtwo fills coded only by one NDC are the same medication code, with no table
Example: two fills coded only by one NDC are the same medication code, with no table
  Given a new pod for Gus on 2026-09-01 at 09:00
  And the pod is opened with the tables "app-drug-products" on 2026-09-01 at 09:01
  And Gus enters "ndc-fills" on 2026-09-02 at 09:00
  When the matcher runs on the records of that entry on 2026-09-02 at 09:05
  Then the matcher's judgments holding medication NDC 00093111310 "Lisinopril 10 mg, March" and medication NDC 00093111310 "Lisinopril 10 mg, April" are:
    | justification        | members                                                                                                    | used                                                                                                                                 |
    | same medication code | medication NDC 00093111310 "Lisinopril 10 mg, March", medication NDC 00093111310 "Lisinopril 10 mg, April" | version 1 of medication NDC 00093111310 "Lisinopril 10 mg, March", version 1 of medication NDC 00093111310 "Lisinopril 10 mg, April" |
passtwo records sharing an NDC and a product code are the same medication code and nothing else
Example: two records sharing an NDC and a product code are the same medication code and nothing else
  Given a new pod for Gus on 2026-09-01 at 09:00
  And the pod is opened with the tables "app-drug-products" on 2026-09-01 at 09:01
  And Gus enters "ndc-and-product-code" on 2026-09-02 at 09:00
  When the matcher runs on the records of that entry on 2026-09-02 at 09:05
  Then the matcher's judgments holding medication RxNorm 197361 "amlodipine 5 MG Oral Tablet" and medication RxNorm 197361 "Amlodipine 5 mg tablet, pharmacy" are:
    | justification        | members                                                                                                             | used                                                                                                                                          |
    | same medication code | medication RxNorm 197361 "amlodipine 5 MG Oral Tablet", medication RxNorm 197361 "Amlodipine 5 mg tablet, pharmacy" | version 1 of medication RxNorm 197361 "amlodipine 5 MG Oral Tablet", version 1 of medication RxNorm 197361 "Amlodipine 5 mg tablet, pharmacy" |
passtwo strengths of one dose form are no Same
Example: two strengths of one dose form are no Same
  Given a new pod for Gus on 2026-09-01 at 09:00
  And the pod is opened with the tables "app-drug-products" on 2026-09-01 at 09:01
  And Gus enters "two-strengths" on 2026-09-02 at 09:00
  When the matcher runs on the records of that entry on 2026-09-02 at 09:05
  Then the matcher has no judgment holding medication RxNorm 197361 "amlodipine 5 MG Oral Tablet" and medication RxNorm 308135 "amlodipine 10 MG Oral Tablet"
passa combination and a single-ingredient product sharing a salt are no Same
Example: a combination and a single-ingredient product sharing a salt are no Same
  Given a new pod for Gus on 2026-09-01 at 09:00
  And the pod is opened with the tables "app-drug-products" on 2026-09-01 at 09:01
  And Gus enters "combination-and-single" on 2026-09-02 at 09:00
  When the matcher runs on the records of that entry on 2026-09-02 at 09:05
  Then the matcher has no judgment holding medication RxNorm 898350 "amlodipine 2.5 MG / benazepril hydrochloride 10 MG Oral Capsule" and medication RxNorm 308136 "amlodipine 2.5 MG Oral Tablet"
passtwo strengths of one brand are no Same
Example: two strengths of one brand are no Same
  Given a new pod for Gus on 2026-09-01 at 09:00
  And the pod is opened with the tables "app-drug-products" on 2026-09-01 at 09:01
  And Gus enters "two-strengths-of-a-brand" on 2026-09-02 at 09:00
  When the matcher runs on the records of that entry on 2026-09-02 at 09:05
  Then the matcher has no judgment holding medication RxNorm 212549 "Norvasc 5 MG Oral Tablet" and medication RxNorm 212575 "Norvasc 10 MG Oral Tablet"
passtwo records of an ingredient alone are no Same
Example: two records of an ingredient alone are no Same
  Given a new pod for Gus on 2026-09-01 at 09:00
  And the pod is opened with the tables "app-drug-products" on 2026-09-01 at 09:01
  And Gus enters "ingredient-only" on 2026-09-02 at 09:00
  When the matcher runs on the records of that entry on 2026-09-02 at 09:05
  Then the matcher has no judgment holding medication RxNorm 29046 "Lisinopril" and medication RxNorm 29046 "Lisinopril tablets"
passopening a pod matched under version "0" with version 19 joins its NDC pair, joins its product pair as a product code and lets the pair only the clinic's table joined lapse
Example: opening a pod matched under version "0" with version 19 joins its NDC pair, joins its product pair as a product code and lets the pair only the clinic's table joined lapse
  Given a new pod for Gus on 2026-09-01 at 09:00
  And the pod is opened with the tables "app-drugs" on 2026-09-01 at 09:01
  And Gus enters "earlier-sames" on 2026-09-02 at 09:00
  And the matcher runs on the records of that entry on 2026-09-02 at 09:05
  When the pod is opened with the tables "app-drug-products" on 2026-09-03 at 09:00
  Then that step wrote these matcher judgments:
    | justification        | members                                                                                                    | used                                                                                                                                                                |
    | same medication code | medication NDC 00093111310 "Lisinopril 10 mg, March", medication NDC 00093111310 "Lisinopril 10 mg, April" | version 1 of medication NDC 00093111310 "Lisinopril 10 mg, March", version 1 of medication NDC 00093111310 "Lisinopril 10 mg, April"                                |
    | same product code    | medication RxNorm 861007 "metformin 500 MG Oral Tablet", medication RxNorm 861007 "Metformin 500 mg, list" | Drug products table version 1, version 1 of medication RxNorm 861007 "metformin 500 MG Oral Tablet", version 1 of medication RxNorm 861007 "Metformin 500 mg, list" |
  And the matcher's same medication code of medication RxNorm 29046 "Lisinopril" and medication RxNorm 29046 "Lisinopril tablets" has lapsed
passtwo courses of one product years apart are no Same, and a copy within the first course is the same product code
Example: two courses of one product years apart are no Same, and a copy within the first course is the same product code
  Given a new pod for Gus on 2026-10-01 at 09:00
  And the pod is opened with the tables "app-drug-products" on 2026-10-01 at 09:01
  And Gus enters "two-courses" on 2026-10-02 at 09:00
  When the matcher runs on the records of that entry on 2026-10-02 at 09:05
  Then the matcher's judgments holding medication RxNorm 861007 "metformin 500 MG, 2019 to 2021", medication RxNorm 861007 "metformin 500 MG, since 2026" and medication RxNorm 861007 "metformin 500 MG, spring 2020" are:
    | justification     | members                                                                                                             | used                                                                                                                                                                         |
    | same product code | medication RxNorm 861007 "metformin 500 MG, 2019 to 2021", medication RxNorm 861007 "metformin 500 MG, spring 2020" | Drug products table version 1, version 1 of medication RxNorm 861007 "metformin 500 MG, 2019 to 2021", version 1 of medication RxNorm 861007 "metformin 500 MG, spring 2020" |

M17. Variants are joined by a shared ClinVar VariationID, or by finding one row of a variant classifications table, and by no other code

Ruled by When two variant records are one variant, rows join by ID (R12), join through the table (R13), how a version finds its row, left alone, computed identity; What a pod costs as it grows, row page-read tables, current versions only; The variant record, row computed identity

R12 joins two variants whose current versions carry one ClinVar VariationID, the digits alone. R13 joins two variants whose current versions find one row of one version of a variant classifications table. A version that carries a VariationID finds the row of that variation through the ID alone, and its HGVS expression is not read; a version that carries none finds the row that holds its expression (M4c). The classification plays no part: the join is identity. A pair that shares an ID is R12's alone, so no pair has two justifications; a pair whose versions carry different IDs is joined by neither, whatever expressions they hold; and a variant whose expression is on more than one row is left alone, rows being counted as distinct row subjects over every version held. The reasons are in decisions/variant-identity.md; no other code is compared, because an HGVS expression written on two transcript versions is two expressions, and only a table says they are one variant.

Ivo's table holds ClinVar's rows of two variations of MLH1, 90011 and 90012, 90011 found by its expression on each of two transcript versions. Each example opens a new pod for Ivo with it and enters its own entry, so that no example's variants join another's.

Why an ID is read before an expression. An ID is a stronger claim than an expression, so a version that carries one is read by it alone: otherwise a report carrying ID 12345 and an expression of another variation would join that variation's records (runtime/matcher.feature, M17, "a variant whose ID is on no row finds nothing"). A page reads the same way, or a variant with ID 12345, on no row, and an expression on row 90011 would be shown 90011's classification.

When two variant records are one variant: the whole Why, the alternatives that lost and what would change our mind.

5 examples: 5 pass, 0 fail, 0 not run

passtwo variants of one ClinVar ID are the same variation though they hold different transcripts, and one of another ID joins neither
Example: two variants of one ClinVar ID are the same variation though they hold different transcripts, and one of another ID joins neither
  Given a new pod for Ivo on 2026-10-01 at 09:00
  And the pod is opened with the tables "app-variants" on 2026-10-01 at 09:01
  And Ivo enters "same-id" on 2026-10-02 at 09:00
  When the matcher runs on the records of that entry on 2026-10-02 at 09:05
  Then the matcher's judgments holding variant HGVS NM_000249.3:c.2042C>T, variant HGVS NM_000249.4:c.2042C>T and variant HGVS NM_000249.4:c.1990-8A>G are:
    | justification  | members                                                                | used                                                                                             |
    | same variation | variant HGVS NM_000249.3:c.2042C>T, variant HGVS NM_000249.4:c.2042C>T | version 1 of variant HGVS NM_000249.3:c.2042C>T, version 1 of variant HGVS NM_000249.4:c.2042C>T |
passtwo variants with no ID whose expressions are on one row are the same variation through the table, and one on no row joins neither
Example: two variants with no ID whose expressions are on one row are the same variation through the table, and one on no row joins neither
  Given a new pod for Ivo on 2026-10-01 at 09:00
  And the pod is opened with the tables "app-variants" on 2026-10-01 at 09:01
  And Ivo enters "one-row" on 2026-10-02 at 09:00
  When the matcher runs on the records of that entry on 2026-10-02 at 09:05
  Then the matcher's judgments holding variant HGVS NM_000249.3:c.2042C>T, variant HGVS NM_000249.4:c.2042C>T and variant HGVS NM_000249.4:c.9999A>G are:
    | justification                    | members                                                                | used                                                                                                                                        |
    | same variation through the table | variant HGVS NM_000249.3:c.2042C>T, variant HGVS NM_000249.4:c.2042C>T | ClinVar variant classifications version 1, version 1 of variant HGVS NM_000249.3:c.2042C>T, version 1 of variant HGVS NM_000249.4:c.2042C>T |
passa variant with an ID and one with only an expression on that variation's row are the same variation through the table
Example: a variant with an ID and one with only an expression on that variation's row are the same variation through the table
  Given a new pod for Ivo on 2026-10-01 at 09:00
  And the pod is opened with the tables "app-variants" on 2026-10-01 at 09:01
  And Ivo enters "id-and-expression" on 2026-10-02 at 09:00
  When the matcher runs on the records of that entry on 2026-10-02 at 09:05
  Then the matcher's judgments holding variant ClinVar 90011 and variant HGVS NM_000249.3:c.2042C>T are:
    | justification                    | members                                                   |
    | same variation through the table | variant ClinVar 90011, variant HGVS NM_000249.3:c.2042C>T |
passa variant whose ID is on no row finds nothing, though its expression is on a row
Example: a variant whose ID is on no row finds nothing, though its expression is on a row
  Given a new pod for Ivo on 2026-10-01 at 09:00
  And the pod is opened with the tables "app-variants" on 2026-10-01 at 09:01
  And Ivo enters "id-not-in-table" on 2026-10-02 at 09:00
  When the matcher runs on the records of that entry on 2026-10-02 at 09:05
  Then the matcher has no judgment holding variant ClinVar 12345 and variant HGVS NM_000249.3:c.2042C>T
passtwo variants of different IDs are joined by neither rule, though one holds the expression of the other's row
Example: two variants of different IDs are joined by neither rule, though one holds the expression of the other's row
  Given a new pod for Ivo on 2026-10-01 at 09:00
  And the pod is opened with the tables "app-variants" on 2026-10-01 at 09:01
  And Ivo enters "different-ids" on 2026-10-02 at 09:00
  When the matcher runs on the records of that entry on 2026-10-02 at 09:05
  Then the matcher has no judgment holding variant ClinVar 90012 and variant ClinVar 90011

M18. A rule list version's first run over the whole pod files one finding naming the matcher judgments it no longer reaches

Ruled by How everything in a pod is named, row document, finding; What a judgment is, and what it borrows, row what a judgment, a finding or a view came from

A run that compares the whole pod, an open (O1) or a recheck (M7), files, after its matcher judgments and before its reference descriptions (W1), a cascade:FindingForReview whose oa:hasBody is cascade:MatcherJudgmentsNoLongerReached, whose oa:motivatedBy is oa:classifying, whose cascade:noLongerReachedUnderRuleListVersion is the current rule list version, and whose oa:hasTarget is each matcher judgment of the matcher's that nothing retracts or replaces that is asserted, by an assertion no retraction invalidates, under a version whose row for its rule carries the cascade:queryHash of that rule's row in any version on the current version's prov:wasRevisionOf line, and under none whose row carries the hash of the current version's row for it, the run's own assertions counted, and that no finding the pod holds names, every hash read from the rows the pod describes: so the matcher judgments it names do not hang on which versions the pod's runs went through. It files none when the current version revises none, when the pod holds a finding naming the current version, or when it would name no matcher judgment: so one per version, whichever run is first, and a run bound to a step's records files none.

It carries no time and names no act, and is named by cascade:FindingNamingRule from its triples, so two writers whose first runs under one version find the same matcher judgments file one file; two writers whose pods differ when each first runs under it, as when one holds matcher judgments the other has not yet received, may file two findings of one version. A matcher judgment whose every assertion a release retracted (N15) is asserted by none, and is named by no finding: a release declared its rule wrong, and the review page does not offer it back. What a matcher judgment's tables did is no part of it: a matcher judgment the version reaches, kept or lapsed by a table version (M7), is named by no finding, and lapses pair by pair (O1).

Why a matcher judgment, an assertion per rule list version, and one matcher agent. A matcher judgment is named once, with an assertion per rule list version because the same inputs give the same name, so a later version that agrees could otherwise write nothing, and a run that reaches an asserted judgment writes nothing, so a daily run adds no files. A matcher judgment counts while its maker is trusted, its used versions are current, and it has an assertion under a rule list version whose row for the rule carries the same rec:queryHash as the version the app uses. M11 pins a rule's bytes, so two versions with one hash reach the same matcher judgments, and a new version asserts only the matcher judgments of the rules it changed; an assertion per matcher judgment per version would be 600k to 1.2M files over ten years, more than the rest of the pod (computed, #206). A matcher judgment's members are the record and the least member of each entry it matched, a star, because entries are a transitive closure and come out the same, where every earlier copy as a member makes a fact re-downloaded in each monthly summary a matcher judgment of 1, 2 … g members, which same-pairs.rq expands to about 58M pairs over ten years (computed from an assumed 100 persistent entries per summary, #206). The rule list's version is out of the matcher judgment's name because with it in, every version renamed every matcher judgment, the duplication the split exists to stop; the member and table versions stay in, because a matcher judgment about old content is a different matcher judgment, and a new table version re-mints only the matcher judgments whose joining rows changed in it (M7), since rows are the content: re-minting every table-reading matcher judgment per adopted table version is about 960k matcher judgments in ten years (assumed monthly adoption, #206), and a used table version stays current for a matcher judgment while the current version's joining rows are the same. Which rows join is asked of the matcher judgment's rule, run over its members against the current version (M7), so a matcher judgment names no rows and its recipe stays as ruled. A rule list version that merely tightens a rule retracts nothing: the matcher judgments it no longer reaches have no assertion under it and stop counting by derivation, and its first run files one finding naming them, which the review page lists as one line, answered pair by pair over records: a Same or a Different over a pair's records, which an app may file for every pair at once, or an acknowledgement of the kind naming exactly them; a person's Same already filed on a pair is untouched. A release retracts only what it declares wrong, so a known-bad join is never offered back. The Cascade matcher is one unversioned agent because the matcher feature promises every runtime that follows it reaches the same matcher judgments, so which runtime ran is forensics, and it sits on the run's act with every other act's performer: a bug in a rule list version is found by the assertions under it, a bug in a runtime by the acts it performed, a bug in an app by its own agent and version, and bad data from any of them is hidden by a person's Erroneous over the act.

How everything in a pod is named: the whole Why, the alternatives that lost and what would change our mind.

6 examples: 6 pass, 0 fail, 0 not run

passopening a pod matched under version "0" with version 19 files one finding naming the matcher judgments of the rule version 19 changed that it did not file again
Example: opening a pod matched under version "0" with version 19 files one finding naming the matcher judgments of the rule version 19 changed that it did not file again
  Version 19 changes R5's query, from one joining two medications of one product code to one joining two of one NDC,
  and adds R11. The finding names the two matcher judgments of product code pairs that version "0"'s R5 joined, of
  which version 19's R11 joins the metformin pair again by another matcher judgment, through the drug products
  table; the clinic's table, which alone listed the ingredient lisinopril, wrongly, as a clinical drug, is not held.

  Given a new pod for Gus on 2026-09-01 at 09:00
  And the pod is opened with the tables "app-drugs" on 2026-09-01 at 09:01
  And Gus enters "earlier-sames" on 2026-09-02 at 09:00
  And the matcher runs on the records of that entry on 2026-09-02 at 09:05
  When the pod is opened with the tables "app-drug-products" on 2026-09-03 at 09:00
  Then that step wrote these findings:
    | kind                                | under                    | justification        | members                                                                                                    |
    | matcher judgments no longer reached | Matcher rules version 19 | same medication code | medication RxNorm 29046 "Lisinopril", medication RxNorm 29046 "Lisinopril tablets"                         |
    | matcher judgments no longer reached | Matcher rules version 19 | same medication code | medication RxNorm 861007 "metformin 500 MG Oral Tablet", medication RxNorm 861007 "Metformin 500 mg, list" |
passa person's Same over a matcher judgment's records leaves the matcher judgment for the finding to name
Example: a person's Same over a matcher judgment's records leaves the matcher judgment for the finding to name
  Gus's Same names the records of the Lisinopril pair and replaces nothing (N16), so the open's finding names the
  matcher judgments of both pairs, as when he had said nothing.

  Given a new pod for Gus on 2026-09-01 at 09:00
  And the pod is opened with the tables "app-drugs" on 2026-09-01 at 09:01
  And Gus enters "earlier-sames" on 2026-09-02 at 09:00
  And the matcher runs on the records of that entry on 2026-09-02 at 09:05
  And Gus files the judgment "same-over-the-lisinopril-records" on 2026-09-02 at 12:00
  When the pod is opened with the tables "app-drug-products" on 2026-09-03 at 09:00
  Then that step wrote these findings:
    | kind                                | under                    | justification        | members                                                                                                    |
    | matcher judgments no longer reached | Matcher rules version 19 | same medication code | medication RxNorm 29046 "Lisinopril", medication RxNorm 29046 "Lisinopril tablets"                         |
    | matcher judgments no longer reached | Matcher rules version 19 | same medication code | medication RxNorm 861007 "metformin 500 MG Oral Tablet", medication RxNorm 861007 "Metformin 500 mg, list" |
passa run under a version whose finding the pod holds files no other
Example: a run under a version whose finding the pod holds files no other
  Given a new pod for Gus on 2026-09-01 at 09:00
  And the pod is opened with the tables "app-drugs" on 2026-09-01 at 09:01
  And Gus enters "earlier-sames" on 2026-09-02 at 09:00
  And the matcher runs on the records of that entry on 2026-09-02 at 09:05
  And the pod is opened with the tables "app-drug-products" on 2026-09-03 at 09:00
  When the matcher rechecks on 2026-09-04 at 09:00
  Then that step wrote no file
passa version that changes no query a matcher judgment was asserted with files no finding
Example: a version that changes no query a matcher judgment was asserted with files no finding
  Version 19 adds R3 and R8 and runs version "0"'s vaccine group query, which the flu shots' matcher judgments were
  asserted with.

  Given a new pod for Hana on 2026-07-01 at 09:00
  And the pod is opened with the tables "app" on 2026-07-01 at 09:01
  And Hana enters "flu-shots" on 2026-07-02 at 09:00
  And the matcher runs on the records of that entry on 2026-07-02 at 09:05
  When the pod is opened with the tables "app-rxnorm" on 2026-07-03 at 09:00
  Then that step wrote these findings:
    | kind | under | justification | members |
passa version that drops a rule names the matcher judgments of that rule
Example: a version that drops a rule names the matcher judgments of that rule
  Version "0a" lacks R4.

  Given a new pod for Hana on 2026-07-01 at 09:00
  And the pod is opened with the tables "app" on 2026-07-01 at 09:01
  And Hana enters "flu-shots" on 2026-07-02 at 09:00
  And the matcher runs on the records of that entry on 2026-07-02 at 09:05
  When the pod is opened with the tables "app-fewer-rules" on 2026-07-03 at 09:00
  Then that step wrote these findings:
    | kind                                | under                    | justification             | members                                                                   |
    | matcher judgments no longer reached | Matcher rules version 0a | same mapped code and date | immunization CVX 141 "Fluarix", immunization CVX 150 "FluLaval"           |
    | matcher judgments no longer reached | Matcher rules version 0a | same mapped code and date | immunization CVX 141 "Fluad", immunization CVX 161 "Fluzone Quadrivalent" |
passa version that drops a rule and declares it wrong names none of its matcher judgments, since its release retracts their assertions
Example: a version that drops a rule and declares it wrong names none of its matcher judgments, since its release retracts their assertions
  Version "0b" lacks R4 and declares it wrong.

  Given a new pod for Hana on 2026-07-01 at 09:00
  And the pod is opened with the tables "app" on 2026-07-01 at 09:01
  And Hana enters "flu-shots" on 2026-07-02 at 09:00
  And the matcher runs on the records of that entry on 2026-07-02 at 09:05
  When the pod is opened with the tables "app-wrong-rule" on 2026-07-03 at 09:00
  Then that step wrote these findings:
    | kind | under | justification | members |

M19. A person answers a finding of matcher judgments no longer reached over the records of its pairs, never by naming the finding

Ruled by How everything in a pod is named, rows document, finding, Nothing kept cites anything derived; What a judgment is, and what it borrows, rows judgment over a source-level thing, acknowledgement

"What needs review" lists the finding as one line, its pairs: each pair of records of a matcher judgment it names that are now in two entries and not judged different, with the matcher judgment of least IRI that names it; a lapsed Same the finding names is listed with it and never alone, and one no finding names is listed alone (O1). The finding is named by its triples and a matcher judgment by the versions it used, so a field rename or a rebuild works both out again under other names: an answer names what the finding is about, the records of each pair, never the finding. A person answers a pair with a Same or a Different over its records, which joins or parts it as any Same or Different does; an app may file one for each pair of the line at once. Or with a cascade:Acknowledged whose cascade:answersWarningOfKind is cascade:MatcherJudgmentsNoLongerReached and whose members are exactly the pair's two records: it takes that pair off the review page however the finding is worked out again, and changes nothing else, so the finding still stands and the pair stays apart. One acknowledgement answers one pair: one naming the records of two pairs answers neither, so a later pair of one record from each is listed, and an app that answers the whole line files one per pair. A judgment one of whose members is a finding is refused. Each answer is a judgment the lens counts or not, so writers that file them in any order hold one answer.

Why a matcher judgment, an assertion per rule list version, and one matcher agent. A matcher judgment is named once, with an assertion per rule list version because the same inputs give the same name, so a later version that agrees could otherwise write nothing, and a run that reaches an asserted judgment writes nothing, so a daily run adds no files. A matcher judgment counts while its maker is trusted, its used versions are current, and it has an assertion under a rule list version whose row for the rule carries the same rec:queryHash as the version the app uses. M11 pins a rule's bytes, so two versions with one hash reach the same matcher judgments, and a new version asserts only the matcher judgments of the rules it changed; an assertion per matcher judgment per version would be 600k to 1.2M files over ten years, more than the rest of the pod (computed, #206). A matcher judgment's members are the record and the least member of each entry it matched, a star, because entries are a transitive closure and come out the same, where every earlier copy as a member makes a fact re-downloaded in each monthly summary a matcher judgment of 1, 2 … g members, which same-pairs.rq expands to about 58M pairs over ten years (computed from an assumed 100 persistent entries per summary, #206). The rule list's version is out of the matcher judgment's name because with it in, every version renamed every matcher judgment, the duplication the split exists to stop; the member and table versions stay in, because a matcher judgment about old content is a different matcher judgment, and a new table version re-mints only the matcher judgments whose joining rows changed in it (M7), since rows are the content: re-minting every table-reading matcher judgment per adopted table version is about 960k matcher judgments in ten years (assumed monthly adoption, #206), and a used table version stays current for a matcher judgment while the current version's joining rows are the same. Which rows join is asked of the matcher judgment's rule, run over its members against the current version (M7), so a matcher judgment names no rows and its recipe stays as ruled. A rule list version that merely tightens a rule retracts nothing: the matcher judgments it no longer reaches have no assertion under it and stop counting by derivation, and its first run files one finding naming them, which the review page lists as one line, answered pair by pair over records: a Same or a Different over a pair's records, which an app may file for every pair at once, or an acknowledgement of the kind naming exactly them; a person's Same already filed on a pair is untouched. A release retracts only what it declares wrong, so a known-bad join is never offered back. The Cascade matcher is one unversioned agent because the matcher feature promises every runtime that follows it reaches the same matcher judgments, so which runtime ran is forensics, and it sits on the run's act with every other act's performer: a bug in a rule list version is found by the assertions under it, a bug in a runtime by the acts it performed, a bug in an app by its own agent and version, and bad data from any of them is hidden by a person's Erroneous over the act.

How everything in a pod is named: the whole Why, the alternatives that lost and what would change our mind.

4 examples: 4 pass, 0 fail, 0 not run

passthe review page lists the finding as one line of the pairs it names that are now apart
Example: the review page lists the finding as one line of the pairs it names that are now apart
  The product pair, which R11 joins again, is in one entry and not listed.

  When the query "questions/entry/What needs review.rq" is asked
  Then it answers:
    | entry                                                     | entryLabel                                           | needs                                              | finding                                                     | judgment                                                                                                                    | judgmentLabel                                    | record                                       | recordLabel                                   | otherRecord                          | otherRecordLabel                      |
    | the entry of medication RxNorm 29046 "Lisinopril tablets" | "Medication entry · Lisinopril tablets · 2024-06-01" | "no longer joined under a newer rule list version" | <ni:///sha-256;XD97L8aa6qyALK1msjIjSSZ9tfgEQiDvuC7WLeiPYrE> | the matcher's same medication code of medication RxNorm 29046 "Lisinopril" and medication RxNorm 29046 "Lisinopril tablets" | "Same · Cascade matcher · 02a10a91 · Lisinopril" | medication RxNorm 29046 "Lisinopril tablets" | "Medication · Lisinopril tablets · own entry" | medication RxNorm 29046 "Lisinopril" | "Medication · Lisinopril · own entry" |
passa person's Same over a pair's records joins it and takes it off the review page
Example: a person's Same over a pair's records joins it and takes it off the review page
  When Gus files the judgment "same-over-the-lisinopril-records-after-the-tables" on 2026-09-04 at 09:00
  And the query "questions/entry/What needs review.rq" is asked
  Then it answers nothing
  And the medications view holds these entries:
    | members                                                                            |
    | medication RxNorm 29046 "Lisinopril", medication RxNorm 29046 "Lisinopril tablets" |
passan acknowledgement of the kind naming a pair's records takes it off the review page and leaves it apart
Example: an acknowledgement of the kind naming a pair's records takes it off the review page and leaves it apart
  When Gus files the judgment "acknowledge-the-finding" on 2026-09-04 at 09:00
  And the query "questions/entry/What needs review.rq" is asked
  Then it answers nothing
  And the medications view holds these entries:
    | members                                      |
    | medication RxNorm 29046 "Lisinopril"         |
    | medication RxNorm 29046 "Lisinopril tablets" |
passan acknowledgement naming the finding itself is refused
Example: an acknowledgement naming the finding itself is refused
  When Gus files the judgment "acknowledge-the-finding-by-its-name" on 2026-09-04 at 09:00
  Then that step is refused

M20. Two servers that connects under one client id found reporting one self-asserted base URL and one authorization endpoint, at addresses on one host, are the same

Ruled by When a source moves, switches vendor or issues a new edition, rows two servers are one, server

R14 matches a server's record with another when a version of each, written by connects made with one client id (A16), states one cascade:selfAssertedBaseUrl and one cascade:authorizationEndpoint, each as the server wrote it, and their cascade:serverBaseUrl values name one host, their ports aside. A connect's run takes the server it wrote a revision for, its first or a later one (M1), so which server was connected first, and under which client id, does not decide whether two match. Servers reported to two client ids, or at two hosts, are not matched: the app may propose that they are one, and the person decides. The matcher judgment joins the two servers as any counting Same does, and queries/derivations/same-records-under-same-servers.rq derives from it, as from a person's Same over servers, one record of each type and id under both, within one organization.

Why one mechanism. The three problems are one problem at three levels, answered by one mechanism: name by the source, join by one judgment per source-level fact, and let the matcher work per record only inside the scope that judgment gives it. Everything here is derived, so timing does not matter and retraction undoes every join at once.

When a source moves, switches vendor or issues a new edition: the whole Why, the alternatives that lost and what would change our mind.

3 examples: 3 pass, 0 fail, 0 not run

passa connect to the hospital's server at a new path on its host makes the matcher judge the two addresses one server
Example: a connect to the hospital's server at a new path on its host makes the matcher judge the two addresses one server
  Given a new pod for Finn on 2026-06-01 at 09:00
  And the pod is opened with the tables "app-servers" on 2026-06-01 at 09:01
  And the connect "hospital" is made on 2026-06-08 at 08:55
  And the connect "hospital-at-a-new-path" is made on 2026-07-01 at 08:55
  When the matcher runs on the records of that step on 2026-07-01 at 08:56
  Then that step wrote these matcher judgments:
    | justification                                                      | members                                                                                                   | used                                                                                                                                |
    | same self-asserted base URL and authorization endpoint on one host | server https://fhir.example-hospital.example/api/FHIR/R4, server https://fhir.example-hospital.example/r4 | version 1 of server https://fhir.example-hospital.example/api/FHIR/R4, version 1 of server https://fhir.example-hospital.example/r4 |
passa reconnect to the hospital's first address under the client id the new path was connected with makes the matcher judge the two addresses one server
Example: a reconnect to the hospital's first address under the client id the new path was connected with makes the matcher judge the two addresses one server
  Given a new pod for Finn on 2026-06-01 at 09:00
  And the pod is opened with the tables "app-servers" on 2026-06-01 at 09:01
  And the connect "hospital" is made on 2026-06-08 at 08:55
  And the connect "hospital-at-a-new-path-with-another-client-id" is made on 2026-07-01 at 08:55
  And the connect "hospital-with-another-client-id" is made on 2026-07-02 at 08:55
  When the matcher runs on the records of that step on 2026-07-02 at 08:56
  Then that step wrote these matcher judgments:
    | justification                                                      | members                                                                                                   | used                                                                                                                                |
    | same self-asserted base URL and authorization endpoint on one host | server https://fhir.example-hospital.example/api/FHIR/R4, server https://fhir.example-hospital.example/r4 | version 1 of server https://fhir.example-hospital.example/api/FHIR/R4, version 2 of server https://fhir.example-hospital.example/r4 |
passa connect at another host reporting the same self-asserted base URL and authorization endpoint is matched with no server
Example: a connect at another host reporting the same self-asserted base URL and authorization endpoint is matched with no server
  Given a new pod for Finn on 2026-06-01 at 09:00
  And the pod is opened with the tables "app-servers" on 2026-06-01 at 09:01
  And the connect "hospital" is made on 2026-06-08 at 08:55
  And the connect "hospital-at-a-new-host" is made on 2026-07-01 at 08:55
  When the matcher runs on the records of that step on 2026-07-01 at 08:56
  Then the matcher has no judgment holding server https://fhir.example-hospital.example/r4 and server https://fhir.example-hospital-cloud.example/api/FHIR/R4

M21. A lab result is compared by its code, its instant, its value and its unit, and joined on a day alone only as likely

Ruled by Quantities on lab results, rows matcher, conversion; What a judgment is, and what it borrows, row what a judgment, a finding or a view came from

R6 joins two lab results of one LOINC code at one instant whose values are of one kind and equal: two quantities of one number, compared by value, so 4.10 and 4.1 are one, with the same comparator or none on both; two ratios of equal parts; two ranges of equal bounds; two coded values sharing a code. Text is never compared. Two times with a time zone are one instant when they name one moment; two with none, as a C-CDA may write them, are one when written alike; one of each is never one instant. Units are equal as UCUM defines one unit, which is not conversion: each annotation in braces is dropped, a unit of annotations alone being 1, and the litre's two symbols, l and L, are one with any prefix, so mmol/l is mmol/L; every other difference of case is kept, as UCUM is case-sensitive, so Mmol/L is not mmol/L. R15 joins as R6 does on one day, when at least one of the two is stamped with the day alone: two draws in a day are common, so the join is likely, and "What needs review" lists the entry with its Same. Two instants never join, though they are on one day.

Two results of one code at one instant are joined by neither when their values differ: values of two kinds, or of one kind in one unit with two numbers, two comparators, a part one lacks, or coded answers of one code system sharing no code. A correction should have come as a new version, and here it did not, so R16 files a finding for review of the two (cascade:DifferentResultValuesAtOneInstant). Coded answers of two code systems are left alone, since a rule cannot tell them from one answer coded twice. Two of one code, instant and kind whose units differ are joined by neither, since no rule converts one unit into another: R17 files a finding for review of the two (cascade:DifferentResultUnitsAtOneInstant). Each finding is named by its triples (cascade:FindingNamingRule) as M18's is: its type, its kind, its oa:motivatedBy oa:classifying, the two records as its oa:hasTarget and their current versions as its prov:wasDerivedFrom. A run files it for each pair the query gives that the pod holds no finding of, so a second run files none. "What needs review" lists it while both records are still at those versions, until a person acknowledges it, with an acknowledgement of its kind naming the two results and no other record, or judges the two the same or different, or while R18 joins them and one says it was corrected or amended (M22). The review page's lines for R15's joins and for the findings are shown by the vocabulary's fixtures.

What a same result needs, tiered. No standard defines a duplicate, so the rule is ours, its strongest input is the standards' identifiers, and the rubric's fourth test orders it by how sure each tier is. (i) Within one organisation a shared business identifier is certain: HL7 v2's filler order number with the observation id, "a permanent identifier for an order and its associated observations" (quoted in the ruling; not re-read here), FHIR's identifier, C-CDA's entry id; it is republishing-sources.md's within-organisation rule, run first. R18 compares the identifier as the literal #212 made an organisation's, its value typed by its system, which a C-CDA id reaches through HL7's CDA-to-FHIR identifier mapping, so one result in a hospital's FHIR and C-CDA summaries carries one identifier; one with no system is never compared, since nothing says which of an organisation's systems issued it. It also asks for one code, as naming.md says a judgment does ("share one plus a code"): a source copying an organizer's accession onto each member would otherwise join a whole panel. And it asks for one clinically relevant time, compared as tier (ii) compares instants, or one of the two stating none: a source that files serial draws under one accession would otherwise join every draw of a day, or of a year, into one; a correction keeps its specimen's time, so it still joins. It does not compare the value, so a correction's second value is not tier (iii)'s finding to be resolved by hand: the review page leaves a finding of two results R18 joins out when one of the two says it was corrected or amended (workflowStatus), and lists it otherwise, since two channels of one organisation disagreeing on a value neither marks as a correction is what a person should see. The organisation is an organisation record a record's documents name as custodian or author; an agent with no record, as Apple Health's export names its author, is no organisation, and a pull names none, so R18 joins no pulled record, holding them apart while which organisation a record from a shared server belongs to is open in republishing-sources.md. Two organisation records are one only by a person's judgment of organisations (cascade:currentlySameOrganization), never because a join of two servers made two organisations pulled from them one record, for the same reason.

Quantities on lab results: the whole Why, the alternatives that lost and what would change our mind.

3 examples: 3 pass, 0 fail, 0 not run

passtwo potassiums of one instant in two time zones, written 4.10 and 4.1 in mmol/L and mmol/l, are the same result, and one in mg/dL or of another value joins neither
Example: two potassiums of one instant in two time zones, written 4.10 and 4.1 in mmol/L and mmol/l, are the same result, and one in mg/dL or of another value joins neither
  Then the matcher's judgments holding lab result LOINC 2823-3 "Potassium", lab result LOINC 2823-3 "Serum potassium", lab result LOINC 2823-3 "Potassium, other lab" and lab result LOINC 2823-3 "Potassium repeat" are:
    | justification | members                                                                        | used                                                                                                     |
    | same result   | lab result LOINC 2823-3 "Potassium", lab result LOINC 2823-3 "Serum potassium" | version 1 of lab result LOINC 2823-3 "Potassium", version 1 of lab result LOINC 2823-3 "Serum potassium" |
passa glucose stamped with its day alone and one at an instant that day, of one value in one unit, are the same result on one day
Example: a glucose stamped with its day alone and one at an instant that day, of one value in one unit, are the same result on one day
  Then the matcher's judgments holding lab result LOINC 2345-7 "Glucose" and lab result LOINC 2345-7 "Glucose, fasting" are:
    | justification          | members                                                                       | used                                                                                                    |
    | same result on one day | lab result LOINC 2345-7 "Glucose", lab result LOINC 2345-7 "Glucose, fasting" | version 1 of lab result LOINC 2345-7 "Glucose", version 1 of lab result LOINC 2345-7 "Glucose, fasting" |
passa potassium of another value at the same instant and unit is a finding of different result values, and one in another unit a finding of different result units, never a Same
Example: a potassium of another value at the same instant and unit is a finding of different result values, and one in another unit a finding of different result units, never a Same
  Then that step wrote these findings:
    | kind                                   | members                                                                                    |
    | different result values at one instant | lab result LOINC 2823-3 "Potassium", lab result LOINC 2823-3 "Potassium repeat"            |
    | different result values at one instant | lab result LOINC 2823-3 "Serum potassium", lab result LOINC 2823-3 "Potassium repeat"      |
    | different result units at one instant  | lab result LOINC 2823-3 "Potassium", lab result LOINC 2823-3 "Potassium, other lab"        |
    | different result units at one instant  | lab result LOINC 2823-3 "Serum potassium", lab result LOINC 2823-3 "Potassium, other lab"  |
    | different result units at one instant  | lab result LOINC 2823-3 "Potassium repeat", lab result LOINC 2823-3 "Potassium, other lab" |

M22. Two lab results of one business identifier and one code, from documents of one organization, are the same result for certain

Ruled by Quantities on lab results, row matcher; When a source moves, switches vendor or issues a new edition, rows two organisations are one, within-organisation rules

R18 joins two lab results whose current versions carry one dct:identifier, one LOINC code and one clinically relevant time, or of which one states no time, when the documents their revisions come from name, as custodian or author (cascade:CustodianRole, cascade:AuthorRole), one organization record, or two a person judged the same organization (cascade:currentlySameOrganization). An identifier is compared as the literal it is, its value typed by its system, which the adapters write alike from a FHIR Observation.identifier and a C-CDA observation's id, by HL7's CDA-to-FHIR identifier mapping, a UUID in lower case in both: so a hospital's FHIR summary and its C-CDA summary give one result one identifier, as the adapters' fixtures show. An identifier with no system, a plain string, is never compared, since an organization runs many systems and nothing says which issued it. Times are compared as M21 compares them: two with a time zone when they name one moment, two with none when written alike, one of each never, a day alone only with that day. A source that files serial draws under one accession gives them one identifier, and their times keep them apart; a correction keeps its specimen's time, so it joins. The value is not compared: "What needs review" leaves out a finding of R16 or R17 of two results R18 joins when the current version of one says it was corrected or amended (cascade:workflowStatus), and lists it otherwise, since two channels of one organization disagreeing is for a person to see; it never counts R18 as a kind of sameness of its own. An agent that is no organization record, as the author an Apple Health export names, names no organization, and a record whose documents name no organization, as a pull from a server does, is joined by no identifier: which organization a record from a server serving many belongs to is open (decisions/republishing-sources.md, "Still open"), so neither a server judged the same nor two organizations pulled from servers a join made one record are an organization judged the same, and this rule holds two records apart until their documents say whose they are.

What a same result needs, tiered. No standard defines a duplicate, so the rule is ours, its strongest input is the standards' identifiers, and the rubric's fourth test orders it by how sure each tier is. (i) Within one organisation a shared business identifier is certain: HL7 v2's filler order number with the observation id, "a permanent identifier for an order and its associated observations" (quoted in the ruling; not re-read here), FHIR's identifier, C-CDA's entry id; it is republishing-sources.md's within-organisation rule, run first. R18 compares the identifier as the literal #212 made an organisation's, its value typed by its system, which a C-CDA id reaches through HL7's CDA-to-FHIR identifier mapping, so one result in a hospital's FHIR and C-CDA summaries carries one identifier; one with no system is never compared, since nothing says which of an organisation's systems issued it. It also asks for one code, as naming.md says a judgment does ("share one plus a code"): a source copying an organizer's accession onto each member would otherwise join a whole panel. And it asks for one clinically relevant time, compared as tier (ii) compares instants, or one of the two stating none: a source that files serial draws under one accession would otherwise join every draw of a day, or of a year, into one; a correction keeps its specimen's time, so it still joins. It does not compare the value, so a correction's second value is not tier (iii)'s finding to be resolved by hand: the review page leaves a finding of two results R18 joins out when one of the two says it was corrected or amended (workflowStatus), and lists it otherwise, since two channels of one organisation disagreeing on a value neither marks as a correction is what a person should see. The organisation is an organisation record a record's documents name as custodian or author; an agent with no record, as Apple Health's export names its author, is no organisation, and a pull names none, so R18 joins no pulled record, holding them apart while which organisation a record from a shared server belongs to is open in republishing-sources.md. Two organisation records are one only by a person's judgment of organisations (cascade:currentlySameOrganization), never because a join of two servers made two organisations pulled from them one record, for the same reason.

Quantities on lab results: the whole Why, the alternatives that lost and what would change our mind.

1 example: 1 pass, 0 fail, 0 not run

passa potassium from the hospital's summary and the one from an exchange's summary that names the hospital as its author carry one identifier and one instant and are the same result, and the clinic's of that identifier joins neither
Example: a potassium from the hospital's summary and the one from an exchange's summary that names the hospital as its author carry one identifier and one instant and are the same result, and the clinic's of that identifier joins neither
  Given a new pod for Gus on 2026-10-01 at 09:00
  And the pod is opened with the tables "app-identifiers" on 2026-10-01 at 09:01
  And the download "hospital-summary.xml" is imported on 2026-10-03 at 09:00
  And Gus files the judgment "about-the-summaries" on 2026-10-03 at 09:05
  And the download "exchange-summary.xml" is imported on 2026-10-04 at 09:00
  And the matcher runs on the records of that import on 2026-10-04 at 09:05 (match-exchange)
  And the download "clinic-summary.xml" is imported on 2026-10-05 at 09:00
  When the matcher runs on the records of that import on 2026-10-05 at 09:05 (match-clinic)
  Then the matcher's judgments holding lab result LOINC 2823-3 "Serum potassium", lab result LOINC 2823-3 "Potassium" and lab result LOINC 2823-3 "Potassium, clinic" are:
    | justification                                                  | members                                                                        | used                                                                                                     |
    | same business identifier and test code within one organization | lab result LOINC 2823-3 "Potassium", lab result LOINC 2823-3 "Serum potassium" | version 1 of lab result LOINC 2823-3 "Potassium", version 1 of lab result LOINC 2823-3 "Serum potassium" |
    | same result                                                    | lab result LOINC 2823-3 "Potassium", lab result LOINC 2823-3 "Serum potassium" | version 1 of lab result LOINC 2823-3 "Potassium", version 1 of lab result LOINC 2823-3 "Serum potassium" |

M23. A date is compared at the precision its source wrote

Ruled by Partial dates, and values absent for a stated reason, rows 1. datatype, 2. comparison and order, 3. matching partial to full, 5. hour precision from CDA

A date is typed by what its source wrote: xsd:gYear for a year, xsd:gYearMonth for a month, xsd:date for a day, xsd:dateTime for a time, and nothing is padded but a time written to the hour or the minute, which is held padded to the second beside the characters its source sent (cascade:PaddedDateTime). XSD makes the four types incomparable, so "2019" never equals "2019-10-01", by term or by value: R2, which compares dates by term, never joins a year or a month with a day. R2 and R4 join only a day or a time its source wrote to the second: two shots dated to one year, or to one padded hour, may be two shots. R8 reads each onset and abatement as the days it covers, as FHIR search reads a date, a year from 1 January to 31 December and a month from its first day to its last, so a condition begun in 2019 and over within it overlaps one of 1 June 2019. R6, R16 and R17 never read a padded time as an instant, since its source did not say the second; R15 counts it as a day alone, so two results at one padded hour are joined only as likely. A year or a month is no day, and a result stamped with one joins nothing. A result whose value is absent for a reason (cascade:ValueAbsentForReason) has no value kind, and joins nothing.

Why the union. Every health standard carries precision in the form as written and none pads: FHIR, CDA and HL7 v2 drop digits from the right, openEHR keeps a reduced-accuracy string, and C-CDA on FHIR says "not 2023-05-31T00:00:00+00:00" (verified). FHIR RDF already writes the union and DCAT 3 does the same, so the vocabulary adds two types to an sh:or that already mixes two incomparable ones, xsd:date and xsd:dateTime. XSD defines each type as an interval, so the range FHIR search wants is the literal itself, with no second triple to keep in step.

Partial dates, and values absent for a stated reason: the whole Why, the alternatives that lost and what would change our mind.

3 examples: 3 pass, 0 fail, 0 not run

passa condition begun in 2019 and over within it is the same by code and period as one of June 2019, and one begun in 2021 joins neither
Example: a condition begun in 2019 and over within it is the same by code and period as one of June 2019, and one begun in 2021 joins neither
  Then the matcher's judgments holding condition ICD-10-CM R10.9 "Abdominal pain, in 2019", condition ICD-10-CM R10.9 "Abdominal pain, June 2019" and condition ICD-10-CM R10.9 "Abdominal pain, in 2021" are:
    | justification        | members                                                                                                    | used                                                                                                                                 |
    | same code and period | condition ICD-10-CM R10.9 "Abdominal pain, in 2019", condition ICD-10-CM R10.9 "Abdominal pain, June 2019" | version 1 of condition ICD-10-CM R10.9 "Abdominal pain, in 2019", version 1 of condition ICD-10-CM R10.9 "Abdominal pain, June 2019" |
passa flu shot dated to its month never joins one of a day in that month by code and date
Example: a flu shot dated to its month never joins one of a day in that month by code and date
  Then the matcher has no judgment holding immunization CVX 141 "Fluarix, sometime in October 2019" and immunization CVX 141 "Fluarix"
passtwo potassiums at one padded hour, of one value in one unit, are the same result on one day, and one stamped with its year or with no value joins neither
Example: two potassiums at one padded hour, of one value in one unit, are the same result on one day, and one stamped with its year or with no value joins neither
  Then the matcher's judgments holding lab result LOINC 2823-3 "Potassium, at two", lab result LOINC 2823-3 "Potassium, other lab at two", lab result LOINC 2823-3 "Potassium, in 2025" and lab result LOINC 2823-3 "Potassium, not reported" are:
    | justification          | members                                                                                            | used                                                                                                                         |
    | same result on one day | lab result LOINC 2823-3 "Potassium, at two", lab result LOINC 2823-3 "Potassium, other lab at two" | version 1 of lab result LOINC 2823-3 "Potassium, at two", version 1 of lab result LOINC 2823-3 "Potassium, other lab at two" |

M24. A note its source sent again as it grew, and one note two sources sent, are one note

Ruled by Reports, notes and documents, rows the text no entry holds, joining

A C-CDA section is named by its code and its text, since it has no id (naming.feature), so a source that sends a section again as it was names the same record, and one that sends it grown, as a clinic's plan of treatment that keeps each visit's paragraph and adds the latest, names another; and two custodians' copies of one note are two records in two scopes. R19 joins two notes whose current versions share a note type, a LOINC code (cascade:noteOrDocumentTypeCode), or a code of another system (cascade:noteOrDocumentTypeCodeInOtherSystem) when neither has a LOINC code, from documents naming one organization record, or two currently the same organization, as custodian or author, as R18 reads them, when the shorter one's text, read as lines with the white space in each line made one space and trimmed, and blank lines dropped, begins or ends the longer one's as whole lines, and the longer one is dated no earlier (cascade:noteOrDocumentDate), by instant when both are times and by day otherwise, when both are dated. A note grows at an end, after its last visit or before its first, newest first; a text held in the middle of another is a template's, not a growth. Growth is a chain: a shorter note that two notes of its type and organization hold, dated no earlier, neither of which holds the other, joins neither, since two notes grown apart from one text are two visits written from one template. So the notes R19 joins into one entry are a chain, each holding the one before it, and the entry leads with the latest, which holds every line of the others. R20 joins two notes of one type, read as R19 reads it, whose texts are the same once every run of white space is one space and the ends are trimmed, from any sources and whatever their dates, one note with two copies; it never joins a text that holds another and more, since a note of another organization that holds a note whole quotes it, and a quoting note leading the entry would show the quoter as its organization. Either rule needs the text, the shorter one's for R19, to hold at least 200 characters: in the vocabulary's inputs every plan short enough to recur in unrelated notes ("Return in 3 months.", "Follow-up in 2 months.") is under 45 characters, the longest generic line, an emergency department's warning to come back, is 106, and the shortest note that grew holds 271, so the guard sits between them; a plan of several generic lines can pass it, and the chain rule keeps two visits grown from it apart. A note whose later version rewrites a line, as an edited section, is joined by neither. R21 joins two notes whose current versions carry one master identifier (cascade:noteOrDocumentMasterIdentifier), the identifier of one version of one document, FHIR's DocumentReference.masterIdentifier and a C-CDA document's ClinicalDocument/id, typed by its system as R18 reads an identifier, whatever their types and texts and from any sources: an unstructured document imported as C-CDA and pulled as a DocumentReference to it is one note. A plain string, an identifier with no system, joins nothing. Its example comes with the adapters' next regeneration, which writes the term.

Why the text no entry holds is a note, for any section. C-CDA documents carry the assessment, the plan and the hospital course as sections with no entries. FHIR would hold them as Composition.section, which exists to assemble a document for exchange; the pod keeps the document itself, and a reading needs something of note size to target and cite. Looked at FHIR's Composition and C-CDA on FHIR's notes page: failed because neither gives a section an identity of its own apart from its document.

Reports, notes and documents: the whole Why, the alternatives that lost and what would change our mind.

2 examples: 2 pass, 0 fail, 0 not run

passa plan of treatment the clinic sent again with two more lines is one note, the grown one leading, and a short plan it holds joins neither
Example: a plan of treatment the clinic sent again with two more lines is one note, the grown one leading, and a short plan it holds joins neither
  Given the download "clinic-plan-may.xml" is imported on 2026-11-02 at 09:00
  And the download "clinic-plan-june.xml" is imported on 2026-11-02 at 09:10
  And the download "clinic-plan-august.xml" is imported on 2026-11-02 at 09:20
  When the matcher runs on the records of that import on 2026-11-02 at 09:25
  Then the matcher's judgments holding note "Plan of treatment, May 20", note "Plan of treatment, June 15" and note "Plan of treatment, August 12" are:
    | justification                                         | members                                                               |
    | same note type and text grown within one organization | note "Plan of treatment, August 12", note "Plan of treatment, May 20" |
  And the entry of note "Plan of treatment, May 20" shows:
    | field       | value                               |
    | lead member | note "Plan of treatment, August 12" |
passthe hospital course the hospital and the clinic each sent is one note with two copies
Example: the hospital course the hospital and the clinic each sent is one note with two copies
  Given the download "hospital-course.xml" is imported on 2026-11-02 at 09:00
  And the download "clinic-hospital-course.xml" is imported on 2026-11-02 at 09:10
  When the matcher runs on the records of that import on 2026-11-02 at 09:15
  Then the matcher's judgments holding note "Hospital course" and note "Hospital course, as the clinic holds it" are:
    | justification           | members                                                                |
    | same note type and text | note "Hospital course", note "Hospital course, as the clinic holds it" |