Commands
Call Solver API
- class ycms.core.management.commands.call_solver_api.Command(*args, **kwargs)
Bases:
BaseCommandManagement Command to call the external PRA solver
- __init__(*args, **kwargs)
- add_arguments(parser: CommandParser) None
Define the arguments of this command
- Parameters:
parser – The argument parser
- handle(ward_id, *args, **options) None
Command to export bed assignments of the given ward
- Parameters:
ward_id (int) – The ward ID
*args – The supplied arguments
**options – The supplied keyword options
- help = 'use the PRA solver to suggest an assignment for the given ward'
Read From Csv
- class ycms.core.management.commands.read_from_csv.Command(stdout=None, stderr=None, no_color=False, force_color=False)
Bases:
BaseCommandManagement Command to load new test data
- add_arguments(parser: CommandParser) None
Define the arguments of this command
- Parameters:
parser – The argument parser
- handle(source, target, ward_name, rooms, *args, pseudonymized=False, **options) None
Command to read from the given CSV, turn the data into database objects, and store those objects in a fixture for reuse.
Usage instructions: - use ./tools/prune_database.sh - comment out all data loading in ./tools/loadtestdata.sh expect for hospital_data.json - use this script as shown below
Example usage: ./tools/ycms-cli read_from_csv raw_data.csv test_data.json Intensivmedizin rooms.json –pseudonymized True
- help = 'parse new tet data and store in fixture'