# Medicine SIOP API Guide without DBMS ## Principle Use files as resources: JSON-LD for ontology, CSV for operational snapshots, JSON for events, and markdown/text for SOP knowledge. ## Static endpoints - `/data/pilot_medicine_ontology.jsonld` - `/data/pilot_medicine_ontology.ttl` - `/data/sample_inventory.csv` - `/data/sample_events.json` ## Data loader concept 1. Place source files in `/data`. 2. Map each column to ontology classes and properties. 3. Generate JSON-LD entities for products, batches, warehouses, companies and events. 4. Serve files directly or through a lightweight Node/Python function. 5. Feed the same files into a vector index later for RAG. ## Lightweight API example ```js import express from 'express'; import fs from 'node:fs/promises'; const app = express(); app.get('/api/ontology', async (_, res) => { const data = await fs.readFile('./data/pilot_medicine_ontology.jsonld','utf8'); res.type('json').send(data); }); app.listen(3000); ```