fix height_weight table
This commit is contained in:
parent
4967008abb
commit
c218e0bbf3
2 changed files with 9 additions and 7 deletions
|
|
@ -46,6 +46,7 @@ async def estimate(request: models.EstimationRequest):
|
||||||
raise e
|
raise e
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Exception in estimate: ", e)
|
print("Exception in estimate: ", e)
|
||||||
|
raise e
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=500,
|
status_code=500,
|
||||||
detail=f"Server error: {str(e)}"
|
detail=f"Server error: {str(e)}"
|
||||||
|
|
|
||||||
|
|
@ -232,13 +232,14 @@ class EstimationService:
|
||||||
applicant_tier = tier
|
applicant_tier = tier
|
||||||
break
|
break
|
||||||
|
|
||||||
weight_min, weight_max = HEIGHT_WEIGHT_TABLE[(applicant.heightFt, applicant.heightIn)]
|
if (applicant.heightFt, applicant.heightIn) in HEIGHT_WEIGHT_TABLE:
|
||||||
if applicant.weight < weight_min:
|
weight_min, weight_max = HEIGHT_WEIGHT_TABLE[(applicant.heightFt, applicant.heightIn)]
|
||||||
is_dtq = True
|
if applicant.weight < weight_min:
|
||||||
reason = "Declined due to low BMI of one or more applicants"
|
is_dtq = True
|
||||||
elif applicant.weight > weight_max:
|
reason = "Declined due to low BMI of one or more applicants"
|
||||||
is_dtq = True
|
elif applicant.weight > weight_max:
|
||||||
reason = "Declined due to high BMI of one or more applicants"
|
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_applicant = self.calculate_rx_spend(phq, applicant_id)
|
||||||
rx_spend += rx_spend_applicant
|
rx_spend += rx_spend_applicant
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue