Composable Python library and CLI for building FHIR SDC Questionnaires
Project description
fhir-sdc-tools
Composable Python library and CLI for building FHIR SDC Questionnaires, with an MCP server for interactive previews.
Quick start: Claude Code plugin
Install everything (MCP server + skill + CLI) as a plugin. Inside Claude Code:
/plugin marketplace add Tiro-health/fhir-sdc-tools
/plugin install fhir-sdc-tools
This gives you:
render-questionnaireMCP tool for interactive previewssdc-builderskill that teaches Claude to build questionnaires using the Python APIsdcCLI for shell-based workflows
Quick start: Claude Desktop / claude.ai
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"Tiro.health FHIR SDC tools": {
"command": "uvx",
"args": ["--from", "fhir-sdc-tools[mcp]", "fhir-sdc-mcp"]
}
}
}
Restart Claude Desktop. The render-questionnaire tool will appear in the tools menu.
Prerequisite: uv must be installed.
Quick start: Claude Code
claude mcp add "Tiro.health FHIR SDC tools" -- uvx --from "fhir-sdc-tools[mcp]" fhir-sdc-mcp
Python library
pip install fhir-sdc-tools
from sdc import (
Questionnaire, QuestionnaireItem, QuestionnaireItemType,
FhirVersion, add_item, set_fhir_version, validate,
)
q = Questionnaire(url="http://example.org/intake", title="Intake Form")
q = set_fhir_version(q, FhirVersion.R5)
q = add_item(q, QuestionnaireItem(link_id="name", text="Full name", type=QuestionnaireItemType.STRING))
q = add_item(q, QuestionnaireItem(link_id="dob", text="Date of birth", type=QuestionnaireItemType.DATE))
warnings = validate(q)
print(q.model_dump_json(by_alias=True, exclude_none=True, indent=2))
CLI
pip install fhir-sdc-tools
sdc init --url http://example.org/q1 --title "My Form" --name MyForm \
| sdc item add --link-id 1 --text "Name" --type string \
| sdc item add --link-id 2 --text "Age" --type integer \
| sdc validate
--name sets an optional computer-friendly identifier (Questionnaire.name), distinct
from --title (the human-readable label). Use it when you need a stable, machine-readable
name for programmatic look-up. Both sdc init and sdc meta accept this flag.
Extensions (SDC shortcuts and custom URLs):
sdc init --url http://example.org/q1 --title "My Form" \
| sdc item add --link-id 1 --text "Name" --type string \
| sdc extension add custom --link-id 1 \
--url "http://example.org/ext" --value-string "hello" \
| sdc validate
Install options
| Install | Gets you |
|---|---|
pip install fhir-sdc-tools |
Python library + sdc CLI |
pip install fhir-sdc-tools[mcp] |
Above + fhir-sdc-mcp server with render-questionnaire tool |
Feedback & Issues
Found a bug or have a feature idea? Open an issue on GitHub:
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fhir_sdc_tools-0.5.0.tar.gz.
File metadata
- Download URL: fhir_sdc_tools-0.5.0.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
918757e351e36cf57b77daf5eb34e949f703005f6dd7d8b75c2e1f04fc100fb4
|
|
| MD5 |
a5249877f1c1248ab00babb2f4232229
|
|
| BLAKE2b-256 |
818007617fd02323025294a7af4fa318d4d4b9c9505f898b5691abb96ad90d43
|
Provenance
The following attestation bundles were made for fhir_sdc_tools-0.5.0.tar.gz:
Publisher:
publish.yml on Tiro-health/fhir-sdc-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fhir_sdc_tools-0.5.0.tar.gz -
Subject digest:
918757e351e36cf57b77daf5eb34e949f703005f6dd7d8b75c2e1f04fc100fb4 - Sigstore transparency entry: 1308873015
- Sigstore integration time:
-
Permalink:
Tiro-health/fhir-sdc-tools@809940f5a8420c267f128ca8e58a105a27dbe0f8 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/Tiro-health
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@809940f5a8420c267f128ca8e58a105a27dbe0f8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fhir_sdc_tools-0.5.0-py3-none-any.whl.
File metadata
- Download URL: fhir_sdc_tools-0.5.0-py3-none-any.whl
- Upload date:
- Size: 117.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85042827fd40111b331f0c2c4a0ab995b316afe2fb69f9e2df4f759d0fd65ab7
|
|
| MD5 |
b30709cd176a9e07a685505d57dd647a
|
|
| BLAKE2b-256 |
dcc1685819dc5bc5eff060fd273b31500d38ca944b88cc11bce521eda3452697
|
Provenance
The following attestation bundles were made for fhir_sdc_tools-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on Tiro-health/fhir-sdc-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fhir_sdc_tools-0.5.0-py3-none-any.whl -
Subject digest:
85042827fd40111b331f0c2c4a0ab995b316afe2fb69f9e2df4f759d0fd65ab7 - Sigstore transparency entry: 1308873560
- Sigstore integration time:
-
Permalink:
Tiro-health/fhir-sdc-tools@809940f5a8420c267f128ca8e58a105a27dbe0f8 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/Tiro-health
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@809940f5a8420c267f128ca8e58a105a27dbe0f8 -
Trigger Event:
release
-
Statement type: