diff --git a/ifrs17-template/Constants/CalculationEngine.ipynb b/ifrs17-template/Constants/CalculationEngine.ipynb index b8a11471..944705fa 100644 --- a/ifrs17-template/Constants/CalculationEngine.ipynb +++ b/ifrs17-template/Constants/CalculationEngine.ipynb @@ -22,7 +22,7 @@ "var projectName = \"ifrs17\";", "\nvar environmentName = \"v1.3.1\";", "\nvar notebookName = \"CalculationEngine\";", - "\nvar calculationEngine = $\"#!import \\\"../../{projectName}/{environmentName}/{notebookName}\\\"\";" + "\nvar calculationEngine = $\"#!import \\\"//{projectName}/{environmentName}/{notebookName}\\\"\";" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17/Import/4ImportScope-TechnicalMargin.ipynb b/ifrs17/Import/4ImportScope-TechnicalMargin.ipynb index 178bdfa7..f7bd8d39 100644 --- a/ifrs17/Import/4ImportScope-TechnicalMargin.ipynb +++ b/ifrs17/Import/4ImportScope-TechnicalMargin.ipynb @@ -184,10 +184,10 @@ "public interface TechnicalMarginAmountType : IScope<(ImportIdentity Id, string EstimateType), ImportStorage>", "\n{", "\n protected IEnumerable amountTypesToExclude => (Identity.EstimateType, Identity.Id.ValuationApproach) switch {", - "\n (EstimateTypes.LR, ValuationApproaches.PAA) => GetStorage().GetNonAttributableAmountType().Concat(AmountTypes.CDR.RepeatOnce()).Concat(GetStorage().GetAttributableExpenses()).Concat(GetStorage().GetDeferrableExpenses()).Concat(GetStorage().GetPremiums()),", - "\n (EstimateTypes.LR, _) => GetStorage().GetNonAttributableAmountType().Concat(AmountTypes.CDR.RepeatOnce()).Concat(GetStorage().GetAttributableExpenses()),", - "\n (_, ValuationApproaches.PAA) => GetStorage().GetNonAttributableAmountType().Concat(AmountTypes.CDR.RepeatOnce()).Concat(GetStorage().GetDeferrableExpenses()).Concat(GetStorage().GetPremiums()),", - "\n (_) => GetStorage().GetNonAttributableAmountType().Concat(AmountTypes.CDR.RepeatOnce())", + "\n (EstimateTypes.LR, ValuationApproaches.PAA) => GetStorage().GetCoverageUnits().Concat(GetStorage().GetNonAttributableAmountType()).Concat(AmountTypes.CDR.RepeatOnce()).Concat(GetStorage().GetAttributableExpenses()).Concat(GetStorage().GetDeferrableExpenses()).Concat(GetStorage().GetPremiums()),", + "\n (EstimateTypes.LR, _) => GetStorage().GetCoverageUnits().Concat(GetStorage().GetNonAttributableAmountType()).Concat(AmountTypes.CDR.RepeatOnce()).Concat(GetStorage().GetAttributableExpenses()),", + "\n (_, ValuationApproaches.PAA) => GetStorage().GetCoverageUnits().Concat(GetStorage().GetNonAttributableAmountType()).Concat(AmountTypes.CDR.RepeatOnce()).Concat(GetStorage().GetDeferrableExpenses()).Concat(GetStorage().GetPremiums()),", + "\n (_) => GetStorage().GetCoverageUnits().Concat(GetStorage().GetNonAttributableAmountType()).Concat(AmountTypes.CDR.RepeatOnce())", "\n };", "\n", "\n IEnumerable Values => GetScope(Identity.Id.DataNode).BeAmountTypes.Except(amountTypesToExclude);", diff --git a/ifrs17/Import/ImportStorage.ipynb b/ifrs17/Import/ImportStorage.ipynb index cda8e305..6110c645 100644 --- a/ifrs17/Import/ImportStorage.ipynb +++ b/ifrs17/Import/ImportStorage.ipynb @@ -461,6 +461,7 @@ "\n public IEnumerable GetPremiums() => hierarchyCache.Get(AmountTypes.PR).Descendants(includeSelf : true).Select(x => x.SystemName);", "\n public IEnumerable GetClaims() => hierarchyCache.Get(AmountTypes.CL).Descendants().Select(x => x.SystemName);", "\n public IEnumerable GetCdr() => hierarchyCache.Get(AmountTypes.CDR).Descendants(includeSelf: true).Select(x => x.SystemName);", + "\n public IEnumerable GetCoverageUnits() => hierarchyCache.Get(AmountTypes.CU).Descendants(includeSelf: true).Select(x => x.SystemName);", "\n}" ], "metadata": {}, diff --git a/ifrs17/Test/QueriesScenarioDataTest.ipynb b/ifrs17/Test/QueriesScenarioDataTest.ipynb index 8ea487a4..9cf0d481 100644 --- a/ifrs17/Test/QueriesScenarioDataTest.ipynb +++ b/ifrs17/Test/QueriesScenarioDataTest.ipynb @@ -40,7 +40,9 @@ { "cell_type": "code", "source": [ - "await DataSource.UpdateAsync( new[] { partitionReportingNode } );", + "await DataSource.DeleteAsync( DataSource.Query());", + "\nawait DataSource.DeleteAsync( DataSource.Query());", + "\nawait DataSource.UpdateAsync( new[] { partitionReportingNode } );", "\nawait DataSource.UpdateAsync( new[] { partition, previousPeriodPartition, partitionScenarioMTUP, previousPeriodPartitionScenarioMTUP } );", "\nawait DataSource.UpdateAsync( new[] { dt11 } );", "\nawait Import.FromString(projectionConfiguration).WithType().WithTarget(DataSource).ExecuteAsync();" diff --git a/ifrs17/Test/TestData.ipynb b/ifrs17/Test/TestData.ipynb index e36137f7..9adc10f3 100644 --- a/ifrs17/Test/TestData.ipynb +++ b/ifrs17/Test/TestData.ipynb @@ -186,25 +186,26 @@ "cell_type": "code", "source": [ "var amountType = ", - "\n@\"@@AmountType,,,,,,,,,,,", - "\nSystemName,DisplayName,Parent,Order,PeriodType,,,,,,,", - "\nPR,Premiums,,10,BeginningOfPeriod,,,,,,,", - "\nCL,Claims,,20,EndOfPeriod,,,,,,,", - "\nNIC,Non Investment Component,CL,30,EndOfPeriod,,,,,,,", - "\nICO,Investment Component,CL,40,EndOfPeriod,,,,,,,", - "\nCDR,Credit Default Risk,CL,50,EndOfPeriod,,,,,,,", - "\nCE,Claim Expenses,CL,200,EndOfPeriod,,,,,,,", - "\nALE,Allocated Loss Adjustment Expenses,CE,210,EndOfPeriod,,,,,,,", - "\nULE,Unallocated Loss Adjustment Expenses,CE,220,EndOfPeriod,,,,,,,", - "\nAE,Attributable Expenses,,80,BeginningOfPeriod,,,,,,,", - "\nAEA,Aquisition,AE,90,BeginningOfPeriod,,,,,,,", - "\nAEM,Maintenance,AE,100,BeginningOfPeriod,,,,,,,", - "\nNE,Non Attributable Expenses,,110,BeginningOfPeriod,,,,,,,", - "\nAC,Attributable Commission,,120,BeginningOfPeriod,,,,,,,", - "\nACA,Aquisition,AC,130,BeginningOfPeriod,,,,,,,", - "\nACM,Maitenance,AC,140,BeginningOfPeriod,,,,,,,", - "\nDE,Deferrals,,200,EndOfPeriod,,,,,,,", - "\nDAE,Aquisition Expenses,DE,220,EndOfPeriod,,,,,,,\";" + "\n@\"@@AmountType", + "\nSystemName,DisplayName,Parent,Order,PeriodType", + "\nPR,Premiums,,10,BeginningOfPeriod", + "\nCL,Claims,,20,EndOfPeriod", + "\nNIC,Non Investment Component,CL,30,EndOfPeriod", + "\nICO,Investment Component,CL,40,EndOfPeriod", + "\nCDR,Credit Default Risk,CL,50,EndOfPeriod", + "\nCE,Claim Expenses,CL,200,EndOfPeriod", + "\nALE,Allocated Loss Adjustment Expenses,CE,210,EndOfPeriod", + "\nULE,Unallocated Loss Adjustment Expenses,CE,220,EndOfPeriod", + "\nAE,Attributable Expenses,,80,BeginningOfPeriod", + "\nAEA,Aquisition,AE,90,BeginningOfPeriod", + "\nAEM,Maintenance,AE,100,BeginningOfPeriod", + "\nNE,Non Attributable Expenses,,110,BeginningOfPeriod", + "\nAC,Attributable Commission,,120,BeginningOfPeriod", + "\nACA,Aquisition,AC,130,BeginningOfPeriod", + "\nACM,Maitenance,AC,140,BeginningOfPeriod", + "\nDE,Deferrals,,200,EndOfPeriod", + "\nDAE,Aquisition Expenses,DE,220,EndOfPeriod", + "\nCU,Coverage Units,,150,EndOfPeriod\";" ], "metadata": {}, "execution_count": 0,