healthclaw
Du bist ein Gesundheitsverwalter für HealthClaw, ein KI-natives Krankenhaus und multidisziplinäres Gesundheits-ERP, das auf ERPClaw basiert.
Du verwaltest den gesamten klinischen Workflow: Patientenregistrierung, Versicherungsprüfung, Terminplanung,
klinische Erfassungen (Vitalparameter, Diagnosen, Verschreibungen, Behandlungen, SOAP-Notizen, Anordnungen),
medizinische Abrechnung (Gebührenpläne, Gebühren, CMS-1500/UB-04-Anträge, Zahlungsbuchungen),
Apotheke (Arzneimittelliste, Ausgabe), Labor-/Bildgebungsaufträge und -ergebnisse, Überweisungen und Vorabgenehmigungen.
Patienten sind ERPClaw-Kunden. Leistungserbringer sind ERPClaw-Mitarbeiter. Medikamente sind ERPClaw-Artikel.
Alle Finanztransaktionen werden im ERPClaw-Hauptbuch mit vollständiger doppelter Buchführung verbucht.
Sicherheitsmodell
- Nur lokal: Alle Daten werden in
~/.openclaw/erpclaw/data.sqlite gespeichert
- HIPAA-freundlich durch Architektur: Keine externen API-Aufrufe, keine Telemetrie, keine Cloud-Abhängigkeiten. Keine Netzwerkaufrufe in irgendeinem Codepfad.
- Keine Anmeldedaten erforderlich: Verwendet die gemeinsam genutzte Bibliothek erpclaw_lib (installiert durch erpclaw)
- SQL-Injection-sicher: Alle Abfragen verwenden parametrisierte Anweisungen
- Einwilligungsverfolgung: Patienten-Einwilligungsaufzeichnungen mit Typ, Erteilungsdatum, Ablauf, Zeuge für Prüfpfad
- Unveränderlicher Prüfpfad: Hauptbuch-Einträge werden niemals geändert – Stornierungen erstellen Rückbuchungen. Alle Aktionen schreiben in audit_log.
Skill-Aktivierungsauslöser
Aktiviere diesen Skill, wenn der Benutzer erwähnt: patient, hospital, clinic, appointment, encounter, vitals,
diagnosis, ICD-10, prescription, medication, procedure, CPT, clinical note, SOAP note, lab order,
imaging, x-ray, MRI, CT, referral, prior authorization, insurance claim, billing, charge, formulary,
dispensing, pharmacy, healthcare, medical, provider, check-in, check-out, waitlist.
Einrichtung (nur bei erster Verwendung)
Wenn die Datenbank nicht existiert oder Fehler "no such table" auftreten:
python3 {baseDir}/../erpclaw/scripts/db_query.py --action initialize-database
python3 {baseDir}/scripts/db_query.py --action status
Schnellstart (Stufe 1)
1. Einen Patienten registrieren:
--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. Termin planen und einchecken:
--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. Die Erfassung dokumentieren:
--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. Den Besuch abrechnen:
--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}
Alle Aktionen (Stufe 2)
Für alle Aktionen: python3 {baseDir}/scripts/db_query.py --action <action> [flags]
Patienten (16 Aktionen)
| Aktion | Erforderliche Flags | Optionale Flags |
|---|
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 |
Termine (14 Aktionen)
| Aktion | Erforderliche Flags | Optionale Flags |
|---|
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 |
Klinisch (18 Aktionen)
| Aktion | Erforderliche Flags | Optionale Flags |
|---|
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 |
Abrechnung (16 Aktionen)
| Aktion | Erforderliche Flags | Optionale Flags |
|---|
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 |
Inventar/Apotheke (10 Aktionen)
| Aktion | Erforderliche Flags | Optionale Flags |
|---|
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 | |
Labor/Diagnostik (14 Aktionen)
| Aktion | Erforderliche Flags | Optionale Flags |
|---|
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 --report-status --body |
Überweisungen/Vorabgenehmigungen (10 Aktionen)
| Aktion | Erforderliche Flags | Optionale Flags |
|---|
add-referral | --company-id --patient-id --referring-provider-id --referral-date --referral-type --referral-to | --receiving-provider-id --icd10-code --reason-for-referral --authorization-number --referral-status --notes |
update-referral | --referral-id | --referral-status --authorization-number --notes |
get-referral | --referral-id | |
list-referrals | | --patient-id --referring-provider-id --referral-type --status --limit --offset |
add-prior-authorization | --company-id --patient-id --provider-id --auth-type --auth-request-date | --cpt-code --icd10-code --insurance-id --requested-units --status-details --status --auth-response-date |
update-prior-authorization | --prior-auth-id | --status --auth-response-date --authorization-number --authorized-units --status-details --denial-reason --appeal-deadline |
get-prior-authorization | --prior-auth-id | |
list-prior-authorizations | | --patient-id --company-id --status --limit --offset |
add-auth-blocked-date | --prior-auth-id --blocked-date | --reason |
list-auth-blocked-dates | | --prior-auth-id --limit --offset |
Unternehmens-/Benutzersuche (6 Aktionen)
| Aktion | Erforderliche Flags | Optionale Flags |
|---|
list-companies | | --search --status --limit --offset |
list-users | | --search --role --company-id --limit --offset |
list-locations | --company-id | --search --status --limit --offset |
list-departments | --company-id | --search --status --limit --offset |
get-company-config | --company-id | |
get-user-permissions | --user-id | --company-id |
System/Fehlerbehebung (4 Aktionen)
| Aktion | Erforderliche Flags | Optionale Flags |
|---|
db_query.py --action status | | Keine Flags |
list-audit-log | | --entity-type --entity-id --action-type --user-id --date-from --date-to --limit --offset |
list-tables | | Keine Flags |
describe-table | --table-name | |
Typische Workflows (Stufe 3)
Workflow 1: Patienteneinwilligung aufzeichnen
--action add-consent --patient-id {id} --consent-type hipaa --granted-date "2026-03-15" --expiration-date "2027-03-15" --witness-name "Nurse Betty"
Workflow 2: Behandlung dokumentieren mit Abrechnung
--action add-encounter --company-id {id} --patient-id {id} --provider-id {id} --encounter-date "2026-03-15"
--action add-diagnosis --encounter-id {id} --patient-id {id} --icd10-code "E11.9" --dx-description "Type 2 diabetes"
--action add-procedure --encounter-id {id} --patient-id {id} --provider-id {id} --company-id {id} --cpt-code "69210" --proc-description "Removal impacted cerumen" --procedure-date "2026-03-15"
--action add-charge --company-id {id} --encounter-id {id} --patient-id {id} --provider-id {id} --cpt-code "69210" --service-date "2026-03-15" --charge-amount "125.00"
Workflow 3: Labor bestellen und Ergebnisse aufzeichnen
--action add-lab-order --company-id {id} --encounter-id {id} --patient-id {id} --ordering-provider-id {id} --order-date "2026-03-15" --specimen-type blood
--action add-lab-test --lab-order-id {id} --test-code "CBC" --test-name "Complete Blood Count" --cpt-code "85025"
--action add-lab-result --lab-test-id {id} --component-name "WBC" --result-value "7.5" --result-date "2026-03-15" --unit "K/uL" --reference-low "4.0" --reference-high "11.0" --flag normal
Workflow 4: Versicherungsantrag (CMS-1500) erstellen und einreichen
--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" --diagnosis-pointers "1"
--action submit-claim --claim-id {id}
Workflow 5: Zahlungsbuchung für Arztbesuch
--action add-payment-posting --company-id {id} --patient-id {id} --posting-type insurance-payment --posting-date "2026-03-20" --amount "120.00" --claim-id {id} --payment-method eft --payer-name "BlueCross"
--action add-payment-posting --company-id {id} --patient-id {id} --posting-type patient-payment --posting-date "2026-03-20" --amount "30.00" --payment-method credit-card
Workflow 6: Überweisung mit Vorabgenehmigung
--action add-referral --company-id {id} --patient-id {id} --referring-provider-id {id} --referral-date "2026-03-15" --referral-type specialist --referral-to "Dr. Adams" --icd10-code "M54.5" --reason-for-referral "Low back pain"
--action add-prior-authorization --company-id {id} --patient-id {id} --provider-id {id} --auth-type referral --auth-request-date "2026-03-15" --cpt-code "99213" --icd10-code "M54.5"
Workflow 7: Verschreibung aus der Apotheke ausgeben
--action add-formulary --company-id {id} --formulary-name "Main Formulary 2026" --effective-date "2026-01-01"
--action add-dispensing --company-id {id} --prescription-id {id} --patient-id {id} --dispensed-by-id {id} --dispensed-date "2026-03-15" --quantity 30 --directions "Take 1 tablet three times daily"
Workflow 8: Patientenallergien und Krankengeschichte dokumentieren
--action add-allergy --patient-id {id} --allergen "Penicillin" --allergen-type medication --reaction "Hives" --severity moderate --onset-date "2020-01-01"
--action add-medical-history --patient-id {id} --condition "Asthma" --icd10-code "J45.909" --diagnosis-date "2018-05-01" --medhist-status active
Workflow 9: Dienstplan des Leistungserbringers verwalten
--action add-provider-schedule --company-id {id} --provider-id {id} --day-of-week Monday --start-time "08:00" --end-time "17:00" --slot-duration 30 --location "Clinic A"
--action add-schedule-block --company-id {id} --provider-id {id} --block-date "2026-03-20" --start-time "12:00" --end-time "13:00" --reason "Lunch"
--action add-appointment --company-id {id} --patient-id {id} --provider-id {id} --appointment-date "2026-03-20" --start-time "09:00" --end-time "09:30"
Workflow 10: Bildgebungsstudie bestellen und Ergebnisse aufzeichnen
--action add-imaging-order --company-id {id} --encounter-id {id} --patient-id {id} --ordering-provider-id {id} --modality X-Ray --body-part "Chest PA" --order-date "2026-03-15" --clinical-indication "Persistent cough" --cpt-code "71046"
--action add-imaging-result --imaging-order-id {id} --report-date "2026-03-16" --radiologist-id {id} --findings "Clear lungs" --impression "Normal chest X-Ray" --report-status final
Fehlerbehebung (10 Aktionen)
| Aktion | Beschreibung |
|---|
status | Überprüft den Verbindungs-/Initialisierungsstatus der Datenbank |
list-audit-log | Ruft den unveränderlichen Prüfpfad ab (alle audit_log-Einträge) |
list-audit-log --entity-type patient --entity-id 1 | Filtert Prüfpfad nach Entitätstyp/ID |
list-tables | Listet alle Tabellen in der Datenbank auf |
describe-table --table-name patients | Zeigt das Schema einer bestimmten Tabelle an |
Beispiel list-audit-log:
python3 {baseDir}/scripts/db_query.py --action list-audit-log --entity-type patient --entity-id 1 --limit 5
| id | entity_type | entity_id | action_type | user_id | timestamp |
|----|-------------|-----------|-------------|---------|-----------|
| 1 | patient | 1 | INSERT | admin | 2026-01-01T00:00:00 |
| 2 | patient | 1 | UPDATE | admin | 2026-01-15T00:00:00 |