Define Custom FHIR Resource

Generate FHIR StructureDefinitions, SearchParameters, and resource configuration YAML for custom resource types.

2|Updated Jan 18, 2026
One-click install
npx skills add https://github.com/sg-victorchai/fhir4java-agents --skill define-custom-fhir-resource
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Define Custom FHIR Resource
Source: https://github.com/sg-victorchai/fhir4java-agents/tree/main/.claude/skills/define-custom-resource
Command: npx skills add https://github.com/sg-victorchai/fhir4java-agents --skill define-custom-fhir-resource

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams design and generate a brand-new FHIR resource type, including its StructureDefinition, SearchParameters, OperationDefinitions, and resource YAML configuration.

Core Features & Use Cases

  • Interactive, step-by-step guidance to define resource identity (name, URL namespace, base type).
  • Automated generation of FHIR artifacts (StructureDefinition, SearchParameters, Operations, ValueSets) and a ready-to-deploy resource configuration.
  • Suitable for extending FHIR with custom domains and ensuring compatibility with DomainResource inheritance.

Quick Start

Start by answering the guided prompts to specify the custom resource name, namespace, and base type, then let the skill generate the full artifact set.

Frequently Asked Questions about Define Custom FHIR Resource

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

FAQPage Schema
How do I create a custom FHIR resource from scratch?

To create a custom FHIR resource, you must define a StructureDefinition, generate SearchParameters and OperationDefinitions, and configure resource YAML. This requires specifying the resource name, URL namespace, and base type, then generating both snapshot and differential definitions.

What artifacts are required to define a new FHIR resource type?

Defining a new FHIR resource type requires generating a StructureDefinition, SearchParameters, OperationDefinitions, and resource configuration YAML. These artifacts must include both snapshot and differential definitions with proper base paths and element typing.

How do I generate FHIR StructureDefinitions with snapshot and differential elements?

Generating FHIR StructureDefinitions with snapshot and differential elements involves extending FHIR with custom resources by defining proper base paths and element typing. You must ensure compatibility with DomainResource inheritance to meet exacting FHIR profiling requirements.

When do I need to extend FHIR with custom resources instead of profiling existing ones?

You need to extend FHIR with custom resources when introducing entirely new custom domains that existing resources cannot cover. This involves creating a brand-new FHIR resource type and generating the full artifact set, including StructureDefinitions, SearchParameters, and OperationDefinitions.

Can I use DomainResource inheritance when defining a custom FHIR resource?

Yes, you can use DomainResource inheritance when defining a custom FHIR resource. The generation process ensures compatibility with DomainResource inheritance while producing the required StructureDefinitions, SearchParameters, OperationDefinitions, and resource configuration YAML.

What is the best way to configure SearchParameters and OperationDefinitions for a new FHIR resource?

The best way to configure SearchParameters and OperationDefinitions for a new FHIR resource is through automated generation as part of the full artifact set. This ensures proper integration with the StructureDefinition and resource configuration YAML, meeting exacting FHIR profiling requirements.