Skip to content

Commit

Permalink
Merge pull request #198 from tanboonkhong/branch-dg
Browse files Browse the repository at this point in the history
Branch dg
  • Loading branch information
LimJH2002 authored Nov 12, 2023
2 parents da8fcbe + 348ed40 commit d98e1e4
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,15 @@ The `ClinicBookAppointmentList` is a list of `AppointmentEvent` that is used for
When the user starts an application, there will be an empty `ClinicBookCLinicBookAppointment`. It will be populated when the
user executes `list-appointments` command.

### Prescription

The prescription-related features are facilitated by the `Prescription` class. The `Prescription` class is included in the `appointment` package.

The set of `Prescription` class is an attribute for each `AppointmentEvent`, each `Prescription` contains one Medicine name and the attribute will be stored in `clinicbook.json`.

Each `Prescription` is associated with a `AppointmentEvent` and the `Prescription` will be shown as a list of `Prescription` in the `AppointmentEvent`.



### \[Proposed\] Undo/redo feature

Expand Down Expand Up @@ -783,3 +792,66 @@ Dealing with missing/corrupted data files:

ii. If attempt above is in vain, delete `clinicbook.json`, and launch CareCentral again. All user manipulation on entries and diaries will be cleared.

---

## **Appendix: Planned Enhancements**

### Consistent Naming of Commands
#### Current State
The current system exhibits inconsistency in command naming. For example, `add-appt` is used for adding an appointment, while `list-appointments` is used for listing appointments.

#### Planned Enhancement
We aim to standardize command naming for better consistency and user experience. The proposed changes include renaming commands like `add-appt` to `add-appointment` and similarly, aligning other command names to this format. This change will bring uniformity and predictability to the command structure, making it more intuitive for users.

#### Implementation Details
- **Command Mapping**: A mapping will be created between old and new command names to assist in the transition.
- **Documentation Update**: All references in the documentation will be updated to reflect the new command names.

### Unique NRIC Validation
#### Current State
The system does not currently validate the uniqueness of the National Registration Identity Card (NRIC) of a patient, leading to potential data integrity issues.

#### Planned Enhancement
We will implement a validation mechanism to ensure that each patient's NRIC is unique within the system.

#### Implementation Details
- **Database Constraint**: Introduce a unique constraint on the NRIC field in the patient database.
- **Error Handling**: Implement error handling to provide a clear message if a user attempts to enter a duplicate NRIC.
- **Data Migration**: Review current data for duplicates and provide a strategy for resolving them.

### Warning for Clear Command
#### Current State
The `clear` command executes without any prior warning, risking accidental deletion of all patient records.

#### Planned Enhancement
We plan to introduce a confirmation step before the execution of the `clear` command.

#### Implementation Details
- **Confirmation Prompt**: Introduce an interactive prompt requiring explicit user confirmation before proceeding with the clear operation.
- **Command-Line Argument**: Optionally, provide a command-line argument to bypass the confirmation for automated scripts.

### Validation for Appointment Date
#### Current State
Appointment dates are not validated to be in the future, allowing for potential scheduling errors.

#### Planned Enhancement
We plan to enforce a validation rule ensuring that all appointment dates are set in the future.

#### Implementation Details
- **Date Validation Logic**: Introduce logic to check the appointment date against the current date.
- **User Feedback**: Provide immediate feedback to the user if an entered date is not in the future.
- **Adjustable Threshold**: Allow a configurable threshold for how far in the future an appointment must be.


### Enhanced Find Function
#### Current State
The current `find` function is limited to searching only by full names of patients.

#### Planned Enhancement
We plan to enhance the `find` function to allow searching for patients using other fields, not just full names, and to enable partial name matching.

#### Implementation Details
- **Extended Search Capabilities**: Modify the `find` function to search within fields like phone number, NRIC, address, etc., in addition to names.
- **Partial Name Matching**: Implement an algorithm that allows for partial matching of names, making the search more flexible and user-friendly.
- **Updated User Interface**: Adjust the user interface to accommodate these new search capabilities and provide clear instructions on how to use them.
- **Performance Considerations**: Ensure that the enhanced search function remains efficient, even with the expanded search capabilities.

0 comments on commit d98e1e4

Please sign in to comment.