You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@ A Node.js framework for extracting mCODE FHIR resources. All resources are profi
19
19
-[Masking Patient Data](#masking-patient-data)
20
20
-[Extraction Date Range](#extraction-date-range)
21
21
-[CLI From-Date and To-Date (NOT recommended use)](#cli-from-date-and-to-date-not-recommended-use)
22
+
-[Troubleshooting](#troubleshooting)
23
+
-[Byte Order Markers in CSV Files](#byte-order-markers-in-csv-files)
22
24
-[Terminology and Architecture](#terminology-and-architecture)
23
25
-[Glossary](#glossary)
24
26
-[High Level Diagram](#high-level-diagram)
@@ -58,13 +60,13 @@ const cancerDiseaseStatusExtractor = new CSVCancerDiseaseStatusExtractor('path-t
58
60
The framework also contains the [MCODEClient](src/client/MCODEClient.js) which has registered all of the extractors in this repo. Once you have exported CSV data and updated your configuration file, use the mCODE Extraction client by running the following:
59
61
60
62
```bash
61
-
node src/cli/cli.js [options]
63
+
npm start -- [options]
62
64
```
63
65
64
66
To see all the options that can be used with the mCODE client, run the following:
65
67
66
68
```bash
67
-
node src/cli/cli.js --help
69
+
npm start -- --help
68
70
```
69
71
70
72
### First Time User Guide
@@ -125,7 +127,7 @@ Whenever the mCODE Extraction Client successfully runs with the `--entries-filte
125
127
Users can specify a different location for the file by using the `--run-log-filepath <path>` CLI option. Users will need to create this file before running the mCODE Extraction Client with `--entries-filter` and a date range. Initially, this file's contents should be an empty array, `[]`. For example:
@@ -158,9 +160,21 @@ If any filtering on data elements in CSV files is required, the `entries-filter`
158
160
If a `from-date` is provided as an option when running the mCODE Extraction Client, it will be used to filter out any data elements that are recorded before that date based on the `dateRecorded` column in the CSV files. If a `to-date` is provided as an option, it will be used to filter out any data elements that are recorded after that date based on the `dateRecorded` column in the CSV files. If no `to-date` is provided, the default is today. If no `from-date` is provided, the mCODE Extraction Client will look to a run log file (details [above](#Logging-Successful-Extractions)) to find the most recent run and use the `to-date` of that run as the `from-date` for the current run, allowing users to only run the extraction on data elements that were not included in previous runs. If there are no previous run times logged, a `from-date` needs to be provided when running the extraction when the `entries-filter` option is provided. If the `entries-filter` option is not provided, any `from-date` and `to-date` options will be ignored, none of the data elements will be filtered by date, and a successful run will not be logged since there is no specified date range. An example running the client with the `from-date` and `to-date` is as follows:
The extraction client has built-in handling of byte order markers for CSV files in UTF-8 and UTF-16LE encodings. When using CSV files in other encodings, if you experience unexpected errors be sure to check for a byte order marker at the beginning of the file. One way to check is to run the following command from the command line:
171
+
172
+
```bash
173
+
cat -v <file.csv>
174
+
```
175
+
176
+
If there is an unexpected symbol at the beginning of the file, then there may be a byte order marker that needs to be removed.
177
+
164
178
## Terminology and Architecture
165
179
166
180
This framework consists of three key components: Extractors, Modules and Templates. Below is, in order:
0 commit comments