Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ and a full app turns the same read into a report. Each row is a folder under
| `09-vcf-roll-call` | parsing the whole call file as a report | Rust |
| `10-motif-finder` | computing over a gene's reference sequence | Rust |
| `11-fortune-cookie` | why the sandbox is deterministic | Rust |
| `12-fhir-view` | genomic FHIR resources as component tables beside their JSON | Rust |

## Documentation

Expand Down
128 changes: 128 additions & 0 deletions apps/12-fhir-view/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions apps/12-fhir-view/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "fhir-view"
version = "0.1.0"
edition = "2024"

[dependencies]
serde_json = { version = "1.0", features = ["preserve_order"] }

# A smaller module uploads and starts faster on an Ark.
[profile.release]
opt-level = "z"
lto = "fat"
codegen-units = 1
panic = "abort"
strip = "symbols"
29 changes: 29 additions & 0 deletions apps/12-fhir-view/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# FHIR View

Reads genomic FHIR R4 JSON and renders its codes and components beside the
re-indented leaves. The stored JSON is compact; the display preserves key order
and content. The report counts resources without interpreting traits.

The app reads a site collection at rs671, the TAS2R38 collection and its change
resources, UGT2B17 copy resources, and a haploid site at chrM position 263.
The two genes and the haploid site are optional grants.
The public dataset directory distinguishes a missing copy number upload from
an empty answer. Public grants cannot be optional.

```sh
make run APP=12-fhir-view
make run APP=12-fhir-view FIXTURES=fixtures/no-call
make run APP=12-fhir-view FIXTURES=fixtures/unanswered
OPTIONAL=off make run APP=12-fhir-view
```

The last command declines the optional grants, leaving only rs671 and the
dataset directory. Ungranted and missing endpoints are reported as absent.
Other read errors stop the app.
The report reads at most three change and three copy endpoints, renders eight
resources per endpoint, and prints at most 12 KiB of each re-indented leaf.
Every cut includes the omitted count.

The [data path reference](../../docs/03-data-paths.md#fhir) describes the
resource shapes, and the [report guide](../../docs/06-reports.md) describes
the Markdown output.
Loading
Loading