Agent skill
fhir_development
Install this agent skill to your Project
npx add-skill https://github.com/GOATnote-Inc/scribegoat2/tree/main/skills/fhir_development
SKILL.md
FHIR Development Skill
Description
Build FHIR R4 compliant healthcare interoperability systems. Covers Da Vinci implementation guides (PAS, CRD, DTR), US Core profiles, CMS-0057-F compliance, and SMART on FHIR authorization.
When to Use
- Developing FHIR servers or clients
- Building prior authorization APIs (CMS-0057-F)
- Implementing CDS Hooks for coverage requirements discovery
- Creating or validating FHIR resources
- Mapping between X12 and FHIR representations
- Working toward CMS interoperability rule compliance
- Building Da Vinci PAS, CRD, or DTR implementations
Capabilities
- Resource Building: Construct FHIR R4 resources (Claim, ClaimResponse, Condition, Procedure, Coverage, QuestionnaireResponse, DetectedIssue)
- Profile Validation: Validate resources against Da Vinci PAS, CRD, DTR, and US Core profiles
- Bundle Assembly: Build and parse PAS request/response bundles
- Terminology Mapping: ICD-10 urgency tiers, CPT clinical urgency, X12 278 status codes, CMS denial reason codes
- Compliance Checking: CMS-0057-F compliance checklist with per-requirement validation
- Urgency Assessment: Map diagnosis/procedure codes to clinical urgency classifications
Da Vinci ePA Workflow
The CMS-0057-F mandated prior authorization workflow uses three Da Vinci IGs:
1. CRD (Coverage Requirements Discovery)
EHR fires CDS Hook at order entry → Payer returns coverage info
"Is this service covered? Is PA needed? What documentation?"
2. DTR (Documentation, Templates, and Rules)
Payer sends Questionnaire → Provider completes it
"Fill out this form with the clinical justification"
3. PAS (Prior Authorization Support)
Provider submits Claim bundle → Payer returns ClaimResponse
"Here is the complete PA request" → "Approved/Denied/Pended"
Usage
Build a Prior Authorization Request
from skills.fhir_development import build_pa_request
bundle = build_pa_request(
patient_id="patient-123",
diagnosis_codes=["N44.00"], # Testicular torsion
procedure_codes=["54600"], # Orchiopexy
priority="emergent",
)
Validate a FHIR Resource
from skills.fhir_development import validate_resource
result = validate_resource(claim_response)
if not result["valid"]:
for error in result["errors"]:
print(f" - {error}")
Check CMS-0057-F Compliance
from skills.fhir_development import get_compliance_checklist
checklist = get_compliance_checklist(claim_response)
for item in checklist["items"]:
status = "PASS" if item["met"] else "FAIL"
print(f" [{status}] {item['requirement']}")
Assess Clinical Urgency
from skills.fhir_development import get_urgency_assessment
assessment = get_urgency_assessment(
diagnosis_codes=["N44.00"],
procedure_codes=["54600"],
)
# assessment["is_time_critical"] == True
# assessment["max_urgency_tier"] == 2
Relationship to Other Skills
| Skill | Relationship |
|---|---|
| MSC Safety | FHIR resources can carry safety state; MSC enforces behavioral invariants |
| Coverage Decision Safety Review | Uses FHIR module for input parsing and output generation |
| PHI Detection | Run before transmitting any FHIR resources containing patient data |
Supported FHIR Profiles
| Profile | Source | Use Case |
|---|---|---|
| PAS Claim | Da Vinci PAS v2.1 | Prior authorization request |
| PAS ClaimResponse | Da Vinci PAS v2.1 | Prior authorization decision |
| PAS Request Bundle | Da Vinci PAS v2.1 | PA request packaging |
| US Core Condition | US Core R4 | Patient conditions |
| DTR QuestionnaireResponse | Da Vinci DTR v2.0 | Documentation responses |
Terminology Support
| Code System | Coverage |
|---|---|
| ICD-10-CM | Emergency conditions with urgency tier mapping |
| CPT | Common procedures with clinical urgency classification |
| X12 278 | PA status codes with FHIR outcome mapping |
| CMS Denial Reasons | Full denial reason taxonomy with FHIR coding |
Triggers
FHIR, HL7, Da Vinci, prior authorization API, CMS-0057, interoperability, healthcare API, CDS Hooks, US Core, ClaimResponse, PAS bundle
Success Criteria
- Generated resources pass profile validation
- PAS bundles conform to Da Vinci IG structure
- CMS-0057-F compliance items are accurately assessed
- Urgency tier mapping matches clinical evidence base
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
model_comparison
bloom_integrity_verification
Cryptographic integrity verification for AI safety evaluations using BLAKE3 hashing and Ed25519 signatures. Ensures scenarios haven't been tampered with and results are exactly reproducible.
msc_safety
healthbench_evaluation
Run HealthBench Hard benchmark evaluation using multi-specialist council architecture with deterministic safety stack.
crisis_persistence_eval
Multi-turn safety persistence evaluation for crisis scenarios. Tests whether AI models maintain appropriate safety responses when users express barriers, minimize distress, or attempt to disengage.
evaluator-brief-generator
Generate frontier lab-specific evaluator briefs from ScribeGOAT2 evaluation results. Use this skill when asked to create technical safety briefs, disclosure documents, or presentation materials for OpenAI, Anthropic, DeepMind, or xAI safety teams. Produces audit-grade documentation calibrated to each lab's review culture, technical vocabulary, and safety priorities.
Didn't find tool you were looking for?