@prefix : <https://data.example.org/ontology/anc#> .
@prefix anc: <https://data.example.org/ontology/anc#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dcterms: <http://purl.org/dc/terms/> .

#################################################################
# Ontology Metadata
#################################################################

<https://data.example.org/ontology/anc> a owl:Ontology ;
    dcterms:title "Antenatal Care Ontology (ANC-O)" ;
    dcterms:creator "Health Data Research Team" ;
    dcterms:description "Ontology for Antenatal Care data capture, visits, services, risks, and outcomes." ;
    dcterms:issued "2025-11-27"^^xsd:date ;
    owl:versionInfo "1.0.0" .

#################################################################
# Classes
#################################################################

anc:Patient a owl:Class ;
    rdfs:label "Patient" ;
    rdfs:comment "A pregnant woman receiving antenatal care." .

anc:Pregnancy a owl:Class ;
    rdfs:label "Pregnancy" .

anc:ANCVisit a owl:Class ;
    rdfs:label "ANC Visit" .

anc:HealthFacility a owl:Class ;
    rdfs:label "Health Facility" .

anc:HealthWorker a owl:Class ;
    rdfs:label "Health Worker" .

anc:Observation a owl:Class ;
    rdfs:label "Clinical Observation" .

anc:RiskFactor a owl:Class ;
    rdfs:label "Risk Factor" .

anc:Intervention a owl:Class ;
    rdfs:label "Intervention" .

anc:Outcome a owl:Class ;
    rdfs:label "Pregnancy Outcome" .

#################################################################
# Object Properties (Relationships)
#################################################################

anc:hasPregnancy a owl:ObjectProperty ;
    rdfs:domain anc:Patient ;
    rdfs:range anc:Pregnancy ;
    rdfs:label "has pregnancy" .

anc:hasANCVisit a owl:ObjectProperty ;
    rdfs:domain anc:Pregnancy ;
    rdfs:range anc:ANCVisit ;
    rdfs:label "has ANC visit" .

anc:visitedAt a owl:ObjectProperty ;
    rdfs:domain anc:ANCVisit ;
    rdfs:range anc:HealthFacility ;
    rdfs:label "visited at" .

anc:attendedBy a owl:ObjectProperty ;
    rdfs:domain anc:ANCVisit ;
    rdfs:range anc:HealthWorker ;
    rdfs:label "attended by" .

anc:hasObservation a owl:ObjectProperty ;
    rdfs:domain anc:ANCVisit ;
    rdfs:range anc:Observation ;
    rdfs:label "has observation" .

anc:hasRiskFactor a owl:ObjectProperty ;
    rdfs:domain anc:Pregnancy ;
    rdfs:range anc:RiskFactor ;
    rdfs:label "has risk factor" .

anc:receivedIntervention a owl:ObjectProperty ;
    rdfs:domain anc:ANCVisit ;
    rdfs:range anc:Intervention ;
    rdfs:label "received intervention" .

anc:hasOutcome a owl:ObjectProperty ;
    rdfs:domain anc:Pregnancy ;
    rdfs:range anc:Outcome ;
    rdfs:label "has outcome" .

#################################################################
# Data Properties (Attributes)
#################################################################

anc:patientID a owl:DatatypeProperty ;
    rdfs:domain anc:Patient ;
    rdfs:range xsd:string ;
    rdfs:label "patient ID" .

anc:age a owl:DatatypeProperty ;
    rdfs:domain anc:Patient ;
    rdfs:range xsd:integer ;
    rdfs:label "age" .

anc:gravida a owl:DatatypeProperty ;
    rdfs:domain anc:Pregnancy ;
    rdfs:range xsd:integer ;
    rdfs:label "gravida" .

anc:parity a owl:DatatypeProperty ;
    rdfs:domain anc:Pregnancy ;
    rdfs:range xsd:integer ;
    rdfs:label "parity" .

anc:visitDate a owl:DatatypeProperty ;
    rdfs:domain anc:ANCVisit ;
    rdfs:range xsd:date ;
    rdfs:label "visit date" .

anc:gestationalAgeWeeks a owl:DatatypeProperty ;
    rdfs:domain anc:ANCVisit ;
    rdfs:range xsd:integer ;
    rdfs:label "gestational age (weeks)" .

anc:bloodPressure a owl:DatatypeProperty ;
    rdfs:domain anc:Observation ;
    rdfs:range xsd:string ;
    rdfs:label "blood pressure" .

anc:hemoglobinLevel a owl:DatatypeProperty ;
    rdfs:domain anc:Observation ;
    rdfs:range xsd:decimal ;
    rdfs:label "hemoglobin level" .

anc:riskName a owl:DatatypeProperty ;
    rdfs:domain anc:RiskFactor ;
    rdfs:range xsd:string ;
    rdfs:label "risk name" .

anc:interventionName a owl:DatatypeProperty ;
    rdfs:domain anc:Intervention ;
    rdfs:range xsd:string ;
    rdfs:label "intervention name" .

anc:outcomeType a owl:DatatypeProperty ;
    rdfs:domain anc:Outcome ;
    rdfs:range xsd:string ;
    rdfs:label "outcome type" .
