Named question about entry
What it shows
What each entry shows: every value its view states of it and every value its members' current versions state of the fields the view shows, each with From, the member whose current version states it, and Lead, whether that member is the entry's lead (cascade:leadMember), whose values come first. An entry is what an app shows: one allergy, one condition, one vaccination; no merged record is stored, so the view holds each member's current values as a node of its own (cascade:memberCurrentValues) and this reads the view alone. The view takes the entry's name and codes from its lead, and its status and dates from the members the derivations chose for them (cascade:statusFrom, cascade:dateFrom and, for a medication, cascade:medicationUseStartDateFrom, cascade:prescriptionWrittenDateFrom and cascade:dosageFrom, and for an allergy cascade:allergyCategoryFrom and cascade:onsetDateFrom). A value no member states, such as the highest criticality among them, has no From. A padded time is shown as the time, and a reference range as its text, its bounds being nodes of the view of their own; the node saying a time was written short of the second is no value of its own.
The query
PREFIX cascade: <https://ns.cascadeprotocol.org/cascade#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?entry ?entryLabel ?view ?field ?value ?valueLabel ?from ?fromLabel ?lead
WHERE {
{ GRAPH ?view { ?entry cascade:entryMember [] ; cascade:leadMember ?leader ; cascade:memberCurrentValues ?values .
?values cascade:valuesOfMember ?from ; ?field ?value .
FILTER (?field NOT IN (cascade:valuesOfMember, cascade:paddedDateTime, cascade:referenceRangeLow, cascade:referenceRangeHigh)) }
BIND (?from = ?leader AS ?lead)
OPTIONAL { ?from rdfs:label ?fromLabel }
OPTIONAL { ?entry rdfs:label ?entryLabel }
OPTIONAL { ?value rdfs:label ?valueLabel } }
UNION
{ GRAPH ?view { ?entry cascade:entryMember [] ; ?field ?value
FILTER (?field NOT IN (cascade:memberCurrentValues, cascade:paddedDateTime, cascade:referenceRangeLow, cascade:referenceRangeHigh))
FILTER NOT EXISTS { ?entry cascade:memberCurrentValues ?held . ?held ?field ?value } }
OPTIONAL { ?entry rdfs:label ?entryLabel }
OPTIONAL { ?value rdfs:label ?valueLabel } }
}
ORDER BY ?entryLabel ?entry ?field DESC(?lead) STR(?value) ?from
Terms it reads
cascade:entryMember · cascade:leadMember · cascade:memberCurrentValues · cascade:paddedDateTime · cascade:referenceRangeHigh · cascade:referenceRangeLow · cascade:valuesOfMember · rdfs:label
Rules and decision notes that name it
- C6. An entry shows every member, its lead's first runtime/currency.feature
- Check 2. Each final view equals expected/ runtime/the-kit.feature
Its rows on Alex Rivera's pod
The first 10 of 163 rows, as Alex Rivera's explorer shows them. Every row of every question is in answers.json.
| entry | view | field | value | from | lead |
|---|---|---|---|---|---|
| Allergy entry · Latex | https:/ | rdf:type | cascade:AllergyOrIntolerance | ||
| Allergy entry · Latex | https:/ | cascade:allergenCode | http:/ | Allergy · Latex · Meridian Health System · alg-latex-1 | true |
| Allergy entry · Latex | https:/ | cascade:allergenName | Latex | Allergy · Latex · Meridian Health System · alg-latex-1 | true |
| Allergy entry · Latex | https:/ | cascade:allergyCategory | environment | Allergy · Latex · Meridian Health System · alg-latex-1 | true |
| Allergy entry · Latex | https:/ | cascade:allergyCriticality | low | Allergy · Latex · Meridian Health System · alg-latex-1 | true |
| Allergy entry · Latex | https:/ | cascade:clinicalStatus | active | Allergy · Latex · Meridian Health System · alg-latex-1 | true |
| Allergy entry · Latex | https:/ | cascade:entryMember | Allergy · Latex · Meridian Health System · alg-latex-1 | ||
| Allergy entry · Latex | https:/ | cascade:leadMember | Allergy · Latex · Meridian Health System · alg-latex-1 | ||
| Allergy entry · Latex | https:/ | cascade:reactionManifestationText | Contact dermatitis | Allergy · Latex · Meridian Health System · alg-latex-1 | true |
| Allergy entry · Latex | https:/ | cascade:statusFrom | Allergy · Latex · Meridian Health System · alg-latex-1 |