Skip to content

Add list_care_team and list_implants read tools#1

Merged
hugooc merged 1 commit into
mainfrom
add-care-team-and-implants-tools
May 26, 2026
Merged

Add list_care_team and list_implants read tools#1
hugooc merged 1 commit into
mainfrom
add-care-team-and-implants-tools

Conversation

@hugooc
Copy link
Copy Markdown
Owner

@hugooc hugooc commented May 26, 2026

Two new read tools, both built from existing complete-body HAR captures (no fresh capture needed).

list_care_team

The home-page "Care Team and Recent Providers" roster — PCP, specialists, recently-seen clinicians — each with specialty, relationship label, and per-provider capability flags. A strict superset of get_profile, which only surfaces the PCP.

  • Legacy /mychartcn/Clinical/CareTeam/Load + LoadExternal family. One CSRF token covers both POSTs; the external-providers call is best-effort (a failure there still returns the internal roster).
  • can_message is not reachability. It mirrors the care-team panel's inline quick-message button, which Kaiser can leave off for providers you can still message via the separate list_message_recipients + send_message surface. Documented in the tool docstring, model comment, and endpoint doc so an LLM doesn't over-conclude "unreachable."

list_implants

Implanted/explanted devices (pacemakers, ICDs, leads, intraocular lenses, ortho hardware) with manufacturer, model, serial, UDI/SDI, body area, laterality, status, and the implant/explant procedure.

  • Single CSRF-gated POST to /mychartcn/api/implants/GetImplants, no pagination.
  • implantGroupList is a body-area ordering index ("zzz" = Epic's sort-unknown-last sentinel); device detail lives in implantList.
  • isoDate is a display-string misnomer, so date_iso is derived alongside it.
  • A device can appear twice (a curated record plus a raw device-feed record, same serial). Returned faithfully — not deduped — so a thin substrate doesn't hide data; callers reconcile on (serial, date_iso).

Verification

  • Both tools live-verified against the real portal.
  • 567 tests passing (was 527), ruff + mypy clean. CI runs ruff + mypy + pytest on 3.11/3.12/3.13.

🤖 Generated with Claude Code

Two new read tools, both built from existing complete-body HAR captures
(no fresh capture needed).

list_care_team: the home-page "Care Team and Recent Providers" roster
(PCP, specialists, recent clinicians) with specialty, relationship, and
per-provider capability flags. Legacy /mychartcn/Clinical/CareTeam/Load
+ LoadExternal; one CSRF token covers both POSTs, external is best-effort.
can_message reflects only the panel's inline button, not reachability;
documented so callers route messaging through list_message_recipients.

list_implants: implanted/explanted devices (pacemakers, ICDs, leads,
IOLs, ortho hardware) with manufacturer, model, serial, UDI/SDI, area,
laterality, status, and implant/explant procedure. Single CSRF-gated
POST to /mychartcn/api/implants/GetImplants. Group list is a body-area
ordering index ("zzz" = sort-unknown-last sentinel); detail lives in
implantList. isoDate is a display-string misnomer, so date_iso is
derived. Devices can appear twice (curated + raw feed record, same
serial); returned faithfully, not deduped.

567 tests passing, ruff + mypy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hugooc hugooc merged commit f175b79 into main May 26, 2026
3 checks passed
@hugooc hugooc deleted the add-care-team-and-implants-tools branch May 26, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant