TCM Clinic - English Edition
by @slamw
A full-featured management tool for solo Traditional Chinese Medicine (TCM) practitioners. Manages patient records, medical charts (Four Diagnostic Methods,...
clawhub install tcm-clinic-enπ About This Skill
name: tcm-clinic-en description: "A full-featured management tool for solo Traditional Chinese Medicine (TCM) practitioners. Manages patient records, medical charts (Four Diagnostic Methods, pattern differentiation, prescriptions), herbal inventory (stock-in, stocktake, low-stock alerts), appointment scheduling, and financial bookkeeping with statistics. Data stored in Excel format. Use when: the user mentions patients, medical records, prescriptions, herbs, inventory, appointments, scheduling, billing, finances, clinic, consultation fees, or needs day-to-day clinic management. NOT for: academic TCM theory discussions, formula research, or herb pharmacology analysis." requires: binary: - name: python3 python: - openpyxl
TCM Clinic Management System
Overview
This Skill provides lightweight, full-process management for a solo TCM (Traditional Chinese Medicine) practitioner, covering five modules:
| Module | Trigger Words | |--------|---------------| | π₯ Patient Records | new patient, register patient, find patient, search patient | | π Medical Charts | write chart, four examinations, pattern differentiation, prescription, medical history | | πΏ Herbal Inventory | stock in, restock, check inventory, low stock alert, dispense | | π Appointments | appointment, schedule, today's appointments, booking | | π° Finances & Billing | charge, bill, billing, statistics, monthly report, financial report |
All data is stored as structured Excel files in the clinic_data/ directory.
When to Run
Workflow
Decision Router
Route the user's intent to the corresponding module:
User Request
βββ Patient-related? β Patient Management Module
β βββ "new patient" / "register patient" β Create patient record
β βββ "find patient" / "search patient" β Search by name/phone/ID
β βββ "update patient" β Update patient record
β βββ "patient list" / "all patients" β Output patient summary
βββ Medical chart-related? β Medical Records Module
β βββ "write chart" / "new chart" β Add medical record (incl. four examinations, pattern differentiation, prescription)
β βββ "view chart" / "medical history" β Query historical visit records by patient
β βββ "update chart" β Modify existing record
βββ Herb-related? β Herbal Inventory Module
β βββ "stock in" / "restock" / "purchase" β Add new herb or increase stock
β βββ "check inventory" / "herb stock" β Query inventory status
β βββ "low stock" / "out of stock" β Low-stock alert report
β βββ "stock out" / "dispense" β Reduce stock
β βββ "stocktake" / "inventory check" β Generate inventory count sheet
βββ Appointment-related? β Appointment Scheduling Module
β βββ "appointment" / "booking" / "schedule" β Add appointment
β βββ "today's appointments" / "today's patients" β View today's schedule
β βββ "change appointment" / "cancel appointment" β Modify appointment status
βββ Finance-related? β Financial Module
β βββ "charge" / "bill" / "fee" β Add financial record
β βββ "check accounts" / "income" / "transactions" β Query financial records
β βββ "statistics" / "report" / "monthly report" β Generate income statistics
β βββ "patient charges" / "outstanding balance" β Query patient charge summary
βββ Combined request? β Multi-module Workflow
βββ "consultation" β Appointment β Medical Chart β Billing (one-stop)
βββ "clinic report" / "business analysis" β Comprehensive business data report
βββ "today's summary" β Daily summary across all modules
Initialize New Clinic
On first use or when the user requests "initialize", execute:
python3 SKILL_DIR/scripts/clinic_manager.py init
This creates the clinic_data/ directory in the current working directory, containing 5 empty data tables (header rows only).
Script Invocation Convention
Use the bash tool to execute commands in the following format:
python3 SKILL_DIR/scripts/clinic_manager.py [options...]
> SKILL_DIR must be replaced with the actual installation path of the Skill.
> For example: ~/.codebuddy/skills/tcm-clinic or ~/.openclaw/workspace/skills/tcm-clinic
#### Common Commands
# Initialize
python3 SKILL_DIR/scripts/clinic_manager.py initPatient management
python3 SKILL_DIR/scripts/clinic_manager.py patients add --name "John Smith" --gender "Male" --phone "555-0100"
python3 SKILL_DIR/scripts/clinic_manager.py patients search --name "John"
python3 SKILL_DIR/scripts/clinic_manager.py patients listMedical records
python3 SKILL_DIR/scripts/clinic_manager.py records add --patient-id "P20260402001" --complaint "Headache for 3 days" --diagnosis "Wind-cold headache"
python3 SKILL_DIR/scripts/clinic_manager.py records search --patient-id "P20260402001"Herbal inventory
python3 SKILL_DIR/scripts/clinic_manager.py herbs add --name "Astragalus (Huangqi)" --quantity 500 --unit "g" --category "Qi tonic" --purchase-price 0.15 --min-stock 100
python3 SKILL_DIR/scripts/clinic_manager.py herbs update --herb-id "H001" --quantity -50
python3 SKILL_DIR/scripts/clinic_manager.py herbs alerts
python3 SKILL_DIR/scripts/clinic_manager.py herbs listAppointments
python3 SKILL_DIR/scripts/clinic_manager.py appointments add --patient-id "P20260402001" --time-slot "Morning"
python3 SKILL_DIR/scripts/clinic_manager.py appointments todayFinancial statistics
python3 SKILL_DIR/scripts/clinic_manager.py finance add --patient-id "P20260402001" --type "Consultation fee" --amount 50 --payment-method "WeChat Pay"
python3 SKILL_DIR/scripts/clinic_manager.py finance summary --period day
python3 SKILL_DIR/scripts/clinic_manager.py finance summary --period month --month 2026-04
Usage Strategy
Data Operation Principles
1. Pre-use check: Confirm clinic_data/ directory exists; if not, prompt user to initialize
2. Create operations: Auto-generate IDs, validate required fields, append new rows
3. Update operations: Locate target row by ID, update only specified fields
4. Delete operations: Mark as "void" or "cancelled"; no physical deletion
5. Linked updates: When adding a medical record, auto-update patient's last_visit_date and visit_count
One-Stop Consultation Workflow
When the user initiates a "consultation" request, execute in order:
1. Confirm or select patient (choose from existing patients or create new record) 2. Review patient's historical medical chart summary (most recent diagnosis and prescription) 3. Record current visit's four examination findings (inspection, auscultation/olfaction, inquiry, palpation), pattern differentiation, and prescription 4. Calculate fees (consultation fee + herbal cost, etc.) and generate financial record 5. If herbal prescription is involved, auto-deduct corresponding herb stock and check low-stock alerts 6. Output complete summary of this consultation
ID Generation Rules
P + YYYYMMDD + 3-digit sequence (e.g., P20260402001)R + YYYYMMDD + 3-digit sequenceA + YYYYMMDD + 3-digit sequenceF + YYYYMMDD + 3-digit sequenceH + 3-digit sequence (e.g., H001, no date prefix)Data Field Reference
Before performing data operations, read references/data-schema.md for complete field definitions (field name, type, required/optional, value ranges).
Main data tables:
clinic_data/patients.xlsx β Patient information (name, gender, age, contact, constitution type, allergies, etc.)clinic_data/medical_records.xlsx β Medical records (four examination findings, pattern differentiation, prescription, medical advice)clinic_data/herbs_inventory.xlsx β Herbal inventory (herb name, specification, stock quantity, price, expiry date, minimum stock)clinic_data/appointments.xlsx β Appointments (date, time slot, patient, status)clinic_data/finances.xlsx β Financial records (visit ID, fee type, amount, payment method)Output Format
$120.50 or Β₯120.50)YYYY-MM-DD format