bmeg / fhirizer

0 stars 0 forks source link

DocRef observations #37

Closed teslajoy closed 4 months ago

teslajoy commented 4 months ago

g3t META validates after running convert and generate on files. example:

fhirizer convert --name file --in_path ../GDC-FHIR/All-GDC/files.ndjson --out_path ../GDC-FHIR/All-GDC/files_keys.ndjson
fhirizer generate --name file --out_dir ../GDC-FHIR/All-GDC/META --entity_path ../GDC-FHIR/All-GDC/files_keys.ndjson

Screenshot 2024-07-23 at 9 42 04 AM

matthewpeterkort commented 4 months ago

Generate command should include computations done in convert command to remove an extra read and write to disk.

For example fhirizer generate required args would just be the in_path arg from the convert command and the out_dir path from the generate command, since the files_keys.ndjson entity file is only generated if given a special optional argument.

Validate that the required arguments are provided for the generate command. For example: fhirizer generate --name file --out_dir METAdsfdsf gives:

fhirizer/fhirizer/utils.py", line 663, in load_ndjson with open(path, 'r') as file: ^^^^^^^^^^^^^^^ when it should probably just error stating which required argument was not provided