CogniCare is a desktop app for a single-user application for managing most School of Computing (SoC) patients, optimized for use via a Command Line Interface (CLI) while still retaining all the benefits of a Graphical User Interface (GUI). For fast-typers, CogniCare can get your patient management tasks done faster than other traditional GUI apps.
Ensure you have Java 11
or above installed on your Computer.
zulu11.50.19-ca-fx-jdk11.0.12-macosx_aarch64.dmg
Download the latest cognicare.jar
from here.
Copy the file to the folder you want to use as the home folder for your CogniCare application.
Open a command terminal, cd
into the folder you put the jar file in, and use the java -jar cognicare.jar
command to run the application.
A GUI similar to the one below should appear in a few seconds. Note how the app contains some sample data.
Type the command in the command box and press Enter to execute it. e.g., typing help
and pressing Enter will open the help window.
Some example commands you can try:
edita 1 pid/3
: Changes appointment index 1, from its original patient id to patient id 3.
queryp
: Lists all patients that are stored in the CogniCare application.
addp n/Jerome Chua p/98765432 e/jerome@example.com a/depression
: Adds a contact named Jerome Chua
to the Address Book who is affiliated with having "depression".
deletep 903
: Deletes the patient that has the id of 903 (This is different from the natural ordering of the list).
adda pid/1 sd/2022-12-12 12:00 ed/2022-12-12 13:00 att/true s/5 ad/This is a dummy appointment
: Adds an appointment for patient index 1 to the address book from 12pm to 1pm on 12 December 2022.
querya
: Lists all appointments that are stored in CogniCare.
querya pid/2
: List all appointments belonging to patient index 2 that is stored in the CogniCare application.
deletea 3
: Deletes the appointment that has the appointment id of 3 (This is different from the natural ordering of the list).
clear
: Deletes all patient and appointment information from the CogniCare application.
exit
: Exits the app.
Refer to the Features below for details of each command.
The CogniCare application has three columns displaying (from left to right) patient data, appointment data, and the average feedback score per patient.
(From the left) the first column displays patient details stored in CogniCare. For each patient, their full name, affiliated tags, phone number, and email will be displayed.
The second column displays appointment details stored in CogniCare. For each appointment, the name of the patient who requested the appointment, appointment timing, and notes will be displayed.
Additionally, it will display Attended
if the patient has attended the appointment and the given feedback score. N/A
is displayed if the feedback score is unavailable.
Lastly, the third column displays the name and average feedback score per patient.
Notes about the command format:
Words in UPPER_CASE
are the parameters to be supplied by the user.
e.g., in addp n/NAME
, NAME
is a parameter that can be used as add n/John Doe
.
Items in square brackets are optional.
e.g. n/NAME [a/AFFLIATED_WITH]
can be used as n/Jerome a/depression
or as n/Jerome
.
Items with …
after can be used multiple times including zero times.
e.g. [a/AFFLIATED_WITH]…
can be used as (i.e., 0 times),
a/depressed
, a/jobless a/sad
etc.
Parameters can be in any order.
e.g., if the command specifies n/NAME p/PHONE_NUMBER
, then p/PHONE_NUMBER n/NAME
is also acceptable.
Extraneous parameters for commands that do not take in parameters (such as help
, exit
, and clear
) will be ignored.
e.g. if the command specifies help 123
, it will be interpreted as help
.
If you are using a PDF version of this document, please be careful when copying and pasting commands that span multiple lines as space characters surrounding line breaks may be omitted when copied over to the application.
help
Shows a message explaining how to access the help page.
Format: help
addp
Add a patient to the CogniCare application.
Format: addp n/NAME p/PHONE_NUMBER e/EMAIL [a/AFFLIATED_WITH]…
The following image shows when the command is valid:
The image below shows a successful addition of a patient.
The image below shows a failure to add a patient due to a missing phone tag.
The image below shows a failure to add a patient due to a duplicate email tag.
Validation:
Khang Hou
and khang hou
are both treated as the same nameRemark: It is important to note that Singapore names are only allowed to be 54-characters in length. Read More. The reason why we allow an extended input (>54 characters) is because some exchange students may choose to have a nickname appended to their official name. Hence, the front part of the name would not be hidden in the GUI.
local-part@domain
where the domain is at least 2 letters longTip: A patient can have any number of affiliations (including 0)
Examples:
addp n/Jerome Chua p/98765432 e/jerome@example.com a/depression
addp n/Davinci Lim p/98731122 e/betsycrowe@example.com a/sad a/anxiety
Tip: Once the patient is created, the patient identifier pid
will be permanently tagged to a patient,
and is not coalesced when other entries are deleted.
This is similar to SQL database behaviour where the auto-increment primary key goes on to the next value even if the transaction has failed. Read more
This means that if the CogniCare application initially contained the patients
1. Caitlyn
2. Khang Hou
3. Jerome
When Khang Hou (Patient ID 2) is deleted, the patient ids are as below:
1. Caitlyn
3. Jerome
Second Tip: You may not add two patients with the same name even if they are in a different case and different whitespace (i.e. "DAVINCI Lim" vs "Davinci Lim").
queryp
Shows a list of all patients in the CogniCare application.
The image shows the successful queryp
command
queryp
Shows a list of all patients in the CogniCare application that matches the criteria.
Format: queryp [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/AFFLIATED_WITH]…
queryp
command can find entries that contain the specified pattern anywhere within these fields, regardless of whether the letters are uppercase or lowercase. However, it is important to note that partial matching is not supported for Tags.queryp
command (e.g., name, phone number, email), CogniCare will return the list of patients that meets all those criteria. For example, when you search for a patient with a specific name, phone number, and email address, only patients who match all these details will be shown in the results.queryp a/depression a/anxiety
will return the list of patients who are tagged with either depression or anxiety (or both).The image shows the successful queryp
command with all parameters specified.
For example, to find all the "Jerome" that are stored in the CogniCare application, the user may use the command
Format: queryp n/Jerome …
This searches for any patient whose name contains "Jerome", regardless of case. So, it will find "JEROME", "jerome", "Jerome", etc.
The image shows the successful queryp
command.
For example, to find all the "Jerome"-s that are stored in the CogniCare application, have a phone number that contains 987, and containing the domain "example.com"; the user may use the command
Format: queryp n/Jerome p/987 e/example.com
The user may also choose to use the command in the following way to view students that have either depression
OR anxiety
tag.
Format: queryp a/depression a/anxiety
For example, to find all the "rome"-s that are stored in the CogniCare application.
Format: queryp n/rome
Then all patients with "rome" in their names will be returned as well. Similar logic applies for Name, Phone Number and Email address, but not for the affiliated-with tags.
Note: You do not need to enter any command to access this information. These top 10 statistics are automatically updated.
The image shows the (top 10) most popular tags sorted by how many patients with that respective affiliated-with tags.
Note that the command was entered to demonstrate that the count for the anxiety tag is the same as the ones in the CogniCare application.
editp
Edit an existing patient in the CogniCare application at the specified index.
Format: editp PATIENT_ID [n/NAME] [p/PHONE] [e/EMAIL] [a/AFFLIATED_WITH]…
PATIENT_ID
. The index refers to the unique identifier number shown in the displayed patient list. The index must be a positive integer 1, 2, 3, …Tip: Please take note that 0 is not a valid patient identifier.
patientId
will not be changed when you edit an individual's information.a/
without
specifying any affiliated-with tags after it.Tip: Changing the patient's name does not automatically update the Appointment's patient names.
Run querya
to update the appointments with new information.
Tip: Please make sure that you only edit the patients that are visible to you on the GUI. The same applies for the Appointments.
Examples:
editp 1 p/91234567 e/johndoe@example.com
Edits the phone number and email address of the patient with index 1 to be 91234567
and johndoe@example.com
respectively.editp 2 n/Betsy Crower a/
Edits the name of the patient with index 2 to be Betsy Crower
and clears all existing tags.The image below shows a successful message of an edit patient command.
The image below shows a failed message of an edit patient command (when an invalid index is specified).
The image below shows a failed message of an edit patient command (when no index is specified).
deletep
Delete the specified patient from the address book from the specified patient index.
Format: deletep INDEX
INDEX
.Examples:
queryp
followed by deletep 90
deletes the patient with the patientId of 90 in the CogniCare application.The image below shows a successful message of a delete patient command (when a valid index is specified).
The output failed message of a delete patient command (when no index or invalid index is specified) is similar to when the edit command fails.
adda
Adds an appointment to the CogniCare application.
Format: adda pid/PATIENT_ID sd/START_DATETIME ed/END_DATETIME [att/ATTEND] [s/FEEDBACK_SCORE] [ad/APPOINTMENT_DESCRIPTION]
aid
will be permanently tagged to an appointment, and is not coalesced when other entries are deleted.Examples:
adda pid/1 sd/2024-12-12 12:00 ed/2024-12-12 13:00
adds an appointment for the patient with patient index 1 on 12 December 2024 from 12pm to 1pm.adda pid/1 sd/2024-12-12 13:00 ed/2024-12-12 14:00 s/5
adds an appointment for the patient with patient index 1 on 12 December 2024 from 1pm to 2pm with a feedback score of 5.adda pid/1 sd/2024-12-12 14:00 ed/2024-12-12 15:00 att/true s/1 ad/Patient attended the appointment.
adds an appointment for the patient with patient index 1 on 12 December 2024 from 2pm to 3pm
with an attended status true
, feedback score of 1 and an appointment description.The screenshot below shows a successful operation:
The screenshot below shows a failed operation due to another appointment being scheduled for the same date and time:
Validation:
true
or false
(case-insensitive).querya
Shows a list of all appointments in CogniCare.
The screenshot below shows a successful query of all appointments:
querya
Shows a list of appointments in the CogniCare application that matches the criteria.
Format: querya [pid/PATIENT_ID] [n/PATIENT_NAME] [aid/APPOINTMENT_ID]
Examples:
querya pid/1
shows all appointments for the patient with the patient id of 1 in the CogniCare application.querya aid/4
shows the appointment with the appointmentId of 4 in the CogniCare application.querya n/Tan
shows all appointments whose patient's name contains "Tan" in the CogniCare application.The screenshot below shows a successful query of appointments using patient id:
filter
Show a list of appointments in a specific date and time range. This includes the appointments that start or end in the date time range or appointments that start before and end after the date time range.
Format: filter [sd/START_DATETIME] [ed/END_DATETIME]
Both START_DATETIME
and END_DATETIME
are optional. If only START_DATETIME
is provided, all appointments that end on or after the START_DATETIME
will be shown. If only END_DATETIME
is provided, all appointments that start on or before the END_DATETIME
will be shown.
Examples:
filter sd/2022-12-12 12:00 ed/2022-12-12 14:00
shows all appointments that start or end in the date time range of 12pm to 2pm on 12 December 2022.filter sd/2022-12-12 12:00
shows all appointments that end on or after 12pm on 12 December 2022.filter ed/2022-12-12 14:00
shows all appointments that start on or before 2pm on 12 December 2022.Validation:
The screenshot below shows a successful filter appointment command using both date time range:
The screenshots below show a successful filter appointment command using one date time range:
The screenshot below shows an unsuccessful filter appointment command due to invalid date time range:
edita
Edit an appointment in CogniCare using the specified appointment index.
Format: edita APPOINTMENT_ID [pid/PATIENT_ID] [sd/START_DATETIME] [ed/END_DATETIME] [att/ATTEND] [s/FEEDBACK_SCORE] [ad/APPOINTMENT_DESCTIPTION]
APPOINTMENT_ID
. The index refers to the index number shown in the displayed appointment list. The index must be a positive integer 1, 2, 3, …APPOINTMENT_ID
will not be changed when you edit the appointment's information.Examples:
edita 1 pid/2
edits the appointment with appointment index 1 with patient id 2.edita 1 sd/2021-10-10 10:00
edits the start date and time of the appointment with appointment index 1 to 10am, 10 October 2021.edita 1 att/false
edits the attended status of the appointment with appointment index 1 to false.deletea
Delete the specified appointment from the CogniCare application using the specified appointment index.
Format: deletea INDEX
INDEX
.Examples:
deletea 3
deletes the appointment with the appointmentId of 3 in the address book.The screenshot below shows a successful operation:
The screenshot below shows a failed operation due to invalid appointment index:
reportf
Shows the average feedback score per patient for all appointments given a specified date range.
Format: reportf [sd/START_DATE] [ed/END_DATE]
sd/
filters all appointments that end on or after START_DATEed/
filters all appointments that start on or before END_DATEsd/
and ed/
expect dates and not datetimessd/
or ed/
are left blank, their values will default to the minimum and maximum datetime respectivelyExamples
reportf
- Generates a report using all appointments
reportf sd/2024-02-18
- Generates a report with all appointments that start on or before 18 Feb 2024 00:00
reportf ed/2024-02-20
- Generates a report with all appointments that end on or before 20 Feb 2024 23:59
reportf sd/2024-02-18 ed/2024-02-20
- Generates a report with all appointments that start on 18 Feb 2024 and end before 20 Feb 2024.
Notes
reportf
, the appointment list is also filtered. This is the intended behaviour because the patient feedback report data is entirely dependent on the Patient and Appointment lists.reportf
allows for loose date ranges. E.g., there is an appointment from 18 Feb to 20 Feb 2024. Calling reportf sd/2024-02-19 ed/2024-02-21
will include this report.clear
Clears all entries from the CogniCare application.
Format: clear
exit
Exit the program.
Format: exit
CogniCare data is saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
CogniCare data is saved automatically as a JSON file [JAR file location]/data/patientList.json
and [JAR file location]/data/appointmentList.json
. Advanced users are welcome to update data directly by editing that data file.
Caution:
If your changes to the data file make its format invalid, CogniCare will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.
Furthermore, certain edits can cause the CogniCare application to behave in unexpected ways (e.g. if a value entered is outside the acceptable range). Especially, do not put null
anywhere in any of the JSON files as it will cause the app to not be able to launch. Therefore, edit the data file only if you are confident that you can update it correctly.
Press UP
or DOWN
keyboard key to navigate your history of successful commands.
Note: Upon reaching the start of the command history, pressing UP further will play a sound to indicate this fact
Q: How do I transfer my data to another Computer?
A: Install the app on the other computer and overwrite the empty data file it creates with the file that contains the data of your previous CogniCare home folder.
Q: Why are developers so cute and smart?
A: Thanks 👍
preferences.json
file created by the application before running the application again.Action | Format, Examples |
---|---|
Add a patient | addp n/NAME p/PHONE_NUMBER e/EMAIL [a/AFFLIATED_WITH]… e.g., addp n/Jerome Chua p/98765432 e/jerome@example.com a/depression or addp n/Davinci Lim p/98731122 e/betsycrowe@example.com a/sad a/anxiety |
Query patients | queryp [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/AFFLIATED_WITH]… e.g., queryp n/Jerome p/987 e/example.com |
Delete patient | deletep PATIENT_ID e.g., deletep 3 |
Edit patient | editp PATIENT_ID [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/AFFLIATED_WITH]… e.g., editp 1 p/91234567 e/johndoe@example.com |
Add an appointment | adda pid/PATIENT_ID sd/START_DATETIME ed/END_DATETIME [att/ATTEND] [s/FEEDBACK_SCORE] [ad/APPOINTMENT_DESCRIPTION] e.g., adda pid/2 sd/2022-12-12 15:00 ed/2022-12-12 16:00 att/true s/5 ad/This is a dummy appointment |
Query appointments | querya [pid/PATIENT_ID] [n/PATIENT_NAME] [aid/APPOINTMENT_ID] e.g., querya pid/2 |
Delete an appointment | deletea APPOINTMENT_ID e.g., deletea 1 |
Edit an appointment | edita APPOINTMENT_ID [pid/PATIENT_ID] [sd/START_DATETIME] [ed/END_DATETIME] [att/ATTEND] [s/FEEDBACK_SCORE] [ad/APPOINTMENT_DESCRIPTION] e.g., edita 1 pid/2 |
Filter appointments by date time | filter [sd/START_DATETIME] [ed/END_DATETIME] e.g., filter sd/2022-12-12 12:00 |
Report patient feedback statistics | reportf [sd/START_DATE] [ed/END_DATE] e.g. reportf sd/2024-02-18 |
Help | help |
Delete all entries from the CogniCare application | clear |
Exit Application | exit |