@@ -156,8 +156,16 @@ SELECT
156156 ' xsd:string' AS datatype
157157FROM (
158158 SELECT curie, label FROM dron .ingredient
159- UNION
160- SELECT curie, label FROM dron .disposition
159+ );
160+
161+ INSERT OR IGNORE INTO dron_ingredient(subject, predicate, object, datatype)
162+ SELECT
163+ curie as subject,
164+ ' rdfs:label' as predicate,
165+ label as object,
166+ datatype as datatype
167+ FROM (
168+ SELECT curie, label, datatype FROM dron .disposition
161169);
162170
163171-- Assert DRON:00010000 'has_RxCUI' annotation.
@@ -283,7 +291,7 @@ INSERT INTO dron_rxnorm VALUES
283291(1 , 0 , ' graph' , ' <http://purl.obolibrary.org/obo/BFO_0000051>' , ' rdf:type' , ' owl:TransitiveProperty' , ' _IRI' , NULL ),
284292(1 , 0 , ' graph' , ' <http://purl.obolibrary.org/obo/BFO_0000051>' , ' rdfs:label' , ' has part' , ' xsd:string' , NULL ),
285293(1 , 0 , ' graph' , ' RO:0000053' , ' rdf:type' , ' owl:ObjectProperty' , ' _IRI' , NULL ),
286- (1 , 0 , ' graph' , ' RO:0000053' , ' rdfs:label' , ' is_bearer_of ' , ' xsd:string ' , NULL ),
294+ (1 , 0 , ' graph' , ' RO:0000053' , ' rdfs:label' , ' is bearer of ' , ' @en ' , NULL ),
287295(1 , 0 , ' graph' , ' DRON:00000005' , ' rdf:type' , ' owl:Class' , ' _IRI' , NULL ),
288296(1 , 0 , ' graph' , ' DRON:00000015' , ' rdf:type' , ' owl:Class' , ' _IRI' , NULL ),
289297(1 , 0 , ' graph' , ' DRON:00000017' , ' rdf:type' , ' owl:Class' , ' _IRI' , NULL ),
@@ -295,15 +303,15 @@ INSERT INTO dron_rxnorm VALUES
295303(1 , 0 , ' graph' , ' DRON:00000024' , ' rdf:type' , ' owl:Class' , ' _IRI' , NULL ),
296304(1 , 0 , ' graph' , ' DRON:00000026' , ' rdf:type' , ' owl:Class' , ' _IRI' , NULL ),
297305(1 , 0 , ' graph' , ' DRON:00000032' , ' rdf:type' , ' owl:Class' , ' _IRI' , NULL ),
298- (1 , 0 , ' graph' , ' DRON:00000033' , ' rdfs:label' , ' anti-malarial function of a drug product ' , ' xsd:string ' , NULL ),
299- (1 , 0 , ' graph' , ' DRON:00000034' , ' rdfs:label' , ' anti-hypertensive function of a drug product ' , ' xsd:string ' , NULL ),
300- (1 , 0 , ' graph' , ' DRON:00000035' , ' rdfs:label' , ' analgesic function of a drug product ' , ' xsd:string ' , NULL ),
306+ (1 , 0 , ' graph' , ' DRON:00000033' , ' rdfs:label' , ' anti-malarial function' , ' @en ' , NULL ),
307+ (1 , 0 , ' graph' , ' DRON:00000034' , ' rdfs:label' , ' anti-hypertensive function' , ' @en ' , NULL ),
308+ (1 , 0 , ' graph' , ' DRON:00000035' , ' rdfs:label' , ' analgesic function' , ' @en ' , NULL ),
301309(1 , 0 , ' graph' , ' DRON:00010000' , ' rdf:type' , ' owl:AnnotationProperty' , ' _IRI' , NULL ),
302310(1 , 0 , ' graph' , ' DRON:00010000' , ' rdfs:label' , ' has_RxCUI' , ' xsd:string' , NULL );
303311
304312-- Assert rdf:type is owl:Class
305313-- for all clinical drug form, clinical drug, and branded drug
306- -- and dispositions in clinical_dru_form_disposition rows.
314+ -- and dispositions in clinical_drug_form_disposition rows.
307315INSERT INTO dron_rxnorm(subject, predicate, object)
308316SELECT
309317 curie AS subject,
@@ -321,21 +329,21 @@ FROM (
321329
322330-- Assert rdfs:label annotation
323331-- for all clinical drug form, clinical drug, and branded drug
324- -- and dispositions in clinical_dru_form_disposition rows.
332+ -- and dispositions in clinical_drug_form_disposition rows.
325333INSERT INTO dron_rxnorm(subject, predicate, object, datatype)
326334SELECT
327335 curie AS subject,
328336 ' rdfs:label' AS predicate,
329337 label AS object,
330- ' xsd:string ' AS datatype
338+ datatype
331339FROM (
332- SELECT curie, label FROM dron .clinical_drug_form
340+ SELECT curie, label, ' xsd:string ' AS datatype FROM dron .clinical_drug_form
333341 UNION
334- SELECT curie, label FROM dron .clinical_drug
342+ SELECT curie, label, ' xsd:string ' AS datatype FROM dron .clinical_drug
335343 UNION
336- SELECT curie, label FROM dron .branded_drug
344+ SELECT curie, label, ' xsd:string ' AS datatype FROM dron .branded_drug
337345 UNION
338- SELECT d .curie , d .label
346+ SELECT d .curie , d .label , d . datatype
339347 FROM dron .clinical_drug_form_disposition AS cdfd
340348 LEFT JOIN dron .disposition AS d
341349 WHERE cdfd .disposition = d .curie
0 commit comments