> ## Documentation Index
> Fetch the complete documentation index at: https://memberpulseptyltd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# UJ-M-017: Export CPD Records

> Member exports their CPD records for compliance reporting or personal records

## Journey Overview

| Attribute      | Value                                                   |
| -------------- | ------------------------------------------------------- |
| **Journey ID** | UJ-M-017                                                |
| **Actor**      | Member                                                  |
| **Goal**       | Download CPD records for external use                   |
| **Trigger**    | Member needs CPD documentation for compliance/reporting |
| **Outcome**    | CPD records exported in desired format                  |

## Preconditions

* Member has CPD records in the system
* Export functionality enabled

## Journey Flow

```mermaid theme={null}
flowchart TD
    A[Navigate to CPD] --> B[Click Export]
    B --> C[Select export options]
    C --> D[Choose date range]
    D --> E[Select format]
    E --> F[Generate export]
    F --> G[Download file]
```

## Detailed Steps

<Steps>
  <Step title="Access Export">
    Member navigates to CPD export:

    * CPD Dashboard → Export button
    * CPD History → Export dropdown
    * Profile → Data Export → CPD section
  </Step>

  <Step title="Select Export Options">
    Choose what to export:

    ```
    ┌─────────────────────────────────────────────────────────────┐
    │ Export CPD Records                                          │
    ├─────────────────────────────────────────────────────────────┤
    │                                                             │
    │ Export Type:                                                │
    │ ○ Summary Report (totals by category and year)              │
    │ ● Detailed History (all individual records)                 │
    │ ○ Compliance Statement (official declaration)               │
    │                                                             │
    │ Date Range:                                                 │
    │ [Current Year (2025) ▼]                                     │
    │ Or custom: [Start Date] to [End Date]                       │
    │                                                             │
    │ Categories:                                                 │
    │ ☑ All Categories                                            │
    │ ☐ Technical Skills only                                     │
    │ ☐ Professional Development only                             │
    │                                                             │
    │ Include:                                                    │
    │ ☑ Approved records                                          │
    │ ☐ Pending records                                           │
    │ ☐ Rejected records                                          │
    │                                                             │
    │ Format:                                                     │
    │ ○ PDF (formatted report)                                    │
    │ ● CSV (spreadsheet)                                         │
    │ ○ Excel (.xlsx)                                             │
    │                                                             │
    │ [Cancel]  [Generate Export]                                 │
    └─────────────────────────────────────────────────────────────┘
    ```
  </Step>

  <Step title="Generate Export">
    System generates export file:

    * Processing indicator shown
    * File generated server-side
    * Download link provided
    * Email copy (optional)
  </Step>

  <Step title="Download File">
    Member downloads exported file:

    * Direct browser download
    * Or email with attachment
    * Link valid for 24 hours
  </Step>
</Steps>

## Export Formats

### PDF Summary Report

Professional formatted document:

```
┌─────────────────────────────────────────────────────────────────┐
│                                                                 │
│             CPD SUMMARY REPORT                                  │
│                                                                 │
│   Member: John Smith                                            │
│   Membership #: MEM-12345                                       │
│   Period: January 1 - December 31, 2025                         │
│   Generated: March 15, 2025                                     │
│                                                                 │
│   ─────────────────────────────────────────────────────────     │
│                                                                 │
│   SUMMARY                                                       │
│   Total Points Earned: 32                                       │
│   Requirement: 40 points                                        │
│   Status: In Progress (80%)                                     │
│                                                                 │
│   BY CATEGORY                                                   │
│   ┌────────────────────┬──────────┬──────────┬─────────┐       │
│   │ Category           │ Required │ Earned   │ Status  │       │
│   ├────────────────────┼──────────┼──────────┼─────────┤       │
│   │ Technical Skills   │ 20       │ 16       │ 80%     │       │
│   │ Professional Dev   │ 10       │ 10       │ ✓       │       │
│   │ Ethics             │ 10       │ 6        │ 60%     │       │
│   └────────────────────┴──────────┴──────────┴─────────┘       │
│                                                                 │
│   Verified by: [Organization Name]                              │
│   Report ID: RPT-2025-12345                                     │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘
```

### CSV Detailed Export

Spreadsheet format:

| Date       | Activity          | Provider | Category  | Points | Source | Status   | Certificate |
| ---------- | ----------------- | -------- | --------- | ------ | ------ | -------- | ----------- |
| 2025-03-15 | Leadership Course | Platform | Prof Dev  | 8      | Course | Approved | CERT-123    |
| 2025-03-10 | Annual Conference | Platform | Technical | 6      | Event  | Approved | CERT-122    |
| 2025-02-28 | Risk Workshop     | External | Technical | 4      | Manual | Approved | -           |

### Compliance Statement

Official declaration document:

* Organization letterhead
* Member details
* CPD compliance status
* Period covered
* Digital signature/verification
* QR code for verification

## Use Cases

| Use Case                     | Recommended Export       |
| ---------------------------- | ------------------------ |
| Annual compliance submission | PDF Compliance Statement |
| Personal records             | CSV Detailed History     |
| Employer verification        | PDF Summary Report       |
| License renewal              | PDF Compliance Statement |
| Audit preparation            | CSV with all records     |

## Related Entities

* [`CPD Record`](/entities/core/cpd-record)

## Related Journeys

* [UJ-M-015](/member/journeys/track-cpd)
* [UJ-M-029](/member/journeys/export-data)

## Acceptance Criteria

### Frontend

* [ ] Export button accessible from CPD section
* [ ] Export options modal/page
* [ ] Date range picker
* [ ] Format selection
* [ ] Category filter checkboxes
* [ ] Processing indicator
* [ ] Download link/button
* [ ] Error handling for failures

### Backend

* [ ] `POST /api/member/cpd/export` - Generate export
* [ ] `GET /api/member/cpd/export/{id}` - Download generated file
* [ ] PDF generation service
* [ ] CSV/Excel generation
* [ ] Temporary file storage

### Permissions

* [ ] Members can only export their own records

### Business Rules

* [ ] Exports include only approved records by default
* [ ] Date range validation
* [ ] Export file named with member name and date
* [ ] Download links expire after 24 hours

### Error Handling

* [ ] Large export timeout handling
* [ ] No records found message
* [ ] Generation failure with retry option
