datprop2rd.ttl
7.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# baseURI: http://www.reportinghub.no/refdata/transform/datprop2rd
# imports: http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003
# imports: http://rds.posccaesar.org/2008/06/OWL/RDL-annotations
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/schema/1.0/drilling
@prefix : <http://www.reportinghub.no/refdata/transform/datprop2rd#> .
@prefix ISO-15926-2_2003: <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#> .
@prefix RDL-annotations: <http://rds.posccaesar.org/2008/06/OWL/RDL-annotations#> .
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> .
@prefix drilling: <http://www.reportinghub.no/ep/schema/1.0/drilling#> .
@prefix fn: <http://www.w3.org/2005/xpath-functions#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spif: <http://spinrdf.org/spif#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.reportinghub.no/refdata/transform/datprop2rd>
rdf:type owl:Ontology ;
owl:imports <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003> , <http://rds.posccaesar.org/2008/06/OWL/RDL-annotations> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/drilling> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
owl:DatatypeProperty
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0310 Set URI and designation for EHR RD from Datatype Property that are not UoM"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "desigation"^^xsd:string
] ;
sp:predicate <http://posccaesar.org/rdl/hasDesignation> ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object
[ sp:varName "definition"^^xsd:string
] ;
sp:predicate <http://posccaesar.org/rdl/hasDefinition> ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object
[ sp:varName "pcaid"^^xsd:string
] ;
sp:predicate <http://posccaesar.org/rdl/hasIdPCA> ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object ISO-15926-2_2003:ClassOfClassOfRepresentation ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
]) ;
sp:where ([ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "same"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "seerd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#seeReferenceData> ;
sp:subject spin:_this
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/core#Scale> ;
sp:predicate rdf:type ;
sp:subject spin:_this
])
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:ne ;
sp:arg1 [ rdf:type afn:namespace ;
sp:arg1 spin:_this
] ;
sp:arg2 "http://www.linkedmodel.org/schema/vaem#"
]
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:ne ;
sp:arg1 [ rdf:type afn:namespace ;
sp:arg1 spin:_this
] ;
sp:arg2 "http://www.w3.org/2004/02/skos/core#"
]
] [ sp:object
[ sp:varName "definition"^^xsd:string
] ;
sp:predicate rdfs:comment ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "label"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:generateUUID
] ;
sp:variable
[ sp:varName "uuid"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "ERH" ;
sp:arg2 [ sp:varName "uuid"^^xsd:string
]
] ;
sp:variable
[ sp:varName "pcaid"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:buildURI ;
sp:arg1 "<http://posccaesar.org/rdl/{?pcaid}>"
] ;
sp:variable
[ sp:varName "thisrduri"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:upper-case ;
sp:arg1 [ sp:varName "label"^^xsd:string
]
] ;
sp:variable
[ sp:varName "desigation"^^xsd:string
]
])
] .