RAI PACS Developer Platform

Bulut PACS, DICOM gateway ve AI raporlama icin teknik merkez.

dev.raipacs.com; RAI PACS mimarisi, entegrasyon yuzeyleri, DICOM aktarim bilgileri, AI servisleri ve surum notlari icin canli dokumantasyon alanidir.

Guides

Baslangic noktasi

Architecture

Cift katmanli PACS veri ayrimi

RAI PACS metadata ve buyuk DICOM nesnelerini ayirir. PostgreSQL; organizasyon, sube, hasta, tetkik, seri, instance, rapor, audit ve yetki metadata bilgisini tutar. Supabase Storage ise orijinal DICOM dosyalarini private dicom-originals bucket alaninda saklar.

ModaliteDICOM GatewayStorageMetadata DBRAI Viewer / OHIF
Storage key:
{organization_id}/{study_instance_uid}/{series_instance_uid}/{sop_instance_uid}.dcm

DICOM

DICOM Gateway baglanti bilgileri

Host
dicom.raipacs.com
Port
4242
Called AE Title
RAIPACS
Protocol
DICOM C-STORE, C-ECHO/Verify

Modalite kaynak AE Title, kaynak IP, Called AE ve opsiyonel kurulus/sube kodu ile eslestirilir. Gelisen canli kurulumda once serbest erisim, hastane canli gecisinde IP veya ulke bazli firewall kisitlamasi uygulanir.

Viewer

RAI Viewer ve OHIF koprusu

RAI Viewer radyolog icin ana is istasyonudur. Scroll, pan, window/level, zoom, fit, frame ok tuslari, seri paneli, preview/liste modu, privacy mode ve AI on rapor paneli birlikte calisir. OHIF yeni sekme artik RAI kontrollu launch katmanindan acilir; harici OHIF viewer fallback olarak korunur.

  • Frame cache ve preview katmani viewer performansini hizlandirir.
  • Renkli US gibi farkli fotometrik yorumlar desteklenir.
  • OHIF hasta oturumu ayni hastanin son tetkiklerini tek dicomjson manifestinde acar.
  • RAI OHIF Gateway signed token, DICOMweb root ve RAI-hosted OHIF launch aksiyonlarini tek ekranda tasir.
  • Self-host OHIF static viewer /ohif-viewer altinda RAI domaininden servis edilir.
  • Public OHIF sadece teknik fallback olarak kodda korunur; ana akis RAI domainindedir.
  • Harici paylasim linkleri privacy mode on varsayimi ile calisir.

Faz 2 hedefi self-host OHIF ve DICOMweb endpoint olarak ilerler. Gateway katmani ve static OHIF shell hazirdir; sonraki adim OHIF datasource'u dogrudan /ohif/config ve /dicomweb uzerinden sertlestirmektir.

GET /dicomweb/studies
GET /dicomweb/studies/{StudyInstanceUID}/series
GET /dicomweb/studies/{StudyInstanceUID}/series/{SeriesInstanceUID}/instances
GET /dicomweb/studies/{StudyInstanceUID}/metadata
GET /dicomweb/studies/{StudyInstanceUID}/series/{SeriesInstanceUID}/instances/{SOPInstanceUID}/frames/1

API

Public ve signed teknik yuzeyler

MethodPathKapsamYetki
GET/ohifRAI kontrollu OHIF launch sayfasiSigned launch token
GET/ohif/configSelf-host OHIF DICOMweb datasource configSigned launch token
GET/viewer-data/studies/:studyIdOHIF dicomjson metadataSigned launch token
GET/HEAD/viewer-data/instances/:instanceIdRange destekli DICOM instance proxySigned launch token
GET/dicomweb/studiesQIDO-RS study aramaRAI oturumu veya Bearer launch token
GET/dicomweb/studies/:studyUid/seriesQIDO-RS series aramaRAI oturumu veya Bearer launch token
GET/dicomweb/studies/:studyUid/series/:seriesUid/instancesQIDO-RS instance aramaRAI oturumu veya Bearer launch token
GET/HEAD/dicomweb/studies/:studyUid/series/:seriesUid/instances/:sopUidWADO-RS raw DICOM instance retrieveRAI oturumu veya Bearer launch token
GET/dicomweb/studies/:studyUid/series/:seriesUid/instances/:sopUid/frames/:frameListWADO-RS frame retrieveRAI oturumu veya Bearer launch token
GET/viewer-data/ohif-sessionOHIF icin hasta bazli coklu tetkik dicomjson manifestiSigned multi-study launch token
POST/api/shareSureli harici paylasim linkiRAI oturumu
GET/api/share/:token veya /share?s=:idPaylasim onizleme ve OHIF acilisSureli share token
GET/POST/api/jobs/ai-provider-healthGunluk AI provider saglik testi ve e-posta raporuVercel Cron Bearer token

DICOM instance proxy Range headerlarini upstream Storage signed URL tarafina tasir. DICOMweb CORS RAI app, OHIF domaini ve public fallback viewer icin kisitli tutulur; RAI Viewer dahili signed URL akisini kullanir.

Database

Ana tablo ve sorumluluklar

organizationsTenant/konsolidasyon siniri
branchesMerkez, Dev, Kosova gibi sube ayrimi
organization_membersKullanici rol ve varsayilan sube
organization_member_branchesKullanici bazli sube yetkisi
patientsHasta demografi ve HIS kaynak alanlari
studies / series / instancesDICOM metadata hiyerarsisi
reportsTaslak ve nihai radyoloji raporlari
ai_service_providers / ai_jobsAI servis secimi ve is kuyrugu
ai_usage_eventsToken ve maliyet raporlama
external_study_sharesSureli guvenli paylasim linkleri

AI

AI servisleri ve on rapor akisi

AI islemi viewer icinden manuel baslatilir. Secilen provider ai_jobs kaydi olusturur, tetkik metadata verisi ve hazirlanan goruntu onizlemeleri provider adapter katmanina tasinir, sonuc ai_report_drafts icinde saklanir.

OpenAI / GPT-5.5
Claude
Gemini
Qwen Vision
DeepSeek
MedGemma endpoint
RAI LLM self-hosted
RAI AI Orchestrator
RaDialog preset

Token ve maliyet izleme ai_usage_events tablosu uzerinden Admin AI Servisleri ekraninda tarih araligi, provider, model ve rapor bazinda gosterilir.

HIS

HIS / RIS entegrasyon modeli

HIS tanimlari Admin panelinden sube bazli tutulur. HL7, REST ve planlanan DICOM Modality Worklist akislari icin vendor, protokol, mesaj tipleri, auth tipi ve test sonuc alanlari hazirdir.

  • Hasta demografi alanlari HIS kaynak kimlikleriyle genisletildi.
  • HIS kaynak alanlari yalnizca Admin grubunda gorunur.
  • Sube ve tenant ayrimi tek organizasyon icinde baslatildi.

Operations

Operasyon runbook

DICOM import: browser upload veya guvenli importer script
Importer hesabi: import penceresi disinda pasif tutulur
Gateway loglari: Admin DICOM Server panelinde izlenir
AI provider health: Vercel Cron 09:00 TR, Resend e-posta raporu
Harici paylasim: sureli token ve privacy mode on
npm run import:dicom-folder
npm run sync:orthanc-events
npm run sync:orthanc-logs

Changelog

Surum notlari

0.2.0-dev.22

Self-host OHIF RAI Viewer geri donusu eklendi

  • RAI OHIF launch linkleri artik self-host OHIF URL'ine guvenli returnUrl parametresi ekler.
  • OHIF static build patch'i returnUrl varsa sag ustte RAI Viewer'a donus butonu gosterir.
  • Return hedefi RAI app origin ve /viewer/ path'i ile sinirlandirilir.
0.2.0-dev.21

Self-host RAI OHIF static viewer eklendi

  • Build sirasinda @ohif/app 3.12.5 static dist indirilip /ohif-viewer altinda RAI domaininden servis edilir.
  • RAI Viewer ve OHIF Gateway linkleri public viewer.ohif.org yerine ohif.raipacs.com/ohif-viewer akisini kullanir.
  • OHIF asset path, webpack public path ve SPA rewrite kurallari /ohif-viewer prefix'i icin patchlenir.
0.2.0-dev.20

OHIF Gateway iframe fallback'i kaldirildi

  • Public viewer.ohif.org iframe icinde calismadigi icin gateway artik top-level launch akisi kullanir.
  • OHIF ayni sekmede ac ve yeni sekmede ac aksiyonlari signed DICOMweb token ile calisir.
  • Gomulu OHIF deneyimi self-host OHIF build fazina ayrildi; DICOMweb/config katmani korunur.
0.2.0-dev.19

RAI OHIF Gateway launch katmani eklendi

  • RAI Viewer OHIF butonlari artik dogrudan public OHIF yerine RAI /ohif launch sayfasina gider.
  • /ohif/config endpoint'i signed token ile DICOMweb datasource bilgisini uretir.
  • ohif.raipacs.com host rewrite hazirlandi; public viewer.ohif.org simdilik fallback olarak korunur.
0.2.0-dev.18

WADO-RS frame retrieve endpoint'i eklendi

  • DICOMweb altinda /frames/{frameList} endpoint'i eklendi.
  • Native uncompressed pixel data ve encapsulated compressed frame fragmentleri multipart/related yanit olarak doner.
  • Metadata Pixel Data BulkDataURI artik ilk frame endpoint'ine isaret eder.
0.2.0-dev.17

DICOMweb read-only API katmani baslatildi

  • RAI metadata ve Supabase Storage uzerinden QIDO-RS study, series ve instance arama endpointleri eklendi.
  • WADO-RS metadata ve raw DICOM instance retrieve endpointleri RAI oturumu veya signed launch token ile calisir hale getirildi.
  • Frame-level WADO-RS ve self-host OHIF datasource baglantisi bir sonraki faza ayrildi.
0.2.0-dev.16

OHIF hasta oturumu ve DICOMweb yol haritasi

  • RAI Viewer icine tek tetkik OHIF linkine ek olarak hasta bazli coklu tetkik OHIF oturumu eklendi.
  • Signed launch token artik tek study veya study-session kapsaminda birden fazla study tasiyabilir.
  • Uzun vadeli self-host OHIF + DICOMweb gecisi icin operasyon yol haritasi dokumante edildi.
0.2.0-dev.15

AI provider saglik cron job'u eklendi

  • Vercel Cron her gun Turkiye saatiyle 09:00'da aktif AI provider'lari test eder.
  • OpenAI, Claude, Gemini, Qwen, DeepSeek, MedGemma, RAI LLM ve RAI AI Orchestrator saglik sonucu support@raipacs.com adresine gonderilecek sekilde hazirlandi.
  • Qwen varsayilan modeli qwen-vl-max olarak guncellendi; eski latest model adlari runtime'da normalize edilir.
0.2.0-dev.14

RAI AI Orchestrator ve RAI LLM checklist eklendi

  • Admin AI Servisleri ekranina RAI LLM kurulum checklist'i eklendi.
  • RAI AI Orchestrator provider'i aktif olarak seed edilir ve manuel AI butonunda secilebilir.
  • Orchestrator RAI LLM, OpenAI, Gemini, Claude, MedGemma ve RAI Mock sirasiyla calisabilir provider'a route eder.
0.2.0-dev.13

RAI LLM GPU quota on kosulu netlestirildi

  • Cloud Run L4 GPU deploy script'i no-zonal-redundancy parametresiyle kalici hale getirildi.
  • Google Cloud Run NVIDIA L4 GPU kotasi 0 oldugunda deploy'un duracagi ve quota talebi gerektigi dokumante edildi.
  • RAI LLM runbook'u Cloud Run GPU quota kontrolu ve Vercel aktivasyon adimlariyla guncellendi.
0.2.0-dev.12

RAI LLM Vercel aktivasyon script'i eklendi

  • Cloud Run deploy sonrasinda endpoint ve token degerlerini rai-llm-vercel.env dosyasina yazan akis eklendi.
  • RAI LLM production env degerlerini Vercel'e tek komutla gecmek icin npm run configure:rai-llm:vercel script'i eklendi.
  • RAI LLM canli kullanim icin Cloud Run GPU endpoint, Vercel env ve Admin canli test adimlari netlestirildi.
0.2.0-dev.11

RAI LLM Cloud Run GPU deploy script'i eklendi

  • RAI LLM icin Google Cloud Run Gen2 + NVIDIA L4 GPU deploy script'i hazirlandi.
  • Artifact Registry build, Cloud Run deploy ve endpoint smoke-test akisi tek runbook'a baglandi.
  • Servis public HTTPS endpoint verir; erisim Bearer token ile uygulama icinde sinirlanir.
0.2.0-dev.10

RAI LLM operasyon durumu Admin ekranina eklendi

  • Admin AI Servisleri ekraninda RAI LLM provider, model, endpoint ve API token hazirlik durumu gosterilir.
  • Endpoint degeri maskeli gosterilir; secret degerleri UI'da aciga cikmaz.
  • Canli GPU endpoint hazir oldugunda kullanilacak smoke-test komutu ayni panelde yer alir.
0.2.0-dev.9

RAI LLM endpoint test ve operasyon runbook'u eklendi

  • RAI LLM OpenAI-compatible endpoint icin npm run test:rai-llm smoke-test komutu eklendi.
  • GPU endpoint kurulumu, Vercel env tanimlari ve canli test adimlari dokumante edildi.
  • Endpoint hazir oldugunda RAI Viewer AI akisi ayni provider uzerinden test edilebilir hale geldi.
0.2.0-dev.8

RAI LLM self-hosted model hatti baslatildi

  • RAI LLM provider seed'i ve RAI_LLM_ENDPOINT entegrasyonu eklendi.
  • Admin AI Servisleri sayfasi RAI LLM provider eksikse otomatik olusturur.
  • Qwen/Qwen2.5-VL-7B-Instruct tabanli OpenAI-compatible inference servisi hazirlandi.
  • RAI LLM modeli ileride RAI radyoloji veri setleriyle fine-tune edilebilir hat olarak konumlandi.
0.2.0-dev.7

Developer portal yayina hazirlandi

  • dev.raipacs.com host'u public teknik dokumantasyon sayfasina rewrite edilir.
  • Mimari, API, DICOM, AI, HIS ve operasyon notlari tek portalda toplandi.
  • Surum notlari icin RAI gelistirme akisi baslatildi.
0.2.0-dev.6

Admin kullanici ve sube yetkileri

  • Kullanici yonetimi acilir bloklara ve filtrelenebilir tabloya tasindi.
  • Dev ve Kosova subeleri olusturuldu; Admin varsayilan subesi Dev yapildi.
  • organization_member_branches ile kullanici bazli sube yetkisi eklendi.
0.2.0-dev.5

Rapor taslaklari ve AI goruntu onizleme

  • Ayni tetkik uzerinde birden fazla taslak rapor kaydi desteklendi.
  • DICOM preview verileri AI servislerine tasinabilir hale getirildi.
  • Gorunur hata mesajlarina kopyalama kontrolu eklendi.
0.2.0-dev.4

MedGemma ve tibbi AI presetleri

  • MedGemma endpoint adapter, retry ve cold-start toleransi eklendi.
  • OpenAI, Claude, Gemini, MedGemma ve RaDialog provider secenekleri ayni modelde toplandi.
  • AI provider hata durumlari viewer icinde daha acik gosterilmeye baslandi.
0.2.0-dev.3

Harici paylasim ve AI token raporlama

  • Sureli guvenli paylasim linkleri eklendi.
  • AI token tuketimi provider, model, rapor ve tarih araligi bazinda izlenebilir oldu.
  • OHIF icin viewer-data koprusu daha kararli hale getirildi.
0.2.0-dev.2

DICOM Server ve HIS yonetimi

  • DICOM modalite, gateway sagligi, baglanti loglari ve import kuyrugu Admin paneline eklendi.
  • HIS entegrasyon tanimlari, mesaj tipleri ve test aksiyonlari icin arayuz hazirlandi.
  • Branch ve modality matching temeli kuruldu.
0.2.0-dev.1

RAI PACS MVP veri modeli

  • Hasta, tetkik, seri, instance, rapor ve audit tablolarindan olusan temel PACS semasi olusturuldu.
  • Turkce karakter desteği, Supabase Storage ve DICOM import akisi MVP'ye alindi.
  • RAI Viewer ve OHIF koprusu ilk calisan surume geldi.