diff --git a/CHANGELOG.md b/CHANGELOG.md
index 73d7b54..8832dea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -33,6 +33,7 @@
- fix duplicate van rechtswege/grote helft mandates [OP-3851]
- IMPORTANT NOTE: Make sure first the loket migration has completed + data has flown from loket to OP
- Add missing headers to identifier calls
+- Add columns to administrative units report [OP-3835]
### Deploy notes
```
@@ -80,7 +81,7 @@ drc restart migrations mandatarissen-consumer
```
```
-drc restart migrations
+drc restart migrations report-generation
drc exec delta-producer-background-jobs-initiator curl -X POST http://localhost/public/healing-jobs
drc up -d construct-organization-relationships
```
diff --git a/config/reports/administrative-units-report.js b/config/reports/administrative-units-report.js
index e0dfd77..11980e9 100644
--- a/config/reports/administrative-units-report.js
+++ b/config/reports/administrative-units-report.js
@@ -18,13 +18,18 @@ export default {
SELECT DISTINCT
?Bestuurseenheid
+ ?JuridischeNaam
+ ?AlternatieveNaam
?Classificatie
?Status
?KBO_nr
?OVO_nr
?Sharepoint_id
?NIS_code
+ ?JuridischeVorm
?Regio
+ ?Werkingsgebied
+ ?GeplandeEinddatum
?Provincie
?Straat
?Huisnummer
@@ -48,7 +53,31 @@ export default {
a ?type.
OPTIONAL { ?BestuurseenheidURI skos:prefLabel ?Bestuurseenheid . }
OPTIONAL { ?BestuurseenheidURI org:classification/skos:prefLabel ?Classificatie. }
-
+ OPTIONAL { ?BestuurseenheidURI regorg:legalName ?JuridischeNaam. }
+ OPTIONAL { ?BestuurseenheidURI organisatie:rechtsvorm/skos:prefLabel ?JuridischeVorm. }
+ OPTIONAL { ?BestuurseenheidURI lblodgeneriek:geplandeEindDatum ?GeplandeEinddatum. }
+
+ OPTIONAL {
+ SELECT ?BestuurseenheidURI (GROUP_CONCAT(DISTINCT ?altLabelValue; separator=", ") AS ?AlternatieveNaam)
+ WHERE {
+ ?BestuurseenheidURI skos:altLabel ?altLabelValue .
+ }
+ GROUP BY ?BestuurseenheidURI
+ }
+
+ OPTIONAL {
+ SELECT ?BestuurseenheidURI (GROUP_CONCAT(DISTINCT ?scopeLabel; separator=", ") AS ?Werkingsgebied)
+ WHERE {
+ {
+ ?BestuurseenheidURI besluit:werkingsgebied ?scopeURI .
+ } UNION {
+ ?BestuurseenheidURI dc_terms:spatial ?scopeURI .
+ }
+ ?scopeURI rdfs:label ?scopeLabel .
+ }
+ GROUP BY ?BestuurseenheidURI
+ }
+
OPTIONAL {
?BestuurseenheidURI besluit:werkingsgebied ?werkingsgebiedURI.
?werkingsgebiedURI rdfs:label ?werkingsgebied.
@@ -131,13 +160,18 @@ export default {
const data = queryResponse.results.bindings.map((row) => ({
Bestuurseenheid: getSafeValue(row, "Bestuurseenheid"),
+ JuridischeNaam: getSafeValue(row, "JuridischeNaam"),
+ AlternatieveNaam: getSafeValue(row, "AlternatieveNaam"),
Classificatie: getSafeValue(row, "Classificatie"),
Status: getSafeValue(row, "Status"),
KBO_nr: getSafeValue(row, "KBO_nr"),
OVO_nr: getSafeValue(row, "OVO_nr"),
Sharepoint_id: getSafeValue(row, "Sharepoint_id"),
NIS_code: getSafeValue(row, "NIS_code"),
+ JuridischeVorm: getSafeValue(row, "JuridischeVorm"),
Regio: getSafeValue(row, "Regio"),
+ Werkingsgebied: getSafeValue(row, "Werkingsgebied"),
+ GeplandeEinddatum: getSafeValue(row, "GeplandeEinddatum"),
Provincie: getSafeValue(row, "Provincie"),
Straat: getSafeValue(row, "Straat"),
Huisnummer: getSafeValue(row, "Huisnummer"),
@@ -154,13 +188,18 @@ export default {
data,
[
"Bestuurseenheid",
+ "JuridischeNaam",
+ "AlternatieveNaam",
"Classificatie",
"Status",
"KBO_nr",
"OVO_nr",
"Sharepoint_id",
"NIS_code",
+ "JuridischeVorm",
"Regio",
+ "Werkingsgebied",
+ "GeplandeEinddatum",
"Provincie",
"Straat",
"Huisnummer",
diff --git a/config/reports/utils.js b/config/reports/utils.js
index f997873..2dcf353 100644
--- a/config/reports/utils.js
+++ b/config/reports/utils.js
@@ -12,6 +12,7 @@ export const PREFIXES = `
PREFIX ext:
PREFIX foaf:
PREFIX generiek:
+ PREFIX lblodgeneriek:
PREFIX lblodlg:
PREFIX locn:
PREFIX mandaat: