lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [5946] Fix defect introduced 20140921T1522Z: no table rati


From: Greg Chicares
Subject: [lmi-commits] [5946] Fix defect introduced 20140921T1522Z: no table rating if preferred
Date: Thu, 25 Sep 2014 00:01:23 +0000

Revision: 5946
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5946
Author:   chicares
Date:     2014-09-25 00:01:21 +0000 (Thu, 25 Sep 2014)
Log Message:
-----------
Fix defect introduced 20140921T1522Z: no table rating if preferred

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/custom_io_1.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2014-09-21 15:22:26 UTC (rev 5945)
+++ lmi/trunk/ChangeLog 2014-09-25 00:01:21 UTC (rev 5946)
@@ -34127,3 +34127,8 @@
   custom_io_1.cpp
 Read and write new input and output formats.
 
+20140925T0001Z <address@hidden> [533]
+
+  custom_io_1.cpp
+Fix defect introduced 20140921T1522Z: no table rating if preferred.
+

Modified: lmi/trunk/custom_io_1.cpp
===================================================================
--- lmi/trunk/custom_io_1.cpp   2014-09-21 15:22:26 UTC (rev 5945)
+++ lmi/trunk/custom_io_1.cpp   2014-09-25 00:01:21 UTC (rev 5946)
@@ -160,7 +160,7 @@
     // Unused: <AgentCompanyName>
 
     // For certain fields, empty strings are taken to imply default values.
-    if(ApplicantRating          .empty()) ApplicantRating           = "None";
+    if(ApplicantRating          .empty()) ApplicantRating           = 
"[EMPTY]";
     if(ApplicantPermFlatExtraAmt.empty()) ApplicantPermFlatExtraAmt = "0.0";
     if(ApplicantTempFlatExtraAmt.empty()) ApplicantTempFlatExtraAmt = "0.0";
 
@@ -208,7 +208,28 @@
         : throw std::runtime_error(ApplicantTobacco + ": ApplicantTobacco not 
in {Y,N,U}.")
         ;
     z["State"                      ] = ApplicantState;
-    z["SubstandardTable"           ] = ApplicantRating; // ?! Need to know 
range of values.
+    // lmi's 'UnderwritingClass' and 'SubstandardTable' are conflated
+    // into the client system's <ApplicantRating>.
+    z["UnderwritingClass"] =
+          ("[EMPTY]" == ApplicantRating) ? "Standard"
+        : ("PF"      == ApplicantRating) ? "Preferred"
+        :                                  "Rated"
+        ;
+    z["SubstandardTable"] = // ?! Need to know range of values.
+          ("[EMPTY]" == ApplicantRating) ? "None"
+        : ("PF"      == ApplicantRating) ? "None"
+        : ("?0?"     == ApplicantRating) ? "A=+25%"
+        : ("?1?"     == ApplicantRating) ? "B=+50%"
+        : ("?2?"     == ApplicantRating) ? "C=+75%"
+        : ("?3?"     == ApplicantRating) ? "D=+100%"
+        : ("?4?"     == ApplicantRating) ? "E=+125%"
+        : ("?5?"     == ApplicantRating) ? "F=+150%"
+        : ("?6?"     == ApplicantRating) ? "H=+200%"
+        : ("?7?"     == ApplicantRating) ? "J=+250%"
+        : ("?8?"     == ApplicantRating) ? "L=+300%"
+        : ("?9?"     == ApplicantRating) ? "P=+400%"
+        : throw std::runtime_error(ApplicantRating + ": ApplicantRating 
unrecognized.")
+        ;
     double permanent_flat         = 
value_cast<double>(ApplicantPermFlatExtraAmt);
     double temporary_flat         = 
value_cast<double>(ApplicantTempFlatExtraAmt);
     int    temporary_flat_max_age = value_cast<int   
>(ApplicantTempFlatExtraThruAge);
@@ -242,18 +263,9 @@
     z["GroupUnderwritingType"] =
           "SI" == Underwriting ? "Simplified issue"
         : "GI" == Underwriting ? "Guaranteed issue"
-        : "UW" == Underwriting ? "Medical" // ?! Does "UW" mean "underwritten"?
-        : throw std::runtime_error(Underwriting + ": Underwriting not in 
{SI,GI}.")
+        : "UW" == Underwriting ? "Medical"
+        : throw std::runtime_error(Underwriting + ": Underwriting not in 
{SI,GI,UW}.")
         ;
-    z["UnderwritingClass"] = "Standard"; // Default.
-    if("None" != z["SubstandardTable"].str())
-        {
-        z["UnderwritingClass"]     = "Rated";
-        }
-    else if("PF" == ApplicantRating)
-        {
-        z["UnderwritingClass"] = "Preferred"; // ?! Are there any other values?
-        }
     z["AgentName"                  ] = AgentName;
     z["AgentAddress"               ] = AgentAddress;
     z["AgentCity"                  ] = AgentCity;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]