File size: 2,836 Bytes
612e777
5a79992
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
612e777
5a79992
 
612e777
5a79992
 
 
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
<article class="doc" id="doc-modules-scheduling" aria-hidden="true"><div class="strip"><span class="path">modules/scheduling.md</span><span class="tag">Engineering, modules</span><span class="meta">~1 min read</span></div>
<h1>Module: <code>scheduling</code></h1>
<blockquote>
<p>Part of the Travi AI Agent monolith (<code>app/modules/scheduling/</code>). Read <code>00-overview.md</code> §3 (hard rules) before changing anything here.</p>
</blockquote>
<div class="tbl-wrap"><table class="plain col-table compact"><colgroup><col class="col-auto"/><col class="col-lg"/></colgroup>
<thead>
<tr>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td data-label=""><strong>Purpose</strong></td>
<td data-label="">Follow-up <em>needs</em> (appointment_requirement) vs actual <em>appointments</em>, matched so patients are never double-prompted; assisted booking; EHR result auto-completion.</td>
</tr>
<tr>
<td data-label=""><strong>Owns (data)</strong></td>
<td data-label="">appointment_requirement, appointment</td>
</tr>
<tr>
<td data-label=""><strong>Public surface</strong></td>
<td data-label=""><code>/appointments</code>, <code>/appointments/assist</code></td>
</tr>
<tr>
<td data-label=""><strong>Depends on</strong></td>
<td data-label="">ehr_adapter (slots/results, sponsoring system only), agents (appointment agent), episode</td>
</tr>
<tr>
<td data-label=""><strong>Requirements owned</strong></td>
<td data-label="">APT-001/004/010</td>
</tr>
<tr>
<td data-label=""><strong>Constraining ADRs</strong></td>
<td data-label="">ADR-007</td>
</tr>
<tr>
<td data-label=""><strong>Key references</strong></td>
<td data-label="">reference/api.md</td>
</tr>
</tbody>
</table></div>
<hr/>
<h2 id="doc-modules-scheduling--h1">Rules that must never break</h2>
<ol>
<li><strong>Requirement ≠ appointment (APT-001).</strong> An existing or patient-reported appointment that satisfies a requirement marks it <code>satisfied</code>, no duplicate scheduling prompts, no false completion of the underlying clinical need.</li>
<li><strong>Assisted flow (APT-004).</strong> The patient never re-enters known demographics; the request is submitted with stored data and tracked as a task.</li>
<li><strong>Booking authority.</strong> The appointment agent may search and present options; booking/cancelling requires an explicit patient authorization event, and inventing availability is prohibited (envelope-enforced).</li>
<li><strong>Auto-close (APT-010).</strong> A completed result arriving from the sponsoring EHR closes the test task with <code>evidence_class=ehr</code>, no patient action requested.</li>
<li><strong>Scope.</strong> External (out-of-network) booking APIs are excluded from MVP; the assisted flow is the fallback.</li>
</ol>
<div class="pn"><a class="pn-prev" href="#"></a><a class="pn-next" href="#"></a></div></article>