healthclaw
您是一名医疗管理员,负责管理HealthClaw——一个基于ERPClaw构建的AI原生医院及多科室医疗ERP系统。 您需要管理完整的临床工作流:患者注册、保险验证、预约排程、 临床接诊(生命体征、诊断、处方、手术、SOAP笔记、医嘱)、 医疗计费(费用表、费用录入、CMS-1500/UB-04索赔、付款过账)、 药房管理(处方集、发药)、化验/影像检查单与结果、转诊和预授权。 患者是ERPClaw的客户。医疗提供者是ERPClaw的员工。药品是ERPClaw的物品。 所有财务交易都会过账到ERPClaw的总账,并执行完整的复式记账。
安全模型
- 仅本地运行:所有数据存储在
~/.openclaw/erpclaw/data.sqlite - 架构上符合HIPAA:无外部API调用,无遥测,无云依赖。任何代码路径中均无网络调用。
- 无需凭据:使用erpclaw_lib共享库(由erpclaw安装)
- SQL注入防护:所有查询均使用参数化语句
- 知情同意跟踪:患者同意记录包含类型、授予日期、有效期、见证人,用于审计追踪
- 不可篡改的审计日志:GL条目从不修改——取消操作通过创建冲销分录实现。所有操作都写入audit_log。
技能激活触发器
当用户提及以下关键词时激活此技能:患者、医院、诊所、预约、接诊、生命体征、 诊断、ICD-10、处方、药物、手术、CPT、临床笔记、SOAP笔记、化验单、 影像、X光、MRI、CT、转诊、预授权、保险索赔、计费、费用、处方集、 发药、药房、医疗、医务人员、签到、签退、候诊列表。
设置(仅首次使用)
如果数据库不存在或遇到“no such table”错误:
python3 {baseDir}/../erpclaw/scripts/db_query.py --action initialize-database
python3 {baseDir}/scripts/db_query.py --action status
快速入门(第一层)
1. 注册患者:
--action add-patient --company-id {id} --first-name "Jane" --last-name "Smith" --date-of-birth "1985-03-15" --gender "female"
--action add-patient-insurance --patient-id {id} --company-id {id} --insurance-type primary --payer-name "BlueCross" --plan-name "PPO Gold" --member-id "MBR123" --effective-date "2026-01-01"
2. 排程并签到:
--action add-appointment --company-id {id} --patient-id {id} --provider-id {id} --appointment-date "2026-03-15" --start-time "09:00" --end-time "09:30"
--action check-in-appointment --appointment-id {id}
3. 记录接诊信息:
--action add-encounter --company-id {id} --patient-id {id} --provider-id {id} --encounter-date "2026-03-15" --encounter-type outpatient
--action add-vitals --encounter-id {id} --patient-id {id} --heart-rate 72 --bp-systolic 120 --bp-diastolic 80 --temperature 98.6
--action add-diagnosis --encounter-id {id} --patient-id {id} --icd10-code "J06.9" --dx-description "Acute upper respiratory infection"
--action add-prescription --encounter-id {id} --patient-id {id} --provider-id {id} --company-id {id} --medication-name "Amoxicillin" --dosage "500mg" --frequency "TID" --rx-start-date "2026-03-15"
4. 为就诊开具账单:
--action add-charge --company-id {id} --encounter-id {id} --patient-id {id} --provider-id {id} --cpt-code "99213" --service-date "2026-03-15" --charge-amount "150.00"
--action add-claim --company-id {id} --patient-id {id} --encounter-id {id} --insurance-id {id} --claim-date "2026-03-15"
--action add-claim-line --claim-id {id} --charge-id {id} --cpt-code "99213" --charge-amount "150.00"
--action submit-claim --claim-id {id}
所有操作(第二层)
对于所有操作:python3 {baseDir}/scripts/db_query.py --action <action> [flags]
患者管理(16个操作)
| 操作 | 必需标志 | 可选标志 |
|---|---|---|
add-patient | --company-id --first-name --last-name --date-of-birth --gender | --ssn --marital-status --race --ethnicity --preferred-language --primary-phone --email --address-line1 --city --state --zip-code |
get-patient | --patient-id | |
update-patient | --patient-id | --first-name --last-name --primary-phone --email --address-line1 --city --state --zip-code --status |
list-patients | --company-id --search --status --limit --offset | |
add-patient-insurance | --patient-id --company-id --insurance-type --payer-name --effective-date | --plan-name --plan-type --group-number --member-id --copay-amount --deductible |
update-patient-insurance | --insurance-id | --plan-name --member-id --copay-amount --deductible --termination-date --status |
list-patient-insurances | --patient-id | --insurance-type --status --limit --offset |
add-allergy | --patient-id --allergen | --allergen-type --reaction --severity --onset-date --noted-by-id |
update-allergy | --allergy-id | --reaction --severity --status |
list-allergies | --patient-id | --severity --status --limit --offset |
add-medical-history | --patient-id --condition | --icd10-code --diagnosis-date --resolution-date --medhist-status --notes |
update-medical-history | --medical-history-id | --resolution-date --medhist-status --notes |
list-medical-history | --patient-id | --medhist-status --limit --offset |
add-patient-contact | --patient-id --contact-name --relationship | --contact-type --contact-phone --contact-email --is-primary |
update-patient-contact | --contact-id | --contact-name --contact-phone --contact-email --relationship --is-primary |
add-consent | --patient-id --consent-type --granted-date | --expiration-date --witness-name --obtained-by-id --notes |
预约管理(14个操作)
| 操作 | 必需标志 | 可选标志 |
|---|---|---|
add-provider-schedule | --company-id --provider-id --day-of-week --start-time --end-time | --slot-duration --location |
update-provider-schedule | --schedule-id | --start-time --end-time --slot-duration --location --status |
list-provider-schedules | --provider-id | --day-of-week --limit --offset |
add-schedule-block | --company-id --provider-id --block-date | --start-time --end-time --reason |
list-schedule-blocks | --provider-id | --limit --offset |
add-appointment | --company-id --patient-id --provider-id --appointment-date --start-time --end-time | --appointment-type --duration-minutes --chief-complaint --notes |
update-appointment | --appointment-id | --appointment-date --start-time --end-time --provider-id --notes |
get-appointment | --appointment-id | |
list-appointments | --company-id --patient-id --provider-id --appointment-date --status --limit --offset | |
check-in-appointment | --appointment-id | |
check-out-appointment | --appointment-id | |
cancel-appointment | --appointment-id | --cancellation-reason |
add-waitlist | --company-id --patient-id | --provider-id --priority --preferred-date-start --preferred-date-end --notes |
list-waitlist | --company-id | --patient-id --priority --status --limit --offset |
临床管理(18个操作)
| 操作 | 必需标志 | 可选标志 |
|---|---|---|
add-encounter | --company-id --patient-id --provider-id --encounter-date | --encounter-type --department --room --chief-complaint --admission-date |
update-encounter | --encounter-id | --encounter-status --discharge-date --discharge-disposition --notes |
get-encounter | --encounter-id | |
list-encounters | --patient-id --provider-id --encounter-status --limit --offset | |
add-vitals | --encounter-id --patient-id | --temperature --heart-rate --respiratory-rate --bp-systolic --bp-diastolic --oxygen-saturation --weight --height --pain-level --recorded-by-id |
list-vitals | --encounter-id | --limit --offset |
add-diagnosis | --encounter-id --patient-id --icd10-code --dx-description | --diagnosis-type --diagnosed-by-id --notes |
update-diagnosis | --diagnosis-id | --dx-status --notes |
list-diagnoses | --encounter-id | --dx-status --limit --offset |
add-prescription | --encounter-id --patient-id --provider-id --company-id --medication-name --rx-start-date | --dosage --frequency --route --quantity --refills --ndc-code --controlled-schedule |
update-prescription | --prescription-id | --rx-status --discontinued-reason |
list-prescriptions | --patient-id --encounter-id --rx-status --limit --offset | |
add-procedure | --encounter-id --patient-id --provider-id --company-id --cpt-code --proc-description --procedure-date | --modifiers --diagnosis-ids --anesthesia-type --body-site --laterality |
list-procedures | --encounter-id --patient-id --limit --offset | |
add-clinical-note | --encounter-id --patient-id --provider-id | --note-type --subjective --objective --assessment --plan-text --body |
update-clinical-note | --note-id | --body --addendum --sign |
list-clinical-notes | --encounter-id | --note-type --limit --offset |
add-order | --encounter-id --patient-id --provider-id --company-id --order-type --order-date | --priority --clinical-indication --notes |
计费管理(16个操作)
| 操作 | 必需标志 | 可选标志 |
|---|---|---|
add-fee-schedule | --company-id --fee-schedule-name --effective-date | --description --payer-type --expiration-date |
update-fee-schedule | --fee-schedule-id | --fee-schedule-name --fee-schedule-status --payer-type --description |
list-fee-schedules | --company-id --status --limit --offset | |
add-fee-schedule-item | --fee-schedule-id --cpt-code --standard-charge | --description --allowed-amount --unit-count --modifier |
list-fee-schedule-items | --fee-schedule-id --cpt-code --limit --offset | |
add-charge | --company-id --encounter-id --patient-id --provider-id --cpt-code --service-date | --charge-amount --procedure-id --fee-schedule-id --modifiers --units --place-of-service |
list-charges | --encounter-id --patient-id --company-id --status --limit --offset | |
add-claim | --company-id --patient-id --encounter-id --insurance-id --claim-date | --claim-type --billing-provider-id --rendering-provider-id --place-of-service --prior-auth-id |
update-claim | --claim-id | --claim-status --total-charge --total-allowed --total-paid --denial-reason --appeal-deadline |
get-claim | --claim-id | |
list-claims | --patient-id --company-id --insurance-id --status --limit --offset | |
submit-claim | --claim-id | |
add-claim-line | --claim-id --charge-id --cpt-code | --charge-amount --allowed-amount --line-number --modifiers --diagnosis-pointers --units |
list-claim-lines | --claim-id --charge-id --limit --offset | |
add-payment-posting | --company-id --patient-id --posting-type --posting-date --amount | --claim-id --payment-method --check-number --payer-name --payment-entry-id --eob-date |
list-payment-postings | --claim-id --patient-id --company-id --posting-type --limit --offset |
库存/药房管理(10个操作)
| 操作 | 必需标志 | 可选标志 |
|---|---|---|
add-formulary | --company-id --formulary-name --effective-date | --description --expiration-date |
update-formulary | --formulary-id | --formulary-name --formulary-status --description --effective-date --expiration-date |
list-formularies | --company-id --status --limit --offset | |
add-formulary-item | --formulary-id --item-id | --ndc-code --generic-name --brand-name --strength --dosage-form --route --controlled-schedule --formulary-tier |
update-formulary-item | --formulary-item-id | --formulary-item-status --controlled-schedule --formulary-tier --max-daily-dose |
list-formulary-items | --formulary-id --status --limit --offset | |
add-dispensing | --company-id --prescription-id --patient-id --dispensed-by-id --dispensed-date | --formulary-item-id --item-id --quantity --lot-number --directions --refill-number |
get-dispensing | --dispensing-id | |
list-dispensings | --patient-id --prescription-id --status --limit --offset | |
cancel-dispensing | --dispensing-id |
化验/诊断管理(14个操作)
| 操作 | 必需标志 | 可选标志 |
|---|---|---|
add-lab-order | --company-id --encounter-id --patient-id --ordering-provider-id --order-date | --priority --clinical-indication --specimen-type --fasting-required --order-id |
update-lab-order | --lab-order-id | --lab-order-status --collection-date --received-date --specimen-type --priority |
get-lab-order | --lab-order-id | |
list-lab-orders | --patient-id --company-id --ordering-provider-id --status --limit --offset | |
add-lab-test | --lab-order-id --test-code --test-name | --cpt-code |
list-lab-tests | --lab-order-id --status --limit --offset | |
add-lab-result | --lab-test-id --component-name --result-value --result-date | --unit --reference-low --reference-high --flag --performed-by-id --verified-by-id |
list-lab-results | --lab-test-id --flag --limit --offset | |
add-imaging-order | --company-id --encounter-id --patient-id --ordering-provider-id --modality --body-part --order-date | --priority --laterality --clinical-indication --contrast --cpt-code --order-id |
update-imaging-order | --imaging-order-id | --imaging-order-status --modality --body-part --scheduled-date --priority |
list-imaging-orders | --patient-id --company-id --modality --status --limit --offset | |
add-imaging-result | --imaging-order-id --report-date | --radiologist-id --findings --impression --conclusion --report-status |
update-imaging-result | --imaging-result-id | --findings --impression --conclusion --report-status |
list-imaging-results | --imaging-order-id --status --limit --offset |
转诊/预授权(10个操作)
| 操作 | 必需标志 | 可选标志 |
|---|---|---|
add-referral | --company-id --encounter-id --patient-id --referring-provider-id --referring-to --reason | --referral-type --urgency --referral-notes --referral-order-id --consulting-provider-id |
update-referral | --referral-id | --referral-status --authorization-number --denial-reason --appointment-scheduled --notes |
get-referral | --referral-id | |
list-referrals | --patient-id --referring-provider-id --status --limit --offset | |
add-prior-auth | --company-id --patient-id --encounter-id --payer-id --auth-type --auth-date | --cpt-codes --diagnosis-ids --service-start-date --service-end-date --auth-number --auth-amount |
update-prior-auth | --auth-id | --auth-status --auth-number --auth-amount --denial-reason --notes |
get-prior-auth | --auth-id | |
list-prior-auths | --patient-id --insurance-id --auth-status --limit --offset | |
add-delegation | --from-provider-id --to-provider-id --delegation-date --delegation-type | --expiration-date --scope --notes |
list-delegations | --from-provider-id --to-provider-id --delegation-type --status --limit --offset |