From 7b8a2711eb6977413a611772fbdeabf3313e1b73 Mon Sep 17 00:00:00 2001 From: Eric Darchis Date: Thu, 31 Aug 2023 17:39:24 +0200 Subject: [PATCH 1/7] OMT-333 Policies - Primary indicators --- policy/report.py | 11 + .../reports/primary_operational_indicators.py | 4341 +++++++++++++++++ policy/test_helpers.py | 5 + 3 files changed, 4357 insertions(+) create mode 100644 policy/reports/primary_operational_indicators.py diff --git a/policy/report.py b/policy/report.py index b13020f..300d3a4 100644 --- a/policy/report.py +++ b/policy/report.py @@ -1,5 +1,7 @@ from policy.reports import policy_renewals from policy.reports.policy_renewals import policy_renewals_query +from policy.reports import primary_operational_indicators +from policy.reports.primary_operational_indicators import policies_primary_indicators_query report_definitions = [ { @@ -11,4 +13,13 @@ "python_query": policy_renewals_query, "permission": ["131217"], }, + { + "name": "policy_primary_operational_indicators", + "engine": 0, + "default_report": primary_operational_indicators.template, + "description": "Policy primary operational indicators", + "module": "policy", + "python_query": policies_primary_indicators_query, + "permission": ["131201"], + }, ] diff --git a/policy/reports/primary_operational_indicators.py b/policy/reports/primary_operational_indicators.py new file mode 100644 index 0000000..d87ba3d --- /dev/null +++ b/policy/reports/primary_operational_indicators.py @@ -0,0 +1,4341 @@ +from datetime import datetime, timedelta + +from dateutil.relativedelta import relativedelta +from django.conf import settings +from django.db import connection + +from tools.utils import dictfetchall +import logging +logger = logging.getLogger(__name__) + +# If manually pasting from ReportBro and you have test data, search and replace \" with \\" +template = """{ + "docElements": [ + { + "elementType": "text", + "id": 3, + "containerId": "0_header", + "x": 120, + "y": 0, + "width": 575, + "height": 40, + "content": "Policy Primary Operational Indicators", + "richText": false, + "richTextContent": null, + "richTextHtml": "", + "eval": false, + "styleId": "", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#006273", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "24", + "lineSpacing": 1, + "borderColor": "#000000", + "borderWidth": 1, + "borderAll": false, + "borderLeft": false, + "borderTop": false, + "borderRight": false, + "borderBottom": false, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "printIf": "", + "removeEmptyElement": false, + "alwaysPrintOnSamePage": true, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_borderColor": "#000000", + "cs_borderWidth": "1", + "cs_borderAll": false, + "cs_borderLeft": false, + "cs_borderTop": false, + "cs_borderRight": false, + "cs_borderBottom": false, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_hide": false, + "spreadsheet_column": "", + "spreadsheet_colspan": "", + "spreadsheet_addEmptyRow": false, + "spreadsheet_textWrap": false + }, + { + "elementType": "line", + "id": 158, + "containerId": "0_content", + "x": 0, + "y": 0, + "width": 820, + "height": 1, + "color": "#000000", + "printIf": "" + }, + { + "elementType": "text", + "id": 193, + "containerId": "0_content", + "x": 0, + "y": 10, + "width": 575, + "height": 20, + "content": "Date: ${yearMonth}", + "richText": false, + "richTextContent": null, + "richTextHtml": "", + "eval": false, + "styleId": "", + "bold": true, + "italic": false, + "underline": true, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "borderColor": "#000000", + "borderWidth": 1, + "borderAll": false, + "borderLeft": false, + "borderTop": false, + "borderRight": false, + "borderBottom": false, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "printIf": "", + "removeEmptyElement": false, + "alwaysPrintOnSamePage": true, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_borderColor": "#000000", + "cs_borderWidth": "1", + "cs_borderAll": false, + "cs_borderLeft": false, + "cs_borderTop": false, + "cs_borderRight": false, + "cs_borderBottom": false, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_hide": false, + "spreadsheet_column": "", + "spreadsheet_colspan": "", + "spreadsheet_addEmptyRow": false, + "spreadsheet_textWrap": false + }, + { + "elementType": "table", + "id": 195, + "containerId": "0_content", + "width": 745, + "x": 0, + "y": 40, + "dataSource": "${data}", + "columns": 18, + "header": true, + "contentRows": 2, + "footer": false, + "border": "grid", + "borderColor": "#000000", + "borderWidth": "1", + "printIf": "", + "removeEmptyElement": false, + "spreadsheet_hide": false, + "spreadsheet_column": "", + "spreadsheet_addEmptyRow": false, + "headerData": { + "elementType": "none", + "id": 196, + "height": 36, + "backgroundColor": "", + "repeatHeader": true, + "columnData": [ + { + "elementType": "table_text", + "id": 197, + "width": 84, + "content": "Product Code", + "eval": false, + "colspan": "", + "styleId": "33", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 205, + "width": 36, + "content": "Total Active Insurees", + "eval": false, + "colspan": "3", + "styleId": "", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 302, + "width": 36, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 305, + "width": 36, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 206, + "width": 35, + "content": "New insurees", + "eval": false, + "colspan": "3", + "styleId": "", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 308, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 311, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 239, + "width": 35, + "content": "Suspended Insurees", + "eval": false, + "colspan": "3", + "styleId": "", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 326, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 330, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 283, + "width": 35, + "content": "Expired Insurees", + "eval": false, + "colspan": "3", + "styleId": "", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 334, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 338, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 289, + "width": 35, + "content": "Renewed Insurees", + "eval": false, + "colspan": "3", + "styleId": "", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 342, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 346, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 292, + "width": 65, + "content": "Total Premium Paid", + "eval": false, + "colspan": "", + "styleId": "33", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + }, + { + "elementType": "table_text", + "id": 352, + "width": 68, + "content": "Allocated", + "eval": false, + "colspan": "", + "styleId": "33", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "printIf": "", + "growWeight": 0, + "borderWidth": 1 + } + ] + }, + "contentDataRows": [ + { + "elementType": "none", + "id": 314, + "height": 20, + "backgroundColor": "", + "alternateBackgroundColor": "", + "groupExpression": "", + "printIf": "${row_number}==1", + "alwaysPrintOnSamePage": true, + "pageBreak": false, + "repeatGroupHeader": false, + "columnData": [ + { + "elementType": "table_text", + "id": 315, + "width": 84, + "content": "", + "eval": false, + "colspan": "", + "styleId": "33", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 316, + "width": 36, + "content": "M", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 317, + "width": 36, + "content": "F", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 318, + "width": 36, + "content": "O", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 319, + "width": 35, + "content": "M", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 320, + "width": 35, + "content": "F", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 321, + "width": 35, + "content": "O", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 322, + "width": 35, + "content": "M", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 327, + "width": 35, + "content": "F", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 331, + "width": 35, + "content": "O", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 323, + "width": 35, + "content": "M", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 335, + "width": 35, + "content": "F", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 339, + "width": 35, + "content": "O", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 324, + "width": 35, + "content": "M", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 343, + "width": 35, + "content": "F", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 347, + "width": 35, + "content": "O", + "eval": false, + "colspan": "", + "styleId": "350", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "paddingLeft": 0, + "paddingTop": 0, + "paddingRight": 0, + "paddingBottom": 0, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 325, + "width": 65, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 353, + "width": 68, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + } + ] + }, + { + "elementType": "none", + "id": 199, + "height": 20, + "backgroundColor": "", + "alternateBackgroundColor": "#eeeeee", + "groupExpression": "", + "printIf": "", + "alwaysPrintOnSamePage": false, + "pageBreak": false, + "repeatGroupHeader": false, + "columnData": [ + { + "elementType": "table_text", + "id": 200, + "width": 84, + "content": "${ProductCode}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 208, + "width": 36, + "content": "${TotalMaleInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 303, + "width": 36, + "content": "${TotalFemaleInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 306, + "width": 36, + "content": "${TotalOtherInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 209, + "width": 35, + "content": "${NewMaleInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 309, + "width": 35, + "content": "${NewFemaleInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 312, + "width": 35, + "content": "${NewOtherInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 240, + "width": 35, + "content": "${SuspendedMaleInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 328, + "width": 35, + "content": "${SuspendedFemaleInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 332, + "width": 35, + "content": "${SuspendedOtherInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 284, + "width": 35, + "content": "${ExpiredMaleInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 336, + "width": 35, + "content": "${ExpiredFemaleInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 340, + "width": 35, + "content": "${ExpiredOtherInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 290, + "width": 35, + "content": "${RenewMaleInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 344, + "width": 35, + "content": "${RenewFemaleInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 348, + "width": 35, + "content": "${RenewOtherInsurees}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 293, + "width": 65, + "content": "${TotalPremiumPaid}", + "eval": false, + "colspan": "", + "styleId": "34", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 354, + "width": 68, + "content": "${AvailablePremium}", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + } + ] + } + ], + "footerData": { + "elementType": "none", + "id": 202, + "height": 20, + "backgroundColor": "", + "columnData": [ + { + "elementType": "table_text", + "id": 203, + "width": 84, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 211, + "width": 36, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 304, + "width": 36, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 307, + "width": 36, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 285, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 310, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 313, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 291, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 329, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 333, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 294, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 337, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 341, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 298, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 345, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 349, + "width": 35, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 301, + "width": 65, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + }, + { + "elementType": "table_text", + "id": 355, + "width": 68, + "content": "", + "eval": false, + "colspan": "", + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "top", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_textWrap": false, + "borderWidth": 1, + "growWeight": 0 + } + ] + } + }, + { + "elementType": "text", + "id": 7, + "containerId": "0_footer", + "x": 320, + "y": 0, + "width": 255, + "height": 30, + "content": "Page ${page_number} / ${page_count}", + "richText": false, + "richTextContent": null, + "richTextHtml": "", + "eval": false, + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "right", + "verticalAlignment": "middle", + "textColor": "#666666", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "borderColor": "#000000", + "borderWidth": 1, + "borderAll": false, + "borderLeft": false, + "borderTop": false, + "borderRight": false, + "borderBottom": false, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "printIf": "", + "removeEmptyElement": false, + "alwaysPrintOnSamePage": true, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_borderColor": "#000000", + "cs_borderWidth": "1", + "cs_borderAll": false, + "cs_borderLeft": false, + "cs_borderTop": false, + "cs_borderRight": false, + "cs_borderBottom": false, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_hide": false, + "spreadsheet_column": "", + "spreadsheet_colspan": "", + "spreadsheet_addEmptyRow": false, + "spreadsheet_textWrap": false + }, + { + "elementType": "text", + "id": 8, + "containerId": "0_footer", + "x": 0, + "y": 0, + "width": 290, + "height": 30, + "content": "Created on ${current_date}", + "richText": false, + "richTextContent": null, + "richTextHtml": "", + "eval": false, + "styleId": "", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#666666", + "backgroundColor": "", + "font": "helvetica", + "fontSize": 12, + "lineSpacing": 1, + "borderColor": "#000000", + "borderWidth": 1, + "borderAll": false, + "borderLeft": false, + "borderTop": false, + "borderRight": false, + "borderBottom": false, + "paddingLeft": 2, + "paddingTop": 2, + "paddingRight": 2, + "paddingBottom": 2, + "printIf": "", + "removeEmptyElement": false, + "alwaysPrintOnSamePage": true, + "pattern": "", + "link": "", + "cs_condition": "", + "cs_styleId": "", + "cs_bold": false, + "cs_italic": false, + "cs_underline": false, + "cs_strikethrough": false, + "cs_horizontalAlignment": "left", + "cs_verticalAlignment": "top", + "cs_textColor": "#000000", + "cs_backgroundColor": "", + "cs_font": "helvetica", + "cs_fontSize": 12, + "cs_lineSpacing": 1, + "cs_borderColor": "#000000", + "cs_borderWidth": "1", + "cs_borderAll": false, + "cs_borderLeft": false, + "cs_borderTop": false, + "cs_borderRight": false, + "cs_borderBottom": false, + "cs_paddingLeft": 2, + "cs_paddingTop": 2, + "cs_paddingRight": 2, + "cs_paddingBottom": 2, + "spreadsheet_hide": false, + "spreadsheet_column": "", + "spreadsheet_colspan": "", + "spreadsheet_addEmptyRow": false, + "spreadsheet_textWrap": false + } + ], + "parameters": [ + { + "id": 1, + "name": "page_count", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": false, + "pattern": "", + "expression": "", + "showOnlyNameType": true, + "testData": "" + }, + { + "id": 2, + "name": "page_number", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": false, + "pattern": "", + "expression": "", + "showOnlyNameType": true, + "testData": "" + }, + { + "id": 9, + "name": "current_date", + "type": "date", + "arrayItemType": "string", + "eval": false, + "nullable": false, + "pattern": "d/M/yyyy H:mm", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 233, + "name": "data", + "type": "array", + "arrayItemType": "string", + "eval": false, + "nullable": false, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "", + "children": [ + { + "id": 234, + "name": "row_number", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": false, + "pattern": "", + "expression": "", + "showOnlyNameType": true, + "testData": "" + }, + { + "id": 263, + "name": "ProdID", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 269, + "name": "TotalMaleInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 271, + "name": "TotalFemaleInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 270, + "name": "TotalOtherInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 272, + "name": "ProductCode", + "type": "string", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 273, + "name": "NewMaleInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 274, + "name": "NewFemaleInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 275, + "name": "NewOtherInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 277, + "name": "SuspendedMaleInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 278, + "name": "SuspendedFemaleInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 279, + "name": "SuspendedOtherInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 280, + "name": "ExpiredMaleInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 281, + "name": "ExpiredFemaleInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 282, + "name": "ExpiredOtherInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 286, + "name": "RenewMaleInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 287, + "name": "RenewFemaleInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 288, + "name": "RenewOtherInsurees", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 295, + "name": "TotalPremiumPaid", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "#,##0.00", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 351, + "name": "AvailablePremium", + "type": "number", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + } + ] + }, + { + "id": 265, + "name": "yearMonth", + "type": "string", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "2019-08" + }, + { + "id": 266, + "name": "productCode", + "type": "string", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 267, + "name": "productName", + "type": "string", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + }, + { + "id": 268, + "name": "LocationName", + "type": "string", + "arrayItemType": "string", + "eval": false, + "nullable": true, + "pattern": "", + "expression": "", + "showOnlyNameType": false, + "testData": "" + } + ], + "styles": [ + { + "id": 33, + "name": "Table Header", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "borderColor": "#000000", + "borderWidth": "1", + "borderAll": false, + "borderLeft": false, + "borderTop": false, + "borderRight": false, + "borderBottom": false, + "paddingLeft": "2", + "paddingTop": "2", + "paddingRight": "2", + "paddingBottom": "2" + }, + { + "id": 34, + "name": "Table Content", + "bold": false, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "left", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "borderColor": "#000000", + "borderWidth": "1", + "borderAll": false, + "borderLeft": false, + "borderTop": false, + "borderRight": false, + "borderBottom": false, + "paddingLeft": "2", + "paddingTop": "2", + "paddingRight": "2", + "paddingBottom": "2" + }, + { + "id": 35, + "name": "Table Content Highlight", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#3d85c6", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "9", + "lineSpacing": 1, + "borderColor": "#000000", + "borderWidth": "1", + "borderAll": false, + "borderLeft": false, + "borderTop": false, + "borderRight": false, + "borderBottom": false, + "paddingLeft": "2", + "paddingTop": "2", + "paddingRight": "2", + "paddingBottom": "2" + }, + { + "id": 350, + "name": "Table sub-header", + "bold": true, + "italic": false, + "underline": false, + "strikethrough": false, + "horizontalAlignment": "center", + "verticalAlignment": "middle", + "textColor": "#000000", + "backgroundColor": "", + "font": "helvetica", + "fontSize": "10", + "lineSpacing": 1, + "borderColor": "#000000", + "borderWidth": "1", + "borderAll": false, + "borderLeft": false, + "borderTop": false, + "borderRight": false, + "borderBottom": false, + "paddingLeft": "", + "paddingTop": "", + "paddingRight": "", + "paddingBottom": "" + } + ], + "version": 3, + "documentProperties": { + "pageFormat": "A4", + "pageWidth": "", + "pageHeight": "", + "unit": "mm", + "orientation": "landscape", + "contentHeight": "", + "marginLeft": "10", + "marginTop": "10", + "marginRight": "10", + "marginBottom": "10", + "header": true, + "headerSize": "50", + "headerDisplay": "always", + "footer": true, + "footerSize": "30", + "footerDisplay": "always", + "patternLocale": "en", + "patternCurrencySymbol": "$" + } +} +""" + +# the udfAvailablePremium function was written before GREATEST() was available in MS SQL and +# availablePremium could be simplified to: +available_premium_expression = """ +CASE +WHEN MONTH(DATEADD_DAY(-1,PL."ExpiryDate")) = MONTH(%(LastDay)s) AND YEAR(DATEADD_DAY(-1,PL."ExpiryDate")) = YEAR(%(LastDay)s) AND extract(DAY from (PL."ExpiryDate")) > 1 + THEN GREATEST(1, DATEDIFF_DAY(GREATEST(PR."PayDate", %(LastDay)s),PL."ExpiryDate")) + * ((PR."Amount") + /GREATEST(1, DATEDIFF_DAY(GREATEST(PR."PayDate", PL."EffectiveDate"),PL."ExpiryDate"))) +WHEN MONTH(GREATEST(PR."PayDate", PL."EffectiveDate")) = MONTH(%(LastDay)s) AND YEAR(GREATEST(PR."PayDate", PL."EffectiveDate")) = YEAR(%(LastDay)s) + THEN ((%(DaysInMonth)s + 1 - extract (DAY FROM GREATEST(PR."PayDate", PL."EffectiveDate"))) + * (PR."Amount" + /GREATEST(1, DATEDIFF_DAY(GREATEST(PR."PayDate", PL."EffectiveDate"),PL."ExpiryDate")))) +WHEN PL."EffectiveDate" < %(LastDay)s AND PL."ExpiryDate" > %(LastDay)s AND PR."PayDate" < %(LastDay)s + THEN %(DaysInMonth)s + * (PR."Amount" + /GREATEST(1, DATEDIFF_DAY(GREATEST(PR."PayDate", PL."EffectiveDate"),DATEADD_DAY(-1,PL."ExpiryDate")))) +END +""" + +policies_primary_indicators_sql = f""" + SELECT prod."ProdID" as "ProdID", prod."ProductCode" as "ProductCode", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'M' + AND pl."PolicyStatus" > 1 + AND pl."EffectiveDate" <= %(LastDay)s + AND pl."ExpiryDate" > %(LastDay)s + ) AS "TotalMaleInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'F' + AND pl."PolicyStatus" > 1 + AND pl."EffectiveDate" <= %(LastDay)s + AND pl."ExpiryDate" > %(LastDay)s + ) AS "TotalFemaleInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'O' + AND pl."PolicyStatus" > 1 + AND pl."EffectiveDate" <= %(LastDay)s + AND pl."ExpiryDate" > %(LastDay)s + ) AS "TotalOtherInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'M' + AND pl."PolicyStatus" > 1 + AND pl."PolicyStage" = 'N' + AND YEAR(pl."EffectiveDate") = YEAR(%(LastDay)s) + AND MONTH(pl."EffectiveDate") = MONTH(%(LastDay)s) + ) AS "NewMaleInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'F' + AND pl."PolicyStatus" > 1 + AND pl."PolicyStage" = 'N' + AND YEAR(pl."EffectiveDate") = YEAR(%(LastDay)s) + AND MONTH(pl."EffectiveDate") = MONTH(%(LastDay)s) + ) AS "NewFemaleInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'O' + AND pl."PolicyStatus" > 1 + AND pl."PolicyStage" = 'N' + AND YEAR(pl."EffectiveDate") = YEAR(%(LastDay)s) + AND MONTH(pl."EffectiveDate") = MONTH(%(LastDay)s) + ) AS "NewOtherInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'M' + AND pl."PolicyStatus" > 1 + AND pl."PolicyStage" = 'R' + AND YEAR(pl."EnrollDate") = YEAR(%(LastDay)s) + AND MONTH(pl."EnrollDate") = MONTH(%(LastDay)s) + ) AS "RenewMaleInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'F' + AND pl."PolicyStatus" > 1 + AND pl."PolicyStage" = 'R' + AND YEAR(pl."EnrollDate") = YEAR(%(LastDay)s) + AND MONTH(pl."EnrollDate") = MONTH(%(LastDay)s) + ) AS "RenewFemaleInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'O' + AND pl."PolicyStatus" > 1 + AND pl."PolicyStage" = 'R' + AND YEAR(pl."EnrollDate") = YEAR(%(LastDay)s) + AND MONTH(pl."EnrollDate") = MONTH(%(LastDay)s) + ) AS "RenewOtherInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'M' + AND pl."PolicyStatus" = 4 + AND YEAR(pl."ValidityFrom") = YEAR(%(LastDay)s) + AND MONTH(pl."ValidityFrom") = MONTH(%(LastDay)s) + ) AS "SuspendedMaleInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'F' + AND pl."PolicyStatus" = 4 + AND YEAR(pl."ValidityFrom") = YEAR(%(LastDay)s) + AND MONTH(pl."ValidityFrom") = MONTH(%(LastDay)s) + ) AS "SuspendedFemaleInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'O' + AND pl."PolicyStatus" = 4 + AND YEAR(pl."ValidityFrom") = YEAR(%(LastDay)s) + AND MONTH(pl."ValidityFrom") = MONTH(%(LastDay)s) + ) AS "SuspendedOtherInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'M' + AND pl."PolicyStatus" > 1 + AND YEAR(pl."ExpiryDate") = YEAR(%(LastDay)s) + AND MONTH(pl."ExpiryDate") = MONTH(%(LastDay)s) + ) AS "ExpiredMaleInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'F' + AND pl."PolicyStatus" > 1 + AND YEAR(pl."ExpiryDate") = YEAR(%(LastDay)s) + AND MONTH(pl."ExpiryDate") = MONTH(%(LastDay)s) + ) AS "ExpiredFemaleInsurees", + COUNT(ins."InsureeID") FILTER ( + WHERE Ins."Gender" = 'O' + AND pl."PolicyStatus" > 1 + AND YEAR(pl."ExpiryDate") = YEAR(%(LastDay)s) + AND MONTH(pl."ExpiryDate") = MONTH(%(LastDay)s) + ) AS "ExpiredOtherInsurees", + sum(pr."Amount") FILTER ( + WHERE YEAR(pr."PayDate") = YEAR(%(LastDay)s) + AND MONTH(pr."PayDate") = MONTH(%(LastDay)s) + ) AS "TotalPremiumPaid", + SUM({available_premium_expression}) AS "AvailablePremium" + FROM "tblPolicy" pl + INNER JOIN "tblProduct" prod ON prod."ProdID" = pl."ProdID" + INNER JOIN "tblFamilies" fam ON fam."FamilyID" = pl."FamilyID" + INNER JOIN "tblInsuree" ins ON ins."InsureeID" = fam."InsureeID" + INNER JOIN "uvwLocations" l ON l."VillageId" = fam."LocationId" + LEFT JOIN "tblPremium" pr ON pr."PolicyID" = pl."PolicyID" + WHERE pl."ValidityTo" IS NULL + AND prod."ValidityTo" IS NULL + AND fam."ValidityTo" IS NULL + AND ins."ValidityTo" IS NULL + and pr."ValidityTo" IS NULL + AND (prod."ProdID" = %(ProdId)s OR %(ProdId)s = 0) + AND (l."RegionId" = %(LocationId)s OR l."DistrictId" = %(LocationId)s OR COALESCE(%(LocationId)s, 0) = 0 OR %(LocationId)s = 0) + GROUP BY prod."ProdID", prod."ProductCode"; +""" + + +def policies_primary_indicators_query(user, yearMonth, locationId=0, prodId=0, **kwargs): + first_day = datetime.strptime(yearMonth, "%Y-%m-%d").replace(day=1) + last_day = first_day + relativedelta(months=1) - timedelta(days=1) + days_in_month = last_day.day + + with connection.cursor() as cur: + try: + cur.execute( + policies_primary_indicators_sql, + { + "LastDay": last_day, + "LocationId": locationId, + "ProdId": prodId, + "DaysInMonth": days_in_month, + }, + ) + return { + "data": dictfetchall(cur) + } + except Exception as e: + logger.exception("Error fetching policies primary indicators query") + raise e + + logger.error("Policies primary indicators query arrived at end of function") + return {"data": None} diff --git a/policy/test_helpers.py b/policy/test_helpers.py index 851e569..19c659e 100644 --- a/policy/test_helpers.py +++ b/policy/test_helpers.py @@ -1,6 +1,7 @@ from contribution.models import Premium from insuree.models import InsureePolicy, Family, Gender, Insuree from policy.models import Policy +from policy.values import policy_values from product.models import Product @@ -50,6 +51,10 @@ def create_test_policy2(product, insuree, link=True, valid=True, custom_props=No ) else: insuree_policy = None + + policy, warnings = policy_values(policy, insuree.family, None) + if warnings: + raise Exception("Policy has warnings: {}".format(warnings)) return policy, insuree_policy From 689b5ea1d68d5af930252ad1cc5e7a7aadaf3c36 Mon Sep 17 00:00:00 2001 From: Patrick Delcroix Date: Tue, 12 Sep 2023 16:11:56 +0200 Subject: [PATCH 2/7] Develop (#68) * Add helpers test (#64) * add tst * Update tests.py * OP-1518: load config (#67) Co-authored-by: Jan --------- Co-authored-by: Jan Co-authored-by: Jan --- policy/apps.py | 52 +++++++++++++++---------------------------------- policy/tests.py | 19 ++++++++++++++++++ 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/policy/apps.py b/policy/apps.py index 1f028fa..ec3f070 100644 --- a/policy/apps.py +++ b/policy/apps.py @@ -18,6 +18,9 @@ "policy_location_via": "family", # ... or product "default_eligibility_disabled": False, "activation_option": 1, + "ACTIVATION_OPTION_CONTRIBUTION": 1, + "CTIVATION_OPTION_PAYMENT": 2, + "ACTIVATION_OPTION_READY": 3, } @@ -34,43 +37,20 @@ class PolicyConfig(AppConfig): gql_mutation_edit_policies_perms = [] gql_mutation_suspend_policies_perms = [] gql_mutation_delete_policies_perms = [] - policy_renewal_interval = 14 - policy_location_via = 'family' - default_eligibility_disabled = False - ACTIVATION_OPTION_CONTRIBUTION = 1 - ACTIVATION_OPTION_PAYMENT = 2 - ACTIVATION_OPTION_READY = 3 - activation_option = ACTIVATION_OPTION_CONTRIBUTION - - def _configure_permissions(self, cfg): - PolicyConfig.gql_query_policies_perms = cfg["gql_query_policies_perms"] - PolicyConfig.gql_query_policy_officers_perms = cfg["gql_query_policy_officers_perms"] - PolicyConfig.gql_query_policies_by_insuree_perms = cfg["gql_query_policies_by_insuree_perms"] - PolicyConfig.gql_query_policies_by_family_perms = cfg["gql_query_policies_by_family_perms"] - PolicyConfig.gql_mutation_create_policies_perms = cfg["gql_mutation_create_policies_perms"] - PolicyConfig.gql_mutation_renew_policies_perms = cfg["gql_mutation_renew_policies_perms"] - PolicyConfig.gql_mutation_edit_policies_perms = cfg["gql_mutation_edit_policies_perms"] - PolicyConfig.gql_mutation_suspend_policies_perms = cfg["gql_mutation_suspend_policies_perms"] - PolicyConfig.gql_mutation_delete_policies_perms = cfg["gql_mutation_delete_policies_perms"] - PolicyConfig.gql_query_eligibilities_perms = cfg["gql_query_eligibilities_perms"] - - def _configure_eligibility(self, cfg): - PolicyConfig.default_eligibility_disabled = cfg["default_eligibility_disabled"] - - def _configure_renewal(self, cfg): - PolicyConfig.policy_renewal_interval = cfg["policy_renewal_interval"] - - def _configure_location(self, cfg): - PolicyConfig.policy_location_via = cfg["policy_location_via"] - - def _configure_activation(self, cfg): - PolicyConfig.activation_option = cfg["activation_option"] + policy_renewal_interval = None + policy_location_via = None + default_eligibility_disabled = None + ACTIVATION_OPTION_CONTRIBUTION = None + ACTIVATION_OPTION_PAYMENT = None + ACTIVATION_OPTION_READY = None + activation_option = None + + def __load_config(self, cfg): + for field in cfg: + if hasattr(PolicyConfig, field): + setattr(PolicyConfig, field, cfg[field]) def ready(self): from core.models import ModuleConfiguration cfg = ModuleConfiguration.get_or_default(MODULE_NAME, DEFAULT_CFG) - self._configure_permissions(cfg) - self._configure_renewal(cfg) - self._configure_location(cfg) - self._configure_eligibility(cfg) - self._configure_activation(cfg) + self.__load_config(cfg) diff --git a/policy/tests.py b/policy/tests.py index a39b155..77ece4a 100644 --- a/policy/tests.py +++ b/policy/tests.py @@ -1 +1,20 @@ # Create your tests here. + +# Create your tests here. +from django.test import TestCase + +from contribution.test_helpers import create_test_premium +from core.test_helpers import create_test_officer +from policy.models import Policy +from policy.test_helpers import create_test_policy2,create_test_policy_with_IPs,create_test_insuree_for_policy +from product.test_helpers import create_test_product, create_test_product_service + + +class TaskGroupServiceTest(TestCase): + def test_helper(self): + insuree, family = create_test_insuree_for_policy(with_family=True, is_head=False, custom_props={"chf_id": "paysimp"}, family_custom_props=None) + product = create_test_product("ELI1") + (policy, insuree_policy) = create_test_policy2(product, insuree, custom_props={ + "value": 1000, "status": Policy.STATUS_IDLE}) + + policy = create_test_policy_with_IPs(product, insuree, valid=True, policy_props={"value": 1000, "status": Policy.STATUS_ACTIVE}, IP_props=None, premium_props=None) From 87595053af5547a9f9c8b7b7e97e574fd92717ad Mon Sep 17 00:00:00 2001 From: Eric Darchis Date: Wed, 20 Sep 2023 14:49:36 +0200 Subject: [PATCH 3/7] OMT-333 undo policy_value in helper --- policy/test_helpers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/policy/test_helpers.py b/policy/test_helpers.py index 19c659e..1d18945 100644 --- a/policy/test_helpers.py +++ b/policy/test_helpers.py @@ -52,9 +52,10 @@ def create_test_policy2(product, insuree, link=True, valid=True, custom_props=No else: insuree_policy = None - policy, warnings = policy_values(policy, insuree.family, None) - if warnings: - raise Exception("Policy has warnings: {}".format(warnings)) + # Was added for OMT-333 but breaks tests that explicitly call policy_values + # policy, warnings = policy_values(policy, insuree.family, None) + # if warnings: + # raise Exception("Policy has warnings: {}".format(warnings)) return policy, insuree_policy From 0a86a2d7ac9debb0b9996f5bbdd298e6ebbcdfe9 Mon Sep 17 00:00:00 2001 From: delcroip Date: Mon, 11 Dec 2023 13:54:23 +0100 Subject: [PATCH 4/7] fix PSQL test + better sum_premiums --- policy/gql_queries.py | 2 +- policy/models.py | 24 ++++++++++++++---------- policy/schema.py | 10 +++++----- policy/test_services.py | 7 ++++--- policy/tests_gql.py | 2 +- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/policy/gql_queries.py b/policy/gql_queries.py index a45b483..34c7e69 100644 --- a/policy/gql_queries.py +++ b/policy/gql_queries.py @@ -11,7 +11,7 @@ class PolicyGQLType(DjangoObjectType): sum_premiums = graphene.Float(source="sum_premiums") - + def resolve_family(self, info): if not info.context.user.has_perms(PolicyConfig.gql_query_policies_perms): raise PermissionDenied(_("unauthorized")) diff --git a/policy/models.py b/policy/models.py index a7de203..adacaa8 100644 --- a/policy/models.py +++ b/policy/models.py @@ -2,7 +2,9 @@ from core import fields from core import models as core_models +from core.utils import filter_validity from core.models import Officer + from django.conf import settings from django.db import models from graphql import ResolveInfo @@ -32,15 +34,17 @@ class Policy(core_models.VersionedModel): audit_user_id = models.IntegerField(db_column='AuditUserID') # row_id = models.BinaryField(db_column='RowID', blank=True, null=True) - def sum_premiums(self, photo=False): - return sum( - [ - p.amount - for p in self.premiums.filter( - is_photo_fee=photo, validity_to__isnull=True - ).all() - ] - ) + @staticmethod + def get_query_sum_premium(photo=False): + return models.Sum( + 'premiums__amount', + filter=models.Q(*filter_validity(prefix='premiums__'),premiums__is_photo_fee=photo) + ) + + def sum_premiums(self, photo = False): + return Policy.objects.filter(id=self.id).aggregate( + sum_premiums=Policy.get_query_sum_premium(photo) + )['sum_premiums'] def claim_ded_rems(self): return self.claim_ded_rems @@ -50,7 +54,6 @@ def is_new(self): def can_add_insuree(self): return self.family.members.filter(validity_to__isnull=True).count() < self.product.max_members - class Meta: managed = True db_table = 'tblPolicy' @@ -79,6 +82,7 @@ def get_queryset(cls, queryset, user): # return queryset.filter( # health_facility__location_id__in=[l.location.id for l in dist] # ) + return queryset diff --git a/policy/schema.py b/policy/schema.py index d10c8a0..0055963 100644 --- a/policy/schema.py +++ b/policy/schema.py @@ -144,13 +144,13 @@ def resolve_policies(self, info, **kwargs): 'm_count')) - Subquery(covered_sq.values('i_count')) ) query = query.filter(inactive_count__gt=0) + if kwargs.get('balance_lte') or kwargs.get('balance_gte') or kwargs.get('sum_premiums', False): + query=query.annotate( + sum_premiums=Policy.get_query_sum_premium() + ) if kwargs.get('balance_lte') or kwargs.get('balance_gte'): - sum_premiums = Premium.objects.filter(is_photo_fee=False).values( - 'policy_id').annotate(sum=Sum('amount')) - sum_premiums_subquery = sum_premiums.filter( - policy_id=OuterRef('id')) query = query.annotate( - balance=F('value') - Subquery(sum_premiums_subquery.values('sum'))) + balance=F('value') - F('sum_premiums')) if kwargs.get('balance_lte'): query = query.filter(balance__lte=kwargs.get('balance_lte')) if kwargs.get('balance_gte'): diff --git a/policy/test_services.py b/policy/test_services.py index eb17dc5..c400bca 100644 --- a/policy/test_services.py +++ b/policy/test_services.py @@ -56,8 +56,8 @@ def test_eligibility_request_all_good(self): create_test_policy2(product, insuree) mock_user.has_perm = mock.MagicMock(return_value=True) req = EligibilityRequest(chf_id="tier1234") - service = StoredProcEligibilityService(mock_user) - res = service.request(req, EligibilityResponse(req)) + service = EligibilityService(mock_user) + res = service.request(req) expected = EligibilityResponse( eligibility_request=req, @@ -82,8 +82,9 @@ def test_eligibility_request_all_good(self): ) self.assertEquals(expected, res) - @skip("skip test that uses sp") def test_eligibility_sp_call(self): + if not connection.vendor == "mssql": + self.skipTest("This test can only be executed for MSSQL database") mock_user = mock.Mock(is_anonymous=False) mock_user.has_perm = mock.MagicMock(return_value=True) req = EligibilityRequest(chf_id="070707070") diff --git a/policy/tests_gql.py b/policy/tests_gql.py index 5b4a3f0..01c06a0 100644 --- a/policy/tests_gql.py +++ b/policy/tests_gql.py @@ -32,7 +32,7 @@ def test_insuree_policy_query(self): response = self.query( ''' query { - policies(first: 10,orderBy: ["-enrollDate"]) + policies(first: 10,orderBy: ["-enrollDate"], balanceLte: 100) { totalCount pageInfo { hasNextPage, hasPreviousPage, startCursor, endCursor} From 15c6dbc35cc4fa2b7fe9f0ae7ee5cae96a5ea4ca Mon Sep 17 00:00:00 2001 From: delcroip Date: Mon, 11 Dec 2023 14:30:46 +0100 Subject: [PATCH 5/7] Merge origin/feature/OMT-333_policies_primary_indicators --- policy/test_helpers.py | 46 ++++++++++++++++++++++-------------------- policy/test_values.py | 7 ++++--- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/policy/test_helpers.py b/policy/test_helpers.py index 1d18945..30e6276 100644 --- a/policy/test_helpers.py +++ b/policy/test_helpers.py @@ -3,16 +3,18 @@ from policy.models import Policy from policy.values import policy_values from product.models import Product +import datetime - -def create_test_policy(product, insuree, link=True, valid=True, custom_props=None): +def create_test_policy(product, insuree, link=True, valid=True, custom_props=None, check=True): """ Compatibility method that only return the Policy """ - return create_test_policy2(product, insuree, link, valid, custom_props)[0] + return create_test_policy2(product, insuree, link, valid, custom_props, check)[0] +def dts(s): + return datetime.datetime.strptime(s, "%Y-%m-%d").date() -def create_test_policy2(product, insuree, link=True, valid=True, custom_props=None): +def create_test_policy2(product, insuree, link=True, valid=True, custom_props=None, check=True): """ Creates a Policy and optionally an InsureePolicy :param product: Product on which this Policy is based (or its ID) @@ -29,12 +31,12 @@ def create_test_policy2(product, insuree, link=True, valid=True, custom_props=No "product_id": product.id if isinstance(product, Product) else product, "status": Policy.STATUS_ACTIVE, "stage": Policy.STAGE_NEW, - "enroll_date": "2019-01-01", - "start_date": "2019-01-02", - "validity_from": "2019-01-01", - "effective_date": "2019-01-01", - "expiry_date": "2039-06-01", - "validity_to": None if valid else "2019-01-01", + "enroll_date": dts("2019-01-01"), + "start_date": dts("2019-01-02"), + "validity_from": dts("2019-01-01"), + "effective_date": dts("2019-01-01"), + "expiry_date": dts("2039-06-01"), + "validity_to": None if valid else dts("2019-01-01"), "audit_user_id": -1, **(custom_props if custom_props else {}) } @@ -44,18 +46,18 @@ def create_test_policy2(product, insuree, link=True, valid=True, custom_props=No insuree=insuree, policy=policy, audit_user_id=-1, - effective_date="2019-01-01", - expiry_date="2039-06-01", - validity_from="2019-01-01", - validity_to=None if valid else "2019-01-01", + effective_date=dts("2019-01-01"), + expiry_date=dts("2039-06-01"), + validity_from=dts("2019-01-01"), + validity_to=None if valid else dts("2019-01-01"), ) else: insuree_policy = None # Was added for OMT-333 but breaks tests that explicitly call policy_values - # policy, warnings = policy_values(policy, insuree.family, None) - # if warnings: - # raise Exception("Policy has warnings: {}".format(warnings)) + policy, warnings = policy_values(policy, insuree.family, None) + if check and warnings: + raise Exception("Policy has warnings: {}".format(warnings)) return policy, insuree_policy @@ -71,9 +73,9 @@ def create_test_policy_with_IPs(product, insuree, valid=True, policy_props=None, :return: The created Policy and InsureePolicy """ value = 10000.00 - default_date = "2019-01-01" - start_date = "2019-01-02" - expiry_date = "2039-06-01" + default_date = dts("2019-01-01") + start_date = dts("2019-01-02") + expiry_date = dts("2039-06-01") policy = Policy.objects.create( **{ @@ -147,10 +149,10 @@ def create_test_insuree_for_policy(with_family=True, is_head=False, custom_props "chf_id": "chf_dflt", "family": family, "gender": Gender.objects.get(code='M'), - "dob": "1970-01-01", + "dob": dts("1970-01-01"), "head": is_head, "card_issued": True, - "validity_from": "2019-01-01", + "validity_from": dts("2019-01-01"), "audit_user_id": -1, **(custom_props if custom_props else {}) } diff --git a/policy/test_values.py b/policy/test_values.py index 7fe4636..92ae8ff 100644 --- a/policy/test_values.py +++ b/policy/test_values.py @@ -106,7 +106,7 @@ def test_new_policy_lump_sum_and_cycles(self): self.assertEquals(policy.value, 445) # 200 + 1 x 200 + 3 x 10 + 3 x 5 def test_new_policy_admin_period_max_members_insurance_period(self): - head_insuree = create_test_insuree(with_family=True, custom_props={"dob": core.datetime.date(1985, 5, 5)}) + head_insuree = create_test_insuree(with_family=True, custom_props={"chf_id":"tnpapmmip","dob": core.datetime.date(1985, 5, 5)}) spouse = Relation.objects.get(id=8) create_test_insuree(with_family = False, custom_props={ @@ -149,8 +149,9 @@ def test_new_policy_admin_period_max_members_insurance_period(self): "family": head_insuree.family }) policy = create_test_policy(product, head_insuree, custom_props={ - "enroll_date": core.datetime.date(2021, 12, 11), - }) + "enroll_date": core.datetime.date(2021, 12, 11), + }, check = False) + policy, warnings = policy_values(policy, head_insuree.family, None) self.assertEquals(policy.start_date, core.datetime.date(2022, 1, 1)) # enroll + admin in cycle 1 + grace self.assertEquals(policy.expiry_date, core.datetime.date(2022, 6, 30)) From cf62fc2ef607ab93487077fb801bc99f68da66d9 Mon Sep 17 00:00:00 2001 From: Patrick Delcroix Date: Mon, 11 Dec 2023 14:39:22 +0100 Subject: [PATCH 6/7] don't raise error per default --- policy/test_helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/policy/test_helpers.py b/policy/test_helpers.py index 30e6276..fc00443 100644 --- a/policy/test_helpers.py +++ b/policy/test_helpers.py @@ -5,7 +5,7 @@ from product.models import Product import datetime -def create_test_policy(product, insuree, link=True, valid=True, custom_props=None, check=True): +def create_test_policy(product, insuree, link=True, valid=True, custom_props=None, check=False): """ Compatibility method that only return the Policy """ @@ -14,7 +14,7 @@ def create_test_policy(product, insuree, link=True, valid=True, custom_props=Non def dts(s): return datetime.datetime.strptime(s, "%Y-%m-%d").date() -def create_test_policy2(product, insuree, link=True, valid=True, custom_props=None, check=True): +def create_test_policy2(product, insuree, link=True, valid=True, custom_props=None, check=False): """ Creates a Policy and optionally an InsureePolicy :param product: Product on which this Policy is based (or its ID) From f9277de1ac3f9f9014f7b84f2a9ee2f796d45658 Mon Sep 17 00:00:00 2001 From: delcroip Date: Wed, 13 Dec 2023 10:57:42 +0100 Subject: [PATCH 7/7] fix null on sum_premiums when there is no premium --- policy/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policy/models.py b/policy/models.py index adacaa8..b4876d0 100644 --- a/policy/models.py +++ b/policy/models.py @@ -44,7 +44,7 @@ def get_query_sum_premium(photo=False): def sum_premiums(self, photo = False): return Policy.objects.filter(id=self.id).aggregate( sum_premiums=Policy.get_query_sum_premium(photo) - )['sum_premiums'] + )['sum_premiums'] or 0 def claim_ded_rems(self): return self.claim_ded_rems