0% found this document useful (0 votes)
10 views7 pages

Infant Progressive Note Manager Guide

Uploaded by

anebek555
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views7 pages

Infant Progressive Note Manager Guide

Uploaded by

anebek555
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

InfantProgressiveNoteManager

Documentation
Package
package [Link];

 Part of the Vaccine Management System (VMS) package, responsible for managing
infant progressive notes.

Class: InfantProgressiveNoteManager
Description

This JavaFX VBox-based component manages infant progressive notes.


It provides functionalities to view, search, add, edit, delete, void/unvoid, and refresh records.
Access control is applied based on the current user role (Admin, Doctor, Midwifer).

Attributes

Attribute Type Description


Database helper
db Connect instance for CRUD
operations.
Displays all infant
table TableView<InfantProgressiveNoteModel> progressive note
records.
data ObservableList<InfantProgressiveNoteModel>
Holds raw table
data.
Filtered view of
filteredData FilteredList<InfantProgressiveNoteModel> data for search
functionality.
searchField TextField
Input field for
search queries.
Dropdown to select
searchType ComboBox<String>
search criteria (e.g.,
MRN, Name,
Doctor).
Attribute Type Description
Opens form to add
btnAdd Button new progressive
note.
btnEdit Button
Opens form to edit
selected record.
btnDelete Button
Deletes selected
record.
btnView Button
Views details of the
selected record.
Prints the selected
btnPrint Button record
(placeholder).
btnVoid Button
Marks a record as
void.
btnUnVoid Button
Reverses voiding of
a record.
btnRefresh Button Reloads table data.
Index of the
selectedInfantIndex int
selected infant in
the table. Default is
-1.

currentUser String
Username of the
logged-in user.
Indicates if current
isDoctor boolean user has doctor
privileges.
Indicates if current
isAdmin boolean user has admin
privileges.
Indicates if current
isMidwifer boolean user has midwifer
privileges.

Constructor
public InfantProgressiveNoteManager(String currentUser)

 Initializes the manager with a logged-in user.


 Determines user role and sets permissions.
 Calls initializeUI() and loadData().
Methods

1. initializeUI

private void initializeUI()

 Builds the entire UI:


o Title label
o Search panel
o Button panel (buttons enabled based on user role)
o Table displaying notes
 Calls setupTable() for table configuration.

2. styleButton

private void styleButton(Button button, String color)

 Styles buttons with background color, text color, font, and width.
 Used to consistently format action buttons.

3. createTitleLabel

private Label createTitleLabel()

 Returns a styled title label for the manager.

4. setupTable

private void setupTable()

 Configures the TableView columns:


o MRN, Infant Name, DOB, Primary Diagnosis, Doctor, Status, Created On
 Adds conditional row styling: red/pink for voided records.
 Wraps data in FilteredList and SortedList for search and sorting.

5. loadData

private void loadData()


 Loads all infant progressive notes from the database asynchronously.
 Populates data observable list.
 Handles SQLException gracefully.

6. handleSearch

private void handleSearch()

 Filters filteredData based on search query and selected category:


o MRN, Name, Doctor, Status, Diagnosis, Follow-up Date
 Search is case-insensitive.

7. showAddForm

private void showAddForm()

 Opens a new InfantProgressiveNoteForm for adding a note.


 Requires an infant to be selected from the table.
 Sets a callback to refreshData after saving.

8. showEditForm

private void showEditForm()

 Opens InfantProgressiveNoteEdit for the selected note.


 Shows a warning if no record is selected.

9. deleteRecord

private void deleteRecord()

 Deletes the selected record after confirmation.


 Updates the table and shows a success alert.

10. viewRecord

private void viewRecord()


 Displays all details of the selected note in an information alert.
 Shows MRN, Name, DOB, Gender, Age, Diagnoses, Progress Notes, Treatment Plan,
Follow-up Date, Doctor, and Created On.

11. printRecord

private void printRecord()

 Placeholder method for printing functionality.


 Shows alert that printing is under development.

12. voidRecord

private void voidRecord()

 Marks a record as voided after confirmation.


 Updates database and table.
 Row background color changes to pink.

13. unVoidRecord

private void unVoidRecord()

 Reverses a voided record after confirmation.


 Updates database and table.

14. refreshData

private void refreshData()

 Reloads data from the database.


 Clears search field and resets filter.

15. showAlert

private void showAlert(String title, String message, [Link] type)


 Displays a JavaFX Alert with title, message, and type.
 Used for warnings, confirmations, information, and errors.

private void showAlert(String message)

 Overloaded method to show information alerts with default styling.

Search Functionality

 Search categories:
o By InfantMRN
o By InfantName
o By DoctorName
o By Status
o By Diagnosis
o By FollowupDate
 Uses filtered and sorted lists to efficiently update table in real-time.

User Role Permissions

Role Allowed Actions


Admin Add, Edit, Delete, View, Print, Void, UnVoid, Refresh
Doctor Add, Edit, View, Print, Void, UnVoid, Refresh
Midwifer View, Print, Refresh

Table Features

 Sortable columns.
 Voided records highlighted in pink.
 Supports dynamic filtering via search.

Concurrency

 Database operations run on background threads using [Link] for UI


updates.
 Prevents UI freezing during long operations.
Usage Example
InfantProgressiveNoteManager manager = new
InfantProgressiveNoteManager("[Link]");
Scene scene = new Scene(manager, 1200, 900);
[Link](scene);
[Link]();

 Displays the manager for user [Link] with appropriate role-based button access.

This documentation can serve for team handover, maintainability, and project reporting.

You might also like