Skip to main content

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-questionnaire MCP tool for interactive previews
  • sdc-builder skill that teaches Claude to build questionnaires using the Python API
  • sdc CLI for shell-based workflows

Quick start: Claude Desktop / claude.ai

Add to your Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "Tiro Questionnaire": {
      "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 Questionnaire" -- 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.R4)
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" \
  | sdc item add --link-id 1 --text "Name" --type string \
  | sdc item add --link-id 2 --text "Age" --type integer \
  | 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

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

fhir_sdc_tools-0.3.0.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fhir_sdc_tools-0.3.0-py3-none-any.whl (110.2 kB view details)

Uploaded Python 3

File details

Details for the file fhir_sdc_tools-0.3.0.tar.gz.

File metadata

  • Download URL: fhir_sdc_tools-0.3.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

Hashes for fhir_sdc_tools-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7184325455daa3d7c406d0430cc31dc7446eb10c14a26fcdf54a662edc3651e6
MD5 6f4187b6477ebe1f1d94c10b268689f9
BLAKE2b-256 ccfc573871997c18a0f2ed487a16fe7a4c093d94f2ceb503a5a7728433ecb158

See more details on using hashes here.

Provenance

The following attestation bundles were made for fhir_sdc_tools-0.3.0.tar.gz:

Publisher: publish.yml on Tiro-health/fhir-sdc-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fhir_sdc_tools-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: fhir_sdc_tools-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 110.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fhir_sdc_tools-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a53f2593ab5a23ad6d7ae7439d65cf67f2dfaa8ac3de415530c8c2473375e146
MD5 f7d3edc7c6cf916aecaf609b221cb46d
BLAKE2b-256 78a5468a5c636ed00f09df81a45b4b13143ce1fdef2e93be78aa6d02cd6a0547

See more details on using hashes here.

Provenance

The following attestation bundles were made for fhir_sdc_tools-0.3.0-py3-none-any.whl:

Publisher: publish.yml on Tiro-health/fhir-sdc-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page