# WIA-EDU-010 Student Data Standard v1.0

## Phase 1: Data Format & Structure

**Status:** ✅ Complete
**Version:** 1.0.0
**Date:** 2025-01-15
**Philosophy:** 弘益人間 (Benefit All Humanity)

---

## 1. Overview

This specification defines the foundational data format and structure requirements for WIA-compliant student data systems. Phase 1 establishes JSON as the primary format with comprehensive schemas for student profiles, academic records, enrollment data, and privacy controls.

## 2. Scope

Phase 1 covers:
- Student profile data structures
- Academic records format
- Enrollment and attendance schemas
- Privacy and consent models
- Data validation requirements
- Metadata standards

## 3. Core Data Model

### 3.1 Student Profile

The student profile is the central entity containing all personal and enrollment information.

```json
{
  "studentId": "string (required, unique)",
  "personalInfo": {
    "firstName": "string (required)",
    "lastName": "string (required)",
    "middleName": "string (optional)",
    "preferredName": "string (optional)",
    "dateOfBirth": "date (required, ISO 8601)",
    "email": "string (required, format: email)",
    "phone": "string (optional, E.164 format)",
    "address": {
      "street": "string",
      "city": "string",
      "state": "string",
      "zipCode": "string",
      "country": "string (ISO 3166-1 alpha-2)"
    },
    "emergencyContact": {
      "name": "string (required)",
      "relationship": "string",
      "phone": "string (required)",
      "email": "string (optional)"
    }
  },
  "enrollment": {
    "status": "enum (active, leave_of_absence, withdrawn, graduated, suspended, expelled)",
    "enrollmentDate": "date (required, ISO 8601)",
    "expectedGraduation": "date (optional, ISO 8601)",
    "program": "string (required)",
    "major": "string (required)",
    "minor": "string (optional)",
    "academicLevel": "enum (undergraduate, graduate, doctoral, certificate)",
    "currentYear": "integer (1-8)",
    "fullTime": "boolean"
  },
  "privacy": {
    "directoryInformation": "boolean (default: true)",
    "parentAccess": "boolean (default: false if age >= 18)",
    "thirdPartySharing": "boolean (default: false)",
    "researchParticipation": "boolean (default: false)",
    "marketingCommunications": "boolean (default: false)"
  },
  "metadata": {
    "createdAt": "datetime (ISO 8601 with timezone)",
    "updatedAt": "datetime (ISO 8601 with timezone)",
    "createdBy": "string (user ID)",
    "updatedBy": "string (user ID)",
    "version": "string (semantic versioning)",
    "standard": "string (WIA-EDU-010)"
  }
}
```

### 3.2 Academic Records

Academic records track course enrollments, grades, and academic performance.

```json
{
  "recordId": "string (required, unique)",
  "studentId": "string (required, foreign key)",
  "semester": {
    "term": "enum (Fall, Spring, Summer, Winter)",
    "year": "integer (YYYY)",
    "startDate": "date (ISO 8601)",
    "endDate": "date (ISO 8601)"
  },
  "courses": [
    {
      "courseId": "string (required)",
      "courseCode": "string (required)",
      "courseName": "string (required)",
      "credits": "number (required)",
      "creditsAttempted": "number",
      "creditsEarned": "number",
      "gradeScale": "enum (letter, pass_fail, numerical, percentage)",
      "grade": "string",
      "gradePoints": "number",
      "status": "enum (in_progress, completed, withdrawn, incomplete, failed)",
      "instructor": "string",
      "department": "string"
    }
  ],
  "gpa": {
    "semester": "number (0.00-4.00 or custom scale)",
    "cumulative": "number (0.00-4.00 or custom scale)",
    "major": "number (optional)",
    "creditsAttempted": "integer",
    "creditsEarned": "integer",
    "qualityPoints": "number"
  },
  "academicStanding": "enum (good_standing, probation, suspension, honors, deans_list)"
}
```

### 3.3 Attendance Records

```json
{
  "attendanceId": "string (required, unique)",
  "studentId": "string (required, foreign key)",
  "courseId": "string (required, foreign key)",
  "attendanceRecords": [
    {
      "date": "date (ISO 8601)",
      "status": "enum (present, absent_excused, absent_unexcused, tardy, early_departure)",
      "arrivalTime": "time (HH:MM:SS)",
      "departureTime": "time (HH:MM:SS)",
      "reason": "string (optional)",
      "documentation": "string (optional, URI to supporting document)",
      "notes": "string (optional)"
    }
  ],
  "summary": {
    "totalClasses": "integer",
    "present": "integer",
    "excusedAbsences": "integer",
    "unexcusedAbsences": "integer",
    "tardies": "integer",
    "attendanceRate": "number (0.00-1.00)"
  }
}
```

## 4. Data Validation

### 4.1 JSON Schema

All data structures MUST be validated against JSON Schema (Draft 2020-12).

**Required Validations:**
- Type checking for all fields
- Format validation (email, date, phone)
- Required field enforcement
- Enumeration constraint checking
- Range validation for numbers
- Pattern matching for IDs

### 4.2 Business Rules

**Student ID:**
- Must be unique within institution
- Pattern: alphanumeric with optional hyphens
- Maximum length: 50 characters

**Email:**
- Must be valid RFC 5322 format
- Should be unique (institutional policy)

**Dates:**
- All dates in ISO 8601 format (YYYY-MM-DD)
- Enrollment date cannot be in the future
- Date of birth must be at least 3 years in the past

**GPA:**
- Must be between 0.00 and institutional maximum (typically 4.00 or 5.00)
- Rounded to 2 decimal places

## 5. Privacy and Consent

### 5.1 Privacy Settings

All student records MUST include privacy settings that control data access and disclosure.

**Default Privacy Levels:**
- Directory Information: Opt-out (default: visible)
- Parent Access: Age-dependent (default: false if student ≥ 18)
- Third-Party Sharing: Opt-in (default: false)
- Research Participation: Opt-in (default: false)

### 5.2 Consent Tracking

```json
{
  "consentId": "string (required, unique)",
  "studentId": "string (required)",
  "purpose": "string (required)",
  "granted": "boolean",
  "grantedAt": "datetime (ISO 8601 with timezone)",
  "expiresAt": "datetime (optional, ISO 8601 with timezone)",
  "withdrawnAt": "datetime (optional, ISO 8601 with timezone)",
  "legalBasis": "enum (consent, contract, legal_obligation, legitimate_interest)",
  "metadata": {
    "ipAddress": "string (for audit)",
    "userAgent": "string (for audit)",
    "version": "string (consent form version)"
  }
}
```

## 6. Metadata Standards

### 6.1 Required Metadata

All records MUST include:
- `createdAt`: Timestamp of record creation
- `updatedAt`: Timestamp of last modification
- `version`: Semantic version of the data structure
- `standard`: WIA standard identifier (WIA-EDU-010)

### 6.2 Audit Metadata

For compliance and security:
- `createdBy`: User ID who created the record
- `updatedBy`: User ID who last modified the record
- `changeLog`: Array of all modifications (optional but recommended)

## 7. Internationalization

### 7.1 Character Encoding

- UTF-8 encoding REQUIRED for all text fields
- Support for Unicode characters in names and addresses

### 7.2 Date and Time

- All dates in ISO 8601 format
- Times include timezone information
- Support for multiple calendars (Gregorian default)

### 7.3 Localization

- Country codes: ISO 3166-1 alpha-2
- Language codes: ISO 639-1
- Currency codes: ISO 4217

## 8. Compliance Requirements

### 8.1 FERPA Compliance

- Explicit tracking of directory information opt-out
- Parent access controls for students under 18
- Third-party disclosure requires consent

### 8.2 GDPR Compliance

- Right to access: Complete data export in JSON
- Right to rectification: Change tracking and versioning
- Right to erasure: Soft delete with retention policies
- Right to data portability: WIA-EDU-010 JSON format

## 9. Implementation Guidelines

### 9.1 Database Schema

Recommended database approach:
- Relational database for structured data
- Document store for flexible/extended attributes
- Separate tables for audit logs
- Encryption at rest for all PII

### 9.2 API Endpoints

Minimum required endpoints:
- `GET /students/{studentId}`: Retrieve student profile
- `POST /students`: Create new student
- `PUT /students/{studentId}`: Update student information
- `GET /students/{studentId}/records`: Retrieve academic records
- `POST /students/{studentId}/records`: Add academic record

---

## Appendix A: JSON Schema

Full JSON schemas available at:
- https://schemas.wia.org/edu-010/v1.0/student-profile.json
- https://schemas.wia.org/edu-010/v1.0/academic-record.json
- https://schemas.wia.org/edu-010/v1.0/attendance-record.json

## Appendix B: Example Data

See `examples/` directory for complete sample datasets.

---

**Philosophy:** 弘益人間 (Benefit All Humanity)

*WIA-EDU-010 empowers students with control over their educational data while enabling institutions to collaborate more effectively.*

© 2025 MIT License
