Create an API for leaving comments on Orthanc resources (series)
The new-study list (imaging-development-env#40) includes an element which allows the users to add comments to a series (ohif-viewers#50).
Architectural notes:
- The API should be implemented in Orthanc with a
comments
permission which integrates it into the Sonador authorization system. - The API models should utilize a "DICOM extension model"
models/ext.py
as the base. The extension models in Orthanc are Sonador maintained extensions which provides additional functionality beyond what is implemented in Orthanc core or the DICOM standard. They follow general REST-like conventions present in the Sonador web application and other parts of the Oak-Tree platform. - The primary version of the API (consumed by the Sonador client) should utilize Orthanc UIDs.
- A secondary version of the API should also be created which is able to utilzie DICOM UIDs. #31 (closed)
Development tasks:
-
Create a model for series related comments -
Create a migration script -
Create a view for serving comments related to a series
- Create a security permission (in Sonador web application) and register the comments URL. sonador#52
- Create a DICOMweb compatible version of the API that can be used by the OHIF client and follows DICOMweb conventions. #31 (closed)
URL structure:
-
/series/{uid}/comments
: management endpoint-
GET
: retrieve a list of all comments for the series -
POST
: create a new comment
-
-
/series/{uid}/comments/{comment-uid}
: REST endpoint-
GET
: retrieve the JSON for the comment -
PUT
: update the comment -
DELETE
: remove the comment
-
New components:
-
OrthancBaseForm
: pydantic based validation model which can be used for sanitizing/validating data