Skip to content

Commit

Permalink
Merge branch 'master' into drus-remove-ab-files
Browse files Browse the repository at this point in the history
  • Loading branch information
drustanyjt authored Apr 4, 2024
2 parents 51067bc + d3482fd commit ae1a2b5
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 34 deletions.
54 changes: 39 additions & 15 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,11 @@ Now that you're familiar with the annotations and text styles, we will give you
2. Run the command `java -version` to check if you have Java 11 or above installed in your computer.
* Assuming that you have Java installed in your computer,
* If you have a Windows, in this case the Java version is 19.0.2.
![javaWindows](images/javaWindows.png)
![javaWindows](images/javaWindows.png)

* If you have a Mac, in this case the Java version is 11.0.19.
![javaMac](images/javaMac.png)

3. If you do not have Java 11 or above installed in your computer, download it from [here](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html).

### Setting up
Expand Down Expand Up @@ -147,7 +149,7 @@ Now that you're familiar with the annotations and text styles, we will give you

Shows a message explaining how to access the help page.

![help message](images/helpMessage.png)
![help message](images/newhelpwindow.png)

Format: `help`

Expand All @@ -158,19 +160,22 @@ Adds a person to ClinicMate.
Format: `add n/NAME p/PHONE e/EMAIL i/IC_NUMBER ag/AGE s/SEX a/ADDRESS`

* A person will be uniquely identified by his/her personal identification number.
* Clinic mate does not allow the same identification number to be twice.
* ClinicMate does not allow the same identification number to be used twice.

<box type="tip" seamless>

**Tip:** A person can have a note included.
**Tip:** A person can have a note included (See [addnote](#adding-a-note--addnote) command).
</box>

Examples:
* `add n/John Doe p/88888888 e/[email protected] i/T0123456A ag/12 s/Male a/John street, block 123, #01-01`

What a successful `add` command looks like:
![successful_add](images/successfuladd.png)

### Adding a note : `addnote`

Add a note to an existing person in CLinicMate.
Add a note to an existing person in ClinicMate.

Format: `addnote IC_NUMBER n/NOTE (-replace)`

Expand All @@ -181,12 +186,15 @@ Format: `addnote IC_NUMBER n/NOTE (-replace)`
* The `-replace` flag can be used to replace the current note with the new note.

Examples:
* `addnote T0123456A n/Patient has diabetes` Adds a note `Patient has diabetes` to the person with the IC number `T0123456A` in CLinicMate.
* `addnote T0123456A n/Patient has diabetes` Adds a note `Patient has diabetes` to the person with the IC number `T0123456A` in ClinicMate.
* `addnote T0123456A n/Patient has diabetes -replace` Replaces the note of the person with the IC number `T0123456A` with `Patient has diabetes`.

What a successful `addnote` command looks like:
![successful_addnote](images/successfuladdnote.png)

### Locating persons by ic number: `find`

Find an existing person in CinicMate using their IC_NUMBER.
Find an existing person in ClinicMate using their IC_NUMBER. Displays their contact information on the left-hand side of the screen and their full notes on the right-hand side.

Format: `find IC_NUMBER`

Expand All @@ -200,6 +208,9 @@ Format: `find IC_NUMBER`
Examples:
* `find T0123456A` returns `John Doe`.

What a successful `find` command looks like:
![successful_find](images/successfulfind.png)

### Deleting a person : `delete`

Deletes the specified person from ClinicMate using their IC_NUMBER.
Expand All @@ -216,6 +227,9 @@ Format: `delete IC_NUMBER`
Examples:
* `delete T0123456A` deletes `John Doe` who has `IC_NUMBER` of `T0123456A` from ClinicMate.

What a successful `delete` message looks like:
![successful_deletemessage](images/successfuldeletemessage.png)

### Listing all entries : `list`

Lists all entries from the ClinicMate.
Expand Down Expand Up @@ -249,23 +263,33 @@ If your changes to the data file makes its format invalid, ClinicMate will disca
Furthermore, certain edits can cause the ClinicMate to behave in unexpected ways (e.g., if a value entered is outside the acceptable range). Therefore, edit the data file only if you are confident that you can update it correctly.
</box>

### Archiving data files `[coming in v2.0]`

_Details coming soon ..._

--------------------------------------------------------------------------------------------------------------------

## FAQ

**Q**: When using multiple screens, moving the application to a secondary screen and later switching to using only the primary screen, the GUI opens off-screen. What do I do?<br>
**A**: Delete the `preferences.json` file created by the application before running the application again.

**Q**: Is there a limit to the number of patient records ClinicMate can manage?<br>
**A**: ClinicMate is designed to handle a large number of patient records efficiently. However, performance may vary depending on the hardware specifications of your computer and the amount of data being managed.

**Q**: How do I transfer my data to another Computer?<br>
**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous CLinicMate home folder.
**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous ClinicMate home folder.

--------------------------------------------------------------------------------------------------------------------
**Q**: Can I export patient data from ClinicMate for reporting or backup purposes?<br>
**A**: Currently, ClinicMate does not support direct export of patient data. However, you can manually copy the data from the data file located at `[JAR file location]/data/clinicmate.json` for backup or reporting purposes.

**Q**: Can I customize the fields for patient records in ClinicMate?<br>
**A**: ClinicMate currently supports predefined fields for patient records (name, phone, email, IC number, age, sex, address). Customization of fields is not supported in the current version.

## Known issues
**Q**: How secure is the patient data stored in ClinicMate?<br>
**A**: ClinicMate stores patient data locally on your computer in a JSON file. It is recommended to keep your computer secure and up-to-date with the latest security patches to ensure the safety of patient data.

1. **When using multiple screens**, if you move the application to a secondary screen, and later switch to using only the primary screen, the GUI will open off-screen. The remedy is to delete the `preferences.json` file created by the application before running the application again.
**Q**: Is there a way to import patient data into ClinicMate from other software?<br>
**A**: ClinicMate does not currently support direct import of patient data from other software. However, you can manually enter patient data using the `add` command.

**Q**: Can I use ClinicMate on multiple computers?<br>
**A**: Yes, you can use ClinicMate on multiple computers. Simply copy the ClinicMate `.jar` file and the `clinicmate.json` data file to the other computer and run the application as usual.
--------------------------------------------------------------------------------------------------------------------

## Command summary
Expand Down
Binary file added docs/images/newhelpwindow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/successfuladd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/successfuladdnote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/successfuldeletemessage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/successfulfind.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions src/main/java/seedu/address/logic/parser/CliSyntax.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
public class CliSyntax {

/* Prefix definitions */
public static final Prefix PREFIX_NAME = new Prefix("n/");
public static final Prefix PREFIX_IC_NUMBER = new Prefix("i/");
public static final Prefix PREFIX_AGE = new Prefix("ag/");
public static final Prefix PREFIX_SEX = new Prefix("s/");
public static final Prefix PREFIX_ADDRESS = new Prefix("a/");
public static final Prefix PREFIX_EMAIL = new Prefix("e/");
public static final Prefix PREFIX_PHONE = new Prefix("p/");
public static final Prefix PREFIX_TAG = new Prefix("t/");
public static final Prefix PREFIX_NOTE = new Prefix("n/");
public static final Prefix PREFIX_NAME = new Prefix("n\\");
public static final Prefix PREFIX_IC_NUMBER = new Prefix("i\\");
public static final Prefix PREFIX_AGE = new Prefix("ag\\");
public static final Prefix PREFIX_SEX = new Prefix("s\\");
public static final Prefix PREFIX_ADDRESS = new Prefix("a\\");
public static final Prefix PREFIX_EMAIL = new Prefix("e\\");
public static final Prefix PREFIX_PHONE = new Prefix("p\\");
public static final Prefix PREFIX_TAG = new Prefix("t\\");
public static final Prefix PREFIX_NOTE = new Prefix("n\\");
public static final Prefix PREFIX_FLAG = new Prefix("-replace");
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class IdentityCardNumber {

public static final IdentityCardNumber DEFAULT = new IdentityCardNumber("S0000000A");
public static final String MESSAGE_CONSTRAINTS =
"IC number starts with one letter (S,T,F,G,M) followed by seven digits and one letter behind"
"IC number starts with one letter (S,T,F,G,M) followed by seven digits and one letter behind.\n"
+ " It is case insensitive. An example is S1234567A.";

public static final String VALIDATION_REGEX = "[STFGMstfgm][0-9]{7}[A-Z,a-z]";
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/seedu/address/model/person/Name.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
public class Name {

public static final String MESSAGE_CONSTRAINTS =
"Names should only contain alphanumeric characters and spaces, and it should not be blank";
"Names should only contain alphanumeric characters, special characters ('-', '/', ',') and space.\n"
+ "It should also not be blank";

/*
* The first character of the address must not be a whitespace,
* otherwise " " (a blank string) becomes a valid input.
*/
public static final String VALIDATION_REGEX = "[\\p{Alnum}][\\p{Alnum} ]*";
public static final String VALIDATION_REGEX = "[\\p{Alnum}\\-/,][\\p{Alnum}\\-/, ]*";

public final String fullName;

Expand Down
11 changes: 8 additions & 3 deletions src/main/java/seedu/address/ui/PersonCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ public PersonCard(Person person, int displayedIndex) {
this.person = person;
id.setText(displayedIndex + ". ");
name.setText(person.getName().fullName);
phone.setText(person.getPhone().value);
email.setText(person.getEmail().value);

StringBuilder truncatedPhone = new StringBuilder();
phone.setText(truncatedPhone.append("Phone: ").append(person.getPhone().value).toString());

StringBuilder truncatedEmail = new StringBuilder();
email.setText(truncatedEmail.append("Email: ").append(person.getEmail().value).toString());

String fullNote = person.getNote().value;
int maxLineLength = 30; // Maximum length of each line before truncation
Expand Down Expand Up @@ -91,6 +95,7 @@ public PersonCard(Person person, int displayedIndex) {
ic.setText(person.getIdentityCardNumber().value);
age.setText(String.valueOf(person.getAge().value));
sex.setText(person.getSex().value);
address.setText(person.getAddress().value);
StringBuilder truncatedAddress = new StringBuilder();
address.setText(truncatedAddress.append("Address: ").append(person.getAddress().value).toString());
}
}
2 changes: 1 addition & 1 deletion src/main/resources/view/LightTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
}

.context-menu .label {
-fx-text-fill: white;
-fx-text-fill: black;
}

.menu-bar {
Expand Down
3 changes: 0 additions & 3 deletions src/main/resources/view/PersonListCard.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,12 @@
<Label fx:id="ic" styleClass="cell_small_label" text="\$ic" />
</HBox>
<HBox spacing="5" alignment="CENTER_LEFT">
<Label text="Phone:" styleClass="cell_small_label" />
<Label fx:id="phone" styleClass="cell_small_label" text="\$phone" />
</HBox>
<HBox spacing="5" alignment="CENTER_LEFT">
<Label text="Address:" styleClass="cell_small_label" />
<Label fx:id="address" styleClass="cell_small_label" text="\$address" />
</HBox>
<HBox spacing="5" alignment="CENTER_LEFT">
<Label text="Email:" styleClass="cell_small_label" />
<Label fx:id="email" styleClass="cell_small_label" text="\$email" />
</HBox>
<HBox spacing="5" alignment="TOP_LEFT">
Expand Down

0 comments on commit ae1a2b5

Please sign in to comment.