Profile
Patient profile · Kestrel Harbor Hospital · first received 2025-04-03
urn:uuid:2ac2622d-c327-8f8b-ad3b-c818bbda69f2
A patient profile is how one hospital names the person. Each record names a profile as its patient, and an About judgment says whose the profile is. Until one counts, the records naming it stay out of every view.
Every section below is one question with only the rows about this profile. The first lists the files of the pod that say something about it or name it. A Turtle link beside a thing opens the file it arrived in; a thing only ever named, or written by the build, has none.
Which file states each thing
The store loads each file twice: into the default graph, which the other questions read, and into a graph named by its address, which GRAPH ?file reads. A file states a thing when it says something about it, or names it as the value of a statement: a patient profile has no file of its own, so the files that name it are where it is stated. Named marks a row for a file that names the thing, and rebuilt a view or the labels, which the build writes. Files the build did not write come first, and among them the file a thing arrived in, if it has one.
Only the rows whose ?thing is this one.
19 rows
The query: queries/questions/pod/Which file states each thing.rq on GitHub
PREFIX cascade: <https://ns.cascadeprotocol.org/cascade#>
PREFIX pim: <http://www.w3.org/ns/pim/space#>
SELECT DISTINCT ?thing ?file ?named ?rebuilt
WHERE {
{ { SELECT DISTINCT ?file ?thing
WHERE {
?owner pim:storage ?root .
GRAPH ?file { ?thing ?property ?value }
FILTER (isIRI(?thing) && STRSTARTS(STR(?file), STR(?root)))
} }
BIND (false AS ?named)
BIND (EXISTS { ?file a cascade:View } AS ?rebuilt) }
UNION
{ { SELECT DISTINCT ?file ?thing
WHERE {
?owner pim:storage ?root .
GRAPH ?file { ?subject ?property ?thing }
FILTER (isIRI(?thing) && STRSTARTS(STR(?file), STR(?root)))
} }
BIND (true AS ?named)
BIND (EXISTS { ?file a cascade:View } AS ?rebuilt) }
}
ORDER BY ?thing ?rebuilt ?named ?file
The terms it uses: pim:storage, cascade:View.
Run it yourself, from the runtime's root:
npm run ask -- priya-natarajan "pod/Which file states each thing"
It prints the rows for every thing; this block keeps those whose ?thing is
urn:uuid:2ac2622d-c327-8f8b-ad3b-c818bbda69f2.
Or in GraphDB, open the saved query pod/Which file states each thing in the repository priya-natarajan.
What needs review: none. The question
Which judgments name it
An About or a NotAbout judgment names a patient profile as its member and says whether it is the subject's; until an About counts that no counting NotAbout outranks, the records that name the profile are in no view. Rows come in the order the judgments were made.
Only the rows whose ?profile is this one.
| ?made | ?judgment | ?verdict | ?counts |
|---|---|---|---|
| 2025-04-03 09:20 UTC | About · the patient · 2025-04-03 · a patient profile Turtle | about cascade:About | true |
1 row
The query: queries/questions/profile/Which judgments name it.rq on GitHub
PREFIX cascade: <https://ns.cascadeprotocol.org/cascade#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?profile ?profileLabel ?made ?judgment ?judgmentLabel ?verdict ?counts
WHERE {
?version cascade:patient ?profile .
?judgment a cascade:Judgment ; prov:hadMember ?profile ; prov:generatedAtTime ?made .
OPTIONAL { ?judgment cascade:verdict ?verdict }
OPTIONAL { ?judgment cascade:countsUnderLens ?counted }
BIND (COALESCE(?counted, false) AS ?counts)
OPTIONAL { ?profile rdfs:label ?profileLabel }
OPTIONAL { ?judgment rdfs:label ?judgmentLabel }
}
ORDER BY ?profileLabel ?profile ?made ?judgment
The terms it uses: cascade:patient, cascade:Judgment, prov:hadMember, prov:generatedAtTime, cascade:verdict, cascade:countsUnderLens, rdfs:label.
Run it yourself, from the runtime's root:
npm run ask -- priya-natarajan "profile/Which judgments name it"
It prints the rows for every profile; this block keeps those whose ?profile is
urn:uuid:2ac2622d-c327-8f8b-ad3b-c818bbda69f2.
Or in GraphDB, open the saved query profile/Which judgments name it in the repository priya-natarajan.
Which records name it
A record names its patient through its current version's cascade:patient. Each hospital names its own profile for the person.
Only the rows whose ?profile is this one.
8 rows
The query: queries/questions/profile/Which records name it.rq on GitHub
PREFIX cascade: <https://ns.cascadeprotocol.org/cascade#>
PREFIX pav: <http://purl.org/pav/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?profile ?profileLabel ?record ?recordLabel
WHERE {
?record pav:hasCurrentVersion/cascade:patient ?profile .
OPTIONAL { ?profile rdfs:label ?profileLabel }
OPTIONAL { ?record rdfs:label ?recordLabel }
}
ORDER BY ?profileLabel ?profile ?recordLabel ?record
The terms it uses: pav:hasCurrentVersion, rdfs:label.
Run it yourself, from the runtime's root:
npm run ask -- priya-natarajan "profile/Which records name it"
It prints the rows for every profile; this block keeps those whose ?profile is
urn:uuid:2ac2622d-c327-8f8b-ad3b-c818bbda69f2.
Or in GraphDB, open the saved query profile/Which records name it in the repository priya-natarajan.
Whose it is counted as
About judgments say whose a patient profile is, and only one that counts is believed, while no counting NotAbout over the profile for that subject outranks it. Each row is one hospital whose records name the profile, with how many of them it sent. Records naming a profile no counting About judgment claims, or a counting NotAbout denies, stay out of every view.
Only the rows whose ?profile is this one.
| ?subject | ?counts | ?about | ?hospital | ?records |
|---|---|---|---|---|
| The person this pod is about Turtle | true | About · the patient · 2025-04-03 · a patient profile Turtle | Kestrel Harbor Hospital | 8 |
1 row
The query: queries/questions/profile/Whose it is counted as.rq on GitHub
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 ?profile ?profileLabel ?subject ?subjectLabel ?counts ?about ?aboutLabel ?hospital ?records
WHERE {
{ SELECT ?profile ?hospital (COUNT(DISTINCT ?record) AS ?records)
WHERE {
{ { SELECT DISTINCT ?document ?hospital
WHERE { ?document prov:wasAttributedTo/(rdfs:label|pav:hasCurrentVersion/foaf:name) ?hospital } }
?revision prov:wasDerivedFrom ?document ; cascade:version ?version .
?version cascade:patient ?profile ; prov:specializationOf ?record . }
UNION
{ ?version cascade:patient ?profile ; prov:specializationOf ?record .
MINUS { ?revision cascade:version ?version ;
prov:wasDerivedFrom/prov:wasAttributedTo/(rdfs:label|pav:hasCurrentVersion/foaf:name) ?hospital } } }
GROUP BY ?profile ?hospital
HAVING (BOUND(?profile)) }
?about a cascade:Judgment ; cascade:verdict cascade:About ; prov:hadMember ?profile ; cascade:subject ?subject .
OPTIONAL { ?about cascade:countsUnderLens ?counted }
BIND (COALESCE(?counted, false) && !EXISTS { ?denial cascade:countsUnderLens true ; cascade:verdict cascade:NotAbout ;
prov:hadMember ?profile ; cascade:subject ?subject }
AS ?counts)
OPTIONAL { ?profile rdfs:label ?profileLabel }
OPTIONAL { ?subject rdfs:label ?subjectLabel }
OPTIONAL { ?about rdfs:label ?aboutLabel }
}
ORDER BY ?profileLabel ?profile ?aboutLabel ?about ?hospital
The terms it uses: prov:wasAttributedTo, rdfs:label, pav:hasCurrentVersion, prov:wasDerivedFrom, cascade:version, cascade:patient, prov:specializationOf, cascade:Judgment, cascade:verdict, cascade:About, prov:hadMember, cascade:subject, cascade:countsUnderLens, cascade:NotAbout.
Run it yourself, from the runtime's root:
npm run ask -- priya-natarajan "profile/Whose it is counted as"
It prints the rows for every profile; this block keeps those whose ?profile is
urn:uuid:2ac2622d-c327-8f8b-ad3b-c818bbda69f2.
Or in GraphDB, open the saved query profile/Whose it is counted as in the repository priya-natarajan.