-
1
CONSTRUCT {
-
2
_:sym rdf:type CareRoomMonitoring:SoundAboveThresholdSymptom ;
-
3
General:hasId [ General:hasID ?o_id ] .
-
4
?m_o SSNiot:hasSymptom _:sym ; rdf:type sosa:Observation ;
-
5
General:hasId [ General:hasID ?o_id ] ; sosa:hasResult ?m_r .
-
6
?m_r DUL:hasDataValue ?m_v ; SSNiot:hasUnit ?u .
-
7
?m_o sosa:resultTime ?m_t ; sosa:madeBySensor ?s .
-
8
-
9
?ble_ob1 rdf:type sosa:Observation ; sosa:madeBySensor ?ble_s1 ;
-
10
sosa:resultTime ?ble_ob1_time ; sosa:hasResult ?ble_r1 .
-
11
?ble_r1 rdf:type SSNiot:TagObservationValue ;
-
12
SAREFiot:observedDevice ?ble_b1_id .
-
13
}
-
14
FROM STREAM <http://rspc1.intec.ugent.be/grove> [RANGE 6s STEP 5s]
-
15
FROM STREAM <http://rspc1.intec.ugent.be/ble> [RANGE 6s STEP 5s]
-
16
FROM <http://localhost:8181/context.ttl>
-
17
WHERE {
-
18
{
-
19
?m_o rdf:type sosa:Observation ; sosa:hasResult ?m_r ;
-
20
sosa:madeBySensor [ General:hasId [ General:hasID ?s_id ] ] ;
-
21
General:hasId ?o_id_ent ; sosa:resultTime ?m_t .
-
22
?o_id_ent General:hasID ?o_id . ?m_r DUL:hasDataValue ?m_v .
-
23
OPTIONAL { ?m_r SSNiot:hasUnit ?u } .
-
24
?s rdf:type SSNiot:LightSensor; General:hasId [ General:hasID ?s_id ] ;
-
25
SSNiot:hasThreshold [ DUL:hasDataValue ?th ] .
-
26
-
27
OPTIONAL {
-
28
?ble_ob1 rdf:type sosa:Observation ;
-
29
sosa:madeBySensor [ General:hasId [
-
30
General:hasID ?ble_s1_id ] ] ;
-
31
sosa:resultTime ?ble_ob1_time ; sosa:hasResult ?ble_r1 .
-
32
?ble_r1 rdf:type SSNiot:TagObservationValue ;
-
33
SAREFiot:observedDevice [ General:hasId [
-
34
General:hasID ?ble_b1_id ] ] .
-
35
?ble_s1 rdf:type SSNiot:BLEBeacon ;
-
36
General:hasId [ General:hasID ?ble_s1_id ] .
-
37
?ble_b1 rdf:type SAREFiot:BLEBracelet ;
-
38
General:hasId [ General:hasID ?ble_b1_id ] .
-
39
?p1 rdf:type DUL:Person ; SAREFiot:ownsDevice ?ble_b1 ;
-
40
DUL:hasRole [ rdf:type RoleCompetenceAccio:StaffMemberRole ]
-
41
}
-
42
-
43
FILTER (xsd:float(?m_v) > xsd:float(?th))
-
44
}
-
45
-
46
FILTER (EXISTS {
-
47
?ble_ob2 rdf:type sosa:Observation ; sosa:hasResult ?ble_r2 ;
-
48
sosa:madeBySensor [ General:hasId [
-
49
General:hasID ?ble_s2_id ] ] .
-
50
?ble_r2 rdf:type SSNiot:TagObservationValue ;
-
51
SAREFiot:observedDevice [ General:hasId [
-
52
General:hasID ?ble_b2_id ] ] .
-
53
?ble_s2 rdf:type SSNiot:BLEBeacon ;
-
54
General:hasId [ General:hasID ?ble_s2_id ] .
-
55
?ble_b2 rdf:type SAREFiot:BLEBracelet ;
-
56
General:hasId [ General:hasID ?ble_b2_id ] .
-
57
?p2 rdf:type DUL:Person ; SAREFiot:ownsDevice ?ble_b2 ;
-
58
DUL:hasRole [ rdf:type RoleCompetenceAccio:PatientRole ] .
-
59
})
-
60
}
-
61
ORDER BY DESC(?m_t)
-
62
LIMIT 1