A data pipeline that minimizes manual effort when extracting immunization records from the Minnesota Department of Health, transforming them, and loading them into the student information system, Infinite Campus.
Project description
🩺⚙️ Immunization Records Pipeline 🩺⚙️
A data pipeline that minimizes manual effort when extracting immunization records from the Minnesota Department of Health, transforming them, and loading them into the student information system, Infinite Campus.
Features
- Transform Command: Convert immunization data from AISR format to Infinite Campus format
- Bulk Query Command: Submit bulk queries to the AISR system
- Get Vaccinations Command: Download vaccination records from AISR
Configuration
Create a JSON configuration file with the following structure:
{
"paths": {
"input_folder": "path/to/aisr_downloads", # Folder containing AISR downloaded files
"output_folder": "path/to/output", # Folder where transformed files will be saved
"logs_folder": "path/to/logs" # Folder for application logs
},
"api": {
"auth_base_url": "https://authenticator-url",
"aisr_api_base_url": "https://api-url"
},
"schools": [
{
"name": "School Name",
"id": "school-id",
"classification": "N",
"email": "contact@example.com"
}
]
}
Usage
Transform Command
Transforms immunization data from AISR format to Infinite Campus format:
python data_pipeline --config path/to/config.json transform
Bulk Query Command
Submits a bulk query to AISR for immunization records:
python data_pipeline --config path/to/config.json bulk-query --username your-username
The password will be requested interactively or can be provided via the AISR_PASSWORD environment variable.
Get Vaccinations Command
Downloads vaccination records from AISR:
python data_pipeline --config path/to/config.json get-vaccinations --username your-username
Developer Setup
Environment Setup
Developer setup is easy with Dev Containers!
- Download the code locally
- Ensure VS Code is installed
- Open the repository in VS Code
- Follow the tutorial here to set up Dev Containers.
- Run the command (View->Command Palette)
Dev Containers: Reopen in Container- This may take several minutes the first time
Using Poetry for Development
This project uses Poetry for dependency management:
# Install dependencies
poetry install
# Run the application
poetry run python data_pipeline --config config/config.json transform
# Run tests
poetry run pytest
# Run specific tests
poetry run pytest tests/unit/
poetry run pytest tests/integration/
Project Structure
data_pipeline/: Main package directory__main__.py: Entry point for the applicationcli.py: Command-line interface and handlersaisr/: AISR API interactionactions.py: API actions for queries and downloadsauthenticate.py: Authentication with AISR
io/: Input/output operationsextract.py: Data extraction functionsload.py: Data loading functions
etl_workflow.py: Core ETL workflowtransform.py: Data transformation functionspipeline_factory.py: Factory functions for creating pipelines
tests/: Test directoryunit/: Unit testsintegration/: Integration testsmock_server.py: Mock server for testing
config/: Configuration fileslogs/: Application logs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file minnesota_immunization_data_pipeline-0.3.0.tar.gz.
File metadata
- Download URL: minnesota_immunization_data_pipeline-0.3.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.11 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c05da6fafaabb5d5f169fa43a24935a0bbb8dbb75eb725b337837cae392360df
|
|
| MD5 |
e080d0f8b35b746f84ba4c64abe96b7d
|
|
| BLAKE2b-256 |
b3365b177b8489d18b6aee7c729e17e2243998e9ac06cd926bedfc4d39a4ad18
|
File details
Details for the file minnesota_immunization_data_pipeline-0.3.0-py3-none-any.whl.
File metadata
- Download URL: minnesota_immunization_data_pipeline-0.3.0-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.11 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24147b1ca07d41354b91db4462c03e5b4d2e85ac730cd74b58088bbd765bf37a
|
|
| MD5 |
25341dbd41276fbc420f5de02b902435
|
|
| BLAKE2b-256 |
70b67c7f58180fb7fd21e787531f5343830a548feb6f54e57c7d672d5f086153
|