Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion full-ifrs17-template/Files/Dimensions.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@PvAmountType,,,,,,,,,,,
@@AmountType,,,,,,,,,,,
SystemName,DisplayName,Parent,Order,PeriodType,ExternalId0,ExternalId1,,,,,
PR,Premiums,,10,BeginningOfPeriod,PayablePR,ReceivablePR,,,,,
CL,Claims,,20,EndOfPeriod,,,,,,,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"\n .WithType<AocType>()",
"\n .WithType<PnlVariableType>()",
"\n .WithType<BsVariableType>()",
"\n .WithType<PvAmountType>()",
"\n .WithType<AmountType>()",
"\n .WithType<DeferrableAmountType>()",
"\n .WithType<RiskDriver>()",
"\n .WithType<EconomicBasis>()",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"\n .WithType<PnlVariableType>()",
"\n .WithType<BsVariableType>()",
"\n .WithType<AocConfiguration>()",
"\n .WithType<PvAmountType>()",
"\n .WithType<AmountType>()",
"\n .WithType<DeferrableAmountType>()",
"\n .WithType<RiskDriver>()",
"\n .WithType<EconomicBasis>()",
Expand Down
4 changes: 1 addition & 3 deletions ifrs17/DataModel/DataStructure.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,7 @@
"id": "xXvF54kBF0C6mNNLJGYH9Q",
"cell_type": "code",
"source": [
"public record PvAmountType : AmountType {} //TODO Rename ",
"\n",
"\npublic record DeferrableAmountType : AmountType {}"
"public record DeferrableAmountType : AmountType {}"
],
"metadata": {},
"execution_count": 0,
Expand Down
10 changes: 5 additions & 5 deletions ifrs17/Import/Importers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"\n ",
"\n // Dimensions",
"\n public Dictionary<string, EstimateType> EstimateType;",
"\n public Dictionary<string, PvAmountType> PvAmountType; ",
"\n public Dictionary<string, AmountType> AmountType; ",
"\n public HashSet<AocStep> AocTypeMap;",
"\n private HashSet<string> estimateTypes;",
"\n private HashSet<string> amountTypes;",
Expand Down Expand Up @@ -145,7 +145,7 @@
"\n : await LoadDataNodesAsync(dataSource, args);",
"\n // Dimensions",
"\n EstimateType = (await dataSource.Query<EstimateType>().ToArrayAsync()).ToDictionary(x => x.SystemName);",
"\n PvAmountType = (await dataSource.Query<PvAmountType>().ToArrayAsync()).ToDictionary(x => x.SystemName);",
"\n AmountType = (await dataSource.Query<AmountType>().Where(x =>!(x is DeferrableAmountType)).ToArrayAsync()).ToDictionary(x => x.SystemName);",
"\n amountTypes = (await dataSource.Query<AmountType>().ToArrayAsync()).Select(at => at.SystemName).ToHashSet();",
"\n estimateTypes = args.ImportFormat switch {",
"\n ImportFormats.SimpleValue => (await dataSource.Query<EstimateType>().ToArrayAsync()).Select(et => et.SystemName).ToHashSet(),",
Expand All @@ -159,7 +159,7 @@
"\n // DimensionsWithExternalId",
"\n DimensionsWithExternalId = new Dictionary<Type, Dictionary<string, string>>()",
"\n {",
"\n { typeof(PvAmountType), await GetDimensionWithExternalIdDictionaryAsync<PvAmountType>() },",
"\n { typeof(AmountType), await GetDimensionWithExternalIdDictionaryAsync<AmountType>() },",
"\n { typeof(EstimateType), await GetDimensionWithExternalIdDictionaryAsync<EstimateType>() }",
"\n };",
"\n ",
Expand Down Expand Up @@ -1105,8 +1105,8 @@
"\n return null; ",
"\n }",
"\n ",
"\n var amountType = parsingStorage.DimensionsWithExternalId[typeof(PvAmountType)].TryGetValue(valueType, out var at)? at : null;",
"\n var isStdActual = parsingStorage.PvAmountType.ContainsKey(valueType);",
"\n var amountType = parsingStorage.DimensionsWithExternalId[typeof(AmountType)].TryGetValue(valueType, out var at)? at : null;",
"\n var isStdActual = parsingStorage.AmountType.ContainsKey(valueType);",
"\n var estimateType = isStdActual? EstimateTypes.A : parsingStorage.DimensionsWithExternalId[typeof(EstimateType)].TryGetValue(valueType, out var et)? et : null;",
"\n if(estimateType == null || amountType == null) { ",
"\n ApplicationMessage.Log(Error.ValueTypeNotValid, valueType);",
Expand Down