For tools: conformance/alex-rivera/alex-rivera.feature
Alex Rivera's pod
Alex Rivera is a patient whose records come from two hospitals, Meridian Health System and Larkspur Valley Health, in the Apple Health exports she imports into her own pod. Her pod shows how an app builds one account of her allergies, conditions, immunizations and procedures from FHIR records, joins the same fact across sources, keeps her own judgments apart from a matcher's, and carries on when a hospital moves to a new server.
The scenario every runtime must pass, https://github.com/the-cascade-protocol/cascade-vocabulary/issues/4: Alex's story, the planted cases P1 to P25 under the case each shows, and the scenario's other outcomes. Each example reads the pod at the smallest set of steps and lenses at which it can fail for its own reason. A record, a profile and a person's judgment are named by the handle expected/handles.json gives it. The scenario's events E8 and E14 are Alex's judgments J8 to J10 and J19 to J24, and the story names those steps by the judgments.
The result
The story
Background: Alex's story
Background: Alex's story Given a new pod for Alex on 2026-09-01 at 09:55 (E1) And the export "x-e2" is imported on 2026-09-01 at 10:00:04 (E2) And the matcher runs on the records of "E2" on 2026-09-01 at 10:00:04 (M5) And Alex files the judgment "J1" on 2026-09-01 at 10:00:30 And Alex enters "a1" on 2026-09-01 at 18:30 (E3) And the matcher runs on the records of "E3" on 2026-09-01 at 18:30 (M6) And the export "x-e4" is imported on 2026-10-14 at 15:42 (E4) And Alex files the judgment "J2" on 2026-10-14 at 15:42:30 And the matcher runs on the records of "E4" on 2026-10-14 at 15:43 (E5) And the export "x-e6" is imported on 2026-11-20 at 09:00:04 (E6) And the matcher runs on the records of "E6" on 2026-11-20 at 09:00:04 (M7) And the export "x-e6" is imported on 2026-11-21 at 20:10 (E7) And Alex files the judgment "J8" on 2026-12-02 at 19:00 And Alex files the judgment "J9" on 2026-12-02 at 19:00 And Alex files the judgment "J10" on 2026-12-02 at 19:00 And the matcher rechecks on 2027-01-15 at 06:00 (M2) And the export "x-e10" is imported on 2027-02-10 at 17:21 (E10) And the matcher runs on the records of "E10" on 2027-02-10 at 17:21 (M3) And Alex files the judgment "J22" on 2027-02-10 at 17:21:30 And the export "x-e12" is imported on 2027-03-18 at 12:00:04 (E12) And Alex files the judgment "J12" on 2027-03-18 at 12:00:30 And the matcher runs on the records of "E12" on 2027-03-18 at 12:01 (E13) And Alex files the judgment "J19" on 2027-04-02 at 20:00 And Alex files the judgment "J20" on 2027-04-02 at 20:00 And Alex files the judgment "J21" on 2027-04-02 at 20:00 And Alex files the judgment "J23" on 2027-04-02 at 20:00 And Alex files the judgment "J24" on 2027-04-02 at 20:00 And the export "x-e15" is imported on 2027-08-20 at 08:00:04 (E15) And the matcher runs on the records of "E15" on 2027-08-20 at 08:00:04 (M8)
The scripted input
- alex/bridge/ 66 files
- alex/downloads/ 118 files
- alex/entries/
- alex/judgments/ 12 files
- alex/references/ 2 files
- people.ttl
The expected views
The planted cases
P1. The same allergy at both hospitals, under different ids and code systems
Penicillin is H1-ALG-PCN (RxNorm 7980) at Meridian, and H2O-ALG-PCN and H2F-ALG-PCN (SNOMED 373270004) at Larkspur's old and new servers: three records. Version 19 of the rule list joins no SNOMED CT code with an RxNorm code, so the matcher never joins H1-ALG-PCN, J14 joins the two Larkspur records by their one code, and Alex joins all three (J21).
6 examples: 6 pass, 0 fail, 0 not run
passone allergy at two hospitals is three allergy records
Example: one allergy at two hospitals is three allergy records
Then these records have:
| record | field | value |
| H1-ALG-PCN | kind | allergy |
| H2O-ALG-PCN | kind | allergy |
| H2F-ALG-PCN | kind | allergy |
passthe matcher judges H1-ALG-PCN the same as nothing
Example: the matcher judges H1-ALG-PCN the same as nothing
Then the matcher's judgments holding H1-ALG-PCN are:
| justification | members |
passunder everyday, H1-ALG-PCN and H2O-ALG-PCN are each an entry of their own after E5
Example: under everyday, H1-ALG-PCN and H2O-ALG-PCN are each an entry of their own after E5
When the pod is read as it stood after "E5"
Then the allergies view holds these entries:
| members |
| H1-ALG-PCN |
| H2O-ALG-PCN |
passat E13, H1-ALG-PCN stands alone and J14's same code joins the Larkspur records
Example: at E13, H1-ALG-PCN stands alone and J14's same code joins the Larkspur records
When the pod is read as it stood after "E13"
Then the allergies view holds these entries:
| members |
| H1-ALG-PCN |
| H2O-ALG-PCN, H2F-ALG-PCN |
passJ21, Alex's Same, joins the three penicillin records, even under export
Example: J21, Alex's Same, joins the three penicillin records, even under export
When the pod is read as it stood after "J24", under the export lens
Then the allergies view holds these entries:
| members |
| H1-ALG-PCN, H2O-ALG-PCN, H2F-ALG-PCN |
passJ21 counts under export
Example: J21 counts under export When the pod is read as it stood after "J24", under the export lens Then J21 counts
P2. A record revised between two exports
H1-ALG-LATEX and H1-ALG-SULFA, E2 then E6: a new version and a revision after the first; the new version current.
2 examples: 2 pass, 0 fail, 0 not run
passH1-ALG-LATEX and H1-ALG-SULFA, revised between E2 and E6, each get a revision after their first
Example: H1-ALG-LATEX and H1-ALG-SULFA, revised between E2 and E6, each get a revision after their first
When the pod is read as it stood after "M7"
Then the records have these revisions:
| record | arrived | version | reaction manifestation text | after |
| H1-ALG-LATEX | 2026-09-01 at 10:00:04 | 1 | | |
| H1-ALG-LATEX | 2026-11-20 at 09:00:04 | 2 | Contact dermatitis | 2026-09-01 at 10:00:04 |
| H1-ALG-SULFA | 2026-09-01 at 10:00:04 | 1 | Rash | |
| H1-ALG-SULFA | 2026-11-20 at 09:00:04 | 2 | Itching, Rash | 2026-09-01 at 10:00:04 |
passthe second version of each is its current version
Example: the second version of each is its current version
When the pod is read as it stood after "M7"
Then these records have:
| record | field | value |
| H1-ALG-LATEX | version | 2 |
| H1-ALG-SULFA | version | 2 |
P3. A condition resolved
H1-CON-BRONCH, E6: its second version is resolved and current, and its entry shows it resolved.
1 example: 1 pass, 0 fail, 0 not run
passH1-CON-BRONCH's second version, resolved on 2026-09-20, is current, and its entry shows it resolved
Example: H1-CON-BRONCH's second version, resolved on 2026-09-20, is current, and its entry shows it resolved
When the pod is read as it stood after "M7"
Then these records have:
| record | field | value |
| H1-CON-BRONCH | version | 2 |
And the entry of H1-CON-BRONCH shows:
| field | value |
| status | resolved |
| abatement date | 2026-09-20 |
P4. A criticality disagreement between hospitals
Sulfamethoxazole is low at Meridian and high at Larkspur: from E5 the entry shows high, the most severe, and the disagreement is listed for review.
2 examples: 2 pass, 0 fail, 0 not run
passat E5, the entry holding H1-ALG-SULFA shows the most severe criticality its members give
Example: at E5, the entry holding H1-ALG-SULFA shows the most severe criticality its members give
When the pod is read as it stood after "E5"
Then the allergies view holds these entries:
| members |
| H1-ALG-SULFA, H2O-ALG-SULFA |
And the entry of H1-ALG-SULFA shows:
| field | value |
| criticality | high |
And these records have:
| record | field | value |
| H1-ALG-SULFA | criticality | low |
| H2O-ALG-SULFA | criticality | high |
passat E13, the entry holding H1-ALG-SULFA still shows the most severe criticality its members give
Example: at E13, the entry holding H1-ALG-SULFA still shows the most severe criticality its members give
When the pod is read as it stood after "E13"
Then the allergies view holds these entries:
| members |
| H1-ALG-SULFA, H2O-ALG-SULFA, H2F-ALG-SULFA |
And the entry of H1-ALG-SULFA shows:
| field | value |
| criticality | high |
And these records have:
| record | field | value |
| H1-ALG-SULFA | criticality | low |
| H2O-ALG-SULFA | criticality | high |
| H2F-ALG-SULFA | criticality | high |
P5. A record missing from a later export
H1-ALG-LATEX is absent from x-e15: nothing is written, and latex stays in the view with its second version.
2 examples: 2 pass, 0 fail, 0 not run
passno file E15 or M8 wrote names H1-ALG-LATEX
Example: no file E15 or M8 wrote names H1-ALG-LATEX Then no file that "E15" or "M8" wrote names H1-ALG-LATEX
passH1-ALG-LATEX is still at its second version and is an entry of its own
Example: H1-ALG-LATEX is still at its second version and is an entry of its own
Then these records have:
| record | field | value |
| H1-ALG-LATEX | version | 2 |
And the allergies view holds these entries:
| members |
| H1-ALG-LATEX |
P6. Entered in error at the source
H1-ALG-CODEINE's second version, E6: left out of every view, and still in the pod.
2 examples: 2 pass, 0 fail, 0 not run
passH1-ALG-CODEINE, entered in error at its source in x-e6, is in no view, for that reason
Example: H1-ALG-CODEINE, entered in error at its source in x-e6, is in no view, for that reason
Then these records are in no view, for these reasons:
| record | reason | because |
| H1-ALG-CODEINE | entered-in-error at its source | |
passH1-ALG-CODEINE is still an allergy record, with both its versions
Example: H1-ALG-CODEINE is still an allergy record, with both its versions
Then H1-ALG-CODEINE has these revisions:
| arrived | version | verification status | after |
| 2026-09-01 at 10:00:04 | 1 | unconfirmed | |
| 2026-11-20 at 09:00:04 | 2 | entered-in-error | 2026-09-01 at 10:00:04 |
And these records have:
| record | field | value |
| H1-ALG-CODEINE | kind | allergy |
P7. The same flu shot at both hospitals
H1-IMM-FLU25 and H2O-IMM-FLU25, joined by J6 at E5: one entry.
1 example: 1 pass, 0 fail, 0 not run
passthe immunizations view is one entry, of H1-IMM-FLU25 and H2O-IMM-FLU25
Example: the immunizations view is one entry, of H1-IMM-FLU25 and H2O-IMM-FLU25
When the pod is read as it stood after "E5"
Then the immunizations view holds these entries:
| members |
| H1-IMM-FLU25, H2O-IMM-FLU25 |
P8. Several patient profiles of one person, each made the subject's by an About
H1-PAT (J1, E2), H2O-PAT (J2, E4) and H2F-PAT (J12, E12): every record naming any of them is Alex's, and the patient view has one entry whose members are the profiles, and no name or birth date, since no profile has content.
3 examples: 3 pass, 0 fail, 0 not run
passevery record whose current version names a claimed profile is Alex's
Example: every record whose current version names a claimed profile is Alex's
When the pod is read as it stood after "J12"
When the query is:
"""
SELECT (COUNT(DISTINCT ?herRecord) AS ?hers) (COUNT(DISTINCT ?otherRecord) AS ?notHers) WHERE {
VALUES ?profile { <urn:uuid:7883c5a4-6c61-837c-9bf7-dbe1b37d89ff> <urn:uuid:5056e058-324f-8c70-b69b-fb27a061cdc5> <urn:uuid:d461e692-842c-8a30-a8ba-940a908c8cab> }
?record pav:hasCurrentVersion/cascade:patient ?profile .
BIND (IF(EXISTS { ?record cascade:subject <urn:uuid:5d0c8f3e-2b71-4c9a-8e44-7a1f0b9c3d26> }, ?record, ?none) AS ?herRecord)
BIND (IF(EXISTS { ?record cascade:subject <urn:uuid:5d0c8f3e-2b71-4c9a-8e44-7a1f0b9c3d26> }, ?none, ?record) AS ?otherRecord)
}
"""
Then it answers:
| hers | notHers |
| 22 | 0 |
passthe patient view is one entry of the claimed profiles, stating nothing but its type and members
Example: the patient view is one entry of the claimed profiles, stating nothing but its type and members
When the pod is read as it stood after "J12"
Then the patient-profile view holds these entries:
| members |
| H1-PAT, H2O-PAT, H2F-PAT, H1P-PAT |
And the entry of H1-PAT shows only:
| field | value |
| type | PatientProfile |
passbefore any About, the patient view has no entry
Example: before any About, the patient view has no entry When the pod is read as it stood after "E1" Then the patient-profile view has no entry
P9. A re-import of an identical export
E7: nothing is written, not even an import.
1 example: 1 pass, 0 fail, 0 not run
passE7 imports x-e6 again and writes no file, not even an import
Example: E7 imports x-e6 again and writes no file, not even an import Then "E7" wrote no file
P10. One hospital naming the same allergy twice, because it moved server
H2O-ALG-SULFA (old server, al-8237462) and H2F-ALG-SULFA (new server, lv-alg-102) are two records, in one entry at E13 through J13, which holds H2F-ALG-SULFA and H1-ALG-SULFA, the least record of the entry it matched; likewise J14, which joins the two penicillin records.
1 example: 1 pass, 0 fail, 0 not run
passLarkspur's old and new servers name one allergy as two records, and one entry holds both
Example: Larkspur's old and new servers name one allergy as two records, and one entry holds both
When the pod is read as it stood after "E13"
Then the allergies view holds these entries:
| members |
| H1-ALG-SULFA, H2O-ALG-SULFA, H2F-ALG-SULFA |
| H2O-ALG-PCN, H2F-ALG-PCN |
P11. A Different overriding a machine Same
J7 is the matcher's Same at E5, and J8 Alex's Different: the colonoscopies are apart from then under both lenses, and J7 still counts, though not for that pair.
2 examples: 2 pass, 0 fail, 0 not run
passJ8, Alex's Different, keeps apart the colonoscopies the matcher joined
Example: J8, Alex's Different, keeps apart the colonoscopies the matcher joined
When the pod is read as it stood after "J10"
Then the procedures view holds these entries:
| members |
| H1-PROC-COLO |
| H2O-PROC-COLO |
passJ7, the matcher's Same of the pair, still counts, and no two procedures are currently the same
Example: J7, the matcher's Same of the pair, still counts, and no two procedures are currently the same
When the pod is read as it stood after "J10"
Then the matcher's same code of H1-PROC-COLO and H2O-PROC-COLO counts
When the query is:
"""
SELECT ?record ?other WHERE {
?record a cascade:MedicalProcedure ; cascade:currentlySame ?other .
FILTER (?record != ?other)
}
"""
Then it answers nothing
P12. A Same chain through two kinds of machine sameness
The flu shots: J6 (same code and date, E5) and J17 (same mapped code and date, E13). One entry under everyday, listed for review; under export J17 does not count.
6 examples: 6 pass, 0 fail, 0 not run
passunder everyday the immunizations view is one entry of the three flu shots
Example: under everyday the immunizations view is one entry of the three flu shots
When the pod is read as it stood after "E13"
Then the immunizations view holds these entries:
| members |
| H1-IMM-FLU25, H2O-IMM-FLU25, H2F-IMM-FLU25 |
passunder export J17's mapped vaccine group does not count, so H2F-IMM-FLU25 is an entry of its own
Example: under export J17's mapped vaccine group does not count, so H2F-IMM-FLU25 is an entry of its own
When the pod is read as it stood after "E13", under the export lens
Then the immunizations view holds these entries:
| members |
| H1-IMM-FLU25, H2O-IMM-FLU25 |
| H2F-IMM-FLU25 |
passunder everyday the flu entry is joined by Sames of two justifications, which lists it for review
Example: under everyday the flu entry is joined by Sames of two justifications, which lists it for review
When the pod is read as it stood after "E13"
When the query is:
"""
SELECT DISTINCT ?justification WHERE {
GRAPH <https://pod.alex-rivera.example/clinical/immunizations.ttl> {
?entry cascade:entryMember ?member , ?other FILTER (?member != ?other)
}
?same cascade:countsUnderLens true ; cascade:verdict cascade:Same ; cascade:justification ?justification ;
prov:wasAttributedTo/a prov:SoftwareAgent ; prov:hadMember ?member .
}
"""
Then it answers:
| justification |
| cascade:SameCodeAndDate |
| cascade:SameMappedCodeAndDate |
passunder export only J6's justification counts, so the flu entry is not listed
Example: under export only J6's justification counts, so the flu entry is not listed
When the pod is read as it stood after "E13", under the export lens
When the query is:
"""
SELECT DISTINCT ?justification WHERE {
GRAPH <https://pod.alex-rivera.example/clinical/immunizations.ttl> {
?entry cascade:entryMember ?member , ?other FILTER (?member != ?other)
}
?same cascade:countsUnderLens true ; cascade:verdict cascade:Same ; cascade:justification ?justification ;
prov:wasAttributedTo/a prov:SoftwareAgent ; prov:hadMember ?member .
}
"""
Then it answers:
| justification |
| cascade:SameCodeAndDate |
passunder everyday the flu entry names the vaccine group table that joined it, and no rule list or record version
Example: under everyday the flu entry names the vaccine group table that joined it, and no rule list or record version
When the pod is read as it stood after "E13"
And the query "tables/joined-by.rq" is asked
Then it answers:
| entry | used |
| the entry of H1-IMM-FLU25 | CVX vaccine group table version 2026-08 |
passunder export J17's table does not count, so no entry names one
Example: under export J17's table does not count, so no entry names one When the pod is read as it stood after "E13", under the export lens And the query "tables/joined-by.rq" is asked Then it answers nothing
P13. A retracted judgment
J20 retracts J10: bronchitis and asthma are apart again, and nothing replaces J10.
2 examples: 2 pass, 0 fail, 0 not run
passonce J20 retracts J10, H1-CON-BRONCH and H2O-CON-ASTHMA are in different entries
Example: once J20 retracts J10, H1-CON-BRONCH and H2O-CON-ASTHMA are in different entries
When the pod is read as it stood after "J24"
Then the conditions view holds these entries:
| members |
| H1-CON-BRONCH |
| H2O-CON-ASTHMA, H2F-CON-ASTHMA |
passJ20 is a retraction, an activity with no member that invalidated J10, which no longer counts
Example: J20 is a retraction, an activity with no member that invalidated J10, which no longer counts
When the pod is read as it stood after "J24"
When the query is:
"""
SELECT ?retracted ?counts WHERE {
<urn:uuid:6f23d33f-20f7-46e0-8d56-54bbdba2b369> a prov:Activity ; prov:invalidated ?retracted .
FILTER NOT EXISTS { <urn:uuid:6f23d33f-20f7-46e0-8d56-54bbdba2b369> prov:hadMember [] }
BIND (EXISTS { ?retracted cascade:countsUnderLens true } AS ?counts)
}
"""
Then it answers:
| retracted | counts |
| J10 | false |
P14. A matcher recheck when no reference table has been replaced writes nothing
M2 rechecks every Same that used a reference version. No table of Alex's is replaced in her story, so it writes nothing.
1 example: 1 pass, 0 fail, 0 not run
passM2's recheck writes no file
Example: M2's recheck writes no file Then "M2" wrote no file
P15. A judgment made against versions that later change
J3 used H1-ALG-SULFA's first version, and its second arrives at E6: J3 still counts and is listed for review, until J9, Alex's Same over the same two records, naming the documents she was shown them from, answers it at E8.
2 examples: 2 pass, 0 fail, 0 not run
passJ3 still counts once its member changed, and is listed for review
Example: J3 still counts once its member changed, and is listed for review
When the pod is read as it stood after "M7"
When the query is:
"""
SELECT DISTINCT ?judgment WHERE {
?judgment cascade:countsUnderLens true ; cascade:verdict cascade:Same ; prov:hadMember ?record .
?record pav:hasCurrentVersion ?now .
FILTER NOT EXISTS { ?judgment prov:wasDerivedFrom ?now }
}
"""
Then it answers:
| judgment |
| the matcher's same code of H1-ALG-SULFA and H2O-ALG-SULFA |
passonce J9 answers J3, no judgment is listed for review
Example: once J9 answers J3, no judgment is listed for review When the pod is read as it stood after "J10" When the query "questions/judgment/What needs review.rq" is asked Then it answers nothing
P16. An entry the patient adds, the owner's own act
APP-ALG-PEANUT, E3: the subject's without any About; its criticality counts, and it supplies no status.
2 examples: 2 pass, 0 fail, 0 not run
passAPP-ALG-PEANUT's version names Alex as its patient, and the Abouts claim only profiles
Example: APP-ALG-PEANUT's version names Alex as its patient, and the Abouts claim only profiles
Then these records have:
| record | field | value |
| APP-ALG-PEANUT | patient | Alex |
When the query is:
"""
SELECT ?member WHERE { ?about cascade:verdict cascade:About ; prov:hadMember ?member }
"""
Then it answers:
| member |
| H1-PAT |
| H2O-PAT |
| H1P-PAT |
| H2F-PAT |
passAPP-ALG-PEANUT is Alex's, and its entry shows its criticality and no status
Example: APP-ALG-PEANUT is Alex's, and its entry shows its criticality and no status
When the pod is read as it stood after "M6"
Then these records have:
| record | field | value |
| APP-ALG-PEANUT | subject | Alex |
And the entry of APP-ALG-PEANUT shows:
| field | value |
| criticality | high |
| status | |
| status from | |
P17. A server version changes and the content does not
H1-CON-HTN, versionId 3 then 4, E6: no record, version or revision is written, and the file is kept as a document (A10).
2 examples: 2 pass, 0 fail, 0 not run
passE6 and E15 bring H1-CON-HTN under new server versions with its content unchanged, and write no record, version or revision of it
Example: E6 and E15 bring H1-CON-HTN under new server versions with its content unchanged, and write no record, version or revision of it Then no file that "E6" or "E15" wrote names H1-CON-HTN
passH1-CON-HTN has one revision, of its one version
Example: H1-CON-HTN has one revision, of its one version
Then H1-CON-HTN has these revisions:
| arrived | version | after |
| 2026-09-01 at 10:00:04 | 1 | |
P18. A change undone reuses a version
H1-CON-BACK: active (E2), resolved (E6), active (E15): two versions and three revisions, the third pointing at the first version.
2 examples: 2 pass, 0 fail, 0 not run
passH1-CON-BACK has two versions, and its third revision sets the first again
Example: H1-CON-BACK has two versions, and its third revision sets the first again
Then H1-CON-BACK has these revisions:
| arrived | version | clinical status | after |
| 2026-09-01 at 10:00:04 | 1 | active | |
| 2026-11-20 at 09:00:04 | 2 | resolved | 2026-09-01 at 10:00:04 |
| 2027-08-20 at 08:00:04 | 1 | active | 2026-11-20 at 09:00:04 |
passH1-CON-BACK's entry shows it active, with no abatement date
Example: H1-CON-BACK's entry shows it active, with no abatement date
Then the entry of H1-CON-BACK shows:
| field | value |
| status | active |
| abatement date | |
P19. A record named from its document, not its id
U-IMM-TDAP has no ClinicalRecord entry in x-e6, and an entry from x-e10 on: it is named from its document's SHA-256 and "", with a finding; it names no patient, so it is nobody's and in no view; x-e10 and every later export write nothing for it.
3 examples: 3 pass, 0 fail, 0 not run
passU-IMM-TDAP is derived from its document, and its version names no patient
Example: U-IMM-TDAP is derived from its document, and its version names no patient
Then these are named:
| thing | name |
| the document of U-IMM-TDAP | ni:///sha-256;lmlQ5kYnBqRHFB4DIMxNuP1nUh4xcHmY7XkQJs4Lq2s |
And these records have:
| record | field | value |
| U-IMM-TDAP | patient | |
passU-IMM-TDAP is in no view, because its version names no patient
Example: U-IMM-TDAP is in no view, because its version names no patient
Then these records are in no view, for these reasons:
| record | reason | because |
| U-IMM-TDAP | it names no patient | |
passno file E10, E12 or E15 wrote names U-IMM-TDAP
Example: no file E10, E12 or E15 wrote names U-IMM-TDAP Then no file that "E10", "E12" or "E15" wrote names U-IMM-TDAP
P20. A Different pair still joined through a third record
J18 (E13) is a machine Same over all three colonoscopies after J8: one entry of three through H2F-PROC-COLO, listed for review, until J19 (E14) separates it.
4 examples: 4 pass, 0 fail, 0 not run
passJ18 joins the three colonoscopies in one entry, though J8 judged two of them different
Example: J18 joins the three colonoscopies in one entry, though J8 judged two of them different
When the pod is read as it stood after "E13"
Then the procedures view holds these entries:
| members |
| H1-PROC-COLO, H2O-PROC-COLO, H2F-PROC-COLO |
passthe pair judged different shares an entry, which lists it for review
Example: the pair judged different shares an entry, which lists it for review
When the pod is read as it stood after "E13"
When the query is:
"""
SELECT ?record ?otherRecord WHERE {
?record cascade:currentlyDifferent ?otherRecord ; cascade:inEntry ?entry .
?otherRecord cascade:inEntry ?entry .
FILTER (STR(?record) < STR(?otherRecord))
}
"""
Then it answers:
| record | otherRecord |
| H2O-PROC-COLO | H1-PROC-COLO |
passJ19 judges H1-PROC-COLO and H2F-PROC-COLO different, and H1-PROC-COLO stands alone
Example: J19 judges H1-PROC-COLO and H2F-PROC-COLO different, and H1-PROC-COLO stands alone
When the pod is read as it stood after "J24"
Then the procedures view holds these entries:
| members |
| H1-PROC-COLO |
| H2O-PROC-COLO, H2F-PROC-COLO |
passno pair judged different shares an entry
Example: no pair judged different shares an entry
When the pod is read as it stood after "J24"
When the query is:
"""
SELECT ?record ?otherRecord WHERE {
?record cascade:currentlyDifferent ?otherRecord ; cascade:inEntry ?entry .
?otherRecord cascade:inEntry ?entry .
FILTER (STR(?record) < STR(?otherRecord))
}
"""
Then it answers nothing
P21. A person's and a machine's Same overlapping
J9 (Alex's) and J13 (the matcher's) share a sulfa record: one group of three. H2F-ALG-SULFA matched both records J9 joined, so J13 holds it and the least of them, H1-ALG-SULFA (M5).
2 examples: 2 pass, 0 fail, 0 not run
passJ9 and J13 share a record and make one entry of the three
Example: J9 and J13 share a record and make one entry of the three
When the pod is read as it stood after "E13"
Then the allergies view holds these entries:
| members |
| H1-ALG-SULFA, H2O-ALG-SULFA, H2F-ALG-SULFA |
passJ9 and J13 both count
Example: J9 and J13 both count When the pod is read as it stood after "E13" Then J9 counts And the matcher's same code of H1-ALG-SULFA and H2F-ALG-SULFA counts
P22. A person's mistaken Same hides a status
J10 (E8) joins resolved bronchitis with active asthma: the joined entry shows resolved, from the most recent arrival, until E13 brings active asthma and J20 retracts J10.
3 examples: 3 pass, 0 fail, 0 not run
passJ10 joins H1-CON-BRONCH and H2O-CON-ASTHMA, and their entry shows H1-CON-BRONCH's resolved status
Example: J10 joins H1-CON-BRONCH and H2O-CON-ASTHMA, and their entry shows H1-CON-BRONCH's resolved status
When the pod is read as it stood after "J10"
Then the conditions view holds these entries:
| members |
| H1-CON-BRONCH, H2O-CON-ASTHMA |
And the entry of H1-CON-BRONCH shows:
| field | value |
| status | resolved |
| status from | H1-CON-BRONCH |
passJ16 adds H2F-CON-ASTHMA, the latest arrival, whose active status the entry now shows
Example: J16 adds H2F-CON-ASTHMA, the latest arrival, whose active status the entry now shows
When the pod is read as it stood after "E13"
Then the conditions view holds these entries:
| members |
| H1-CON-BRONCH, H2O-CON-ASTHMA, H2F-CON-ASTHMA |
And the entry of H1-CON-BRONCH shows:
| field | value |
| status | active |
| status from | H2F-CON-ASTHMA |
passonce J20 retracts J10, the asthma entry is active and H1-CON-BRONCH's own entry resolved
Example: once J20 retracts J10, the asthma entry is active and H1-CON-BRONCH's own entry resolved
When the pod is read as it stood after "J24"
Then the conditions view holds these entries:
| members |
| H1-CON-BRONCH |
| H2O-CON-ASTHMA, H2F-CON-ASTHMA |
And the entry of H1-CON-BRONCH shows:
| field | value |
| status | resolved |
| status from | H1-CON-BRONCH |
And the entry of H2O-CON-ASTHMA shows:
| field | value |
| status | active |
| status from | H2F-CON-ASTHMA |
P23. An unchanged record arriving again is not received again
H1-ALG-PCN is in x-e4, x-e6, x-e10, x-e12 and x-e15: most recently received still dates it from E2.
1 example: 1 pass, 0 fail, 0 not run
passH1-ALG-PCN, unchanged in every later export, has one revision, from E2
Example: H1-ALG-PCN, unchanged in every later export, has one revision, from E2
Then H1-ALG-PCN has these revisions:
| arrived | version | after |
| 2026-09-01 at 10:00:04 | 1 | |
P24. The wrong patient: a family member's records imported as Alex's
Sam's proxy account is in x-e10; J22 (E10) claims his profile, and J23 retracts J22 (E14). From E10 to E13 H1P-PAT is a member of the patient view and Sam's allergy and two conditions are in Alex's views; from E14 none is in any view, under both lenses; nothing is changed or deleted, and no judgment names the import E10 wrote.
6 examples: 6 pass, 0 fail, 0 not run
passJ22 claims Sam's profile as Alex's: it joins her patient entry, and each of his records is an entry
Example: J22 claims Sam's profile as Alex's: it joins her patient entry, and each of his records is an entry
When the pod is read as it stood after "J22"
Then the patient-profile view holds these entries:
| members |
| H1-PAT, H2O-PAT, H1P-PAT |
And the allergies view holds these entries:
| members |
| H1P-ALG-AMOX |
And the conditions view holds these entries:
| members |
| H1P-CON-ECZEMA |
| H1P-CON-OTITIS |
passonce J23 retracts J22, none of Sam's four is in any view
Example: once J23 retracts J22, none of Sam's four is in any view When the pod is read as it stood after "J24" Then H1P-PAT, H1P-ALG-AMOX, H1P-CON-ECZEMA and H1P-CON-OTITIS are in no view
passthe patient view is one entry of H1-PAT, H2O-PAT and H2F-PAT
Example: the patient view is one entry of H1-PAT, H2O-PAT and H2F-PAT
When the pod is read as it stood after "J24"
Then the patient-profile view holds these entries:
| members |
| H1-PAT, H2O-PAT, H2F-PAT |
And the entry of H1-PAT shows only:
| field | value |
| type | PatientProfile |
passeach of Sam's three records is left out because no About that counts claims his profile
Example: each of Sam's three records is left out because no About that counts claims his profile
When the pod is read as it stood after "J24"
Then these records are in no view, for these reasons:
| record | reason | because |
| H1P-ALG-AMOX | its patient profile has no counting About | H1P-PAT |
| H1P-CON-ECZEMA | its patient profile has no counting About | H1P-PAT |
| H1P-CON-OTITIS | its patient profile has no counting About | H1P-PAT |
passJ22 no longer counts
Example: J22 no longer counts When the pod is read as it stood after "J24" Then J22 does not count
passevery RDF file E10 wrote is still in the pod, and no judgment names the import E10 wrote
Example: every RDF file E10 wrote is still in the pod, and no judgment names the import E10 wrote
When the query is:
"""
SELECT ?file ?judgment WHERE {
GRAPH <urn:cascade:steps> { <urn:cascade:step:E10> prov:generated ?file }
{ FILTER (!STRSTARTS(STR(?file), "https://pod.alex-rivera.example/attachments/"))
FILTER NOT EXISTS { GRAPH ?file { ?s ?p ?o } } }
UNION
{ GRAPH ?file { ?import a prov:Activity ; prov:used ?document }
?judgment a cascade:Judgment ; ?predicate ?import . }
}
"""
Then it answers nothing
P25. A record the patient says is wrong, which the source never corrects
H1-PROC-ECHO (E6) is judged Erroneous by J24 (E14), and x-e15 carries it unchanged (E15): out of every view from E14, under both lenses; still in the pod; x-e15 writes nothing for it.
4 examples: 4 pass, 0 fail, 0 not run
passbefore J24, H1-PROC-ECHO is an entry of its own
Example: before J24, H1-PROC-ECHO is an entry of its own
When the pod is read as it stood after "E13"
Then the procedures view holds these entries:
| members |
| H1-PROC-ECHO |
passJ24 judges H1-PROC-ECHO erroneous, and it is in no view, for that reason
Example: J24 judges H1-PROC-ECHO erroneous, and it is in no view, for that reason
When the pod is read as it stood after "J24"
Then these records are in no view, for these reasons:
| record | reason | because |
| H1-PROC-ECHO | judged erroneous | J24 |
passH1-PROC-ECHO is still a procedure, with its one version and one revision
Example: H1-PROC-ECHO is still a procedure, with its one version and one revision
Then H1-PROC-ECHO has these revisions:
| arrived | version | after |
| 2026-11-20 at 09:00:04 | 1 | |
And these records have:
| record | field | value |
| H1-PROC-ECHO | kind | procedure |
passno file E15 wrote names H1-PROC-ECHO, which x-e15 resends unchanged
Example: no file E15 wrote names H1-PROC-ECHO, which x-e15 resends unchanged Then no file that "E15" wrote names H1-PROC-ECHO
The scenario's other outcomes
8 examples: 8 pass, 0 fail, 0 not run
passE5 writes J3 and J5 to J7 as the scenario gives them, and the reference descriptions it was the first to use
Example: E5 writes J3 and J5 to J7 as the scenario gives them, and the reference descriptions it was the first to use
Then "E5" wrote these matcher judgments:
| justification | members | asserted under | used | name |
| same code | H1-ALG-SULFA, H2O-ALG-SULFA | Matcher rules version 19 | version 1 of H1-ALG-SULFA, version 1 of H2O-ALG-SULFA | urn:uuid:761cfeb7-6da9-89ca-b552-4d9256e93019 |
| same code and period | H1-CON-HTN, H2O-CON-HTN | Matcher rules version 19 | version 1 of H1-CON-HTN, version 1 of H2O-CON-HTN | urn:uuid:cb7659bb-04c3-8e0e-a8c6-c90f48afb547 |
| same code and date | H1-IMM-FLU25, H2O-IMM-FLU25 | Matcher rules version 19 | version 1 of H1-IMM-FLU25, version 1 of H2O-IMM-FLU25 | urn:uuid:30cdc218-6a03-8a37-b582-c67b80eac626 |
| same code | H1-PROC-COLO, H2O-PROC-COLO | Matcher rules version 19 | version 1 of H1-PROC-COLO, version 1 of H2O-PROC-COLO | urn:uuid:b889c1e2-5260-8ceb-a27e-ccb207039868 |
And "E5" wrote these reference descriptions:
| reference |
| Matcher rules |
| Matcher rules version 19 |
passE13 writes J13 to J18 as the scenario gives them, and the reference descriptions it was the first to use
Example: E13 writes J13 to J18 as the scenario gives them, and the reference descriptions it was the first to use
Then "E13" wrote these matcher judgments:
| justification | members | asserted under | used | name |
| same code | H1-ALG-SULFA, H2F-ALG-SULFA | Matcher rules version 19 | version 2 of H1-ALG-SULFA, version 1 of H2F-ALG-SULFA | urn:uuid:ee6f88c0-7e89-8fd0-89b7-2624d2daff06 |
| same code | H2O-ALG-PCN, H2F-ALG-PCN | Matcher rules version 19 | version 1 of H2O-ALG-PCN, version 1 of H2F-ALG-PCN | urn:uuid:5f006452-83ab-856c-a0d5-32ee8b182d40 |
| same code and period | H1-CON-HTN, H2F-CON-HTN | Matcher rules version 19 | version 1 of H1-CON-HTN, version 1 of H2F-CON-HTN | urn:uuid:b7866e26-26a3-84e7-be03-3414d2f61d86 |
| same code and period | H2O-CON-ASTHMA, H2F-CON-ASTHMA | Matcher rules version 19 | version 1 of H2O-CON-ASTHMA, version 1 of H2F-CON-ASTHMA | urn:uuid:128da4fd-8ba4-82b2-9709-2e27adec459b |
| same mapped code and date | H1-IMM-FLU25, H2F-IMM-FLU25 | Matcher rules version 19 | CVX vaccine group table version 2026-08, version 1 of H1-IMM-FLU25, version 1 of H2F-IMM-FLU25 | urn:uuid:1fde2b84-7510-8f6d-939c-b904952d6072 |
| same code | H1-PROC-COLO, H2O-PROC-COLO, H2F-PROC-COLO | Matcher rules version 19 | version 1 of H1-PROC-COLO, version 1 of H2O-PROC-COLO, version 1 of H2F-PROC-COLO | urn:uuid:441ab5d9-5359-80f1-9102-ea2b69e635f1 |
And "E13" wrote these reference descriptions:
| reference |
| CVX vaccine group table |
| CVX vaccine group table version 2026-08 |
passthe other matcher runs write nothing
Example: the other matcher runs write nothing Then "M5", "M6", "M7", "M3" and "M8" wrote no file
passeach import and entry writes the scenario's numbers of records, versions, revisions, documents and activities
Example: each import and entry writes the scenario's numbers of records, versions, revisions, documents and activities
When the query is:
"""
SELECT ?step (COUNT(DISTINCT ?record) AS ?records) (COUNT(DISTINCT ?version) AS ?versions)
(COUNT(DISTINCT ?revision) AS ?revisions) (COUNT(DISTINCT ?document) AS ?documents)
(COUNT(DISTINCT ?import) AS ?imports) (COUNT(DISTINCT ?session) AS ?sessions)
WHERE {
GRAPH <urn:cascade:steps> { ?step prov:generated ?file }
{ GRAPH ?file { ?record a ?kind } ?record a cascade:Record }
UNION { GRAPH ?file { ?version prov:specializationOf ?versioned } ?versioned a cascade:Record }
UNION { GRAPH ?file { ?revision a cascade:Revision } }
UNION { GRAPH ?file { ?document a prov:Entity } FILTER NOT EXISTS { ?document prov:specializationOf ?series } }
UNION { GRAPH ?file { ?import a prov:Activity ; prov:used ?used } }
UNION { GRAPH ?file { ?session a prov:Activity } FILTER NOT EXISTS { ?session prov:used ?used }
FILTER NOT EXISTS { ?session a cascade:MatcherRun }
FILTER NOT EXISTS { ?session prov:invalidated ?retracted } }
}
GROUP BY ?step
"""
Then it answers:
| step | records | versions | revisions | documents | imports | sessions |
| <urn:cascade:step:E2> | 9 | 9 | 9 | 9 | 1 | 0 |
| <urn:cascade:step:E3> | 1 | 1 | 1 | 0 | 0 | 1 |
| <urn:cascade:step:E4> | 6 | 6 | 6 | 6 | 1 | 0 |
| <urn:cascade:step:E6> | 2 | 7 | 7 | 8 | 1 | 0 |
| <urn:cascade:step:E10> | 3 | 3 | 3 | 3 | 1 | 0 |
| <urn:cascade:step:E12> | 6 | 6 | 6 | 6 | 1 | 0 |
| <urn:cascade:step:E15> | 0 | 0 | 1 | 1 | 1 | 0 |
passeach of the 27 records has the scenario's numbers of versions and revisions
Example: each of the 27 records has the scenario's numbers of versions and revisions
When the query is:
"""
SELECT ?record (COUNT(DISTINCT ?version) AS ?versions) (COUNT(DISTINCT ?revision) AS ?revisions) WHERE {
?revision cascade:revisionOf ?record ; cascade:version ?version .
}
GROUP BY ?record
"""
Then it answers:
| record | versions | revisions |
| APP-ALG-PEANUT | 1 | 1 |
| H1-ALG-CODEINE | 2 | 2 |
| H1-ALG-LATEX | 2 | 2 |
| H1-ALG-PCN | 1 | 1 |
| H1-ALG-SULFA | 2 | 2 |
| H1-CON-BACK | 2 | 3 |
| H1-CON-BRONCH | 2 | 2 |
| H1-CON-HTN | 1 | 1 |
| H1-IMM-FLU25 | 1 | 1 |
| H1-PROC-COLO | 1 | 1 |
| H1-PROC-ECHO | 1 | 1 |
| H1P-ALG-AMOX | 1 | 1 |
| H1P-CON-ECZEMA | 1 | 1 |
| H1P-CON-OTITIS | 1 | 1 |
| H2F-ALG-PCN | 1 | 1 |
| H2F-ALG-SULFA | 1 | 1 |
| H2F-CON-ASTHMA | 1 | 1 |
| H2F-CON-HTN | 1 | 1 |
| H2F-IMM-FLU25 | 1 | 1 |
| H2F-PROC-COLO | 1 | 1 |
| H2O-ALG-PCN | 1 | 1 |
| H2O-ALG-SULFA | 1 | 1 |
| H2O-CON-ASTHMA | 1 | 1 |
| H2O-CON-HTN | 1 | 1 |
| H2O-IMM-FLU25 | 1 | 1 |
| H2O-PROC-COLO | 1 | 1 |
| U-IMM-TDAP | 1 | 1 |
passeach view and the labels file used the reference versions current at the end, and nothing else
Example: each view and the labels file used the reference versions current at the end, and nothing else
When the query is:
"""
SELECT ?view ?used WHERE {
GRAPH ?view { ?view a cascade:View ; prov:wasDerivedFrom ?used }
}
"""
Then it answers:
| view | used |
| <https://pod.alex-rivera.example/clinical/allergies.ttl> | Matcher rules version 19 |
| <https://pod.alex-rivera.example/clinical/allergies.ttl> | CVX vaccine group table version 2026-08 |
| <https://pod.alex-rivera.example/clinical/conditions.ttl> | Matcher rules version 19 |
| <https://pod.alex-rivera.example/clinical/conditions.ttl> | CVX vaccine group table version 2026-08 |
| <https://pod.alex-rivera.example/clinical/immunizations.ttl> | Matcher rules version 19 |
| <https://pod.alex-rivera.example/clinical/immunizations.ttl> | CVX vaccine group table version 2026-08 |
| <https://pod.alex-rivera.example/clinical/procedures.ttl> | Matcher rules version 19 |
| <https://pod.alex-rivera.example/clinical/procedures.ttl> | CVX vaccine group table version 2026-08 |
| <https://pod.alex-rivera.example/clinical/patient-profile.ttl> | Matcher rules version 19 |
| <https://pod.alex-rivera.example/clinical/patient-profile.ttl> | CVX vaccine group table version 2026-08 |
| <https://pod.alex-rivera.example/clinical/labels.ttl> | Matcher rules version 19 |
| <https://pod.alex-rivera.example/clinical/labels.ttl> | CVX vaccine group table version 2026-08 |
passthe labels file gives each other thing one label, and states of itself only that it is a view and what it used
Example: the labels file gives each other thing one label, and states of itself only that it is a view and what it used
When the query is:
"""
SELECT ?thing ?predicate WHERE {
GRAPH <https://pod.alex-rivera.example/clinical/labels.ttl> {
{ ?thing rdfs:label ?one , ?other . FILTER (?one != ?other) BIND (rdfs:label AS ?predicate) }
UNION
{ ?thing ?predicate ?value .
FILTER (IF(?thing = <https://pod.alex-rivera.example/clinical/labels.ttl>, ?predicate NOT IN (rdf:type, prov:wasDerivedFrom), ?predicate != rdfs:label)) }
}
}
"""
Then it answers nothing
passno two things share a label
Example: no two things share a label
When the query is:
"""
SELECT ?label WHERE {
GRAPH <https://pod.alex-rivera.example/clinical/labels.ttl> { ?one rdfs:label ?label . ?other rdfs:label ?label . FILTER (?one != ?other) }
}
"""
Then it answers nothing