đź§ ParseRx
Lightweight medication sig parser.
GitHub repo
Features
- Custom Django Rest Framework API built in.
- Custom ReactJS frontend review and demo tool w/ easy documentation reference.
- API and Python module support parsing individual sigs and batch parsing CSV sigs.
- Supports feedback loop from "customers" via API call.
- Accepts NDCs or RXCUIs via API call to infer things like method, route, or dose form if missing from sig text.
- Version controls sigs that parse differently after code changes. API has logic built in to return the most recent version that is positively reviewed, OR will always return the most recent version if there are no reviews.
Parsed sig components
method
How the medication is administered (i.e. take, inject, inhale).
dose
dose_max
dose_unit
How much medication patient is instructed to take based on dosage (i.e. 2 tablets, 30 units, 1-2 puffs).
Numbers represented as words in the sig will be converted to integers (i.e. “one” will be converted to 1).
strength
strength_max
strength_unit
How much medication the patient is instructed to take based on strength (i.e. 500 mg, 15 mL, 17 g).
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).
route
Route of administration of the medication (i.e. by mouth, via inhalation, in left eye).
frequency
frequency_max
period
period_max
period_unit
time_duration
time_duration_unit
day_of_week
time_of_day
when
offset
bounds
count
frequency_readable
How often medication should be administered (i.e. every 4-6 hours, three times daily, once daily in the morning with meal).
Due to the complexity and variety of medication instructions, these elements are based off of an existing standard - FHIR Timing.
For convenience, a frequency_readable is generated to represent a human-readable representation of the sig frequency.
duration
duration_max
duration_unit
How long the patient is instructed to take the medication (i.e. for 7 days, for 7-10 days, for 28 days).
NOTE: this is different from days’ supply, which represents how long a given supply of medication should last.
as_needed
indication
Whether the medication should be taken “as needed” (i.e. PRN), and the specific reason the patient is taking the medication (i.e. for pain, for wheezing and shortness of breath, for insomnia).
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).
Inferred sig components
method
dose_unit
route
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.
Any or all of the inferred sig components may be null if it is not possible to infer them.