Closed dbooth-boston closed 1 year ago
Here is my candidate SPARQL update for transforming RDF lists to a different namespace (to avoid OWL spec violations). This update should only be applied to an RDF file where all the lists are "data", and not part of OWL axiom definitions.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX fhir: <http://hl7.org/fhir/>
DELETE {
?list rdf:first ?item .
?list rdf:rest ?rest .
}
INSERT {
?list ?first_pred ?item .
?list fhir:rdfRest ?rest_obj .
}
WHERE {
?list rdf:first ?item .
?list rdf:rest ?rest .
BIND(IF(isLiteral(?item), fhir:rdfFirstLiteral, fhir:rdfFirst) AS ?first_pred)
BIND(IF(?rest = rdf:nil, fhir:rdfNil, ?rest) AS ?rest_obj)
}
Test input:
@prefix : <http://example.org/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
:a :has_addresses (
[
:street "1428 Elm Street" ;
:state :Ohio
]
[
:street "2400 Fulton Street" ;
:state :California
]
"Sesame Street"
:PlanetEarth
) ;
rdfs:label "Person A" .
Test output:
@prefix : <http://example.org/> .
@prefix fhir: <http://hl7.org/fhir/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
:a rdfs:label "Person A" ;
:has_addresses [ fhir:rdfFirst [ :state :Ohio ;
:street "1428 Elm Street"
] ;
fhir:rdfRest [ fhir:rdfFirst [ :state :California ;
:street "2400 Fulton Street"
] ;
fhir:rdfRest [ fhir:rdfFirstLiteral "Sesame Street" ;
fhir:rdfRest [ fhir:rdfFirst :PlanetEarth ;
fhir:rdfRest fhir:rdfNil
]
]
]
] .
@balhoff , how about adding another condition to the WHERE clause to ensure that it is applied only to FHIR lists (and not part of OWL axiom definitions)?
@balhoff , how about adding another condition to the WHERE clause to ensure that it is applied only to FHIR lists (and not part of OWL axiom definitions)?
@dbooth-boston good idea, I've got a revision now. Do we have a proper location to put this in our repo? In here? https://github.com/w3c/hcls-fhir-rdf/tree/gh-pages/scripts
Concept IRI tasks:
Done (enough) or moved to separate issues for remaining portions.
RDF model changes made in R5:
From Lloyd in zulip on 14-Nov-2022: "Final content freeze is slated for Feb. 24, 2023"
R5 bug fixes:
Artifacts to be updated:
Add "What's New in FHIR RDF" to FAQ managed by FHIR-I group?-- Not yet, per 2/1/23 email from Davera. 7/27/23: Moved to https://github.com/w3c/hcls-fhir-rdf/issues/124<http://hl7.org/fhir/Observation/Obs123.ttl> a owl:Ontology; owl:imports fhir:fhir.ttl; owl:versionIRI <http://hl7.org/fhir/Observation/Obs123.ttl>.
-- 7/27/23: Moved to https://github.com/w3c/hcls-fhir-rdf/issues/126Concept IRI tasks:
7/27/23: Gaurav is following up on these:
Update process:
NOTE: Editorial changes that follow the spirit of the semantic change decision are also okay. Make a note of what is done. If it appears that the voted decision was incorrect, then it needs to go back to ITS for vote again.