Skip to main content

Add a diabetic retinopathy screening form and API to use with a fundus camera for clinicedc

Project description

pypi actions codecov downloads clinicedc

edc-retinopathy

Add a diabetic retinopathy screening form and REST API for integrating with a fundus camera in a clinicedc project.

A clinician creates a CameraSession in the EDC before the exam. The camera software (fundus-camera-watchdog) resolves the subject, uploads eye images, DICOM files and reports, then checks status.

Requires django>=5.2,<6.1 and djangorestframework>=3.16.0

REST API

All endpoints use TokenAuthentication.

GET /api/retinopathy/ping/

Health check. Returns {"status": "ok"}.

POST /api/retinopathy/resolve/

Confirm a CameraSession exists for a subject. Payload:

{"subject_identifier": "105-10-0001-2"}

Returns 200 with camera_session_id and uploaded list, or 404 if no session exists.

POST /api/retinopathy/<subject_identifier>/<file_type>/

Upload a file. Multipart form with file, capture_datetime, and optional checksum (SHA-256). Valid file types:

  • left, right – eye images (JPEG/PNG)

  • left_dicom, right_dicom – DICOM files

  • left_report, right_report, report – reports (PDF/HTML)

Multiple files per type are accepted. Files are stored with their original filenames under <storage_dir>/images/<session_pk>/.

GET /api/retinopathy/<subject_identifier>/status/

Session status: uploaded types, missing types, and whether the session is complete.

Models

CameraSession

Created by the clinician in the EDC. Links to RegisteredSubject and stores contra-indication screening fields, report type (combined / per-eye), and device ID.

SessionFile

One record per uploaded file. Tracks file type, original filename, stored path, content type, size, SHA-256 checksum, and capture timestamp.

Settings

EDC_RETINOPATHY_STORAGE_DIR

Base path for file storage. Must contain an images/ subdirectory.

EDC_RETINOPATHY_MAX_FILE_SIZE_MB

Maximum upload size in MB (default: 10).

See also https://edc-retinopathy.readthedocs.io/en/latest/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

edc_retinopathy-0.7.1.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

edc_retinopathy-0.7.1-py3-none-any.whl (62.6 kB view details)

Uploaded Python 3

File details

Details for the file edc_retinopathy-0.7.1.tar.gz.

File metadata

  • Download URL: edc_retinopathy-0.7.1.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for edc_retinopathy-0.7.1.tar.gz
Algorithm Hash digest
SHA256 99102b8e59304d5fe120003462c5f2f4259519a8e7be1bfc4cbbcd9fdd6a628b
MD5 c1297e7858e976ee9ec7bb07fc8b8732
BLAKE2b-256 b4c0e599aae3766dda53be760993e5b17c25aef7a8106faf5a2ff0f2225d818c

See more details on using hashes here.

File details

Details for the file edc_retinopathy-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: edc_retinopathy-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 62.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for edc_retinopathy-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 616201129735e58ae497ec9d57201db554ed6151cce2e3368ebb0b435a0130b9
MD5 333b361eaca5d12805598d5a387bed0f
BLAKE2b-256 ff1db0120e7010f4482551795a25c80065f75fdb1f27929b959d70901562e474

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page