@eeplatform/basic-edu 1.7.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @eeplatform/basic-edu
2
2
 
3
+ ## 1.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 9168d90: Enrollment management - Revise add applicant
8
+
9
+ ## 1.8.0
10
+
11
+ ### Minor Changes
12
+
13
+ - f4d7c07: Program management initial release
14
+
3
15
  ## 1.7.0
4
16
 
5
17
  ### Minor Changes
package/SCHOOL_MGMT.md ADDED
@@ -0,0 +1,600 @@
1
+ # School Management System — Module Details
2
+
3
+ ## Building Management
4
+
5
+ Manages all school buildings and serves as a foundational dependency for room and facility management.
6
+
7
+ ### Purpose
8
+
9
+ Provide a centralized module to define, update, and manage school buildings. Acts as the primary reference for assigning rooms and facilities.
10
+
11
+ ### Functional Details
12
+
13
+ - Add new building with name, number of floors, and description.
14
+ - Retrieve all buildings.
15
+ - View specific building details.
16
+ - Update building details.
17
+ - Delete a building.
18
+
19
+ ### Business Logic
20
+
21
+ - Updating building name: rooms and facilities linked to the building must reflect the new name.
22
+ - Updating number of floors:
23
+
24
+ - If floor count is reduced, check if any room/facility exists on floors that would become invalid.
25
+ - Notify the user and prevent update until rooms/facilities are corrected.
26
+
27
+ - Deleting a building:
28
+
29
+ - A building cannot be deleted if any room or facility is still linked to it.
30
+ - Require the user to reassign or remove dependent rooms/facilities first.
31
+
32
+ ### Dependencies
33
+
34
+ - **Building Management is a dependency of Room & Facility Management** (not the other way around)
35
+
36
+ ### Data managed
37
+
38
+ - Building ID (`_id`)
39
+ - School ID (`school`)
40
+ - Serial Number (`serial`)
41
+ - Name (`name`)
42
+ - Levels/Floors (`levels`)
43
+ - Status (`status`)
44
+ - Timestamps (`createdAt`, `updatedAt`, `deletedAt`)
45
+
46
+ **Building Unit (Room/Facility) Fields:**
47
+
48
+ - Building Unit ID (`_id`)
49
+ - School ID (`school`)
50
+ - Building ID (`building`)
51
+ - Building Name (`buildingName`)
52
+ - Name (`name`)
53
+ - Level/Floor (`level`)
54
+ - Category (`category`)
55
+ - Type (`type`)
56
+ - Seating Capacity (`seating_capacity`)
57
+ - Standing Capacity (`standing_capacity`)
58
+ - Description (`description`)
59
+ - Unit of Measurement (`unit_of_measurement`)
60
+ - Area (`area`)
61
+ - Status (`status`)
62
+ - Timestamps (`createdAt`, `updatedAt`, `deletedAt`)
63
+
64
+ ---
65
+
66
+ ## Room & Facility Management
67
+
68
+ Handles all rooms, laboratories, and facilities inside each building. This module depends on Building Management and is used by Section Management and Section Schedule Management.
69
+
70
+ ### Purpose
71
+
72
+ Provide a structured way for schools to create and manage rooms and facilities by linking them to buildings.
73
+
74
+ ### Functional Details
75
+
76
+ - Add new room or facility.
77
+ - Retrieve all rooms and facilities.
78
+ - View specific room or facility details.
79
+ - Update room or facility details.
80
+ - Delete a room or facility.
81
+
82
+ ### Business Logic
83
+
84
+ - Updating room/facility name:
85
+
86
+ - Update the linked section’s subject room/classroom name.
87
+ - Update the linked section schedule classroom name.
88
+
89
+ - Changing assigned building or floor:
90
+
91
+ - Validate that the assigned floor exists in the target building.
92
+
93
+ - Deleting a room or facility:
94
+
95
+ - Prevent deletion if used by any section or section schedule.
96
+ - User must update or remove dependencies first.
97
+
98
+ ### Dependencies
99
+
100
+ - Requires: Building Management
101
+ - Required by: Section Management, Section Schedule Management
102
+
103
+ ### Data managed
104
+
105
+ _Note: Room & Facility Management is handled by Building Unit model (see Building Management section above)_
106
+
107
+ - Building Unit ID (`_id`)
108
+ - School ID (`school`)
109
+ - Building ID (`building`)
110
+ - Building Name (`buildingName`)
111
+ - Name (`name`)
112
+ - Level/Floor (`level`)
113
+ - Category (`category`)
114
+ - Type (`type`)
115
+ - Seating Capacity (`seating_capacity`)
116
+ - Standing Capacity (`standing_capacity`)
117
+ - Description (`description`)
118
+ - Unit of Measurement (`unit_of_measurement`)
119
+ - Area (`area`)
120
+ - Status (`status`)
121
+ - Timestamps (`createdAt`, `updatedAt`, `deletedAt`)
122
+
123
+ ---
124
+
125
+ ## Curriculum Management
126
+
127
+ Allows DepEd or schools to manage multiple curriculums and define their structures. This module is required by Subject Management and Section Schedule Management (for teaching load parameters).
128
+
129
+ ### Purpose
130
+
131
+ Provide a centralized way to create and maintain curriculums, enabling consistency across subjects, grade levels, and schedules.
132
+
133
+ ### Functional Details
134
+
135
+ - Add new curriculum (e.g., MATATAG, K-12, special curriculums).
136
+ - Retrieve all curriculums.
137
+ - View specific curriculum details.
138
+ - Update curriculum details.
139
+ - Delete a curriculum.
140
+
141
+ ### Business Logic
142
+
143
+ - Updating curriculum name:
144
+
145
+ - All subjects linked to this curriculum must also update their stored curriculum name.
146
+
147
+ - Deleting a curriculum:
148
+
149
+ - Cannot be deleted if used by any subject.
150
+ - Subjects must be updated to a different curriculum or deleted first.
151
+
152
+ - Teaching Load Parameters:
153
+
154
+ - Store session duration, frequency, or special load rules used by Section Schedule Management.
155
+
156
+ ### Dependencies
157
+
158
+ - Required by: Subject Management
159
+ - Required by: Section Schedule Management (teaching load rules)
160
+
161
+ ### Data managed
162
+
163
+ - Curriculum ID (`_id`)
164
+ - Name (`name`)
165
+ - Effective School Year (`effectiveSchoolYear`)
166
+ - Max Teaching Hours Per Day (`maxTeachingHoursPerDay`)
167
+ - Curriculum Memo Reference (`curriculumMemoRef`)
168
+ - Status (`status`: active, pilot, inactive, deprecated)
169
+ - Whitelist (`whitelist`)
170
+ - Audit Fields (`createdAt`, `updatedAt`, `deletedAt`, `createdBy`, `updatedBy`, `deletedBy`)
171
+
172
+ ---
173
+
174
+ ## Subject Management
175
+
176
+ Centralizes all subjects offered by the school. This module depends on Curriculum Management and is required by Section Management and Section Schedule Management.
177
+
178
+ ### Purpose
179
+
180
+ Provide a standardized source of subjects used in creating sections and building schedules.
181
+
182
+ ### Functional Details
183
+
184
+ - Add new subject.
185
+ - Retrieve list of all subjects.
186
+ - View specific subject details.
187
+ - Update subject details.
188
+ - Delete a subject.
189
+
190
+ ### Business Logic
191
+
192
+ - Updating subject name:
193
+
194
+ - All section subjects that use this subject must automatically update.
195
+
196
+ - Deleting a subject:
197
+
198
+ - Cannot be deleted if any section is currently using it.
199
+ - User must reassign or remove dependent sections first.
200
+
201
+ ### Dependencies
202
+
203
+ - Requires: Curriculum Management
204
+ - Required by: Section Management
205
+ - Required by: Section Schedule Management
206
+
207
+ ### Data managed
208
+
209
+ _Note: Subject Management is handled by Curriculum Subject model_
210
+
211
+ - Curriculum Subject ID (`_id`)
212
+ - Curriculum ID (`curriculum`)
213
+ - Curriculum Name (`curriculumName`)
214
+ - Effective School Year (`effectiveSchoolYear`)
215
+ - Education Level (`educationLevel`)
216
+ - Grade Level (`gradeLevel`)
217
+ - Subject Code (`subjectCode`)
218
+ - Subject Name (`subjectName`)
219
+ - Subject Type (`subjectType`)
220
+ - Session Frequency (`sessionFrequency`)
221
+ - Session Duration (`sessionDuration`)
222
+ - Total Minutes Per Week (`totalMinutesPerWeek`)
223
+ - Status (`status`)
224
+ - Audit Fields (`createdAt`, `updatedAt`, `deletedAt`, `createdBy`, `updatedBy`, `deletedBy`)
225
+
226
+ ---
227
+
228
+ ## Grade Level Management
229
+
230
+ Handles the centralized list of grade levels offered by the school. This module is a dependency of Enrollment Management and Section Management.
231
+
232
+ ### Purpose
233
+
234
+ Provide a consistent and controlled list of grade levels that other modules can reference to avoid mismatches and ensure data uniformity.
235
+
236
+ ### Functional Details
237
+
238
+ - Add new grade level.
239
+ - Retrieve all grade levels.
240
+ - View specific grade level details.
241
+ - Update grade level information.
242
+ - Delete a grade level.
243
+
244
+ ### Business Logic
245
+
246
+ - Updating grade level name or code:
247
+
248
+ - All modules that reference this grade level (Enrollment, Sections, Subjects linked to grade levels) must stay in sync.
249
+
250
+ - Deleting a grade level:
251
+
252
+ - Not allowed if used by any learner enrollment or existing section.
253
+ - User must update or remove dependencies before deletion.
254
+
255
+ ### Dependencies
256
+
257
+ - Required by: Enrollment Management
258
+ - Required by: Section Management
259
+
260
+ ### Data managed
261
+
262
+ - Grade Level ID (`_id`)
263
+ - School ID (`school`)
264
+ - Education Level (`educationLevel`)
265
+ - Grade Level (`gradeLevel`)
266
+ - Tracks (`tracks`)
267
+ - Track Strands (`trackStrands`)
268
+ - Teaching Style (`teachingStyle`)
269
+ - Max Number of Learners (`maxNumberOfLearners`)
270
+ - Min Number of Learners (`minNumberOfLearners`)
271
+ - Default Start Time (`defaultStartTime`)
272
+ - Default End Time (`defaultEndTime`)
273
+ - Status (`status`)
274
+ - Audit Fields (`createdAt`, `updatedAt`, `deletedAt`, `createdBy`, `updatedBy`, `deletedBy`)
275
+
276
+ ---
277
+
278
+ ## Enrollment Management
279
+
280
+ Handles learner enrollment, including online enrollment. This module depends on Grade Level Management and integrates with Learner Management.
281
+
282
+ ### Purpose
283
+
284
+ Provide a unified process for managing enrollment applications and officially registering learners into the school system.
285
+
286
+ ### Functional Details
287
+
288
+ - Add new enrollment record.
289
+ - Retrieve list of all enrollments.
290
+ - View specific enrollment application.
291
+ - Update enrollment details.
292
+ - Delete an enrollment record.
293
+ - Online enrollment submission.
294
+
295
+ ### Business Logic
296
+
297
+ - When an applicant is accepted:
298
+
299
+ - Automatically create a learner profile in Learner Management.
300
+ - Automatically generate an LRN (Learner Reference Number).
301
+
302
+ - Grade level assignment must match an existing grade level from Grade Level Management.
303
+ - Enrollment record cannot be deleted if already converted into a learner unless the learner is deactivated or removed.
304
+
305
+ ### Dependencies
306
+
307
+ - Requires: Grade Level Management
308
+ - Required by: Learner Management (accepted enrollments become learners)
309
+
310
+ ### Data managed
311
+
312
+ _Note: Enrollment Management uses TLearner model (comprehensive learner enrollment data)_
313
+
314
+ - Learner ID (`_id`)
315
+ - Region (`region`, `regionName`)
316
+ - Province (`province`)
317
+ - City/Municipality (`cityMunicipality`)
318
+ - Division (`division`, `divisionName`)
319
+ - School Information (`schoolId`, `school`, `schoolName`)
320
+ - School Year (`schoolYear`)
321
+ - Grade Level (`gradeLevel`)
322
+ - Returning Learner (`returningLearner`)
323
+ - Learner Information (`learnerInfo`: PSA birth cert, LRN, names, birth details, etc.)
324
+ - Parent/Guardian Information (`parentGuardianInfo`)
325
+ - Address Information (`address`)
326
+ - Returning Learner Information (`returningLearnerInfo`)
327
+ - Senior High Information (`seniorHighInfo`)
328
+ - Alternative Learning Options (`alternativeLearningOptions`)
329
+ - Certification and Consent (`isCertifiedAndConsented`)
330
+ - Status (`status`)
331
+ - Remarks (`remarks`)
332
+ - Audit Fields (`createdAt`, `updatedAt`, `deletedAt`, `createdBy`, `updatedBy`, `deletedBy`)
333
+
334
+ ---
335
+
336
+ ## Learner Management
337
+
338
+ Manages all officially enrolled learners. This module is required by Section Management for assigning learners to sections.
339
+
340
+ ### Purpose
341
+
342
+ Serve as the centralized record-keeping module for all learner profiles created through enrollment acceptance.
343
+
344
+ ### Functional Details
345
+
346
+ - Add learner record.
347
+ - Retrieve list of all learners.
348
+ - View specific learner profile.
349
+ - Update learner information.
350
+ - Delete or deactivate learner records.
351
+
352
+ ### Business Logic
353
+
354
+ - No business logic defined as of now. Pure record keeping.
355
+
356
+ ### Dependencies
357
+
358
+ - Required by: Section Management
359
+ - Feeds data from: Enrollment Management (accepted applicants become learners)
360
+
361
+ ### Data managed
362
+
363
+ _Note: Learner Management uses the same TLearner model as Enrollment Management (accepted enrollments become learners)_
364
+
365
+ - Learner ID (`_id`)
366
+ - Region (`region`, `regionName`)
367
+ - Province (`province`)
368
+ - City/Municipality (`cityMunicipality`)
369
+ - Division (`division`, `divisionName`)
370
+ - School Information (`schoolId`, `school`, `schoolName`)
371
+ - School Year (`schoolYear`)
372
+ - Grade Level (`gradeLevel`)
373
+ - Returning Learner (`returningLearner`)
374
+ - Learner Information (`learnerInfo`: PSA birth cert, LRN, names, birth details, etc.)
375
+ - Parent/Guardian Information (`parentGuardianInfo`)
376
+ - Address Information (`address`)
377
+ - Returning Learner Information (`returningLearnerInfo`)
378
+ - Senior High Information (`seniorHighInfo`)
379
+ - Alternative Learning Options (`alternativeLearningOptions`)
380
+ - Certification and Consent (`isCertifiedAndConsented`)
381
+ - Status (`status`)
382
+ - Remarks (`remarks`)
383
+ - Audit Fields (`createdAt`, `updatedAt`, `deletedAt`, `createdBy`, `updatedBy`, `deletedBy`)
384
+
385
+ ---
386
+
387
+ ## Section Management
388
+
389
+ Handles the creation, assignment, and overall management of class sections. This module is required by Section Schedule Management, Section Student Management, and Section Subject Management.
390
+
391
+ ### Purpose
392
+
393
+ Provide an automated and centralized process for generating class sections per grade level and managing their structure for each school year.
394
+
395
+ ### Functional Details
396
+
397
+ - Add a new section.
398
+ - Retrieve list of all sections.
399
+ - View specific section details.
400
+ - Update section information.
401
+ - Delete a section.
402
+ - Generate sections automatically by grade level.
403
+
404
+ ### Business Logic
405
+
406
+ - Section generation:
407
+
408
+ - Generate sections by grade level for a specified school year.
409
+ - Automatically divide learners into sections based on preset section names.
410
+ - Follow capacity rules:
411
+
412
+ - Distribute learners based on maximum capacity.
413
+ - If there is a remainder, use minimum capacity.
414
+ - If still uneven, distribute learners as evenly as possible.
415
+
416
+ - Upon section generation:
417
+
418
+ - Automatically add required subjects for each section.
419
+ - Automatically create the list of students assigned to the section with all required section details.
420
+
421
+ ### Dependencies
422
+
423
+ - Requires: Learner Management, Subject Management, Grade Level Management
424
+ - Required by: Section Schedule Management, Section Student Management, Section Subject Management
425
+
426
+ ### Data managed
427
+
428
+ - Section ID (`_id`)
429
+ - School ID (`school`)
430
+ - Name (`name`)
431
+ - School Year (`schoolYear`)
432
+ - Grade Level (`gradeLevel`)
433
+ - Adviser (`adviser`, `adviserName`)
434
+ - Students Count (`students`)
435
+ - Status (`status`)
436
+ - Timestamps (`createdAt`, `updatedAt`, `deletedAt`)
437
+
438
+ ---
439
+
440
+ ## Section Schedule Management
441
+
442
+ Manages the scheduling of subjects for each section. Focuses on assigning teachers, classrooms, and time blocks to every subject automatically generated during section creation.
443
+
444
+ ### Purpose
445
+
446
+ Provide a structured way to build class schedules per section while ensuring teacher load compliance and avoiding conflicts.
447
+
448
+ ### Functional Details
449
+
450
+ - Add a schedule entry for a section.
451
+ - Retrieve all schedules for a section.
452
+ - View specific schedule details.
453
+ - Update assigned teacher, classroom, or time.
454
+ - Delete a schedule entry.
455
+ - Auto-generate schedules based on subjects of the same grade level during section generation.
456
+
457
+ ### Business Logic
458
+
459
+ - No direct business logic beyond validation.
460
+ - Schedule must not have conflicts:
461
+
462
+ - No overlapping subjects within a section.
463
+ - A teacher cannot be double-booked.
464
+ - A classroom cannot be double-booked.
465
+
466
+ - Teacher’s total teaching load must not exceed the curriculum’s maximum teaching hours.
467
+
468
+ ### Dependencies
469
+
470
+ - Requires: Section Management, Subject Management, Curriculum Management, Room & Facility Management
471
+ - Required by: None
472
+
473
+ ### Data managed
474
+
475
+ _Note: Section Schedule Management is handled by Section Subject model (scheduling is integrated with subject assignment)_
476
+
477
+ - Section Subject ID (`_id`)
478
+ - School Information (`school`, `schoolName`)
479
+ - Section Information (`section`, `sectionName`)
480
+ - Grade Level (`gradeLevel`)
481
+ - Education Level (`educationLevel`)
482
+ - School Year (`schoolYear`)
483
+ - Subject Information (`subjectCode`, `subjectName`)
484
+ - Teacher Information (`teacher`, `teacherName`)
485
+ - Classroom Information (`classroom`, `classroomName`)
486
+ - Schedule Details (`daysOfWeek`, `schedule`)
487
+ - Session Information (`sessionDuration`, `sessionFrequency`)
488
+ - Status (`status`)
489
+ - Timestamps (`createdAt`, `updatedAt`, `deletedAt`)
490
+
491
+ ---
492
+
493
+ ## Section Student Management
494
+
495
+ Manages the assignment of learners to specific sections. This module handles the many-to-many relationship between learners and sections, including student transfers and status tracking.
496
+
497
+ ### Purpose
498
+
499
+ Provide a centralized way to assign learners to sections, track their enrollment status within sections, and manage student transfers between sections.
500
+
501
+ ### Functional Details
502
+
503
+ - Assign learner to a section.
504
+ - Retrieve list of students in a section.
505
+ - View specific student-section assignment details.
506
+ - Update student assignment information.
507
+ - Transfer student to another section.
508
+ - Remove student from section (drop).
509
+
510
+ ### Business Logic
511
+
512
+ - Student assignment validation:
513
+
514
+ - Ensure student's grade level matches section's grade level.
515
+ - Validate school year consistency.
516
+ - Check section capacity limits.
517
+
518
+ - Status transitions:
519
+ - Active: Student is currently enrolled in the section.
520
+ - Dropped: Student has been removed from the section.
521
+ - Section-transferred: Student has been moved to another section.
522
+ - School-transferred: Student has been moved to another school.
523
+
524
+ ### Dependencies
525
+
526
+ - Requires: Section Management, Learner Management
527
+ - Required by: Section Schedule Management (for attendance tracking)
528
+
529
+ ### Data managed
530
+
531
+ - Section Student ID (`_id`)
532
+ - Learner Reference Number (`lrn`)
533
+ - School Information (`school`, `schoolName`)
534
+ - Section Information (`section`)
535
+ - Student Information (`student`, `studentName`)
536
+ - Grade Level (`gradeLevel`)
537
+ - Education Level (`educationLevel`)
538
+ - School Year (`schoolYear`)
539
+ - Status (`status`: active, dropped, section-transferred, school-transferred)
540
+ - Assignment Date (`assignedAt`)
541
+ - Last Update (`updatedAt`)
542
+
543
+ ---
544
+
545
+ ## Section Subject Management
546
+
547
+ Manages the assignment of subjects to sections with teacher and schedule information. This module handles the relationship between sections and their required subjects, including teacher assignments and scheduling.
548
+
549
+ ### Purpose
550
+
551
+ Provide a structured way to assign curriculum subjects to sections, manage teacher assignments, and coordinate class schedules.
552
+
553
+ ### Functional Details
554
+
555
+ - Assign subject to a section.
556
+ - Retrieve all subjects for a section.
557
+ - View specific section-subject assignment.
558
+ - Update teacher assignment.
559
+ - Update classroom assignment.
560
+ - Update schedule details.
561
+ - Remove subject from section.
562
+
563
+ ### Business Logic
564
+
565
+ - Subject assignment validation:
566
+
567
+ - Ensure subject's grade level matches section's grade level.
568
+ - Validate curriculum compatibility.
569
+ - Check teacher availability and qualification.
570
+
571
+ - Schedule conflict prevention:
572
+
573
+ - No overlapping subjects within a section.
574
+ - Teacher cannot be double-booked.
575
+ - Classroom cannot be double-booked.
576
+
577
+ - Teacher load management:
578
+ - Track total teaching hours per teacher.
579
+ - Enforce maximum teaching load limits from curriculum.
580
+
581
+ ### Dependencies
582
+
583
+ - Requires: Section Management, Curriculum Subject Management, Personnel Management, Building Management
584
+ - Required by: None (end module)
585
+
586
+ ### Data managed
587
+
588
+ - Section Subject ID (`_id`)
589
+ - School Information (`school`, `schoolName`)
590
+ - Section Information (`section`, `sectionName`)
591
+ - Grade Level (`gradeLevel`)
592
+ - Education Level (`educationLevel`)
593
+ - School Year (`schoolYear`)
594
+ - Subject Information (`subjectCode`, `subjectName`)
595
+ - Teacher Information (`teacher`, `teacherName`)
596
+ - Classroom Information (`classroom`, `classroomName`)
597
+ - Schedule Details (`daysOfWeek`, `schedule`)
598
+ - Session Information (`sessionDuration`, `sessionFrequency`)
599
+ - Status (`status`: active, draft)
600
+ - Timestamps (`createdAt`, `updatedAt`, `deletedAt`)