Skip to content

Releases: smart-on-fhir/chart-review

2.0.1

18 Jul 17:14
213ee5f
Compare
Choose a tag to compare

Fix running on Python 3.9.

2.0.0

27 Jun 14:26
075d567
Compare
Choose a tag to compare

This release re-organizes the CLI commands a bit and adds some new ones!

Breaking changes

  • chart-review info has been removed, as it was in danger of becoming a kitchen sink with no clear purpose. Instead:
    • The default chart-review info output of annotators and their chart ranges has been moved to the default chart-review output when you don't provide a sub-command.
    • chart-review info --ids has been moved to chart-review ids (and now prints a human-readable table by default - pass --csv to get the previous CSV-formatted output)
    • chart-review info --labels has been moved to chart-review labels

New features

  • You can now see a list of all text mentions and how they were labeled with chart-review mentions:
$ chart-review mentions
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Annotator โ”‚ Chart ID โ”‚ Mention โ”‚ Label โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ mike      โ”‚ 1        โ”‚ sigh    โ”‚ sad   โ”‚
โ”‚ mike      โ”‚ 1        โ”‚ woo     โ”‚ happy โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
  • You can now see a count of how often each text mentions was labeled with chart-review frequency:
$ chart-review frequency
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Annotator โ”‚ Label โ”‚ Mention โ”‚ Count โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ All       โ”‚ happy โ”‚ woo     โ”‚ 1     โ”‚
โ”‚ All       โ”‚ sad   โ”‚ sigh    โ”‚ 4     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ andy      โ”‚ happy โ”‚ woo     โ”‚ 1     โ”‚
โ”‚ andy      โ”‚ sad   โ”‚ sigh    โ”‚ 1     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ april     โ”‚ happy โ”‚ woo     โ”‚ 1     โ”‚
โ”‚ april     โ”‚ sad   โ”‚ sigh    โ”‚ 3     โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
  • You can now pass chart-review accuracy --verbose to see a per-label breakdown of the True Positives / False Negatives / etc:
$ chart-review accuracy jill jane --verbose
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Chart ID โ”‚ Label    โ”‚ Classification โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 1        โ”‚ Cough    โ”‚ TP             โ”‚
โ”‚ 1        โ”‚ Fatigue  โ”‚ TP             โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 4        โ”‚ Cough    โ”‚ FP             โ”‚
โ”‚ 4        โ”‚ Fatigue  โ”‚ TP             โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
  • All commands have gained a --csv argument to print a CSV-formatted version of the command's output
  • You can now see the current version with chart-review --version
  • You can now use the shortened -p flag instead of the long-form --project-dir

Other changes:

  • When you run chart-review in a project that isn't properly set up yet (no config.yaml or label studio export), a much clearer error is printed, pointing to the web documentation
  • The chart-review accuracy --save option has been deprecated and hidden from the --help output. Use the now-standardized accuracy --csv option and redirect the output to a file instead

1.2.0

10 Jun 19:00
f69caea
Compare
Choose a tag to compare

This release adds a new info command.

By default, it shows some basic info about annotators and note ranges:

$ chart-review info
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Annotator โ”‚ Chart Count โ”‚ Chart IDs โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ jane      โ”‚ 3           โ”‚ 1, 3โ€“4    โ”‚
โ”‚ jill      โ”‚ 4           โ”‚ 1โ€“4       โ”‚
โ”‚ john      โ”‚ 3           โ”‚ 1โ€“2, 4    โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

But it also supports two other modes:

info --ids

Prints a csv of all ID mappings: Label Studio chart -> original FHIR -> anonymized FHIR.

Example:

$ chart-review info --ids
chart_id,original_fhir_id,anonymized_fhir_id
1,Encounter/ABC-Enc,Encounter/Anon-ABC-Enc
1,DocumentReference/ABC,DocumentReference/Anon-ABC
...

info --labels

Prints a table of how often each label was used by each annotator.

Example:

$ chart-review info --labels
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Annotator โ”‚ Chart Count โ”‚ Label    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Any       โ”‚ 2           โ”‚ Cough    โ”‚
โ”‚ Any       โ”‚ 3           โ”‚ Fatigue  โ”‚
โ”‚ Any       โ”‚ 3           โ”‚ Headache โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ jane      โ”‚ 1           โ”‚ Cough    โ”‚
โ”‚ jane      โ”‚ 2           โ”‚ Fatigue  โ”‚
โ”‚ jane      โ”‚ 2           โ”‚ Headache โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ jill      โ”‚ 2           โ”‚ Cough    โ”‚
โ”‚ jill      โ”‚ 3           โ”‚ Fatigue  โ”‚
โ”‚ jill      โ”‚ 0           โ”‚ Headache โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ john      โ”‚ 1           โ”‚ Cough    โ”‚
โ”‚ john      โ”‚ 2           โ”‚ Fatigue  โ”‚
โ”‚ john      โ”‚ 2           โ”‚ Headache โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

1.1.0

29 Apr 17:36
08c726b
Compare
Choose a tag to compare

This release adds a Kappa field to the accuracy command's generated scores.

This is Cohen's Kappa, which might be useful in addition to the F1 score.

1.0.0

19 Jan 15:12
db64204
Compare
Choose a tag to compare

Initial release!

The only current command is chart-review accuracy which will calculate F1 scores, a confusion matrix, and some other stats between two annotators.