Skip to content

Use stedkode instead of parsing kostnadssted

Andreas Ellewsen requested to merge CRISTIN-53-orgreg into master

Before this commit the export parsed the kostnadssted field of orgunits and employments to set the 'avdnr(Under)', 'undavdnr(Under)', and 'gruppenr(Under)' fields for orgunits and employments on persons.

It now uses orgreg-client to fetch orgunits, checks if they have an external_key of the type 'legacy_stedkode', creates a mapping from id to stedkode for every ou and uses this to set the fields accordingly.

The 'institusjonsnr(Under)' field has been changed to use the one set in the config for all orgunits and employments.

Merge request reports