From 8f9cdfb90699e264c10799d4639446bd4c91c30f Mon Sep 17 00:00:00 2001 From: Fumito Hamamura <fumito.ham@gmail.com> Date: Sat, 8 Jul 2023 17:27:06 +0900 Subject: [PATCH] ENH: Add additional members to AocType and GroupOfContract --- lifelib/libraries/ifrs17a/ifrs17/DataStructure.py | 4 +++- lifelib/libraries/ifrs17a/ifrs17/Importers.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lifelib/libraries/ifrs17a/ifrs17/DataStructure.py b/lifelib/libraries/ifrs17a/ifrs17/DataStructure.py index fcf302e..1455a3b 100644 --- a/lifelib/libraries/ifrs17a/ifrs17/DataStructure.py +++ b/lifelib/libraries/ifrs17a/ifrs17/DataStructure.py @@ -105,8 +105,9 @@ class VariableType(KeyedOrderedDimension): ### AoC Variable Type +@_dataclass class AocType(VariableType): - pass + PnlType: str AocStep = _namedtuple('AocStep', ['AocType', 'Novelty']) @@ -318,6 +319,7 @@ class GroupOfContract(DataNode): Portfolio: str YieldCurveName: str Partner: str + IsReinsurance: bool @_dataclass(eq=False) diff --git a/lifelib/libraries/ifrs17a/ifrs17/Importers.py b/lifelib/libraries/ifrs17a/ifrs17/Importers.py index e62ffc3..7d737f1 100644 --- a/lifelib/libraries/ifrs17a/ifrs17/Importers.py +++ b/lifelib/libraries/ifrs17a/ifrs17/Importers.py @@ -389,7 +389,8 @@ def _FromDataSetGroupOfContracts(dataset, datarow): Profitability=datarow["Profitability"], Portfolio=pf, YieldCurveName=datarow["YieldCurveName"] if "YieldCurveName" in dataset.Tables["GroupOfInsuranceContract"].columns else '', - Partner='' + Partner='', + IsReinsurance=False ) return ExtendGroupOfContract(gic, datarow) @@ -419,6 +420,7 @@ def _FromDataSetGroupOfReinsuranceContract(dataset, datarow): Portfolio=pf, Partner=datarow["Partner"], YieldCurveName=datarow["YieldCurveName"] if "YieldCurveName" in dataset.Tables["GroupOfInsuranceContract"].columns.values else '', + IsReinsurance=True ) return ExtendGroupOfContract(gric, datarow)