Skip to content

Commit

Permalink
Fix delete, update and addvisit command result
Browse files Browse the repository at this point in the history
  • Loading branch information
NatLeong committed Apr 4, 2024
1 parent b06a70f commit 22b3684
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/main/java/seedu/address/logic/commands/AddVisitCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ public class AddVisitCommand extends Command {
public static final String COMMAND_WORD = "addvisit";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a visit to a patient."
+ "Parameters: "
+ "\nParameters: "
+ PREFIX_NRIC + "NRIC "
+ PREFIX_DATEOFVISIT + "DATEOFVISIT "
+ PREFIX_SYMPTOM + "SYMPTOM "
+ PREFIX_DIAGNOSIS + "DIAGNOSIS "
+ PREFIX_STATUS + "STATUS "
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NRIC + "S1234567A "
+ PREFIX_DATEOFVISIT + "2024-01-04"
+ PREFIX_SYMPTOM + "Headache, Runny nose"
+ "\nExample: " + COMMAND_WORD + " "
+ PREFIX_NRIC + "S0123456A "
+ PREFIX_DATEOFVISIT + "2024-01-04 "
+ PREFIX_SYMPTOM + "Fever, Rhinorrhea "
+ PREFIX_DIAGNOSIS + "Common Flu "
+ PREFIX_STATUS + "PENDING ";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public class CreateCommand extends Command {
public static final String COMMAND_WORD = "create";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Creates a patient in Immunimate. "
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Creates a person in Immunimate. "
+ "\nParameters: "
+ PREFIX_NRIC + "NRIC "
+ PREFIX_NAME + "NAME "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class DeleteCommand extends Command {
+ "Parameters: NRIC\n"
+ "Example: " + COMMAND_WORD + " S0123456A";

public static final String MESSAGE_DELETE_PERSON_SUCCESS = "Deleted Patient ->\n%1$s";
public static final String MESSAGE_DELETE_PERSON_SUCCESS = "Deleted Person ->\n%1$s";

private final Nric targetNric;
//TODO test cases
Expand Down
22 changes: 14 additions & 8 deletions src/main/java/seedu/address/logic/commands/UpdateCommand.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package seedu.address.logic.commands;

import static java.util.Objects.requireNonNull;
import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;
import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;
import static seedu.address.logic.parser.CliSyntax.*;
import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;

import java.util.Collections;
Expand Down Expand Up @@ -53,10 +49,20 @@ public class UpdateCommand extends Command {
+ "Parameters: NRIC "
+ "[" + PREFIX_NAME + "NAME] "
+ "[" + PREFIX_PHONE + "PHONE] "
+ "[" + PREFIX_EMAIL + "EMAIL] "
+ "[" + PREFIX_ADDRESS + "ADDRESS] "
+ "[" + PREFIX_TAG + "TAG]...\n"
+ "Example: " + COMMAND_WORD + " S0123456A "
+ "[" + PREFIX_DATEOFBIRTH + "DATEOFBIRTH] "
+ "[" + PREFIX_SEX + "SEX] "
+ "[" + PREFIX_STATUS+ "STATUS] "
+ "[" + PREFIX_EMAIL + "EMAIL] "
+ "[" + PREFIX_COUNTRY + "COUNTRY] "
+ "[" + PREFIX_ALLERGIES + "ALLERGIES] "
+ "[" + PREFIX_BLOODTYPE + "BLOODTYPE] "
+ "[" + PREFIX_EMAIL + "EMAIL] "
+ "[" + PREFIX_CONDITION + "CONDITION] "
+ "[" + PREFIX_DATEOFADMISSION + "DATEOFADMISSION] "
+ "[" + PREFIX_DIAGNOSIS + "DIAGNOSIS] "
+ "[" + PREFIX_SYMPTOM + "SYMPTOM] "
+ "\nExample: " + COMMAND_WORD + " S0123456A "
+ PREFIX_PHONE + "91234567 "
+ PREFIX_EMAIL + "[email protected]";

Expand Down

0 comments on commit 22b3684

Please sign in to comment.