Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cumulus_etl/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import rich.logging

from cumulus_etl import common, etl, export, inliner, upload_notes
from cumulus_etl.etl import convert, init
from cumulus_etl.etl import convert, init, nlp


class Command(enum.Enum):
Expand All @@ -21,6 +21,7 @@ class Command(enum.Enum):
EXPORT = "export"
INIT = "init"
INLINE = "inline"
NLP = "nlp"
UPLOAD_NOTES = "upload-notes"

# Why isn't this part of Enum directly...?
Expand Down Expand Up @@ -72,13 +73,15 @@ async def main(argv: list[str]) -> None:
run_method = init.run_init
elif subcommand == Command.INLINE.value:
run_method = inliner.run_inline
elif subcommand == Command.NLP.value:
run_method = nlp.run_nlp
else:
parser.description = "Extract, transform, and load FHIR data."
if not subcommand:
# Add a note about other subcommands we offer, and tell argparse not to wrap our formatting
parser.formatter_class = argparse.RawDescriptionHelpFormatter
parser.description += "\n\nother commands available:\n"
parser.description += " convert\n export\n init\n inline\n upload-notes"
parser.description += " convert\n export\n init\n inline\n nlp\n upload-notes"
run_method = etl.run_etl

with tempfile.TemporaryDirectory() as tempdir:
Expand Down
2 changes: 1 addition & 1 deletion cumulus_etl/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def add_task_selection(parser: argparse.ArgumentParser):
task.add_argument(
"--task-filter",
action="append",
choices=["covid_symptom", "cpu", "gpu"],
choices=["covid_symptom", "irae", "cpu", "gpu"],
help="restrict tasks to only the given sets (comma separated)",
)

Expand Down
2 changes: 2 additions & 0 deletions cumulus_etl/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
INLINE_TASK_FAILED = 39
INLINE_WITHOUT_FOLDER = 40
WRONG_PHI_FOLDER = 41
TASK_NOT_PROVIDED = 42
TASK_MISMATCH = 43


class FatalError(Exception):
Expand Down
Loading