-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.html
More file actions
123 lines (99 loc) · 5.13 KB
/
docs.html
File metadata and controls
123 lines (99 loc) · 5.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Clinstruct-cli Docs</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header class="site-header">
<nav class="nav">
<a class="brand" href="index.html">
<img src="assets/logo.svg" alt="Clinstruct-cli logo" />
<span>Clinstruct-cli</span>
</a>
<div class="nav-links">
<a href="index.html">Home</a>
<a href="docs.html" class="active">Docs</a>
<a href="pricing.html">Pricing</a>
<a href="download.html">Download</a>
<a href="try.html">Try it</a>
<a href="https://github.com/owusurita529-sys/clinstruct-cli" target="_blank" rel="noopener noreferrer">GitHub</a>
</div>
</nav>
</header>
<main>
<section class="section narrow">
<h1>CLI Usage</h1>
<h2 id="testing">Testing / QA</h2>
<p class="muted">Run these commands to confirm Clinstruct-cli works end-to-end (recommended before submission).</p>
<pre class="code-block"><code># Run full test suite
cargo test --all
# One-command smoke test
./scripts/smoke.sh
# Strict fixtures must exit 0
cargo run -- selftest --fixtures tests/fixtures/clean/soap --template soap --strict
cargo run -- selftest --fixtures tests/fixtures/clean/hp --template hp --strict
cargo run -- selftest --fixtures tests/fixtures/clean/discharge --template discharge --strict</code></pre>
<p class="muted"><strong>Note:</strong> Product name is Clinstruct-cli; the CLI command/binary name is <code>clinote</code>.</p>
<pre class="code-block"><code>clinote parse --input note.txt --format soap \
--out out.json --out-format json --bundle auto
clinote batch --input-dir notes --glob "*.txt" \
--format hp --out-dir outputs --out-format csv
clinote sample --out-dir samples --n 6 --bundles 2
clinote validate --config clinote.toml</code></pre>
<h2>CLI Commands</h2>
<pre class="code-block"><code># Validate a note (strict mode + exit code 2 on errors)
clinote validate notes.txt --template soap --strict
# Preview detected sections with line counts
clinote preview notes.txt --template hp
# Selftest a directory (recursive) and export outputs
clinote selftest --fixtures tests/fixtures --template soap --out selftest_outputs
# Selftest with glob + JSON summary
clinote selftest --fixtures "tests/fixtures/*.txt" --template discharge --json</code></pre>
<ul class="doc-list">
<li><strong>Validate strict:</strong> missing required sections are errors (exit code 2). Non-strict treats them as warnings (exit code 0).</li>
<li><strong>Preview:</strong> prints detected sections plus line/character counts.</li>
<li><strong>Selftest:</strong> scans a folder or glob, validates notes, and reports totals + top failures.</li>
</ul>
<h2>Config reference</h2>
<pre class="code-block"><code>[formats.soap]
section_order = ["Subjective", "Objective", "Assessment", "Plan"]
heading_aliases = { "Hx" = "PMH", "Dx" = "Assessment" }
enable_fallback_heuristics = true
[bundle]
mode_default = "auto"
delimiters = ["----- NOTE -----", "=== VISIT ==="]
[csv]
layout = "wide"
glob_default = "*.txt"</code></pre>
<h2>Bundle mode</h2>
<ul class="doc-list">
<li><strong>auto</strong>: split only when delimiters or timestamps appear multiple times.</li>
<li><strong>on</strong>: attempt to split and warn if delimiters are not found.</li>
<li><strong>off</strong>: treat input as a single note.</li>
</ul>
<h2>Interactive mode</h2>
<p>Use <code>--interactive</code> with <code>parse</code> to:</p>
<ul class="doc-list">
<li>Decide whether fallback heuristics should run.</li>
<li>Select which sections to keep.</li>
<li>Rename sections before rendering.</li>
</ul>
<h2>Complex bundles: issues and mitigations</h2>
<ul class="doc-list">
<li>Ambiguous delimiters can cause false splits. Clinstruct-cli logs warnings and keeps the note intact when unsure.</li>
<li>Mixed formats in a single file can map headings to the wrong target sections; interactive mode lets you confirm.</li>
<li>Timestamp-only splits may fail when the same date appears inside a note; auto mode refuses weak splits.</li>
<li>Heuristic headings can misclassify narrative text; you can disable heuristics or drop sections interactively.</li>
</ul>
<h2>Warnings</h2>
<p>Warnings are serialized in JSON output and included in batch reports. They include codes, severity, and line spans.</p>
</section>
</main>
<footer class="footer">
<p>Docs are for the educational release of Clinstruct-cli and rely on synthetic data only.</p>
</footer>
</body>
</html>