# Send FHIR Questionnaire Designer to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "fhir-questionnaire",
    "name": "FHIR Questionnaire Designer",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/elmariachi111/fhir-questionnaire",
    "canonicalUrl": "https://clawhub.ai/elmariachi111/fhir-questionnaire",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/fhir-questionnaire",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=fhir-questionnaire",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "REFERENCE.md",
      "SKILL.md",
      "assets/templates/CodeSystem-example.json",
      "assets/templates/ValueSet-example.json",
      "assets/templates/advanced.json",
      "assets/templates/basic.json"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "fhir-questionnaire",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-29T21:30:44.941Z",
      "expiresAt": "2026-05-06T21:30:44.941Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=fhir-questionnaire",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=fhir-questionnaire",
        "contentDisposition": "attachment; filename=\"fhir-questionnaire-0.2.4.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "fhir-questionnaire"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/fhir-questionnaire"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/fhir-questionnaire",
    "downloadUrl": "https://openagent3.xyz/downloads/fhir-questionnaire",
    "agentUrl": "https://openagent3.xyz/skills/fhir-questionnaire/agent",
    "manifestUrl": "https://openagent3.xyz/skills/fhir-questionnaire/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/fhir-questionnaire/agent.md"
  }
}
```
## Documentation

### ⚠️ CRITICAL RULES - READ FIRST

NEVER suggest LOINC or SNOMED CT codes from memory or training data. ALWAYS use the search and query scripts in this skill.

When any clinical code is needed:

For clinical questions/observations: ALWAYS run python scripts/search_loinc.py "search term" FIRST
For clinical concepts/conditions: ALWAYS run python scripts/search_snomed.py "search term" FIRST
ONLY use codes returned by the scripts
If search fails or returns no results, DO NOT make up codes

Clinical codes from AI memory are highly unreliable and will cause incorrect clinical coding.

### Network Access Requirements

Requires whitelisted network access:

clinicaltables.nlm.nih.gov (LOINC search)
tx.fhir.org (FHIR terminology server for LOINC answer lists and SNOMED CT search)

If network access fails, STOP. Do not suggest codes.

### 1. Search LOINC Codes

ALWAYS run this before suggesting any LOINC code (clinical questions/observations):

python scripts/search_loinc.py "depression screening"
python scripts/search_loinc.py "blood pressure" --format fhir

### 2. Search SNOMED CT Codes

ALWAYS run this before suggesting any SNOMED CT code (clinical concepts/conditions):

python scripts/search_snomed.py "diabetes"
python scripts/search_snomed.py "hypertension" --format fhir
python scripts/search_snomed.py "diabetes mellitus" --semantic-tag "disorder"

Note: The --semantic-tag filter works best when the semantic tag appears in the display name (e.g., "Diabetes mellitus (disorder)").

### 3. Find Answer Options

For questions with standardized answers:

python scripts/query_valueset.py --loinc-code "72166-2"
python scripts/query_valueset.py --loinc-code "72166-2" --format fhir

### 4. Validate Questionnaire

Before finalizing:

python scripts/validate_questionnaire.py questionnaire.json

### Templates

Start with assets/templates/:

minimal.json - Bare bones structure
basic.json - Simple questionnaire
advanced.json - Complex with conditional logic

### Standardized Clinical Instruments (PHQ-9, GAD-7, etc.)

# Step 1: Find panel code (NEVER skip this)
python scripts/search_loinc.py "PHQ-9 panel"

# Step 2: Find answer options
python scripts/query_valueset.py --loinc-code "FOUND-CODE" --format fhir

# Step 3: See examples/templates
# Check references/examples.md for complete implementations

### Custom Organizational Questionnaires

# Step 1: Start with template
cp assets/templates/advanced.json my-questionnaire.json

# Step 2: For any clinical questions, search LOINC
python scripts/search_loinc.py "body weight"

# Step 3: Add answer options if available
python scripts/query_valueset.py --loinc-code "FOUND-CODE"

# Step 4: For custom questions without LOINC results, use inline answerOptions
# (no coding system needed - just code + display)

# Step 5: Validate
python scripts/validate_questionnaire.py my-questionnaire.json

### Custom Answer Lists (When LOINC Has No Match)

When LOINC search returns no suitable answer list, use inline answerOption with system-less valueCoding by default. This is the simplest, spec-compliant approach for custom answer lists:

{
  "linkId": "sleep-quality",
  "type": "choice",
  "text": "How would you rate your sleep quality?",
  "answerOption": [
    {"valueCoding": {"code": "good", "display": "Good"}},
    {"valueCoding": {"code": "fair", "display": "Fair"}},
    {"valueCoding": {"code": "poor", "display": "Poor"}}
  ]
}

Do NOT invent a coding system URI. Omitting system is valid FHIR and signals that these are local, questionnaire-scoped codes.

Opt-in: Reusable Welshare Coding System

If the user explicitly requests reusable codes that can be shared across questionnaires, use the Welshare namespace (http://codes.welshare.app) via the helper script:

python scripts/create_custom_codesystem.py --interactive

This creates a CodeSystem + ValueSet pair. To convert an inline answer list to the reusable format, add "system": "http://codes.welshare.app/CodeSystem/<category>/<id>.json" to each valueCoding and optionally reference the ValueSet via answerValueSet. See references/loinc_guide.md for details.

### Common Patterns

Conditional display: Use enableWhen to show/hide questions
Repeating groups: Set "repeats": true for medications, allergies, etc.
Standardized answers: Use query_valueset.py --loinc-code "CODE" for LOINC-backed answer lists
Custom answers: Use inline answerOption with valueCoding (no system) for non-standardized choices

See references/examples.md for complete working examples.

### search_loinc.py - Find LOINC Codes

python scripts/search_loinc.py "blood pressure"
python scripts/search_loinc.py "depression" --limit 10 --format fhir

### search_snomed.py - Find SNOMED CT Codes

python scripts/search_snomed.py "diabetes"
python scripts/search_snomed.py "hypertension" --limit 10 --format fhir
python scripts/search_snomed.py "asthma" --format table
python scripts/search_snomed.py "diabetes mellitus" --semantic-tag "disorder"

Formats: json (default), table, fhir
Semantic tags (when present in results): disorder, finding, procedure, body structure, substance, organism
Note: Semantic tag filtering only works when tags are included in the display name from the terminology server.

### query_valueset.py - Find Answer Options

python scripts/query_valueset.py --loinc-code "72166-2"
python scripts/query_valueset.py --loinc-code "72166-2" --format fhir
python scripts/query_valueset.py --search "smoking"

Alternative servers (if tx.fhir.org fails):

--server https://hapi.fhir.org/baseR4
--server https://r4.ontoserver.csiro.au/fhir

### validate_questionnaire.py - Validate Structure

python scripts/validate_questionnaire.py questionnaire.json
python scripts/validate_questionnaire.py questionnaire.json --verbose

### extract_loinc_codes.py - Analyze Codes

python scripts/extract_loinc_codes.py questionnaire.json
python scripts/extract_loinc_codes.py questionnaire.json --validate

### create_custom_codesystem.py - Reusable Custom Codes (Opt-in)

python scripts/create_custom_codesystem.py --interactive

Only use when the user explicitly requests reusable codes across questionnaires. Uses the Welshare namespace: http://codes.welshare.app. Default for custom answers is inline answerOption without a coding system.

### Troubleshooting

No LOINC results: Use broader search terms (e.g., "depression" not "PHQ-9 question 1")
Network errors: Try alternative servers with --server flag
Validation errors: Check references/fhir_questionnaire_spec.md for requirements
No answer list found: Use inline answerOption with system-less valueCoding (code + display only). Do NOT fall back to a custom coding system unless the user explicitly requests it

### Deep Knowledge References

We've assembled deep knowledge for you to consult on specific topics. Checkout the index file on See REFERENCE.md and drill down the knowledge path for highly detailed instructions on modelling questionnaires.

### Reference Links

FHIR Questionnaire Spec
LOINC Database
Complete Documentation
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: elmariachi111
- Version: 0.2.4
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-29T21:30:44.941Z
- Expires at: 2026-05-06T21:30:44.941Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/fhir-questionnaire)
- [Send to Agent page](https://openagent3.xyz/skills/fhir-questionnaire/agent)
- [JSON manifest](https://openagent3.xyz/skills/fhir-questionnaire/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/fhir-questionnaire/agent.md)
- [Download page](https://openagent3.xyz/downloads/fhir-questionnaire)