Are you a receptionist in charge of managing vaccination appointments in your clinic?

Vaccinations now have more complicated prerequisites to take them, and Vaccination Management System (VMS) aims to make this validation easier. VMS is a desktop application for validating and keeping track of vaccination appointments; its operations are optimized for fast typists who prefer using a Command Line Interface (CLI) while maintaining the benefits of a Graphical User Interface (GUI). If you type fast, VMS can efficiently validate your vaccination appointment!


Start up

  1. Ensure that java 11 or above is properly installed on your device.
  2. Download the latest VMS.jar.
  3. Copy the file to an appropriate folder for VMS to execute in.
  4. Open the command terminal, cd into the folder in step 3 and start VMS with java -jar vms.jar command. A GUI similar similar to what is shown below should appear in a few seconds.
    Ui

:information_source: Start up warning messages

If this is your first time starting up the application, you might be greeted with a few warning messages. However, do not be alarmed as this is to protect your save data. They will only show if VMS is unable to find or load your save data for whatever reason.

Any successful command execution will save the current state of VMS and stop the warning messages from showing, assuming that the data files are not tempered with. You can try entering the help or exit commands to initialize the starting data files.

View the data files section to learn more about these data files.

:warning: Potential loss of data

If this is not your first time using VMS, do NOT attempt to execute any commands. Review the warning messages first ensuring that the warnings are expected due to intentional tempering with the data files (eg. deleting the entire data folder or one of the data files) before continuing.

If any commands were to successfully be executed, ALL previous data in the data folder, if present, will be overwritten and lost forever.

GUI of VMS

Number Name Detail
1 Command input field Where commands are entered
2 Message panel Where messages are displayed
3 Patient list panel A list view of patients
3 Patient detail panel Panel where patients are shown in detail
5 Vaccination list panel A list view of vaccinations
6 Vaccination detail panel Panel where vaccinations are shown in detail
7 Appointment list panel A list view of appointments

Usage guide

Initializing

Before diving into VMS, first initialize the data of the vaccinations that your clinic supports.

  • VMS is initialized with a few COVID-19 vaccinations by default. If your clinic do not offer these vaccinations, these data can be purged by running vaccination’s clear command.
  • See add on how you can add a vaccination.
Normal usage

After initializing the vaccination data of your clinic, you are ready to go! All you will have to do is follow these simple steps and VMS will ease your receptionist duties.

  1. Wait for a patient to call in to book an appointment for a vaccination.
  2. If they do not exist in the system yet, add them into the system using patient’s add command.
  3. Schedule an appointment for them by running appointment’s add command.
  4. If the patient is eligible to take the vaccination that they want, the appointment will be added into VMS. Otherwise, an error message will show and you can inform them about their ineligibility to take the vaccination.
  5. If you wish to retrieve a patient’s contact number, maybe to remind them of their upcoming appointment, you can retrieve it by using patient’s detail command. The patient’s ID number is conveniently displayed on the appointment card for easy reference.
Example scenario

Here is an scenario example usage using VMS start up sample data immediately after start up:

  1. A patient calls, he provides information that his name is Tan Xiao Ming, born on 1999 April 15, blood type A+, allergic to nothing and has already taken Dose 1 (Moderna). From your clinic phone, the number is 97643158. The following command will add this patient into the system:
    patient add --n Tan Xiao Ming --p 97643158 --d 1999-04-15 \
         --b A+ --v Dose 1 (Moderna)
    

    :clipboard: patient add --n Tan Xiao Ming --p 97643158 --d 1999-04-15 --b A+ --v Dose 1 (Moderna)

  2. He mentions that he wishes to take Dose 2 (Pfizer) on 2024 March 5th at 1600. You clinic’s average vaccination appointment take roughly about 30mins. From step 2, it is shown that Xiao Ming has an ID of 7 as well. The following command will attempt to schedule an appointment for him:
    appointment add --p 7 --v Dose 2 (Pfizer) --s 2024-3-5 1600 --e 2024-3-5 1630
    
  3. Uah! An error message shows saying that the he cannot take that vaccination. According to MOH, this is so as patient’s first and second COVID-19 vaccination doses must be of the same brand. You inform him of this and he decides that he will take Dose 2 (Moderna) instead. Without scrolling, you see that this vaccination is in index 4 of the vaccination list panel. To attempt to schedule this new appointment for Xiao Ming, enter the following command:
    appointment add --p 7 --v 4 --s 2024-3-5 1600 --e 2024-3-5 1630
    
  4. The appointment get successfully added and you inform him that you have schedule the appointment for him.
:information_source: INFO: The backslash character (\) in step 1 is just for presentation purposes. Only the text after the clipboard (:clipboard:) should be copied and paste into VMS. See CLI presentation format for more information.

With this, VMS has automated the validation of patient’s appointment scheduling, making your receptionist duties easier!

This example also highlights the adaptive nature of VMS CLI syntax from steps 2 and 3. See the features to understand more about VMS full capabilities.


Features

:information_source: Command syntaxes presentation

  • Pink italicized bolded capitalized words represents placeholders that the reader will have to replace with a variable. For example, PATIENT_ID will represent a patient ID in commands or example outputs.
  • Backslash (\) before line breaks represents a command continuation where the following line break and backslash are to be replaced with an EMPTY character. For example,
    appointment add --p PATIENT_ID \
        --s START_TIME --e END_TIME \
        --v VAX_NAME
    

    would have the same meaning as this

    appointment add --p PATIENT_ID --s START_TIME --e END_TIME --v VAX_NAME
    

    For CLI input examples, a clipboard (:clipboard:) will follow which represents the copy and paste version.

  • Square brackets ([ and ]) around arguments indicate that the argument is optional. For example,
    [--n NEW_NAME] would mean that --n NEW_NAME is optional.
  • Three dots with no space (...) after arguments indicates that multiple of the same type of argument can be repeated. For example [--r REQUIREMENT]... would mean that --r REQUIREMENT can appear multiple times.
  • Plus (+) indicates that the argument before must occur at least once but may be repeated multiple times.
  • Three dots with no space (...) before and after an argument would indicate that a list of that argument is required. The elements of a list are delimited by commas (,) and the keyword <EMPTY> (case sensitive) is used to represent an empty list. For example, --g ...GROUP... would mean that a list of GROUP is required. Accepted arguments may be --g GROUP_1, GROUP_2, GROUP_3 for a list of 3 groups or --g <EMPTY> for an empty list of groups.
  • Triangle brackets (< and >) around words represent a type.
  • Braces ({ and }) are represents argument groups.
  • Pipe (|) represents mutually exclusive arguments. For example,
    {PATIENT_NAME | [--ATTRIBUTE_FLAG FLAG_ARGUMENT]+}
    

    would mean that the user will have to choose between entering the argument of the form PATIENT_NAME or [--ATTRIBUTE_FLAG FLAG_ARGUMENT]+ but not both.

General command syntax

The general command line syntax is as follows:

COMPONENT COMMAND_WORD PREAMBLE [--FLAG ARGUMENT]...
  • COMPONENT is a variable of type <component>. It may be omitted if it is basic.
  • PREAMBLE is any text after COMMAND_WORD to the end of the command or the first -- flag delimiter. Its type is command dependent and will be taken to be empty if COMMAND_WORD is immediately followed by --.
  • COMMAND_WORD and FLAG are single word arguments that do no accept spaces.
Additional points
  • -- is used to delimit flags and cannot be present in any of the argument placeholders.
  • Some arguments may require parts which are delimited by ::.
  • Leading and trailing white spaces in ARGUMENTS and elements in lists will be ignored.
  • For flag arguments, if the command only requires one occurrence of it but multiple are given, only the last argument will be taken.
    • Example: If a command only requires one --force IS_FORCE, but --force false --force true is present in the command input, only the last argument, --force true, will be taken.

Types

<component>

The list of available components are given in the components section.

<boolean>

Represents logical true or false. Only an input “true” (case insensitive) will result in logical true. All other values will result in false.

Therefore, the following values are allowed an will evaluate to false:

  • false
  • true with additional characters
  • 123
  • A blank argument.

<integer>

An integer value between -2147483648 and 2147483647.

<index>

An extension of <integer> allowing only positive non-zero values (ie. x > 0).

<age>

An extension of <integer>, allowing only positive values (ie. x >= 0). Age also has a max value of 200 which is allowed to be exceeded, provided it conforms to <integer> restrictions as well. All values of age that exceed the max value will be evaluated to be equal.

<string>

Strings can take on any character sequence that do not contain -- or new line characters.

<main-keyword>

Only these values (case sensitive) are allowed:

  • patient
  • vaccination
  • appointment

<keyword>

A non-empty string that takes on any character sequence that do not contain spaces.

The following values and characters (case sensitive) are not allowed:

  • patient
  • vaccination
  • appointment
  • keyword
  • basic
  • help
  • exit
  • *
  • (
  • )
  • -
  • +
  • ,

The following characters (non-exhaustive) are allowed:

  • ~
  • `
  • !
  • #
  • $
  • %
  • ^
  • &
  • _
  • =
  • \\
  • |
  • ;
  • :
  • '
  • "
  • .
  • ?
  • /

<group-name>

A non-blank character sequence consisting of only alphanumeric character and all brackets excluding triangle brackets (< and >). The character limit is 30 characters.

<name>

A non-blank character sequence consisting of only alphanumeric character. There is no character limit and does not limit the amount of spaces between the words.

<blood-type>

The list of blood types are:

  • A+
  • A-
  • B+
  • B-
  • AB+
  • AB-
  • O+
  • O-

All other values will be rejected

<date>

The supported date formats are:

  • yyyy-mm-ddThh:mm
    eg. 2023-05-03T04:45
  • yyyy-m-d hhmm - single and double digit day and months are supported.
    eg. 2023-5-3 0455

:information_source: Day and month restrictions

Month can only take the values 1 to 12 inclusive. Any other number are not allowed.

Days of the month can take any values from 1 to 31 inclusive. Any other numbers are not allowed. If the entered day of the month is greater than the number of days in that month, the last day of that month will be assumed. Meaning, 2023-2-31 (Feb 31st) will become 2023-2-28 (Feb 28th).

<phone-number>

Any number that is at least three digits long is allowed. So that anyone, regardless of nationality, are allowed to be vaccinated. Only digits are allowed.

<vax-retriever>

<vax-retriever> or vaccination retriever aids in referring to a vaccination stored in the system. Vaccination may be referred to either by their names or the index that they are displayed in.

The syntax of a vaccination retriever is as follows:

[RETRIEVER_TYPE :: ] RETRIEVER_VALUE
  • RETRIEVER_TYPE : <retriever-type> - the type of the retriever.
  • RETRIEVER_VALUE : <string> - the value of the retriever.

If RETRIEVER_TYPE is omitted, its value will be inferred from RETRIEVER_VALUE. It will be INDEX if RETRIEVER_VALUE contains only the digits 0 to 9 and NAME otherwise.

Specifying the RETRIEVER_TYPE will override the inference and retrieve the vaccination based on the type specified. Thus, to refer to a vaccination whose name contains only digits, use NAME :: VAX_NAME to avoid the inference.

<retriever-type>

Only the following values are allowed:

  • INDEX - to retrieve a vaccination by its index that it is displayed in the vaccination list view.
  • NAME - to retrieve a vaccination by its name.

These values are not case sensitive.

<req>

Represents a requirement that is used to evaluate if a patient’s vaccination records meets a vaccination history requirement. It contains a <req-type> and a set of <group-name>, which represents its requirement set.

The general syntax is as follows:

REQ_TYPE :: ...REQUIREMENT...
  • REQ_TYPE : <req-type> - The type of the requirement.
  • REQUIREMENT : <group-name> - An element that makes up the requirement set.

<req-type>

Only the following values are allowed:

  • ALL - all groups of the requirement set must be present to pass.
    • Example: a vaccination requirement of G1, G2, G3 will require a patient to have taken a vaccination with all 3 groups. A vaccination with G1, G2, G3 and G1, G2, G3, G4 will pass but a vaccination with G1, G2 groups will not.
    • Displayed as a blue tag (ALL).
  • ANY - at least one group within the requirement set must be present to pass.
    • Example: a vaccination requirement of G1, G2, G3 will require the patient to have taken a vaccination that has any of the 3 groups. A vaccination with G1 and G1, G3 will pass but a vaccination with G4, G5 groups will not.
    • Displayed as a green tag (ANY).
  • NONE - none of the groups within the requirement set must be present to pass.
    • Example: a requirement with G1, G2, G3 will require the patient to not have taken any vaccination that are classified as any of the 3 groups. A vaccination with G1 and G1, G3 will fail while a vaccination with G4, G5 will pass. A failure on this type will break the testing process of the patient and the patient will immediately fail the history requirement of the vaccination. In other words, the patient will not be able to take that vaccination.
    • Displayed as a red tag (NONE).

Components

Below shows a list of components, their supported command words and their usage.

basic - Application’s basic features

exit - Exit the program

exit

help - Display help page

help

keyword - Keyword functionalities

Keywords are identified by their sub and main keywords. Following is the list of the attributes that a keyword has.

  • Keyword name : <keyword> - the name of the user-defined keyword.
  • Main Keyword : <main-keyword> - the main keyword that the user-defined keyword is paired to.

Default keywords implemented are shown in the list below.

  • pat–>patient
  • appt–>appointment
  • vacc–>vaccination

<main-keyword> is limited to the following values (case sensitive):

  • patient
  • vaccination
  • appointment

The following values (case sensitive) are not allowed for <keyword>:

  • patient
  • vaccination
  • appointment
  • keyword
  • basic
  • help
  • exit

add - Add a keyword

Adds a new keyword as defined in the command into the system.

Syntax
keyword add --k MAIN_KEYWORD --n KEYWORD
  • MAIN_KEYWORD : <main-keyword>
  • KEYWORD : <string>
Example

Example assumes that the keyword does not exist yet.

keyword add --k patient --n pa

Output:

[INFO] New keyword added: pa-->patient

delete - Delete a keyword

Deletes a keyword as defined in the command in the system.

Syntax
keyword delete KEYWORD
  • KEYWORD : <string>
Example

Example assumes that the keyword already exists.

keyword delete pa

Output:

[INFO] Deleted keyword: pa-->patient

patient - Patient functionalities

A patient is uniquely identified by a generated PATIENT_ID. Duplicate patients are allowed in the system as there might be patients with the exact same attributes that want to be vaccinated.

Patient data
Variable Is needed Type Accept multiple
name YES <name> NO
phone YES <phone-number> NO
dateOfBirth YES <date> NO
bloodType YES <blood-type> NO
allergies NO list of <group-name> YES
vaccines NO list of <group-name> YES
dateOfBirth

It accepts any <date> that is before current system time.

add - Add a patient

Adds a new Patient type as defined in the command into the system. If any of the optional arguments are omitted, the list will be empty.

vaccines and vaccinations are different. The Patient allows any vaccines to be added as they may want to include other vaccinations that they have taken to check for conflicts during the new vaccination. Patients are allowed to have vaccines that are not offered in this vaccination center.

Syntax
patient add --n PATIENT_NAME --p PHONE --d DATE_OF_BIRTH \
    --b BLOODTYPE [--a ...ALLERGIES...]... [--v ...VACCINES...]...
  • PATIENT_NAME : <name>
  • PHONE : <phone>
  • DATE_OF_BIRTH : <date>
  • BLOODTYPE : <blood-type>
  • ALLERGIES : <group-name>
  • VACCINES : <group-name>
Example
patient add --n John Doe --p 98765432 --d 2001-03-19 \
    --b B+ --a catfur --a pollen --v covax

:clipboard: : patient add --n John Doe --p 98765432 --d 2001-03-19 --b B+ --a catfur --a pollen --v covax

patient add --n John Doe --p 98765432 --d 2001-03-19 --b B+

Output:

[INFO] New patient added: John Doe

Patient Add Detail Card

detail - View details of a patient

Syntax
patient detail PATIENT_ID
Example

Example assumes none of the default start-up patients are deleted yet.

patient detail 1

Output:

[INFO] Detailing patient: #0001 Alex Yeoh

Patient Detail Example

Restrictions
  • PATIENT_ID must exist in the system.

list - List all patients

Resets the view of the patient pane to display all the Patients. Useful command after using the find command.

Syntax
patient list

Output:

[INFO] Listed all patients

Patient List Example

find - Locate a patient

Finds patients whose names contain the given keywords. You can also include flags to search based on the patient’s attributes. If no flags are given, the search string given will be assumed to be searching the patient’s name. Multiple flags can be used concurrently! At least one flag or PATIENT_NAME must be present.

Syntax
patient find {PATIENT_NAME | [--ATTRIBUTE_FLAG FLAG_ARGUMENT]+}
  • PATIENT_NAME : <string>
:exclamation: WARNING: If both PATIENT_NAME and ATTRIBUTE_FLAG are used in the same command, it will ignore PATIENT_NAME and warn the user that PATIENT_NAME is not being used.
Find by flag

ATTRIBUTE_FLAG and their corresponding FLAG_ARGUMENT have similar mappings and requirements to to patient’s add. That is,

  • --n -> PATIENT_NAME : <name>
  • --p -> PHONE : <phone>
  • --d -> DATE_OF_BIRTH : <date>
  • --b -> BLOODTYPE : <blood-type>
  • --a -> ALLERGIES : <group-name>
  • --v -> VACCINES : <group-name>

Where the right side of -> represents ATTRIBUTE_FLAG and the left represent FLAG_ARGUMENT

However, the following exceptions apply:

  • Only one ALLERGIES flag can be used at one find command.
  • Only one VACCINES flag can be used at one find command.
Example
patient find john
patient find --n john --b B+

Output:

[INFO] 1 patients listed!

Patient Find Example

edit - Edit a patient

Updates the Patient using it’s PATIENT_ID. It will update the attributes of the specified patient to the attributes provided. If any of the optional arguments are omitted, the values will not be updated.

:exclamation: WARNING: VMS does not re-check if the edited patient is still able to take the vaccinations of the active appointments that they have been scheduled if any. As such if the patient is updated such that they are now ineligible to take the vaccination of their upcoming appointment, no warning or error messages will show and the state of all appointment will remain.
Syntax
patient edit PATIENT_ID [--n PATIENT_NAME] [--p PHONE] [--d DATE_OF_BIRTH] \
    [--b BLOODTYPE] [--a ...ALLERGIES...]... [--v ...VACCINES...]...
  • PATIENT_NAME : <name>
  • PHONE : <phone>
  • DATE_OF_BIRTH : <date>
  • BLOODTYPE : <blood-type>
  • ALLERGIES : <group-name>
  • VACCINES : <group-name>
  • IS_SET : <boolean>
    • true to replace all list-like patient attributes (ALLERGIES, and VACCINES) with the one specified in the command or false to append them.
    • It is false by default.
Example

Basic edit, changing patient’s attributes that is not related to list-like attributes

patient edit 7 --n John Deer

Output:

[INFO] Edited Patient: John Deer

Patient Edit Detail Card Default

Append example

Appending patient’s allergies and vaccination details

patient edit 7 --n John Deere --p 98765432 --d 2001-03-19 --b B+ \
    --a dogfur --a fern --v norovax

:clipboard: : patient edit 7 --n John Deere --p 98765432 --d 2001-03-19 --b B+ --a dogfur --a fern --v norovax

Output:

[INFO] Edited Patient: John Deere

Patient Edit Detail Card Append

Set example

Setting patient’s allergies and vaccination details, values prior will be overridden

patient edit 7 --n John Der --p 98765432 --d 2001-03-19 --b B+ \
    --a nofur --a grass --v protovax --set true

:clipboard: : patient edit 7 --n John Der --p 98765432 --d 2001-03-19 --b B+ --a nofur --a grass --v protovax --set true

Output:

[INFO] Edited Patient: John Der

Patient Edit Detail Card Set

Restrictions
  • PATIENT_ID must exist in the system.

delete - Delete a patient

Deletes the patient using the PATIENT_ID

Syntax
patient delete PATIENT_ID
Example
patient delete 7

Output:

[INFO] Deleted Patient: John Der
Restrictions
  • PATIENT_ID must exist in the system.

clear - Clear all patient data

Deletes all Patients from VMS. It is for users to clear the dummy patients out from VMS

Syntax
patient clear
Example
patient clear

Output:

[INFO] Patients successfully cleared

vaccination - Vaccination functionalities

Vaccinations are uniquely identified by their names. The following is a list of the attributes that a vaccination has and their description:

  • Name : <group-name> - the name of the vaccination.
  • Groups : list of <group-name> - The groups the vaccination classifies under.
    • Default value = empty list.
  • Minimum age : <age> - the minimum age (inclusive) allowed to take the vaccination.
    • Default value = 0.
  • Maximum age : <age> - the maximum age (inclusive) allowed to take the vaccination.
    • Default value = 200.
  • Ingredients : list of <group-name> - ingredients of the vaccination. Similar to patient’s allergies.
    • Default value = empty list.
  • History requirements : list of <req> - the list requirements of vaccination groups to take the vaccination.
    • Default value = empty list.
    • Requirements need not be unique, ie. a requirement of 2 ANY :: grp1, grp2 is allowed. This would mean that to take this vaccination, the patient will have to have taken at least 2 vaccinations that satisfies that requirement.

:bulb: Vaccination related name are case sensitive

Vaccination related names (name, groups and allergies) are case sensitive. This allows you to differentiate case sensitive things within these names like simple chemical formulas.

Here is an example of how you can use this to differentiate vaccination names:

  • VAX ABC (No CO) - “CO” for carbon monoxide.
  • VAX ABC (No Co) - “Co” for cobalt.

Similar things can be done for the other components.

In order for a patient to take a specific vaccination, the patient will have to satisfy ALL of the following:

  • Patient’s age should be between the vaccination’s minimum age and maximum age range inclusive.
  • The patient should not be allergic to any of the ingredients of the vaccination.
  • The patient should have a vaccination history record that satisfies ALL requirements of the vaccination’s history requirements.

:information_source: History requirement checks

When checking if a patient satisfies the history requirements of a vaccination, the group classifications of the vaccination that the patient has taken will be extracted and tested against the requirement’s group set. The requirement type of the requirement will decide if the requirement is satisfied.

In other words, a patient can satisfy a requirement by taking vaccinations with certain group types for ALL and ANY requirement types or not taking any vaccinations with certain group types for NONE requirement types.

add - Add a vaccination

Adds a new vaccination as defined in the command into the system. If any of the optional arguments are omitted, they will be set to their default values.

Syntax
vaccination add VAX_NAME [--g ...GROUP...]... \
    [--lal MIN_AGE] [--ual MAX_AGE] \
    [--a ...INGREDIENT...]... \
    [--h HISTORY_REQ]...
  • VAX_NAME : <group-name>
  • GROUP : <group-name>
  • MIN_AGE : <age>
  • MAX_AGE : <age>
  • INGREDIENT : <group-name>
  • HISTORY_REQ : <req>

:information_source: Age flags

The flags --lal and --ual for minimum and maximum age stand for Lower Age Limit and Upper Age Limit respectively.

:bulb: Breaking up vaccination creation

Attempting to add the entire data of a vaccination may result in very long input which is error prone. Users may and are advised to break the arguments up into smaller and more manageable pieces with the aid of the edit command.

This can be done by:

  1. Adding a vaccination with only its name and without the rest of its attributes.
  2. Editing the added vaccination in step 1 to add an attribute.
  3. Repeating step 2 until all desired attributes are added to the vaccination.

For example, to add the same vaccination as in the example, one can execute commands in the following order:

  1. vaccination add ABC VAX
  2. vaccination edit ABC VAX --g ABC, VACCINATION
  3. vaccination edit ABC VAX --lal 5 --ual 50
  4. vaccination edit ABC VAX --i ALC-0315, ALC-0159
  5. vaccination edit ABC VAX --h NONE::ABC

Efficiency can be further improved by using vaccination find command. You can learn more here.

Example

Example assumes that the vaccination ABC VAX does not exist yet.

vaccination add ABC VAX --g ABC, VACCINATION \
    --lal 5 --ual 50 \
    --i ALC-0315, ALC-0159 \
    --h NONE::ABC

:clipboard: : vaccination add ABC VAX --g ABC, VACCINATION --lal 5 --ual 50 --i ALC-0315, ALC-0159 --h NONE::ABC

Output:

[INFO] Vaccination: ABC VAX added

Vaccination Add Detail Card

Restrictions
  • The name of the vaccination being added must not exist in the system.

detail - View details of a vaccination

Syntax
vaccination detail VACCINATION
  • VACCINATION : <vax-retriever>
Example

Example assumes none of the default start-up vaccinations are deleted yet.

vaccination detail Dose 1 (Moderna)

Output:

[INFO] Detailing vaccination: Dose 1 (Moderna)

Vaccination Detail Example

Restrictions
  • VACCINATION must exist in the system.

list - List all vaccination

Clears previously set filters and list all vaccinations in the list view.

Syntax
vaccination list

find - Locate vaccinations

Given a <string>, search and filter out only vaccination whose names contains the character sequence of the given <string> in the given order. Whitespace characters within the given <string> are ignored and taken to be that any number of characters may between the two character sequences that the whitespace separates. The search is case-insensitive.

For example, if given Dose Dose 1, the following will match:

  • Dose Dose 1
  • Dose abc dose abc 1

However, the following will not:

  • Dose 1 - Missing a dose.
  • 1 Dose Dose - Wrong order.
  • Dose dose - Missing 1.

:bulb: find to improve efficiency

Filters applied by the last find command are designed to only be reset after a vaccination list command. This is so that you can refer to a vaccination by using the same vaccination. Below are some ways you may utilize this feature.

Breaking up vaccination addition
Adding on to breaking up vaccination tip, find can be used to filter down to the name of the vaccination that is being created. Then, instead of referring to the vaccination by its name, you can refer to it by its index while using the edit command. This can be done before adding or editing the vaccination. So to perform the same action as in the tip one can execute the following sequence of commands:

  1. vaccination find ABC VAX
  2. vaccination add ABC VAX
  3. vaccination edit 1 --g ABC, VACCINATION
  4. The remaining follow a similar pattern by replacing ABC VAX with 1.

Adding appointments
A similar pattern can be followed for appointments as well when scheduling appointments for multiple patient for the the same vaccination. Here is an example of how you can schedule an appointment for the created vaccination “ABC VAX” to the first 3 patients on start up:

  1. vaccination find ABC VAX
  2. appointment add --p 1 --v 1 --s 2024-3-5 1655 --e 2024-3-5 1700
  3. appointment add --p 2 --v 1 --s 2024-3-5 1655 --e 2024-3-5 1700
  4. appointment add --p 3 --v 1 --s 2024-3-5 1655 --e 2024-3-5 1700

For more details on appointment add you may read up more here.

Syntax
vaccination find VAX_NAME
  • VAX_NAME : <string>
    • The character sequence in the vaccination’s name to search for.
Example

Example assumes that none of the start-up vaccination data are deleted yet.

vaccination find dose 1

Output:

[INFO] 3 vaccinations listed!

Vaccination Find Example

Restrictions
  • VAX_NAME cannot be blank.

edit - Edit a vaccination

Updates the attributes of the specified vaccination to the attributes specified. If any of the optional arguments are omitted, they will be set to what they were before.

:exclamation: WARNING: VMS does not re-check the eligibility of patients with active appointments of the edited vaccination. As such, if a vaccination is edited such that a patient with an active appointment is now unable to take that vaccination, no warning or error messages will be shown and the state of all appointments will remain.
Syntax
vaccination edit VACCINATION [--n NEW_NAME] [--g ...GROUP...] \
    [--lal MIN_AGE] [--ual MAX_AGE] \
    [--a ...INGREDIENT...]... [--h HISTORY_REQ]... \
    [--set IS_SET]
  • VACCINATION : <vax-retriever>
  • NEW_NAME : <group-name>
  • GROUP : <group-name>
  • MIN_AGE : <age>
  • MAX_AGE : <age>
  • INGREDIENT : <group-name>
  • HISTORY_REQ : <req>
  • IS_SET : <boolean>
    • true to replace all list-like vaccination attributes (Groups, Ingredients and History requirements) with the one specified in the command or false to append them.
    • It is false by default.
Example

Following examples are independent of each other and follow after vaccination add example and then an execution of list.

Set example
vaccination edit INDEX::1 --lal 5 --ual 25 --i NaOH --set true

Output:

[INFO] Vaccination: ABC VAX updated

Vaccination Edit Detail Card 1

Append example
vaccination edit INDEX::1 --lal 5 --ual 25 --i NaOH

Output:

[INFO] Vaccination: ABC VAX updated

Vaccination Edit Detail Card 2

Restrictions
  • VACCINATION must exist in the system.
  • NEW_NAME must be a name that does not yet exist in the system unless it is the same as the vaccination being updated.

delete - Delete a vaccination

Deletion of a vaccination may cause appointments to be come invalid as the vaccination will no longer exist in the system. VMS will check for this and prevent such deletions from happening. However, an additional --force true argument will force the change to happen which will delete all invalid appointments after the change.

Syntax
vaccination delete VACCINATION [--force IS_FORCE]
  • VACCINATION : <vax-retriever>
  • IS_FORCE : <boolean>
    • true to force the change that the command will make and false to not.
    • By default, its value is false.
Example

Examples follow after vaccination clear and then add command examples and then list. The are also independent of one another.

vaccination delete 1
vaccination delete INDEX::1
vaccination delete ABC VAX
vaccination delete NAME::ABC VAX

Output:

vaccination: ABC VAX deleted
Restrictions
  • VACCINATION must exist in the system.

clear - Clear all vaccination data

Similar to vaccination delete, deletion of vaccinations may cause some appointment to become invalid. Add an additional --force true to force the change.

Syntax
vaccination clear --force IS_FORCE
  • IS_FORCE : <boolean>
Example
vaccination clear

Output:

[INFO] Vaccinations successfully cleared

appointment - Appointment functionalities

Attribute Type Description
Patient id <index> The patient id of the appointment.
Starting time <date> The starting time of the appointment.
Ending time <date> The ending time of the appointment.
Vaccination <group-name> The vaccine type used for the appointment.
Status <boolean> The completion status of the appointment.

add - Add an appointment

Adds a new appointment to the appointment manager

Syntax
appointment add --p PATIENT_ID --s STARTING_TIME --e ENDING_TIME --v VACCINATION
  • PATIENT_ID : <index>
  • STARTING_TIME : <date>
  • ENDING_TIME : <date>
  • VACCINATION : <vax-retriever>
Example
appointment add --p 5 --s 2023-05-01 0700 --e 2023-05-01 0800 --v Dose 1 (Moderna)

Output:

[INFO] New appointment added: 5 has an appointment at 2023-05-01T07:00

Appointment Add Appointment

Restrictions
  • PATIENT_ID must refer to an existing patient in the system.
  • The patient referred to by PATIENT_ID must not have any upcoming appointments that are not yet completed.
  • START_TIME must be after the current locale time.
  • END_TIME must be after the given starting time.
  • VACCINATION must refer to an existing vaccination in the system.

list - List all appointments

Resets the view of the appointment pane to display all the appointments. Useful command after using the find command.

Syntax
appointment list

Output:

[INFO] Listed all appointments

Appointment List Appointment

find - Locate appointments

List all the appointments that matches the predicates provided.

  • PATIENT_ID : List appointments of a specific patient
  • STARTING_TIME : List appointments after the starting time
  • ENDING_TIME : List appointments before the ending time
  • VAX_NAME : List appointments that uses the specific vaccination
  • KEYWORDS : List appointments that matches the keywords
Syntax
appointment find {...KEYWORDS... | [--ATTRIBUTE_FLAG FLAG_ARGUMENT]+}
  • KEYWORD : <string>
Find by flag

ATTRIBUTE_FLAG and their corresponding FLAG_ARGUMENT have similar mappings and requirements to to appointment’s add. That is,

  • --p -> PATIENT_ID : <integer>
  • --s -> STARTING_TIME : <date>
  • --e -> ENDING_TIME : <date>
  • --v -> VAX_NAME : <group-name>
Example
appointment find --p 1
appointment find --v Dose 1

Output:

[INFO] 0 appointments listed!
[INFO] 1 appointments listed!

Appointment Find Appointment Flag

Find by keyword

This feature searches for appointments where either the appointment’s starting time or the type of vaccine used matches with the `KEYWORDS` provided.

Priority: Appointment’s starting time > Type of vaccine used

Example

Finds all appointments that uses “Dose 1” vaccines

appointment find Dose 1

Output:

[INFO] 1 appointments listed!

Appointment Find Appointment Keyword

Remarks

This feature prioritises the provided flags over the keywords. If a flag is provided, then the returned list of appointments will use the provided flags and ignore the keyword even if it were provided.

edit - Edit an appointment

Edits the details of an existing appointment.

Syntax
appointment edit APPOINTMENT_ID [--p PATIENT_ID] \
    [--s STARTING_TIME] [--e ENDING_TIME] \
    [--v VACCINATION]
  • APPOINTMENT_ID : <index>
  • PATIENT_ID : <index>
  • STARTING_TIME : <date>
  • ENDING_TIME : <date>
  • VACCINATION : <vax-retriever>
Example
appointment edit 1 --p 5 --s 2024-03-05 0700 --e 2024-03-05 0800 --v Dose 1 (Pfizer)

Output:

[INFO] Edited Appointment: 5 has an appointment at 2024-03-05T07:00

Appointment Edit Appointment

Restrictions
  • APPOINTMENT_ID must be an existing index in the appointment manager.
  • APPOINTMENT_ID must be of an appointment that has not yet passed.
  • PATIENT_ID must refer to an existing patient in the system.
  • The patient referred to by PATIENT_ID must not have any upcoming appointments that are not yet completed.
  • START_TIME must be after the current locale time.
  • END_TIME must be after the given starting time.
  • VACCINATION must refer to an existing vaccination in the system.

mark - Mark an appointment as completed

Marks an existing appointment as completed.

Syntax
appointment mark APPOINTMENT_ID
  • APPOINTMENT_ID : <index>
Example
appointment mark 1

Output:

[INFO] Marked Appointment: 5 has an appointment at 2024-03-05T07:00

Appointment Mark Appointment

Restrictions
  • The APPOINTMENT_ID must be an existing index in the appointment manager.
  • The specified appointment should not already be done.

unmark - Unmark a completed appointment

Changes the completion status to not done.

:exclamation: WARNING: VMS does not check if the patient is still eligible to take the vaccination of the unmarked appointment. Thus, no warming messages or error messages will show if the patient is unable to take the vaccination of the unmarked appointment.
Syntax
appointment unmark APPOINTMENT_ID
  • APPOINTMENT_ID : <index>
Example
appointment unmark 1

Output:

[INFO] Unmarked Appointment: 5 has an appointment at 2024-03-05T07:00

Appointment Unmark Appointment

Restrictions
  • The APPOINTMENT_ID must be an existing index in the appointment manager.
  • The specified appointment should already be done.

delete - Delete an appointment

Removes the specified appointment from the appointment manager.

Syntax
appointment delete APPOINTMENT_ID
  • APPOINTMENT_ID : <index>
Example
appointment delete 1

Output:

[INFO] Deleted Appointment: 5 has an appointment at 2024-03-05T07:00
Restrictions
  • The APPOINTMENT_ID must be an existing index in the appointment manager.

Data files

VMS automatically saves your data after every successful command execution to [JAR file location]/data. They are saved as JSON files and users are welcomed to update the data directly by editing these files.

:exclamation: Errors while editing JSON file

In most cases, if there are errors present in the data file, VMS will ignore these files and start with the default start up data for that component with some exceptions to appointment. However, a warning message will always show and and users should review them to ensure that they are expected before executing any commands.

If any commands were to successfully be executed, ALL previous data in the data folder, if present, will be overwritten and lost forever.

:information_source: JSON syntax presentation

  • The following will have the same meaning as CLI presentation.
    • Pink italicized bolded capitalized words (PLACEHOLDER_EXAMPLE)
    • Three dots with no spaces (ARG... and ...ARG...)
    • Triangle brackets (< and >)
  • Square brackets ([ and ]) and braces ({ and }) will have no unique meaning other than being a required character for JSON syntax.

Keyword data files

Keyword data are stored in [JAR file location]/data/keyword.json.

Overall file format
{
  "keywords": [...KEYWORD...]
}
<keyword> format
{
  "keyword": KEYWORD,
  "mainKeyword": MAIN_KEYWORD
}
  • KEYWORD : <keyword>
  • MAIN_KEYWORD : <main-keyword>
Restrictions

On top of the type restrictions of the parameters, if these restrictions are violated, it will render the keyword invalid. In all cases, VMS will ignore the entire keyword data file if an invalid keyword is present.

  • keyword must not contain any newline characters, e.g. \n.

Patient data files

Patient data are stored in [JAR file location]/data/patientmanager.json.

Overall file format
{
  "datas": [...PATIENT...]
}
<patient> format
{
  "isActive": IS_ACTIVE,
  "id": PATIENT_ID,
  "patient": {
    "name": PATIENT_NAME,
    "phone": PHONE,
    "dob": DATE_OF_BIRTH,
    "bloodType": BLOODTYPE,
    "allergies": [...ALLERGY...],
    "vaccines": [...VACCINE...]
  }
}
  • IS_ACTIVE : <boolean>
    • This value does not do anything but there to aid in future developments.
  • PATIENT_ID : <integer>
    • 0 based indexing.
  • NAME : <name>
  • PHONE : <phone-number>
  • DATE_OF_BIRTH : <date>
  • BLOODTYPE : <blood-type>
  • ALLERGY : <group-name>
  • VACCINE : <group-name>
Restrictions

On top of the type restrictions of the parameters, if these restrictions are violated, it will render the patient invalid. In all cases, VMS will ignore the entire patient data file if an invalid patient is present.

  • DATE_OF_BIRTH must be a date before the time the application is launched.
Example
{
  "datas" : [ {
    "isActive" : true,
    "id" : 0,
    "patient" : {
      "name" : "Alex Yeoh",
      "phone" : "87438807",
      "dob" : "1983-12-23T00:00:00",
      "bloodType" : "A+",
      "allergies" : [ ],
      "vaccines" : [ "Dose 1 (Moderna)" ]
    }
  } ]
}

Vaccination data files

Vaccination data are stored in [JAR file location]/data/vaxtype.json.

Overall file format
{
  "types": [...VACCINATION...]
}
<vaccination> format
{
  "name": VAX_NAME,
  "groups": [...GROUP...],
  "minAge": MIN_AGE,
  "maxAge": MAX_AGE,
  "ingredients": [...INGREDIENT],
  "historyReqs": [...REQUIREMENT...]
}
  • VAX_NAME : <group-name>
  • GROUP : <group-name>
  • MIN_AGE : <age>
  • MAX_AGE : <age>
  • INGREDIENT : <group-name>
  • REQUIREMENT : <req>
:information_source: INFO: All nodes are optional except for “name”. If the optional nodes are omitted, they will be assumed to be their default values as described here.
Restrictions

On top of the type restrictions of the parameters, if these restrictions are violated, it will render the vaccination invalid. In all cases, VMS will ignore the entire vaccination data file if an invalid vaccination is present.

  • MIN_AGE must not be greater than MAX_AGE.
<req> format
{
  "reqType": REQ_TYPE,
  "reqSet": [...REQUIREMENT...]
}
  • REQ_TYPE : <req-type>
  • REQUIREMENT : <group-name>
Example
{
  "types" : [ {
    "name" : "Dose 3 (Pfizer)",
    "groups" : [ "Pfizer", "Vaccination", "DOSE 3" ],
    "minAge" : 5,
    "maxAge" : 200,
    "ingredients" : [
      "ALC-0159",
      "DSPC",
      "Sucrose",
      "Phosphate",
      "ALC-0315",
      "Tromethamine hydrochloride",
      "Cholesterol",
      "Tromethamine" ],
    "historyReqs" : [ {
      "reqType" : "NONE",
      "reqSet" : [ "DOSE 3" ]
    }, {
      "reqType" : "ANY",
      "reqSet" : [ "DOSE 2" ]
    } ]
  } ]
}

Appointment data files

Appointment data are stored in [JAR file location]/data/appointment.json.

Overall file format
{
  "datas": [...APPOINTMENT...]
}
<appointment> format
{
  "isActive": IS_ACTIVE,
  "id": APPOINTMENT_ID,
  "appointment": {
    "patientId": PATIENT_ID,
    "startTime": START_TIME,
    "endTime": END_TIME,
    "vaccine": VAX_NAME,
    "isComplete": IS_COMPLETE
  }
}
  • IS_ACTIVE : <boolean>
    • This value does not do anything but there to aid in future developments.
  • APPOINTMENT_ID : <integer>
    • 0 based indexing.
  • PATIENT_ID : <integer>
    • 1 based indexing.
  • START_TIME : <date>
  • END_TIME : <date>
  • VAX_NAME : <group-name>
  • IS_COMPLETE : <boolean>
Restrictions

On top of the type restrictions of the parameters, if these restrictions are violated, it will render the appointment invalid. In all cases unless specified, VMS will ignore the entire appointment data file if an invalid appointment is present.

  • APPOINTMENT_ID must not be negative.
  • Within the entire data file, there should not be a case where there are duplicated APPOINTMENT_ID.
  • Within the entire data file, there should not be a case where a patient has 2 active appointments.
  • PATIENT_ID must map to an existing patient.
    • This error will only cause that appointment to not be loaded.
  • VAX_NAME must map to an existing vaccination.
    • This error will only cause that appointment to not be loaded.
  • START_TIME must be before END_TIME.
Example
{
  "datas" : [ {
    "isActive" : true,
    "id" : 1,
    "appointment" : {
      "patientId" : 1,
      "startTime" : "2024-03-05T16:00:00",
      "endTime" : "2024-03-05T16:30:00",
      "vaccine" : "Dose 2 (Moderna)",
      "isCompleted" : false
    }
  } ]
}

Planned features

  1. Delete and edit specific elements in list like attributes such as patient’s allergies or vaccination’s history requirements.
  2. Auto add vaccination to the patient’s vaccination records when marking appointments as complete.
  3. Validations and warning to check if the patient can still take the vaccination on these scenarios:
    1. Unmarking a previously marked appointment.
    2. Changing the requirements of a vaccination while there are still patients with appointments for that vaccination.
    3. Changing the patients records while that patient still has upcoming appointments.
  4. Command to clear all marked appointments.
  5. Command to clear all appointments.
  6. Schedule multiple active appointments for the same patient.

FAQ

How do I delete/edit a specific element in list like attributes?

At the moment, VMS does not offer a quick CLI way to delete/edit specific elements in such lists. However, this is a planned feature in future updates!

A work around this is to edit the data files directly.

I added a vaccination but it does not appear in the the vaccination list panel

The filters applied from your last find command are most likely still active. Use vaccination’s list command to clear the filters.

This feature is intended to increase the efficiency of vaccination’s edit. Specifically the referring to vaccinations by indexes. You can learn more about this here.