fhir-questionnaire
by elmariachi111
Coding Agents & IDEsBrief
Helps creating FHIR conforming questionnaire definitions from plain requirement ideation docs.
Description
What This Skill Does
Converts plain-language clinical requirement documents into FHIR-conformant questionnaire definitions. Uses scripts to query official LOINC and SNOMED CT terminology APIs for validated clinical codes. Supports standardized instruments like PHQ-9 and GAD-7 as well as custom organizational questionnaires.
Queries live official terminology APIs instead of relying on model memory, which eliminates the risk of hallucinated LOINC or SNOMED CT codes in clinical documentation.
When to Use It
- Converting intake form specs into FHIR Questionnaire JSON
- Implementing PHQ-9 or GAD-7 screening instruments with correct LOINC codes
- Looking up SNOMED CT codes for conditions, procedures, and clinical findings
- Adding conditional display logic and repeating groups to clinical forms
- Validating FHIR questionnaire structure before EHR integration
Example Workflow
User asks: Create a FHIR questionnaire for PHQ-9 depression screening
- 1
Run search_loinc.py 'PHQ-9 panel' to find the panel LOINC code
- 2
Run query_valueset.py with the returned code to retrieve standardized answer options
- 3
Copy assets/templates/advanced.json as the base structure
- 4
Populate questionnaire items with retrieved LOINC codes and answer value sets
- 5
Run validate_questionnaire.py to confirm structure before finalizing
A validated FHIR Questionnaire JSON file with correct LOINC codes and standardized answer lists for all nine PHQ-9 items
Installation
clawhub install elmariachi111/fhir-questionnaireRun the CLI command, or paste the prompt into Claude Code, Cursor, Codex or whichever coding agent you use.