Skip to content

Commit

Permalink
Updated UserGuide.adoc with OpenCommand, SaveCommand, ImportCommand a…
Browse files Browse the repository at this point in the history
…nd ExportCommand.
  • Loading branch information
JiaHaoLim committed Mar 15, 2019
1 parent 45cc076 commit 243fc9b
Showing 1 changed file with 57 additions and 16 deletions.
73 changes: 57 additions & 16 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -340,37 +340,78 @@ newly created teeth layout.
indicate personalised note describing more detail on the patient’s teeth
health.

=== Export
Exports the entire records into the specified file path with the
specified file name.
=== Open
Opens the file in the specified file path and overwrites the current records.
** Note that 'open' always searches inside the data folder.

Format: `export FILE_PATH FILE_NAME`
Format: `open FILE_PATH`

Example:
Examples:

* `open records1.json` +
Replaces the current records with the records in "records1.json".

* `open february\records2.json` +
Replaces the current records with the records in "records2.json" found in the "february" folder.


=== Save
Saves the current records to the specified filepath.
** Note that 'save' always saves inside the data folder. If no such filepath exists,
it will be created. Otherwise, it will overwrite the existing file.

Format: `save FILE_PATH`

Examples:

* `save records1.json` +
Saves the current records to "records1.json".

* `export /mnt/ext_drive/ clinicRecords.txt` +
Creates a file named clinicRecords.txt in the /mnt/ext_drive/ folder
* `save february\records2.json` +
Saves the current records to "records1.json" found in the "february" folder.


=== Import
Imports data into the program from the specified file path and
overwrites current data.
Opens the file in the specified file path and adds the specified patients to the current records.
** Note that 'import' always searches inside the data folder.

Format: `import FILE_PATH [append]`
Format: `import FILE_PATH INDEX_RANGE`

Examples:

* `import records1.json 1` +
Adds patient 1 from "records1.json" to the current records.

* `import february\records1.json 1` +
Adds patient 1 from "records1.json" found in the "february" folder to the current records.

* `import records1.json 1,4` +
Adds patient 1 and patient 4 from "records1.json" to the current records.

* `import records1.json 1-4` +
Adds patient 1 to patient 4 from "records1.json" to the current records.


=== Export
Saves the specified patients in the current records to the specified filepath.
** Note that 'export' always saves inside the data folder. If no such filepath exists,
it will be created. Otherwise, it will overwrite the existing file.

Note: The optional “append” adds the file data onto the current records
rather than overwriting.
Format: `export FILE_PATH INDEX_RANGE`

Examples:

* `export records1.json 1` +
Saves patient 1 from the current records to "records1.json".

* `import /mnt/sample/newData` +
Replaces the current records with the ones in the newData file
* `export february\records1.json 1` +
Saves patient 1 from the current records to "records1.json" found in the "february" folder.

* `export records1.json 1,4` +
Saves patient 1 and patient 4 from the current records to "records1.json".

* `import /mnt/sample/extraData append` +
Appends the records within extraData onto the current program’s records.
* `export records1.json 1-4` +
Saves patient 1 to patient 4 from the current records to "records1.json".


=== List
Expand Down

0 comments on commit 243fc9b

Please sign in to comment.