# $Id: datatypes.ttl,v 1.9 2014/09/23 08:28:12 eric Exp $
#
# ericP at the keyboard

###############################################################################
# Datatype library
#
# well, not really, we're just using UCUM, but stuff around datatypes...

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix hl7: <http://hl7.org/owl/metadata#> .
@prefix bridg: <http://www.bridgmodel.org/owl#> .
@prefix dt: <http://www.hl7.org/owl/iso-dt-2.0#> . # really <http://hl7.org/owl/datatypes/uv#> .
@prefix : <http://www.w3.org/2013/12/FDA-TA/datatypes#> .

<http://www.w3.org/2013/12/FDA-TA/datatypes> a owl:Ontology .

:value a owl:DatatypeProperty ;
    rdfs:domain dt:PQ .
:units a owl:ObjectProperty  ;
    rdfs:domain dt:PQ .

:ValueSetValue a owl:Class ;
    rdfs:label "set of terms" .

dt:HL7AbstractDatatype a owl:Class .

dt:HL7AbstractDatatype.objectProperty rdfs:subPropertyOf bridg:attributeProperty . # patch

dt:CD.CodeSystem a owl:ObjectProperty .
dt:CD.Coding a owl:DatatypeProperty .

# include a bit from O-RIM's datatypes-uv-2.0.ttl
dt:ANY a owl:Class ; rdfs:subClassOf dt:HL7AbstractDatatype .
 dt:CD a owl:Class ; rdfs:subClassOf dt:ANY .
  dt:CD.codeSystemName a owl:ObjectProperty ;
      rdfs:domain dt:CD ;
      rdfs:range dt:ST , dt:ST.NT ;
      rdfs:subPropertyOf dt:HL7AbstractDatatype.objectProperty .
  dt:CD.displayName a owl:ObjectProperty ;
      rdfs:domain dt:CD ;
      rdfs:range dt:ST ;
      rdfs:subPropertyOf dt:HL7AbstractDatatype.objectProperty .

 dt:CDCoding a owl:Class ; rdfs:subClassOf dt:ANY .

 dt:ED a owl:Class ; rdfs:subClassOf dt:ANY .
  dt:ST a owl:Class ; rdfs:subClassOf dt:ED .
   dt:ST.NT a owl:Class ; rdfs:subClassOf dt:ST .

 dt:II a owl:Class ; rdfs:subClassOf dt:ANY .

dt:QTY a owl:Class ; rdfs:subClassOf dt:ANY .
 dt:TS a owl:Class ; rdfs:subClassOf dt:QTY .
  dt:TS.DATETIME a owl:Class ; rdfs:subClassOf dt:TS .

 dt:QTZ a owl:Class ; rdfs:subClassOf dt:QTY .
  dt:PQ a owl:Class ; rdfs:subClassOf dt:QTZ .
   dt:PQ.TIME a owl:Class ; rdfs:subClassOf dt:PQ .

dt:DSET_ANY a owl:Class ; rdfs:subClassOf dt:HL7AbstractDatatype .
 dt:DSET_CD a owl:Class ; rdfs:subClassOf dt:DSET_ANY .

dt:IVL_QTY a owl:Class ; rdfs:subClassOf dt:HL7AbstractDatatype .
 dt:IVL_QTZ a owl:Class ; rdfs:subClassOf dt:IVL_QTY .
  dt:IVL_INT a owl:Class ; rdfs:subClassOf dt:IVL_QTZ .

 dt:IVL_TS a owl:Class ; rdfs:subClassOf dt:IVL_QTY .
  dt:IVL_TS.DATETIME a owl:Class ; rdfs:subClassOf dt:IVL_TS .

