NAME

Health::BladderDiary::GenTable - Create bladder diary table from entries

VERSION

This document describes version 0.001 of Health::BladderDiary::GenTable (from Perl distribution Health-BladderDiary-GenTable), released on 2020-11-11.

SYNOPSIS

Your bladder entries e.g. in `bd-entry1.txt` (I usually write in Org document):

0730 drink: 300ml type=water

0718 urinate: 250ml

0758 urinate: 100ml

0915 drink 300ml

1230 drink: 600ml, note=thirsty

1245 urinate: 200ml

From the command-line (I usually run the script from inside Emacs):

% gen-bladder-diary-table-from-entries < bd-entry1.txt
| time     | intake type | itime | ivol (ml) | ivol cum | icomment | urination time | uvol (ml) | uvol cum | urgency (0-3) | ucolor (0-3) | ucomment |
|----------+-------------+-------+-----------+----------+----------+----------------+-----------+----------+---------------+--------------+----------+
| 07-08.00 | water       | 07.30 |       300 |      300 |          |          07.18 |       250 |      250 |               |              |          |
|          |             |        |           |          |          |          07.58 |       100 |      350 |               |              |          |
| 08-09.00 |             |       |           |          |          |                |           |          |               |              |          |
| 09-10.00 | water       | 09.15 |       300 |      600 |          |                |           |          |               |              |          |
| 10-11.00 |             |       |           |          |          |                |           |          |               |              |          |
| 12-13.00 | water       | 12.30 |       600 |     1200 | thirsty  |          12.45 |       200 |          |               |              |          |
|          |             |       |           |          |          |                |           |          |               |              |          |
| total    |             |       |      1200 |          |          |                |       550 |          |               |              |          |
| freq     |             |       |         3 |          |          |                |         3 |          |               |              |          |
| avg      |             |       |       400 |          |          |                |       183 |          |               |              |          |

Produce CSV instead:

% gen-bladder-diary-table-from-entries --format csv < bd-entry1.txt > bd-entry1.csv

DESCRIPTION

This module can be used to visualize bladder diary entries (which is more comfortable to type in) into table form (which is more comfortable to look at).

KEYWORDS

voiding diary, bladder diary

FUNCTIONS

gen_bladder_diary_table_from_entries

Usage:

gen_bladder_diary_table_from_entries(%args) -> [status, msg, payload, meta]

Create bladder diary table from bladder diary entries.

This function is not exported by default, but exportable.

Arguments ('*' denotes required arguments):

  • entries* => str

Returns an enveloped result (an array).

First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (payload) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.

Return value: (any)

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Health-BladderDiary-GenTable.

SOURCE

Source repository is at https://github.com/perlancar/perl-Health-BladderDiary-GenTable.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Health-BladderDiary-GenTable

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2020 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.