Skip to content

Create "Register van Algoritmen" endpoint #261

@robbertbos

Description

@robbertbos

For the Digilab Fieldlab, we need to create a (mock) endpoint for a register of algorithms. It is fine to start with a single datablob that represents a single algorithm.

This algorithm should be a ruleset from regels.overheid.nl

The blob could look like this but should contain an ACTUAL ruleset from regels.overheid.nl:
(NOTE: this is an example made up, just to give an impression, dataModel and ruleModel will likely change based on discussions with regels.overheid.nl).

{
  "id": "RVA-001",
  "algorithmName": "High Income Tax Calculation",
  "registerLink": "regels.overheid.nl/RVA-001",
  "dataModel": {
    "objectTypes": [
      {
        "name": "Taxpayer",
        "attributes": [
          {
            "name": "annualIncome",
            "dataType": "Numeric"
          },
          {
            "name": "taxAmount",
            "dataType": "Numeric"
          }
        ],
        "characteristics": [
          "isHighIncome"
        ]
      }
    ],
    "parameters": [
      {
        "name": "standardDeduction",
        "dataType": "Numeric"
      },
      {
        "name": "taxRate",
        "dataType": "Percentage"
      }
    ]
  },
  "ruleModel": {
    "ruleGroups": [
      {
        "name": "IncomeTaxCalculation",
        "rules": [
          {
            "name": "HighIncomeCharacteristic",
            "type": "CharacteristicAssignment",
            "validity": {
              "startDate": "2024-01-01",
              "endDate": "2024-12-31"
            },
            "content": {
              "subject": {
                "objectType": "Taxpayer"
              },
              "characteristic": "isHighIncome",
              "condition": {
                "operator": "greaterThan",
                "leftOperand": {
                  "objectType": "Taxpayer",
                  "attribute": "annualIncome"
                },
                "rightOperand": {
                  "value": 100000
                }
              }
            }
          },
          {
            "name": "TaxAmountCalculation",
            "type": "Equality",
            "validity": {
              "startDate": "2024-01-01",
              "endDate": "2024-12-31"
            },
            "content": {
              "leftOperand": {
                "objectType": "Taxpayer",
                "attribute": "taxAmount"
              },
              "rightOperand": {
                "operation": "multiplication",
                "operands": [
                  {
                    "operation": "subtraction",
                    "operands": [
                      {
                        "objectType": "Taxpayer",
                        "attribute": "annualIncome"
                      },
                      {
                        "parameter": "standardDeduction"
                      }
                    ]
                  },
                  {
                    "parameter": "taxRate"
                  }
                ]
              },
              "condition": {
                "subject": {
                  "objectType": "Taxpayer"
                },
                "characteristic": "isHighIncome"
              }
            }
          }
        ]
      }
    ]
  }
}

The url of the blob should be communicated to Digilab (through Anne).

There should be data to fill the top part of this screen:
Image

implementation notes

  • a new repository with a single file (and possibly a schema) is enough for this ticket
  • we would communicate the raw url to this file
  • note: dataModel and ruleModel are likely to change from the example above, based on discussions with regels.overheid.nl
  • the format is json
  • onnx models out of scope for now, but important to choose a format that could support it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ⛔ Blocked / Waiting

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions