Skip to content

Commit b747c1f

Browse files
authored
Update README.md
1 parent 1fa53d6 commit b747c1f

File tree

1 file changed

+38
-34
lines changed

1 file changed

+38
-34
lines changed

README.md

+38-34
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# 🧠 ParseRx
22

3-
Modern, lightweight medication sig parser.
3+
> A modern, lightweight medication sig parser.
44
55
## Getting started
66

7+
Input free text medication sigs, output discrete sig elements.
8+
* Extract method, dose, strength, frequency, route, duration, indication, and additional info
9+
* Calculate maximum daily dose (preferring explicit MDD in sig over maximum possible dose per day)
10+
11+
Medication "sigs" are the instructions you see on your prescription label - i.e. "take 1-2 tablets by mouth daily".
12+
713
### Installation
814

915
Clone repo.
@@ -64,36 +70,26 @@ progress: |███████████████████████
6470
Output written to output.csv
6571
```
6672

67-
## Result object components
73+
## Parsed sig components
6874

69-
These are the main components returned from a parsed sig.
75+
### Text
7076

7177
`sig_text`
7278

7379
A string containing the modified sig_text from the request, converted to lower case, extraneous characters removed, and duplicate spaces converted to single spaces.
7480

75-
`sig_parsed`
76-
77-
A JSON object containing all the parsed components of the free text sig. See details of each component below.
78-
79-
`sig_inferred`
81+
`sig_readable`
8082

81-
A JSON object containing all the inferred sig components if the request included an ndc or rxcui parameter. See details of each component below.
82-
83-
This entire object will only appear if a valid ndc or rxcui are included as a request parameter. If both are included, ndc will take precedence over rxcui.
84-
85-
`original_sig_text`
86-
87-
A string containing the original, un-modified sig_text from the request.
88-
89-
## Parsed sig components
83+
A human-readable version of the parsed sig for quick and easy validation.
9084

91-
These components are contained within `sig_parsed`.
85+
### Method
9286

9387
`method`
9488

9589
How the medication is administered (i.e. take, inject, inhale).
9690

91+
### Dose
92+
9793
`dose`
9894

9995
`dose_max`
@@ -104,6 +100,8 @@ How much medication patient is instructed to take based on dosage (i.e. 2 tablet
104100

105101
Numbers represented as words in the sig will be converted to integers (i.e. “one” will be converted to 1).
106102

103+
### Strength
104+
107105
`strength`
108106

109107
`strength_max`
@@ -114,10 +112,14 @@ How much medication the patient is instructed to take based on strength (i.e. 50
114112

115113
NOTE: ParseRx intentionally does not parse multiple ingredient strengths (i.e. if 5/325 mg is in a sig, it will return null for strength).
116114

115+
### Route
116+
117117
`route`
118118

119119
Route of administration of the medication (i.e. by mouth, via inhalation, in left eye).
120120

121+
### Frequency
122+
121123
`frequency`
122124

123125
`frequency_max`
@@ -152,6 +154,8 @@ Due to the complexity and variety of medication instructions, these elements are
152154

153155
For convenience, a frequency_readable is generated to represent a human-readable representation of the sig frequency.
154156

157+
### Duration
158+
155159
`duration`
156160

157161
`duration_max`
@@ -162,6 +166,8 @@ How long the patient is instructed to take the medication (i.e. for 7 days, for
162166

163167
NOTE: this is different from days’ supply, which represents how long a given supply of medication should last.
164168

169+
### Indication / PRN
170+
165171
`as_needed`
166172

167173
`indication`
@@ -170,31 +176,29 @@ Whether the medication should be taken “as needed” (i.e. PRN), and the speci
170176

171177
NOTE: indication may be populated even if as_needed is false. There are chronic indications represented in sigs as well (i.e. for cholesterol, for high blood pressure, for diabetes).
172178

173-
`sig_reviewed_status`
179+
### Maximum daily dose
174180

175-
This is an indicator that a pharmacist / pharmacy resident has reviewed the sig.
181+
`max_dose_per_day`
176182

177-
Depending on the review status of the sig, it will return either unreviewed, correct, incorrect, or unknown.
183+
`max_numerator_value`
178184

179-
`sig_reviewed`
185+
`max_numerator_unit`
180186

181-
If sig_reviewed_status is unreviewed or unknown, this will be null.
182-
Otherwise, this will return an object containing the reviewed components of the parsed sig. See details of each component below.
187+
`max_denominator_value`
183188

184-
NOTE: ParseRx will be constantly improving, and as such, there may be multiple different versions of parsing a given sig. Each of these parsing versions will be reviewed by a pharmacist or pharmacy resident in time. If there exists a version that has a sig_reviewed_status of correct, this is the version that will be returned. Otherwise, the most recently parsed version of the sig will be returned.
189+
`max_deniminator_unit`
185190

186-
IMPORTANT: Pay close attention to the sig_reviewed_status and sig_reviewed object. It is your responsibility to use this information safely.
191+
Max numerator and denominator elements are extracted from text explicitly stated in the sig (i.e. if a prescriber writes mdd or nte).
187192

188-
### Inferred sig components
193+
Max dose per day looks to both the maximum dose possible per the sig instructions and any explicit mdd or or nte directions, preferring the mdd or nte directions if present.
189194

190-
These components are contained within `sig_inferred`.
195+
Examples:
191196

192-
`method`
197+
* take 1 tab every 6 hours mdd 3/d -> max_dose_per_day should be 3, max numerator/denominator should have values
198+
* take 1 tab every 6 hours -> max_dose_per_day should be 3, max numerator/denominator should not have values
193199

194-
`dose_unit`
195-
196-
`route`
200+
### Additional info
197201

198-
This entire object will only appear if a valid ndc or rxcui are included as a request parameter. If both are included, ndc will take precedence over rxcui.
202+
`additional_info`
199203

200-
Any or all of the inferred sig components may be null if it is not possible to infer them.
204+
Extra instructions such as "take with food" - things that might be on auxillary labels on a prescription bottle.

0 commit comments

Comments
 (0)