Named question about record
Its revisions, in the order they arrived
A revision is one arrival: it carries a version, which is the content, and names the document it was derived from. A version seen before is named again, not copied, and Current marks the revision the views read. ?arrived is the pod's clock; ?observed is when the source was observed saying the revision's state, and ?changed the source's own change time, the two clocks the ladder ranks by; a pull's document says the instant its source answered as of (?answeredAsOf).
The query
PREFIX cascade: <https://ns.cascadeprotocol.org/cascade#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX pav: <http://purl.org/pav/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?record ?recordLabel ?arrived ?observed ?changed ?revision ?revisionLabel ?current ?previous ?previousLabel
?version ?versionLabel ?change ?document ?documentLabel ?retrieved ?answeredAsOf ?hospital ?transmitter ?import
?importLabel ?started
WHERE {
{ SELECT ?version (MIN(?received) AS ?first)
WHERE { ?any cascade:version ?version ; prov:generatedAtTime ?received . }
GROUP BY ?version }
?revision cascade:revisionOf ?record ; cascade:version ?version ; prov:generatedAtTime ?arrived .
OPTIONAL { ?record cascade:currentRevision ?now }
BIND (COALESCE(?revision = ?now, false) AS ?current)
BIND (IF(?arrived = ?first, "a new version", "an earlier version again") AS ?change)
OPTIONAL { ?revision cascade:observedAsOf ?observed }
OPTIONAL { ?revision pav:lastUpdateOn ?changed }
OPTIONAL { ?revision rdfs:label ?revisionLabel }
OPTIONAL { ?record rdfs:label ?recordLabel }
OPTIONAL { ?version rdfs:label ?versionLabel }
OPTIONAL { ?revision prov:wasRevisionOf ?previous .
OPTIONAL { ?previous rdfs:label ?previousLabel } }
OPTIONAL { ?revision prov:wasDerivedFrom ?document .
OPTIONAL { ?document rdfs:label ?documentLabel }
OPTIONAL { ?document pav:retrievedOn ?retrieved }
OPTIONAL { ?document cascade:answeredAsOf ?answeredAsOf }
OPTIONAL { ?document prov:wasAttributedTo/(rdfs:label|pav:hasCurrentVersion/foaf:name) ?hospital }
OPTIONAL { ?document prov:wasGeneratedBy/prov:qualifiedAssociation ?sender .
?sender prov:hadRole ?transmitterRole ; prov:agent/rdfs:label ?transmitter
FILTER (?transmitterRole = cascade:TransmitterRole) } }
OPTIONAL { ?revision prov:wasGeneratedBy ?import .
OPTIONAL { ?import rdfs:label ?importLabel }
OPTIONAL { ?import prov:startedAtTime ?started } }
}
ORDER BY ?recordLabel ?record ?arrived ?revision ?document ?retrieved ?answeredAsOf ?hospital ?transmitter
Terms it reads
cascade:TransmitterRole · cascade:answeredAsOf · cascade:currentRevision · cascade:observedAsOf · cascade:revisionOf · cascade:version · pav:hasCurrentVersion · pav:lastUpdateOn · pav:retrievedOn · prov:agent · prov:generatedAtTime · prov:hadRole · prov:startedAtTime · prov:wasAttributedTo · prov:wasDerivedFrom · prov:wasGeneratedBy · prov:wasRevisionOf · rdfs:label
Rules and decision notes that name it
No rule or decision note writes its path.
Its rows on Alex Rivera's pod
The first 10 of 33 rows, as Alex Rivera's explorer shows them. Every row of every question is in answers.json.
| record | arrived | observed | changed | revision | current | version | change | document | retrieved | hospital | transmitter | import | started | previous |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Allergy · Amoxicillin · Meridian Health System · alg-amox-2 | 2027-02-10T17:21:00Z | 2027-02-10T17:19:00Z | 2027-01-28T16:00:00Z | Revision · Amoxicillin · alg-amox-2 · received 2027-02-10 | true | Allergy version · Amoxicillin · active · alg-amox-2 · first received 2027-02-10 | a new version | Document · Meridian Health System · AllergyIntolerance/ | 2027-02-10T17:19:00Z | Meridian Health System | Apple Health | Apple Health export | 2027-02-10T17:21:00Z | |
| Allergy · Codeine · Meridian Health System · alg-codeine-1 | 2026-09-01T10:00:04Z | 2026-09-01T10:00:00Z | 2026-04-08T13:05:00Z | Revision · Codeine · alg-codeine-1 · received 2026-09-01 | false | Allergy version · Codeine · active · alg-codeine-1 · first received 2026-09-01 | a new version | Document · Meridian Health System · AllergyIntolerance/ | 2026-09-01T10:00:00Z | Meridian Health System | Apple Health | Apple Health export | 2026-09-01T10:00:04Z | |
| Allergy · Codeine · Meridian Health System · alg-codeine-1 | 2026-11-20T09:00:04Z | 2026-11-20T09:00:00Z | 2026-11-18T09:45:00Z | Revision · Codeine · alg-codeine-1 · received 2026-11-20 | true | Allergy version · Codeine · entered-in-error · alg-codeine-1 · first received 2026-11-20 | a new version | Document · Meridian Health System · AllergyIntolerance/ | 2026-11-20T09:00:00Z | Meridian Health System | Apple Health | Apple Health export | 2026-11-20T09:00:04Z | Revision · Codeine · alg-codeine-1 · received 2026-09-01 |
| Allergy · Latex · Meridian Health System · alg-latex-1 | 2026-09-01T10:00:04Z | 2026-09-01T10:00:00Z | 2026-07-21T10:15:00Z | Revision · Latex · alg-latex-1 · received 2026-09-01 | false | Allergy version · Latex · active · alg-latex-1 · first received 2026-09-01 | a new version | Document · Meridian Health System · AllergyIntolerance/ | 2026-09-01T10:00:00Z | Meridian Health System | Apple Health | Apple Health export | 2026-09-01T10:00:04Z | |
| Allergy · Latex · Meridian Health System · alg-latex-1 | 2026-11-20T09:00:04Z | 2026-11-20T09:00:00Z | 2026-11-18T09:40:00Z | Revision · Latex · alg-latex-1 · received 2026-11-20 | true | Allergy version · Latex · active · alg-latex-1 · first received 2026-11-20 | a new version | Document · Meridian Health System · AllergyIntolerance/ | 2026-11-20T09:00:00Z | Meridian Health System | Apple Health | Apple Health export | 2026-11-20T09:00:04Z | Revision · Latex · alg-latex-1 · received 2026-09-01 |
| Allergy · Peanuts · own entry | 2026-09-01T18:30:00Z | 2026-09-01T18:30:00Z | Revision · Peanuts · own entry · received 2026-09-01 | true | Allergy version · Peanuts · criticality high · own entry · first received 2026-09-01 | a new version | entered by Alex in the Cascade app | 2026-09-01T18:30:00Z | ||||||
| Allergy · Penicillin G · Meridian Health System · alg-pcn-1 | 2026-09-01T10:00:04Z | 2026-09-01T10:00:00Z | 2026-02-10T12:00:00Z | Revision · Penicillin G · alg-pcn-1 · received 2026-09-01 | true | Allergy version · Penicillin G · active · alg-pcn-1 · first received 2026-09-01 | a new version | Document · Meridian Health System · AllergyIntolerance/ | 2026-09-01T10:00:00Z | Meridian Health System | Apple Health | Apple Health export | 2026-09-01T10:00:04Z | |
| Allergy · Penicillin · Larkspur Valley Health · al-8237461 | 2026-10-14T15:42:00Z | 2026-10-14T15:40:00Z | 2026-08-20T08:00:00Z | Revision · Penicillin · al-8237461 · received 2026-10-14 | true | Allergy version · Penicillin · active · al-8237461 · first received 2026-10-14 | a new version | Document · Larkspur Valley Health · AllergyIntolerance/ | 2026-10-14T15:40:00Z | Larkspur Valley Health | Apple Health | Apple Health export | 2026-10-14T15:42:00Z | |
| Allergy · Penicillin · Larkspur Valley Health · lv-alg-101 | 2027-03-18T12:00:04Z | 2027-03-18T12:00:00Z | 2027-03-01T00:00:00Z | Revision · Penicillin · lv-alg-101 · received 2027-03-18 | true | Allergy version · Penicillin · active · lv-alg-101 · first received 2027-03-18 | a new version | Document · Larkspur Valley Health · AllergyIntolerance/ | 2027-03-18T12:00:00Z | Larkspur Valley Health | Apple Health | Apple Health export | 2027-03-18T12:00:04Z | |
| Allergy · Sulfamethoxazole · Larkspur Valley Health · al-8237462 | 2026-10-14T15:42:00Z | 2026-10-14T15:40:00Z | 2026-08-20T08:00:00Z | Revision · Sulfamethoxazole · al-8237462 · received 2026-10-14 | true | Allergy version · Sulfamethoxazole · active · al-8237462 · first received 2026-10-14 | a new version | Document · Larkspur Valley Health · AllergyIntolerance/ | 2026-10-14T15:40:00Z | Larkspur Valley Health | Apple Health | Apple Health export | 2026-10-14T15:42:00Z |
queries/questions/record/Its revisions, in the order they arrived.rq on GitHub ↗