๐Ÿท๏ธ mdr-service

June 13, 2025 ยท View on GitHub

MegaLinter build docker codecov

RESTful API for the Marburg metadata repository

CDS Ontology API

MII Core Dataset ontology consisting of modules and concepts and their relations represented as a hierarchical tree structure.

Ontology data is used by the Marburg feasibility portal (FDPM) to query local DIC FHIR ๐Ÿ”ฅ data.

REST Endpoints


CDS modules (list, get single, create)

GET /ontology/modules (get all CDS module data)
Parameters

None

Responses
http codecontent-typeresponse
200application/jsonArray of modules
500text/plain;charset=UTF-8Error message
Example cURL
 curl -X GET http://localhost:3000/ontology/modules
POST /modules (create CDS module)
Parameters

None

Body
content-typedata typerequired
application/jsonModule objecttrue
Responses
http codecontent-typeresponse
201application/jsonThe newly created Module object
500text/plain;charset=UTF-8Error message
Example cURL
curl -X POST -H "Content-Type: application/json" --data @payload.json http://localhost:3000/ontology/modules
GET /ontology/modules/{id} (get CDS module by id)
Parameters
nametypedata typedescription
idrequiredstringThe module's unique identifier (uuid)
Responses
http codecontent-typeresponse
200application/jsonModule data
404text/plain;charset=UTF-8No module found with id: xyz
500text/plain;charset=UTF-8Error message
Example cURL
 curl -X GET http://localhost:3000/ontology/modules/xzy

Concepts and Ontology

GET /ontology/tree/{module_id} (get complete ontology concept tree by module id)
Parameters
nametypedata typedescription
module_idrequiredstringThe module's unique identifier (uuid)
Responses
http codecontent-typeresponse
200application/jsonNested ontology concept tree by module_id
500text/plain;charset=UTF-8Error message
Example cURL
 curl -X GET http://localhost:3000/ontology/tree/xzy
POST /ontology/concepts/search (search ontology concepts' display and code values by text)
Parameters

None

Body
content-typedata typerequired
application/jsonSearch object {"module_id": String, "search_term": String, "display": [null|"tree"]}true
Responses
http codecontent-typeresponse
200application/jsonArray of concepts matching the search term
400text/plain;charset=UTF-8Search term must consist of at least 2 characters
500text/plain;charset=UTF-8Error message
Example cURL
curl -X POST -H "Content-Type: application/json" --data @payload.json http://localhost:3000/ontology/concepts/search
GET /ontology/concepts/{id} (get concept by id)
Parameters
nametypedata typedescription
idrequiredstringThe concept's unique identifier (uuid)
Responses
http codecontent-typeresponse
200application/jsonConcept data
404text/plain;charset=UTF-8No concept found with id: xyz
500text/plain;charset=UTF-8Error message
Example cURL
 curl -X GET http://localhost:3000/ontology/concepts/xzy
PUT /ontology/concepts/{id} (upsert: create or update concept by id)
Parameters

None

Body
content-typedata typerequired
application/jsonConcept objecttrue
Responses
http codecontent-typeresponse
200application/jsonempty (concept updated)
201application/jsonempty (concept created)
500text/plain;charset=UTF-8Error message
Example cURL
curl -X POST -H "Content-Type: application/json" --data @payload.json http://localhost:3000/ontology/concepts/xzy

Configuration properties

Application properties are read from a properties file (app.yaml) with default values.

NameDefaultDescription
app.log_leveldebugLog level (error,warn,info,debug,trace)
database.urlPostgres database connection string
database.max_connectionsMax database connections
database.timeoutDatabase connection timeout in seconds

Environment variables

Override configuration properties by providing environment variables with their respective property names.

License

AGPL-3.0