Skip to content

Commit

Permalink
Merge pull request AY2324S2-CS2103T-T15-1#121 from alfaloo/ug
Browse files Browse the repository at this point in the history
Update user guide for addpatient and adddoctor
  • Loading branch information
Kappaccinoh authored Apr 4, 2024
2 parents 5f9dfdc + c956c44 commit 06efbfe
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 13 deletions.
49 changes: 38 additions & 11 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,26 +71,53 @@ Shows a message explaning how to access the help page.

Format: `help`

### Listing all persons : `list`

### Adding a person: `add`
Shows a list of all persons (patients & doctors) and appointments in the MediCLI system.

Adds a person to the address book.
Format: `list`

Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​`
### Adding a patient: `addpatient`

<div markdown="span" class="alert alert-primary">:bulb: **Tip:**
A person can have any number of tags (including 0)
</div>
Adds a patient into the MediCLI system.

Format: `addpatient i/NRIC n/NAME d/DOB p/PHONE`

Field Constraints:
* **NRIC** : Follows the correct Singapore NRIC format. Begin with one of S, T, G, F, or M, followed by 7 numerical digits, then ended by an alphabetical letter. This field is non-case-sensitive.
* **NAME** : Only contain alphabetical characters and spaces. This field is non-case-sensitive.
* **DOB** : Only contain numerical characters in the format yyyy-mm-dd. Acceptable date range is from 1900 Janurary 1st to today's date.
* **PHONE** : Only contain numerical characters and of exactly 8 digits long.

Command Constraints:
* All of the above fields (NRIC, NAME, DOB, and PHONE) are compulsory and must be non-empty.
* Command fails if there already exists a person (patient or doctor) in the MediCLI system that has the same NRIC as the one given.
* The ordering of the fields does not influence the command.

Examples:
* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01`
* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal`
* `addpatient i/S1234567A n/John Doe d/2003-01-30 p/98765432`
* `addpatient n/Amy Smith i/T7654321B p/87654321 d/1980-12-05`

### Listing all persons : `list`
### Adding a Doctor: `adddoctor`

Shows a list of all persons in the address book.
Adds a doctor into the MediCLI system.

Format: `list`
Format: `adddoctor i/NRIC n/NAME d/DOB p/PHONE`

Field Constraints:
* **NRIC** : Follows the correct Singapore NRIC format. Begin with one of S, T, G, F, or M, followed by 7 numerical digits, then ended by an alphabetical letter. This field is non-case-sensitive.
* **NAME** : Only contain alphabetical characters and spaces. This field is non-case-sensitive.
* **DOB** : Only contain numerical characters in the format yyyy-mm-dd. Acceptable date range is from 1900 Janurary 1st to today's date.
* **PHONE** : Only contain numerical characters and of exactly 8 digits long.

Command Constraints:
* All of the above fields (NRIC, NAME, DOB, and PHONE) are compulsory and must be non-empty.
* Command fails if there already exists a person (patient or doctor) in the MediCLI system that has the same NRIC as the one given.
* The ordering of the fields does not influence the command.

Examples:
* `adddoctor i/S1234567A n/John Doe d/2003-01-30 p/98765432`
* `adddoctor n/Amy Smith i/T7654321B p/87654321 d/1980-12-05`

### Editing a person : `edit`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class AddDoctorCommand extends Command {
+ PREFIX_PHONE + "98765432";

public static final String MESSAGE_SUCCESS = "New doctor added: %1$s";
public static final String MESSAGE_DUPLICATE_PERSON = "This doctor already exists in the address book";
public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in the address book";

private final Doctor toAdd;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class AddPatientCommand extends Command {
+ PREFIX_PHONE + "98765432";

public static final String MESSAGE_SUCCESS = "New patient added: %1$s";
public static final String MESSAGE_DUPLICATE_PERSON = "This patient already exists in the address book";
public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in the address book";

private final Patient toAdd;

Expand Down

0 comments on commit 06efbfe

Please sign in to comment.