Skip to content
Alpha · We're looking for development partners. Build with us →
Menu

Profile

Patient profile · St Columba's Hospital · first received 2026-10-13

urn:uuid:62c7bb5a-1d8d-81b1-aed2-3770124e6ef2

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.

?file?named?rebuilt
records/patient-profile/62/62c7bb5a-1d8d-81b1-aed2-3770124e6ef2.ttlfalsefalse
judgments/5d/5dac6796-039c-47e9-874b-768b738e5dfd.ttltruefalse
records/conditions/6d/6d000913127596954bb1b503b99b1d880deb541cb145bbdb18b593db42a9a481.ttltruefalse
records/conditions/ad/adcb1df8d657e6192be6a8829cc9fc6d552d85bcf1b71d35099cbc7768d24e8d.ttltruefalse
records/medications/00/001496c2944d9b7762ae558cf215bb164726bcfcf20d2ae00b085eae27d5f9f3.ttltruefalse
records/medications/12/12a5c544e86223987685594ecf97208601205cc2d8560b6d80817b40a2737553.ttltruefalse
records/patient-profile/1e/1e9065d0c20402a74955f5ea5a14b9aa844cadce306bb087a589bc85d351b7ee.ttltruefalse
records/patient-profile/f1/f1204ad57823cd16d604783b58cf1d40640027515dea2300a80057e6c69f7f53.ttltruefalse
records/procedures/1d/1d06328f25ea3e64284b6ee226403eed48ffa0feec942a5aabda3bfb20f5ae67.ttltruefalse
records/reports/2a/2acd16f1be429fb6987e18146e2e652c0203e7b9f9fd5bf30fe1c3ce7836a523.ttltruefalse
records/variant-interpretations/3c/3c0e0af8024edea9d507a48a7ea285d303231f6d7fa97b8c5b4a6195a8ee3773.ttltruefalse
records/variant-interpretations/7c/7c21cbef1c57d8958b1261bf196be68c97eca40290ccb5d0e60a6a7c646617de.ttltruefalse
records/variant-interpretations/ea/ea286197a9e7eeef77b0e22226aea9052c778d6f0012c9277f687696209745b5.ttltruefalse
records/variants/d6/d67840d38c3988d5e624bd1d61e3a0d840a4b6e259405f59c4e9622d42292658.ttltruefalse
records/variants/db/dbef20d858433f0dfbd97316502ec68fe0ce1c658c59c5a23f18176112338cd1.ttltruefalse
records/variants/f8/f884398ace15c7e4f6a7929be00e1c0651512913adc7de030f7f53994175f9a8.ttltruefalse
clinical/labels.ttlfalsetrue
clinical/patient-profile.ttl pagetruetrue

18 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 -- martin-okafor "pod/Which file states each thing"

It prints the rows for every thing; this block keeps those whose ?thing is urn:uuid:62c7bb5a-1d8d-81b1-aed2-3770124e6ef2.

Or in GraphDB, open the saved query pod/Which file states each thing in the repository martin-okafor.

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
2026-10-13 09:20 UTCAbout · the patient · 2026-10-13 · a patient profile Turtleabout cascade:Abouttrue

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 -- martin-okafor "profile/Which judgments name it"

It prints the rows for every profile; this block keeps those whose ?profile is urn:uuid:62c7bb5a-1d8d-81b1-aed2-3770124e6ef2.

Or in GraphDB, open the saved query profile/Which judgments name it in the repository martin-okafor.

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.

12 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 -- martin-okafor "profile/Which records name it"

It prints the rows for every profile; this block keeps those whose ?profile is urn:uuid:62c7bb5a-1d8d-81b1-aed2-3770124e6ef2.

Or in GraphDB, open the saved query profile/Which records name it in the repository martin-okafor.

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 abouttrueAbout · the patient · 2026-10-13 · a patient profile TurtleSt Columba's Hospital12

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 -- martin-okafor "profile/Whose it is counted as"

It prints the rows for every profile; this block keeps those whose ?profile is urn:uuid:62c7bb5a-1d8d-81b1-aed2-3770124e6ef2.

Or in GraphDB, open the saved query profile/Whose it is counted as in the repository martin-okafor.