Skip to content

Commit 1fa53d6

Browse files
authored
Update README.md
1 parent 48ee092 commit 1fa53d6

File tree

1 file changed

+42
-3
lines changed

1 file changed

+42
-3
lines changed

README.md

+42-3
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,64 @@ Modern, lightweight medication sig parser.
66

77
### Installation
88

9-
Clone repo and cd into `parserx` directory.
9+
Clone repo.
1010

1111
```
1212
git clone https://github.com/coderxio/parserx.git
13-
cd parserx
1413
```
1514

16-
Create virtual environment.
15+
Create virtual environment within the `parserx/` directory.
1716

1817
```
18+
cd parserx
1919
python3 -m venv venv
2020
```
2121

22+
### Running ParseRx
23+
2224
Activate virtual environment.
2325

2426
```
2527
source venv/bin/activate
2628
```
2729

30+
Initialize script.
31+
32+
```
33+
python main.py
34+
```
35+
36+
### Parse single sig
37+
38+
Example:
39+
40+
```
41+
Enter 1 for a single sig. Enter 2 for bulk sigs via .csv file: 1
42+
Enter sig: take 1-2 tab po qid x7d prn pain
43+
{'sig_text': 'take 1-2 tab po qid x7d prn pain', 'sig_readable': 'take 1-2 tablets by mouth 4 times a day for 7 days as needed for pain', 'max_dose_per_day': 8.0, 'method': 'take', 'method_text_start': 0, 'method_text_end': 4, 'method_text': 'take', 'method_readable': 'take', 'dose': 1, 'dose_max': 2, 'dose_unit': 'tablet', 'dose_text_start': 5, 'dose_text_end': 12, 'dose_text': '1-2 tab', 'dose_readable': '1-2 tablets', 'strength': None, 'strength_max': None, 'strength_unit': None, 'strength_text_start': None, 'strength_text_end': None, 'strength_text': None, 'strength_readable': None, 'route': 'by mouth', 'route_text_start': 13, 'route_text_end': 15, 'route_text': 'po', 'route_readable': 'by mouth', 'frequency': 4, 'frequency_max': None, 'period': 1, 'period_max': None, 'period_unit': 'day', 'time_duration': None, 'time_duration_unit': None, 'day_of_week': None, 'time_of_day': None, 'offset': None, 'bounds': None, 'count': None, 'frequency_text_start': 16, 'frequency_text_end': 19, 'frequency_text': 'qid', 'frequency_readable': '4 times a day', 'when': None, 'when_text_start': None, 'when_text_end': None, 'when_text': None, 'when_readable': None, 'duration': 7, 'duration_max': None, 'duration_unit': 'day', 'duration_text_start': 20, 'duration_text_end': 23, 'duration_text': '7 d', 'duration_readable': 'for 7 days', 'as_needed': 1, 'indication': 'pain', 'indication_text_start': 24, 'indication_text_end': 32, 'indication_text': 'prn pain', 'indication_readable': 'as needed for pain', 'max_numerator_value': None, 'max_numerator_unit': None, 'max_denominator_value': None, 'max_denominator_unit': None, 'max_text_start': None, 'max_text_end': None, 'max_text': None, 'max_readable': None, 'additional_info': None, 'additional_info_text_start': None, 'additional_info_text_end': None, 'additional_info_text': None, 'additional_info_readable': None}
44+
```
45+
46+
### Parse CSV of sigs
47+
48+
Example:
49+
50+
```
51+
Enter 1 for a single sig. Enter 2 for bulk sigs via .csv file: 2
52+
53+
54+
**********************************
55+
Place your input file in the /csv directory.
56+
**********************************
57+
> Input files are read from the /csv directory.
58+
> Output files are written to the /csv/output directory.
59+
60+
**********************************
61+
Enter the input file name (input.csv as default) and output file name (output.csv as default), separated by a space.
62+
input.csv output.csv
63+
progress: |██████████████████████████████████████████████████| 100.0% complete (n = 250)
64+
Output written to output.csv
65+
```
66+
2867
## Result object components
2968

3069
These are the main components returned from a parsed sig.

0 commit comments

Comments
 (0)