Skip to content

Commit

Permalink
Merge pull request #147 from ongweijie7/EditUG1
Browse files Browse the repository at this point in the history
Edit ug1
  • Loading branch information
SeanChinJunKai authored Mar 30, 2023
2 parents 7fd29ae + 78481dc commit 7eeec5c
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,39 +198,34 @@ Format: `list`

### Filter patients by attribute: `find`

Find patients according to a particular attribute stated followed by the change.
Find patients according to a particular command prefix stated followed by the change.

Command Prefixes that can be searched:
* name(`n/`)
* nric(`i/`)
* tag(`t/`)
* doctor(`ad/`)
* medicine(`m/`)
Command Prefixes that can be searched:
* name(`n/`)
* nric(`i/`)
* tag(`t/`)
* doctor(`ad/`)
* medicine(`m/`)

<div markdown="span" class="alert alert-info">:information_source:
**Note:**
- `find` searches by full strings and not substrings.
- You may only search for a few attributes.
- Only one attribute can be searched at one time.
**Note:** `find` searches by full strings and not substrings. The search will only be carried out for **one** given
attribute.
</div>

<div markdown="span" class="alert alert-info">:information_source:
* The search is case-insensitive. e.g panadol will match pANAdol.
* The order of the keywords does matter. e.g. "panadol" will match "medicine panadol".
</div>

Format: `find (n/NAME | i/NRIC | t/TAG | ad/DOCTOR | m/MEDICINE ) [MORE_KEYWORDS]`

* The search will only be carried out for the given attribute.
* The search is case-insensitive. e.g panadol will match pANAdol.
* The order of the keywords does matter. e.g. "panadol" will match "medicine panadol".
* Multiple keywords for a given attribute can be inputted. All matching persons will be returned.
* e.g., `find n/David Alex Jon` will return persons with name containing `David` or `Alex` or `Jon` or any
combination of the three.

Examples (The following results are based of the sample data provided):

* `find n/john` returns `John Lim` and `John Doe` who both contain the name `John` in their names.
* `find a/serangoon` returns `Alice Tan` and `John Doe` who have an address located in `Serangoon`.
* `find i/S0078957G` returns `Alice Tan` who has an NRIC of `S0078957G`.
* `find a/ang mo kio serangoon` returns 'Alice Tan', 'John Doe', 'John Lim' who all stay either in `ang mo kio`
or `serangoon`.
* `find t/Diabetic` returns all persons with the tag `Diabetic`.
* `find t/Diabetic Osteoporotic` returns all persons with the tag `Diabetic` or `Osteoporotic` or both.
* `find ad/Shannon` returns all persons with attending doctor `Shannon`

Expand Down

0 comments on commit 7eeec5c

Please sign in to comment.