Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancer MRN RDF graph to Token RDF graph #5

Open
2 of 3 tasks
andredekker opened this issue Aug 8, 2016 · 2 comments
Open
2 of 3 tasks

Cancer MRN RDF graph to Token RDF graph #5

andredekker opened this issue Aug 8, 2016 · 2 comments
Assignees
Milestone

Comments

@andredekker
Copy link
Owner

andredekker commented Aug 8, 2016

As a cancer data administrator, I need to convert my MRNs RDF graph to a token RDF graph and make this available for UHN users, so that this data is de-identified and I am allowed to give a researcher access to it.

  • Create an empty graph ("MRN2Token") within my RDF store and upload the tokens from the Turtle file from Tokens available for each MRN #3
  • Create an empty graph ("Token") and given my MRN graph and my MRN2Token graph insert the triples using the tokens. An example is the below SPARQL query
  • Push triples to SPARQL endpoint of UHN wide accesible SPARQL endpoint #6
PREFIX roo:<http://www.cancerdata.org/roo/>
PREFIX ncit:<http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#>

INSERT {?token a ncit:C16960. } WHERE 
{
    SERVICE <http://localhost:9999/bigdata/namespace/MRN/sparql> 
            {
              _:cardiacPatient roo:100042 ?mrn.
            }
    SERVICE <http://localhost:9999/bigdata/namespace/MRN2Token/sparql> 
            {
              _:mrnToken roo:100042 ?mrn.
              ?token roo:100318 _:mrnToken.            
            }
.}
@andredekker andredekker changed the title MRN RDF graph to Token RDF graph Cancer MRN RDF graph to Token RDF graph Aug 9, 2016
@andredekker andredekker added this to the Milestone1 milestone Aug 24, 2016
@ghost
Copy link

ghost commented Aug 24, 2016

PREFIX roo:http://www.cancerdata.org/roo/
PREFIX ncit:http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#
prefix cip: http://www.uhn.ca/cip-ontology#

CONSTRUCT {?token a ncit:C16960. } WHERE
{
SERVICE http://localhost:9999/blazegraph/namespace/CipOutcomes/sparql
{
?patient a cip:Patient.
?patient cip:mrn ?mrn.
BIND(STRDT(?mrn, xsd:string) as ?mrnFormalString)
}
SERVICE http://localhost:9999/blazegraph/namespace/mrn2token/sparql
{
_:mrnToken roo:100042 ?mrnFormalString.
?token roo:100318 _:mrnToken.
}
.}

@andredekker
Copy link
Owner Author

Successful. Some issues with blazegraph, weird behaviour. Also blazegraph does not allow authorization so we ended up putting the CIPOutcomes triples in blazegraph (from a QA graph) rather than use Jena. In the end we managed to insert 67 patients in the local blazegraph.
Still need to post the triples to an outside (e.g. RIS) SPARQL endpoint.

@andredekker andredekker assigned andredekker and ghost Aug 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant