SPECIFICATION SPEC-ID: PTF-2026-V2 VERSION 2.0.0

The Psychological Test Format (.ptf)

A standardized JSON schema for machine-readable clinical diagnostics, automated scoring, demographic norm transformations, and interoperable research data exchange.

Author / Editor Martin E. Gawron
Canonical URI https://fidetest.de/ptf.schema.json
MIME Type application/json
License MIT (Open Standard)
1.0 Abstract & Theoretical Scope

1. Background & The PDF Problem

Standardized psychological assessments (PHQ-9, GAD-7, BDI-II, WHO-5) form the foundation of evidence-based clinical diagnostics. Yet, their primary distribution medium remains the static PDF manual—a paradigm requiring manual administration, hand-scoring, and error-prone data transcription. Studies estimate scoring error rates of 20% to 60% in hand-scored clinical instruments (Simons, Goddard, & Patton, 2002).

The Psychological Test Format (.ptf / PTF v2.0) eliminates these vulnerabilities by providing an open, self-contained JSON specification encoding item definitions, typed responses, algorithmic scoring formulas, severity classifications, and demographic norm matrices (Percentile ranks, T-Scores, Stanine, Z-Scores).

RFC 2119 Conformance Clause:

The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL in this document are to be interpreted as described in BCP 14, RFC 2119.

A document is a conforming PTF Document if and only if it satisfies all constraints declared in this specification and passes schema validation against the canonical URI https://fidetest.de/ptf.schema.json.

2.0 Comparative Analysis

2. Positioning Relative to Existing Health Standards

Unlike regulatory clinical trial formats (CDISC ODM) or generic EHR transport layers (HL7 FHIR), PTF is engineered specifically for the complete psychometric lifecycle:

Dimension PTF v2.0 CDISC ODM HL7 FHIR Q. REDCap PsychDS
Format JSON-Native XML JSON CSV / Custom Dir / JSON-LD
Self-Contained Yes (Complete) No No No No
Embedded Scoring Yes No No Partial No
Demographic Norms Yes (T, %, Stanine) No No No No
Severity Cutoffs Yes No No No No
FAIR Compliant Yes Partial Partial No Yes
3.0 Architecture

3. Document Hierarchy and Root Object

A PTF Document MUST be a valid JSON object formatted with UTF-8 encoding. The root object contains the following fields:

Field Type Cardinality Conformance Description
$schema string (URI) [0..1] OPTIONAL Canonical JSON Schema identifier URI.
meta object [1..1] REQUIRED Instrument metadata, authorship, and psychometric evidence.
items array[Item] [1..1] REQUIRED Ordered sequence of test items and response scales.
scoring object [0..1] RECOMMENDED Calculation rules, subscale maps, and diagnostic cut-off criteria.
norms array[Norm] [0..1] OPTIONAL Standardization conversion tables (Percentile ranks, T-scores).
extensions object [0..1] OPTIONAL Vendor- or platform-specific extensions.
4.0 Metadata Object

4. Instrument Metadata Specification (meta)

The meta object encapsulates scientific, legal, and descriptive information regarding the questionnaire instrument.

Field Type Conformance Constraints / Specification
name string REQUIRED Full official instrument title. Non-empty.
abbreviation string RECOMMENDED Standardized clinical acronym (e.g. "PHQ-9", "BDI-II").
schema_version string REQUIRED MUST be exactly "2.0.0".
language string REQUIRED ISO 639-1 two-letter code (e.g. "de", "en").
rater enum[string] OPTIONAL "self" | "clinician" | "caregiver" | "teacher" | "observer". Default: "self".
authors array[Author] OPTIONAL List of author entities: { name, affiliation?, orcid? }.
evidence object OPTIONAL Psychometric indices: { reliability, validity, norms_description }.
5.0 Items Array

5. Questionnaire Items and Response Scales (items)

The items array defines the discrete stimulus statements, input modalities, and numeric point weights.

Field Type Conformance Specification
id string REQUIRED Unique identifier within document (e.g. "phq_1").
type enum[string] REQUIRED "radio" | "scale" | "slider" | "checkbox" | "text" | "info".
text string REQUIRED Question stem or instruction prompt presented to respondent.
options array[Option] CONDITIONAL REQUIRED for discrete item types. Format: { label: string, score: number }.
subscale string OPTIONAL Key of the target subscale to which this item contributes.
no_score boolean OPTIONAL If true, item is excluded from score aggregation. Default: false.
6.0 Scoring Engine

6. Algorithmic Evaluation and Diagnostic Cut-Offs (scoring)

The scoring object declares the mathematical aggregation formula and diagnostic severity boundaries.

Interval Definition Constraint:

Cut-off objects MUST define contiguous, closed intervals where min ≤ score ≤ max. Each cut-off level specifies a categorical severity degree and associated clinical interpretation:

"scoring": {
  "type": "sum",
  "min_score": 0,
  "max_score": 27,
  "cutoffs": [
    { "min": 0, "max": 4, "label": "None / Minimal", "severity": "none", "color": "#10b981" },
    { "min": 5, "max": 9, "label": "Mild Depression", "severity": "mild", "color": "#3b82f6" },
    { "min": 10, "max": 14, "label": "Moderate Depression", "severity": "moderate", "color": "#f59e0b" },
    { "min": 15, "max": 19, "label": "Moderately Severe Depression", "severity": "severe", "color": "#f97316" },
    { "min": 20, "max": 27, "label": "Severe Depression", "severity": "critical", "color": "#ef4444" }
  ]
}
7.0 Standardization

7. Demographic Standardization Norms (norms)

Enables offline transformation of raw score aggregates into standardized population metrics (T-Scores, Percentile Ranks, Stanine, and Z-Scores).

"norms": [
  {
    "name": "General Population Sample (18-65)",
    "sample_size": 2500,
    "table": [
      { "raw_score": 0, "percentile": 50.0, "t_score": 50, "stanine": 5 },
      { "raw_score": 10, "percentile": 84.1, "t_score": 60, "stanine": 7 },
      { "raw_score": 20, "percentile": 97.7, "t_score": 70, "stanine": 9 }
    ]
  }
]
8.0 Canonical Reference

8. Canonical Implementation: PHQ-9

Complete, verified reference document of the Patient Health Questionnaire-9:

{
  "$schema": "https://fidetest.de/ptf.schema.json",
  "meta": {
    "name": "Patient Health Questionnaire-9",
    "abbreviation": "PHQ-9",
    "description": "Standardized depression severity screening tool based on DSM-5 criteria.",
    "version": "1.0.0",
    "schema_version": "2.0.0",
    "language": "en",
    "authors": [
      { "name": "Kurt Kroenke", "affiliation": "Indiana University School of Medicine" },
      { "name": "Robert L. Spitzer", "affiliation": "Columbia University" }
    ],
    "citation": "Kroenke, K. et al. (2001). The PHQ-9. J Gen Intern Med, 16(9), 606-613.",
    "license": { "type": "open-access", "notice": "Public Domain (Pfizer Open Instrument)" },
    "target_audience": "Adults and Adolescents (12+)",
    "duration_minutes": 3,
    "rater": "self",
    "tags": ["Depression", "Screening", "Outcome Measurement"]
  },
  "items": [
    {
      "id": "phq_1",
      "type": "radio",
      "text": "1. Little interest or pleasure in doing things",
      "required": true,
      "options": [
        { "label": "Not at all", "score": 0 },
        { "label": "Several days", "score": 1 },
        { "label": "More than half the days", "score": 2 },
        { "label": "Nearly every day", "score": 3 }
      ]
    },
    {
      "id": "phq_2",
      "type": "radio",
      "text": "2. Feeling down, depressed, or hopeless",
      "required": true,
      "options": [
        { "label": "Not at all", "score": 0 },
        { "label": "Several days", "score": 1 },
        { "label": "More than half the days", "score": 2 },
        { "label": "Nearly every day", "score": 3 }
      ]
    }
  ],
  "scoring": {
    "type": "sum",
    "min_score": 0,
    "max_score": 27,
    "cutoffs": [
      { "min": 0, "max": 4, "label": "None / Minimal", "severity": "none", "color": "#10b981" },
      { "min": 5, "max": 9, "label": "Mild Depression", "severity": "mild", "color": "#3b82f6" },
      { "min": 10, "max": 14, "label": "Moderate Depression", "severity": "moderate", "color": "#f59e0b" },
      { "min": 15, "max": 19, "label": "Moderately Severe Depression", "severity": "severe", "color": "#f97316" },
      { "min": 20, "max": 27, "label": "Severe Depression", "severity": "critical", "color": "#ef4444" }
    ]
  }
}
9.0 Schema URI

9. Machine-Readable Schema Distribution

The formal JSON Schema Draft-07 specification is hosted globally on Cloudflare Edge CDN:

https://fidetest.de/ptf.schema.json View Schema
10.0 SDK Type Definitions

10. TypeScript & Go Interface Definitions

export interface PTFDocument {
  $schema?: string;
  meta: {
    name: string;
    abbreviation?: string;
    description?: string;
    version?: string;
    schema_version: string;
    language: string;
    authors?: Array<{ name: string; affiliation?: string; orcid?: string }>;
    rater?: 'self' | 'clinician' | 'caregiver' | 'teacher' | 'observer';
    tags?: string[];
  };
  items: Array<{
    id: string;
    type: 'radio' | 'scale' | 'slider' | 'checkbox' | 'multiselect' | 'text' | 'info';
    text: string;
    required?: boolean;
    options?: Array<{ label: string; score: number; value?: any }>;
    subscale?: string;
    no_score?: boolean;
  }>;
  scoring?: {
    type: 'sum' | 'mean' | 'custom';
    min_score?: number;
    max_score?: number;
    subscales?: Array<{ id: string; name: string; items: string[] }>;
    cutoffs?: Array<{ min: number; max: number; label: string; severity?: string; color?: string }>;
  };
}
11.0 AI / LLM Protocol

11. LLM Ingestion & Automated Parser Protocol

Prompt protocol for large language models (Gemini, Claude, GPT-4) to parse unstructured test questionnaires directly into conforming PTF v2.0 JSON:

// Master System Instruction:

You are a deterministic psychometric parser. Convert the provided questionnaire into a 100% compliant PTF v2.0 JSON document conforming to the official schema at https://fidetest.de/ptf.schema.json.

  • Extract metadata into 'meta' (name, abbreviation, language, authors, citation).
  • Extract all question statements into 'items' with unique identifiers ('id'), element 'type', and explicit numeric point weights in 'options' ('label' and numeric 'score').
  • Configure the calculation method ('sum') in 'scoring' and define all diagnostic cut-off score boundaries [min, max] with severity degrees ('none', 'mild', 'moderate', 'severe', 'critical').
  • Return exclusively the raw JSON document without Markdown wrapping.
12.0 Scientific Citation & References

12. Citation & References

To cite this standard in academic publications, clinical software specifications, or clinical trials:

APA (7th Edition) Gawron, M. E. (2026). The Psychological Test Format (.ptf): A Standardized JSON Schema for Machine-Readable Clinical Diagnostics and Interoperable Research Data (Specification Version 2.0.0). Fidetest Open Standards. https://fidetest.de/ptf
@standard{gawron2026ptf,
  author    = {Gawron, Martin Edward},
  title     = {The Psychological Test Format (.ptf): A Standardized JSON Schema for Machine-Readable Clinical Diagnostics and Interoperable Research Data},
  version   = {2.0.0},
  year      = {2026},
  publisher = {Fidetest Open Standards},
  url       = {https://fidetest.de/ptf},
  note      = {Canonical JSON Schema: https://fidetest.de/ptf.schema.json}
}

Selected Bibliography

  1. Simons, M., Goddard, R., & Patton, W. (2002). Hand-scoring error rates in psychological testing. Assessment, 9(3), 292–300.
  2. Kroenke, K., Spitzer, R. L., & Williams, J. B. (2001). The PHQ-9: Validity of a brief depression severity measure. J Gen Intern Med, 16(9), 606–613.
  3. Spitzer, R. L., Kroenke, K., Williams, J. B., & Löwe, B. (2006). A brief measure for assessing generalized anxiety disorder: The GAD-7. Arch Intern Med, 166(10), 1092–1097.
  4. Wilkinson, M. D. et al. (2016). The FAIR Guiding Principles for scientific data management and stewardship. Scientific Data, 3, 160018.
  5. DDI Alliance (2020). Data Documentation Initiative (DDI) Specification, Version 3.3.