Skip to content

Add KD-50 Test: Risk Assessment Algorithm Consistency Test#24

Open
ErezKaminski wants to merge 1 commit intorelease/ek1/v2.1from
test/kd-50-insulin-dosage-limit
Open

Add KD-50 Test: Risk Assessment Algorithm Consistency Test#24
ErezKaminski wants to merge 1 commit intorelease/ek1/v2.1from
test/kd-50-insulin-dosage-limit

Conversation

@ErezKaminski
Copy link
Copy Markdown

Summary

This PR adds an automated test for KD-50 (Risk Assessment Algorithm Consistency Test) that verifies maximum insulin dosage limits are properly enforced.

Test Details

  • Test Case ID: KD-50
  • Test Name: Risk Assessment Algorithm Consistency Test
  • File: python-src/test_insulin_dosage_limit.py
  • Purpose: Validates that attempts to deliver more than the defined maximum insulin dosage (25 units) are not exceeded

Implementation

The test is a simple 5-line Python test function that:

  1. Defines a maximum insulin dosage constant (25.0 units)
  2. Simulates a request for a dosage exceeding the limit (30.0 units)
  3. Applies the dosage limit using min() function
  4. Asserts that the actual dosage does not exceed the maximum
  5. Verifies the dosage is correctly capped at the maximum value

Testing

The test can be run using pytest:

pytest python-src/test_insulin_dosage_limit.py

This automated test ensures patient safety by validating infusion limitations as required by the risk assessment specification.

This test verifies that attempts to deliver more than the defined 
maximum insulin dosage (25 units) are properly capped and not exceeded.

Test validates infusion limitations as required by KD-50.
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