-
Notifications
You must be signed in to change notification settings - Fork 6
Scenarios, improve reconstitution handling and UI #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…add possibility to use dosis unit
…right dose limit target
… revert product quantities using all possible values
… layout of time printing, fix timeToMd
Greptile OverviewGreptile SummaryThis PR enhances medication parsing, dose rule processing, and product reconstitution handling across the codebase. The changes improve unit handling, parsing robustness, and constraint propagation throughout the medication and order generation pipeline. Key improvements:
Issues found:
The changes are well-structured and maintain backward compatibility while adding necessary functionality for reconstitution scenarios. Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Parser as Medication Parser
participant Med as Medication Model
participant Order as Order Generator
participant DR as DoseRule
participant Prod as Product
participant VU as ValueUnit
Note over Parser,VU: Medication Parsing & Order Generation Flow
Parser->>Parser: parseLine (tab/space support)
Parser->>Parser: parseDoseLimitOpt(target, string)
Note right of Parser: Now accepts target type:<br/>Substance/Component/Orderable
Parser->>Med: Create SubstanceItem with Quantities
Note right of Med: New field for reconstitution scenarios
Med->>DR: Filter dose limits
DR->>DR: hasNoLimits check
Note right of DR: Filter out empty limits
DR->>DR: Handle "dosis" unit
Note right of DR: Special case for dosis/<br/>count units
Med->>Prod: Process reconstitution
Prod->>Prod: Calculate vol = ExpansionVolume + DiluentVolume
Prod->>VU: Update concentrations
VU->>VU: toString(vw, uw, hasGroup, loc, verb)
Note right of VU: Enhanced with optional<br/>value/unit wrappers
Med->>Order: setItemQtyConcConstraints
Note right of Order: Set ComponentQuantity constraints
Order->>Order: calculateDivisibility(pc, med)
Note right of Order: Match orderable/product units
Order->>Order: printPrep(printMd, sns, ord)
Note right of Order: Extracted function for<br/>reconstitution display
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7 files reviewed, 2 comments
This pull request introduces several improvements and bug fixes across the medication data parsing, dose rule logic, and product reconstitution flows. The main changes focus on enhancing unit handling, improving parsing robustness, and ensuring correct calculation and propagation of quantities and constraints throughout the medication and order generation process.
Medication parsing and data model improvements:
Quantitiesfor substances in the medication model, ensuring that these values are correctly read from input data and propagated through the system. [1] [2] [3] [4]Order and constraint calculation enhancements:
Dose rule and product logic fixes:
Testing and script updates:
Miscellaneous:
These changes collectively improve the correctness, maintainability, and robustness of the medication and dose rule processing pipeline.
@greptile: review.