diff --git a/.gitignore b/.gitignore
index 0009f49c..fdc3ffcc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,62 +1,62 @@
-
-.DS_Store
-
-/data
-/xig/data
-
-node_modules/
-
-data/config.json
-
-validator_cli.jar
-
-xig/xig-download.log
-
-.idea/codeStyles/
-
-data/logs/
-
-registry/registry-data.json
-
-xig-download.log
-
-locator/
-
-tests/library/.last-integration-test-run
-
-package-cache/
-
-data/passwords.ini
-
-test-cache/
-
-tests/vs/.vsac-last-run
-
-data/terminology-cache/
-
-data/shl/private-key.pem
-
-data/shl/public-key.pem
-
-data/bin/validator_cli.jar.version
-
-tx/tests/test-cases-summary.txt
-
-.idea/
-
-bin/validator_cli.jar.version
-
-*.log
-
-test-cases-summary.txt
-test-cases-report.json
-
-tx/data/CodeSystem-cpt.db
-
-coverage/
-
-.claude/
-
-private/
-
-.vscode/
+
+.DS_Store
+
+/data
+/xig/data
+
+node_modules/
+
+data/config.json
+
+validator_cli.jar
+
+xig/xig-download.log
+
+.idea/codeStyles/
+
+data/logs/
+
+registry/registry-data.json
+
+xig-download.log
+
+locator/
+
+tests/library/.last-integration-test-run
+
+package-cache/
+
+data/passwords.ini
+
+test-cache/
+
+tests/vs/.vsac-last-run
+
+data/terminology-cache/
+
+data/shl/private-key.pem
+
+data/shl/public-key.pem
+
+data/bin/validator_cli.jar.version
+
+tx/tests/test-cases-summary.txt
+
+.idea/
+
+bin/validator_cli.jar.version
+
+*.log
+
+test-cases-summary.txt
+test-cases-report.json
+
+tx/data/CodeSystem-cpt.db
+
+coverage/
+
+.claude/
+
+private/
+
+.vscode/
diff --git a/config-template.json b/config-template.json
index 02dada68..3f71fdd3 100644
--- a/config-template.json
+++ b/config-template.json
@@ -322,6 +322,52 @@
"searchParametersPath": null,
"debounceMs": 500
},
+ "feed": {
+ "enabled": false,
+ "baseUrl": "" // optional; if empty, derived from request host. Set when behind a reverse proxy.
+ },
+ "token": {
+ "enabled": true,
+ "database": "/absolute/path/to/token.db",
+ "sessionSecret": "change-this-to-a-secure-random-string-for-token-sessions",
+ "oauth": {
+ "google": {
+ "clientId": "your-google-client-id",
+ "clientSecret": "your-google-client-secret",
+ "redirectUri": "http://localhost:3000/token/callback/google",
+ "scope": ["openid", "profile", "email"]
+ },
+ "facebook": {
+ "clientId": "your-facebook-app-id",
+ "clientSecret": "your-facebook-app-secret",
+ "redirectUri": "http://localhost:3000/token/callback/facebook",
+ "scope": ["email"]
+ },
+ "apple": {
+ "clientId": "your-apple-service-id",
+ "teamId": "your-apple-team-id",
+ "keyId": "your-apple-key-id",
+ "privateKey": "/path/to/apple-private-key.p8",
+ "redirectUri": "http://localhost:3000/token/callback/apple",
+ "scope": ["email", "name"]
+ },
+ "github": {
+ "clientId": "your-github-client-id",
+ "clientSecret": "your-github-client-secret",
+ "redirectUri": "http://localhost:3000/token/callback/github",
+ "scope": ["user:email"]
+ }
+ },
+ "apiKeys": {
+ "defaultAllowedRequests": 50,
+ "maxKeysPerUser": 10,
+ "keyExpiration": null
+ },
+ "rateLimit": {
+ "windowMs": 900000,
+ "max": 100
+ }
+ },
"tx": {
"enabled": false,
"librarySource": "/absolute/path/to/library.yml",
diff --git a/feed/feed.js b/feed/feed.js
new file mode 100644
index 00000000..c7c7b23b
--- /dev/null
+++ b/feed/feed.js
@@ -0,0 +1,230 @@
+//
+// Feed Module — Atom syndication feed (Phase 1: producer)
+//
+// Exposes:
+// GET /feed -> Atom feed listing artifacts in terminology-cache
+// GET /feed/files/:filename -> serves a single binary cache file (.cache/.db/.xml)
+// GET /feed/packages/:id/:version/package.tgz
+// -> repacks an extracted NPM package folder into a .tgz
+//
+// The feed is generated on-demand by walking the terminology-cache folder. No
+// new persistent state is introduced. Downstream FHIRsmith deployments can
+// point an `atom:` source (Phase 2) at this endpoint to mirror the catalogue.
+//
+
+const express = require('express');
+const fs = require('fs');
+const path = require('path');
+const tar = require('tar');
+
+const folders = require('../library/folder-setup');
+const Logger = require('../library/logger');
+
+class FeedModule {
+ constructor(stats) {
+ this.stats = stats;
+ this.router = express.Router();
+ this.config = null;
+ this.cacheFolder = null;
+ this.log = null;
+ }
+
+ async initialize(config) {
+ this.config = config || {};
+ this.log = Logger.getInstance().child({ module: 'feed' });
+ this.cacheFolder = folders.subDir('terminology-cache');
+ this.log.info(`Feed module initialized; cache folder: ${this.cacheFolder}`);
+
+ this.router.get('/', this.handleFeed.bind(this));
+ this.router.get('/files/:filename', this.handleFile.bind(this));
+ this.router.get('/packages/:id/:version/package.tgz', this.handlePackage.bind(this));
+ }
+
+ async shutdown() { /* no-op */ }
+
+ // ---------- routes ----------
+
+ async handleFeed(req, res) {
+ try {
+ const entries = await this.scanCache();
+ const baseUrl = this.config.baseUrl || `${req.protocol}://${req.get('host')}`;
+ const xml = this.renderAtom(entries, baseUrl);
+ res.setHeader('Content-Type', 'application/atom+xml; charset=utf-8');
+ res.send(xml);
+ } catch (err) {
+ this.log.error('Failed to build feed:', err);
+ res.status(500).send('Failed to build feed');
+ }
+ }
+
+ handleFile(req, res) {
+ const name = req.params.filename;
+ if (!this.isSafeName(name)) {
+ return res.status(400).send('Invalid filename');
+ }
+ const filePath = path.join(this.cacheFolder, name);
+ if (!fs.existsSync(filePath) || !fs.statSync(filePath).isFile()) {
+ return res.status(404).send('Not found');
+ }
+ res.sendFile(filePath);
+ }
+
+ handlePackage(req, res) {
+ const { id, version } = req.params;
+ if (!this.isSafeName(id) || !this.isSafeName(version)) {
+ return res.status(400).send('Invalid path');
+ }
+ const dirPath = path.join(this.cacheFolder, `${id}#${version}`);
+ if (!fs.existsSync(dirPath) || !fs.statSync(dirPath).isDirectory()) {
+ return res.status(404).send('Not found');
+ }
+ res.setHeader('Content-Type', 'application/gzip');
+ res.setHeader('Content-Disposition', `attachment; filename="${id}-${version}.tgz"`);
+ tar.create({ gzip: true, cwd: dirPath, portable: true }, ['.']).pipe(res);
+ }
+
+ // ---------- scanning ----------
+
+ async scanCache() {
+ const entries = [];
+ if (!fs.existsSync(this.cacheFolder)) return entries;
+
+ const items = await fs.promises.readdir(this.cacheFolder, { withFileTypes: true });
+ for (const item of items) {
+ const fullPath = path.join(this.cacheFolder, item.name);
+ try {
+ if (item.isDirectory()) {
+ const e = await this.classifyNpmDirectory(item.name, fullPath);
+ if (e) entries.push(e);
+ } else if (item.isFile()) {
+ const e = await this.classifyFile(item.name, fullPath);
+ if (e) entries.push(e);
+ }
+ } catch (err) {
+ this.log.warn(`Skipping ${item.name}: ${err.message}`);
+ }
+ }
+ return entries;
+ }
+
+ async classifyNpmDirectory(name, dirPath) {
+ const hashIdx = name.lastIndexOf('#');
+ if (hashIdx < 1 || hashIdx === name.length - 1) return null;
+ const id = name.substring(0, hashIdx);
+ const version = name.substring(hashIdx + 1);
+
+ let canonical = null;
+ let title = `${id} ${version}`;
+ let description = null;
+
+ const pkgJsonPath = path.join(dirPath, 'package', 'package.json');
+ if (fs.existsSync(pkgJsonPath)) {
+ try {
+ const pj = JSON.parse(await fs.promises.readFile(pkgJsonPath, 'utf8'));
+ if (pj.canonical) canonical = pj.canonical;
+ if (pj.description) description = pj.description;
+ if (pj.title) title = `${pj.title} ${version}`;
+ } catch { /* fall through */ }
+ }
+
+ const stat = await fs.promises.stat(dirPath);
+ return {
+ category: 'fhir-package',
+ title,
+ description,
+ identifier: canonical || `urn:fhir:package:${id}`,
+ version,
+ url: `/feed/packages/${encodeURIComponent(id)}/${encodeURIComponent(version)}/package.tgz`,
+ mediaType: 'application/gzip',
+ updated: stat.mtime,
+ };
+ }
+
+ async classifyFile(name, filePath) {
+ const stat = await fs.promises.stat(filePath);
+ const lower = name.toLowerCase();
+ let category, mediaType;
+
+ if (lower.endsWith('.cache')) {
+ category = 'snomed-cache';
+ mediaType = 'application/octet-stream';
+ } else if (lower.endsWith('.db')) {
+ category = 'terminology-db';
+ mediaType = 'application/x-sqlite3';
+ } else if (lower.endsWith('.xml')) {
+ category = 'xml-resource';
+ mediaType = 'application/xml';
+ } else {
+ return null;
+ }
+
+ return {
+ category,
+ title: name,
+ description: null,
+ identifier: `urn:fhirsmith-cache:${name}`,
+ version: null,
+ url: `/feed/files/${encodeURIComponent(name)}`,
+ mediaType,
+ updated: stat.mtime,
+ size: stat.size,
+ };
+ }
+
+ // ---------- rendering ----------
+
+ renderAtom(entries, baseUrl) {
+ const updated = new Date().toISOString();
+ const feedId = `${baseUrl}/feed`;
+ const items = entries.map(e => this.renderEntry(e, baseUrl)).join('\n');
+ return `
+
+ FHIRsmith Syndication Feed
+ ${escapeXml(feedId)}
+ ${updated}
+
+${items}
+`;
+ }
+
+ renderEntry(e, baseUrl) {
+ const href = baseUrl + e.url;
+ const datePart = e.updated.toISOString().substring(0, 10);
+ const idTag = `tag:fhirsmith,${datePart}:${escapeXml(e.identifier)}`;
+ const sizeAttr = e.size !== undefined ? ` length="${e.size}"` : '';
+ const versionTag = e.version
+ ? `\n ${escapeXml(e.version)}`
+ : '';
+ const descTag = e.description
+ ? `\n ${escapeXml(e.description)}`
+ : '';
+ return `
+ ${idTag}
+ ${escapeXml(e.title)}
+ ${e.updated.toISOString()}
+
+
+ ${escapeXml(e.identifier)}${versionTag}${descTag}
+ `;
+ }
+
+ // ---------- helpers ----------
+
+ isSafeName(s) {
+ return typeof s === 'string' && s.length > 0 && !s.includes('/') && !s.includes('\\') && !s.includes('..');
+ }
+}
+
+function escapeXml(s) {
+ if (s === null || s === undefined) return '';
+ return String(s)
+ .replace(/&/g, '&')
+ .replace(//g, '>')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''');
+}
+
+module.exports = FeedModule;
diff --git a/library/atom-consumer.js b/library/atom-consumer.js
new file mode 100644
index 00000000..c480bdbb
--- /dev/null
+++ b/library/atom-consumer.js
@@ -0,0 +1,362 @@
+//
+// Atom syndication consumer (Phase 2).
+//
+// Given an Atom feed URL, fetches the feed, downloads every 's
+// enclosure into the terminology-cache folder, and returns a list of
+// virtual `library.yml` source lines that point at the now-cached
+// artifacts. The caller (Library.processSource for `atom:` sources)
+// then runs the existing per-type loaders against those sub-sources.
+//
+// Recognised values:
+// fhir-package -> NPM package (.tgz) -> "npm:#"
+// snomed-cache -> SNOMED .cache binary -> "snomed:"
+// terminology-db -> SQLite .db binary -> ":"
+// xml-resource -> UCUM / similar XML -> "ucum:"
+//
+// Ontoserver syndication categories (from CSIRO Ontoserver):
+// SCT_RF2_ALL -> SNOMED RF2 zip -> extract -> import -> "snomed:.cache"
+// FHIR_ValueSet -> FHIR ValueSet JSON (future)
+// FHIR_StructureDefinition -> FHIR StructureDefinition JSON (future)
+// BINARY -> Ontoserver-proprietary (skipped)
+//
+// Entries with unknown categories are skipped with a warning.
+//
+
+const axios = require('axios');
+const fs = require('fs').promises;
+const fsSync = require('fs');
+const path = require('path');
+const stream = require('stream');
+const zlib = require('zlib');
+const tar = require('tar');
+const { XMLParser } = require('fast-xml-parser');
+const { Rf2Importer } = require('./rf2-importer');
+
+const DOWNLOAD_TIMEOUT_MS = 10 * 60 * 1000; // 10 minutes
+const RF2_DOWNLOAD_TIMEOUT_MS = 60 * 60 * 1000; // 60 minutes for large RF2 files
+
+class AtomConsumer {
+ /**
+ * @param {string} cacheFolder - absolute path to the terminology-cache folder
+ * @param {object} log - logger with .info/.warn/.error
+ * @param {object} options - additional options
+ * @param {object} options.auth - authentication config { type: 'bearer', token: '...' }
+ * @param {object} options.mldsAuth - MLDS auth config { username, password } for mlds.ihtsdotools.org
+ */
+ constructor(cacheFolder, log, options = {}) {
+ this.cacheFolder = cacheFolder;
+ this.log = log;
+ this.auth = options.auth || null;
+ this.mldsAuth = options.mldsAuth || null;
+ this.parser = new XMLParser({
+ ignoreAttributes: false,
+ attributeNamePrefix: '@_',
+ removeNSPrefix: true, // strip sy:, fs:, atom: prefixes for easier access
+ });
+ }
+
+ /**
+ * Get axios config with auth headers if configured
+ * @param {object} extraConfig - additional axios config
+ * @param {boolean} forMlds - if true, use MLDS auth instead of bearer token
+ */
+ #getAxiosConfig(extraConfig = {}, forMlds = false) {
+ const config = {
+ timeout: DOWNLOAD_TIMEOUT_MS,
+ ...extraConfig
+ };
+
+ if (forMlds && this.mldsAuth?.username && this.mldsAuth?.password) {
+ config.auth = {
+ username: this.mldsAuth.username,
+ password: this.mldsAuth.password
+ };
+ } else if (this.auth?.type === 'bearer' && this.auth?.token) {
+ config.headers = {
+ ...config.headers,
+ 'Authorization': `Bearer ${this.auth.token}`
+ };
+ }
+
+ return config;
+ }
+
+ /**
+ * Check if a URL points to MLDS
+ */
+ #isMldsUrl(url) {
+ return url && url.includes('mlds.ihtsdotools.org');
+ }
+
+ /**
+ * Fetch an Atom feed and resolve every entry into a cached artifact.
+ * @param {string} feedUrl
+ * @returns {Promise} virtual source lines for downstream processSource
+ */
+ async expand(feedUrl) {
+ this.log.info(`Atom feed: ${feedUrl}`);
+ const response = await axios.get(feedUrl, this.#getAxiosConfig({
+ responseType: 'text',
+ }));
+ const parsed = this.parser.parse(response.data);
+ const entries = this.#asArray(parsed.feed?.entry);
+
+ const sources = [];
+ for (const entry of entries) {
+ try {
+ const sub = await this.#processEntry(entry, feedUrl);
+ if (sub) sources.push(sub);
+ } catch (err) {
+ const title = entry?.title || '';
+ this.log.warn(` skipping entry "${title}": ${err.message}`);
+ }
+ }
+ return sources;
+ }
+
+ // ---------- per-entry ----------
+
+ async #processEntry(entry, feedBase) {
+ const category = this.#firstCategoryTerm(entry.category);
+ const enclosure = this.#findEnclosure(entry.link);
+ if (!enclosure) throw new Error('no ');
+
+ const downloadUrl = this.#resolveUrl(enclosure['@_href'], feedBase);
+
+ switch (category) {
+ case 'fhir-package':
+ return await this.#handlePackage(entry, downloadUrl);
+ case 'snomed-cache':
+ return await this.#handleBinary(downloadUrl, 'snomed');
+ case 'terminology-db':
+ return await this.#handleBinary(downloadUrl, this.#guessDbType(downloadUrl));
+ case 'xml-resource':
+ return await this.#handleBinary(downloadUrl, 'ucum');
+ case 'SCT_RF2_ALL':
+ return await this.#handleRf2(entry, downloadUrl);
+ case 'BINARY':
+ throw new Error('BINARY category is Ontoserver-proprietary and not supported');
+ case 'FHIR_ValueSet':
+ case 'FHIR_StructureDefinition':
+ case 'FHIR_CodeSystem':
+ case 'FHIR_ConceptMap':
+ throw new Error(`FHIR resource category "${category}" not yet implemented`);
+ default:
+ throw new Error(`unsupported category "${category}"`);
+ }
+ }
+
+ async #handlePackage(entry, url) {
+ const version = entry.contentItemVersion;
+ if (!version) throw new Error('package entry missing ');
+
+ // Derive package id. Producer URLs follow .../packages///package.tgz.
+ let id = null;
+ const m = url.match(/\/packages\/([^/]+)\/[^/]+\/package\.tgz(?:\?.*)?$/);
+ if (m) id = decodeURIComponent(m[1]);
+ // Fallback: sy:contentItemIdentifier may carry the id directly (non-URL form)
+ if (!id) {
+ const ident = entry.contentItemIdentifier;
+ if (ident && !/^https?:/.test(ident)) id = ident;
+ }
+ if (!id) throw new Error('cannot determine package id from URL or identifier');
+
+ const cacheKey = `${id}#${version}`;
+ const cacheDir = path.join(this.cacheFolder, cacheKey);
+
+ if (await this.#exists(cacheDir)) {
+ this.log.info(` cached: ${cacheKey}`);
+ } else {
+ this.log.info(` fetching: ${cacheKey} (${url})`);
+ await this.#downloadAndExtractTgz(url, cacheDir);
+ }
+ return `npm:${id}#${version}`;
+ }
+
+ async #handleBinary(url, sourceType) {
+ const filename = this.#basename(url);
+ if (!filename) throw new Error(`cannot derive filename from URL: ${url}`);
+ const dest = path.join(this.cacheFolder, filename);
+
+ if (await this.#exists(dest)) {
+ this.log.info(` cached: ${filename}`);
+ } else {
+ this.log.info(` fetching: ${filename} (${url})`);
+ await this.#downloadToFile(url, dest);
+ }
+ return `${sourceType}:${filename}`;
+ }
+
+ /**
+ * Handle SCT_RF2_ALL entries from Ontoserver syndication
+ * Downloads the RF2 zip, extracts it, and converts to .cache format
+ */
+ async #handleRf2(entry, url) {
+ // Extract edition and version from entry metadata
+ // contentItemIdentifier: http://snomed.info/sct/11000172109
+ // contentItemVersion: http://snomed.info/sct/11000172109/version/20260415
+ const versionUri = entry.contentItemVersion;
+ const canonical = entry.contentItemIdentifier;
+
+ if (!versionUri) {
+ throw new Error('RF2 entry missing contentItemVersion');
+ }
+
+ // Parse version URI to get edition and version date
+ const match = versionUri.match(/sct\/(\d+)\/version\/(\d+)/);
+ if (!match) {
+ throw new Error(`Cannot parse version URI: ${versionUri}`);
+ }
+
+ const edition = match[1];
+ const version = match[2];
+ const cacheFilename = `sct_${edition}_${version}.cache`;
+ const cachePath = path.join(this.cacheFolder, cacheFilename);
+
+ // Check if already imported
+ if (await this.#exists(cachePath)) {
+ this.log.info(` cached: ${cacheFilename}`);
+ return `snomed:${cacheFilename}`;
+ }
+
+ // Download the RF2 zip
+ const zipFilename = this.#basename(url) || `sct_${edition}_${version}.zip`;
+ const zipPath = path.join(this.cacheFolder, zipFilename);
+
+ if (!await this.#exists(zipPath)) {
+ // Check if this is an MLDS download
+ const isMlds = this.#isMldsUrl(url);
+
+ if (isMlds && !this.mldsAuth?.username) {
+ throw new Error(
+ `RF2 download requires MLDS credentials.\n` +
+ ` URL: ${url}\n` +
+ ` Register at https://mlds.ihtsdotools.org and provide mldsAuth config.\n` +
+ ` Or download manually and place at: ${zipPath}`
+ );
+ }
+
+ this.log.info(` fetching RF2: ${zipFilename}`);
+ this.log.info(` from: ${url}`);
+ if (isMlds) {
+ this.log.info(` using MLDS credentials`);
+ }
+
+ await this.#downloadToFile(url, zipPath, {
+ timeout: RF2_DOWNLOAD_TIMEOUT_MS,
+ forMlds: isMlds
+ });
+ } else {
+ this.log.info(` RF2 zip cached: ${zipFilename}`);
+ }
+
+ // Import RF2 to cache format
+ this.log.info(` importing RF2 -> ${cacheFilename}`);
+ const importer = new Rf2Importer({ log: this.log });
+
+ try {
+ const result = await importer.importZip(zipPath, cachePath, {
+ edition,
+ version,
+ uri: versionUri
+ });
+ this.log.info(` imported: ${result.editionName} ${version}`);
+ } catch (err) {
+ // Cleanup partial cache file on failure
+ if (await this.#exists(cachePath)) {
+ await fs.unlink(cachePath);
+ }
+ throw new Error(`RF2 import failed: ${err.message}`);
+ }
+
+ return `snomed:${cacheFilename}`;
+ }
+
+ // ---------- IO ----------
+
+ async #downloadToFile(url, dest, options = {}) {
+ const timeout = options.timeout || DOWNLOAD_TIMEOUT_MS;
+ const forMlds = options.forMlds || false;
+ const response = await axios.get(url, this.#getAxiosConfig({
+ responseType: 'arraybuffer',
+ timeout,
+ }, forMlds));
+ await fs.writeFile(dest, Buffer.from(response.data));
+ }
+
+ async #downloadAndExtractTgz(url, destDir) {
+ const response = await axios.get(url, this.#getAxiosConfig({
+ responseType: 'arraybuffer',
+ }));
+ await fs.mkdir(destDir, { recursive: true });
+ await new Promise((resolve, reject) => {
+ const gunzip = zlib.createGunzip();
+ const extract = tar.extract({ cwd: destDir });
+ stream.Readable.from(Buffer.from(response.data))
+ .pipe(gunzip)
+ .pipe(extract)
+ .on('finish', resolve)
+ .on('error', reject);
+ gunzip.on('error', reject);
+ extract.on('error', reject);
+ });
+ }
+
+ // ---------- helpers ----------
+
+ #asArray(v) {
+ if (v === undefined || v === null) return [];
+ return Array.isArray(v) ? v : [v];
+ }
+
+ #firstCategoryTerm(categoryNode) {
+ const arr = this.#asArray(categoryNode);
+ for (const c of arr) {
+ if (c && c['@_term']) return c['@_term'];
+ }
+ return null;
+ }
+
+ #findEnclosure(linkNode) {
+ const arr = this.#asArray(linkNode);
+ return arr.find(l => (l['@_rel'] || 'alternate') === 'alternate') || arr[0] || null;
+ }
+
+ #resolveUrl(href, base) {
+ if (!href) return null;
+ if (/^https?:/.test(href)) return href;
+ return new URL(href, base).toString();
+ }
+
+ #basename(url) {
+ try {
+ const u = new URL(url);
+ const last = u.pathname.split('/').filter(Boolean).pop();
+ return last ? decodeURIComponent(last) : null;
+ } catch {
+ return null;
+ }
+ }
+
+ #guessDbType(url) {
+ const lower = this.#basename(url)?.toLowerCase() || '';
+ if (lower.includes('loinc')) return 'loinc';
+ if (lower.includes('rxnorm')) return 'rxnorm';
+ if (lower.includes('ndc')) return 'ndc';
+ if (lower.includes('unii')) return 'unii';
+ if (lower.includes('cpt')) return 'cpt';
+ if (lower.includes('omop')) return 'omop';
+ return 'loinc'; // default; operator can rename the file or override
+ }
+
+ async #exists(p) {
+ try {
+ await fs.access(p);
+ return true;
+ } catch {
+ return false;
+ }
+ }
+}
+
+module.exports = AtomConsumer;
diff --git a/library/rf2-importer.js b/library/rf2-importer.js
new file mode 100644
index 00000000..c0d2c23e
--- /dev/null
+++ b/library/rf2-importer.js
@@ -0,0 +1,185 @@
+/**
+ * RF2 Importer - Programmatic wrapper for SNOMED CT RF2 to cache conversion
+ *
+ * This module provides a simple API to convert RF2 zip files to .cache format
+ * suitable for use by the terminology server.
+ */
+
+const fs = require('fs');
+const fsp = require('fs').promises;
+const path = require('path');
+const os = require('os');
+const { createHash } = require('crypto');
+const AdmZip = require('adm-zip');
+
+class Rf2Importer {
+ constructor(options = {}) {
+ this.log = options.log || console;
+ this.tempDir = options.tempDir || os.tmpdir();
+ this.keepTemp = options.keepTemp || false;
+ }
+
+ /**
+ * Import an RF2 zip file and produce a .cache file
+ *
+ * @param {string} zipPath - Path to the RF2 zip file
+ * @param {string} outputPath - Path for the output .cache file
+ * @param {object} options - Import options
+ * @returns {Promise<{outputPath: string, edition: string, version: string, uri: string}>}
+ */
+ async importZip(zipPath, outputPath, options = {}) {
+ if (!fs.existsSync(zipPath)) {
+ throw new Error(`RF2 zip file not found: ${zipPath}`);
+ }
+
+ // Create temp directory for extraction
+ const tempExtractDir = path.join(this.tempDir, `rf2-extract-${Date.now()}`);
+ await fsp.mkdir(tempExtractDir, { recursive: true });
+
+ try {
+ // Extract the zip
+ this.log.info(`Extracting RF2 zip: ${zipPath}`);
+ await this.#extractZip(zipPath, tempExtractDir);
+
+ // Find the RF2 root directory (may be nested)
+ const rf2Root = await this.#findRf2Root(tempExtractDir);
+ if (!rf2Root) {
+ throw new Error('Could not find RF2 content in zip (no Terminology folder found)');
+ }
+ this.log.info(`RF2 root: ${rf2Root}`);
+
+ // Auto-detect edition and version
+ const detected = await this.#detectEditionAndVersion(rf2Root);
+ this.log.info(`Detected edition: ${detected.editionName} (${detected.edition})`);
+ this.log.info(`Detected version: ${detected.version}`);
+
+ // Build the version URI
+ const edition = options.edition || detected.edition;
+ const version = options.version || detected.version;
+ const uri = options.uri || `http://snomed.info/sct/${edition}/version/${version}`;
+
+ // Ensure output directory exists
+ await fsp.mkdir(path.dirname(outputPath), { recursive: true });
+
+ // Run the importer
+ this.log.info(`Importing to: ${outputPath}`);
+ await this.#runImport({
+ source: rf2Root,
+ dest: outputPath,
+ edition,
+ version,
+ uri,
+ verbose: options.verbose || false
+ });
+
+ return {
+ outputPath,
+ edition,
+ version,
+ uri,
+ editionName: detected.editionName
+ };
+ } finally {
+ // Cleanup temp directory
+ if (!this.keepTemp) {
+ await this.#rmdir(tempExtractDir);
+ }
+ }
+ }
+
+ async #extractZip(zipPath, destDir) {
+ const zip = new AdmZip(zipPath);
+ zip.extractAllTo(destDir, true);
+ }
+
+ async #findRf2Root(dir) {
+ // Look for Terminology directory which indicates RF2 content
+ const entries = await fsp.readdir(dir, { withFileTypes: true });
+
+ for (const entry of entries) {
+ if (entry.isDirectory()) {
+ const fullPath = path.join(dir, entry.name);
+
+ // Check if this directory has Terminology
+ if (entry.name === 'Terminology' || entry.name === 'Snapshot') {
+ return dir;
+ }
+
+ // Check if this directory contains Terminology (go one level down)
+ const subEntries = await fsp.readdir(fullPath, { withFileTypes: true });
+ for (const sub of subEntries) {
+ if (sub.isDirectory() && (sub.name === 'Terminology' || sub.name === 'Snapshot')) {
+ return fullPath;
+ }
+ }
+
+ // Recurse into subdirectories (RF2 zips often have nested structure)
+ const found = await this.#findRf2Root(fullPath);
+ if (found) return found;
+ }
+ }
+
+ return null;
+ }
+
+ async #detectEditionAndVersion(sourceDir) {
+ // Import the SnomedModule to use its detection logic
+ const { SnomedModule } = require('../tx/importers/import-sct.module');
+
+ const snomedModule = new SnomedModule();
+ // Use a mock config for detection
+ snomedModule.config = { verbose: false };
+
+ const detected = await snomedModule.detectEditionAndVersion(sourceDir);
+
+ return {
+ edition: detected.edition || '900000000000207008',
+ version: detected.version || this.#generateVersionFromDate(),
+ editionName: detected.editionName || 'Unknown Edition'
+ };
+ }
+
+ #generateVersionFromDate() {
+ const now = new Date();
+ return `${now.getFullYear()}${String(now.getMonth() + 1).padStart(2, '0')}${String(now.getDate()).padStart(2, '0')}`;
+ }
+
+ async #runImport(config) {
+ // Import the importer classes
+ const importerModule = require('../tx/importers/import-sct.module');
+
+ // Create a minimal progress reporter
+ const progressReporter = {
+ createTaskProgressBar: (name) => ({
+ start: () => {},
+ update: () => {},
+ stop: () => {}
+ }),
+ completeTask: (name, current, total) => {
+ this.log.info(` ${name}: ${current.toLocaleString()} items`);
+ },
+ stopCurrentProgress: () => {}
+ };
+
+ // Create and run the importer
+ const importer = new importerModule.SnomedImporter(config, progressReporter);
+ await importer.run();
+ }
+
+ async #rmdir(dir) {
+ try {
+ await fsp.rm(dir, { recursive: true, force: true });
+ } catch (err) {
+ this.log.warn(`Failed to cleanup temp directory: ${dir}`);
+ }
+ }
+
+ /**
+ * Generate a cache filename from edition and version
+ */
+ static generateCacheFilename(edition, version) {
+ return `sct_${edition}_${version}.cache`;
+ }
+}
+
+module.exports = { Rf2Importer };
diff --git a/ontoserver_info/.env b/ontoserver_info/.env
new file mode 100644
index 00000000..02b1e7fd
--- /dev/null
+++ b/ontoserver_info/.env
@@ -0,0 +1 @@
+TOKEN=eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJOM3llSnlYM0JNYUVGUWlIT0FYS09jenFiZmRvTkpVUUxxTm1XM1RXQ3RBIn0.eyJleHAiOjE3Nzk5OTQwNDIsImlhdCI6MTc3OTk5MjI0MiwianRpIjoib25ydHJvOjIwMTRiZWQ5LTQ5Y2MtYzljMS1lMzJmLTMxNTgyZTY5ZjMwMSIsImlzcyI6Imh0dHBzOi8vb250b2Nsb2FrLmFwcHMuaGVhbHRoLmJlbGdpdW0uYmUvYXV0aC9yZWFsbXMvVGVybWlub2xvZ3kiLCJhdWQiOlsiaHR0cHM6Ly9hcHBzLmhlYWx0aC5iZWxnaXVtLmJlL29udG9zZXJ2ZXIvZmhpciIsImFjY291bnQiXSwic3ViIjoiOTNkZWQwMWEtYTQyZi00OWY4LTlmZGYtMzM0YTNiM2Y2NWFlIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoidGVybWlub2xvZ3ktc2VydmVyIiwic2lkIjoiMzFlYjE4YzAtY2QzMy00NTJmLWI0YjEtNGI4NmJjYWE0MmM5IiwiYWNyIjoiMSIsImFsbG93ZWQtb3JpZ2lucyI6WyJodHRwczovL2FwcHMuaGVhbHRoLmJlbGdpdW0uYmUiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNvbnN1bWVyIiwiZGVmYXVsdC1yb2xlcy10ZXJtaW5vbG9neSIsIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJ0ZXJtaW5vbG9neS1zZXJ2ZXIiOnsicm9sZXMiOlsiU1lORF9SRUFEIiwiRkhJUl9SRUFEIiwiQVBJX1JFQUQiXX0sImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoicHJvZmlsZSBlbWFpbCBvbnRvc2VydmVyX3Njb3BlIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsIm5hbWUiOiJKb3NlIENvc3RhIFRlaXhlaXJhIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiam9zZS5hLnRlaXhlaXJhQGdtYWlsLmNvbSIsImdpdmVuX25hbWUiOiJKb3NlIiwiZmFtaWx5X25hbWUiOiJDb3N0YSBUZWl4ZWlyYSIsImVtYWlsIjoiam9zZS5hLnRlaXhlaXJhQGdtYWlsLmNvbSIsImF1dGhvcml0aWVzIjpbIlNZTkRfUkVBRCIsIkZISVJfUkVBRCIsIkFQSV9SRUFEIl19.fxK2I7fMOCjMXgYgHxsO_EAh9-Q2rSabX1I25M5J3l1mpB-VgbmKHGhu9v9am81ckzcDezxO6QaiIu9bieCjn4d_S5QyWCZrmgPqryN7mZcYMLHAO6_nxSDyQppB-zVgFk6VABG1FzH2lZFUy9NmAwsaROzvsXWCa-bKkbjOYJVnSg0lmesXXgbTwk879CQnVBHmQOBsMGgzg6EUVPOAAOqeKpo4-_RkjCcszAUxy-YHtB2P-NXXpLDl4dBjzoOTLafL1W4nwUywTe--ec9zXzspySTujDvvzRnwJ5Xbw05e9jQmIWzMKI3SGRd3kG5pYO606f5YDmACLsXN60QRDQ
\ No newline at end of file
diff --git a/ontoserver_info/get_token.py b/ontoserver_info/get_token.py
new file mode 100644
index 00000000..c09a6200
--- /dev/null
+++ b/ontoserver_info/get_token.py
@@ -0,0 +1,140 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+import base64
+import configparser
+import json
+import os
+import sys
+from pathlib import Path
+
+import requests
+
+TOKEN_URL = "https://ontocloak.apps.health.belgium.be/auth/realms/Terminology/protocol/openid-connect/token"
+
+# Base64-encoded client credentials from your message
+CLIENT_ID_B64 = "dGVybWlub2xvZ3ktc2VydmVy"
+CLIENT_SECRET_B64 = "WGhEQ0pHaUNSeTF3Q2p2dUlmeWU2WFluSlNlbWhsREQ="
+
+
+def b64_decode_str(s: str) -> str:
+ s = s.strip()
+ s += "=" * (-len(s) % 4)
+ return base64.b64decode(s).decode("utf-8")
+
+
+def build_basic_auth(client_id: str, client_secret: str) -> str:
+ pair = f"{client_id}:{client_secret}".encode("utf-8")
+ return "Basic " + base64.b64encode(pair).decode("ascii")
+
+
+def read_creds_file(path: Path) -> tuple[str | None, str | None]:
+ """
+ Reads an INI file like:
+ [terminology]
+ username = you@example.org
+ password = yourPassword
+ """
+ cfg = configparser.ConfigParser()
+ cfg.read(path, encoding="utf-8")
+ if "terminology" not in cfg:
+ return None, None
+ u = cfg["terminology"].get("username")
+ p = cfg["terminology"].get("password")
+ return u, p
+
+
+def request_token(username: str, password: str, timeout: int = 30) -> dict:
+ client_id = b64_decode_str(CLIENT_ID_B64)
+ client_secret = b64_decode_str(CLIENT_SECRET_B64)
+
+ headers = {
+ "Authorization": build_basic_auth(client_id, client_secret),
+ "Content-Type": "application/x-www-form-urlencoded",
+ "Accept": "application/json",
+ }
+ data = {
+ "grant_type": "password",
+ "username": username,
+ "password": password,
+ }
+
+ r = requests.post(TOKEN_URL, headers=headers, data=data, timeout=timeout)
+
+ if r.status_code != 200:
+ # Prefer JSON error if present
+ try:
+ err = r.json()
+ pretty = json.dumps(err, indent=2)
+ except Exception:
+ pretty = r.text
+
+ raise RuntimeError(
+ f"Token request failed (HTTP {r.status_code}).\n"
+ f"Response:\n{pretty}\n"
+ )
+
+ return r.json()
+
+
+def main() -> int:
+ ap = argparse.ArgumentParser(description="Fetch Ontocloak access token and write it to a file.")
+ ap.add_argument("--username", help="Username (overrides file/env if provided)")
+ ap.add_argument("--password", help="Password (overrides file/env if provided)")
+ ap.add_argument("--creds-file", default="termserver.ini", help="INI credentials file (default: termserver.ini)")
+ ap.add_argument("--out", default="token.txt", help="Output token file (default: token.txt)")
+ ap.add_argument("--timeout", type=int, default=30, help="HTTP timeout seconds (default: 30)")
+ ap.add_argument("--print-token", action="store_true", help="Also print the access_token to stdout")
+ args = ap.parse_args()
+
+ username = args.username
+ password = args.password
+
+ # If not provided on CLI, try creds file
+ if (not username) or (not password):
+ creds_path = Path(args.creds_file)
+ if creds_path.exists():
+ fu, fp = read_creds_file(creds_path)
+ username = username or fu
+ password = password or fp
+
+ # If still missing, try environment
+ username = username or os.getenv("TERM_USERNAME")
+ password = password or os.getenv("TERM_PASSWORD")
+
+ if not username or not password:
+ print(
+ "Missing credentials.\n"
+ "Provide --username/--password, or create termserver.ini, or set TERM_USERNAME/TERM_PASSWORD.\n\n"
+ "Example termserver.ini:\n"
+ "[terminology]\n"
+ "username = you@example.org\n"
+ "password = yourPassword\n",
+ file=sys.stderr,
+ )
+ return 2
+
+ token_response = request_token(username, password, timeout=args.timeout)
+ access_token = token_response.get("access_token")
+ if not access_token:
+ print("No access_token in response.", file=sys.stderr)
+ return 3
+
+ out_path = Path(args.out)
+ with open(out_path, "w", encoding="utf-8", newline="") as f:
+ f.write(access_token.strip())
+ with open(".env", "w", encoding="utf-8", newline="") as f:
+ f.write(f"TOKEN={access_token.strip()}")
+
+ print(f"Wrote access token to: {out_path}")
+ if "expires_in" in token_response:
+ print(f"expires_in: {token_response['expires_in']} seconds")
+ if args.print_token:
+ print(access_token)
+
+ return 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/ontoserver_info/ontoserver.http b/ontoserver_info/ontoserver.http
new file mode 100644
index 00000000..bf06ef98
--- /dev/null
+++ b/ontoserver_info/ontoserver.http
@@ -0,0 +1,54 @@
+@token = {{$dotenv TOKEN}}
+@base = https://apps.health.belgium.be/ontoserver/fhir
+@syndBase = https://apps.health.belgium.be/ontoserver/synd
+
+
+### Ontoserver CapabilityStatement
+GET {{base}}/metadata
+Authorization: Bearer {{token}}
+Accept: application/fhir+json
+
+### List CodeSystems
+GET {{base}}/CodeSystem?_count=5
+Authorization: Bearer {{token}}
+Accept: application/fhir+json
+
+### List CodeSystems
+GET {{base}}/CodeSystem?_elements=name,url&_count=10
+Authorization: Bearer {{token}}
+Accept: application/fhir+json
+
+
+### List CodeSystems
+GET {{base}}/CodeSystem?_summary=true
+Authorization: Bearer {{token}}
+Accept: application/fhir+json
+
+
+
+
+### SNOMED CT lookup
+GET {{base}}/CodeSystem/$lookup?system=http://snomed.info/sct&code=22298006
+Authorization: Bearer {{token}}
+Accept: application/fhir+json
+
+
+### Syndication feed (Atom) — full feed
+GET {{syndBase}}/syndication.xml
+Authorization: Bearer {{token}}
+Accept: application/atom+xml
+
+### Syndication feed — Belgian SNOMED CT edition (RF2 packages)
+GET {{syndBase}}/syndication.xml?canonical=http://snomed.info/sct/11000172109
+Authorization: Bearer {{token}}
+Accept: application/atom+xml
+
+### Syndication feed — only Belgian FHIR ValueSets
+GET {{syndBase}}/syndication.xml?category=FHIR_ValueSet
+Authorization: Bearer {{token}}
+Accept: application/atom+xml
+
+### Syndication feed — only SNOMED CT binary indexes (Ontoserver native)
+GET {{syndBase}}/syndication.xml?canonical=http://snomed.info/sct
+Authorization: Bearer {{token}}
+Accept: application/atom+xml
diff --git a/ontoserver_info/syndication_resp_atom.xml b/ontoserver_info/syndication_resp_atom.xml
new file mode 100644
index 00000000..e3edb7c7
--- /dev/null
+++ b/ontoserver_info/syndication_resp_atom.xml
@@ -0,0 +1,804 @@
+HTTP/1.1 200
+Date: Thu, 28 May 2026 11:49:34 GMT
+Server: Apache
+Content-Security-Policy: frame-ancestors 'self' https://*.health.fgov.be https://*.health.belgium.be https://fpshealth.atlassian.net
+X-Content-Type-Options: nosniff, nosniff
+Vary: Origin,Access-Control-Request-Method,Access-Control-Request-Headers,*
+X-Request-Id: 7d51250e-3b93-47a2-8ade-610521e6faca
+X-Correlation-Id: 7d51250e-3b93-47a2-8ade-610521e6faca
+Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+Pragma: no-cache
+Expires: Thu, 01 Jan 1970 00:00:00 GMT
+X-XSS-Protection: 1; mode=block
+Strict-Transport-Security: max-age=16070400
+X-Frame-Options: DENY
+Content-Type: application/atom+xml;charset=UTF-8
+Content-Length: 72418
+Connection: close
+
+
+
+ "Belgian Terminology Release Syndication Feed"
+
+
+ 2026-05-13T15:04:57+02:00
+ urn:uuid:1195d94b-c299-3cc9-98fd-3873e01e657b
+ Ontoserver® 6.25.1, CSIRO
+
+ Belgian National Edition-May 2025 v1.0
+
+ urn:uuid:43b92449-6f56-4e8d-a918-b3d31e8d4da2
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2025-10-08T13:03:01+02:00
+ 2025-05-15T02:00:00+02:00
+ May 2025 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20250515
+
+ http://snomed.info/sct/900000000000207008/version/20250501
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-November 2023 v1.0
+
+ urn:uuid:2c69a159-88b8-48a3-bc90-11f33ad0f95e
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2025-10-08T13:03:11+02:00
+ 2023-11-15T01:00:00+01:00
+ November 2023 SNOMED CT Managed Service Belgium Extension release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20231115
+
+ http://snomed.info/sct/900000000000207008/version/20230930
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-April 2026 v1.0
+
+ urn:uuid:a8fabbcc-04a1-45f6-a482-2b39c2909769
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2026-04-15T06:43:15+02:00
+ 2026-04-15T02:00:00+02:00
+ April 2026 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20260415
+
+ http://snomed.info/sct/900000000000207008/version/20260401
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-November 2024 v1.0
+
+ urn:uuid:42559942-a533-44f7-a381-ad5d8f32b46b
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2025-10-08T13:03:32+02:00
+ 2024-11-15T01:00:00+01:00
+ November 2024 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20241115
+
+ http://snomed.info/sct/900000000000207008/version/20241101
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-September 2025 v1.0
+
+ urn:uuid:2578d6e8-5419-49be-8286-b09ac88d853c
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2025-10-09T11:45:35+02:00
+ 2025-09-15T02:00:00+02:00
+ September 2025 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20250915
+
+ http://snomed.info/sct/900000000000207008/version/20250901
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-May 2024 v1.0
+
+ urn:uuid:48969e96-5fb9-47f8-ac99-7adeec256180
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2025-10-08T13:03:07+02:00
+ 2024-05-22T02:00:00+02:00
+ May 2024 SNOMED CT Managed Service Belgium Extension release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20240515
+
+ http://snomed.info/sct/900000000000207008/version/20230201
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-December 2025 v1.0
+
+ urn:uuid:23fc68f6-1386-448c-b60d-ecfec4152bbf
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2025-12-15T10:37:28+01:00
+ 2025-12-15T01:00:00+01:00
+ December 2025 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20251215
+
+ http://snomed.info/sct/900000000000207008/version/20251201
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-June 2025 v1.0
+
+ urn:uuid:9e5ba6ad-9f0f-47df-9975-7f06a720b694
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2025-10-08T13:03:17+02:00
+ 2025-06-15T02:00:00+02:00
+ June 2025 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20250615
+
+ http://snomed.info/sct/900000000000207008/version/20250601
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-March 2026 v1.0
+
+ urn:uuid:900ca814-8d07-495f-b5e6-a1e65e2e04d8
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2026-03-13T15:06:06+01:00
+ 2026-03-15T01:00:00+01:00
+ March 2026 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20260315
+
+ http://snomed.info/sct/900000000000207008/version/20260301
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-February 2026 v1.0
+
+ urn:uuid:0fd0f809-4cc2-4509-9a61-0ccf886b3f2f
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2026-03-11T11:50:03+01:00
+ 2026-02-15T01:00:00+01:00
+ February 2026 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20260215
+
+ http://snomed.info/sct/900000000000207008/version/20260201
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-March 2025 v1.0
+
+ urn:uuid:9cde5b44-f346-4b7f-8f2a-2ae1cac6fdf4
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2025-10-08T13:03:25+02:00
+ 2025-03-15T01:00:00+01:00
+ March 2025 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20250315
+
+ http://snomed.info/sct/900000000000207008/version/20250301
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-December 2024 v1.0
+
+ urn:uuid:b10abfd0-aab2-4132-8d6c-a615dd89668c
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2025-10-08T13:03:30+02:00
+ 2024-12-15T01:00:00+01:00
+ December 2024 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20241215
+
+ http://snomed.info/sct/900000000000207008/version/20241201
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-July 2025 v1.0
+
+ urn:uuid:9405e883-7473-446b-9e1c-0090b7e6bc32
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2025-10-09T11:58:05+02:00
+ 2025-07-15T02:00:00+02:00
+ July 2025 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20250715
+
+ http://snomed.info/sct/900000000000207008/version/20250701
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-November 2025 v1.0
+
+ urn:uuid:faf133c8-864a-4b96-9765-41d0c3cb592c
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2025-11-14T10:41:25+01:00
+ 2025-11-15T01:00:00+01:00
+ November 2025 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20251115
+
+ http://snomed.info/sct/900000000000207008/version/20251101
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-February 2025 v1.0
+
+ urn:uuid:f30fd3c1-2552-4ac6-83eb-fddb7a491f19
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2025-10-08T13:03:09+02:00
+ 2025-02-15T01:00:00+01:00
+ February 2025 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20250215
+
+ http://snomed.info/sct/900000000000207008/version/20250201
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-October 2025 v1.0
+
+ urn:uuid:de26db80-c7be-48e1-82e8-cee62ad62832
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2025-10-29T11:17:54+01:00
+ 2025-10-15T02:00:00+02:00
+ October 2025 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20251015
+
+ http://snomed.info/sct/900000000000207008/version/20251001
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ Belgian National Edition-May 2026 v1.0
+
+ urn:uuid:a886d280-f3d2-4269-9552-e44559a0715e
+
+ terminologie@health.belgium.be
+ Terminology Center Belgium
+ www.health.belgium.be
+
+ © International Health Terminology Standards Development Organisation 2002-2023. All rights reserved. SNOMED CT® was originally created by the College of American Pathologists. "SNOMED" and "SNOMED CT" are registered trademarks of International Health Terminology Standards Development Organisation, trading as SNOMED International.
+ 2026-05-13T15:04:57+02:00
+ 2026-05-15T02:00:00+02:00
+ May 2026 SNOMED CT Managed Service Belgium Edition release
+
+
+ http://snomed.info/sct/11000172109
+ http://snomed.info/sct/11000172109/version/20260515
+
+ http://snomed.info/sct/900000000000207008/version/20260501
+
+
+ SNOMED International MLDS Terminology Release Syndication Feed
+ urn:uuid:5c26c3ca-c21c-476e-b0a4-096679529f2e
+
+
+
+
+ BeRiskManifestation
+
+ urn:uuid:47fc1fbb-74ba-301b-adab-ce39de42afdd
+
+ eHealth Platform
+
+ 2025-06-17T11:09:37.838+02:00
+ 2023-12-18T12:02:54+01:00
+ Codes as communicated by NIHDI and the FPS Terminology Center differentiating types of risk manifestation. This valueset supports the Belgian federal FHIR profiling effort.
+
+
+ https://www.ehealth.fgov.be/standards/fhir/allergy/ValueSet/be-riskmanifestation
+ 1.2.0
+ 4.0
+
+
+ BeNoAllergy
+
+ urn:uuid:3bff7bb6-39d9-3e5c-a75f-5e3e50ab2354
+
+ eHealth Platform
+
+ 2025-06-17T13:19:21.241+02:00
+ 2023-12-18T12:02:54+01:00
+ Codes as communicated by the FOD Terminology Center differentiating types of no allergies. This valueset supports the Belgian federal FHIR profiling effort.
+
+
+ https://www.ehealth.fgov.be/standards/fhir/allergy/ValueSet/be-noallergy
+ 1.2.0
+ 4.0
+
+
+ BeVSVaccineCode
+
+ urn:uuid:9e3b35f9-611c-3b15-8134-9a5b1e8dce48
+
+ eHealth Platform
+
+ * This value set includes content from SNOMED CT, which is copyright © 2002+ International Health Terminology Standards Development Organisation (IHTSDO), and distributed by agreement between IHTSDO and HL7. Implementer use of SNOMED CT is not covered by this agreement
+
+* The SNOMED International IPS Terminology is distributed by International Health Terminology Standards Development Organisation, trading as SNOMED International, and is subject the terms of the [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/). For more information, see [SNOMED IPS Terminology](https://www.snomed.org/snomed-ct/Other-SNOMED-products/international-patient-summary-terminology)
+
+* The HL7 International IPS implementation guides incorporate SNOMED CT®, used by permission of the International Health Terminology Standards Development Organisation, trading as SNOMED International. SNOMED CT was originally created by the College of American Pathologists. SNOMED CT is a registered trademark of the International Health Terminology Standards Development Organisation, all rights reserved. Implementers of SNOMED CT should review [usage terms](https://www.snomed.org/get-snomed) or directly contact SNOMED International: info@snomed.org
+ 2025-06-17T13:38:20.045+02:00
+ 2025-03-24T16:01:36+01:00
+ Vaccine Code Value Set - the types of vaccines that are administered in Belgium
+
+
+ https://www.ehealth.fgov.be/standards/fhir/vaccination/ValueSet/be-vs-vaccine-code
+ 1.1.1
+ 4.0
+
+
+ BeCausativeAgent
+
+ urn:uuid:f7d95157-9c05-3fdc-9d3e-fa7b9a0234ab
+
+ eHealth Platform
+
+ This value set includes content from SNOMED CT, which is copyright © 2002+ International Health Terminology Standards Development Organisation (SNOMED International), and distributed by agreement between SNOMED International and HL7. Implementer use of SNOMED CT is not covered by this agreement
+ 2025-06-17T11:01:10.534+02:00
+ 2023-12-18T12:02:54+01:00
+ Causative Agents for Allergy (non medication)
+
+
+ https://www.ehealth.fgov.be/standards/fhir/allergy/ValueSet/be-causativeagent
+ 1.2.0
+ 4.0
+
+
+ Length of attachment
+
+ urn:uuid:1567d3df-58fb-3190-9ff6-f279749c39f6
+
+ CSIRO
+
+ 2025-03-27T16:20:34.604+01:00
+ 2020-12-11T13:29:10+01:00
+ The length of the referenced attachment.
+
+
+ http://ontoserver.csiro.au/profiles/attachment-len
+ 6.1.4
+ 4.0
+
+
+ Default SNOMED Edition
+
+ urn:uuid:23710397-20c0-3f22-88d5-e680636f76c6
+
+ CSIRO
+
+ 2025-03-27T16:20:35.216+01:00
+ 2020-07-14T09:01:39+02:00
+ The default SNOMED edition used by the server
+
+
+ http://ontoserver.csiro.au/fhir/StructureDefinition/defaultsnomededition
+ 0.1.0
+ 4.0
+
+
+ Minimal Ontoserver CodeSystem
+
+ urn:uuid:b782b8a5-ed34-32a8-8170-9b818e1e57d9
+
+ CSIRO
+
+ 2025-03-27T16:20:33.677+01:00
+ 2020-07-16T00:00:00+02:00
+ Every CodeSystem in Ontoserver MUST have a url
+
+
+ http://ontoserver.csiro.au/fhir/StructureDefinition/minimalcodesystem
+ 1.0.3
+ 4.0
+
+
+ Minimal Ontoserver ConceptMap
+
+ urn:uuid:2579e547-0590-3116-a560-ab34b799aa7c
+ 2025-03-27T16:20:34.040+01:00
+ 2020-07-16T00:00:00+02:00
+ Every ConceptMap in Ontoserver MUST have a url
+
+
+ http://ontoserver.csiro.au/fhir/StructureDefinition/minimalconceptmap
+ 1.0.3
+ 4.0
+
+
+ Minimal Ontoserver ValueSet
+
+ urn:uuid:546df236-00ef-3f30-a603-ecddaf7a4fe4
+
+ CSIRO
+
+ 2025-03-27T16:20:34.235+01:00
+ 2020-07-16T00:00:00+02:00
+ Every ValueSet in Ontoserver MUST have a url
+
+
+ http://ontoserver.csiro.au/fhir/StructureDefinition/minimalvalueset
+ 1.0.3
+ 4.0
+
+
+ CodeSystem Provenance
+
+ urn:uuid:a327e4f4-51f5-3c16-97a5-ed9fc8e837bb
+
+ CSIRO
+
+ 2025-03-27T16:20:34.360+01:00
+ 2020-12-11T06:38:23+01:00
+ Link from a generated CodeSystem resource (usually for SNOMED CT) to Provenance information with details of the input data and system that were used to generate the CodeSystem resource.
+
+
+ http://ontoserver.csiro.au/profiles/cs-provenance
+ 1.0.1
+ 4.0
+
+
+ SHA256 of attachment
+
+ urn:uuid:1e39bd40-0d81-380e-80d6-5f827723c215
+
+ CSIRO
+
+ 2025-03-27T16:20:34.726+01:00
+ 2020-12-11T13:29:10+01:00
+ The SHA256 of the referenced attachment.
+
+
+ http://ontoserver.csiro.au/profiles/attachment-sha256
+ 6.1.4
+ 4.0
+
+
+ Provenance Attachment Metadata
+
+ urn:uuid:de033a6d-5db9-3092-a9e9-fcf87260a93a
+
+ CSIRO
+
+ 2025-03-27T16:20:34.827+01:00
+ 2020-12-11T13:29:10+01:00
+ Metadata (len, SHA256) of Attachment used in CodeSystem Provenance extension.
+
+
+ http://ontoserver.csiro.au/profiles/attachment-provenance
+ 6.1.4
+ 4.0
+
+
+ Shareable CodeSystem
+
+ urn:uuid:232cbc11-68c8-3062-b804-1b245f7141e5
+
+ HL7
+
+ 2025-03-27T16:20:34.957+01:00
+ 2019-10-31T23:29:23+01:00
+ Enforces the minimum information set for the value set metadata required by HL7 and other organizations that share and publish value sets
+
+
+ http://hl7.org/fhir/StructureDefinition/shareablecodesystem
+ 4.0.1
+ 4.0
+
+
+ Shareable ValueSet
+
+ urn:uuid:1f61dd5e-354d-39f2-b5d0-2558f366d268
+
+ HL7
+
+ 2025-03-27T16:20:35.107+01:00
+ 2019-10-31T23:29:23+01:00
+ Enforces the minimum information set for the value set metadata required by HL7 and other organizations that share and publish value sets
+
+
+ http://hl7.org/fhir/StructureDefinition/shareablevalueset
+ 4.0.1
+ 4.0
+
+
+ NCTS Complete Code System
+
+ urn:uuid:b7dc2652-e100-393e-b0f8-e937c3f69874
+
+ Australian Digital Health Agency
+
+ 2026-02-12T13:58:09.035+01:00
+ 2020-01-30T15:00:00+01:00
+ This StructureDefinition describes the NCTS Complete Code System, a profile of the FHIR® CodeSystem resource. The NCTS Complete Code System is designed to represent terminologies published as part of the National Clinical Terminology Service, and maximise interoperability within the NCTS ecosystem.
+
+
+ https://healthterminologies.gov.au/fhir/StructureDefinition/complete-code-system-4
+ 4.0.0
+ 4.0
+
+
+ NCTS Composed Value Set
+
+ urn:uuid:37781a46-ff01-3c7d-bde3-3443c5d118d0
+
+ Australian Digital Health Agency
+
+ 2026-02-12T13:58:09.643+01:00
+ 2023-07-30T16:00:00+02:00
+ This StructureDefinition describes the NCTS Composed Value Set, a profile of the FHIR® ValueSet resource. The NCTS Composed Value Set is designed to represent value sets published as part of the National Clinical Terminology Service, and maximise interoperability within the NCTS ecosystem.
+
+
+ https://healthterminologies.gov.au/fhir/StructureDefinition/composed-value-set-4
+ 4.1.0
+ 4.0
+
+
+ NCTS Expanded Value Set
+
+ urn:uuid:e5600c22-476f-34bb-a9f1-cb424f78571d
+
+ Australian Digital Health Agency
+
+ 2026-02-12T13:58:09.971+01:00
+ 2020-01-30T15:00:00+01:00
+ This StructureDefinition describes the NCTS Expanded Value Set, a profile of the FHIR® ValueSet resource. The NCTS Expanded Value Set is designed to describe expansions of value sets published as part of the National Clinical Terminology Service, and maximise interoperability within the NCTS ecosystem.
+
+
+ https://healthterminologies.gov.au/fhir/StructureDefinition/expanded-value-set-4
+ 4.0.0
+ 4.0
+
+
+ NCTS General Concept Map
+
+ urn:uuid:a8c5a58d-ae5b-3c80-aebd-08af2c97d94b
+
+ Australian Digital Health Agency
+
+ 2026-02-12T13:58:10.224+01:00
+ 2020-01-30T15:00:00+01:00
+ This StructureDefinition describes the NCTS General Concept Map, a profile of the FHIR® CodeSystem resource. The NCTS General Concept Map is designed to represent mappings between terminologies published as part of the National Clinical Terminology Service, and maximise interoperability within the NCTS ecosystem.
+
+
+ https://healthterminologies.gov.au/fhir/StructureDefinition/general-concept-map-4
+ 4.0.0
+ 4.0
+
+
+ Ontoserver Subscription Profile
+
+ urn:uuid:9824a942-a257-3eac-ac88-ef1bb951f409
+
+ CSIRO
+
+ 2026-04-30T11:58:43.925+02:00
+ 2025-08-27T03:24:55+02:00
+ Profile for the creation of a Subscription in Ontoserver
+
+
+ http://ontoserver.csiro.au/fhir/StructureDefinition/ontoserversubscription
+ 1.0.3
+ 4.0
+
+
+ Binary Index SNOMED_CT
+
+ urn:uuid:ce59de87-8b52-3e6f-af95-bfa056cc3abe
+
+ Ontoserver
+
+ 2026-02-12T11:23:03.086+01:00
+
+ http://snomed.info/sct
+ http://snomed.info/sct/11000172109/version/20251215
+
+
+ Binary Index SNOMED_CT
+
+ urn:uuid:d4439044-548d-3a94-8237-ada8394dfc0f
+
+ Ontoserver
+
+ 2025-09-03T14:27:08.395+02:00
+
+ http://snomed.info/sct
+ http://snomed.info/sct/11000172109/version/20250715
+
+ http://ns.electronichealth.net.au/ncts/syndication/asf/profile/1.0.0
+
diff --git a/ontoserver_info/syndication_resp_snomed.xml b/ontoserver_info/syndication_resp_snomed.xml
new file mode 100644
index 00000000..24229b11
--- /dev/null
+++ b/ontoserver_info/syndication_resp_snomed.xml
@@ -0,0 +1,54 @@
+HTTP/1.1 200
+Date: Thu, 28 May 2026 11:51:05 GMT
+Server: Apache
+Content-Security-Policy: frame-ancestors 'self' https://*.health.fgov.be https://*.health.belgium.be https://fpshealth.atlassian.net
+X-Content-Type-Options: nosniff, nosniff
+Vary: Origin,Access-Control-Request-Method,Access-Control-Request-Headers,*
+X-Request-Id: 1be6cfe7-c690-461c-aae1-75823696cd3a
+X-Correlation-Id: 1be6cfe7-c690-461c-aae1-75823696cd3a
+Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+Pragma: no-cache
+Expires: Thu, 01 Jan 1970 00:00:00 GMT
+X-XSS-Protection: 1; mode=block
+Strict-Transport-Security: max-age=16070400
+X-Frame-Options: DENY
+Content-Type: application/atom+xml;charset=UTF-8
+Content-Length: 2701
+Connection: close
+
+
+
+ "Belgian Terminology Release Syndication Feed"
+
+
+ 2026-02-12T11:23:03.086+01:00
+ urn:uuid:1195d94b-c299-3cc9-98fd-3873e01e657b
+ Ontoserver® 6.25.1, CSIRO
+
+ Binary Index SNOMED_CT
+
+ urn:uuid:ce59de87-8b52-3e6f-af95-bfa056cc3abe
+
+ Ontoserver
+
+ 2026-02-12T11:23:03.086+01:00
+
+ http://snomed.info/sct
+ http://snomed.info/sct/11000172109/version/20251215
+
+
+ Binary Index SNOMED_CT
+
+ urn:uuid:d4439044-548d-3a94-8237-ada8394dfc0f
+
+ Ontoserver
+
+ 2025-09-03T14:27:08.395+02:00
+
+ http://snomed.info/sct
+ http://snomed.info/sct/11000172109/version/20250715
+
+ http://ns.electronichealth.net.au/ncts/syndication/asf/profile/1.0.0
+
diff --git a/ontoserver_info/termserver.ini b/ontoserver_info/termserver.ini
new file mode 100644
index 00000000..c18acb4a
--- /dev/null
+++ b/ontoserver_info/termserver.ini
@@ -0,0 +1,3 @@
+[terminology]
+username = jose.a.teixeira@gmail.com
+password = 9QsfqcXqrTBSW
\ No newline at end of file
diff --git a/ontoserver_info/token.txt b/ontoserver_info/token.txt
new file mode 100644
index 00000000..79925b87
--- /dev/null
+++ b/ontoserver_info/token.txt
@@ -0,0 +1 @@
+eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJOM3llSnlYM0JNYUVGUWlIT0FYS09jenFiZmRvTkpVUUxxTm1XM1RXQ3RBIn0.eyJleHAiOjE3Nzk5OTQwNDIsImlhdCI6MTc3OTk5MjI0MiwianRpIjoib25ydHJvOjIwMTRiZWQ5LTQ5Y2MtYzljMS1lMzJmLTMxNTgyZTY5ZjMwMSIsImlzcyI6Imh0dHBzOi8vb250b2Nsb2FrLmFwcHMuaGVhbHRoLmJlbGdpdW0uYmUvYXV0aC9yZWFsbXMvVGVybWlub2xvZ3kiLCJhdWQiOlsiaHR0cHM6Ly9hcHBzLmhlYWx0aC5iZWxnaXVtLmJlL29udG9zZXJ2ZXIvZmhpciIsImFjY291bnQiXSwic3ViIjoiOTNkZWQwMWEtYTQyZi00OWY4LTlmZGYtMzM0YTNiM2Y2NWFlIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoidGVybWlub2xvZ3ktc2VydmVyIiwic2lkIjoiMzFlYjE4YzAtY2QzMy00NTJmLWI0YjEtNGI4NmJjYWE0MmM5IiwiYWNyIjoiMSIsImFsbG93ZWQtb3JpZ2lucyI6WyJodHRwczovL2FwcHMuaGVhbHRoLmJlbGdpdW0uYmUiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNvbnN1bWVyIiwiZGVmYXVsdC1yb2xlcy10ZXJtaW5vbG9neSIsIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJ0ZXJtaW5vbG9neS1zZXJ2ZXIiOnsicm9sZXMiOlsiU1lORF9SRUFEIiwiRkhJUl9SRUFEIiwiQVBJX1JFQUQiXX0sImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoicHJvZmlsZSBlbWFpbCBvbnRvc2VydmVyX3Njb3BlIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsIm5hbWUiOiJKb3NlIENvc3RhIFRlaXhlaXJhIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiam9zZS5hLnRlaXhlaXJhQGdtYWlsLmNvbSIsImdpdmVuX25hbWUiOiJKb3NlIiwiZmFtaWx5X25hbWUiOiJDb3N0YSBUZWl4ZWlyYSIsImVtYWlsIjoiam9zZS5hLnRlaXhlaXJhQGdtYWlsLmNvbSIsImF1dGhvcml0aWVzIjpbIlNZTkRfUkVBRCIsIkZISVJfUkVBRCIsIkFQSV9SRUFEIl19.fxK2I7fMOCjMXgYgHxsO_EAh9-Q2rSabX1I25M5J3l1mpB-VgbmKHGhu9v9am81ckzcDezxO6QaiIu9bieCjn4d_S5QyWCZrmgPqryN7mZcYMLHAO6_nxSDyQppB-zVgFk6VABG1FzH2lZFUy9NmAwsaROzvsXWCa-bKkbjOYJVnSg0lmesXXgbTwk879CQnVBHmQOBsMGgzg6EUVPOAAOqeKpo4-_RkjCcszAUxy-YHtB2P-NXXpLDl4dBjzoOTLafL1W4nwUywTe--ec9zXzspySTujDvvzRnwJ5Xbw05e9jQmIWzMKI3SGRd3kG5pYO606f5YDmACLsXN60QRDQ
\ No newline at end of file
diff --git a/server.js b/server.js
index 48b40acc..3cd38008 100644
--- a/server.js
+++ b/server.js
@@ -158,6 +158,7 @@ const RegistryModule = require('./registry/registry.js');
const PublisherModule = require('./publisher/publisher.js');
const NpmProjectorModule = require('./npmprojector/npmprojector.js');
const TXModule = require('./tx/tx.js');
+const FeedModule = require('./feed/feed.js');
const TestingModule = require('./testing/testing.js');
const IpsModule = require('./ips/ips.js');
@@ -414,6 +415,19 @@ async function initializeModules() {
}
}
+ // Initialize Feed module (Atom syndication producer)
+ if (config.modules?.feed?.enabled) {
+ try {
+ serverLog.info('Initializing module: feed...');
+ modules.feed = new FeedModule(stats);
+ await modules.feed.initialize(config.modules.feed);
+ app.use('/feed', modules.feed.router);
+ } catch (error) {
+ serverLog.error('Failed to initialize Feed module:', error);
+ throw error;
+ }
+ }
+
if (config.modules?.['ext-tracker']?.enabled) {
try {
diff --git a/tx/library.js b/tx/library.js
index 0b493f82..ecbd6385 100644
--- a/tx/library.js
+++ b/tx/library.js
@@ -3,6 +3,7 @@ const path = require('path');
const crypto = require('crypto');
const yaml = require('yaml'); // npm install yaml
const { PackageManager, PackageContentLoader } = require('../library/package-manager');
+const AtomConsumer = require('../library/atom-consumer');
const { FolderContentLoader, FileContentLoader } = require('../library/folder-content-loader');
const { CodeSystem } = require("./library/codesystem");
const { assertNoActiveContent } = require('../library/narrative-check');
@@ -513,6 +514,8 @@ class Library {
await this.loadOcl(details, isDefault, mode);
break;
+ case 'atom':
+ await this.loadAtom(details, isDefault, mode);
case 'folder':
await this.loadFolder(details, isDefault, mode);
break;
@@ -987,6 +990,42 @@ class Library {
this.#logPackage(contentLoader.id(), contentLoader.version(), csc, vs ? vs.vsCount() : 0);
}
+ // ---------- Atom syndication consumer (Phase 2) ----------
+ //
+ // An `atom:` source expands at startup into one virtual sub-source
+ // per Atom , then defers to the existing per-type loaders (`npm:`,
+ // `loinc:`, `snomed:`, …). All enclosures land in the same terminology-cache
+ // folder as the rest, so subsequent runs find them cached.
+ //
+ // The expansion happens on the first pass (mode=='fetch'); the result is
+ // memoised on `this._atomFeedCache` so the cs/npm passes don't refetch.
+ async loadAtom(feedUrl, _isDefault, mode) {
+ if (!this._atomFeedCache) this._atomFeedCache = new Map();
+ let subSources = this._atomFeedCache.get(feedUrl);
+
+ if (!subSources) {
+ if (mode !== 'fetch') {
+ // load() always runs the fetch pass first, so we shouldn't get here.
+ throw new Error(`Atom feed not pre-fetched: ${feedUrl}`);
+ }
+ if (!this._atomConsumer) {
+ this._atomConsumer = new AtomConsumer(this.cacheFolder, this.log);
+ }
+ subSources = await this._atomConsumer.expand(feedUrl);
+ this._atomFeedCache.set(feedUrl, subSources);
+ this.log.info(`Atom feed expanded to ${subSources.length} source(s)`);
+ }
+
+ // Recursively process expanded sources for whichever mode we're in.
+ // isDefault is intentionally not propagated to children — feed-level
+ // default makes no sense when entries are different code systems.
+ for (const sub of subSources) {
+ await this.processSource(sub, this.packageManager, mode);
+ }
+ }
+
+ async loadUrl(packageManager, url, isDefault, mode, csOnly) {
+ const packagePath = await packageManager.fetchUrl(url);
/**
* Loads CodeSystem / ValueSet / ConceptMap resources from any *.json file in a folder.
* The folder is scanned (top level only); each JSON file is read and routed to the