# Minutes of Meeting (MoM) Module Documentation

## Overview

**Description:**
The Minutes of Meeting Module is used to document structured records of meetings. It captures essential details such as project name, agenda, attendance, and updates, while linking discussions to specific cases and responsibilities. This ensures traceability, accountability, and follow-up.

## Key Features

### 1. Structured Meeting Details
- **Meeting Metadata**: Captures date, time, location, and purpose
- **Meeting Title**: Clear identification of the meeting
- **Meeting Purpose**: Documents the objective and goals
- **Status Tracking**: Draft, Reviewed, Approved, Archived

### 2. Attendance Tracking
- **Participant List**: Records all attendees
- **Presence Status**: Tracks who attended vs. who was absent
- **Role Information**: Documents participant roles and responsibilities
- **Contact Details**: Stores email addresses for follow-up

### 3. Agenda & Background
- **Meeting Agenda**: Structured list of topics to be discussed
- **Background Context**: Provides context and history
- **Topic Organization**: Clear structure for discussion items
- **Reference Links**: Can link to related documents or cases

### 4. Attachments
- **File Support**: Upload meeting-related documents
- **Document Tracking**: Records who uploaded and when
- **Multiple Formats**: Supports various file types
- **Easy Access**: Quick retrieval of meeting materials

## Data Structure

### Complete JSON Schema

```json
{
  "meetingTitle": "Weekly Project Review",
  "meetingDate": "2024-01-15",
  "meetingTime": "10:00 AM",
  "location": "Conference Room A / Zoom",
  "meetingPurpose": "Review project progress and address issues",
  
  "agenda": "1. Project status update\n2. Risk assessment review\n3. Budget discussion",
  "background": "Following up on last week's action items and addressing new concerns",
  
  "participants": [
    {
      "name": "John Doe",
      "role": "Project Manager",
      "present": true,
      "email": "john@example.com"
    },
    {
      "name": "Jane Smith",
      "role": "Safety Officer",
      "present": true,
      "email": "jane@example.com"
    }
  ],
  
  "discussionItems": [
    {
      "topic": "Safety Incident Review",
      "description": "Discussed recent near-miss incident and preventive measures",
      "responsiblePerson": "Jane Smith",
      "dueDate": "2024-01-22",
      "status": "in-progress",
      "caseReference": "INC-2024-001"
    }
  ],
  
  "decisions": [
    {
      "decision": "Implement additional safety training",
      "actionRequired": "Schedule training sessions for all staff",
      "assignedTo": "Jane Smith",
      "deadline": "2024-01-30"
    }
  ],
  
  "attachments": [
    {
      "fileName": "safety-report.pdf",
      "filePath": "/uploads/meetings/safety-report.pdf",
      "uploadedBy": "Jane Smith",
      "uploadedAt": "2024-01-15T10:30:00Z"
    }
  ],
  
  "nextMeetingDate": "2024-01-22",
  "nextMeetingAgenda": "Follow-up on safety training implementation",
  
  "preparedBy": "John Doe",
  "reviewedBy": "Jane Smith",
  "approvedBy": "Management",
  "status": "approved"
}
```

## Field Descriptions

### Meeting Information
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| meetingTitle | string | Yes | Title/name of the meeting |
| meetingDate | date | Yes | Date when meeting was held |
| meetingTime | string | Yes | Time of the meeting |
| location | string | Yes | Physical or virtual location |
| meetingPurpose | string | Yes | Objective of the meeting |

### Agenda & Background
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| agenda | string | Yes | List of topics to be discussed |
| background | string | No | Context and background information |

### Participants
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| name | string | Yes | Participant's full name |
| role | string | Yes | Participant's role/position |
| present | boolean | Yes | Whether participant attended |
| email | string | No | Contact email address |

### Discussion Items
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| topic | string | Yes | Discussion topic |
| description | string | Yes | Details of the discussion |
| responsiblePerson | string | Yes | Person responsible for follow-up |
| dueDate | date | No | Deadline for action |
| status | enum | Yes | pending, in-progress, completed |
| caseReference | string | No | Reference to related case/incident |

### Decisions & Actions
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| decision | string | Yes | Decision made during meeting |
| actionRequired | string | Yes | Action to be taken |
| assignedTo | string | Yes | Person responsible |
| deadline | date | Yes | Completion deadline |

### Attachments
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| fileName | string | Yes | Name of the file |
| filePath | string | Yes | Path to stored file |
| uploadedBy | string | Yes | Who uploaded the file |
| uploadedAt | date | Yes | When file was uploaded |

### Metadata
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| preparedBy | string | Yes | Who prepared the minutes |
| reviewedBy | string | No | Who reviewed the minutes |
| approvedBy | string | No | Who approved the minutes |
| status | enum | Yes | draft, reviewed, approved, archived |

## Status Workflow

```
Draft → Reviewed → Approved → Archived
  ↓        ↓          ↓
  └────────┴──────────┘
     (Can go back to Draft for revisions)
```

### Status Definitions:
- **Draft**: Initial creation, can be edited freely
- **Reviewed**: Reviewed by participants, minor edits allowed
- **Approved**: Finalized and approved, no edits allowed
- **Archived**: Historical record, read-only

## Use Cases

### 1. Regular Project Meetings
- Weekly/monthly project status meetings
- Track progress and decisions
- Assign action items with deadlines
- Link to project cases and incidents

### 2. Safety Committee Meetings
- Document safety discussions
- Track safety incidents and resolutions
- Assign safety action items
- Maintain compliance records

### 3. Management Reviews
- Executive decision documentation
- Strategic planning meetings
- Budget and resource allocation
- Policy decisions

### 4. Incident Review Meetings
- Post-incident analysis
- Root cause discussions
- Corrective action planning
- Link to incident reports

## Benefits

### Traceability
- Complete audit trail of meetings
- Links to related cases and incidents
- Historical record of decisions
- Easy retrieval of past discussions

### Accountability
- Clear assignment of responsibilities
- Deadline tracking
- Follow-up on action items
- Status monitoring

### Compliance
- Structured documentation
- Regulatory compliance
- Evidence of due diligence
- Audit-ready records

### Collaboration
- Shared understanding of decisions
- Clear communication of actions
- Participant engagement tracking
- Document sharing

## API Endpoints

### Create Meeting Minutes
```javascript
POST /api/minutes-of-meeting
Body: {
  data: { /* JSON structure */ },
  ProjectId: 1
}
```

### Get All Meeting Minutes
```javascript
GET /api/minutes-of-meeting?projectId=1
```

### Get Single Meeting Minutes
```javascript
GET /api/minutes-of-meeting/:id
```

### Update Meeting Minutes
```javascript
PUT /api/minutes-of-meeting/:id
Body: {
  data: { /* Updated JSON structure */ }
}
```

### Delete Meeting Minutes
```javascript
DELETE /api/minutes-of-meeting/:id
```

## Integration Points

### Links to Other Modules:
- **Projects**: Each MoM is linked to a project
- **Users**: Participants and responsible persons
- **Incidents**: Can reference incident reports
- **Risk Assessment**: Can link to risk discussions
- **HAZOP/HAZID**: Can reference safety studies
- **Permit to Work**: Can link to permit discussions

## Best Practices

### 1. Timely Documentation
- Create minutes within 24 hours of meeting
- Distribute to participants for review
- Get approval within 48 hours

### 2. Clear Action Items
- Assign specific persons to each action
- Set realistic deadlines
- Include clear descriptions
- Link to related cases when applicable

### 3. Attendance Accuracy
- Mark attendance accurately
- Include roles for context
- Note any proxy attendees
- Record apologies for absence

### 4. Attachment Management
- Upload relevant documents
- Use descriptive file names
- Include presentation slides
- Attach supporting materials

### 5. Follow-up
- Review action items in next meeting
- Update status of ongoing items
- Close completed actions
- Escalate overdue items

## Example Queries

### Get Recent Meetings
```sql
SELECT id, 
       JSON_EXTRACT(data, '$.meetingTitle') as title,
       JSON_EXTRACT(data, '$.meetingDate') as date,
       JSON_EXTRACT(data, '$.status') as status
FROM MinutesOfMeetings
WHERE ProjectId = 1
ORDER BY JSON_EXTRACT(data, '$.meetingDate') DESC
LIMIT 10;
```

### Get Pending Action Items
```sql
SELECT id,
       JSON_EXTRACT(data, '$.meetingTitle') as meeting,
       JSON_EXTRACT(data, '$.discussionItems') as items
FROM MinutesOfMeetings
WHERE JSON_EXTRACT(data, '$.status') != 'archived'
  AND JSON_CONTAINS(data, '"pending"', '$.discussionItems[*].status');
```

## Summary

The Minutes of Meeting module provides a comprehensive solution for documenting, tracking, and managing meeting records. With its structured approach, it ensures accountability, traceability, and effective follow-up on decisions and action items.
