work-with-hts

Configure and operate the HTS FHIR Terminology Server for terminology import and API operations.

51|19|Updated Jan 4, 2025
One-click install
npx skills add https://github.com/HeliosSoftware/hfs --skill work-with-hts-heliossoftware
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: work-with-hts
Source: https://github.com/HeliosSoftware/hfs/tree/main/.agents/skills/work-with-hts
Command: npx skills add https://github.com/HeliosSoftware/hfs --skill work-with-hts-heliossoftware

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with the HFS Terminology Server requires knowing its runtime configuration, environment variables, terminology import formats, and FHIR terminology API endpoints, which are scattered across the codebase. ## Core Features & Use Cases - Runtime Configuration: Set up the hts binary with environment variables for port, host, database URL, storage backend, CORS, and bootstrap directory sync. - Terminology Import: Bulk import HL7 FHIR NPM packages, SNOMED CT RF2, LOINC, ICD-10-CM, and RxNorm RRF files with format auto-detection and batch controls. - Terminology APIs: Use FHIR operations like $lookup, $expand, $validate-code, $subsumes, $translate, and $closure on CodeSystem, ValueSet, and ConceptMap resources. - Use Case: Import a SNOMED CT RF2 release into a local SQLite terminology database, then validate codes against a ValueSet through the HTS REST API while HFS delegates memberOf() checks to it. ## Quick Start Start the HTS terminology server with cargo run --bin hts and import my terminology package into it.

Frequently Asked Questions about work-with-hts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I import SNOMED CT into a FHIR terminology server?▼

Run cargo run --bin hts -- import with the SNOMED CT RF2 ZIP file and the --format snomed-rf2 flag. The import requires an NRC license and loads descriptions in all languages as concept designations.

How do I configure the HTS terminology server port and database?▼

Set HTS_SERVER_PORT for the port (default 8090) and HTS_DATABASE_URL for the SQLite file path or PostgreSQL connection URL. HTS_STORAGE_BACKEND selects the backend, with postgres available when built with the postgres feature.

What terminology formats does HTS support for bulk import?▼

HTS imports HL7 FHIR NPM packages (.tgz), SNOMED CT RF2 ZIPs, LOINC CSV ZIPs, ICD-10-CM tabular XML, and RxNorm RRF directories. Formats are auto-detected from file extensions and content patterns, with --format as a fallback.

Does HTS support PostgreSQL as a storage backend?▼

Yes, HTS supports PostgreSQL when built with the postgres feature flag. Set HTS_DATABASE_URL to a PostgreSQL connection URL and HTS_STORAGE_BACKEND to postgres; SQLite is the default backend.

How does HTS bootstrap directory sync work on startup?▼

When HTS_BOOTSTRAP_DIR points at a directory, HTS hashes each recognized file with SHA-256 and records it in a bootstrap_imports ledger. Files import only when new or changed, and imports upsert on canonical url and version.

How do I select a display language for SNOMED CT lookups in HTS?▼

Pass the displayLanguage parameter or the Accept-Language header on $lookup, $expand, or $validate-code requests. Matching is BCP-47-aware, so de-DE finds de and fr accepts fr-CA designations.