fix height_weight table

This commit is contained in:
ipu 2025-08-06 15:53:45 +03:00
parent 4967008abb
commit c218e0bbf3
2 changed files with 9 additions and 7 deletions

View file

@ -232,13 +232,14 @@ class EstimationService:
applicant_tier = tier
break
weight_min, weight_max = HEIGHT_WEIGHT_TABLE[(applicant.heightFt, applicant.heightIn)]
if applicant.weight < weight_min:
is_dtq = True
reason = "Declined due to low BMI of one or more applicants"
elif applicant.weight > weight_max:
is_dtq = True
reason = "Declined due to high BMI of one or more applicants"
if (applicant.heightFt, applicant.heightIn) in HEIGHT_WEIGHT_TABLE:
weight_min, weight_max = HEIGHT_WEIGHT_TABLE[(applicant.heightFt, applicant.heightIn)]
if applicant.weight < weight_min:
is_dtq = True
reason = "Declined due to low BMI of one or more applicants"
elif applicant.weight > weight_max:
is_dtq = True
reason = "Declined due to high BMI of one or more applicants"
rx_spend_applicant = self.calculate_rx_spend(phq, applicant_id)
rx_spend += rx_spend_applicant