A very simple program for harmonizing CSV files against Common Data Elements from the caDSR, which we access using the caDSR-on-FHIR service.
Using csv2caDSR is an overly complicated process (it will be improved in later versions if needed):
-
sbt "run --csv example.csv --to-json example.json"
- Creates a JSON file describing the columns in the CSV file.
-
Fill in the caDSR values in the CSV file.
-
sbt "run --json example-with-caDSRs.json --to-json example-with-values.json"
- Fills in values for caDSR values.
-
Map CSV values to caDSR values.
-
sbt "run --json example-with-values.json --to-json example-with-enumValues.json"
- Retrieve descriptions and concept identifiers for the mapped caDSR values.
-
sbt "run --csv example.csv --json example-with-enumValues.json --to-csv example-mapped.csv"
- Map CSV file to CDEs based on the mapping information in
example-with-enumValues.json
.
- Map CSV file to CDEs based on the mapping information in
-
sbt "run --csv example.csv --json example-with-enumValues.json --to-pfb examples/avro/example.avro"
- Convert CSV file to a PFB file in Avro.
-
sbt "run --csv example.csv --json example-with-enumValues.json --to-cedar examples/cedar/prefix --upload-to-cedar --cedar-upload-folder-url https://repo.metadatacenter.org/folders/bba27862-cbfb-474b-a6d0-bbf03c297df9"
- Convert CSV file to CEDAR instance data (using the prefix provided, in this example at
examples/cedar/prefix.instance.${index}.json
), generate a CEDAR template (in this example, atexamples/cedar/prefix.template.json
), and optionally upload it to a particular CEDAR template.
- Convert CSV file to CEDAR instance data (using the prefix provided, in this example at
-
sbt "run --csv example.csv --json example-with-enumValues.json --to-jsonld examples/jsonld/prefix --generate-shacl"
- Convert CSV file to JSON-LD (using the prefix provided, in this example at
examples/jsonld/prefix.instance.${index}.jsonld
) and generate a SHACL file (in this example, atexamples/jsonld/prefix.shacl.ttl
).
- Convert CSV file to JSON-LD (using the prefix provided, in this example at