David Leal

UoM mapping to RDL

......@@ -11,14 +11,14 @@
<http://www.reportinghub.no/ep/transform/transform-helper-schema>
rdf:type owl:Ontology ;
rdfs:comment "The Transform Helper Schema is the set of properties and classes used for the creation of temporary data used as part of the ERH transformations. All instances of classes and uses of these properties is deleted before the triples are stored in the RDF database."^^xsd:string ;
owl:imports <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.epim.no/schemas/mprml/1> ;
owl:imports <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/schema/1.0/activity> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
transhelp:derivedFrom
rdf:type owl:ObjectProperty .
transhelp:facilityIdentifier
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:forComment
rdf:type owl:ObjectProperty ;
......@@ -30,30 +30,35 @@ transhelp:hasDerivedText
rdf:type owl:DatatypeProperty .
transhelp:interval
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:intervalEnd
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:intervalIdentifier
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:intervalStart
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:label
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:mapsTo
rdf:type rdf:Property .
transhelp:materialClassMapsToMPREnumeration
rdf:type owl:ObjectProperty , owl:InverseFunctionalProperty , owl:FunctionalProperty ;
rdf:type owl:FunctionalProperty , owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdfs:label "material class maps to MPR enumeration"^^xsd:string ;
rdfs:subPropertyOf transhelp:mapsTo .
transhelp:nominalInstant
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:quantitySpaceMapsToClassOfScale
rdf:type owl:FunctionalProperty , owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdfs:label "quantity space maps to class of scale"^^xsd:string ;
rdfs:subPropertyOf transhelp:mapsTo .
transhelp:standardTempPres
rdf:type rdf:Property ;
......
# baseURI: http://www.reportinghub.no/refdata/transform/quantityToClassOfScaleMap
# imports: http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003
# imports: http://rds.posccaesar.org/2008/06/OWL/RDL
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/transform/transform-helper-schema
@prefix : <http://www.reportinghub.no/refdata/transform/quantityToClassOfScaleMap#> .
@prefix RDL: <http://rds.posccaesar.org/2008/06/OWL/RDL#> .
@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 transhelp: <http://www.reportinghub.no/ep/transform/transform-helper-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.reportinghub.no/ep/schema/core#Area>
transhelp:quantitySpaceMapsToClassOfScale
RDL:RDS1054511091 .
<http://www.reportinghub.no/ep/schema/core#Density>
transhelp:quantitySpaceMapsToClassOfScale
RDL:RDS1354352791 .
<http://www.reportinghub.no/ep/schema/core#Length>
transhelp:quantitySpaceMapsToClassOfScale
RDL:RDS1355222971 .
<http://www.reportinghub.no/ep/schema/core#Mass>
transhelp:quantitySpaceMapsToClassOfScale
RDL:RDS1358660531 .
<http://www.reportinghub.no/ep/schema/core#PlaneAngle>
transhelp:quantitySpaceMapsToClassOfScale
RDL:RDS1354272171 .
<http://www.reportinghub.no/ep/schema/core#Power>
transhelp:quantitySpaceMapsToClassOfScale
RDL:RDS1358697161 .
<http://www.reportinghub.no/ep/schema/core#Pressure>
transhelp:quantitySpaceMapsToClassOfScale
RDL:RDS1359461141 .
<http://www.reportinghub.no/ep/schema/core#Temperature>
transhelp:quantitySpaceMapsToClassOfScale
RDL:RDS1054571911 .
<http://www.reportinghub.no/ep/schema/core#TimeDuration>
transhelp:quantitySpaceMapsToClassOfScale
RDL:RDS1370654931 .
<http://www.reportinghub.no/ep/schema/core#Velocity>
transhelp:quantitySpaceMapsToClassOfScale
RDL:RDS1406985181 .
<http://www.reportinghub.no/ep/schema/core#Volume>
transhelp:quantitySpaceMapsToClassOfScale
RDL:RDS1369330550 .
<http://www.reportinghub.no/ep/schema/core#VolumetricFlowRate>
transhelp:quantitySpaceMapsToClassOfScale
RDL:RDS1359698151 .
<http://www.reportinghub.no/refdata/transform/quantityToClassOfScaleMap>
rdf:type owl:Ontology ;
owl:imports <http://rds.posccaesar.org/2008/06/OWL/RDL> , <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
# baseURI: http://www.reportinghub.no/refdata/transform/uomprop2rd
# imports: http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003
# imports: http://rds.posccaesar.org/2008/06/OWL/RDL
# 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
# imports: http://www.reportinghub.no/ep/transform/transform-helper-schema
# imports: http://www.reportinghub.no/refdata/transform/quantityToClassOfScaleMap
@prefix : <http://www.reportinghub.no/refdata/transform/uomprop2rd#> .
@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 pca-dm: <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#> .
@prefix quantityToClassOfScaleMap: <http://www.reportinghub.no/refdata/transform/quantityToClassOfScaleMap#> .
@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#> .
......@@ -21,13 +25,104 @@
<http://www.reportinghub.no/refdata/transform/uomprop2rd>
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:imports <http://rds.posccaesar.org/2008/06/OWL/RDL> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.reportinghub.no/ep/schema/1.0/drilling> , <http://spinrdf.org/spin> , <http://rds.posccaesar.org/2008/06/OWL/RDL-annotations> , <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003> , <http://www.reportinghub.no/refdata/transform/quantityToClassOfScaleMap> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
owl:DatatypeProperty
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0340 Set URI and designation for EHR RD from Datatype Property that ARE UoM"^^xsd:string ;
rdfs:comment "0341 Set the domain and classification"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "rdDomain"^^xsd:string
] ;
sp:predicate pca-dm:hasDomain ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object pca-dm:Classification ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "clsncuri"^^xsd:string
]
] [ sp:object
[ sp:varName "classOfScale"^^xsd:string
] ;
sp:predicate pca-dm:hasClassifier ;
sp:subject
[ sp:varName "clsncuri"^^xsd:string
]
] [ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate pca-dm:hasClassified ;
sp:subject
[ sp:varName "clsncuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00000> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "clsncuri"^^xsd:string
]
]) ;
sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/core#Scale> ;
sp:predicate rdf:type ;
sp:subject spin:_this
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object
[ sp:varName "domain"^^xsd:string
] ;
sp:predicate rdfs:domain ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "rdDomain"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject
[ sp:varName "domain"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "classOfScale"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#quantitySpaceMapsToClassOfScale> ;
sp:subject
[ sp:varName "domain"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:generateUUID
] ;
sp:variable
[ sp:varName "clsnuuid"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "ERH" ;
sp:arg2 [ sp:varName "clsnuuid"^^xsd:string
]
] ;
sp:variable
[ sp:varName "clsnid"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:buildURI ;
sp:arg1 "<http://posccaesar.org/rdl/{?clsnid}>"
] ;
sp:variable
[ sp:varName "clsncuri"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0340a Set URI and designation for EHR RD from Datatype Property that ARE UoM - no label"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
......@@ -47,11 +142,21 @@ owl:DatatypeProperty
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object ISO-15926-2_2003:Scale ;
] [ sp:object pca-dm:Scale ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object "Scale imported from the EPIM schema - no label" ;
sp:predicate <http://posccaesar.org/rdl/hasNoteAdmin> ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
]) ;
sp:where ([ rdf:type sp:NotExists ;
sp:elements ([ sp:object
......@@ -62,7 +167,7 @@ owl:DatatypeProperty
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "seerd"^^xsd:string
[ sp:varName "seeReferenceData"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#seeReferenceData> ;
sp:subject spin:_this
......@@ -70,6 +175,46 @@ owl:DatatypeProperty
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Scale> ;
sp:predicate rdf:type ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ 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 "no label"
] ;
sp:variable
[ sp:varName "desigation"^^xsd:string
]
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:ne ;
......@@ -86,6 +231,114 @@ owl:DatatypeProperty
] ;
sp:arg2 "http://www.w3.org/2004/02/skos/core#"
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0342 Set the range - not Beaufort scale which has an integer range"^^xsd:string ;
sp:templates ([ sp:object <http://rds.posccaesar.org/2008/06/OWL/RDL#RDS999900710> ;
sp:predicate pca-dm:hasCodomain ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
]) ;
sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/core#Scale> ;
sp:predicate rdf:type ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object "Beaufort scale number" ;
sp:predicate rdfs:label ;
sp:subject spin:_this
])
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0340 Set URI and designation for EHR RD from Datatype Property that ARE 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 "pcaid"^^xsd:string
] ;
sp:predicate <http://posccaesar.org/rdl/hasIdPCA> ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object pca-dm:Scale ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object "Scale imported from the EPIM schema" ;
sp:predicate <http://posccaesar.org/rdl/hasNoteAdmin> ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00000> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object pca-dm:Classification ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "clsncuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00001> ;
sp:predicate pca-dm:hasClassifier ;
sp:subject
[ sp:varName "clsncuri"^^xsd:string
]
] [ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate pca-dm:hasClassified ;
sp:subject
[ sp:varName "clsncuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00000> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "clsncuri"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
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 "seeReferenceData"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#seeReferenceData> ;
sp:subject spin:_this
])
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Scale> ;
sp:predicate rdf:type ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "label"^^xsd:string
] ;
......@@ -125,5 +378,21 @@ owl:DatatypeProperty
sp:variable
[ sp:varName "desigation"^^xsd:string
]
] [ 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#"
]
])
] .
......
......@@ -12,5 +12,7 @@
[] rdf:type inference:Configuration ;
composite:child
[ rdf:type <http://spinrdf.org/spin#TopSPIN> ;
<http://spinrdf.org/spin#topSPINOptions>
"singlePass" ;
composite:index "0"^^xsd:int
] .
......