Skip to content
Blazej Mrozinski

KPS

Clinical Psychometrics Case Study badania.org

The Challenge

Klinika Psychiatrii Sądowej, a forensic-psychiatry clinic, needed to run a battery of standardized and custom psychological instruments as routine clinical work: administer each test, score it correctly against published norms and clinical cutoffs, store the results, and track clinically meaningful change over time. Building one app per instrument doesn't scale. And the data is the hardest kind to hold — special-category health data under RODO Article 9, in a forensic setting where every result has to be defensible. The real problem wasn't any single test; it was a system that could absorb new instruments cheaply without re-engineering scoring, security, or reporting each time.

The Approach

I designed the measurement around a single declarative test engine. Each instrument is a version-controlled definition — items, scales, reverse-keying, norms (sten / T-score / percentile), cutoffs, and result widgets — fed through one pure scoring engine. Adding an instrument means authoring a definition, not writing new code. Standard scales drop straight in; non-standard ones go through a custom-scoring path — IPSA's sex-specific sten norms, the C-SSRS suicide-risk triage. Results are frozen on completion, and change between administrations is reported with reliable-change methods (score deltas and a Reliable Change Index) so clinicians see genuine change rather than measurement noise. Security and RODO were designed in from the first commit, not bolted on afterwards.

Results

  • One declarative test engine running a battery of ~10 instruments: GAD-7, PHQ-9, AUDIT, DAST-10, PQ-16, CAPE-42, PDI-21, BPRS-18, C-SSRS, and IPSA
  • Standardized scoring against published norms (sten / T-score / percentile) and clinical cutoffs, plus a custom-scoring path for non-standard instruments
  • Reliable-change tracking (RCI) so repeat testing distinguishes real change from measurement error
  • Confidential PDF result sheets and printable blank forms generated per instrument
  • RODO Article 9 protection built in: field-level encryption at rest, append-only audit log, passwordless authentication, need-to-know access control
  • Deployed and running for the clinic at kps.badania.org
Declarative Test EngineClassical Test TheoryNorm Development (sten / T / percentile)Reliable Change Index (RCI)Clinical Instrument SelectionRODO / Article 9 Data Protection

What made this engagement custom wasn’t one specially-built test — it was refusing to build one system per instrument. A forensic-psychiatry clinic doesn’t use a single questionnaire; it uses a shifting battery — anxiety and depression screens, substance-use measures, psychosis and delusion scales, a clinician-rated symptom inventory, suicide-risk triage, an aggression-syndrome inventory. Build those as ten separate tools and you get ten places to maintain scoring, security, and reporting. Build one declarative test engine and each new instrument is a definition file, not a development project.

The engine is the hinge. A test is described, not coded: its items, scales, reverse-keyed items, norms and cutoffs all live in a version-controlled definition that a pure scoring function reads. Standard instruments slot in directly; the awkward ones — IPSA’s sex-specific sten norms, the C-SSRS risk logic — use a custom-scoring escape hatch so a non-standard scale never forces a redesign of the standard path.

The part that matters clinically is change over time. Re-test a patient and the raw difference in scores is mostly noise unless you know how reliable the instrument is. The panel reports a Reliable Change Index, so a clinician sees whether a shift between two administrations is large enough to exceed measurement error — real movement, not chance.

And because this is forensic psychological assessment on special-category health data, the security wasn’t a later phase. Field-level encryption, an append-only audit log, passwordless access, and need-to-know controls were in from the start, because under RODO Article 9 a forensic record that leaks or can’t account for who saw it is a failure regardless of how good the psychometrics are.

This was built and deployed through badania.org, my custom psychometric test development practice, and it runs for the clinic at kps.badania.org. The full build — engine, instruments, and the security architecture — is written up in Building a Custom Diagnostic Panel for a Forensic-Psychiatry Clinic.