rkboyce / DomeoClient

Domeo Annotator GWT client
Apache License 2.0
1 stars 2 forks source link

DDI plugin - Domeo creates a new context when the user edits an NLP annotation #40

Open rkboyce opened 10 years ago

rkboyce commented 10 years ago

Domeo creates a new context for an annotation the first time that a user makes a change to the annotations loaded from NLP. For example, when a user first edits an NLP annotation and then saves, Domeo creates a new 'context' with a new 'selector' but the same prefix, exact, and suffix text. This causes a basic query to return multiple records per annotation URN - one for each combination of context and body data associated with the annotation URN. We are able to get around this issue for analysis purposes by using GROUP BY and ORDER in the query. This aggregates annotations with exactly the same data making it possible to compare the original NLP annotation with teh user's modified version. Example:


PREFIX oa:<http://www.w3.org/ns/oa#>
PREFIX sio: <http://semanticscience.org/resource/>
PREFIX poc: <http://purl.org/net/nlprepository/spl-pharmgx-annotation-poc#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dikbD2R:<http://dbmi-icode-01.dbmi.pitt.edu:2020/vocab/resource/>
PREFIX domeo:<http://www.w3.org/ns/domeo#>
PREFIX pav:<http://purl.org/pav/>
PREFIX dailymed:<http://dbmi-icode-01.dbmi.pitt.edu/linkedSPLs/vocab/resource/>

SELECT ?annot ?exactText ?modality ?statementType ?drug1Lab ?drug1Type ?drug1Role ?drug2Lab ?drug2Type ?drug2Role
FROM <http://purl.org/net/nlprepository/changed-ddi-expert1-annotation>
WHERE {

  ?annot a oa:expertstudyAnnotation;
     oa:body ?bn1;
     pav:versionNumber ?version;
     oa:context ?context.

  ?context oa:hasSource "http://130.49.206.86:8080/AnnoStudy/package-insert-section-123.txt.html".
  ?context oa:hasSelector ?selector.

  ?selector a oa:PrefixSuffixTextSelector;
      oa:exact ?exactText.

  ?bn1 domeo:sets ?statement.

  ?statement a poc:DrugDrugInteractionStatement;
     dikbD2R:modality ?modality;
     dikbD2R:statement ?statementType;
     sio:SIO_000628 ?drugsInvolved.

  ?drugsInvolved a dikbD2R:PK_DDI;
     sio:SIO_000132 ?drug1;
     sio:SIO_000132 ?drug2.FILTER(?drug1 > ?drug2)

  ?drug1 rdfs:label ?drug1Lab.
  ?drug1 dailymed:activeMoietyRxCUI ?drug1rxc.
  ?drug1 rdf:type ?drug1Type.
  ?drug1 sio:SIO_000228 ?drug1Role.

  ?drug2 rdfs:label ?drug2Lab.
  ?drug2 dailymed:activeMoietyRxCUI ?drug2rxc.
  ?drug2 rdf:type ?drug2Type.
  ?drug2 sio:SIO_000228 ?drug2Role.
}   
GROUP BY ?exactText
ORDER BY DESC(?annot)

Result:

urn:domeoclient:uuid:c6f959a4-2262-4abd-ad74-9f49878d2b4b   AVANDIA (4 mg twice daily) was shown to have no clinically relevant effect on the pharmacokinetics of nifedipine and oral contraceptives (ethinyl estradiol and norethindrone), which are predominantly metabolized by CYP3A4. Gemfibrozil Concomitant administration of gemfibrozil (600 mg twice daily), an inhibitor of CYP2C8, and rosiglitazone (4 mg once daily) for 7 days increased rosiglitazone AUC by 127%, compared to the administration of rosiglitazone (4 mg once daily) alone.     ncit:negative   ncit:Qualitative    norethindrone   http://dbmi-icode-01.dbmi.pitt.edu:2020/vocab/resource/active-ingredient    dikbD2R:object-drug-of-interaction  avandia     http://dbmi-icode-01.dbmi.pitt.edu:2020/vocab/resource/drug-product     dikbD2R:precipitant-drug-of-interaction
urn:domeoclient:uuid:c6f959a4-2262-4abd-ad74-9f49878d2b4b   AVANDIA (4 mg twice daily) was shown to have no clinically relevant effect on the pharmacokinetics of nifedipine and oral contraceptives (ethinyl estradiol and norethindrone), which are predominantly metabolized by CYP3A4. Gemfibrozil Concomitant administration of gemfibrozil (600 mg twice daily), an inhibitor of CYP2C8, and rosiglitazone (4 mg once daily) for 7 days increased rosiglitazone AUC by 127%, compared to the administration of rosiglitazone (4 mg once daily) alone.     ncit:negative   <empty>     norethindrone   file:///home/PITT/rdb20/DomeoClient/Design/python-SPL-connector/    <empty>     rosiglitazone   file:///home/PITT/rdb20/DomeoClient/Design/python-SPL-connector/    <empty>