{
  "id": "ch_hrm2_account",
  "kind": "datatype",
  "status": "draft",
  "name": "Swiss HRM2 account group (Sachgruppe)",
  "doc": "Code of the chart of accounts of HRM2 (Harmonisiertes Rechnungslegungsmodell 2), the accounting model of the Swiss cantons and municipalities. The first digit is the account class: 1 assets, 2 liabilities and equity, 3 expenses, 4 revenue, 5 investment expenditure, 6 investment receipts, 9 closing accounts. Each further digit narrows the group (30 personnel expenses, 300 authorities and commissions, 3000 wages of authorities and judges); groups of one to four digits are the same for all public bodies, and a body may add two digits after a dot or its own longer account numbers below them. Budgets and accounts published as open data give the code alone or followed by its label.",
  "is_pii": false,
  "categories": [
    "finances",
    "government"
  ],
  "country": [
    "CH"
  ],
  "langs": [
    "common"
  ],
  "classification": "categorical",
  "regexp": "^[1-69]\\d{0,3}(?:\\.\\d{2})?$",
  "examples": [
    {
      "value": "3",
      "description": "Account class: expenses (Aufwand)",
      "valid": true
    },
    {
      "value": "30",
      "description": "Personnel expenses (Personalaufwand)",
      "valid": true
    },
    {
      "value": "3010",
      "description": "Wages of administrative and operating staff",
      "valid": true
    },
    {
      "value": "3000.00",
      "description": "A detail account of group 3000",
      "valid": true
    },
    {
      "value": "7000",
      "description": "there is no account class 7",
      "valid": false
    },
    {
      "value": "30100",
      "valid": false
    }
  ],
  "links": [
    {
      "type": "doc",
      "url": "https://www.sz.ch/public/upload/assets/61679/Kontenrahmen_Erfolgsrechnung.pdf?fp=12"
    }
  ],
  "translations": {
    "de": {
      "name": "HRM2-Sachgruppe (Kontenrahmen der Kantone und Gemeinden)"
    },
    "ru": {
      "name": "Группа счетов HRM2 (план счетов кантонов и коммун Швейцарии)"
    }
  },
  "detected_by": {
    "tools": [
      "metacrafter"
    ],
    "metacrafter_rules": [
      {
        "rule": "chhrm2accountbyname",
        "type": "field",
        "match": "regex",
        "file": "ch/ch_codes.yaml"
      }
    ]
  },
  "quality": {
    "score": 90,
    "missing": [
      "mapping (Wikidata, Schema.org, ...)"
    ]
  },
  "source": {
    "path": "data/datatypes/CH/government/ch_hrm2_account.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/CH/government/ch_hrm2_account.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/CH/government/ch_hrm2_account.yaml"
  },
  "urls": {
    "html": "https://registry.apicrafter.io/datatype/ch_hrm2_account",
    "json": "https://registry.apicrafter.io/api/v1/datatypes/ch_hrm2_account.json"
  }
}