estimation service refactor

This commit is contained in:
ipu 2025-07-25 17:43:23 +03:00
parent aaba8753ef
commit 18c95083c9
4 changed files with 367 additions and 62 deletions

View file

@ -198,47 +198,95 @@ Handles insurance estimation and underwriting requests.
**Request Body:**
```json
{
"uid": "application-id",
"uid": "string",
"applicants": [
{
"firstName": "John",
"dob": "15/03/1985",
"weight": 70,
"heightFt": 5,
"heightIn": 10,
"applicant": 1
"applicant": 1,
"firstName": "string",
"lastName": "string",
"midName": "string",
"phone": "string",
"gender": "male",
"dob": "2025-07-25",
"nicotine": true,
"weight": 0,
"heightFt": 0,
"heightIn": 0
}
],
"plans": [
{
"coverage": 1
"id": 0,
"coverage": 1,
"tier": "string"
}
],
"phq": {
"effectiveDate": "01/01/2024",
"medications": [],
"conditions": [],
"issues": []
"treatment": true,
"invalid": true,
"pregnancy": true,
"effectiveDate": "2025-07-25",
"disclaimer": true,
"signature": "string",
"medications": [
{
"applicant": 0,
"name": "string",
"rxcui": "string",
"dosage": "string",
"frequency": "string",
"description": "string"
}
],
"issues": [
{
"key": "string",
"details": [
{
"key": "string",
"description": "string"
}
]
}
],
"conditions": [
{
"key": "string",
"description": "string"
}
]
},
"income": 50000,
"address": {}
"income": 0,
"address": {
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"zipcode": "string"
}
}
```
**Response:**
```json
{
"uid": "application-id",
"status": "submitted",
"data": {
"results": [...],
"combined": {
"tier": 2.0,
"total_price": 243,
"dtq": false,
"message": "Final assigned tier is 2.0"
}
"status": "accepted",
"details": {
"dtq": true,
"reason": "string",
"tier": 0,
"total_price": 0
},
"external": {...}
"results": [
{
"name": "string",
"applicant_type": "Primary",
"age": 0,
"bmi": 0,
"tier": 0,
"rx_spend": 0,
"message": "string"
}
]
}
```