Skip to content
OS2moPublic

About

OS2mo integration that syncs organisation units from CSV files, such as SOR

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

mo-arbor

OS2mo integration that syncs organisation units from CSV files, such as SOR.

Usage

docker compose up -d --build

Configuration is done through environment variables. Integration-specific options are defined in mo_arbor/config.py. FastRAMQPI's options (MO URL, authentication, logging, etc.) are nested under FASTRAMQPI and set using __ as delimiter, e.g. FASTRAMQPI__MO_URL. See docker-compose.yml for a working example.

Sundhedsvæsenets Organisationsregister (SOR)

SOR registers organisation and address data, as well as location numbers, for the Danish healthcare sector. It is owned and operated by Sundhedsdatastyrelsen.

Development

The integration is a FastRAMQPI application using OS2mo's GraphQL event system. FastRAMQPI declares event listeners against MO; MO's GraphQL fetcher polls events and HTTP-POSTs them to FastAPI routes on this integration. Listeners are configured in mo_arbor/app.py and the handlers live in mo_arbor/events.py.

The development environment connects to the os2mo_default network, so OS2mo must be running locally.

Running the tests

Unit tests:

poetry run pytest -m "not integration_test"

Integration tests run against the local OS2mo, from inside the container:

docker compose run --rm mo-arbor pytest -m integration_test

Updating the GraphQL client

The GraphQL client in mo_arbor/autogenerated_graphql_client MUST NOT be edited manually. It is generated from schema.graphql and queries.graphql using ariadne-codegen. To regenerate after changing queries:

curl -O http://localhost:5000/graphql/v30/schema.graphql
rm -rf mo_arbor/autogenerated_graphql_client/
poetry run ariadne-codegen client
poetry run pre-commit run --files mo_arbor/autogenerated_graphql_client/*

Versioning

This project uses Semantic Versioning with the following strategy:

  • MAJOR: Incompatible API changes.
  • MINOR: Backwards-compatible updates and functionality.
  • PATCH: Backwards-compatible bug fixes.

Authors

Magenta ApS https://magenta.dk

License

This project uses REUSE for licensing. All licenses can be found in the LICENSES folder of the project.

About

OS2mo integration that syncs organisation units from CSV files, such as SOR

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages