Skip to content

Conversation

@halcwb
Copy link
Collaborator

@halcwb halcwb commented Dec 22, 2025

This pull request introduces support for organizational location (Location) in reconstitution rules, patient categories, and related filtering logic throughout the codebase. The changes ensure that both department and location constraints are consistently modeled, parsed, and applied, aligning the implementation with updated domain documentation. Additionally, minor discrepancies and terminology mismatches between documentation and code have been addressed.

Domain Model and Documentation Alignment

  • Updated domain documentation and resource requirements to clarify that reconstitution rules can be constrained by both Location (organizational) and Department, and marked these fields as optional where appropriate. [1] [2]
  • Removed outdated discrepancy regarding missing Location constraint and cleaned up related documentation sections for clarity. [1] [2]

Type and Data Structure Updates

  • Added Location : string option to the Reconstitution, PatientCategory, and Patient types in Types.fs, and updated all relevant code to handle the new field. [1] [2] [3]

Parsing and Filtering Logic

  • Modified parsing logic in Product.fs and SolutionRule.fs to extract both Location and Department from resource sheets, making them optional and handling empty values gracefully. [1] [2] [3]
  • Refactored filtering logic for reconstitution rules to require matching on both Location and Department only when both are specified, improving flexibility and correctness. [1] [2] [3]

Patient Matching and Rule Application

  • Updated patient category matching logic to include location checks, and refactored related code to ensure all patient filters (location, department, age, weight, gender, access) are consistently applied. [1] [2] [3]
  • Updated rule application functions (DoseRule.fs, PrescriptionRule.fs) to correctly pass and handle location and department parameters in the correct order. [1] [2]

Other Improvements

  • Added additional lens properties for new fields in the Patient type for easier access and mutation.
  • Updated default/empty values for new fields in relevant modules to avoid null reference issues. [1] [2] [3] [4]

These changes collectively enhance the flexibility and correctness of reconstitution rule selection and patient matching, and bring the codebase into alignment with the latest domain requirements.

@halcwb halcwb merged commit f156034 into informedica:master Dec 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant